ELEC-E8116 Model-Based Control Systems /exercises and Solutions 3
ELEC-E8116 Model-Based Control Systems /exercises and Solutions 3
F1 y1
m1
F2 k1 b1 y2
m2
k2 b2
Solution:
m1 y1 = F1 − k1 ( y1 − y 2 ) − b1 ( y1 − y 2 )
m2 y2 = F2 + k1 ( y1 − y 2 ) + b1 ( y1 − y 2 ) − k 2 y 2 − b2 y 2
x1 = x3
x 2 = x 4
m1 x 3 = F1 − k1 ( x1 − x 2 ) − b1 ( x3 − x 4 )
m2 x 4 = F2 + k1 ( x1 − x 2 ) + b1 ( x3 − x 4 ) − k 2 x 2 − b2 x 4
x = Ax + Bu
y = Cx
in which
0 0 1 0
0 0 0 1
− k k1 − b1 b1
A=
1
m1 m1 m1 m1
k1 − ( k1 + k 2 ) b1 − (b1 + b2 )
m2 m2 m2 m2
0 0
0
1 0
1 0 0 0 0 0
B= 0 C= D=
m1 0 1 0 0 0 0
1
0
m2
When using Matlab also the D matrix must be given (with correct
dimensions).
Singular Values
30
20
10
Singular Values (dB)
-10
-20
-30
-40
-50
-1 0 1
10 10 10
Frequency (rad/sec)
d. The calculation of the H∞-norm of the transfer function is a difficult task (and
no theoretical background for it has been given during the course either). Use
the commands of the Robust Control Toolbox in Matlab (it is related to robust
control theory, but the toolbox can be utilized in other purposes also).
1. G = pck(A,B,C,D); form the system matrix. The transfer function (or matrix of the
transfer functions) can be also defined using ss(A,B,C,D) or tf(A,B,C,D).
2. hinfnorm(G,0.001); - calculate an approximation to the norm; tolerance
(accuracy) 0.001
The result is between 11.47 and 11.48 at the angular frequency 0.848. Note that in
the figure the singular values are in dB-units.
10( s + 1) 1
2 s +1
G ( s ) = s + 0.2 s + 100
s+2 5( s + 1)
2
s + 0.1s + 10 ( s + 2)( s + 3)
Solution:
Gss=ss(G);
Form the minimal realization i.e. the representation with a minimal number of state
variables that generates the same input-output behaviour.
Gssm=minreal(ss(G));
[A,B,C,D]=ssdata(Gss);
[Am,Bm,Cm,Dm]=ssdata(Gssm);
We note that the first state-space representation was in fact the minimal realization (A
= Am etc.)
2( s + 1)( s + 2) s+2
G1 ( s ) =
s ( s + 3)( s + 4) ( s + 1)( s + 3)
1 s+3
s +1 ( s + 1)( s − 2)
G2 ( s) =
10 5
( s − 2) s+3
Solution:
2( s + 1)( s + 2) s+2
System 1: Minors ,
s ( s + 3)( s + 4) ( s + 1)( s + 3)
The “largest” minors (here the only ones have the degree 1. Arrange the pole
polynomial to the denominator
2( s + 1) 2 ( s + 2) s ( s + 2)( s + 4)
,
s ( s + 1)( s + 3)( s + 4) s ( s + 1)( s + 3)( s + 4)
ans =
0
-4
-3
-3
-1
pole(minreal(G1))
ans =
0
-4
-3
-3
-1
Same results. But programs are only programs! Form first a state-space realization,
and from it the minimal realization
G1ss=minreal(ss(G1))
1 state(s) removed.
a=
x1 x2 x3 x4
x1 -3.0047 0.33629 -0.35451 -0.57787
x2 2.6142 -0.31631 -0.18814 0.39683
x3 2.4213 -0.47446 -4.2822 -0.90475
x4 -1.6142 0.31631 2.1881 -0.39683
b=
u1 u2
x1 -1.4021 0.16105
x2 0.46736 -0.053685
x3 0.70105 0.91947
x4 -0.46736 0.053685
c=
x1 x2 x3 x4
y1 -1.2095 -0.34684 1.2297 0.84684
d=
u1 u2
y1 0 0
Continuous-time model.
pole(G1ss)
ans =
-3.0000
-4.0000
-0.0000
-1.0000
The result is correct. The Matlab command tzero(G1) (transmission zero) gives the
zero –2, as desired.
System 2: Minors
1 s+3 10 5
, , , ,
s + 1 ( s + 1)( s − 2) s−2 s+3
5 10( s + 3) − 5( s 2 + 16 s + 14)
− ==
( s + 1)( s + 3) ( s + 1)( s − 2) 2 ( s + 1)( s + 3)( s − 2) 2
Zeros: the largest minor has the dimension 2. Arrange again the pole polynomial to
the denominator
− 5( s 2 + 16 s + 14)
z ( s) =
( s + 1)( s − 2) 2 ( s + 3)
Zeros -15.07, -0.93 (both have the degree one). Confirm with Matlab.
0 100
G (s ) =
0 0
prove that eigenvalues do not give a reliable view about the gain of a multivariable
system. What is a better alternative?
Solution: The eigenvalues of the matrix are both zero. However, the input
u = [0 1] gives the output y = [100 0] . So, at least in this input direction the
T T
eigenvalue 0 does not describe the system well. The problem is that generally
eigenvalues describe the gain only in the direction of the eigenvector. Let (λ i , t i ) be
the eigenvalue-eigenvector pair related to the matrix G. For the eigenvector as input
y λ i ti
y = Gt i = λ i t i ⇒ = = λ i
ti ti