Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1.Continuing MATLAB® Exercise CME3.2 part (a). - Submit a MATLAB® script m-file

ID: 2084076 • Letter: 1

Question

1.Continuing MATLAB® Exercise CME3.2 part (a).
- Submit a MATLAB® script m-file that produces the required output.

2.Continuing Exercise CE3.2 part (a).
- Submit a MATLAB® script m-file that produces the numerical results that you integrate into your solution.

CME 3.2 For the CME1.2 system: a. Assess the system controllability. b. Compute the controller canonical form CMEL2 Given the following open-loop single-input, single-output three-dimensional linear time-invariant state equations, namely ii(t) xi (i) i2 (I) x20) i3(t) -52 30 -4 3 (t) xi (t) x3 (t) find the associated open-loop transfer function H (s).

Explanation / Answer

General state space model equations are xdot=ax+bu

y=cx+du

For our model given

matlab command

a=[0 1 0;0 0 1;-52 -30 -4];

a =

0 1 0
0 0 1
-52 -30 -4


>> b=[0 ;0; 1]

b =

0
0
1


>> c=[20 1 0]

c =

20 1 0

d=0

for getting state space model matlab command

sys=ss(a,b,c,d)

a =
x1 x2 x3
x1 0 1 0
x2 0 0 1
x3 -52 -30 -4

b =
u1
x1 0
x2 0
x3 1

c =
x1 x2 x3
y1 20 1 0

d =
u1
y1 0

Now we will check the controllability of the system.

first we will check the system matrix

eig(a)

ans =

-2.0000
-1.0000 + 5.0000i
-1.0000 - 5.0000i

The rank of the system matrix

rank(a)

ans =

3

for controllability checking rank of controllability matrix has to be full rank

controllability matrix is =[b a*b a^2*b ---]

The matlab command for checking controllability is

ctest=ctrb(a,b);
>> rank(ctest)

ans =

3

The controllability matrix has full rank.

So system is controllable. hence first solution is given.

controllable cannonical form:

Convert statespace to transferfunction

[num,den]=ss2tf(a,b,c,d)

num =

0 0.0000 1.0000 20.0000


den =

1.0000 4.0000 30.0000 52.0000

>> sysaa=tf(num,den)

Transfer function:
1.776e-015 s^2 + s + 20
-----------------------
s^3 + 4 s^2 + 30 s + 52

>> Matlab command for getting cannonical form
>> Gc = canon(sysaa,'modal')

a =
x1 x2 x3
x1 -1 5 0
x2 -5 -1 0
x3 0 0 -2

b =
u1
x1 -0.4722
x2 -1.551
x3 0.8838

c =
x1 x2 x3
y1 -0.07532 0.4694 0.7833

d =
u1
y1 0

Continuous-time model.