SlideShare a Scribd company logo
1 of 15
π‘€π‘Žπ‘”π‘‘π‘Žπ‘™π‘’π‘›π‘Ž 𝐴π‘₯π‘’π‘™π‘ π‘ π‘œπ‘›1
, πΉπ‘Ÿπ‘’π‘‘π‘Ÿπ‘–π‘˜ π‘€π‘Žπ‘”π‘›π‘’π‘ π‘ π‘œπ‘›2
, π‘‡π‘œπ‘–π‘£π‘œ π»π‘’π‘›π‘›π‘–π‘›π‘”π‘ π‘ π‘œπ‘›1
A FRAMEWORK FOR NONLINEAR MODEL PREDICTIVE
CONTROL IN JMODELICA.ORG
11. π‘€π‘œπ‘‘π‘’π‘™π‘œπ‘›, 𝐿𝑒𝑛𝑑, 𝑆𝑀𝑒𝑑𝑒𝑛
2. π·π‘’π‘π‘Žπ‘Ÿπ‘‘π‘šπ‘’π‘›π‘‘ π‘œπ‘“ π΄π‘’π‘‘π‘œπ‘šπ‘Žπ‘‘π‘–π‘ πΆπ‘œπ‘›π‘‘π‘Ÿπ‘œπ‘™, 𝐿𝑒𝑛𝑑 π‘ˆπ‘›π‘–π‘£π‘’π‘Ÿπ‘ π‘–π‘‘π‘¦, 𝑆𝑀𝑒𝑑𝑒𝑛
β€’ Background
 Model Predictive Control
Optimal control problem
Example
 JModelica.org
Reason for new framework
Optimica
Discretization
β€’ Comparison between frameworks
 Theory
 Benchmark
β€’ Features
β€’ Conclusions and further work
OVERVIEW
β€’ Optimization-based control strategy
β€’ Repeated on-line solution of an open-loop Optimal Control Problem (OCP)
β€’ Feedback by measuring the state prior to each optimization
β€’ Main advantages
 Easily extends to multivariable processes
 Instrinscally handles constraints
β€’ Main limitations
 Computationally demanding
 Solution not guaranteed
MODEL PREDICTIVE CONTROL
β€’ Objective function min
π‘₯,𝑦,𝑒,𝑀 𝑑0
𝑑 𝑓
𝑀𝑠𝑒𝑑 βˆ’ 𝑀 𝑇
𝑄 𝑀𝑠𝑒𝑑 βˆ’ 𝑀 𝑑𝑑
𝑀 = (π‘₯ π‘π‘œπ‘›π‘‘π‘Ÿπ‘œπ‘™π‘™π‘’π‘‘, π‘¦π‘π‘œπ‘›π‘‘π‘Ÿπ‘œπ‘™π‘™π‘’π‘‘, 𝑒 π‘π‘œπ‘›π‘‘π‘Ÿπ‘œπ‘™π‘™π‘’π‘‘)
𝑠. 𝑑.
β€’ Model 𝐹 π‘₯ 𝑑 , π‘₯ 𝑑 , 𝑦 𝑑 , 𝑒 𝑑 = 0
β€’ Initial condition π‘₯ 𝑑0 = π‘₯0
π‘₯ 𝐿 ≀ π‘₯ 𝑑 ≀ π‘₯ π‘ˆ
β€’ Constraints 𝑔 π‘₯ 𝑑 , π‘₯ 𝑑 , 𝑦 𝑑 , 𝑒 𝑑 ≀ 0
βˆ€π‘‘ ∈ [𝑑0, 𝑑𝑓]
OPTIMAL CONTROL PROBLEM
MODEL PREDICTIVE CONTROL
Sample period = 10s
At each sample point
β€’ Measure state
β€’ Optimize
β€’ Apply first input
Open-source platform for simulation and optimization of Modelica models
Optimization problem formulated in Optimica
 Extension of the Modelica language which enables formulation of
objective functions and constraints
β€’ JModelica.org has a framework for optimization -> Open-Loop framework
β€’ Main goals of MPC framework
 Decrease the total computation time for each optimization
Utilize the fact that the structure of the discretized OCP does not change between
optimizations
 Make JModelica.org easier to use for MPC schemes
Streamline the setup
Provide relevant features
JMODELICA.ORG
optimization CSTR_opt(objectiveIntegrand=(c_ref-cstr.c)^2 +
(T_ref-cstr.T)^2 + (Tc_ref-cstr.Tc)^2,
startTime=0.0,
finalTime=150)
CSTR cstr(T(max=350));
input Real u(start = 350,min=230,max=370)=cstr.Tc;
parameter Real c_ref = 500;
parameter Real T_ref = 320;
parameter Real Tc_ref = 300;
constraint
cstr.c <= 1000;
end CSTR_opt;
OPTIMICA CODE
β€’ JModelica.org uses direct collocation to transcribe the OCP to a
NonLinear Program (NLP)
 Optimization problem is considered at a number of collocation
