Exercise 8: LQG

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

Exercises for Course on State-Space Control Systems (SSC)

Albert-Ludwigs-Universität Freiburg – Summer Term 2019


Exercise 8: LQG
Prof. Dr. Moritz Diehl, Dr. Dang Doan, Benjamin Stickan, Katrin Baumgärtner

Theoretical Exercises
1. Consider a dynamic system of the form

ẋ = Ax + Bu + w, E(w(s)w> (t)) = Qw δ(t − s)


y = Cx + v, E(v(s)v > (t)) = Rv δ(t − s),

(a) If the system is LQG controlled, the closed loop system can be described by
     
ẋ x w
˙x̂ = Ã x̂ + B̃ v .

Derive matrices à and B̃.


(b) How do the poles of the closed loop system change if we describe it by
     
ẋ x w
= Ãe + B̃e
ė e v

with e := x − x̂.

2. Write down the recursive Kalman filter equations for continuous time and explain them.

MATLAB/Simulink: LC resonant circuit


The electrical circuit sketched below shows a resonant LC circuit.

iL (t) L

v(t) C vC (t)

The system can be described in state-space representation by

ẋ = Ax + Bu,
y = Cx,

with
−1
  1  
0 L L
1 0
A= 1 ,B = and C = . (1)
C
0 0 0 1
 |
The state vector is defined as x := iL vC and the input as u := v.

The initial state of the simulation used in this exercise is x0 = [0, 5]. Our aim is to design an LQG controller
that stabilizes the system.

1. Open the Simulink template ex08_sim.slx and implement a continuous Luenberger observer with
poles [−1, −1]. Use the ex08_init.m file to define the observer gain L. Compare x and x̂luen .

1
2. Add process disturbance w and measurement noise v, such that the system becomes stochastic:

ẋ = Ax + Bu + w, E(w(s)w> (t)) = Qw δ(t − s)


y = Cx + v, E(v(s)v > (t)) = Rv δ(t − s),

with
       
rw1 0 0.001 0 rv1 0 1 0
Qw = = , Rv = = .
0 rw2 0 0.001 0 rv2 0 1

Hint: Use the Band-Limited White Noise block with noise powers rw1 , rw2 , rv1 , rv2 and a
sampling time t = 10 µs. Also use different integer seeds for all random signals.

3. Implement the continuous recursive Kalman filter for the stochastic system. Use
   
0 1 1
x̂0 = and P0 =
5 1 1

as the initial states.

4. Observe the trajectory of the error covariance matrix of the Kalman filter. How can we simplify the
filter structure?

5. Implement an LQR controller which feeds back

(a) the noisy measured states y = x + v


(b) the estimated state x̂ from the Kalman filter

Use weighting matrices

 
0.1 0
Q= and R = 0.1
0 1

6. Now we will remove the voltage measurement of our system. Copy the plant and the Kalman filter in
a new subsystem and replace the output matrix C by an appropriate matrix C2 . You will also have to
adapt the measurement noise in your plant as well as in the Kalman filter.

7. Change the initial state of the Kalman filter to


 
0
x̂0 =
0

and explain the behavior of the LQG controlled closed loop system.

You might also like