MATLAB Answers

0

Difference between two plots of this final output figure??

Asked by ABU BAKAR TALHA on 18 Sep 2019
Latest activity Commented on by Star Strider
on 18 Sep 2019
I am trying to learn MATLAB and i came across a command lsim and i opened its help and from there i get code and tried to simulate that code in my MATLAB . I get two plots in final output figure but i am confused why it gives two plots in final output figure despite the fact that each subplot contains two waveforms??what is the difference between these two subplots as shown in attachment?? What is above plot showing and what is its meaning?? and what bottom plot showing and its meaning??nor.PNG

  1 Comment

Read here
Generate test input signals for lsim
and

Sign in to comment.

Products


Release

R2015a

Communities

More Answers in the  Power Electronics Community

1 Answer

Answer by Star Strider
on 18 Sep 2019
Edited by Star Strider
on 18 Sep 2019
 Accepted Answer

The system being modeled Simulate Response to Square Wave is a 1-input, 2=output (SIMO) system, presenting the same input to both systems. The upper plot shows the output of the first system, and the lower plot shows the output of the second system. (They are clearly labeled.)

  5 Comments

Both systems are ‘H’. It is a SIMO system, since the ‘B’ matrix is a vector, so the same input is presented to both systems. A MIMO system (as depicted in Control Systems/MIMO Systems) has separate inputs for each system, controlled by the structure of the ‘B’ matrix.
To see this most easily, convert it to state space, then repeat the lsim call:
H = [tf([2 5 1],[1 2 3]);tf([1 -1],[1 1 5])];
S = ss(H)
[u,t] = gensig('square',4,10,0.1);
lsim(S,u,t)
You will see that ‘S’ is:
S =
A =
x1 x2 x3 x4
x1 -2 -1.5 0 0
x2 2 0 0 0
x3 0 0 -1 -2.5
x4 0 0 2 0
B =
u1
x1 2
x2 0
x3 1
x4 0
C =
x1 x2 x3 x4
y1 0.5 -1.25 0 0
y2 0 0 1 -0.5
D =
u1
y1 2
y2 0
Continuous-time state-space model.
The lsim output is the same as before.
Are you calling/denoting/meaning numerator of H as one system and denominator H as second system??
No. They are two separate systems, as originally constructed in ‘H’, as two separate transfer functions.

Sign in to comment.