points 𝑑 = {𝑑 𝑐1, 𝑑 𝑐2, … , 𝑑 𝑐𝑛}, rather than βˆ€π‘‘ ∈ 𝑑0, 𝑑𝑓
β€’ Underlying NLP solver is IPOPT
 Solution not guaranteed
 Important with good initial guess
DISCRETIZATION
OL framework
β€’ Pre-processing
 OCP transcribed to NLP
 Initial guess extracted
 Scaling
 Solver object created
β€’ Solution
 NLP sent to solver
β€’ Post-processing
 Result is processed
 Result object created and
returned
COMPARISON BETWEEN FRAMEWORKS
MPC framework
β€’ Initialization – Only done once
 OCP transcribed to NLP
 Initial guess extracted
 Scaling
 Solver object created
β€’ Pre-processing
 Initial condition updated
 Initial guess updated
 Prediction horizon shifted
β€’ Solution
 NLP sent to solver (warm started)
β€’ Post-processing
 Result is processed
 First input in optimal control sequence
returned
β€’ Developed by F. Casella
β€’ Objective
 𝑝𝑠𝑒𝑑 = 8.35 π‘€π‘ƒπ‘Ž
 π‘™π‘œπ‘Žπ‘‘ 𝑠𝑒𝑑 = 1
𝑑0
𝑑 𝑓
8.35 βˆ’ 𝑝 2
+ 1 βˆ’ π‘™π‘œπ‘Žπ‘‘ 2
𝑑𝑑
β€’ Constraints
 𝜎 ≀ 260 π‘€π‘ƒπ‘Ž
 0 ≀ 𝑒 ≀ 1
 0 ≀ 𝑒 ≀
0.1
60
BENCHMARK MODEL
Combined-Cycle Power Plant (CCPP)
BENCHMARK RESULTS
Sample period = 100s
β€’ Soften constraints
 OCP may become infeasible if hard constraints are applied
π‘₯0 > π‘₯ π‘ˆ, π‘₯ 𝑑0 = π‘₯0, π‘₯ 𝑑 ≀ π‘₯ π‘ˆ
 Hard constraints need to be softened
β€’ Initial guess
 MPC framework automatically uses the solution to one optimization as
the initial guess for the next
β€’ Unsuccessful optimization
 If an optimization is unsuccessful the MPC framework returns the
second input in the last sucessful optimization
FEATURES
+ πœ€(𝑑)
β€’ We obtain the same solution using the MPC framework as using the
OL framework
β€’ The MPC framework is significantly faster than the OL framework
 CCPP: π‘‡π‘‘π‘œπ‘‘ β‰ˆ βˆ’70%
 Mainly due to time-consuming discretization only done once
β€’ The MPC framework handles a lot of things internally, making
scripting easier
CONCLUSIONS
β€’ Some optimization options are incompatible with the MPC
framework
β€’ More functionality
 Different ways of softening variable bounds and constraints
 Shifting of dual variables
 Method to obtain the value of the objective function
FURTHER WORK
magdalena. axelsson@modelon. com

More Related Content

What's hot

