mpt_demo_deployment_explicitMPC
Purpose
Application of explicit MPC controller with the help of Simulink interface
Syntax
mpt_demo_deployment_explicitMPC
Description
Demonstration of real-time control using explicit MPC controller.
This demo shows how to design an explicit controller for usage in
real-time control in Real-Time Workshop.
The code generation and compilation for real-time has been tested
under Real-Time Windows target on Windows 32-bit and 64-bit platforms.
Deployment steps:
- Generate the explicit controller that has the desired properties.
- Export the explicit controller to C-code using mpt_exportToC function.
- Create a Simulink scheme with the S-Function block that represents generated controller.
- In the Simulink scheme, choose code generation options and pick rtwin.tlc as the
system target file (e.g. for Real-Time Windows target).
- In the code generation options, go to "Custom Code" tab and put in "Source files" the absolute path to generated files.
- Press "CTRL+B" that executes the code generation and compiles the code.
- In the Simulink scheme choose "Simulation->External" option and press "Connect To Target".
- Start the simulation to verify the controller.
See Also
mpt_demo_deployment_onlinempc
◀ |
mpt_demo_lti3 |
|
mpt_demo_unions1 |
▶ |
© 2010-2013 Martin Herceg: ETH Zurich, herceg@control.ee.ethz.ch