You are on page 1of 4

Institut für Elektrotechnik und Informationstechnik

Lehrstuhl für Regelungs- und Automatisierungstechnik (RAT)


Advanced System Theory
pb

Solution to Exercise 2

Task 1
a) Considering i(t) = C u̇o (t) and uL (t) = Li̇(t) ≡ LC üo (t), KVL yields:

ui (t) = Ri(t) + uo (t) + Li̇(t) = RC u̇o (t) + uo (t) + LC üo (t) = uo (t) + 6u̇o (t) + 2üo (t) (1)

b) Choose x1 (t) = i(t) and x2 (t) = uo (t) as the state variables. u(t) = ui (t) is the input and
y(t) = uo (t) is the output. From the KVL equation, we have:

ui (t) = Ri(t) + uo (t) + Li̇(t) ⇒ u(t) = Rx1 (t) + x2 (t) + Lẋ1 (t)

∴ ẋ1 (t) = −(R/L)x1 (t) − (1/L)x2 (t) + (1/L)u(t)


The current through the capacitor gives us, i(t) = C u̇o (t) ⇒ x1 (t) = C ẋ2 (t). The output of
the system is the voltage across the capacitor. Hence, y(t) = x2 (t).
Combining the information from the above equations, we obtain the following matrix equa-
tions:

ẋ(t) = Ax(t) + Bu(t), (2)


y(t) = Cx(t) + Du(t) (3)

where,  R 1
− L1

−L L
 
A= 1 , B= , C= 0 1 , and D = 0.
C 0 0
Note: R = 6Ω, L = 2H and C = 1F.

Task 2
Note that, in the following derivation, the positive direction of the angle θ is opposite to the direction
depicted in Fig. 2b of the tutorial sheet.

a) We virtually disconnect the pole and the cart and we call the vertical and horizontal connecting
forces V and H, respectively. For the pole, balance of vertical forces yields

d2 d
V = mg + mÿp = mg + m 2
(l cos(θ)) = mg − ml (θ̇ sin(θ)) = mg − ml(θ̈ sin(θ) + θ̇2 cos(θ)),
dt dt
where we used yp (t) = l cos(θ(t)). Similarly, balance of horizontal forces gives

d2 d
H = mẍp = mẍc + m 2
(l sin(θ)) = mẍc + ml (θ̇ cos(θ)) = mẍc + ml(θ̈ cos(θ) − θ̇2 sin(θ)),
dt dt
where we used xp (t) = xc (t) + l sin(θ(t)).

1
𝑙 sin 𝜃

𝑙 cos 𝜃
𝑚𝑔

Figure 1: Inverted Pendulum

b) Balance of moments around the point mass m shows that V and H are connected via

J θ̈ = V l sin(θ) − Hl cos(θ),

where l sin(θ) and l cos(θ) are the lever arms of the forces V and H, respectively. Substituting
V and H yields
   
J θ̈ = mg − ml(θ̈ sin(θ) + θ̇2 cos(θ)) l sin(θ) − mẍc + ml(θ̈ cos(θ) − θ̇2 sin(θ)) l cos(θ)
= mgl sin(θ) − ml2 θ̈ sin2 (θ) − mlẍc cos(θ) − ml2 θ̈ cos2 (θ)
= mgl sin(θ) − ml2 θ̈(sin2 (θ) + cos2 (θ)) − mlẍc cos(θ)
= mgl sin(θ) − ml2 θ̈ − mlẍc cos(θ)

or, equivalently,
(J + ml2 )θ̈ = mgl sin(θ) − mlẍc cos(θ). (4)
This is the first ODE describing the dynamics of the system. The second ODE is obtained
from computing the balance of horizontal forces for the cart, which gives

F = M ẍc + H = (M + m)ẍc + mlθ̈ cos(θ) − mlθ̇2 sin(θ). (5)

In this context, note that the connecting forces V and H for the pole and cart are equally
strong but of opposite sign, respectively.

c) The ODEs (4) and (5) represent two coupled ODEs. The coupling makes it initially difficult
to identify expressions for θ̈ and ẍc depending on θ and θ̇. However, the ODEs (4) and (5)
can be rewritten in terms of the equation

