Professional Documents
Culture Documents
AIM:
Conversion of Transfer function to a state space model
APPARATUS REQUIRED:
Personal Computer with MATLAB.
Procedure:
PROBLEM STATEMENT:
Solution:
%Nathan Shankar 19BEE0381
clear all
clc
'(a)Phase Variable form'
'G(s)'
G=zpk([-3,-5],[-1,-4,-6,-8],10)
'T(s)'
T=feedback(G,1,-1)
[numt,dent]=tfdata(T,'V');
'Controller Canonical Form Determination'
[AC , BC, CC, DC]= tf2ss(numt,dent)
A1= flipud(AC);
'Phase variable form representation'
Apv= fliplr(A1)
Bpv= flipud(BC)
Cpv= fliplr(CC)
'(b) Modal form'
'G(s)';
G=zpk([-3,-5],[-1,-4,-6,-8],10);
'T(s)';
T=feedback(G,1,-1);
[numt,dent]=tfdata(T,'V');
'Controller Canonical Form';
[AC , BC, CC, DC]= tf2ss(numt,dent);
'Modal form'
[A, B, C, D]=canon(AC, BC, CC, DC, 'modal')
Matlab Output:
AC =
-19.0000 -132.0000 -376.0000 -342.0000
1.0000 0 0 0
0 1.0000 0 0
0 0 1.0000 0
BC =
1
0
0
0
CC =
0 10 80 150
DC =
0
A1 =
0 0 1.0000 0
0 1.0000 0 0
1.0000 0 0 0
-19.0000 -132.0000 -376.0000 -342.0000
Apv =
0 1.0000 0 0
0 0 1.0000 0
0 0 0 1.0000
-342.0000 -376.0000 -132.0000 -19.0000
Bpv =
0
0
0
1
Cpv =
150 80 10 0
'Modal form'
-6.4425 2.0551 0 0
-2.0551 -6.4425 0 0
0 0 -4.4249 0
0 0 0 -1.6902
B =
-34.4657
-47.3183
39.6526
4.7407
C =
0
Screenshot of the Output:
Inference from Code and Output:
The observable canonical form can be obtained from the
controllable canonical form simply by transposing the A matrix
and by transposing and swapping the b and c vectors.