Professional Documents
Culture Documents
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)
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 𝜃
𝑚𝑔
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
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
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 ,
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 )
ẋ = f (x, u)
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 .
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.