J + ml2 ml cos(θ) θ̈
    
mgl sin(θ)
= (6)
ml cos(θ) M + m ẍc F + mlθ̇2 sin(θ)

Clearly, θ̈ and ẍc can be isolated by inverting the matrix on the left-hand side in (6). The
result is
    
θ̈ 1 M +m −ml cos(θ) mgl sin(θ)
=
ẍc (J + ml2 )(M + m) − m2 l2 cos2 (θ) −ml cos(θ) J + ml2 F + mlθ̇2 sin(θ)

2
under the condition that the determinant

(J + ml2 )(M + m) − m2 l2 cos2 (θ) ≥ (J + ml2 )M + Jm

is non-zero. Clearly, this is the case since J, M , m, and l are all positive constants.

d) Having two coupled ODEs of order two suggests to choose 2 × 2 = 4 states. We choose
       
x1 θ θ̇ x3
x2  xc  ẋc  x4 
x=
x3  =  θ̇ 
   ⇒ ẋ = 
 θ̈  = ẋ3  ,
  

x4 ẋc ẍc ẋ4

where
    
ẋ3 1 M +m −ml cos(x1 ) mgl sin(x1 )
=
ẋ4 (J + ml2 )(M + m) − m2 l2 cos2 (x1 ) −ml cos(x1 ) J + ml2 u + mlx23 sin(x1 )

with input u = F . Clearly, the resulting state space system

ẋ = f (x, u)

is non-linear. In principle, a linearization around the equilibrium x0 = 0 and u0 = 0 can be


obtained by computing Jacobian matrices. Here, however, the procedure can be accelerated by
separately linearizing all nonlinear terms. Considering small perturbations in θ = x1 (upright
pole), we have
sin(x1 ) ≈ x1 , cos(x1 ) ≈ 1, and x23 ≈ 0.
Hence,
    
ẋ3 1 M +m −ml mglx1

ẋ4 (J + ml2 )M + Jm −ml J + ml2 u
 
1 (M + m)mglx1 − mlu
=
(J + ml2 )M + Jm −m2 gl2 x1 + (J + ml2 )u

The linearized state space model then reads


   
0 0 1 0 0
 0 0 0 1  0 
ẋ =  (M +m)gml x +  u.
   
−ml
 (J+ml2 )M +Jm 0 0 0  2
 (J+ml )M +Jm 
−m2 l2 g J+ml2
(J+ml2 )M +Jm
0 0 0 (J+ml2 )M +Jm

Task 3
We call a set of m vectors in Rn linearly independent if (and only if) the only linear combination
of those vectors that equals the zero vector, i.e.,

α 1 v1 + · · · + α m v m = 0 (7)

is the one with zero coefficients (which we call the trivial linear combination). In contrast, if there
exists a non-trivial linear combination that equals the zero vector, the set of vectors is linearly
dependent. A basis in Rn is closely related to a set of linearly independent vectors. In fact, to form
a basis in Rn , we need exactly n linearly independent vectors. To check linear independence, we

3
often rewrite (7) as  
α1
. . . vm  ...  = Vα = 0
  
v1
αm
and study the rank of the matrix V ∈ Rn×m .

a) If m = n, the matrix V is square. Thus, if V is invertible, we obtain α = V−1 0 = 0, i.e., only


the trivial linear combination. So, for m = n, the vectors are linear independent if (and only
if) the matrix V is invertible which can be easily checked by computing the determinant. For
the given vectors, we find
 
1 1
det(V) = det = −3 6= 0.
1 −2

Thus, the vectors are linearly independent. They also form a basis of R2 .

b) For m > n, as in this case, we always have linear dependence. The set cannot form a basis.

c) We investigate  
1 0  
α
Vα = 0 ⇒  3 −1 1 = 0
α2
−2 2
and find α1 = 0 and α2 = 0. Hence, linear independence is established. However, we need
another vector to form a basis of R3 .

d) Clearly, the vectors are linearly dependent because one vector is the zero vector. They do not
form a basis set.

You might also like