PID Controller
PID ControllerPID Controller
PID Controllersaishah72
Β 
Mathematical modeling of continuous stirred tank reactor systems (cstr)
Mathematical modeling of continuous stirred tank reactor systems (cstr)Mathematical modeling of continuous stirred tank reactor systems (cstr)
Mathematical modeling of continuous stirred tank reactor systems (cstr)Karnav Rana
Β 
Ashrae 90.1 and the future of pumping part 1
Ashrae 90.1 and the future of pumping part 1Ashrae 90.1 and the future of pumping part 1
Ashrae 90.1 and the future of pumping part 1ArmstrongIntegrated
Β 
Simulation and Comparison of P, PI, PID Controllers on MATLAB/ Simulink
Simulation and Comparison of P, PI, PID Controllers on MATLAB/ SimulinkSimulation and Comparison of P, PI, PID Controllers on MATLAB/ Simulink
Simulation and Comparison of P, PI, PID Controllers on MATLAB/ SimulinkHarshKumar649
Β 
thermodynamics of power plant
thermodynamics of power plantthermodynamics of power plant
thermodynamics of power plantupasana_panigrahi
Β 
Modeling of turbulent flow
Modeling of turbulent flowModeling of turbulent flow
Modeling of turbulent flowTuong Do
Β 
FAQ on chemical Reaction Engineering
FAQ on chemical Reaction EngineeringFAQ on chemical Reaction Engineering
FAQ on chemical Reaction EngineeringVISHAL THAKRE
Β 
Steam turbines and its associated systems(ntpc ramagundam)
Steam turbines and its associated systems(ntpc ramagundam)Steam turbines and its associated systems(ntpc ramagundam)
Steam turbines and its associated systems(ntpc ramagundam)abdul mohammad
Β 
Class 10 mathematical modeling of continuous stirred tank reactor systems (...
Class 10   mathematical modeling of continuous stirred tank reactor systems (...Class 10   mathematical modeling of continuous stirred tank reactor systems (...
Class 10 mathematical modeling of continuous stirred tank reactor systems (...Manipal Institute of Technology
Β 
heat transfer enhancement in pipe flow
heat transfer enhancement in pipe flowheat transfer enhancement in pipe flow
heat transfer enhancement in pipe flowhaider majeed
Β 
Thermodynamics Chapter 3- Heat Transfer
Thermodynamics Chapter 3- Heat TransferThermodynamics Chapter 3- Heat Transfer
Thermodynamics Chapter 3- Heat TransferVJTI Production
Β 
Rankine Cycle & How to increase its efficiency
Rankine Cycle & How to increase its efficiencyRankine Cycle & How to increase its efficiency
Rankine Cycle & How to increase its efficiencyRaja Dolat
Β 
Pneumatic controllers
Pneumatic controllersPneumatic controllers
Pneumatic controllersbestinkallely
Β 
Steam Condenser performance and loss diagnostic
Steam Condenser performance and loss diagnosticSteam Condenser performance and loss diagnostic
Steam Condenser performance and loss diagnosticPichai Chaibamrung
Β 
Refrigeration and Heat Pump Systems
Refrigeration and Heat Pump SystemsRefrigeration and Heat Pump Systems
Refrigeration and Heat Pump SystemsSalman Jailani
Β 
Vapour power cycles
Vapour power cyclesVapour power cycles
Vapour power cycleskrishna khot
Β 
Gas Compressor Calculations Tutorial
Gas Compressor Calculations TutorialGas Compressor Calculations Tutorial
Gas Compressor Calculations TutorialVijay Sarathy
Β 
Cfd simulation of flow heat and mass transfer
Cfd simulation of flow  heat and mass transferCfd simulation of flow  heat and mass transfer
Cfd simulation of flow heat and mass transferDr.Qasim Kadhim
Β 

What's hot (20)

PID Controller
PID ControllerPID Controller
PID Controller
Β 
Mathematical modeling of continuous stirred tank reactor systems (cstr)
Mathematical modeling of continuous stirred tank reactor systems (cstr)Mathematical modeling of continuous stirred tank reactor systems (cstr)
Mathematical modeling of continuous stirred tank reactor systems (cstr)
Β 
Ashrae 90.1 and the future of pumping part 1
Ashrae 90.1 and the future of pumping part 1Ashrae 90.1 and the future of pumping part 1
Ashrae 90.1 and the future of pumping part 1
Β 
Simulation and Comparison of P, PI, PID Controllers on MATLAB/ Simulink
Simulation and Comparison of P, PI, PID Controllers on MATLAB/ SimulinkSimulation and Comparison of P, PI, PID Controllers on MATLAB/ Simulink
Simulation and Comparison of P, PI, PID Controllers on MATLAB/ Simulink
Β 
thermodynamics of power plant
thermodynamics of power plantthermodynamics of power plant
thermodynamics of power plant
Β 
Modeling of turbulent flow
Modeling of turbulent flowModeling of turbulent flow
Modeling of turbulent flow
Β 
FAQ on chemical Reaction Engineering
FAQ on chemical Reaction EngineeringFAQ on chemical Reaction Engineering
FAQ on chemical Reaction Engineering
Β 
Steam turbines and its associated systems(ntpc ramagundam)
Steam turbines and its associated systems(ntpc ramagundam)Steam turbines and its associated systems(ntpc ramagundam)
Steam turbines and its associated systems(ntpc ramagundam)
Β 
Class 10 mathematical modeling of continuous stirred tank reactor systems (...
Class 10   mathematical modeling of continuous stirred tank reactor systems (...Class 10   mathematical modeling of continuous stirred tank reactor systems (...
Class 10 mathematical modeling of continuous stirred tank reactor systems (...
Β 
heat transfer enhancement in pipe flow
heat transfer enhancement in pipe flowheat transfer enhancement in pipe flow
heat transfer enhancement in pipe flow
Β 
Thermodynamics Chapter 3- Heat Transfer
Thermodynamics Chapter 3- Heat TransferThermodynamics Chapter 3- Heat Transfer
Thermodynamics Chapter 3- Heat Transfer
Β 
Ge Combined Cycle
Ge Combined CycleGe Combined Cycle
Ge Combined Cycle
Β 
Rankine Cycle & How to increase its efficiency
Rankine Cycle & How to increase its efficiencyRankine Cycle & How to increase its efficiency
Rankine Cycle & How to increase its efficiency
Β 
Pneumatic controllers
Pneumatic controllersPneumatic controllers
Pneumatic controllers
Β 
Steam Condenser performance and loss diagnostic
Steam Condenser performance and loss diagnosticSteam Condenser performance and loss diagnostic
Steam Condenser performance and loss diagnostic
Β 
Refrigeration and Heat Pump Systems
Refrigeration and Heat Pump SystemsRefrigeration and Heat Pump Systems
Refrigeration and Heat Pump Systems
Β 
Vapour power cycles
Vapour power cyclesVapour power cycles
Vapour power cycles
Β 
Gas Compressor Calculations Tutorial
Gas Compressor Calculations TutorialGas Compressor Calculations Tutorial
Gas Compressor Calculations Tutorial
Β 
Diesel power plant
Diesel power plantDiesel power plant
Diesel power plant
Β 
Cfd simulation of flow heat and mass transfer
Cfd simulation of flow  heat and mass transferCfd simulation of flow  heat and mass transfer
Cfd simulation of flow heat and mass transfer
Β 

Similar to A framework for nonlinear model predictive control

Optimica Compiler Toolkit - Overview
Optimica Compiler Toolkit - OverviewOptimica Compiler Toolkit - Overview
Optimica Compiler Toolkit - OverviewModelon
Β 
Dueling network architectures for deep reinforcement learning
Dueling network architectures for deep reinforcement learningDueling network architectures for deep reinforcement learning
Dueling network architectures for deep reinforcement learningTaehoon Kim
Β 
Predicting Optimal Parallelism for Data Analytics
Predicting Optimal Parallelism for Data AnalyticsPredicting Optimal Parallelism for Data Analytics
Predicting Optimal Parallelism for Data AnalyticsDatabricks
Β 
Automated and Scalable Solutions for Software Testing: The Essential Role of ...
Automated and Scalable Solutions for Software Testing: The Essential Role of ...Automated and Scalable Solutions for Software Testing: The Essential Role of ...
Automated and Scalable Solutions for Software Testing: The Essential Role of ...Lionel Briand
Β 
Industrial plant optimization in reduced dimensional spaces
Industrial plant optimization in reduced dimensional spacesIndustrial plant optimization in reduced dimensional spaces
Industrial plant optimization in reduced dimensional spacesCapstone
Β 
Development of calibrated operational models of existing buildings for real-t...
Development of calibrated operational models of existing buildings for real-t...Development of calibrated operational models of existing buildings for real-t...
Development of calibrated operational models of existing buildings for real-t...IES VE
Β 
Development of Calibrated Operational Models for Real-Time Decision Support a...
Development of Calibrated Operational Models for Real-Time Decision Support a...Development of Calibrated Operational Models for Real-Time Decision Support a...
Development of Calibrated Operational Models for Real-Time Decision Support a...Daniel Coakley
Β 
Scott Clark, Co-Founder and CEO, SigOpt at MLconf SF 2016
Scott Clark, Co-Founder and CEO, SigOpt at MLconf SF 2016Scott Clark, Co-Founder and CEO, SigOpt at MLconf SF 2016
Scott Clark, Co-Founder and CEO, SigOpt at MLconf SF 2016MLconf
Β 
MLConf 2016 SigOpt Talk by Scott Clark
MLConf 2016 SigOpt Talk by Scott ClarkMLConf 2016 SigOpt Talk by Scott Clark
MLConf 2016 SigOpt Talk by Scott ClarkSigOpt
Β 
Complete (2)
Complete (2)Complete (2)
Complete (2)Sahar Alinia
Β 
Selaidechou
SelaidechouSelaidechou
SelaidechouPedro Dias
Β 
Analysis and Design of PID controller with control parameters in MATLAB and S...
Analysis and Design of PID controller with control parameters in MATLAB and S...Analysis and Design of PID controller with control parameters in MATLAB and S...
Analysis and Design of PID controller with control parameters in MATLAB and S...MIbrar4
Β 
Performance Benchmarking of the R Programming Environment on the Stampede 1.5...
Performance Benchmarking of the R Programming Environment on the Stampede 1.5...Performance Benchmarking of the R Programming Environment on the Stampede 1.5...
Performance Benchmarking of the R Programming Environment on the Stampede 1.5...James McCombs
Β 
Analysis of algorithms
Analysis of algorithmsAnalysis of algorithms
Analysis of algorithmsiqbalphy1
Β 
Histograms in 12c era
Histograms in 12c eraHistograms in 12c era
Histograms in 12c eraMauro Pagano
Β 

Similar to A framework for nonlinear model predictive control (20)

Optimica Compiler Toolkit - Overview
Optimica Compiler Toolkit - OverviewOptimica Compiler Toolkit - Overview
Optimica Compiler Toolkit - Overview
Β 
Dueling network architectures for deep reinforcement learning
Dueling network architectures for deep reinforcement learningDueling network architectures for deep reinforcement learning
Dueling network architectures for deep reinforcement learning
Β 
Java Micro-Benchmarking
Java Micro-BenchmarkingJava Micro-Benchmarking
Java Micro-Benchmarking
Β 
Start MPC
Start MPC Start MPC
Start MPC
Β 
Predicting Optimal Parallelism for Data Analytics
Predicting Optimal Parallelism for Data AnalyticsPredicting Optimal Parallelism for Data Analytics
Predicting Optimal Parallelism for Data Analytics
Β 
Automated and Scalable Solutions for Software Testing: The Essential Role of ...
Automated and Scalable Solutions for Software Testing: The Essential Role of ...Automated and Scalable Solutions for Software Testing: The Essential Role of ...
Automated and Scalable Solutions for Software Testing: The Essential Role of ...
Β 
SC_Thesis_2016
SC_Thesis_2016SC_Thesis_2016
SC_Thesis_2016
Β 
Industrial plant optimization in reduced dimensional spaces
Industrial plant optimization in reduced dimensional spacesIndustrial plant optimization in reduced dimensional spaces
Industrial plant optimization in reduced dimensional spaces
Β 
Magma trcak b
Magma  trcak bMagma  trcak b
Magma trcak b
Β 
Development of calibrated operational models of existing buildings for real-t...
Development of calibrated operational models of existing buildings for real-t...Development of calibrated operational models of existing buildings for real-t...
Development of calibrated operational models of existing buildings for real-t...
Β 
Development of Calibrated Operational Models for Real-Time Decision Support a...
Development of Calibrated Operational Models for Real-Time Decision Support a...Development of Calibrated Operational Models for Real-Time Decision Support a...
Development of Calibrated Operational Models for Real-Time Decision Support a...
Β 
Scott Clark, Co-Founder and CEO, SigOpt at MLconf SF 2016
Scott Clark, Co-Founder and CEO, SigOpt at MLconf SF 2016Scott Clark, Co-Founder and CEO, SigOpt at MLconf SF 2016
Scott Clark, Co-Founder and CEO, SigOpt at MLconf SF 2016
Β 
MLConf 2016 SigOpt Talk by Scott Clark
MLConf 2016 SigOpt Talk by Scott ClarkMLConf 2016 SigOpt Talk by Scott Clark
MLConf 2016 SigOpt Talk by Scott Clark
Β 
Complete (2)
Complete (2)Complete (2)
Complete (2)
Β 
Selaidechou
SelaidechouSelaidechou
Selaidechou
Β 
Analysis and Design of PID controller with control parameters in MATLAB and S...
Analysis and Design of PID controller with control parameters in MATLAB and S...Analysis and Design of PID controller with control parameters in MATLAB and S...
Analysis and Design of PID controller with control parameters in MATLAB and S...
Β 
Performance Benchmarking of the R Programming Environment on the Stampede 1.5...
Performance Benchmarking of the R Programming Environment on the Stampede 1.5...Performance Benchmarking of the R Programming Environment on the Stampede 1.5...
Performance Benchmarking of the R Programming Environment on the Stampede 1.5...
Β 
Analysis of algorithms
Analysis of algorithmsAnalysis of algorithms
Analysis of algorithms
Β 
1578385.ppt
1578385.ppt1578385.ppt
1578385.ppt
Β 
Histograms in 12c era
Histograms in 12c eraHistograms in 12c era
Histograms in 12c era
Β 

More from Modelon

Vehicle Dynamics Library - Overview
Vehicle Dynamics Library - OverviewVehicle Dynamics Library - Overview
Vehicle Dynamics Library - OverviewModelon
Β 
Vapor Cycle Library - Overview
Vapor Cycle Library - OverviewVapor Cycle Library - Overview
Vapor Cycle Library - OverviewModelon
Β 
Thermal Power Library - Overview
Thermal Power Library - OverviewThermal Power Library - Overview
Thermal Power Library - OverviewModelon
Β 
Pneumatics Library - Overview
Pneumatics Library - OverviewPneumatics Library - Overview
Pneumatics Library - OverviewModelon
Β 
Liquid Cooling Library - Overview
Liquid Cooling Library - OverviewLiquid Cooling Library - Overview
Liquid Cooling Library - OverviewModelon
Β 
Jet Propulsion Library - Overview
Jet Propulsion Library - OverviewJet Propulsion Library - Overview
Jet Propulsion Library - OverviewModelon
Β 
Heat Exchanger Library - Overview
Heat Exchanger Library - OverviewHeat Exchanger Library - Overview
Heat Exchanger Library - OverviewModelon
Β 
Hydro Power Library - Overview
Hydro Power Library - OverviewHydro Power Library - Overview
Hydro Power Library - OverviewModelon
Β 
Hydraulics Library - Overview
Hydraulics Library - OverviewHydraulics Library - Overview
Hydraulics Library - OverviewModelon
Β 
Fuel System Library Overview
Fuel System Library OverviewFuel System Library Overview
Fuel System Library OverviewModelon
Β 
Fuel Cell Library - Overview
Fuel Cell Library - OverviewFuel Cell Library - Overview
Fuel Cell Library - OverviewModelon
Β 
Electric Power Library - Overview
Electric Power Library - OverviewElectric Power Library - Overview
Electric Power Library - OverviewModelon
Β 
Electrification Library - Overview
Electrification Library - OverviewElectrification Library - Overview
Electrification Library - OverviewModelon
Β 
Engine Dynamics Library - Overview
Engine Dynamics Library - OverviewEngine Dynamics Library - Overview
Engine Dynamics Library - OverviewModelon
Β 
Environmental Control Library - Overview
Environmental Control Library - OverviewEnvironmental Control Library - Overview
Environmental Control Library - OverviewModelon
Β 
Aircraft Dynamics Library - Overview
Aircraft Dynamics Library - OverviewAircraft Dynamics Library - Overview
Aircraft Dynamics Library - OverviewModelon
Β 
Air Conditioning Library - Overview
Air Conditioning Library - OverviewAir Conditioning Library - Overview
Air Conditioning Library - OverviewModelon
Β 
Fuel System Library - Overview
Fuel System Library - OverviewFuel System Library - Overview
Fuel System Library - OverviewModelon
Β 
FMI Composer Overview
FMI Composer OverviewFMI Composer Overview
FMI Composer OverviewModelon
Β 
Model Testing Toolkit - Overview
Model Testing Toolkit - OverviewModel Testing Toolkit - Overview
Model Testing Toolkit - OverviewModelon
Β 

More from Modelon (20)

Vehicle Dynamics Library - Overview
Vehicle Dynamics Library - OverviewVehicle Dynamics Library - Overview
Vehicle Dynamics Library - Overview
Β 
Vapor Cycle Library - Overview
Vapor Cycle Library - OverviewVapor Cycle Library - Overview
Vapor Cycle Library - Overview
Β 
Thermal Power Library - Overview
Thermal Power Library - OverviewThermal Power Library - Overview
Thermal Power Library - Overview
Β 
Pneumatics Library - Overview
Pneumatics Library - OverviewPneumatics Library - Overview
Pneumatics Library - Overview
Β 
Liquid Cooling Library - Overview
Liquid Cooling Library - OverviewLiquid Cooling Library - Overview
Liquid Cooling Library - Overview
Β 
Jet Propulsion Library - Overview
Jet Propulsion Library - OverviewJet Propulsion Library - Overview
Jet Propulsion Library - Overview
Β 
Heat Exchanger Library - Overview
Heat Exchanger Library - OverviewHeat Exchanger Library - Overview
Heat Exchanger Library - Overview
Β 
Hydro Power Library - Overview
Hydro Power Library - OverviewHydro Power Library - Overview
Hydro Power Library - Overview
Β 
Hydraulics Library - Overview
Hydraulics Library - OverviewHydraulics Library - Overview
Hydraulics Library - Overview
Β 
Fuel System Library Overview
Fuel System Library OverviewFuel System Library Overview
Fuel System Library Overview
Β 
Fuel Cell Library - Overview
Fuel Cell Library - OverviewFuel Cell Library - Overview
Fuel Cell Library - Overview
Β 
Electric Power Library - Overview
Electric Power Library - OverviewElectric Power Library - Overview
Electric Power Library - Overview
Β 
Electrification Library - Overview
Electrification Library - OverviewElectrification Library - Overview
Electrification Library - Overview
Β 
Engine Dynamics Library - Overview
Engine Dynamics Library - OverviewEngine Dynamics Library - Overview
Engine Dynamics Library - Overview
Β 
Environmental Control Library - Overview
Environmental Control Library - OverviewEnvironmental Control Library - Overview
Environmental Control Library - Overview
Β 
Aircraft Dynamics Library - Overview
Aircraft Dynamics Library - OverviewAircraft Dynamics Library - Overview
Aircraft Dynamics Library - Overview
Β 
Air Conditioning Library - Overview
Air Conditioning Library - OverviewAir Conditioning Library - Overview
Air Conditioning Library - Overview
Β 
Fuel System Library - Overview
Fuel System Library - OverviewFuel System Library - Overview
Fuel System Library - Overview
Β 
FMI Composer Overview
FMI Composer OverviewFMI Composer Overview
FMI Composer Overview
Β 
Model Testing Toolkit - Overview
Model Testing Toolkit - OverviewModel Testing Toolkit - Overview
Model Testing Toolkit - Overview
Β 

Recently uploaded

Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsHyundai Motor Group
Β 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
Β 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
Β 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
Β 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
Β 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
Β 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
Β 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
Β 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
Β 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
Β 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAndikSusilo4
Β 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
Β 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
Β 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
Β 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
Β 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
Β 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
Β 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
Β 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
Β 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
Β 

Recently uploaded (20)

Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Β 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
Β 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Β 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
Β 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
Β 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Β 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
Β 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Β 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Β 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
Β 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
Β 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
Β 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
Β 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
Β 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Β 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
Β 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
Β 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
Β 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Β 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
Β 

A framework for nonlinear model predictive control

  • 1. π‘€π‘Žπ‘”π‘‘π‘Žπ‘™π‘’π‘›π‘Ž 𝐴π‘₯π‘’π‘™π‘ π‘ π‘œπ‘›1 , πΉπ‘Ÿπ‘’π‘‘π‘Ÿπ‘–π‘˜ π‘€π‘Žπ‘”π‘›π‘’π‘ π‘ π‘œπ‘›2 , π‘‡π‘œπ‘–π‘£π‘œ π»π‘’π‘›π‘›π‘–π‘›π‘”π‘ π‘ π‘œπ‘›1 A FRAMEWORK FOR NONLINEAR MODEL PREDICTIVE CONTROL IN JMODELICA.ORG 11. π‘€π‘œπ‘‘π‘’π‘™π‘œπ‘›, 𝐿𝑒𝑛𝑑, 𝑆𝑀𝑒𝑑𝑒𝑛 2. π·π‘’π‘π‘Žπ‘Ÿπ‘‘π‘šπ‘’π‘›π‘‘ π‘œπ‘“ π΄π‘’π‘‘π‘œπ‘šπ‘Žπ‘‘π‘–π‘ πΆπ‘œπ‘›π‘‘π‘Ÿπ‘œπ‘™, 𝐿𝑒𝑛𝑑 π‘ˆπ‘›π‘–π‘£π‘’π‘Ÿπ‘ π‘–π‘‘π‘¦, 𝑆𝑀𝑒𝑑𝑒𝑛
  • 2. β€’ Background  Model Predictive Control Optimal control problem Example  JModelica.org Reason for new framework Optimica Discretization β€’ Comparison between frameworks  Theory  Benchmark β€’ Features β€’ Conclusions and further work OVERVIEW
  • 3. β€’ Optimization-based control strategy β€’ Repeated on-line solution of an open-loop Optimal Control Problem (OCP) β€’ Feedback by measuring the state prior to each optimization β€’ Main advantages  Easily extends to multivariable processes  Instrinscally handles constraints β€’ Main limitations  Computationally demanding  Solution not guaranteed MODEL PREDICTIVE CONTROL
  • 4. β€’ Objective function min π‘₯,𝑦,𝑒,𝑀 𝑑0 𝑑 𝑓 𝑀𝑠𝑒𝑑 βˆ’ 𝑀 𝑇 𝑄 𝑀𝑠𝑒𝑑 βˆ’ 𝑀 𝑑𝑑 𝑀 = (π‘₯ π‘π‘œπ‘›π‘‘π‘Ÿπ‘œπ‘™π‘™π‘’π‘‘, π‘¦π‘π‘œπ‘›π‘‘π‘Ÿπ‘œπ‘™π‘™π‘’π‘‘, 𝑒 π‘π‘œπ‘›π‘‘π‘Ÿπ‘œπ‘™π‘™π‘’π‘‘) 𝑠. 𝑑. β€’ Model 𝐹 π‘₯ 𝑑 , π‘₯ 𝑑 , 𝑦 𝑑 , 𝑒 𝑑 = 0 β€’ Initial condition π‘₯ 𝑑0 = π‘₯0 π‘₯ 𝐿 ≀ π‘₯ 𝑑 ≀ π‘₯ π‘ˆ β€’ Constraints 𝑔 π‘₯ 𝑑 , π‘₯ 𝑑 , 𝑦 𝑑 , 𝑒 𝑑 ≀ 0 βˆ€π‘‘ ∈ [𝑑0, 𝑑𝑓] OPTIMAL CONTROL PROBLEM
  • 5. MODEL PREDICTIVE CONTROL Sample period = 10s At each sample point β€’ Measure state β€’ Optimize β€’ Apply first input
  • 6. Open-source platform for simulation and optimization of Modelica models Optimization problem formulated in Optimica  Extension of the Modelica language which enables formulation of objective functions and constraints β€’ JModelica.org has a framework for optimization -> Open-Loop framework β€’ Main goals of MPC framework  Decrease the total computation time for each optimization Utilize the fact that the structure of the discretized OCP does not change between optimizations  Make JModelica.org easier to use for MPC schemes Streamline the setup Provide relevant features JMODELICA.ORG
  • 7. optimization CSTR_opt(objectiveIntegrand=(c_ref-cstr.c)^2 + (T_ref-cstr.T)^2 + (Tc_ref-cstr.Tc)^2, startTime=0.0, finalTime=150) CSTR cstr(T(max=350)); input Real u(start = 350,min=230,max=370)=cstr.Tc; parameter Real c_ref = 500; parameter Real T_ref = 320; parameter Real Tc_ref = 300; constraint cstr.c <= 1000; end CSTR_opt; OPTIMICA CODE
  • 8. β€’ JModelica.org uses direct collocation to transcribe the OCP to a NonLinear Program (NLP)  Optimization problem is considered at a number of collocation points 𝑑 = {𝑑 𝑐1, 𝑑 𝑐2, … , 𝑑 𝑐𝑛}, rather than βˆ€π‘‘ ∈ 𝑑0, 𝑑𝑓 β€’ Underlying NLP solver is IPOPT  Solution not guaranteed  Important with good initial guess DISCRETIZATION
  • 9. OL framework β€’ Pre-processing  OCP transcribed to NLP  Initial guess extracted  Scaling  Solver object created β€’ Solution  NLP sent to solver β€’ Post-processing  Result is processed  Result object created and returned COMPARISON BETWEEN FRAMEWORKS MPC framework β€’ Initialization – Only done once  OCP transcribed to NLP  Initial guess extracted  Scaling  Solver object created β€’ Pre-processing  Initial condition updated  Initial guess updated  Prediction horizon shifted β€’ Solution  NLP sent to solver (warm started) β€’ Post-processing  Result is processed  First input in optimal control sequence returned
  • 10. β€’ Developed by F. Casella β€’ Objective  𝑝𝑠𝑒𝑑 = 8.35 π‘€π‘ƒπ‘Ž  π‘™π‘œπ‘Žπ‘‘ 𝑠𝑒𝑑 = 1 𝑑0 𝑑 𝑓 8.35 βˆ’ 𝑝 2 + 1 βˆ’ π‘™π‘œπ‘Žπ‘‘ 2 𝑑𝑑 β€’ Constraints  𝜎 ≀ 260 π‘€π‘ƒπ‘Ž  0 ≀ 𝑒 ≀ 1  0 ≀ 𝑒 ≀ 0.1 60 BENCHMARK MODEL Combined-Cycle Power Plant (CCPP)
  • 12. β€’ Soften constraints  OCP may become infeasible if hard constraints are applied π‘₯0 > π‘₯ π‘ˆ, π‘₯ 𝑑0 = π‘₯0, π‘₯ 𝑑 ≀ π‘₯ π‘ˆ  Hard constraints need to be softened β€’ Initial guess  MPC framework automatically uses the solution to one optimization as the initial guess for the next β€’ Unsuccessful optimization  If an optimization is unsuccessful the MPC framework returns the second input in the last sucessful optimization FEATURES + πœ€(𝑑)
  • 13. β€’ We obtain the same solution using the MPC framework as using the OL framework β€’ The MPC framework is significantly faster than the OL framework  CCPP: π‘‡π‘‘π‘œπ‘‘ β‰ˆ βˆ’70%  Mainly due to time-consuming discretization only done once β€’ The MPC framework handles a lot of things internally, making scripting easier CONCLUSIONS
  • 14. β€’ Some optimization options are incompatible with the MPC framework β€’ More functionality  Different ways of softening variable bounds and constraints  Shifting of dual variables  Method to obtain the value of the objective function FURTHER WORK