You are on page 1of 5

qwertyuiopasdfghjklzxcvbnmqw

ertyuiopasdfghjklzxcvbnmqwert
yuiopasdfghjklzxcvbnmqwertyui
opasdfghjklzxcvbnmqwertyuiopa
Control System
Assignment 01
sdfghjklzxcvbnmqwertyuiopasdf
Abdusamed Ahmed 206
ghjklzxcvbnmqwertyuiopasdfghj
Mech 31 A
klzxcvbnmqwertyuiopasdfghjklz
xcvbnmqwertyuiopasdfghjklzxcv
bnmqwertyuiopasdfghjklzxcvbn
mqwertyuiopasdfghjklzxcvbnmq
wertyuiopasdfghjklzxcvbnmqwe
rtyuiopasdfghjklzxcvbnmqwerty
uiopasdfghjklzxcvbnmqwertyuio
pasdfghjklzxcvbnmqwertyuiopas
dfghjklzxcvbnmqwertyuiopasdfg
3/28/2010

Question 1
We first had to expand the equation to know the coefficient of each power. We then entered
the coefficient into a matrix form to calculate the function partial fraction. Command r,p,k=reside[ab]
was used.

>> syms s
>> g= s*(s+40)*(s+50)*(s^2+175)*(s^2+65+90)
g =
s*(s+40)*(s+50)*(s^2+175)*(s^2+155)
>> expand(g)
ans =
s^7+2330*s^5+687125*s^3+90*s^6+29700*s^4+2441250*s^2+54250
000*s
>> syms s
>> f = 10^4*(s+10)*(s+60)
f =
(10000*s+100000)*(s+60)

>> expand(f)
ans =
10000*s^2+700000*s+6000000
>> a= [1 90 2330 29700 687125 0 2441250 54250000 0]
a =
Columns 1 through 7

1 90 2330 29700 687125 0 2441250


Columns 8 through 9
54250000 0
>> b=[0 0 0 0 0 0 0 10000 700000 6000000]
b =
Columns 1 through 7
0 0 0 0 0 0 0
Columns 8 through 10
10000 700000 6000000
>> [r,p,k]= residue(b,a)
r =
0.0000
-0.0001
0.0007 - 0.0011i
0.0007 + 0.0011i
-0.0442 - 0.0074i
-0.0442 + 0.0074i
-0.0235
0.1106

p =
-48.8481
-41.6058
0.0903 +18.3999i
0.0903 -18.3999i
2.2330 + 3.7174i
2.2330 - 3.7174i
-4.1926

k =
[]

Question 2

We were given two functions to display their output when multiplied. By simply defining them and
using the multiply command, the problem was solved.
Below is the Matlab code which was used :>> B1 = [1 2 1];
>>B2 = [1 1];
The multiply command
>>B3 = conv(B1,B2)
B3
1

Question 3
Below is the code used :Output
m = 10;
b = 0.5;
k = 1;
num = [ 1 ];
den = [ m b k ];
tutorial_tf = tf(num, den)
step(tutorial_tf)

Transfer function:
1
-----------------10 s^2 + 0.5 s + 1

You might also like