Examine MPC controller for design errors and stability problems at run-time
review(mpcobj) checks for potential design issues in the Model Predictive Controller mpcobj and generates a report. review performs the following diagnostic tests:
Is the optimization problem to be solved online well defined?
Is the controller internally stable?
Is the closed loop system stable when no constraints are active and there is no model mismatch?
Is the controller able to eliminate steady-state tracking error when no constraints are active?
Is there a likelihood that constraint definitions will result in an ill-conditioned or infeasible optimization problem?
Non-empty Model Predictive Controller (mpc) object
Create a Model Predictive Controller with hard upper and lower bounds on the manipulated variable and its rate-of-change.
Create a discrete Model Predictive Controller.
% Create a Model Predictive Controller Plant = tf(1, [10 1]); ts = 2; MPCobj = mpc(Plant,ts);
Specify hard bounds on the MV and its rate of change.
MV = MPCobj.MV; MV.Min = -2; MV.Max = 2; MV.RateMin = -4; MV.RateMax = 4; MPCobj.MV = MV;
Review the design.
review flags the potential constraint conflict that could result if you applied this controller to a real process.
Examine the warning by clicking Hard MV Constraints.
review automates certain tests that you could perform yourself.
To test for steady-state tracking errors, use cloffset.
Use review iteratively to check your initial MPC design or whenever you make substantial changes to mpcobj. Make the recommended changes to your controller to eliminate potential problems.
If you design your controller using MPC Design Tool, export the controller to the MATLAB® Workspace, and analyze it using review.
review does not modify mpcobj.
review cannot detect all possible performance factors. So, additionally test your design using techniques such as simulations.