Cost-function in MPC toolbox
Show older comments
Hello everyone,
I want to use the MPC toolbox in MATLAB 2021b and design my controller and then convert it into Simulink to test my model. Finally, I want to implement my MPC in a Real-time simulator that is compatible with MATLAB 2014b.
Firstly, I am so thankful if you let me know if the MPC codes generated by MATLAB 2021b are compatible with MATLAB 2014b or not. If not I have to write my own MPC code in MATLAB 2014b.
Then, I want to work with the MPC toolbox in MATLAB 2021b, but there is no room for entering the cost function. I import a simple system and defined the weights and constraints. However, I didn't figure out how I can define my quadratic cost function.
Finally, I am thankful if you let me know how in the MPC toolbox I can define variable states matrixes (A, B, C). The equations of the system are linear. But, at each time interval, I should update the A, B, and C of the state-space matrix.
Best regards
Mohammad
Answers (0)
Categories
Find more on Controller Creation in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!