Hi, anyone know how to compute the minimize cost function for solved the control input contrained on my MPC in simulink? btw, my mpc is designed via C-mex file so that it can be simulated and also can be directly execute with my hardware (pilot scale-plant).
But, i need to put constraint since my actuator on my plant is limited from 0-10V. However, I can't find any example how to solve it because most optim tools in in m.file.
currently, i've tried to connect output from MPC to embedded matlab editor (which is contain quadprog coding to optimized the MPC output ) but got an error. I'm not sure is it ok to do that or maybe have any other way?