Control Systems Lab: Submitted by
Control Systems Lab: Submitted by
Control Systems Lab: Submitted by
P2
Submitted By:
Syed Muhammed Baqir Naqvi (170984)
Muhammed Inam Anwar (170966)
Qazi Ahasan Nawaz (171008)
Class/Sec: BEEP 5A
Submitted To: Engr. Hussain Asif
Instructor’s Remarks:
2. Procedures:
Using Matlab approach to determine the State space modeling of a system.
The system we need to model via state modeling is as follows.
x1 '
y=x 3= [ 0 0 0 0 0 0 ] x 2
x2 '
x3
x3 '
[]
Here we can conclude the values of A,B,C and D
0 1 00 0 0
A=
[
−1 −1 0 1 0 0
0 0 01 0 0
0 1 −1 −1 −1 0
0 0 0 0 0
0 0 1 0 −1 −1
C=[ 0 0 0 0 0 0 ]
1 ]
, B=[ 0 1 0 0 0 0 ]
Now that we need to implement it on the Matlab to declare our state space model.
We would simply do.
Code:
A=[0 1 0 0 0 0;-1 -1 0 1 0 0;0 0 0 1 0 0;0 1 -1 -1 -1 0;0 0 0 0 0 1;0 0 1 0 -1
-1];
B=[0;1;0;0;0;0];
C=[0 0 0 0 1 0];
D=[];
x=ss(A,B,C,D)
y=tf(x)
Results:
X =
A =
x1 x2 x3 x4 x5 x6
x1 0 1 0 0 0 0
x2 -1 -1 0 1 0 0
x3 0 0 0 1 0 0
x4 0 1 -1 -1 -1 0
x5 0 0 0 0 0 1
x6 0 0 1 0 -1 -1
B =
u1
x1 0
x2 1
x3 0
x4 0
x5 0
x6 0
C =
x1 x2 x3 x4 x5 x6
y1 0 0 0 0 1 0
D =
u1
y1 0
Result:
x =
A =
x1 x2 x3 x4 x5 x6
x1 0 1 0 0 0 0
x2 -1 -1 0 1 0 0
x3 0 0 0 1 0 0
x4 0 1 -1 -1 -1 0
x5 0 0 0 0 0 1
x6 0 0 1 0 -1 -1
B =
u1
x1 0
x2 1
x3 0
x4 0
x5 0
x6 0
C =
x1 x2 x3 x4 x5 x6
y1 0 0 0 0 1 0
D =
u1
y1 0
y =
s - 4.441e-16
---------------------------------------------
s^6 + 3 s^5 + 5 s^4 + 6 s^3 + 6 s^2 + 4 s + 2
1 0 0 0 0 0
0 1 0 0 0 0
0 0 1 0 0 0
0 0 0 1 0 0
0 0 0 0 1 0
0 0 0 0 0 1
q =
[ s, -1, 0, 0, 0, 0]
[ 1, s + 1, 0, -1, 0, 0]
[ 0, 0, s, -1, 0, 0]
[ 0, -1, 1, s + 1, 1, 0]
[ 0, 0, 0, 0, s, -1]
[ 0, 0, -1, 0, 1, s + 1]
s
----------------------------------------
6 5 4 3 2
s + 3 s + 5 s + 6 s + 6 s + 4 s + 2
3. Learning outcomes:
This lab enables us to make our grip stronger towards the state space model and how to generate it using
transfer function. We calculated equations from the translational Mechanical system and then using
procedure of conversions conclude the matrices. Moreover, it teaches us to plot zeros and poles of a
system using MATLAB.