The MPC Simulink Library A. Bemporad M. Morari N. L. Ricker User's Guide Version 1
The MPC Simulink Library User’s Guide Version 1 A. Bemporad M. Morari N. L. Ricker
Preface Disclaimer State of Development The MPC Simulink Library is in a developmental(beta)stage. It is not an official MathWorks product. It has been teste extensively, but it is likely that some problems remain. Please review all calculations with a critical eye We will also be improving features in response to your comments In Case of Difficulty This beta version of the MPC Simulink Library is not being supported by The MathWorks. If you encounter a problem, please check the FAQ (see"Updates"below). If that doesnt help, please send a detailed description by e-mail to A Bemporad at the following address bemporadeaut. ee ethz. ch He would also be happy to have your suggestions for improvements in the usability of the MPC Simulink Library, its documentation, and the MPC Toolbox in general Updates The FAQ and latest beta version of the MPC Simulink Library will be maintained for download at http://control.ethz./-bemporad/toolbox/mpclib.html Ackn。 wledgements We appreciate the help of Federica Rusconi, Domenico Mignone, Carles Pedret Ferre, Adrian Toller, Konrad Stadler Tobias raithel, Kazuro Tsuda, Jay lee, Pascal Gahinet, and greg wolodkin
vi Preface Disclaimer State of Development The MPC Simulink Library is in a developmental (beta) stage. It is not an official MathWorks product. It has been tested extensively, but it is likely that some problems remain. Please review all calculations with a critical eye. We will also be improving features in response to your comments. In Case of Difficulty This beta version of the MPC Simulink Library is not being supported by The MathWorks. If you encounter a problem, please check the FAQ (see "Updates" below). If that doesn’t help, please send a detailed description by e-mail to A. Bemporad at the following address: bemporad@aut.ee.ethz.ch He would also be happy to have your suggestions for improvements in the usability of the MPC Simulink Library, its documentation, and the MPC Toolbox in general. Updates The FAQ and latest beta version of the MPC Simulink Library will be maintained for download at http://control.ethz./~bemporad/toolbox/mpclib.html Acknowledgements We appreciate the help of Federica Rusconi, Domenico Mignone, Carles Pedret Ferre, Adrian Toller, Konrad Stadler, Tobias Raithel, Kazuro Tsuda, Jay Lee, Pascal Gahinet, and Greg Wolodkin
Introduction MPC Simulink Library Overview Options 1-2 Starting the mPc simulink Librar System Requirements Installation Quick Start eisurely start MPC Fundamentals
1 Introduction MPC Simulink Library Overview . . . . . . . . . . . . . . . 1-2 Options . . . . . . . . . . . . . . . . . . . . . . . . . . 1-2 Starting the MPC Simulink Library . . . . . . . . . . . . . . 1-3 System Requirements . . . . . . . . . . . . . . . . . . . . 1-3 Installation . . . . . . . . . . . . . . . . . . . . . . . . . 1-3 Quick Start . . . . . . . . . . . . . . . . . . . . . . . . 1-4 Leisurely Start . . . . . . . . . . . . . . . . . . . . . . . 1-4 MPC Fundamentals . . . . . . . . . . . . . . . . . . . . 1-5
MPC Simulink Library Overview The MPC Simulink Library is designed to help you analyze and simulate Model Predictive Control(MPC)modules within any Simulink description of the environment. ptions The MPC Simulink Library supports four controller blocks, to be connected in feedback with the system to regulate. Each block receives output measurements and returns the control input action to the system. The four blocks are the following Regulator. The MPC block regulates the output of the system to zero Controller. An additional reference signal is received by the MPC controller. The output of the system will track such a signal measured input disturbance signals entering the system is received by the mPC controller and taken into account in the computation of the control action Controller with Anticipation. Reference and measured disturbance signals are read from file. This allows knowing future samples when computing the control action 1-2
1 Introduction 1-2 MPC Simulink Library Overview The MPC Simulink Library is designed to help you analyze and simulate Model Predictive Control (MPC) modules within any Simulink description of the environment. Options The MPC Simulink Library supports four controller blocks, to be connected in feedback with the system to regulate. Each block receives output measurements and returns the control input action to the system. The four blocks are the following: • Regulator. The MPC block regulates the output of the system to zero. • Controller. An additional reference signal is received by the MPC controller. The output of the system will track such a signal. • Controller with Measured Disturbance Rejection. An additional information about measured input disturbance signals entering the system is received by the MPC controller and taken into account in the computation of the control action. • Controller with Anticipation. Reference and measured disturbance signals are read from file. This allows knowing future samples when computing the control action
Starting the MPC Simulink Library System Requirement You ll need the following matlab software MPC Toolbox for MATLAB Version 5, including the MPC Simulink Library files (which are currently an add-on to the standard MPC Tools release MATLAB Version 5.3 or greater Simulink version 3.0 or greater · Control toolbox. Installation 1 Make a backup copy of your MPC Tools directory(which should be located in your MATLAB directory,e.g, MATLAB/toolbox/mpc). This will allow you to restore your original state if the GUI installation interferes in some unexpected way 2 Download the latest version of the MPC Simulink Library from http://control.ethz.ch/-bemporad/toolbox/mpclib.html Its a ZiP archive. Extract the contents using one of the many available utility programs (e.g, WinZip). This should create a new mpclib directory within the mpc directory IMPORTANTa The Zip archive is not a full version of mpc tools. You must have existing mpc/mpccmds and mpc/mpcdemos directories. The files from the archive only update these directories 3 Set your MATLAB Path so the new mpc/mpclib directory is included. Verify that the original mpc/mpccmds and mpc/mpcdemos directories are also on the path 4 Type"mpclib"in the MATLAB Command window. You should see the mPC Simulink library 5 If it doesn t work or you have other problems, see section In Case of Difficulty in the preface to this document
Starting the MPC Simulink Library 1-3 Starting the MPC Simulink Library System Requirements You’ll need the following MATLAB software: • MPC Toolbox for MATLAB Version 5, including the MPC Simulink Library files (which are currently an add-on to the standard MPC Tools release). • MATLAB Version 5.3 or greater. • Simulink Version 3.0 or greater. • Control Toolbox. Installation 1 Make a backup copy of your MPC Tools directory (which should be located in your MATLAB directory, e.g., MATLAB/toolbox/mpc). This will allow you to restore your original state if the GUI installation interferes in some unexpected way. 2 Download the latest version of the MPC Simulink Library from http://control.ethz.ch/~bemporad/toolbox/mpclib.html It’s a ZIP archive. Extract the contents using one of the many available utility programs (e.g., WinZip). This should create a new mpclib directory within the mpc directory. IMPORTANT: The ZIP archive is not a full version of MPC Tools. You must have existing mpc/mpccmds and mpc/mpcdemos directories. The files from the archive only update these directories. 3 Set your MATLAB Path so the new mpc/mpclib directory is included. Verify that the original mpc/mpccmds and mpc/mpcdemos directories are also on the path. 4 Type “mpclib” in the MATLAB Command window. You should see the MPC Simulink Library. 5 If it doesn’t work or you have other problems, see section In Case of Difficulty in the preface to this document