## C21 Model predictive control – simulation example## Platform ExampleThe files listed below contain code to simulate the platform control problem in questions 6-7 of the example sheet. Download all the files into a single folder on your Matlab path. Run the example by typing
at the Matlab prompt. The code assumes that the Matlab control toolbox and the Matlab optimization toolbox are installed. `platform_example.m`Script: runs the code`predmodel.m`Function: sets up the prediction model`linconstr_d.m`Function: computes robust constraint matrices`sim_qpmin_d.m`Function: simulates MPC in closed loop`plot_u.m`Function: plots ZOH output
Thanks to Dominic Wang for corrections |