SYSC 5807X: Assignment IIICreated by Chao ShenDue: April 12, 20231. A dynamic system can be represented by the following state-space modelx(k + 1) =[−2 10 1]x(k)...

1 answer below »
aa


SYSC 5807X: Assignment III Created by Chao Shen Due: April 12, 2023 1. A dynamic system can be represented by the following state-space model x(k + 1) = [ −2 1 0 1 ] x(k) + [ 1 1 ] u(k) y(k) = [1 1]x(k) Consider an MPC controller minimizing the predicted performance index J(k) = ∞∑ i=0 (y2(k + i|k) + u2(k + i|k)) at each time-step k with input constraints −1 ≤ u(k + i|k) ≤ 2, for i ≥ 0 (a) Consider the dual-mode control strategy in MPC. Show that, if the mode 2 controller is u(k) = [2 − 1]x(k) then the performance index is equal to J(k) = N−1∑ i=0 (y2(k + i|k) + u2(k + i|k)) + xT(k + N |k) [ 13 −1 −1 2 ] x(k + N |k) where N ≥ 1 is the length of mode 1 prediction horizon. (b) Show that the satisfaction of constraints −1 ≤ u(k + i|k) ≤ 2, for i = 0, 1, ..., N + 1 ensures that the predictions satisfy 1 ≤ u(k + i|k) ≤ 2 for all i ≥ 0. (c) Derive a bound on J∗(k+1)−J∗(k), where J∗(k) is the optimal value of J(k). Then show that, along the closed-loop trajectory we have ∑∞ i=0(y 2(k)+u2(k)) ≤ J∗(0). Comment on the closed-loop stability. 2. Consider the following discrete-time system x(k + 1) = [ 0.3 −0.9 −0.4 −2.1 ] x(k) + [ 0.5 1 ] u(k) subject to the constraints |x1 + x2| ≤ 1, |x1 − x2| ≤ 1 1 where x = [x1, x2] T is the state variable. (a) Explain the function of terminal constraints in a model predictive control for systems with input and/or state constraints. Define two principal properties that must be satisfied by a terminal constraint set. (b) If the terminal controller (i.e., the mode 2 control law) is u(k) = Kx(k) with K = [0.4 1.8], show that the following set S = {x ∈ R2 : |x1 + x2| ≤ 1, |x1 − x2| ≤ 1} is a valid terminal set that satisfies the two properties defined in part (a). (c) Describe a procedure for determining the largest terminal constraint set for a general feedback gain K. Find the largest terminal set Xf for K = [0.4 1.8]. (d) What are the main considerations for choosing the prediction horizon N? (e) Follow the dual-mode control strategy to design an MPC controller with the following performance index J(k) = ∞∑ i=0 (‖x(k + i|k)‖2Q + u2(k + i|k)) where Q = I, the identity matrix with appropriate dimension. Find the largest terminal set Xf for the LQR gain K. Implement your MPC system with ter- minal constraint Xf in MATLAB and plot the state and control trajectories for different initial conditions x(0) and prediction horizons N to back up your claim in part (d). 3. A production planning problem involves optimizing the quantity u of stock manufactured in each week. The quantity x of stock that remains unsold at the start of week k + 1 is given by x(k + 1) = x(k) + u(k)− w(k) where the quantity w(k) that is sold in each week is unknown in advance but there is an estimate ŵ, known and constant. Limits on storage and manufac- turing capacities imply that x and u can only take values in the intervals 0 ≤ x(k) ≤ x̄, 0 ≤ u(k) ≤ ū The desired level of stock in storage is x∗, and the planned values u(k|k), u(k + 1|k), ... are to be optimized at week k given the measurement of value of x(k) by minimizing a cost J(k) = ∞∑ i=0 e2(k + i|k), with e(k + i|k) = x(k + i|k)− x∗. (a) What are the advantages of using a receding horizon control strategy in this application instead of an open-loop control sequence computed at k = 0? 2 (b) Assume that w(k) = ŵ for all k = 0, 1, .... Show that the unconstrained optimal control is u(k) = ŵ − e(k). Also show that, if we take the dual-mode control strategy, then the constraints are satisfied over an infinite horizon if 0 ≤ x(k + i|k) ≤ x̄, 0 ≤ u(k + i|k) ≤ ū for 0 ≤ i ≤ N − 1 and max{0, ŵ + x∗ − ū} ≤ x(k + N |k) ≤ {x̄, ŵ + x∗} Explain what assumptions on ŵ, x∗, ū and x̄ are needed. (c) Assume now that the future value of w is unknown and may take any value in an interval: ŵ − d ≤ w(k) ≤ ŵ + d. Suggest how to express the planned sequence u(k + i|k) in terms of the free variables in the optimization problem. Then formulate the production planning problem as a robust model predictive control problem. (d) Assume x(0) = 0, x̄ = 100, x∗ = 80, ū = 30, ŵ = 20, and w(k) is discrete uniform distribution on [16, 24] (i.e., d = 4). Solve the robust MPC problem in MATLAB (use the built-in function randi to simulate uniform distribution of w(k)). Plot the state trajectories x(k) and control trajectories u(k) for predic- tion horizons N = 2, 4, 8. Note: if the problem is not feasible for a large N , use the constraint relaxation strategy (which we discussed in class). 4. (Bonus Question) For the MPC problem in Question 2, consider additional constraints on control u such that −2 ≤ u(k) ≤ 2 solve it as an explicit MPC problem (i.e, formulate it as an mp-QP and solve it with the MPT toolbox). 3 ���� ����� ����� ���������� �� ���� ������ � � ����� ��������� ���� ��� �� ���� �� � � �� �� �� ��������� � � ��� ���������� ���� � ��� � � � � � � � � � � � � � � � � � � � � � � ���� ��� � ���� � � � � � � � � � � � � � � � � � � � � � � � � � � �� ����� �� ��� �� �������� � � � � � � � � � � � � � � � � � � � � �� ��������� ���� ��������� �� ���� � � � � � � � � � � � � � � � � � � ��� ��������� �� ���� � � � � � � � � � � � � � � � � � � � � � � � � ��� ��� � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � ������ ������������ ���������� � � � � � � � � � � � � � � � � � �� ������ � ����� �� ��� � � � � � � � � � � � � � � � � � � � � � � � ��� ��������� ��� � � � � � � � � � � � � � � � � � � � � � � � � ��� �������� ��� � � � � � � � � � � � � � � � � � � � � � � � � � ���� ������ ��� � � � � � � � � � � � � � � � � � � � � � � � � � ���� ���������� ��� � � � � � � � � � � � � � � � � � � � � � � � ��������� �� ����������� � � �� ����� �� ����������� �������� � � � � � � � � � � � � � � � � � � ������������ �� �� ����� �� ����������� �������� � � � � � � � �� ���� �� ���������� � � ���������� ���� �� �� ����� � � � � � � ��� ���� �� ����������� � � � � � � � � � � � � � � � � � � � � � � ��� �������� �� ����� �� � � � � � � � � � � � � � � � � � � � � � � ���� �������� �� ����� �� � � � � � � � � � � � � � � � � � � � � � ���� ���������� ���� �� ����� �� ����� � � � � � � � � � � � �� ���� ������� �� ����� � � � � � � � � � � � � � � � � � � � � � � � � ��� ���� ������� ��������� �� ����� � � � � � � � � � � � � � � ��� ���� ������� ������ � �� ����� � � � � � � � � � � � � � � � � �� ������ � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �� ��� ���� � � �� ��� �� ���� � � � � � � � � � � � � � � � � � ���������� �� �� ��� �� ���� � � � � � � � � � � � � � � � � � �� ������� � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �� ��� ����� ���� �� � �� ��� ��������� � ������� � � � � � � �� ��� ��� ���� �� ���� � � � � � � � � � � � � � � � � � � � � � � �� �� ��� � ��� �� ����� �� ��� ��������� � � � � � � � � � � � � � � �� � �� ���� �� � ��� ������� � �� ��������� � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �� �� �� ��������� � ��� ������� � � � � � � � � � � � � � � � � � � � �� � ������ ����� � � � � � � � � � � � � � � � � � � � � � � � � � � �� � ��������� � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �� �� ���� �� ��������� � � � � � � � � � � � � � � � � � � � � � � � ��� ������������� ������� � � � � � � � � � � � � � � � � � � � � � � � � � ��� ������� ��� �� ���� � � � � � � � � � � � � � � � � � � � � � � � � � � �� ������������� �� ���� � � � � � � � � � � � � � � � � � � � � � � � � �� � ������������ � � � � � � � � � � � � � � � � � � � � � � � � � � � �� � �� ������ ���� �� ���� � � � � � � � � � � � � � � � � � � �� �� �� �� ������������ � � � � � � � � � � � � � � � � � � � � � � � � �� �� �� ������������ �� ����� ������� � � � � � � � � � � � � � � � � ��� ������������� � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �� ��� � ��� ��������� ��������� � ��� � � � � � � � � � � � � � � � � � ���� �� �������� ������� �� ���� � � � � � � � � � � � � � � � � � ���� �� ���� ��������� � � � � � � � � � � � � � � � � � � � � � ����� ������ �� ��� ����� �� ���������� � � � � � � � � � � � � � � � ����� ������� ������� � � � � � � � � � � � � � � � � � � � � � � � � �� ���� � ��� ��������� ��������� � � � � � � � � � � � � � � � � �� � ����� ���������� �� ���� �� �� ��� ������ ������� �� ���� �������� � � � � � � � � � � � � � � �� ��� ��������� � � � � � � � � � � � � � � � � � � � � � � � � � � � �� ��� ����������� � � � � � � � � � � � � � � � � � � � � � � � � � �� ���� ������ � ����� ������ ����� � � � � � � � � � � � � � �� ���� ��������� ��������� � � � � � � � � � � � � � � � � � � � � �� �� ��������� ����� � � � � � � � � � � � � � � � � � � � � � � � � � � � �� �� � � ��� ��� � ����� � � � � � � � � � � � � � � � � � � � � � �� �� � �� �� ��� ��� � ����� � � � � � � � � � � � � � � �
Answered 11 days AfterMar 29, 2023

