Model predictive control implementation on Arduino

I am trying to implement an MPC on an arduino, but currently have no idea where to start. For more standard control methods, implementing them on an arduino is simple as there are equations that one can use and simply code into the IDE. However with MPC, I'm not sure what these equations are. I have currently simulated my system in MATLAB using the MPC toolbox there and everything works as intended, however I am struggling with translating this to my physical system. If anyone could point me in the right direction, I would greatly appreciate it.
 
I am trying to implement an MPC on an arduino, but currently have no idea where to start. For more standard control methods, implementing them on an arduino is simple as there are equations that one can use and simply code into the IDE. However with MPC, I'm not sure what these equations are. I have currently simulated my system in MATLAB using the MPC toolbox there and everything works as intended, however I am struggling with translating this to my physical system. If anyone could point me in the right direction, I would greatly appreciate it.
What is the studied system you are working on..
 
Top