MVC and MPC - University of Oxford · MVC and MPC K. J. Åström Department of Automatic Control,...

46
MVC and MPC K. J. Åström Department of Automatic Control, Lund University K. J. Åström MVC and MPC

Transcript of MVC and MPC - University of Oxford · MVC and MPC K. J. Åström Department of Automatic Control,...

Page 1: MVC and MPC - University of Oxford · MVC and MPC K. J. Åström Department of Automatic Control, Lund University K. J. Åström MVC and MPC. Congratulations to a Stellar Career!

MVC and MPC

K. J. Åström

Department of Automatic Control, Lund University

K. J. Åström MVC and MPC

Page 2: MVC and MPC - University of Oxford · MVC and MPC K. J. Åström Department of Automatic Control, Lund University K. J. Åström MVC and MPC. Congratulations to a Stellar Career!

Congratulations to a Stellar Career!

Points of tangency

,IFAC Teddington 1964IFAC Prague 1967 First Identification SymposiumGeneralized predictive control Automatica 1987A memorable semester as Douglas Holder Visiting FellowOxford in 1988Control is much more than algorithm design; diagnostics,fault detection and reconfiguration are also of primesignificance.

K. J. Åström MVC and MPC

Page 3: MVC and MPC - University of Oxford · MVC and MPC K. J. Åström Department of Automatic Control, Lund University K. J. Åström MVC and MPC. Congratulations to a Stellar Career!

Introduction

Minimum Variance Control

Inspired by practice

Åström 1966(IBM J R&D 1967)

Model structure MISO

Explicit disturbancemodeling

Minimize variance

Identification

Self-tuning

Harris index

Model Predictive Control

Inspired by practice

Richalet 1976(Automatica 1978)

Cutler DMC(ACC 1980)

Model structureMIMO-FIR

Reference trajectory

Captures saturation

Widely used in industry

What can we learn?

K. J. Åström MVC and MPC

Page 4: MVC and MPC - University of Oxford · MVC and MPC K. J. Åström Department of Automatic Control, Lund University K. J. Åström MVC and MPC. Congratulations to a Stellar Career!

Outline

Introduction

The IBM-Billerud Project

Modeling

Minimum Variance Control

Adaptation

Reflections

K. J. Åström MVC and MPC

Page 5: MVC and MPC - University of Oxford · MVC and MPC K. J. Åström Department of Automatic Control, Lund University K. J. Åström MVC and MPC. Congratulations to a Stellar Career!

The Scene of 1960

Servomechanism theory 1945

IFAC 1956 (50 year jubilee in 2006)

Widespread education and industrialuse of control

The First IFAC World CongressMoscow 1960Exciting new ideas

Dynamic Programming Bellman 1957Maximum Principle Pontryagin 1961Kalman Filtering ASME 1960

Exciting new developmentThe space race (Sputnik 1957)Computer Control Port Arthur 1959

IBM and Nordic Laboratory 1961

K. J. Åström MVC and MPC

Page 6: MVC and MPC - University of Oxford · MVC and MPC K. J. Åström Department of Automatic Control, Lund University K. J. Åström MVC and MPC. Congratulations to a Stellar Career!

The Role of Computing

Vannevar Bush 1927. Engineering can proceed no fasterthan the mathematical analysis on which it is based.Formal mathematics is frequently inadequate for numerousproblems, a mechanical solution offers the most promise.

Herman Goldstine 1962: When things change by twoorders of magnitude it is revolution not evolution.

Gordon Moore 1965: The number of transistors per squareinch on integrated circuits has doubled approximatelyevery 12 months.

Moore+Goldstine: A revolution every 10 year!

Unfortunately software does keep up with hardware

Roughly 10 years between MVC and MPC

K. J. Åström MVC and MPC

Page 7: MVC and MPC - University of Oxford · MVC and MPC K. J. Åström Department of Automatic Control, Lund University K. J. Åström MVC and MPC. Congratulations to a Stellar Career!

The Billerud-IBM Project

BackgroundIBM and Computer ControlBillerud and Tryggve Bergek

