As in traditional linear MPC, nonlinear MPC calculates control actions at each control interval using a combination of model-based prediction and constrained optimization. The key differences are:
The prediction model can be nonlinear and include time-varying parameters.
The equality and inequality constraints can be nonlinear.
The scalar cost function to be minimized can be a nonquadratic (linear or nonlinear) function of the decision variables.
Using nonlinear MPC, you can:
Simulate closed-loop control of nonlinear plants under nonlinear costs and constraints.
Plan optimal trajectories by solving an open-loop constrained nonlinear optimization problem.
To implement nonlinear MPC, create an nlmpc
object, and
specify:
State and output functions that define your prediction model. For more information, see Specify Prediction Model for Nonlinear MPC.
A custom cost function that can replace or augment the standard MPC cost function. For more information, see Specify Cost Function for Nonlinear MPC.
Standard bounds on inputs, outputs, and states.
Additional custom equality and inequality constraints, which can include linear and nonlinear combinations of inputs, outputs, and states. For more information, see Specify Constraints for Nonlinear MPC.
By default, nonlinear MPC controllers solve a nonlinear programming problem using the
fmincon
function with the SQP algorithm, which requires Optimization Toolbox™ software. If you do not have Optimization Toolbox software, you can specify your own custom nonlinear solver. For more information
on configuring the fmincon
solver and specifying a custom solver, see
Configure Optimization Solver for Nonlinear MPC.
You can simulate nonlinear MPC controllers:
In Simulink® using the Nonlinear MPC Controller block
At the command line using nlmpcmove
Note
The MPC Designer app does not support the design of nonlinear MPC controllers.