Professional Documents
Culture Documents
Control System As - 01 Matlab Simple Functions
Control System As - 01 Matlab Simple Functions
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
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