1 Tutorial Introduction The Model Predictive Control (MPC) Toolbox is a collection of functions (commands) developed for the analysis and design of model predictive control (MPC) systems. Model predictive control was conceived in the 1970s primarily by industry. Its popularity steadily increased throughout the 1980s. At present, there is little doubt that it is the most widely used multivariable control algorithm in the chemical process industries and in other areas. While MPC is suitable for almost any kind of problem, it displays its main strength when applied to problems with A large number of manipulated and controlled variables Constraints imposed on both the manipulated and controlled variables Changing control objectives and/or equipment(sensor/actuator)failure · Time delays Some of the popular names associated with model predictive control are Dynamic Matrix Control (DMC), IDCOM, model algorithmic control, etc. While these algorithms differ in certain details, the main ideas behind them are very similar. Indeed, in its basic unconstrained form MPC is closely related to linear quadratic optimal control. In the constrained case, however, MPC leads to an optimization problem which is solved on-line in real time at each sampling interval. MPC takes full advantage of the power available in today's control computer hardware This software and the accompanying manual are not intended to teach the user the basic ideas behind MPC. Background material is available in standard textbooks like those authored by Seborg, Edgar and Mellichamp(1989) Deshpande and Ash(1988)and the monograph devoted solely to this topic authored by Morari and coworkers(Morari et al, 1994 )3. This section provides basic introduction to the main ideas behind MPC and the specific form of implementation chosen for this toolbox. The algorithms used here are consistent with those described in the monograph by Morari et al. Indeed, the oftware is meant to accompany the monograph and vice versa. The routines included in the MPC Toolbox fall into two basic categories: routines which use 1. D.E. Seborg, T F. Edgar, D.A. Mellichamp: Process Dynamics and Control Johnwiley & Sons 3.M. Morari C.E. Garcia. LH. Lee. D.M. Prett: Model predictive Control Prentice halL. 1994 process of being written 1-2
1 Tutorial 1-2 Introduction The Model Predictive Control (MPC) Toolbox is a collection of functions (commands) developed for the analysis and design of model predictive control (MPC) systems. Model predictive control was conceived in the 1970s primarily by industry. Its popularity steadily increased throughout the 1980s. At present, there is little doubt that it is the most widely used multivariable control algorithm in the chemical process industries and in other areas. While MPC is suitable for almost any kind of problem, it displays its main strength when applied to problems with: • A large number of manipulated and controlled variables • Constraints imposed on both the manipulated and controlled variables • Changing control objectives and/or equipment (sensor/actuator) failure • Time delays Some of the popular names associated with model predictive control are Dynamic Matrix Control (DMC), IDCOM, model algorithmic control, etc. While these algorithms differ in certain details, the main ideas behind them are very similar. Indeed, in its basic unconstrained form MPC is closely related to linear quadratic optimal control. In the constrained case, however, MPC leads to an optimization problem which is solved on-line in real time at each sampling interval. MPC takes full advantage of the power available in today’s control computer hardware. This software and the accompanying manual are not intended to teach the user the basic ideas behind MPC. Background material is available in standard textbooks like those authored by Seborg, Edgar and Mellichamp (1989)1, Deshpande and Ash (1988)2 and the monograph devoted solely to this topic authored by Morari and coworkers (Morari et al., 1994)3. This section provides a basic introduction to the main ideas behind MPC and the specific form of implementation chosen for this toolbox. The algorithms used here are consistent with those described in the monograph by Morari et al. Indeed, the software is meant to accompany the monograph and vice versa. The routines included in the MPC Toolbox fall into two basic categories: routines which use 1. D.E. Seborg, T.F. Edgar, D.A. Mellichamp; Process Dynamics and Control; JohnWiley & Sons, 1989 2. P.B. Deshpande, R.H. Ash; Computer Process Control with Advanced Control Applications, 2nd ed., ISA, 1988 3. M. Morari, C.E. Garcia, J.H. Lee, D.M. Prett; Model Predictive Control; Prentice Hall, 1994 (In the process of being written.)
ntroduction a step response model description and routines which use a state-space model description. In addition, simple identification tools are provided for identifying step response models from plant data. Finally, there are also various conversion routines which convert between different model formats and analysis routines which can aid in determining the stability of the unconstrained system, etc. All MPC Toolbox commands have a built-in usage display Any command called with no input arguments results in a brief description of the command line. For example, typing mpccon at the command line gives the following (model M P) The following sections include several examples. They are available in the tutorial programs mpctut. m, mpctutid. m, mpctutst. m, and mpctutss m. You an copy these demo files from the mpctool s/mpcdemos source into a local directory and examine the effects of modifying some of the commands Target Audience for the MPC Toolbox The package is intended for the classroom and for the practicing engineer. It can assist in communicating the concepts of MPC to a student in an introductory control course. At the same time it is sophisticated enough to allow an engineer in industry to evaluate alternate control strategies in simulation studies System Requirements The MPC Toolbox assumes the following operating system requirements MATLAB is running on your system If nonlinear systems are to be simulated, Simulink is required for the functions nl cmpc and nl mpcsi m If the theta format from the System Identification Toolbox is to be used to create models in the MPC mod format(using the MPC Toolbox function, th2mod), then the System Identification Toolbox function pol yform and the Control System Toolbox function append are required
Introduction 1-3 a step response model description and routines which use a state-space model description. In addition, simple identification tools are provided for identifying step response models from plant data. Finally, there are also various conversion routines which convert between different model formats and analysis routines which can aid in determining the stability of the unconstrained system, etc. All MPC Toolbox commands have a built-in usage display. Any command called with no input arguments results in a brief description of the command line. For example, typing mpccon at the command line gives the following: usage: Kmpc = mpccon(model,ywt,uwt,M,P) The following sections include several examples. They are available in the tutorial programs mpctut.m, mpctutid.m, mpctutst.m, and mpctutss.m. You can copy these demo files from the mpctools/mpcdemos source into a local directory and examine the effects of modifying some of the commands. Target Audience for the MPC Toolbox The package is intended for the classroom and for the practicing engineer. It can assist in communicating the concepts of MPC to a student in an introductory control course. At the same time it is sophisticated enough to allow an engineer in industry to evaluate alternate control strategies in simulation studies. System Requirements The MPC Toolbox assumes the following operating system requirements: • MATLAB® is running on your system. • If nonlinear systems are to be simulated, Simulink® is required for the functions nlcmpc and nlmpcsim. • If the theta format from the System Identification Toolbox is to be used to create models in the MPC mod format (using the MPC Toolbox function, th2mod), then the System Identification Toolbox function polyform and the Control System Toolbox function append are required
1 Tutorial The MPC Toolbox analysis and simulation algorithms are numerically intensive and require approximately 1MB of memory, depending on the number of inputs and outputs. The available memory on your computer may limit the size of the systems handled by the MPC Toolbox Note: there is a pack command in MATLAB that can help free memory space by compacting fragmented memory locations. For reasonable response times, a computer with power equivalent to an 80386 machine is recommended unless only simple tutorial example problems are of interest
1 Tutorial 1-4 The MPC Toolbox analysis and simulation algorithms are numerically intensive and require approximately 1MB of memory, depending on the number of inputs and outputs. The available memory on your computer may limit the size of the systems handled by the MPC Toolbox. Note: there is a pack command in MATLAB that can help free memory space by compacting fragmented memory locations. For reasonable response times, a computer with power equivalent to an 80386 machine is recommended unless only simple tutorial example problems are of interest
MPC Based on Step Response models
2 MPC Based on Step Response Models
2 MPC Based on Step Response Models Step Response Models Step response models are based on the following idea. Assume that the system is at rest. For a linear time-invariant single-input single-output (SISO) system let the output change for a unit input change Av be given by 0,S1,S2,……,SSm:} Here we assume that the system settles exactly after nsteps. The step response Sn) constitutes a complete model of the system, which allows us to compute the system output for any input sequence Kk) vk-1+s,wk-n-1 Step response models can be used for both stable and integrating processes. Fc an integrating process it is assumed that the slope of the response lcu nor 2 For a multi-input multi-output(MIMO)process with n, inputs and ny outputs one obtains a series of step response coefficient matrices where Smi is the ith step response coefficient relating the mh input to the th 2-2
2 MPC Based on Step Response Models 2-2 Step Response Models Step response models are based on the following idea. Assume that the system is at rest. For a linear time-invariant single-input single-output (SISO) system let the output change for a unit input change ∆v be given by {0, s1, s2,..., sn, sn, . . .} Here we assume that the system settles exactly after n steps. The step response {s1, s2,..., sn} constitutes a complete model of the system, which allows us to compute the system output for any input sequence: Step response models can be used for both stable and integrating processes. For an integrating process it is assumed that the slope of the response remains constant after n steps, i.e., sn – sn – 1 = sn + 1 – sn = sn + 2 – sn + 1 =... For a multi-input multi-output (MIMO) process with nv inputs and ny outputs, one obtains a series of step response coefficient matrices where sl,m,i is the i th step response coefficient relating the mth input to the l th output. y k( ) si ∆v( ) k i – i = 1 n sn = + vk n ( ) – – 1 Si s1 1, , i s1 2, , i … s1 nv , , i s2 1, , i sny, , 1 i sny, , 2 i … sny nv , , i = …