Create a nonlinear MPC controller with four states, one output variable, one manipulated variable, and one measured disturbance.
Specify the controller sample time and horizons.
Specify the state function of the prediction model.
Specify the prediction model output function and the output variable scale factor.
Specify the manipulated variable constraints and scale factor.
Specify the measured disturbance scale factor.
Compute the state and input operating conditions for three linear MPC controllers using the fsolve
function.
Create linear MPC controllers for each of these nominal conditions.
You can also create multiple controllers using arrays of nominal conditions. The number of rows in the arrays specifies the number controllers to create. The linear controllers are returned as cell array of mpc
objects.
View the properties of the mpcobjLow
controller.
MPC object (created on 18-Aug-2020 02:55:35):
---------------------------------------------
Sampling time: 1 (seconds)
Prediction Horizon: 10
Control Horizon: 3
Plant Model:
--------------
1 manipulated variable(s) -->| 4 states |
| |--> 1 measured output(s)
1 measured disturbance(s) -->| 2 inputs |
| |--> 0 unmeasured output(s)
0 unmeasured disturbance(s) -->| 1 outputs |
--------------
Indices:
(input vector) Manipulated variables: [1 ]
Measured disturbances: [2 ]
(output vector) Measured outputs: [1 ]
Disturbance and Noise Models:
Output disturbance model: default (type "getoutdist(mpcobjLow)" for details)
Measurement noise model: default (unity gain after scaling)
Weights:
ManipulatedVariables: 0
ManipulatedVariablesRate: 0.1000
OutputVariables: 1
ECR: 100000
State Estimation: Default Kalman Filter (type "getEstimator(mpcobjLow)" for details)
Constraints:
0.0704 <= u1 <= 0.7042, u1/rate is unconstrained, y1 is unconstrained