GoalsBillerud: Exploit computer control to improve quality andprofit!IBM: Gain experience in computer control, recover prestigeand find a suitable computer architecture!

ScheduleStart April 1963Computer Installed December 1964System identification and on-line control March 1965Full operation September 196640 many-ears effort in about 3 years

K. J. Åström MVC and MPC

Page 8: MVC and MPC - University of Oxford · MVC and MPC K. J. Åström Department of Automatic Control, Lund University K. J. Åström MVC and MPC. Congratulations to a Stellar Career!

Goals and Tasks

GoalsWhat can be achieved by computer control?Find an architecture of a process control computer!

PhilosophyCram as much as possible into the system!

TasksProduction PlanningProduction SupervisionProcess ControlQuality ControlReporting

Later 1969Millwide control

K. J. Åström MVC and MPC

Page 9: MVC and MPC - University of Oxford · MVC and MPC K. J. Åström Department of Automatic Control, Lund University K. J. Åström MVC and MPC. Congratulations to a Stellar Career!

Computer Resources

IBM 1720 (special version of 1620 decimal architecture)

Core Memory 40k words (decimal digits)

Disk 2 M decimal digits

80 Analog Inputs

22 Pulse Counts

100 Digital Inputs

45 Analog Outputs (Pulse width)

14 Digital Outputs

Fastest sampling rate 3.6 s

One hardware interrupt (special engineering)

Home brew operating system

K. J. Åström MVC and MPC

Page 10: MVC and MPC - University of Oxford · MVC and MPC K. J. Åström Department of Automatic Control, Lund University K. J. Åström MVC and MPC. Congratulations to a Stellar Career!

The Billerud Plant

K. J. Åström MVC and MPC

Page 11: MVC and MPC - University of Oxford · MVC and MPC K. J. Åström Department of Automatic Control, Lund University K. J. Åström MVC and MPC. Congratulations to a Stellar Career!

Summary

Industrial

A successful installationComputer achitecture for process control

IBM 1800, IBM 360

Methodology

Method for identification of stochastic models

Basic theory, consistency, efficiency, persistent excitation

Minimum variance control

What we misssed

Project was well documented in IBM reports and a fewpapers but we should have written a book

K. J. Åström MVC and MPC

Page 12: MVC and MPC - University of Oxford · MVC and MPC K. J. Åström Department of Automatic Control, Lund University K. J. Åström MVC and MPC. Congratulations to a Stellar Career!

Outline

Introduction

The IBM-Billerud Project

Modeling

Minimum Variance Control

Adaptation

Reflections

K. J. Åström MVC and MPC

Page 13: MVC and MPC - University of Oxford · MVC and MPC K. J. Åström Department of Automatic Control, Lund University K. J. Åström MVC and MPC. Congratulations to a Stellar Career!

Process Modeling

Process understanding and modifications (mixing tanks)

Physical modeling

Logging difficulties

Drastic change in attitude when computer was installedGood support from management Kai Kinberg:

“This is a show-case project! Don’t hesitate to dosomething new if you believe that you can pull it off andfinish it on time.”

The beginning of system identification

Wasted a lot of time on historical data

Big struggle to do real plant experiments

Identifications requires a great range of skills

K. J. Åström MVC and MPC

Page 14: MVC and MPC - University of Oxford · MVC and MPC K. J. Åström Department of Automatic Control, Lund University K. J. Åström MVC and MPC. Congratulations to a Stellar Career!

Basis Weight and Moisture Control

Two important loops

Triangular coupling MISO works

K. J. Åström MVC and MPC

Page 15: MVC and MPC - University of Oxford · MVC and MPC K. J. Åström Department of Automatic Control, Lund University K. J. Åström MVC and MPC. Congratulations to a Stellar Career!

Modeling for Control

Modeling by frequency response key for success ofclassical control

Stochastic control theory is a natural formulation ofindustrial regulation problems

State space models for process dynamics anddisturbances

Physical models may give dynamics

Process data necessary to model disturbances

Can we find something similar to frequency response forstate space systems?

K. J. Åström MVC and MPC

Page 16: MVC and MPC - University of Oxford · MVC and MPC K. J. Åström Department of Automatic Control, Lund University K. J. Åström MVC and MPC. Congratulations to a Stellar Career!

