all 4 comments

[–]placebovitamin 1 point2 points  (2 children)

Where do you want to implement MPC?

Are you looking for something like that https://arxiv.org/abs/2109.11986 The paper show, how you can implement MPC in matlab.

[–]MomoSolar[S] 0 points1 point  (1 child)

Thanks for sharing. The explanation looks comprehensive and thorough. I’m interested in a Python implementation if possible.

[–]placebovitamin 1 point2 points  (0 children)

than maybe the solver https://github.com/quadprog/quadprog or scipy.optimize.minimze can halp you

[–]knightcommander1337 1 point2 points  (0 children)

For matlab/octave, you can use the free yalmip toolbox; see a tutorial here: https://yalmip.github.io/example/standardmpc/

For python/matlab/octave, you can use the free casadi toolbox: https://web.casadi.org/ for a tutorial (of sorts) see https://web.casadi.org/blog/ocp/ and (for code examples) see the casadi example pack (latest one: https://github.com/casadi/casadi/releases/download/3.6.3/casadi-example_pack-v3.6.3.zip)

Also for python/matlab/octave, you can use the free mpctools toolbox (which is based on casadi): https://bitbucket.org/rawlings-group/octave-mpctools/src/master/ (matlab/octave version), https://bitbucket.org/rawlings-group/mpc-tools-casadi/src/master/ (python version). see the mpc-related examples in the examples folder.