Multiple MPC Design for a Ship
Updated 28 Jun 2018
These are the files for Chapter 6 for the book " Practical Design and Application of Model Predictive Control" by Elsevier (eBook ISBN: 9780128139196, Paperback ISBN: 9780128139189).
In many industrial applications, the dynamics of the plants are nonlinear. The question that gets asked frequently is it highly nonlinear? Can we use linear controller technique such as PID? In this chapter, the nonlinearity will be studied before the design of the controller. The response surface across the range of operation of the plant will be generated. This surface will give insights into the number of controllers needed for the full range. Multiple MPC is then designed and the concept of switching logic is introduced along with the challenges of tuning the switching of the MPC controllers.
In Chapter_6\Section_3 folder, 20 simulations for the ship are carried out by using Parallel Computing Toolbox. Read and run Chapter_6_Section_3_Script.m to carry the simulations. Methods such as changing Simulink® parameters from the script, creating new file names and checking for Matlab® licenses are included in the script.
In Chapter_6\Section_4 folder, the response surface is analyzed and nonlinearity is assessed. Run Chapter_6_Section_4_Script.m to run and plot the analysis.
In Chapter_6\Section_5 folder, run Chapter_6_Section_5_1_Script.m to simulate the ship for different propeller and rudder angles. Once done, run Chapter_6_Section_5_2_Script.m to generate a set of linear models for the ship for various propeller and rudder angles.
In Chapter_6\Section_6 run Chapter_6_Section_6_Script.m to generate all the MPC controllers for the various propeller and rudder angles previously generated in Chapter_6\Section_5 folder.
Chapter_6\Section_7 contains the Simulink model, Chapter_5_Section_8_Model_and_Controller.slx that has the ship model alongside with the multiple MPC controllers and the switching logic.
In Chapter_6\Section_8 the model of the ship and controller, Chapter_6_Section_7_Model.slx, is simulated using Chapter_6_Section_8_Script_1.m . Tracking results and controller performance are analyzed. The problem of frequent switching of MPC modes is identified. A hysteresis block is introduced to mitigate the problem. Similarly, Chapter_6_Section_8_Script_2.m is used to simulate the new switching logic, Chapter_6_Section_8_Model.slx.
In In Chapter_6\Section_9 an application problem similar to the previous section is introduced. Run
Chapter_6_Section_9_Solution_Script.m to simulate and see tracking performance of the controller and switching logic performance.
Nassim Khaled (2023). Multiple MPC Design for a Ship (https://www.mathworks.com/matlabcentral/fileexchange/67852-multiple-mpc-design-for-a-ship), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform CompatibilityWindows macOS Linux
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
Added icon picture.