Typical Fluctuations

First measurement of fluctuations in basis weight 1963

Availability of sensor crucial!A lot of effort to obtain this curve!

K. J. Åström MVC and MPC

Page 17: MVC and MPC - University of Oxford · MVC and MPC K. J. Åström Department of Automatic Control, Lund University K. J. Åström MVC and MPC. Congratulations to a Stellar Career!

Stochastic Control Theory

Kalman filtering, quadratic control, separation theorem

Process model

dx = Axdt+ Budt+ dvdy= Cxdt+ de

Controller

dx̂ = Ax̂ + Bu+ K (dy− Cx̂dt)u = L(xm − x̂) + u f f

A natural approach for regulation of industrial processes.

K. J. Åström MVC and MPC

Page 18: MVC and MPC - University of Oxford · MVC and MPC K. J. Åström Department of Automatic Control, Lund University K. J. Åström MVC and MPC. Congratulations to a Stellar Career!

Model Structures

Process model

dx = Axdt+ Budt+ dvdy= Cxdt+ de

Much redundancy z = Tx + noise model. The innovationrepresentation reduces redundancy of stochastics and filtergains appear explicitely in the model

dx = Axdt+ Budt+ Kdε= (A− KC)xdt+ Budt+ Kdy

dy= Cxdt+ dεCanonical form for MISO system removes remainingredundancy, discretization gives (C filter dynamcis)

A(q−1)y(t) = B(q−1)u(t) + C(q−1)e(t)

K. J. Åström MVC and MPC

Page 19: MVC and MPC - University of Oxford · MVC and MPC K. J. Åström Department of Automatic Control, Lund University K. J. Åström MVC and MPC. Congratulations to a Stellar Career!

Modeling from Data (Identification)

The Likelihood function (Bayes rule)

p(Y t,θ ) = p(y(t)�Y t−1,θ ) = ⋅ ⋅ ⋅ = −12N∑1

ε2(t)σ 2

− N2 log 2πσ 2

θ = (a1, . . . , an, b1, . . . , bn, c1, . . . , cn, ε(1), .., )Ay(t) = Bu(t) + Ce(t) Cε(t) = Ay(t) − Bu(t)

ε = one step ahead prediction errorEfficient computations

�J�ak

=N∑1

ε(t)�ε(t)�akC�ε(t)�ak

= qky(t)

Estimate has nice properties Åström and Bohlin 1965Good match identification and control. Prediction error isminimized in both cases! Cleaned up by Lennart Ljung ...

K. J. Åström MVC and MPC

Page 20: MVC and MPC - University of Oxford · MVC and MPC K. J. Åström Department of Automatic Control, Lund University K. J. Åström MVC and MPC. Congratulations to a Stellar Career!

Practical Issues

Sampling period

To perturb or not to perturb

Open or closed loopexperiments

Model validation

20 min for two-passcompilation of Fortranprogram!

Control design

Skills and experiences

K. J. Åström MVC and MPC

Page 21: MVC and MPC - University of Oxford · MVC and MPC K. J. Åström Department of Automatic Control, Lund University K. J. Åström MVC and MPC. Congratulations to a Stellar Career!

Results

K. J. Åström MVC and MPC

Page 22: MVC and MPC - University of Oxford · MVC and MPC K. J. Åström Department of Automatic Control, Lund University K. J. Åström MVC and MPC. Congratulations to a Stellar Career!

Outline

Introduction

The IBM-Billerud Project

Modeling

Minimum Variance Control

Adaptation

Reflections

K. J. Åström MVC and MPC

Page 23: MVC and MPC - University of Oxford · MVC and MPC K. J. Åström Department of Automatic Control, Lund University K. J. Åström MVC and MPC. Congratulations to a Stellar Career!

Control

Conventional PI(D) at lower level

Simple digital control for non-critical loops

Limited computational capacities

Time delay dynamics stochastic fluctuations domimating

Mild coupling basis weight and moisture control

Minimum variance control and moving average control

Robustness performance trade-offs

K. J. Åström MVC and MPC

