Documentation

Code Generation

Generate code and deploy controllers on real-time targets

Once you have validated a model predictive controller in Simulink® or MATLAB®, you can generate code and deploy it for real-time control applications. For more information, see Generate Code and Deploy Controller to Real-Time Targets.

Functions

review Examine MPC controller for design errors and stability problems at run time
mpcmoveCodeGeneration Compute optimal control moves with code generation support
getCodeGenerationData Create data structures for mpcmoveCodeGeneration
mpcqpsolver Solve a quadratic programming problem using the KWIK algorithm
mpcqpsolverOptions Create default option set for mpcqpsolver

Blocks

MPC Controller Compute MPC control law
Adaptive MPC Controller Design and simulate adaptive and time-varying model predictive controllers
Explicit MPC Controller Design and simulate explicit model predictive controller
Multiple MPC Controllers Simulate switching between multiple MPC controllers
Was this topic helpful?