model predictive control

  • View
    76

  • Download
    7

Embed Size (px)

DESCRIPTION

model predictive control tutorial

Text of model predictive control

ME290J ModelPredictiveControl M d l P di ti C t lforLinearandHybridSystems

FrancescoBorrelliSpring2011 DepartmentofMechanicalEngineering Department of Mechanical Engineering UniversityofCalifornia Berkeley,USA

Instruction I t t Instructor: FrancescoBorrelli,Room5139EH,6433871, F B lli R 5139 EH 643 3871 fborrelli@berkeley.edu OfficeHours:TuandTh3.304.30 None mightchange. TuTh23.30Room81,EvansHall Slidesdistributedbefore(sometimeafter)theclass Slides distributed before (sometime after) the class bSpace

TeachingAssistant: Lectures: Class Notes: ClassNotes: ClassWebSite:

Matlab Matlabrunningthecomputersin2109EtcheverryHall C dk Cardkeyaccessrequired i d I will submit class list to so that everyone in the class has Iwillsubmitclasslisttosothateveryoneintheclasshas accesstothatroom PleaseenrollintheclassASAP Need additionaltoolbox/SoftwaredistributedthroughbSpace

Grading 20%Homework 50%FinalProject 30%OralorFinalTest

ME290JOverview ME290J Overview

ModelPredictiveControlpast futurePredicted outputs Manipulated u(t+k) Inputs t t+1 t+m t+p

t+1 t+2

t+1+m

t+1+p

Optimizeattimet (newmeasurements) Onlyapplythefirstoptimalmoveu(t) Repeat the whole optimization at time t +1 Repeatthewholeoptimizationattimet+1 Optimizationusingcurrentmeasurements Feedback

MPCAlgorithm

Attimet: Measure (or estimate) the current state x(t) Measure(orestimate)thecurrentstatex(t) FindtheoptimalinputsequenceU* ={u*t ,u*t+1,u*t+2,, u*t+N1} Applyonlyu(t)=u*t ,anddiscardu*t+1,u*t+2, l l () dd d Repeatthesameprocedureattimet+1 Multivariable,ModelBased Nonlinear,ConstraintsSatisfaction,Prediction

ImportantIssuesin ModelPredictiveControl Model Predictive ControlEvenassumingperfectmodel,nodisturbances: predictedopenlooptrajectories di d l j i closedlooptrajectories Feasibility Optimizationproblemmaybecomeinfeasibleatsomefuturetimestep. Stability Closedloopstabilityisnotguaranteed. Performance f Goal: Whatisachievedbyrepeatedlyminimizing Wh t i hi d b t dl i i i i RealTimeImplementation

FeasibilityIssues

Infeasible

Terminalregion t+3 t+2 t+1 t

StabilityIssues

Terminal region t+3 t+2 t+1 t

FeasibilityandStabilityConstraints

ModifiedProblem Modified Problem(LargeBodyofLiterature)

Xf (Robust)InvariantSet p(x)ControlLyapunovFunction

RealTimeImplementation

SummarizingNeed: Adiscretetimemodelofthesystem (Matlab,Simulink) Astateobserver Set up an Optimization Problem SetupanOptimizationProblem (Matlab,MPTtoolbox/Yalmip) Solve an optimization problem Solveanoptimizationproblem (Matlab/OptimizationToolbox,NPSOL,NAG,Cplex) Verifythattheclosedloopsystemperformsasdesired(avoid infeasibility/stability) Makesureitrunsinrealtimeandcode/downloadforthe embeddedplatform embedded platform

ClassTopics(Subjecttochanges)

Week1:IntroductionandFundamentalsofOptimization Week2/3:FundamentalsofOptimization. Week4:MultiparametricProgramming. Week 4: Multiparametric Programming Week5.ConvexandMixedIntegerMultiparametricProgramming Week6:ReviewofOptimalControlTheoryandDynamicProgramming Week7:InvariantSetTheory Week8/9:ConstrainedOptimalControlforLinearSystems Week10:PredictiveControl:Fundamentals Week 10: Predictive Control: Fundamentals Week11:PredictiveControl:StabilityandFeasibilityTheory Week12/13:Hybridsystems Week14:PredictiveControlforHybridSystems. Week15/16:Applications/CaseStudies

ClassGoals PredictiveControlTheory DesignandImplementanMPCControllerinMatlab ComputationalOrientedModelsofHybridSystems

InitialRemarks MPC N MPCName ContinuousTimeversusDiscreteTime MPCinPractice Difficulty:Thetheoreticalsideandthecomputationside TwosimpleexamplesModelsandSimulations Nontrivialexamples Non trivial examples WhatIdliketoadd:Distributed,Robust,Probabilistic,SoftConstraints i ib d b b bili i S f C i

