Under supervision of: Dr S.K. Hosseini S. MPC in Under supervision of: Dr S.K. Hosseini S. By: S.H. Edjtahed M.G. Farajzadeh D. http://ejtahed.fumblog.um.ac.ir
MPC in MATLAB: MATLAB MPC Toolbox (Morari) IMPACT Toolbox (Camacho) MPCTools (Akesson) BLOM (Berkeley Lib. for Optimization MPC) MPT (Multi Parametric Toolbox) jMPC (Jonathan Currie)
SOSTOOLS Toolbox (caltech) YALMIP Toolbox (Camacho) CVX Toolbox (Johan Löfberg) MATLAB LMI Toolbox (Gahinet et al) MPC in LabView (Telemark University College) MPC with MATLAB (a Book by Wang)
Case Study introduction MPC in GUI (mpctool) MPC in Command Line MATLAB MPC Toolbox Overview: MPC Modeling in MATLAB Case Study introduction MPC in GUI (mpctool) MPC in Command Line MPC in Simulink
MATLAB MPC Toolbox 1. MPC Modeling
1. MPC Modeling: Plant Model MATLAB MPC Toolbox 1. MPC Modeling: Plant Model
1. MPC Modeling: Plant Model MATLAB MPC Toolbox 1. MPC Modeling: Plant Model The MPC controller performs all the estimation and optimization calculations using a: discrete-time, delay-free, state-space system, with dimensionless input and output variables.
1. MPC Modeling: Plant Model MATLAB MPC Toolbox 1. MPC Modeling: Plant Model
1. MPC Modeling: Plant Model MATLAB MPC Toolbox 1. MPC Modeling: Plant Model
1. MPC Modeling: LTI Object property MATLAB MPC Toolbox 1. MPC Modeling: LTI Object property
1. MPC Modeling: MIMO Plants MATLAB MPC Toolbox 1. MPC Modeling: MIMO Plants
2. Case Study introduction: Servo Mechanism MATLAB MPC Toolbox 2. Case Study introduction: Servo Mechanism
MATLAB MPC Toolbox 2. Case Study :Modeling
2. Case Study :Plant Definition MATLAB MPC Toolbox 2. Case Study :Plant Definition
2. Case Study :Plant Definition MATLAB MPC Toolbox 2. Case Study :Plant Definition
MATLAB MPC Toolbox 3. MPC in GUI (mpctool) >> mpctool
3. MPC in GUI (mpctool): Specifying signal properties MATLAB MPC Toolbox 3. MPC in GUI (mpctool): Specifying signal properties
3. MPC in GUI (mpctool): Specifying controller properties MATLAB MPC Toolbox 3. MPC in GUI (mpctool): Specifying controller properties
3. MPC in GUI (mpctool): Specifying controller properties MATLAB MPC Toolbox 3. MPC in GUI (mpctool): Specifying controller properties
3. MPC in GUI (mpctool): Specifying controller properties MATLAB MPC Toolbox 3. MPC in GUI (mpctool): Specifying controller properties
3. MPC in GUI (mpctool): Specifying scenario MATLAB MPC Toolbox 3. MPC in GUI (mpctool): Specifying scenario
3. MPC in GUI (mpctool): Simulation results MATLAB MPC Toolbox 3. MPC in GUI (mpctool): Simulation results
3. MPC in GUI (mpctool): Correcting controller properties MATLAB MPC Toolbox 3. MPC in GUI (mpctool): Correcting controller properties
3. MPC in GUI (mpctool): Simulation results MATLAB MPC Toolbox 3. MPC in GUI (mpctool): Simulation results
4. MPC in Command Line Steps: Defining the Plant Model MPC commands MATLAB MPC Toolbox 4. MPC in Command Line Steps: Defining the Plant Model MPC commands Constructing an MPC Object Setting, Getting, and Displaying Object Properties Running a Simulation Plotting the results
4. MPC in Command Line 4.1. Defining the Plant Model: MATLAB MPC Toolbox 4. MPC in Command Line 4.1. Defining the Plant Model: Defining Parameters Defining Sys model
4. MPC in Command Line 4.2. MPC commands: MATLAB MPC Toolbox 4. MPC in Command Line 4.2. MPC commands: 4.3. Constructing an MPC Object
MATLAB MPC Toolbox 4. MPC in Command Line 4.4. Setting, Getting, and Displaying Object Properties
4. MPC in Command Line 4.5. Running a Simulation MATLAB MPC Toolbox 4. MPC in Command Line 4.5. Running a Simulation 4.6. Plotting the results
MATLAB MPC Toolbox 5. MPC in Simulink
MATLAB MPC Toolbox 5. MPC in Simulink
MATLAB MPC Toolbox 5. MPC in Simulink
Integrated Multiple Predictive Algorithm Control Tool The controllers implemented under IMPACT: GPC (Generalized Predictive Control) SPGPC (GPC with Smith Predictor) DMC (Dynamic Matrix Control) PFC (Predictive Functional Control) SSMPC (State Space Model Predictive Control)
Containing (Systems + Experiments): All Simulation Examples of the Book All exercise corresponding to the chapters of the book MPC. You can add your own! All Simulation Results is available here in FUMBlog: add the path of IMPACT directory into the Matlab path in order to run IMPACT correctly. Type in Command window of MATLAB: >> impact
For MIMO systems select the: system to simulate controller to be used parameters of MPC set: duration reference to reach constraints noise disturbances result: outputs , U , DU
The interface is divided in three different parts: SYSTEM: This part loads the system file to be simulated, changes its properties (matrices) and saves a system created by the user in a file. CONTROLLER: It sets the kind of MPC controller to be used, and allows changing the specific tuning parameters, such as horizons or weighting matrices. EXPERIMENT: It establishes the main features of the simulation: time, reference parameters, constraints, noises, disturbances and graphics to be showed
The following forms of modelling a system are accepted by IMPACT. 1. Carima Model. A and B model the system, and the delay factor (z-d) have been integrated in B. 2. Step Response Model (DMC) The variable gninputs contains the inputs of the system 3. Space State Model the variables Mm, Nm and Qm.(PFC and SSMPC) Error Modelling: Ap,Bp for the CARIMA--- gp for the Step response--- Mp, Np and Qp for State Space sinfo:General information about the system in a cell array 2 variables for reference: Constant: vrefc Variable: vrefv
Linear Matrix Inequality in MATLAB >> lmidem
For all 3 Solvers: Input: an LMI system Output: x* (decision variable)
>> lmiedit
Solving LMI:
See Problem Definition at FUMblog: http://ejtahed.fumblog.um.ac.ir
umax=2 Q1=[1 0; 0 0] B1=B2=[0 0.1*0.787]’ Y Q
An useful MATLAB function for Designing RMPC With LMI Available at FUMblog: http://ejtahed.fumblog.um.ac.ir
A useful function for Designing CGPC with MATLAB
A useful function for Designing CGPC with MATLAB Available at FUMblog: http://ejtahed.fumblog.um.ac.ir
MPC in LabView
All Thing is Available at: http://ejtahed.fumblog.um.ac.ir
References: http://www.mathworks.com/ http://www.i2c2.aut.ac.nz/Resources/Software/jMPCToolbox.html https://www.embotech.com/FORCES-Pro/How-to-use/MATLAB-Interface/Simple-MPC-Example http://www-control.eng.cam.ac.uk/jmm/mpcbook/software/software.html http://www.mpc.berkeley.edu/mpc-course-material http://forces.ethz.ch/doku.php?id=examples:simplempc#simple_mpc_example http://www.control.lth.se/user/johan.akesson/mpctools/ http://www.mpclab.net/Trac/ http://control.ee.ethz.ch/research/software.php http://cvxr.com/cvx/ http://users.isy.liu.se/johanl/yalmip/pmwiki.php?n=Main.WhatIsYALMIP http://www.cds.caltech.edu/sostools/ http://ejtahed.fumblog.um.ac.ir/