code generation -凯发k8网页登录
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 .
functions
blocks
topics
code generation basics
model predictive control toolbox™ software provides code generation functionality for controllers designed in simulink and matlab.- qp solvers
the model predictive controller qp solvers convert an mpc optimization problem to a general form quadratic programming problem.
simulink code generation
- simulation and code generation using simulink coder
simulate your mpc controller in simulink and generate real-time code that uses either double-precision or single-precision signals.
simulate your mpc controller in simulink and generate structured text for programmable logic controllers.
to ensure that an mpc controller works properly inside a function-call or triggered subsystem, configure the mpc controller block to use inherited sample time and invoke the subsystem periodically with the same sample time defined in the mpc controller object.
matlab code generation
generate c code to compute manipulated variable moves for real-time applications.
you can implement a custom mpc control algorithm that supports c code generation in matlab using the built-in qp solver,mpcqpsolver
.
cuda code generation
simulate your mpc controller in matlab using the gpu.
simulate your mpc controller in simulink using the gpu.
using custom solvers
generate code for a model predictive controller that uses a custom quadratic programming solver.
use embotech forcespro solvers with the model predictive control toolbox to solve mpc problems and deploy controllers to real-time targets.
opc simulation
implement an online model predictive controller application using the opc client supplied with the industrial communication toolbox™.