Anypreferenceforexamples?

InitialRemarks MPC N MPCName ContinuousTimeversusDiscreteTime MPCinPractice Difficulty:Thetheoreticalsideandthecomputationside TwosimpleexamplesModelsandSimulations Nontrivialexamples Non trivial examples WhatIdliketoadd:Distributed,Robust,Probabilistic,Soft Constraints Distributed Robust Probabilistic SoftConstraints

Anypreferenceforexamples?

WhyNotContinuousTime Optimization?

Choice of this course Choiceofthiscourse Issuesarethesame S Soonorlaterneedtodiscretize l t d t di ti Softwareexists(Example:http://tomdyn.com/)

InitialRemarks MPC N MPCName ContinuousTimeversusDiscreteTime MPCinPractice Difficulty:Thetheoreticalsideandthecomputationside TwosimpleexamplesModelsandSimulations Nontrivialexamples Non trivial examples WhatIdliketoadd:Distributed,Robust,Probabilistic, SoftConstraints Anypreferenceforexamples?

MPCinPracticeS SecondMostUsedControlMethodologyafterPID d M t U d C t l M th d l ft PIDQin,S.J.andT.A.Bagdwell (2003).A y p surveyofmodelpredictivecontrol tecnology.ControlEngineeringPractice 11,733764

PersistentControlCommunityInterest(seeACC,CDC proceeding)

InitialRemarks MPC N MPCName ContinuousTimeversusDiscreteTime MPCinPractice Difficulty:Thetheoreticalsideandthecomputationside TwosimpleexamplesModelsandSimulations Nontrivialexamples Non trivial examples WhatIdliketoadd:Distributed,Robust,Probabilistic, SoftConstraints Anypreferenceforexamples?

InitialRemarks MPC N MPCName ContinuousTimeversusDiscreteTime MPCinPractice Difficulty:Thetheoreticalsideandthecomputationside Twosimpleexamples ModelsandSimulations Nontrivialexamples Non trivial examples WhatIdliketoadd:Distributed,Robust,Probabilistic, SoftConstraints Anypreferenceforexamples?

Example1 AudiSmartEngine Audi Audi SmartEngineVehicle

Desired Speed

ACCActual Speed

DesignandMPCControllerregulatingthedesiredspeed(through anAutomaticCruiseControl)inordertoreachthedestinationin an Automatic Cruise Control) in order to reach the destination in themostfuelefficientway Prediction:MaxandMinSpeedoftraffic,Grade Constraints:MaxandMinSpeed(oftrafficandofvehicle)

Example1 DatafromPeMS Datafrom Data from PeMS California Freeway Performance CaliforniaFreewayPerformance MeasurementSystem CollectsrealtimedataonCA freewaysvialoopdetectors y p Abletocommunicateaveragetraffic speedatlooplocationevery5 minutes Loopstypicallypositionedevery0.33 miles

Example2 Ball and Plate Experiment BallandPlateExperiment BallandPlateExperimenty

x'

'

Specification of Experiment: Angle: -17 +17 , Plate:-30 cm+30 cm Input Voltage: -10 V +10 V Computer: PENTIUM166 C t Sampling Time: 30 ms

Example 2 Ball and Plate Experiment

InitialRemarks MPC N MPCName ContinuousTimeversusDiscreteTime MPCinPractice Difficulty:Thetheoreticalsideandthecomputationside TwosimpleexamplesModelsandSimulations Nontrivialexamples Non trivial examples WhatIdliketoadd:Distributed,Robust,Probabilistic, SoftConstraints Anypreferenceforexamples?

CatalyticCrackerOpenFolder ld

PredictiveControlinNeuroScience PredictiveControlinNeuroScience 16:05

OpenFolder p

InitialRemarks MPC N MPCName ContinuousTimeversusDiscreteTime MPCinPractice Difficulty:Thetheoreticalsideandthecomputationside TwosimpleexamplesModelsandSimulations Nontrivialexamples Non trivial examples WhatIdliketoadd: Distributed,Robust,Probabilistic,SoftConstraints Distributed Robust Probabilistic Soft Constraints Anypreferenceforexamples?

InitialRemarks MPC N MPCName ContinuousTimeversusDiscreteTime MPCinPractice Difficulty:Thetheoreticalsideandthecomputationside TwosimpleexamplesModelsandSimulations Nontrivialexamples Non trivial examples WhatIdliketoadd: Distributed,Robust,Probabilistic,SoftConstraints Distributed Robust Probabilistic Soft Constraints Anypreferenceforexamples?