Page 24: MVC and MPC - University of Oxford · MVC and MPC K. J. Åström Department of Automatic Control, Lund University K. J. Åström MVC and MPC. Congratulations to a Stellar Career!

Minimum Variance (Moving Average Control)

Process modelAy(t) = Bu(t) + Ce(t)

Factor B = B+B−, solve (minimum G-degree solution)

AF + B−G = C

Cy = AFy+B−Gy = F(Bu+Ce)+B−Gy = CFe+B−(B+Fu+Gy)Control law and output are given by

B+Fu(t) = −Gy(t), y(t) = Fe(t)

where deg F ≥ pole excess of B/A

True minimum variance control V = E 1T∫ T0 y2(t)dt

K. J. Åström MVC and MPC

Page 25: MVC and MPC - University of Oxford · MVC and MPC K. J. Åström Department of Automatic Control, Lund University K. J. Åström MVC and MPC. Congratulations to a Stellar Career!

Properties of Minimum Variance Control

The output is a moving average

y = Fe, deg F ≤ deg A− deg B+.

Easy to validate!

Interpretation for B− = 1 (all process zeros canceled), y isa moving average of degree npz = deg A− deg B. It isequal to the error in predictiong the output npz step ahead.Closed loop characteristic polynomial is

B+Czdeg A−deg B+ = B+Czdeg A−deg B+deg B−.

The sampling period an important design variable!

Sampled zeros depend on sampling period. For a stablesystem all zeros are stable for sufficiently long samplingperiods.

K. J. Åström MVC and MPC

Page 26: MVC and MPC - University of Oxford · MVC and MPC K. J. Åström Department of Automatic Control, Lund University K. J. Åström MVC and MPC. Congratulations to a Stellar Career!

Performance (B− = 1) and Sampling PeriodPlot prediction error as a function of prediction horizon Tp

Tp

σ 2pe

Td Td + Ts

Td is the time delay and Ts is the sampling period. DecreasingTs reduces the variance but decreases the response time.

K. J. Åström MVC and MPC

Page 27: MVC and MPC - University of Oxford · MVC and MPC K. J. Åström Department of Automatic Control, Lund University K. J. Åström MVC and MPC. Congratulations to a Stellar Career!

Performance and Robustness

Td

0

1

1 2 3 5 5

Strong similarity between all controller for systems withtime delays, minimum variance, moving average and Smithpredictor.

It is dangerous to be greedy!

Rule of thumb: no more than 1-4 samples per dead timemotivated by simulation.

K. J. Åström MVC and MPC

Page 28: MVC and MPC - University of Oxford · MVC and MPC K. J. Åström Department of Automatic Control, Lund University K. J. Åström MVC and MPC. Congratulations to a Stellar Career!

Robustness Analysis

Consider a system with time delay Td design for a closed looptime constantTcl. The main system functions are:

Gt(s) = e−sTd1+ sTcl

Gs(s) = 1− Gcl(s) = 1− e−sTd1+ sTcl

G�(s) = e−sTd1+ sTcl − e−sTd

Sensitivity and complementary sensitivity functions are alwaysless than 2! So things look good!

BUT Look at the delay margins!

K. J. Åström MVC and MPC

Page 29: MVC and MPC - University of Oxford · MVC and MPC K. J. Åström Department of Automatic Control, Lund University K. J. Åström MVC and MPC. Congratulations to a Stellar Career!

Nyquist Plots for Smith Predictors Tcl = 1Td = 1 Td = 2

Td = 4 Td = 8

Re LRe L

Re LRe L

Im LIm L

Im LIm L

−1

K. J. Åström MVC and MPC

Page 30: MVC and MPC - University of Oxford · MVC and MPC K. J. Åström Department of Automatic Control, Lund University K. J. Åström MVC and MPC. Congratulations to a Stellar Career!

Another Robustness Result

A simple digital controller for systems with monotone stepresponse (design based on the model y(k+ 1) = bu(k))

uk = k(ysp− yk) + uk−1, k < 2�(∞)

Ts

Stable if �(Ts) > �(∞)2 kjå: Automatica 16 1980, pp 313–315.