Answer To: SYSC 5807X: Assignment IIICreated by Chao ShenDue: April 12, 20231. A dynamic system can be...

Aditi answered on Apr 05 2023
39 Votes
ANSWER
1.
a.
To derive the performance index with the given dual-mode control strategy, we need to find the optimal input sequence that minimizes the predicted performance index subject to the constraints. Let the optimal input sequence be denoted by u*(k+i|k), for i ≥ 0.
In mode 1, the input constraint is −1 ≤ u(k + i|k) ≤ 2, for i ≥ 0, and the system dynamics are given by:
x(k + 1) = −2 1 0 1 x(k) + 1 1 u*(k)
y(k) = [1 1]x(k)
In mode 2, the input is given by u(k) = [2 − 1]x(k), and the system dynamics are the same as in mode
1.
To derive the performance index, we first write the prediction of the output and input sequences over the horizon N:
y(k+i|k) = [1 1]x(k+i|k)
u(k+i|k) = u*(k+i|k), for i = 0, 1, ..., N-1
u(k+N|k) = [2 -1]x(k+N|k)
Using these predictions, we can write the performance index as:
J(k) = X∞ i=0 (y 2 (k + i|k) + u 2 (k + i|k))
= XN−1 i=0 (y 2 (k + i|k) + u 2 (k + i|k)) + y 2 (k + N|k) + u 2 (k + N|k) + X∞ i=N+1 (y 2 (k + i|k) + u 2 (k + i|k))
= XN−1 i=0 (y 2 (k + i|k) + u 2 (k + i|k)) + [1 1]x(k + N|k) 13 −1 −1 2 x(k + N|k)
The first line follows from the definition of the performance index and the prediction horizon, and the second line follows by separating the last term and considering the prediction beyond the horizon.
Thus, we have derived the required performance index with the given dual-mode control strategy.
b.
(b) We will prove this by induction. For the base case, we have that the input constraint for i=0 is −1 ≤ u(k|k) ≤ 2, which satisfies 1 ≤ u(k|k) ≤ 2 since 1 is greater than -1. Now, suppose that −1 ≤ u(k + i|k) ≤ 2 for some i ≥ 0. Then, using the input constraint at i+1, we have:
-1 ≤ u(k + i+1|k) ≤ 2
= -1 ≤ -2x(k + i|k) + x(k + i|k+1) + u(k + i|k+1) ≤ 2 (from part (a))
= 2x(k + i|k) - 1 ≤ x(k + i|k+1) + u(k + i|k+1) ≤ 2x(k + i|k) + 1
Since x(k + i|k+1) + u(k + i|k+1) = [1 1][−2 1;0 1][x(k + i|k);u(k + i|k)] + [1 1][1;1]u(k + i|k), we have:
= 2x(k + i|k) - 1 ≤ [1 1][−2 1;0 1][x(k + i|k);u(k + i|k)] + [1 1][1;1]u(k + i|k) ≤ 2x(k + i|k) + 1
= 2y(k + i|k) - 1 ≤ [−1 1][x(k + i|k);u(k + i|k)] + 3u(k + i|k) ≤ 2y(k + i|k) + 1
= 1 ≤ u(k + i+1|k) ≤ 2
Therefore, by induction, we have that −1 ≤ u(k + i|k) ≤ 2 implies 1 ≤ u(k + i|k) ≤ 2 for all i ≥ 0.
c.
To derive a bound on J∗(k+1)−J∗(k), we start with the optimality condition for the value function J∗(k):
J∗(k) = min_u {L(x(k), u) + J∗(k+1)}
where L(x(k), u) is the stage cost and J∗(k+1) is the optimal value function for the next time step. Subtracting J∗(k) from both sides, we get:
J∗(k+1) - J∗(k) = min_u {L(x(k), u) + J∗(k+1)} - J∗(k)
Expanding the expression on the right-hand side, we have:
J∗(k+1) - J∗(k) = min_u {L(x(k), u) + J∗(k+1)} - J∗(k+1) + J∗(k+1) - J∗(k)
Using the fact that J∗(k+1) is the optimal value function for the next time step, we have:
J∗(k+1) - J∗(k) ≤ L(x(k), u)
This implies that J∗(k+1) - J∗(k) is bounded by the maximum stage cost L(x(k), u) over all possible control inputs u. Therefore, we can write:
J∗(k+1) - J∗(k) ≤ L_max
where L_max is the maximum stage cost.
Now, let's consider the closed-loop trajectory of the system. From the definition of the value function, we have:
J∗(k) = min_u {L(x(k), u) + J∗(k+1)}
Substituting J∗(k) into this expression, we have:
J∗(k) = min_u {L(x(k), u) + min_{u'} {L(x(k+1), u') + J∗(k+2)}}
Expanding J∗(k+1) using the same argument, we get:
J∗(k) = min_u {L(x(k), u) + min_{u'} {L(x(k+1), u') + ... + min_{u^{(n)}} {L(x(k+n), u^{(n)}) + J∗(k+n+1)}}}
Taking the limit as n goes to infinity, we have:
J∗(k) = min_u {L(x(k), u) + min_{u'} {L(x(k+1), u') + ...}}
This means that J∗(k) is the minimum achievable cost-to-go for the infinite horizon problem. Therefore, we have:
P∞ i=0(y 2 (k)+u 2 (k)) ≤ J∗(0)
This inequality states that the sum of squared outputs and inputs along the closed-loop trajectory is bounded by the initial optimal cost-to-go J∗(0). This implies that the closed-loop system is stable, since the cost function is decreasing over time and is upper-bounded.
2.
(a)
In model predictive control (MPC), the control problem involves solving over a finite prediction horizon, with only the first input applied to the system while the remaining inputs are recomputed at the next time step. This process is iterated at every sampling time. To ensure stability guarantees for the closed-loop system in systems with input and/or state constraints, the use of terminal constraints becomes necessary. The terminal constraint set comprises all possible states that can be reached in the future while satisfying the system constraints. The terminal constraint set must satisfy two critical properties: (i) it must be positively invariant, implying that any feasible control sequence that starts within the set will remain within the set for all future times, and (ii) it must contain the origin to ensure long-term stability of the closed-loop system.
(b) To show that S = {x ∈ R 2 : |x1 + x2| ≤ 1, |x1 − x2| ≤ 1} is a valid terminal set, we need to check if it satisfies the two properties defined in part (a). First, we check if the set is positively invariant. Suppose x(k) ∈ S, then we have |x1(k) + x2(k)| ≤ 1 and |x1(k) − x2(k)| ≤ 1. Using the system dynamics x(k + 1) = Ax(k) + Bu(k), we can write: |x1(k+1) + x2(k+1)| = |0.3x1(k) - 0.9x2(k) + 0.5u(k) + 0.3x2(k) - 0.9x1(k) + u(k)| = |(0.3-0.9)x1(k) + (0.3-0.9)x2(k) + 1.5u(k)| ≤ |0.6x1(k) + 0.6x2(k)| + 1.5|u(k)| ≤ 1.2...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here