Problem 1 (30%) Finite-Horizon LQR
Newtons Second Law of Motion
a)
We set , , is the position, and is the velocity. We therefore get
We can write this on continuous time state space form
b)
We use a sampling interval of , and we can rewrite the system as a discrete system. We therefore get
Since , we can write as
We then find
Q.E.D
c)
The cost function for optimal control is given by
Where
And .
The Riccati equation for this problem is then given by
Where . We then find the feedback gain matrix, , which is used in
The system can be illustrated as
d)
We want to solve the stationary Riccati equation as . The following Matlab script (note the function dlqr
) finds the optimal feedback law .
% System matrices
A = [1 0.5;
0 1 ];
b = [0.125; 0.5];
% LQR cost matrices
Q = diag([2 2]);
R = 2;
[~,P] = dlqr(A,b,Q/2,R/2)
Which gives the following output
P =
4.0350 2.0616
2.0616 4.1438
We then need to find using , and find the closed-loop eigenvalues to determine the stability of the system
% Feedback gain matrix
I = eye(2);
K = (1/(R/2))*b'*P*((I+b*(1/(R/2))*b'*P)\A);
% Closed-loop eigenvalues
eigenvalues_closed_loop = eig(A-b*K);
abs(eigenvalues_closed_loop)
We then get the following output
ans =
0.6514
0.6514
Since the magnitude of the eigenvalues are less than , the discrete system is asymptotically stable.
e)
An infinite horizon LQ controller always yields an asymptotically stable closed-loop given that
- witholds the Stabilizability criterion
- () witholds the Detectability criterion where
Problem 2 (20%) Infinite-Horizon Linear-Quadratic Control
We have the following discrete-time system
And the cost function
a)
The Riccati equation is given by
Then when it is stationary, , giving
The scalar version is
Since , , and , we get
Rewriting this we get
Which yields the solutions , but since we get that .
b)
Similarly, we need to solve the scalar version of this equation
With . This yields
We therefore get that the optimal feedback is given by
c)
Same answer as in e)
Transclude of Exercise-6---MPC-and-LQR#e
Problem 3 (50%) MPC and Input Blocking
The plant model is given by
We have that , and wish to solve a finite horizon () optimal control problem with the following cost function
Where (unless otherwise noted), and we have the following input constraint
a)
From Exercise 5 - Open-Loop Optimal Control and MPC
Transclude of Exercise-5---Open-Loop-Optimal-Control-and-MPC#f
b)
Uses 5 iterations
c)
No, still 5 iterations
d)
Did not to the rest