$28
In the class, we will develop step-response MPC (i.e., classical DMC algorithm) for control of a SISO system. The system was given by the following transfer function �(�) = 2.5�!"# 20� + 1 �(�) with sampling-time of h = 5. Recall that we chose n = 24 number of steps and developed DMC algorithm to control the system at the set-point of r = 1. Controller tuning parameters: m = 4, p = 10, Q = 1, R = 0.04. The following constraints are implemented: −0.5 ≤ �(�) ≤ 0.5, |Δ�(�)| < 0.05. You will repeat the simulations for the following SISO models: (i) Case with no disturbance; (ii) extension to measured disturbance case; (iii) extension to plant-model mismatch case. Problem 1: SISO MPC (6 points) In the previous assignments, you developed step-response model, simulated open-loop response and developed matrices for using with DMC algorithm for the first-order system: �(�) = 5 �� + 1 �!$.&'#, � = 1 + � 2 a = Last digit of roll number, Δ� = 0.5 In this assignment, please modify the uploaded DMC code for controlling your system Choose n long enough for the system to reach steady state. Typically, � = (4 to 5) × �. Choose n in the range 16 ≤ � ≤ 50. Controller tuning parameters: m = 4, p = 10, Q = 1, R = 0.1. The following constraints are implemented: −0.4 ≤ �(�) ≤ 0.4, |Δ�(�)| < 0.025. Problem 2: Extension to Measured Disturbance Case (8 points) Modify the uploaded SISO system code to simulate the case of measured disturbance: �(�) = 2.5�!"# 20� + 1 �(�) + 0.4�!(# 10� + 1 �(�) Modify the uploaded code to handle the effect of measured disturbance, with • Case-1: A step-change of 0.5 in the disturbance • Case-2: A series of step changes, with d = 0.5, 1.0 and –0.2 made at k = 0, 12, 20 Note that there is no model plant mismatch for this problem. Hint: Model with measured disturbances Consider a model: � = �)� + �*�, where � ∈ ℝ+! are process outputs, � ∈ ℝ+" are manipulated inputs and � ∈ ℝ+# are measured disturbances. As we have seen in previous assignments, we can obtain step response coefficient matrices � and �* from �) and �*. The model formulation, thus, becomes: �S(� + 1) = ��S(�) + � Δ�(�) + �� ��(�) whereas, the p-step prediction equation becomes: �)(� + 1) = ℳ�S(�) + �-Δ�.(�) + �*Δ�(�) Following the discussion in the course videos, the Hessian remains same, whereas gradient becomes: �/ = [�0] /Γ1aℳ�S(�) + ����(�) − ℛd You only need to focus on the two highlighted equations. Other equations remain unchanged. The uploaded code does not have the bolded term involving Δ�(�). You need to edit the code at only the appropriate locations to: (i) Obtain �* and �* matrices of size e�. �1f × �* and e�. �1f × �*; (ii) edit plant behavior and model predictions to include the effect of d(k); and (iii) edit the gradient calculation required for obtaining the input moves. These are the main changes required in the code. Other than these, the idea remains the same. Problem 3: Extension to Model-Plant Mismatch Case (6 points) Now consider the case of Model-Plant Mismatch. Let us assume that the true Plant is: �(�) = 2.75�!2.3# 18.5� + 1 �(�) Modify the uploaded code to handle the case of MPM. Note that the code needs to be changed to include load disturbances so as to ensure steady-state bias correction. Hint: Handling unmeasured disturbances or Model-Plant Mismatch When there are unmeasured disturbances or model-plant mismatch, the model predictions �S(�) differ from the actual response of the system being controlled, �(�). Hence, we need to introduce bias correction, based on the error: �(�) = �(�) − �j(�). Recall that �j(�) is nothing but the first �1 elements of �S(�). In this assignment, �1 = 1. As in the previous problem, the Hessian remains same, whereas gradient becomes: �/ = [�0]/Γ1aℳ�S(�) + ℐ��(�) − ℛd where, ℐ) = m �+!×+! ⋮ �+!×+! p p times. Note that you will need to run two separate step-response models: One for the actual plant (in cyan highlight above) and another for the DMC-model.