Professional Documents
Culture Documents
Note: The following Matlab functions are useful for dealing with systems in state-space
representation:
ss, tf2ss, ss2tf, zp2ss, ctrb, ctrbf, obsv, obsvf, canon, residue, ssdata, rank, step,
impulse, initial, place, acker
Type help function name in Matlab to see more details on the description of the func-
tions. If a function does not exist, then you have to install the Control System Toolbox.
ẋ = Ax − BKx = (A − BK) x
1
Exercise Set 8 - Control Systems (5ESD0) Oct 2021
λ2 + λ(7K3 + 4) + (27K3 − 7) = 0.
(c) By taking into account the closed-loop specifications, the roots of the closed-loop
system will be s2 + 2ζωn s + ωn2 = 0, hence s2 + 2s + 2 = 0.
By equating the coefficients of the closed-loop roots when employing a state-feedback
control law, we have
4 + 2K2 + K1 = 2
6K1 + 7K2 − 7 = 2,
This is not possible for the output-feedback case, since there does not exist K3 ∈ R
that satisfies both the equations 7K3 + 4 = 2 and 27K3 − 7 = 2.
2. State-Space Reference Tracking:
The normalized equations of motion for an inverted pendulum at angle θ on a cart are
θ̈ = θ + u, ẍ = −βθ − u,
where x is the cart position and the control input is a force acting on the cart. The
measured state variable is x.
(a) With the state defined as x = [θ θ̇ x ẋ]⊤ , find the feedback gain K for the state
feedback control law (u = −Kx), that places the closed-loop poles at
s = −1, −1, −1 ± j.
(b) Assume that β = 0.5. Plot the responses of the closed- and open-loop system with
initial condition [θ θ̇ x ẋ]⊤ = [10◦ 0 0 0]⊤ , by using Matlab.
(c) Compute control law of the form u(x, r) = −Kx + N̄ r such that the plant output y
tracks a constant command input r, which denotes the desired cart position. Assume
that β = 0.5.
Solution:
ẍ −β 0 0 0 ẋ −1
2
Exercise Set 8 - Control Systems (5ESD0) Oct 2021
K = [12 16 4 12].
20
15
10
Amplitude
−5
0 1 2 3 4 5 6 7 8 9 10
Time (seconds)
3
Exercise Set 8 - Control Systems (5ESD0) Oct 2021
Different solution:
If we have u = −Kx + N̄ r then we can write our state space equations as
(
ẋ = (A − BK)x + B N̄ r
y = (C − DK)x + DN̄ r
We want to have zero steady state error. Steady state means that ẋ = 0 and hence
ẋ = (A − BK)x + B N̄ r
0 = (A − BK)x + B N̄ r
(A − BK)x = −B N̄ r
x = −(A − BK)−1 B N̄ r
y = (C − DK)x + DN̄ r
= −(C − DK)(A − BK)−1 B N̄ r + DN̄ r
= D − (C − DK)(A − BK)−1 B N̄ r
y = D − (C − DK)(A − BK)−1 B N̄ r = r
1 = D − (C − DK)(A − BK)−1 B N̄
−1
N̄ = D − (C − DK)(A − BK)−1 B
ẍ − 2ω ẏ − 3ω 2 x = 0
ÿ + 2ω ẋ = u,
where x is the radial perturbation, y is the longitudinal position perturbation, and u is the
engine thrust in the y-direction.
2π
If the orbit is synchronous with the Earth’s rotation, then ω = 3600·24 rad/s. Define
x = [x ẋ y ẏ]⊤ as the state vector and output y as the longitudinal position perturba-
tion. Design a full-order observer with poles placed at s = −2ω, −3ω and −3ω ± 3ωj.
Solution:
The state-space equations are
ẋ1 0 1 0 0 x1 0
ẋ2 3ω 2 0 0 2ω x2 0
ẋ3 =
+ u
0 0 0 1 x3 0
ẋ4 0 −2ω 0 0 x4 1
z = 0 0 1 0 x
4
Exercise Set 8 - Control Systems (5ESD0) Oct 2021
First, we check the observability to verify that we can arbitrarily place the estimator poles.
The observability matrix is
0 0 1 0
0 0 0 1
O= ,
0 −2ω 0 0
−6ω 3 0 0 −4ω 2
hence the system is observable since O is full rank. The desired estimator characteristic
equation is
αdes (s) = s4 + 11ωs3 + 54ω 2 s2 + 126ω 3 s + 108ω 4 ,
while the estimator characteristic equation is
l1 = −44.5ω
l2 = −57.5ω 2
l3 = 11ω
l4 = 53ω 2 .
5
Exercise Set 8 - Control Systems (5ESD0) Oct 2021
(d) Determine the transfer function of the resulting controller, i.e., the transfer function
from y(t) to u(t), when
x̂˙ = (A − BK − LC)x̂ + Ly
u = −K x̂.
Solution:
(a) We can construct the state space matrices directly from the transfer function in ob-
servability cannonical form:
0 1 0
A= ,B = ,C = 1 0 .
4 0 4
Note that there is duality between the controlability and observability canonical form
meaning
Ao = A⊤ c Bo = Cc⊤ Co = Bc⊤ Do = Dc⊤
(b) By setting u = − k1 k2 x, we can write the characteristic equation as
sx̂ = (A − BK − LC) x̂ + Ly
(sI − A + BK + LC) x̂ = Ly
−
x̂ = (sI − A + BK + LC) 1Ly
and thus
u = −K x̂
−
= −K (sI − A + BK + LC) 1Ly
6
Exercise Set 8 - Control Systems (5ESD0) Oct 2021
U (s)
D(s) = = −K(sI − A + BK + LC)−1 L
Y (s)
s + 20 −1 −1 20
=− 3 1
212 s+4 204
−264s − 692
= 2 .
s + 24s + 292