Assignment #1 Control Systems Lab: Submitted By: Submitted To
Assignment #1 Control Systems Lab: Submitted By: Submitted To
Assignment #1
Control systems
lab
Submitted by:
Ahmed Yaseen (140501047)
Submitted to:
Maam shahdab zukhra
Task #1
Commands :
x=[12 4 5 7];
z=x+16
s=sqrt(x)
t=x'
Outputs:
z = 28 20 21 23
s = 3.4641 2.0000 2.2361 2.6458
t = 12
4
5
7
Task #2
Find the solution of the following equations.
Commands:
a=[2 1 -4 6 3 -2;-1 2 3 5 -2 0;1 -2 -5 3 2 1;4 3 -2 2 0 1;3 1 -1 4 3
6;5 2 -2 3 1 1]
b=[16;-7;1;-1;-11;5]
x=inv(a)*b
outputs:
a =
2 1 -4 6 3 -2
-1 2 3 5 -2 0
1 -2 -5 3 2 1
4 3 -2 2 0 1
3 1 -1 4 3 6
5 2 -2 3 1 1
b =
2.0000
-1.0000
1.0000
-0.0000
3.0000
-4.0000
x=
16
-7
1
-1
-11
5
Task #3
Find out the partial expansion terms for the following transfer functions:
()/()=2+2+3/(+1)3
Commands:
num=[0 1 2 3];
dum=[1 3 3 1];
[r, p, k]=residue(num,dum)
Outputs:
r = 1
p = -1
-1
-1
k = []
()()=5+84+233+352+28+3/3+62+8
Commands:
num=[1 8 23 35 28 3];
dum=[0 0 1 6 8 0];
[r, p, k]=residue(num,dum)
Outputs:
r = 0.3750
0.2500
0.3750
p = -4
-2
k = 1 2 3
Task #4
Obtain the actual transfer functions in ()() form:
Commands :
z=[-1];
p=[-2; -4; -8]
k=12;
[num,den]=zp2tf(z,p,k)
Outputs:
p =
-2
-4
-8
num = 0 0 12 12
den = 1 14 56 64
Task #5
Extract the given matrix from the parent matrix.
Commands:
a=[1 2 3;7 6 0;63 12 -89]
z=a(1:2,2)
y=a(1:3,1:2)
outputs:
a = 1 2 3
7 6 0
63 12 -89
z = 2
6
y = 1 2
7 6
63 12