Simulation files on basic Nonlinear Model Predictive Control with control rate, soft constraints, and control horizon, coded in Casadi, MATLAB.
The source files can be found at: https://github.com/MMehrez/MPC-and-MHE-implementation-in-MATLAB-using-Casadi (Thank you so much for the study materials, Mr Mohamed W. Mehrez!)
Modifications made to the above reference: 1 - Adding control rate constraints and soft constraints on control rates. 2 - Adding the control horizon, which can differ from the prediction horizon.