K. J. Åström MVC and MPC

Page 31: MVC and MPC - University of Oxford · MVC and MPC K. J. Åström Department of Automatic Control, Lund University K. J. Åström MVC and MPC. Congratulations to a Stellar Career!

Summary

Regulation can be doneeffectively by minimumvariance control

Easy to validate

Sampling period is thedesign variable!

Robustness dependscritically on the samplingperiod

The Harris Index andrelated criteria

OK to assess but why notadapt?

K. J. Åström MVC and MPC

Page 32: MVC and MPC - University of Oxford · MVC and MPC K. J. Åström Department of Automatic Control, Lund University K. J. Åström MVC and MPC. Congratulations to a Stellar Career!

Outline

Introduction

The IBM-Billerud Project

Modeling

Minimum Variance Control

Adaptation

Reflections

K. J. Åström MVC and MPC

Page 33: MVC and MPC - University of Oxford · MVC and MPC K. J. Åström Department of Automatic Control, Lund University K. J. Åström MVC and MPC. Congratulations to a Stellar Career!

Drawbacks with System Identification

Experiment planning requires prior knowledge

Process perturbations required

Time consuming

Requires competence

Adaptation is an alternative

K. J. Åström MVC and MPC

Page 34: MVC and MPC - University of Oxford · MVC and MPC K. J. Åström Department of Automatic Control, Lund University K. J. Åström MVC and MPC. Congratulations to a Stellar Career!

The Self-tuning Regulator

Process model: Ay(t) = Bu(t− k) + Bf f u f f (t) + Ce(t)Select sampling period and time delay k, rules for stablesystems

Estimate parameters in the model

y(t+ k) = Sy(t) + Ru(t) + R f f u f f (t)If estimate converge

ry(τ ) = 0,τ = k, k+ 1, ⋅ ⋅ ⋅ k+ deg(S)ryu(τ ) = 0,τ = k, k+ 1, ⋅ ⋅ ⋅ k+ deg(R)

If degrees sufficiently large ry(τ ) = 0,∀τ ≥ kConvergence conditions

KJÅ+BW Automatica 9(1973),185-199

K. J. Åström MVC and MPC

Page 35: MVC and MPC - University of Oxford · MVC and MPC K. J. Åström Department of Automatic Control, Lund University K. J. Åström MVC and MPC. Congratulations to a Stellar Career!

Convergence Analysis

IEEE Trans AC-22 (1977) 551–575

Markov processes and differential equations

dx = f (x)dt+ �(x)dw, �p�t = −

�p�x

(� f p�x

)+ 12

�2�x2�

2 f = 0

Lennarts idea

θ t+1 = θ t + γ tϕ e,dθdτ = f (θ ) = Eϕ e

Convergence of recursive algorithms and STR (Ay=Bu+Ce)

Jan Holst: ODE locally stable if ReC(zk) > 0 for B(zk) = 0K. J. Åström MVC and MPC

Page 36: MVC and MPC - University of Oxford · MVC and MPC K. J. Åström Department of Automatic Control, Lund University K. J. Åström MVC and MPC. Congratulations to a Stellar Career!

Paper Machine Control

K. J. Åström MVC and MPC

Page 37: MVC and MPC - University of Oxford · MVC and MPC K. J. Åström Department of Automatic Control, Lund University K. J. Åström MVC and MPC. Congratulations to a Stellar Career!

Industrial Applications

A number of applications inspecial areas

Paper machine control

Ship steering

Rolling mills

Semiconductormanufacturing

Tuning of feedforward verysuccessful

The Novatune

Process diagnostics Harrisand similar indices

K. J. Åström MVC and MPC

Page 38: MVC and MPC - University of Oxford · MVC and MPC K. J. Åström Department of Automatic Control, Lund University K. J. Åström MVC and MPC. Congratulations to a Stellar Career!

Tuning and Adaptation

CategoriesAutomatic TuningGain SchedulingAdaptive feedbackAdaptive feedfoward

ProductsTuning toolsPID controllersTool boxesSpecial purposesystems built intoinstruments

Process dynamics

Varying Constant

Use a controller withvarying parameters

