How to chose one form of transfer function from other forms

4 views (last 30 days)
Hi,
I want to generate the transfer function of an induction motor by using its caracteristic matrix (A,B,C,D):
syst=ss(A,B,C,D)
[num,dem]=tfdata(syst)
h=tf(num,dem)
but I get 4 from of transfer function h because I have 2 inputs in my system :
h =
From input 1 to output...
60.54 s^3 + 1.003e04 s^2 + 4.953e08 s - 1.133e11
1: ------------------------------------------------------
s^4 + 318.4 s^3 + 8.206e06 s^2 - 3.742e09 s + 4.281e11
-6.605e07 s - 3.266e08
2: ------------------------------------------------------
s^4 + 318.4 s^3 + 8.206e06 s^2 - 3.742e09 s + 4.281e11
From input 2 to output...
6.605e07 s + 3.266e08
1: ------------------------------------------------------
s^4 + 318.4 s^3 + 8.206e06 s^2 - 3.742e09 s + 4.281e11
60.54 s^3 + 1.003e04 s^2 + 4.953e08 s - 1.133e11
2: ------------------------------------------------------
s^4 + 318.4 s^3 + 8.206e06 s^2 - 3.742e09 s + 4.281e11
Continuous-time transfer function.
I want to use this command :
sys=ss(tf(h))
but I need to choose one of these transfert functions.

Answers (1)

Paul
Paul on 18 Dec 2020
Edited: Paul on 19 Dec 2020
You don't need to get the num and den explicitly using tfdata (unless you need them for some reason). To convert from ss to tf:
h = tf(syst)
h is a transfer function matrix that you can index into to pick what you want. For example, a state space realization for the transfer function from the first input to the second output is:
sys = ss(h(2,1))
  4 Comments
Paul
Paul on 20 Dec 2020
Walter's solutions should work. One clarification: I believe that step always returns y with as many rows as in t, even for systems with a single output.
Abdelouahab IGHISSANE
Abdelouahab IGHISSANE on 21 Dec 2020
Edited: Abdelouahab IGHISSANE on 21 Dec 2020
Hi again
I used [ones(size(y)) y], yet I got an error:
[yest,test,xest]=lsim(est,[ones(size(y)) y],t,xest0);
error message:
When simulating the response to a specific input signal, the input data U must be a matrix of numeric values with at least two rows (samples) and without any NaN or Inf.
I tryed the other formula: [ones(size(y,1),1) y] but i got the following error message:
Error using horzcat
Dimensions of arrays being concatenated are not consistent.

Sign in to comment.

Categories

Find more on Periodic Waveform Generation in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!