Assignemtn 1
Assignemtn 1
Matlab Code
clear all
clc
close all
%State Space Matrices
A = [0 1 0 0;0 0 1 0;0 0 0 1;-680 -176 -86 -6]
B = [0;0;0;1]
C = [100 20 10 0]
D = [0]
[a,b] = ss2tf(A,B,C,D)
MyTF = tf (a,b)
subplot(211), step(MyTF)
subplot(212), impulse(MyTF)
output
A =
0
0
0
-680
1
0
0
-176
0
1
0
-86
0
0
1
-6
20
10
B =
0
0
0
1
C =
100
D =
0
a =
0
10.0000
20.0000
100.0000
b =
1.0000
6.0000
86.0000
176.0000
MyTF =
10 s^2 + 20 s + 100
---------------------------------s^4 + 6 s^3 + 86 s^2 + 176 s + 680
Continuous-time transfer function.
>>
680.0000
Q2