How to obtain the designed MPC controller to program in a computer

8 views (last 30 days)
I've designed and tuned an MPC controller by means of the MPC tool. Once I've checked and simulated the desired behavior I would like to get the controller model in order to program it in the computer comtrolling the real physical process.
The problem is that I'm not able to extract the controller model from the MPC object provided by the MPC tool, I mean the transfer functions/s.
Having the MPC model as transfer functions, I first would like to validate the controller in Simulink by comparing the responses obtained with the MPC Controller block and the controller implemented with transfer fucntion blocks.
Any idea how can I do it?
Thanks

Accepted Answer

Arkadiy Turevskiy
Arkadiy Turevskiy on 20 Mar 2014
Edited: Arkadiy Turevskiy on 23 Dec 2014
MPC controller is not a transfer function. As explained here ,it is an optimization problem that is formulated and solved at each sampling time. Think about it as an optimization solver that runs each time you compute controller action. So you can't just reduce it to a transfer function.
Once the controller is designed and tested in MATLAB/Simulink, there are 2 ways to deploy: 1. Use mpcmove function, and create a standalone application using MATLAB Compiler 2. Use MPC Controller block in Simulink and generate C code or structured text using Simulink Coder or Simulink PLC Coder.The generated code can then be loaded onto the target processor or a PLC.

More Answers (0)

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!