Use a controller withconstant parameters

Unpredictable variations

Predictable variations

Use an adaptive controller Use gain scheduling

Åström Hägglund Advanced PID Control, 2004

K. J. Åström MVC and MPC

Page 39: MVC and MPC - University of Oxford · MVC and MPC K. J. Åström Department of Automatic Control, Lund University K. J. Åström MVC and MPC. Congratulations to a Stellar Career!

Relay Auto-tuning

ProcessΣ

−1

PID

y u y sp

What happens when relay feedback is applied to a system withdynamics? Think about a thermostat?

0 5 10 15 20 25 30

−1

−0.5

0

0.5

1

y

tK. J. Åström MVC and MPC

Page 40: MVC and MPC - University of Oxford · MVC and MPC K. J. Åström Department of Automatic Control, Lund University K. J. Åström MVC and MPC. Congratulations to a Stellar Career!

The Excitation Signal

Relay feedback automatically generates an excitationsignal with good frequency content!The transient is also useful

K. J. Åström MVC and MPC

Page 41: MVC and MPC - University of Oxford · MVC and MPC K. J. Åström Department of Automatic Control, Lund University K. J. Åström MVC and MPC. Congratulations to a Stellar Career!

Temperature Control of Distillation Column

K. J. Åström MVC and MPC

Page 42: MVC and MPC - University of Oxford · MVC and MPC K. J. Åström Department of Automatic Control, Lund University K. J. Åström MVC and MPC. Congratulations to a Stellar Career!

Commercial Auto-Tuners

Easy to useOne-button tuningSemi-automaticgeneration of gainschedulesAdaptation offeedback andfeedforward gains

RobustMany versions

Stand aloneDCS systems

Large numbers

Excellent industrialexperience

K. J. Åström MVC and MPC

Page 43: MVC and MPC - University of Oxford · MVC and MPC K. J. Åström Department of Automatic Control, Lund University K. J. Åström MVC and MPC. Congratulations to a Stellar Career!

Properties of Relay Auto-tuning

Safe for stable systemsClose to industrial practice

Compare manual Ziegler-Nichols tuningEasy to explain

Little prior information. Relay amplitudeOne-button tuningAutomatic generation of test signal

Automatically injects much energy at ω 180 without forknowing ω 180 apriori

Good for pre-tuning of adaptive algorithmsGood industrial experience for more than 25 years. Basicpatents are running out.

K. J. Åström MVC and MPC

Page 44: MVC and MPC - University of Oxford · MVC and MPC K. J. Åström Department of Automatic Control, Lund University K. J. Åström MVC and MPC. Congratulations to a Stellar Career!

Outline

Introduction

The IBM-Billerud Project

Modeling

Minimum Variance Control

Adaptation

Reflections

K. J. Åström MVC and MPC

Page 45: MVC and MPC - University of Oxford · MVC and MPC K. J. Åström Department of Automatic Control, Lund University K. J. Åström MVC and MPC. Congratulations to a Stellar Career!

Interaction with Industry

Contact with real problems is very healthy for research inengineering

Both MVC and MPC emerged in this way

Applied industrial projects can inspire research, providedthat they have enlightened management

New problems may appear

Challenges with publications; importance of good Editors

Necessary to look deeper and to fill in the gaps, even if ittakes a lot of effort and a lot of time - a long range view isnecessary to get real insight

Useful for a project to exchange people between academiaand industry

The Oxford model, the SupAero model, the Lund model

K. J. Åström MVC and MPC

Page 46: MVC and MPC - University of Oxford · MVC and MPC K. J. Åström Department of Automatic Control, Lund University K. J. Åström MVC and MPC. Congratulations to a Stellar Career!

The Knowledge Gap

Richalet Automatica 1963: MPC requires technical staffwith training in:

modeling, identification, digital control,...

The Novatune experience

Projects 73-74

Bengtsson Cold rolling 79

ASEA Innovation 81

30 persons 50M

Transfer to ASEA MasterRelay auto-tuning Hägglund kjå 1981

One button tuning

Can relay auto-tuning be useful for MPC modeling?

K. J. Åström MVC and MPC