Top Banner
Multiple Input, Multiple Output II: Model Predictive Control By Peter Woolf ([email protected]) University of Michigan Michigan Chemical Process Dynamics and Controls Open Textbook version 1.0 Creative commons
19

Multiple Input, Multiple Output II: Model Predictive Control By Peter Woolf ([email protected]) University of Michigan Michigan Chemical Process Dynamics.

Dec 22, 2015

Download

Documents

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Multiple Input, Multiple Output II: Model Predictive Control By Peter Woolf (pwoolf@umich.edu) University of Michigan Michigan Chemical Process Dynamics.

Multiple Input, Multiple Output II:Model Predictive Control

By Peter Woolf ([email protected])University of Michigan

Michigan Chemical Process Dynamics and Controls Open Textbook

version 1.0

Creative commons

Page 2: Multiple Input, Multiple Output II: Model Predictive Control By Peter Woolf (pwoolf@umich.edu) University of Michigan Michigan Chemical Process Dynamics.

P&ID

dV

dt= Fin − Fout

dT

dt=FinVTf −T( ) +

Q

ρc pV

Model

Goal: Control both LC1 and TC1 using Q and v1.

v1 strongly influences LC1, but also influences TC1Q strongly influences TC1, but depends on LC1 (volume)

Possible solutions:

(1) Decouple system and connect LC1 to v1 and TC1 to Q--> 2 PID controllers

Problem: controllers may fight as their objectives are not compatible.

(2) Develop a more sophisticated MIMO controller

Page 3: Multiple Input, Multiple Output II: Model Predictive Control By Peter Woolf (pwoolf@umich.edu) University of Michigan Michigan Chemical Process Dynamics.

MPC Philosophy:

Past: Use past data to create an accurate modelFuture: Use the model to predict the impact of future control eventsPresent: do the control action that is expected to yield the best long term outcome

Image from http://controls.engin.umich.edu/wiki/index.php/MPC

Page 4: Multiple Input, Multiple Output II: Model Predictive Control By Peter Woolf (pwoolf@umich.edu) University of Michigan Michigan Chemical Process Dynamics.

Chess Example for MPCWhite: operatorBlack: systemOperator’s move

Images and example from http://www.chessproblems.com/

Page 5: Multiple Input, Multiple Output II: Model Predictive Control By Peter Woolf (pwoolf@umich.edu) University of Michigan Michigan Chemical Process Dynamics.

Images and example from http://www.chessproblems.com/

Path 1:System takes operator’s queen w/ rook

Path 2:System takes operator’s queen w/ bishop

Page 6: Multiple Input, Multiple Output II: Model Predictive Control By Peter Woolf (pwoolf@umich.edu) University of Michigan Michigan Chemical Process Dynamics.

Images and example from http://www.chessproblems.com/

Path 1: System takes operator’s queen w/ rook

Operator moves knight

System moves rook to protect pawn

Operator moves knight and checkmate

Page 7: Multiple Input, Multiple Output II: Model Predictive Control By Peter Woolf (pwoolf@umich.edu) University of Michigan Michigan Chemical Process Dynamics.

Images and example from http://www.chessproblems.com/

Path 2:System takes operator’s queen w/ bishop

Operator moves bishop

System moves bishop to attack operator

Operator moves bishop and checkmate

Page 8: Multiple Input, Multiple Output II: Model Predictive Control By Peter Woolf (pwoolf@umich.edu) University of Michigan Michigan Chemical Process Dynamics.

Images and example from http://www.chessproblems.com/

Operator wins in both cases by sacrificing queen

Path 2

Path 1

Page 9: Multiple Input, Multiple Output II: Model Predictive Control By Peter Woolf (pwoolf@umich.edu) University of Michigan Michigan Chemical Process Dynamics.

Images and example from http://www.chessproblems.com/

Tree view: each column represents a move

Observations:• Sometimes a short term sacrifice yields a long term benefit (sacrifice queen to win the game)

• Avoid “win the battle, loose the war”

Page 10: Multiple Input, Multiple Output II: Model Predictive Control By Peter Woolf (pwoolf@umich.edu) University of Michigan Michigan Chemical Process Dynamics.

A more complex example

There are many paths, but some are shorter than others.

Page 11: Multiple Input, Multiple Output II: Model Predictive Control By Peter Woolf (pwoolf@umich.edu) University of Michigan Michigan Chemical Process Dynamics.

