Académique Documents
Professionnel Documents
Culture Documents
Third year
1.
i
f-
input
transd.
k
u
- m+
6-
amplifier
ka
torque
motor
km
gear-box
n/1
inertial
load, J
m
+
+ 6
kd
tacho
kt
output
transd.
k
Figure 1:
Note that this is a connection diagram and is not a block diagram in the usual sense. In
particular the motor output shaft is connected to a gear box and tachometer, but the motors
output is really torque. An assumption in a block diagram is that the input/output relation of
each block is independent of the rest of the system. The underlying equation of motion is:
J o = torque on output shaft = n motor torque = nkm ka u
and together with noting that the tacho measures no , this gives the following block diagram:
i
f-
u
- m+
6-
ka km
1
Js
o
-
1
s
w
m
+
+ 6
kd kt
Figure 2:
o
o
1
x 2 = o = nkm ka u,
J
u = k i w, w = kd kt nx2 + k x1
y = Cx + Du
1
is G(s)
the Lecture Notes). In this case we have
= C(sI A) B + D (from
0
0
1
, C = 1 0 , and D = 0. Now
,B=
A=
25
25 10kd
1
s
1
1
(sI A)
=
25 s + 10kd
s + 10kd 1
25
s
=
s(s + 10kd ) + 25
so
s + 10kd 1
25
s
0
1 0
G(s) =
s(s + 10kd ) + 25 25
25
25s
1 0
=
s(s + 10kd ) + 25
25
=
s2 + 10kd s + 25
(ii) The poles are the roots of the denominator in (b). Clearly this is the same polynomial as
det(sI A).
2.
Control system compensators can be implemented using op-amp circuits. For each of the circuits in Figure
3,
(a)
Taking the capacitor voltages as internal states write down the state-space equations.
= 0.x(t)
1
ve (t)
CR
y(t) = 1.x(t)
C
HH
HH
R
ve
+
HH
ve
f vo
R1
R2
HH
HH
+
(i)
i
-
HH
f vo
(ii)
10 volts
ve
ve
H
H
+ HH
R2
R1
HH
H
H
+ HH
f vo
ve
f
C
x
R3
R1
(iii)
x1
HH
Q
s
C2
Ro
C1
R2 x2
?io
(iv)
Figure 3:
(ii) Remembering that no current flows into the input to the op amp, then the current, i,
flowing through R2 is given by,
i=
dve
ve
+C
,
R1
dt
and vo = R2 i
Hence
vo =
dve
R2
ve R 2 C
R1
dt
but the standard state space form will not allow a differentiator. Hence this circuit does not
have a state space form. However if any series resistance is included with the capacitor it will
have a state space form.
(iii) The voltage across R1 is equal to ve and hence the current flowing onto C is ve /R1 ,
giving
C x
vo
x
vo
(b)
= ve /R1
= (R1 + R2 )
ve
+x
R1
1
ve
CR1
(R1 + R2 )
ve
= x+
R1
C2 x 2 =
R3
R1
R2
x2
io =
Ro
and in vector form this gives:
1
R11C1
0
d x1
x1
R
1 C1
+
=
v
1
x2
R 1C
C21R3 C21R1 e
dt x2
R1 C 2
2 2
x1
io = 0 R1o
x2
Hence calculate the transfer functions, poles and zeros; and state the type of controller that each
implements.
Using the formula G(s) = C(sI A)1 B + D (in (i), (iii) and (iv)) gives:
1
(i) G(s) = CRs
with a pole at s = 0. Integral action controller.
R2
(ii) G(s) = R1 R2 Cs, with a zero at s = R11C . Proportional plus derivative action
controller.
2 )Cs+1
1
2
(iii) G(s) = R1R+R
+ CR1 1 s = (R1 +R
, with a pole at s = 0 and a zero at s = (R1 +R
.
CR1 s
1
2 )C
(iv)
#
1 "
1
s + R 1C
0
R
1 C1
1
1 1
G(s) = 0 Ro
s + R21C2
R11C2
C12 R13 + R11
1
1
1
1
1
1
1
1
=
.
s+
+
R1 C1 C2 R3
R1
s + R11C1
s + R21C2 Ro R1 C2 R1 C1
=
3.
R2 [1 + sC1 (R1 + R3 )]
R0 R3 (1 + sC1 R1 )(1 + sC2 R2 )
For the linearisation worked example given in lectures in section 3.3.1 verify the (1,2) element of the
matrix P .
It is clear from the form of the linearised equation that the (1,2) element of the matrix P
and differentiating
needs to be z . This is obtained from the second equation (giving )
e
with respect to z whilst holding other
variables at the equilibrium values
e = 0, e = 0, F1e = M g, F2e = 2M g. The equilibrium values of 1 and 2 are given by
i
1e = 0 and 2e = /4 but they are functions of z so we also need to calculate
z which are
given by differentiating the tan i equations giving:
a sin
1
1
2
=0
=
sec (1 )
2
z
z e
a + z 21 a cos
2
2
1
1
1
sec2 (2 )
=
= cos2 (2e ) =
z
z
a
2a
a + 1 a sin
2
(
sin
)
F2e
= 0 + [cos(e + 1e ) + cos 1e cos e ]
1e
e
2e
a
4
z
z e
z e
e
1
1
1
1
1
a
1
1
2
2
I + Ma
2M g = M g I + M a
[2] 0 + 1
=
z
2
4
2a
4
4
2
e
1
a
2I
1
+
=
2a M ag 2g
as required.
4. The following are matrices for state-space models in the form x = Ax + Bu, y = Cx + Du.
(0p,m denotes the p m zero matrix.) In each case determine (i) how many inputs,
states and outputs there are, (ii) the dimensions of the transfer function matrix, and
(iii) the transfer function matrix:
(a)
2
1
A=4 0
0
0
2
0
0
2
3
0
0 5,
3
3
3
B = 4 2 5,
1
2
C=
1
0
2
1
D=0
(b)
A=
1
1
B=
2
3
C=
D=
1
1
(c)
A = 2,
B=
3
3
C = 4 0 5,
1
2
D = 03,2
G(s)
=
=
4 5 6
4 5 6
1
s+1
3
s+1
2
s+2
1
s+3
0
0
0
1
s+2
+0
10
6
12
+
+
s+1 s+2 s+3
0
0
1
s+3
3
2 +0
1
(b)
G(s)
1 2
0 1
s+1
0
1 s + 2
1
2
s+2
0
3
1
s+1
(s + 1)(s + 2)
1 2
2(s + 2)
0 1
3s + 5
1
+
1
(s + 1)(s + 2)
8s + 14
3s + 5
1
+
1
(s + 1)(s + 2)
2
s + 11s + 16
s2 + 6s + 7
(s + 1)(s + 2)
1 2
0 1
2
3
1
1
1
1
(c)
3
3 6
0 1 2
0 0
1
1 2
G(s) =
+ 03,2 =
s+2
s+2
5. Consider the state-space equation,
x(t)
= Ax(t),
x(0) = x0 .
0
k
1
2
calculate the state transition matrix for k = 3, 0, 1 and 5, and verify that part (a)
holds for all eigenvectors of A. Are there any non-zero equilibrium states?
1
s+2 1
s
1
1
= s2 +2s+k
(sI A) =
k s
k s+2
Eigenvalues of A: 1 = 1
1 k, 2 =
1 +
1k
1
1
Eigenvectors of A: w1 =
, w2 =
1
2
eAt = L1 (sI A)1
s+2 1
1 1
3 1
3
s
3 3
3 1
k = 3 : eAt = L1
= L1
+ L1
(s + 3)(s 1)
(4)(s + 3)
(4)(s 1)
et 1
e3t
1
1 1 +
3 1
=
3
4
4 1
1
1
1
1
3t
At
At
At
At
=e
; e w2 = e
= et
e w1 = e
3
1
3
1
1
s+2 1
1 21
0 1
2
0
s
0 0
0 1
k = 0 : eAt = L1
= L1
+ L1
s(s + 2)
(s)
(s + 2)
1
1
2
1 12 + e2t
0 1
=
0
1
1
1
2
1
1
2
eAt w 1 = eAt
; eAt w 2 = eAt
= e2t
= e0t
0
1
1
0
s+2 1
1 0
1
1
1 s
0 1
1 1
At
1
1
1
k=1: e
= L
=L
+L
(s + 1)2
(s + 1)
(s + 1)2
1+t
t
= et
t 1 t
1
The repeated eigenvalue, 1 = 2 = 1, with just one eigenvector, w 1 =
.
1
1
1
eAt w 1 = eAt
= et
.
1
1
s+2 1
1
5 s
cos 2t + 12 sin 2t
sin 2t
At
1
t
2
= L
=e
k=5: e
25 sin 2t
cos 2t 12 sin 2t
(s + 1)2 + 22
1 = 1 + j2, 2 = 1 j2
1
cos 2t + j sin 2t
1
t j2t
t
At
=e e
= e
e
1 + j2
(1 + j2)(cos 2t + j sin 2t)
1 + j2
(c)
6.
1
, w1 =
R1 C1
1
R2 C 2
1
0
, w2 =
=
1
R2 C2
1
R1 C1
1
C 2 R1
(a)
3
2
3
1 5x + 4
3
|
}
3
1
0 5 u,
0
{z }
B
y=
0
{z
C
x.
1
3
det(I A) = det 1
1 = (2 + 1)( 3)
0 0 3
1
j 1 3
1 j
1 = +j : 0 = (1 I A)w 1 = 1 j
0 0 j3 0
|{z}
w1
1
2 = j : w 2 = j
0
3 1 3 1
3 = 3 : 0 = 1 3 1 0
1
0 0
0
|{z}
w3
T 1 AT
CT
1 1
1
1
j 0 ; T 1 = 1
=
2
0 1
0
j 0 0
= = 0 j 0 , T 1 B =
0 0 3
= 1 1 1 =C
1
j
0
j 1
j 1
0
2
1
1
1 =B
2
0
y = Cz
Note that this diagonal state space realisation is not unique since we could introduce
additional diagonal scaling of the states.
(b)
eAt
(c)
= T et T 1
(from lecture notes)
jt
1 1 1 e
1 j
0
0
1
= j j 0 0 ejt 0 1 j
2
0 0 1
0 0
0
0
e3t
jt
jt
3t
1 j 1
e
e
e
1
= jejt jejt 0 1 j 1
2
0 0
2
0
0
e3t
3t
cos t sin t cos t + e
sin t
= sin t cos t
3t
0
0
e
1
1
2
3
2
0
If x(0) = 4 0 5 and the input u(t) = 1 for t 0, find the resulting output y(t) for t 0.
1
At
Substituting the expression for e into the general expression for y(t) gives:
Z t
y(t) = CeAt x(0) +
CeA(t ) Bu( ) d
0
Z t
= cos t + e3t +
cos(t ) d
0
(d)
and
(sI A)1
3s + 1
(s 3)(s2 + 1)
= C(sI A)
1 s
s 1 3
s2 +1
1 s
1 = s21
+1
0 0 s3
0
1
s
2
s3 s +1
x(0) + C(sI A)
1
B =
s
y(t) as above.
7.
1
s2 +1
s
s2 +1
s
1
s 3 s2 + 1
3s+1
(s3)(s2 +1)
(s3)
(s3)(s2 +1)
1
s3
s
1
s2 + 1 s
Figure 4 represents a two-link manipulator in a vertical plane, to be controlled by the two motors at the
joints producing torques T1 and T2 as shown. Ignoring frictional and damping terms this particular system
satisfies the following differential equations (where the dots over symbols denote differentiation with respect
to time):
T1
T2
(0.1)
(0.2)
(a)
Calculate the torques T1e , T2e required to maintain the system in equilibrium at 1 = /6 and 2 = /3.
1 /6
1
, u = T1 T1e
x =
2 /3
T2 T2e
2
Although the linearization about this equilibrium is given in the question, lets derive it for
completeness. Equations (0.1) and (0.2) together with x 1 = x2 and x 3 = x4 give four
equations in the four unknowns x 1 , x 2 , x 3 , x 4 that we want to linearise. Using the notation of
section 3.2 in the notes we have
F (x,
x, u) =
where
F3
F4
x 1 x2
x 3 x4
F3 = 0
F4
10
1
0
0
F
0
=
L =
x (0,0,0) 0 14.25 + 4 cos(/3)
0 1.5 + 2 cos(/3)
0
1
0
0
F
120 cos(/6)
M =
=
0
x (0,0,0)
20 cos(/2)
20 cos(/2)
0
0 0
0 0
F
=
N =
u (0,0,0) 1 0
0 1
0
0
1
0
0
1
0
0
=
0 1.5 + 2 cos(/3) 0 16.25
0
1
0 2.5
0
0
0
1
0
1
0
0
=
20 cos(/2) 0
60 3 0
0
0
20 cos(/2) 0
0 0
1 0
0 2.5
0 1
0 0
0 1
0 0
0 0
which gives,
x
=
L1 M x L1 N u = Ax + Bu
where
0
2
A=
0
1
0
0
0
0
0
0
0
0
0
,
1
0
0
0
0.1
0.25
B=
0
0
0.25 1.625
What are the open-loop poles of this linearized system? Determine an initial condition such that
x(t) 0 as t .
1 0 0
2 0 0
= (2 2 )(2 )
0 = det(I A) = det
0
0 1
0 0
Hence poles are at , 0, 0. Now only one of these is stable, namely , so that if x(t) 0
as t we must have x0 the corresponding eigenvector of A (recall Q.4) i.e.
0
2
(c)
1
0
0
0
0
0
0
0
2
0
2
0
2 = 2 x(t) = et x 0 as t
o
5
1
5
5
0
5
| {z }
xo
(sI A22 )1
0
(sI A11 )1
0
1
s2
1
s
s 1
1
1
s
=
s2 2
s2 2 1
1
s2
1
s
11
The following inverse Laplace transforms can be obtained from the first by integration since
each is the previous one multiplied by /s.
s
L1 2
= cosh(t); L1 2
= sinh(t)
s 2
s 2
2
3
L1 2
= cosh(t) 1; L1 2 2
= sinh(t) t
2
s(s )
s (s 2 )
(d)
and substituting these into the expression for (sI A)1 gives:
cosh t
1 sinh t
0
sinh
t
cosh
t
0
At
e
=
2 (cosh t 1) 3 (sinh t t) 1
1 sinh t
2 (cosh t 1) 0
0
0
, = 5
t 2
2
1
If you can release the system from an initial condition and measure the states how could you measure
the (3, 2) element of the state transition matrix?
Let the initial conditions be T1 = T1e and T2 = T2e , 1 (0) = /6, 2 (0) = /3, and with the
second link at zero relative angular velocity, 2 = 0, but 1 = x2o the initial (small) angular
velocity of the first link. (experimentally this would be quite tricky to set up!). When the
system is released from this initial condition the response should be,
12 (t)
0
x2o 22 (t)
x(t) = eAt
0 = 32 (t) x2o
42 (t)
0
(e)
Hence the element 32 (t) could be measured by observing the response of the third state,
2 (t) /3, for this initial condition response.
Explain the physical reasons for the difference in response when the system is released from a small
displacement in 1 and 2 . The response due to changes in x1 (0) is unstable since if 1
becomes smaller the torque, T1e , will overcome gravity and make 1 continue to decrease,
lifting the arm. If 1 becomes larger the gravity torque will increase and the arm will
accelerate downwards. On the other hand since the second arm is horizontal its torque due
to gravity will not change for small changes in 2 .
(f)
Calculate the transfer function from u2 to x3 , (Hint: this only depends on the (3, 2) and (3, 4) elements
of (sI A)1 and the second column of B), and hence deduce the response of x3 due to a step input on
u2 .
0
h
i
1
1 0.25
=
2
2
2
2
2
2
s(s )
s (s )
s
s
0
1.625
1.625
0.25
1.625 0.25
1
1
= 2 2 2
= 2
2+ 2
s
s (s 2 )
s
2
s
(s 2 )
0.625
1
= 2 2
s
s 2
(g)
Suppose that this system is connected to a digital computer. The ADC measures x 1 and x3 and the
DAC controls u1 and u2 , all synchronised with sampling period T . Assuming that u1 (kT ) = 0 for all k,
calculate the state-space difference equation relating the number sequences u2 (kT ) output by the
computer and the sequence x(kT ).
where
1 0.25 sinh(t)
Z T
0.25 cosh(t)
=
3
0.25 (sinh(t) t) 1.625t dt
0
0.252 (cosh(t) 1) 1.625
2C
C = (cosh T 1)/2
1
2S
,
=
2
8 5C 4T S = sinh(T )/
5S 8T
T2
1
T1
where G(s) = C (sI A)1 B. By considering the corresponding state-equations deduce that
Y (s) = HCL (s)R(s) where
HCL (s) = (I + G(s))1 G(s) = C (sI A + BC)1 B
12
13
- h
6
Y
-
G(s)
and the state space equations for G(s) are given by:
x = Ax + Bu, y = Cx
u = r y = r Cx
x = Ax + Br B(Cx)
= (A BC)x + Br
y
= Cx
B.
Optional extra: Verify this identity using the matrix inversion lemma.
HCL
1
= (I + G)1 G = I + C(sI A)1 B
C(sI A)1 B
= I C(sI A + BC)1 B C(sI A)1 B by Matrix Inversion Lemma
= C I (sI A + BC)1 BC (sI A)1 B
= C(sI A + BC)1 [(sI A + BC) BC] (sI A)1 B
= C(sI A + BC)1 B
(b)
as required.
In the equations
x(t)
y(t)
=
=
Ax(t) + Bu(t)
Cx(t) + Du(t)
when D is p p and invertible, substitute u(t) = D 1 y(t) Cx(t) and hence show that the transfer function
of the inverse systems is given by,
D + C (sI A)1 B
1
= D 1 D 1 C sI A + BD 1 C
BD 1
u = D 1 y D1 Cx
u = D1 Cx + D1 y
h
i
1
U (s) = D1 D1 C sI A + BD1 C
BD1 Y (s)
1
= D + C(sI A)1 B
Y (s)
Optional extra: In this case verification is immediate from the Matrix Inversion Lemma.
J.M. Maciejowski
February 2006