Examine MPC controller for design errors and stability problems at run time
review(
checks for potential design
issues in the model predictive controller, mpcobj
)mpcobj
, and generates a
testing report. The testing report provides information about each test, highlights test
warnings and failures, and suggests possible solutions. For more information on the tests
performed by the review
function, see Algorithms.
You can also review your controller design in the MPC Designer app. On the Tuning tab, in the Analysis section, click Review Design.
Test your controller design using techniques such as simulations, since
review
cannot detect all possible performance factors.
The review command performs the following tests.
Test | Description |
---|---|
MPC Object Creation | Test whether the controller specifications generate a valid MPC controller. If the controller is invalid, additional tests are not performed. |
QP Hessian Matrix Validity | Test whether the MPC quadratic programming (QP) problem for the controller has a unique solution. You must choose cost function parameters (penalty weights) and horizons such that the QP Hessian matrix is positive-definite. |
Closed-Loop Internal Stability | Extract the A matrix from the state-space realization of the
unconstrained controller, and then calculate its eigenvalues. If the absolute value of
each eigenvalue is less than or equal to 1 and the plant is stable,
then your feedback system is internally stable. |
Closed-Loop Nominal Stability | Extract the A matrix from the discrete-time state-space
realization of the closed-loop system; that is, the plant and controller connected in
a feedback configuration. Then calculate the eigenvalues of A . If
the absolute value of each eigenvalue is less than or equal to 1 ,
then the nominal (unconstrained) system is stable. |
Closed-Loop Steady-State Gains | Test whether the controller forces all controlled output variables to their targets at steady state in the absence of constraints. |
Hard MV Constraints | Test whether the controller has hard constraints on both a manipulated variable and its rate of change, and if so, whether these constraints may conflict at run time. |
Other Hard Constraints | Test whether the controller has hard output constraints or hard mixed input/output constraints, and if so, whether these constraints may become impossible to satisfy at run time. |
Soft Constraints | Test whether the controller has the proper balance of hard and soft constraints by evaluating the constraint ECR parameters. |
Memory Size for MPC Data | Estimate the memory size required by the controller at run time. |
review
automates certain tests that you can perform at the command
line.