A controls exampleGoal: set yield to 2.5 g/L & minimize energy use

V1(open), v2(closed), v3(closed), v4(open)Yield=1.5 g, energy=250 W

Path 1:Increase yield and decrease energy

V1(open), v2(closed), v3(open), v4(open)Yield=1.5 g, energy=300 W

Path 2:maintain yield and increase energy

V1(open), v2(closed), v3(open), v4(closed)Yield=2.5 g, energy=50 W

Low energy, high productivity steady state

V1(open), v2(open), v3(open), v4(open)Yield=2.3 g, energy=250 W

V1(open), v2(open), v3(closed), v4(open)Yield=2.5 g, energy=230 W

higher energy, lower productivity steady state

Page 12: Multiple Input, Multiple Output II: Model Predictive Control By Peter Woolf (pwoolf@umich.edu) University of Michigan Michigan Chemical Process Dynamics.

Simple controllers will optimize based on “the next move” alone, thus will not go through less desirable states to get a larger return.

Can we learn from chess how to control our system better?

Need: (1)Rules and constraints of the game(2)Objective(3)Ability to “look ahead” to see the next best action

Model Predictive Control

Page 13: Multiple Input, Multiple Output II: Model Predictive Control By Peter Woolf (pwoolf@umich.edu) University of Michigan Michigan Chemical Process Dynamics.

MPC procedure

t=1 open open t=2 closed open t=3 open open t=4 closed closed

Page 14: Multiple Input, Multiple Output II: Model Predictive Control By Peter Woolf (pwoolf@umich.edu) University of Michigan Michigan Chemical Process Dynamics.

How do we search possible future actions?

Search by optimization of some objective function

Min[ Sum[ (predicted-desired)^2] ]

Can add constraints such as:(1)Heaters and valves with finite, positive

range(2)Actuators with finite states (open/closed

or high/medium/low)(3)Cost, energy, or expense limitsMuch of this can be done with Excel’s Solver function..

see class20.example.xls

Page 15: Multiple Input, Multiple Output II: Model Predictive Control By Peter Woolf (pwoolf@umich.edu) University of Michigan Michigan Chemical Process Dynamics.

Notes for Excel Solver and Integer Optimization

Key: Set up problem such that binary or integer values have a continuous interpretation

=IF($A$1=1,10,0) No -- solver will try values of 1.1 in an intermediate calculation and not find an appropriate value=IF($A$1>=1,10,0)

=$A$1*10Yes -- solver will try values of 1.1 to establish a gradient, and then constrain to binary or integer at the end

Page 16: Multiple Input, Multiple Output II: Model Predictive Control By Peter Woolf (pwoolf@umich.edu) University of Michigan Michigan Chemical Process Dynamics.

Alternate Models for MPCNeural Networks: Flexible

empirical model to fit time varying data to a model

Advantages: Model learned directly from data

Disadvantages: Only accurate in the domain in which the network was trained.

Figure from http://controls.engin.umich.edu/wiki/index.php/NN

Page 17: Multiple Input, Multiple Output II: Model Predictive Control By Peter Woolf (pwoolf@umich.edu) University of Michigan Michigan Chemical Process Dynamics.

Downsides of MPC• As implemented, the controller will

anticipate set point changes, which may not be desirable

• A grossly inaccurate model will yield poor control decisions (although the method is surprisingly robust)

• Predictions can be computationally demanding so requires fast computers and fast code to do in real time

Page 18: Multiple Input, Multiple Output II: Model Predictive Control By Peter Woolf (pwoolf@umich.edu) University of Michigan Michigan Chemical Process Dynamics.

Advantages of MPC• Incorporates in knowledge of the

system in making decisions• Realistic implementation of known

constraints• Anticipates longer term consequences

of controller actions• Simplifies or in some cases eliminates

controller design, instead replacing it with system modeling

Page 19: Multiple Input, Multiple Output II: Model Predictive Control By Peter Woolf (pwoolf@umich.edu) University of Michigan Michigan Chemical Process Dynamics.

Take Home Messages

• In some cases, simpler control architectures lead to short term gains and long term losses

• MPC is an increasingly popular and powerful method for control of complex chemical processes

• MPC models can be ODEs, neural networks, or other kinds of models