You are on page 1of 9

NATIONAL CHENG KUNG UNIVERSITY

Department of Mechanical Engineering

LINEAR SYSTEM
HOMEWORK 8

Instructor:

Prof. Szu Chi Tien

Student:

Nguyen Van Thanh

Student ID:

P96007019

Department:
Class:

Department of Mechanical Engineering


1001- N154000 Linear System

Contents
Problem 1 ......................................................................................................................... 2
Problem 2 ......................................................................................................................... 6

Linear System Theory

Page 1

Problem 1
Given the following MIMO transfer function:
3
+ 2
() =
2
2
+2 +2
1

1 ()
()
1. Find a right-coprime matrix fraction description of () =

1 2
0
( + 2 2)
0
+ 2
12

+2
2
1
0

++2 1
11
=
3
= 1
21
1
+ 2
( 2 + 2 + 10)
3 + 3
0
12

2 + 2 0
2
2
+
2

6)
1/6(

1
12
1
[ ]22 )
1 ( =
22

+2
0
1
() = 11

=
2
0
++2

+ 2 3( + 1)
1
() = 21
=

2
2 + 2

1 () =
()
() =

1
+ 2 3( + 1) + 2
0

0
2 + + 2
2
2 + 2

2. Using results from Part (1), find a minimal state-space realization (A,B,C,D) of G(s)
in controller form.
1 0
0
, () = 0 1
() =
0 2
0
=

Linear System Theory

1 0
2
, =
0 1
0

0 0

2 3

Page 2

2 3 3
1 0
=
, =

2 1
0 2 1
1
=
=

1 0

2 1

0
3
3
1
+ =

=
4 4 2
1 0
= 0 0
0 1

2
= 0
0

0
0
0
1
2 3

3. Find the Smith-McMillan form of G(s).


The lowest common multiple of the denominators of G(s) is () = ( + 1)( + 2)
( + 1)( + 2)
3( + 1)
()() = () =

2( + 1)
( 1)( + 2)

We will find the Smith-McMillan form of N(s)


1
() =
0

( + 1)( 3 2 6 4)
3

2
6
() =
( 1)( + 2) 3( + 2)

2
2
0

2
( + 1)( 4)
() =
1
3

() = 1 () ()1 () = ()()
Linear System Theory

Page 3

() =

1 () ()1 ()
()

0
1 () ( + 1)( + 2)
1 ()
=
3
2
3 6 4

+2

4. Using results of Part (3), find the system poles and its structure.
We have:
1 () = 1

1 () = ( + 1)( + 2)

So, the system has:

() = 3 3 2 6 4
2
2 () = + 2

- One pole at s = -1 of order 1,


- Two poles at s = -2 of order 1.
The order of the system is 3.
Matlab code:
clear all; close all; clc;
% part 1
syms s;
Nr = [(s+1)*(s+2) 3*(s+1);
2*s*(s+1) (s-1)*(s+2)];
Dr = [(s+1)*(s+2) 0;
0
(s+1)*(s+2)];
H = [Dr; Nr];
U = [1/24*(8-6*s+8*s^2+3*s^3-s^4)
1/6*(2+4*s-s^2)
1/3*(2+s)
1/2*(-4-6*s-3*s^2+s^3)
U_inv = U^(-1);
simplify(U_inv);
U_inv11 = U_inv(1:2,1:2);
U_inv21 = U_inv(3:end,1:2);
Drw = U_inv11;
Nrw = U_inv21;

Linear System Theory

0
0
1
0

1/24*(4-6*s-2*s^2+3*s^3+s^4)
1/6*(-2+2*s+s^2)
1/3*(-2-s)
-1/2*(-1+s)*(2+s)^2

1/8*(2-3*s^2-s^3);
1/2*(-2-s);
0;
3/2*(2+3*s+s^2)];

Page 4

simplify(Drw);
simplify(Nrw);
Gs = Nrw/Drw;
% part 2
Ss = [s 0;
0 s^2];
Psi_s = [1 0;
0 1;
0 s];
Dhc = eye(2);
Dlc = [2 0 0;
0 2 3];
Nhc = [1 0;
2 1];
Nlc = [2
3
3;
0
-2 1];
Dhc_inv = eye(length(Dhc))\Dhc;
Dhlc = -Dhc_inv*Dlc;
C = -Nhc*Dhc_inv*Dlc + Nlc;
D = Nhc*Dhc_inv;
B = [1 0;
0 0;
0 1];
A = [-2 0 0;
0 0 1;
0 -2 -3];
% part 3 the Smith-McMillan form
N=[s^2+3*s+2
3*s+3
2*s^2+2*s
s^2+s-2];
d=s^2+3*s+2;
I=eye(2);
R1=[0 1
1 0];
N1=N*R1;
N1=simplify(N1);
R2=[1 -s/3
0 1];
N2=N1*R2;
N2=simplify(N2);
L1=[1 0
-s/3 1];
N3=L1*N2;
N3=simplify(N3);
L2=[0 -1/2
1 0];
N4=L2*N3;
N4=simplify(N4);
L3=[1 0
-3*s-3 1];
N5=L3*N4;
N5=simplify(N5);
R3=[1 s^2/2+s-s^3/6
0 1];
N6=N5*R3;
N6=simplify(N6);
R4=[1 0

Linear System Theory

Page 5

0 -2];
N7=N6*R4;
N7=simplify(N7);
N_SM = N7;
simplify(N_SM);
R=R1*R2*R3*R4;
R=simplify(R);
L=L3*L2*L1;
L=simplify(L);
SM=N7/d;
SM=simplify(SM);

Problem 2
Consider the following linear time-invariant system (A,B,C,D) where

1. Determine the Smith-McMillan form of the transfer function matrix: () =


( )1 +

Let () =

NSM(s).

+2
+3

+ 1 ( + 1)
1

() = ( ) + =
1
+ 2

( + 2)
+3
( + 1)() =

( + 2)( + 1) + 1

( + 2)
( + 2)( + 1)

+3
, we will find the Smith-McMillan form of N(s) i.e.
+1

Linear System Theory

0
3
() =

( + 1)( + 2)
0
2

Page 6

() = 1 () ()1 () = ()()
1
1
() = + 1 + 3

2
2
0
1

+
2
1
() =

2
2

() =

1 () ()1 ()
()

( + 1)
= 1 ()

1 ()
3 ( + 2)
2
0

2. Determine the system eigenvalues.


= 4, 1, 0, 0

3. Determine the system poles and its pole structure from the Smith-McMillan form.
Are the system eigenvalues the same as the system poles? Explain.

The system has:

() = ( + 1)
1
2 () =

- One pole at s = -1 of order 1,


- Two poles at s = 0 of order 1
The system eigenvalues are not the same as the system poles. Because, the system
eigenvalues are calculated at the original system. The original system is not a minimal
realization of G(s). We can clearly see that the minimal system has degree of 3, but the
original has degree of 4.

Linear System Theory

Page 7

Matlab code:
clear all; close all; clc;

A=[0
0
0
0
B=[1
C=[0
D=[1

0 0 0
0 0 0
0 -1 0
0 0 -4];
0;0 1;1 -2;0 0];
3 1 1;2 1 0 0];
0;1 0];

% Part 1. Determine the Smith-McMillan form of G(s)


syms s;
I=eye(4);
Gs=C*inv(s*I-A)*B+D;
Gs=simplify(Gs);
N=[s^2+2*s
s+3
s^2+3*s+2 s+1];
d=s^2+s;
% interchange clo.1 and col.2, using the elementary column operation
R1 = [0 1; 1 0];
N1 = N*R1;
L1 = [1 0; -1 1];
N2 = L1*N1;
R2 = [1 -s; 0 1];
N3 = N2*R2;
N3 = simplify(N3);
L2 = [0 1; 1 0];
N4 = L2*N3;
N4 = simplify(N4);
L3 = [1 0; (s+3)/2 1];
N5 = L3*N4;
N5 = simplify(N5);
R3 = [1 (3*s + 2)/2; 0 1];
N6 = N5*R3;
N6 = simplify(N6);
R4 = [-1/2 0; 0 1];
N7 = N6*R4;
N7 = simplify(N7);
N_SM = N7;
R=R1*R2*R3*R4;
R=simplify(R);
L=L3*L2*L1;
L=simplify(L);
NN = L^(-1)*N_SM*R^(-1);
NN = simplify(NN);
SM = N7/d;
SM = simplify(SM);
NN = L^(-1)*N_SM*R^(-1);
NN = simplify(NN);
% part 2. the system eigenvalues
eigs = eig(A);

Linear System Theory

Page 8

You might also like