modern control engineer in

Post on 10-Apr-2015

335 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

EE392m - Winter 2003 Control Engineering 1-1

Lecture 1

• Introduction - Course mechanics• History• Modern control engineering

EE392m - Winter 2003 Control Engineering 1-2

Introduction - Course Mechanics

• What this course is about?• Prerequisites & course place in the curriculum• Course mechanics• Outline and topics• Your instructor

EE392m - Winter 2003 Control Engineering 1-3

What this course is about?

• Embedded computing is becoming ubiquitous• Need to process sensor data and influence physical world.

This is control and knowing its main concepts is important.• Much of control theory is esoteric and difficult• 90% of the real world applications are based on 10% of the

existing control methods and theory• The course is about these 10%

EE392m - Winter 2003 Control Engineering 1-4

Prerequisites and course place

• Prerequisites:– Linear algebra: EE263, Math 103– Systems and control: EE102, ENGR 105, ENGR 205

• Helpful– Matlab– Modeling and simulation– Optimization– Application fields– Some control theory good, but not assumed.

• Learn more advanced control theory in :– ENGR 207, ENGR 209, and ENGR 210

EE392m - Winter 2003 Control Engineering 1-5

Course Mechanics

• Descriptive in addition to math and theory• Grading

• 25% Homework Assignments (4 at all)• 35% Midterm Project• 40% Final Project

• Notes at www.stanford.edu/class/ee392M/• Reference texts

• Control System Design, Astrom, posted as PDF• Feedback Control of Dynamic Systems, Fourth Edition, Franklin,

Powell, Emami-Naeini, Prentice Hall, 2002• Control System Design, Goodwin, Graebe, Salgado, Prentice Hall,

2001

EE392m - Winter 2003 Control Engineering 1-6

8. Model identification9. Processes with deadtime, IMC10. Controller tuning11. Multivariable control -

optimization12. Multivariable optimal program13. MPC - receding horizon control

14. Handling nonlinearity15. System health management16. Overview of advanced topics

1. Introduction and history2. Modeling and simulation3. Control engineering problems4. PID control5. Feedforward6. SISO loop analysis7. SISO system design

Bas

ic

Bre

adth

Adv

ance

d

Lectures - Mondays & FridaysAssignments - Fridays, due on Friday

Lecture topics

Outline and topics

EE392m - Winter 2003 Control Engineering 1-7

Who is your instructor?

• Dimitry Gorinevsky• Consulting faculty (EE)• Honeywell Labs

– Minneapolis– Cupertino

• Control applications across many industries• PhD from Moscow University

– Moscow → Munich → Toronto → Vancouver → Palo Alto

EE392m - Winter 2003 Control Engineering 1-8

Paper machine CD control

Space systems

Walking machine

Amplifier (OLA)

Transmitter 1 Transmitter 2Receiver 1

Receiver 2

SwitchSwitch

Switch

OADM

WDM networks

Jet engines

Powertrain control

Some stuff I worked on

EE392m - Winter 2003 Control Engineering 1-9

Lecture 1 - Control History

• Watt’s governor• Thermostat• Feedback Amplifier• Missile range control• TCP/IP• DCS

EE392m - Winter 2003 Control Engineering 1-10

Why bother about the history?

• Trying to guess, where the trend goes• Many of the control techniques that are talked about are

there for historical reasons mostly. Need to understandthat.

EE392m - Winter 2003 Control Engineering 1-11

From the 1832 Edinburgh Encyclopaedia

1788 Watt’s Flyball Governor

• Watt’s Steam Engine• Newcomen’s steam engine (1712)

had limited success• Beginning of systems engineering• Watt’s systems engineering add-

on started the IndustrialRevolution

• Analysis of James Clark Maxwell(1868)

• Vyshnegradsky (1877)

EE392m - Winter 2003 Control Engineering 1-12

Rubs

• Mechanical technology use was extended from power toregulation

• It worked and improved reliability of steam enginessignificantly by automating operator’s function

• Analysis was done much later (some 100 years) - this istypical!

• Parallel discovery of major theoretical approaches

EE392m - Winter 2003 Control Engineering 1-13

( )φφφφωφ &&& bmglmlml G −−= sincossin2

EG

LE

nTkJ

ωωφω

=−= cos&

yx

E +=+=

0

0

ωωφφ

• Linearization

11

<<<<

yx

0321 =+++ yayayay &&&&&&

Watt’s governor

• Analysis of James Clark Maxwell (1868)

EE392m - Winter 2003 Control Engineering 1-14

0321 =+++ yayayay &&&&&&

Stability condition:

0322

13 =+++ aaa λλλ

tey λ=

)3,2,1( ,0Re =< kkλ

Characteristic equation:

λRe

λIm

Watt’s governor

• Gist:– Model; P feedback control; linearization; LHP poles

• All still valid

EE392m - Winter 2003 Control Engineering 1-15

1885 Thermostat• 1885 Al Butz invented damper-flapper

– bimetal plate (sensor/control)– motor to move the furnace damper)

• Started a company that becameHoneywell in 1927

• Thermostat switching on makes the main motor shaft toturn one-half revolution opening the furnace's air damper.

• Thermostat switching off makes the motor to turn anotherhalf revolution, closing the damper and damping the fire.

• On-off control based on threshold

EE392m - Winter 2003 Control Engineering 1-16

Rubs

• Use of emerging electrical system technology• Significant market for heating regulation (especially in

Minnesota and Wisconsin)• Increased comfort and fuel savings passed to the customer -

customer value proposition• Integrated control device with an actuator. Add-on device

installed with existing heating systems

EE392m - Winter 2003 Control Engineering 1-17

GVVR

VVR

VV

=

−=−

2

2

2

1

1

1930s Feedback Amplifier• Signal amplification in first telecom systems (telephone)

Analog vacuum tube amplifier technology• Feedback concept

• Bode’s analysis of the transients in the amplifiers (1940)

+−−=

+−=

1

2

2

1

2121

2

1 1111111RR

GRR

RRGRR

VV

EE392m - Winter 2003 Control Engineering 1-18

Feedback Amplifier - Rubs

• Electronic systems technology• Large communication market• Useful properties of large gain feedback realized:

linearization, error insensitivity• Conceptual step. It was initially unclear why the feedback

loop would work dynamically, why would it not growunstable.

EE392m - Winter 2003 Control Engineering 1-19

1940s WWII Military Applications

• Sperry Gyroscope Company – flight instruments – laterbought by Honeywell to become Honeywell aerospacecontrol business.

• Servosystem – gun pointing, ship steering, using gyro• Norden bombsight – Honeywell C-1 autopilot - over

110,000 manufactured.• Concepts – electromechanical feedback, PID control.• Nyquist, servomechanism, transfer function analysis,

EE392m - Winter 2003 Control Engineering 1-20

Autopilot - Rubs

• Enabled by the navigation technology - Sperry gyro• Honeywell got the autopilot contract because of its control

system expertise – in thermostats• Emergence of cross-application control engineering

technology and control business specialization.

EE392m - Winter 2003 Control Engineering 1-21

USSR R-16/8K64/SS-7/SaddlerCopyright © 2001 RussianSpaceWeb.comhttp://www.russianspaceweb.com/r16.html

( )YXVVFr yx ∆∆∆∆= ,,,

1960s - Rocket science

• Range

• Range Error

• Algorithm:– track , cut the engine off at T when

)()()()()( 4321 tYftXftVftVftr yx ∆+∆+∆+∆=δ

• SS-7 missile range control– through the main engine cutoff time.

)(trδ 0)( =Trδ

EE392m - Winter 2003 Control Engineering 1-22

Missile range control - Rubs

• Nominal trajectory needs to be pre-computed and optimized• Need to have an accurate inertial navigation system to

estimate the speed and coordinates• Need to have feedback control that keeps the missile close to

the nominal trajectory (guidance and flight control system)• f1, f2, f3, f4, and fT must be pre-computed• Need to have an on-board device continuously computing

)()()()()( 4321 tYftXftVftVftr yx ∆+∆+∆+∆=δ

EE392m - Winter 2003 Control Engineering 1-23

1975 - Distributed Control System

• 1963 - Direct digital control was introduced at apetrochemical plant. (Texaco)

• 1970 - PLC's were introduced on the market.• 1975 - First DCS was introduced by Honeywell• PID control, flexible software• Networked control system, configuration tuning and access

from one UI station• Auto-tuning technology

EE392m - Winter 2003 Control Engineering 1-24

DCSexampleHoneywellExperion PKS

Honeywell PlantscapeSupervisoryControlAndDataAcquisition

EE392m - Winter 2003 Control Engineering 1-25

DCS - Rubs

• Digital technology + networking• Rapid pace of the process industry automation• The same PID control algorithms• Deployment, support and maintenance cost reduction for

massive amount of loops• Autotuning technology• Industrial digital control is becoming a commodity• Facilitates deployment of supervisory control and monitoring

EE392m - Winter 2003 Control Engineering 1-26

1974 - TCP/IP

• TCP/IP - Cerf/Kahn, 1974• Berkeley-LLNL network

crash, 1984• Congestion control -Van

Jacobson, 1986

EE392m - Winter 2003 Control Engineering 1-27

Round Trip Time τtime

time

Source

Destination

1 2 W

1 2 W

1 2 W

data ACK

1 2 W

TCP flow control

τWx =Transmission rate: packets/sec

Here:• Flow control dynamics near the maximal transmission rate• From S.Low, F.Paganini, J.Doyle, 2000

EE392m - Winter 2003 Control Engineering 1-28

TCP Reno congestion avoidance• packet acknowledgment rate: x• lost packets: with probability q

• transmitted: with probability (1-q)

• x - transmission rate• τ - round trip time• q - loss probability

22 2

11 qxqx −−=τ

&

ττsentlost xqxqx ∆−+∆= )1(&

2/xWxlost −=∆

Wxxsent /=∆

τWx =

for every loss {W = W/2}

for every ACK {W += 1/W}

EE392m - Winter 2003 Control Engineering 1-29

TCP flow control - Rubs

• Flow control enables stable operation of the Internet• Developed by CS folks - no ‘controls’ analysis• Ubiquitous, TCP stack is on ‘every’ piece of silicon• Analysis and systematic design is being developed some

20 years later• The behavior of the network is important. We looked at a

single transmission.• Most of analysis and systematic design activity in 4-5 last

years and this is not over yet ...

EE392m - Winter 2003 Control Engineering 1-30

Modern Control Engineering

• What BIG control application is coming next?• Where and how control technology will be used?• What do we need to know about controls to get by?

EE392m - Winter 2003 Control Engineering 1-31

Modern Control Engineering

• This course is focused on control computing algorithmsand their relationship with the overall system design.

MeasurementsystemSensors

Controlcomputing

Controlhandles

Actuators

Physical system

EE392m - Winter 2003 Control Engineering 1-32

Modern control systems• Why this is relevant and important at present?• Computing is becoming ubiquitous• Sensors are becoming miniaturized, cheap, and pervasive.

MEMS sensors• Actuator technology developments include:

– evolution of existing types– previously hidden in the system, not actively controlled– micro-actuators (piezo, MEMS)– control handles other than mechanical actuators, e.g., in telecom

EE392m - Winter 2003 Control Engineering 1-33

Measurement system evolution.Navigation system example

• MEMS gyro – good for anyvehicle/mobile appliance.– (1") 3 integrated navigation unit

•Mechanical gyro by Sperry – for ships,aircraft. Honeywell acquired SperryAerospace in 1986 - avionics, space.

• Laser ring gyro, used inaerospace presently.

EE392m - Winter 2003 Control Engineering 1-34

Actuator evolution• Electromechanical actuators: car power everything

• Adaptive optics, MEMS

• Communication - digital PLL

control handle

EE392m - Winter 2003 Control Engineering 1-35

Control computing• Computing grows much faster than the sensors and actuators• CAD tools, such as Matlab/Simulink, allow focusing on

algorithm design. Implementation is automated• Past: control was done by dedicated and highly specialized

experts. Still the case for some very advanced systems inaerospace, military, automotive, etc.

• Present: control and signal-processing technology arestandard technologies associated with computing.

• Embedded systems are often designed by system/softwareengineers.

• This course emphasizes practically important issues ofcontrol computing

EE392m - Winter 2003 Control Engineering 2-1

Lecture 2 - Modeling and Simulation

• Model types: ODE, PDE, State Machines, Hybrid• Modeling approaches:

– physics based (white box)– input-output models (black box)

• Linear systems• Simulation• Modeling uncertainty

EE392m - Winter 2003 Control Engineering 2-2

Goals

• Review dynamical modeling approaches used for controlanalysis and simulation

• Most of the material us assumed to be known• Target audience

– people specializing in controls - practical

EE392m - Winter 2003 Control Engineering 2-3

Modeling in Control Engineering• Control in a

systemperspective

Physical systemMeasurementsystemSensors

Controlcomputing

Controlhandles

Actuators

Physicalsystem

• Control analysisperspective

Controlcomputing

System model Controlhandlemodel

Measurementmodel

EE392m - Winter 2003 Control Engineering 2-4

Models

• Model is a mathematical representations of a system– Models allow simulating and analyzing the system– Models are never exact

• Modeling depends on your goal– A single system may have many models– Always understand what is the purpose of the model– Large ‘libraries’ of standard model templates exist– A conceptually new model is a big deal

• Main goals of modeling in control engineering– conceptual analysis– detailed simulation

EE392m - Winter 2003 Control Engineering 2-5

),,(),,(

tuxgytuxfx

==&

Modeling approaches• Controls analysis uses deterministic models. Randomness and

uncertainty are usually not dominant.• White box models: physics described by ODE and/or PDE• Dynamics, Newton mechanics

• Space flight: add control inputs u and measured outputs y),( txfx =&

EE392m - Winter 2003 Control Engineering 2-6

vr

tFrrmv pert

=

+⋅−=

&

& )(3γ

Orbital mechanics example

• Newton’s mechanics– fundamental laws– dynamics

=

3

2

1

3

2

1

vvvrrr

x),( txfx =&

• Laplace– computational dynamics

(pencil & paper computations)– deterministic model-based

prediction1749-1827

1643-1736rv

EE392m - Winter 2003 Control Engineering 2-7

Orbital mechanics example

• Space flight mechanics

• Control problems: u - ?

=

3

2

1

3

2

1

vvvrrr

x

),,(),,(

tuxgytuxfx

==&

=)()(

rr

yϕθ

vr

tutFrrmv pert

=

++⋅−=

&

& )()(3γThrust

state

modelobservations /measurements control

EE392m - Winter 2003 Control Engineering 2-8

Geneexpressionmodel

EE392m - Winter 2003 Control Engineering 2-9

),,(),,()(

tuxgytuxfdtx

==+

Sampled Time Models• Time is often sampled because of the digital computer use

– computations, numerical integration of continuous-time ODE

– digital (sampled time) control system

• Time can be sampled because this is how a system works• Example: bank account balance

– x(t) - balance in the end of day t– u(t) - total of deposits and withdrawals that day– y(t) - displayed in a daily statement

• Unit delay operator z-1: z-1 x(t) = x(t-1)

( ) kdttuxfdtxdtx =⋅+≈+ ),,,()(

xytutxtx

=+=+ )()()1(

EE392m - Winter 2003 Control Engineering 2-10

Finite statemachines

• TCP/IP State Machine

EE392m - Winter 2003 Control Engineering 2-11

Hybrid systems• Combination of continuous-time dynamics and a state machine• Thermostat example• Tools are not fully established yet

off on72=x

75=x

70=x

70≥−=

xKxx&

75)(

≤−=

xxxhKx&

EE392m - Winter 2003 Control Engineering 2-12

PDE models• Include functions of spatial variables

– electromagnetic fields– mass and heat transfer– fluid dynamics– structural deformations

• Example: sideways heat equation

1

2

2

0)1(;)0(

=∂∂=

==∂∂=

∂∂

xxTy

TuTxTk

tT

yheat flux

x

Toutside=0Tinside=u

EE392m - Winter 2003 Control Engineering 2-13

Black-box models

• Black-box models - describe P as an operator

– AA, ME, Physics - state space, ODE and PDE– EE - black-box,– ChE - use anything– CS - state machines, probablistic models, neural networks

Px

uinput data

youtput data

internal state

EE392m - Winter 2003 Control Engineering 2-14

Linear Systems

• Impulse response• FIR model• IIR model• State space model• Frequency domain• Transfer functions• Sampled vs. continuous time• Linearization

EE392m - Winter 2003 Control Engineering 2-15

Linear System (black-box)

• Linearity

• Linear Time-Invariant systems - LTI

)()( 11 ⋅→⋅ yu P

)()( TyTu P −⋅→−⋅

)()()()( 2121 ⋅+⋅→⋅+⋅ byaybuau P

)()( 22 ⋅→⋅ yu P

→ Pu

t

y

t

EE392m - Winter 2003 Control Engineering 2-16

Impulse response• Response to an input impulse

• Sampled time: t = 1, 2, ...• Control history = linear combination of the impulses ⇒

system response = linear combination of the impulse responses

( ) )(*)()()(

)()()(

0

0

tuhkukthty

kukttu

k

k

=−=

−=

∑∞

=

=

δ

)()( ⋅→⋅ hPδu

t

y

t

EE392m - Winter 2003 Control Engineering 2-17

Linear PDE System Example

• Heat transfer equation,– boundary temperature input u– heat flux output y

• Pulse response and step response

00.2

0.40.6

0.81 0

0.20 .4

0.60 .8

10

0.2

0.4

0.6

0.8

1

TIME

TEMPERATURE

COORDINATE

0)1()0(

2

2

==∂∂=

∂∂

TTuxTk

tT

1=∂∂=

xxTy

0 20 40 60 80 1000

2

4

6x 10

-2

TIME

HE

AT

FLU

X

PULSE RESPONSE

0 20 40 60 80 1000

0.2

0.4

0.6

0.8

1

TIME

HE

AT

FLU

X

STEP RESPONSE

EE392m - Winter 2003 Control Engineering 2-18

FIR model

• FIR = Finite Impulse Response• Cut off the trailing part of the pulse response to obtain FIR• FIR filter state x. Shift register

),(),()1(

uxgyuxftx

==+

h0

h1

h2

h3

u(t)

x1=u(t-1)

y(t)

x2=u(t-2)

x3=u(t-3)

z-1

z-1

z-1

( ) )(*)()()(0

tuhkukthty FIR

N

kFIR =−=∑

=

EE392m - Winter 2003 Control Engineering 2-19

IIR model• IIR model:

• Filter states: y(t-1), …, y(t-na ), u(t-1), …, u(t-nb )

∑∑==

−+−−=ba n

kk

n

kk ktubktyaty

01

)()()(

u(t) b0

b1

b2

u(t-1)

u(t-2)

u(t-3)

z-1

z-1

z-1

-a1

-a2

y(t-1)

y(t-2)

y(t-3)

z-1

z-1

z-1

y(t)

b3-a3

EE392m - Winter 2003 Control Engineering 2-20

IIR model• Matlab implementation of an IIR model: filter• Transfer function realization: unit delay operator z-1

( ) ( ) )(...)(...1

......

...1...

)()()(

)()()(

)(

110

)(

11

11

110

11

110

tuzbzbbtyzazaazazbzbzb

zazazbzbb

zAzBzH

tuzHty

zB

NN

zA

NN

NNN

NNN

NN

NN

4444 34444 21444 3444 21−−−−

−−

−−

+++=+++

++++++=

++++++==

=

• FIR model is a special case of an IIR with A(z) =1 (or zN )

EE392m - Winter 2003 Control Engineering 2-21

IIR approximation example• Low order IIR approximation of impulse response:

(prony in Matlab Signal Processing Toolbox)• Fewer parameters than a FIR model• Example: sideways heat transfer

– pulse response h(t)– approximation with IIR filter a = [a1 a2 ], b=[b0 b1 b2 b3 b4 ]

0 20 40 60 80 1000

0.02

0.04

0.06

TIME

IMPULSE RESPONSE

22

11

44

33

22

110

1)( −−

−−−−

++++++=

zazazbzbzbzbbzH

EE392m - Winter 2003 Control Engineering 2-22

Linear state space model• Generic state space model:

• LTI state space model– another form of IIR model– physics-based linear system model

• Transfer function of an LTI model– defines an IIR representation

• Matlab commands for model conversion: help ltimodels

( )[ ]( ) DBAIzzH

uDBAIzy

+−=

⋅+−=−

1

1

)(

)()()()()()1(

tDutCxtytButAxtx

+=+=+

),,(),,()1(

tuxgytuxftx

==+

EE392m - Winter 2003 Control Engineering 2-23

Frequency domain description• Sinusoids are eigenfunctions of an LTI system:

LTIPlant

tiititi eeeez ωωωω −−− == )1(1

• Frequency domain analysis

uzHy )(=

∫∫ =⇒= ωωωω ω

ω

ωω deueHydeuu ti

y

iti43421)(~

)(~)()(~

)(~ ω

ω

ue ti

uPacket

of

sinusoids )(~ ω

ω

ye tiPacket

of

sinusoids

)( ωieH y

EE392m - Winter 2003 Control Engineering 2-24

Frequency domain description• Bode plots:

tii

ti

eeHyeu

ωω

ω

)(==

• Example:

)(arg)(

)()(ω

ω

ωϕ

ωi

i

eH

eHM

=

=

7.01)(

−=

zzH

Bode Diagra m

Frequency (rad/sec)

Phas

e (d

eg)

Mag

nitu

de (d

B)

-5

0

5

10

15

10-2

10-1

100

-180

-135

-90

-45

0

• |H| is often measuredin dB

EE392m - Winter 2003 Control Engineering 2-25

Black-box model from data

• Linear black-box model can be determined from the data,e.g., step response data

• This is called model identification• Lecture 8

EE392m - Winter 2003 Control Engineering 2-26

z-transform, Laplace transform• Formal description of the transfer function:

– function of complex variable z– analytical outside the circle |z|≥r– for a stable system r ≤ 1

k

kzkhzH −

=∑=

0

)()(

• Laplace transform:– function of complex variable s– analytical in a half plane Re s ≤ a– for a stable system a ≤ 1

∫∞

∞−

= dtethsH st)()(

)(ˆ)()(ˆ susHsy =

EE392m - Winter 2003 Control Engineering 2-27

Stability analysis

• Transfer function poles tell you everything about stability• Model-based analysis for a simple feedback example:

)()(

dyyKuuzHy−−=

=dd yzLy

KzHKzHy )()(1

)( =+

=

• If H(z) is a rational transfer function describing an IIRmodel

• Then L(z) also is a rational transfer function describing anIIR model

EE392m - Winter 2003 Control Engineering 2-28

Poles and Zeros <=> System• …not quite so!• Example:

7.0)(

−==

zzuzHy

19

171819 0011400016280...4907.0)(z

. z.z.zzuzHy FIR+++++==

Impulse Re sponse

Time (sec)

Ampl

itude

0 5 10 15 20 250

0.2

0.4

0.6

0.8

1

Impulse Re sponse

Time (sec)

Ampl

itude

0 5 10 15 20 250

0.2

0.4

0.6

0.8

1

• FIR model - truncated IIR

EE392m - Winter 2003 Control Engineering 2-29

IIR/FIR example - cont’d• Feedback control:

• Closed loop:

)()(7.0

)(

dd yyyyKuz

zuzHy

−−=−−=−

==

Impulse Re sponse

Time (sec)

Ampl

itude

0 5 10 15 20 250

0.2

0.4

0.6

0.8

uzLuzH

zHy )()(1

)( =+

=

uzLuzH

zHy FIRFIR

FIR )()(1

)( =+

=

EE392m - Winter 2003 Control Engineering 2-30

-0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8-0.8

-0.6

-0.4

-0.2

0

0.2

0.4

0.6

0.8

IIR/FIR example - cont’dPoles and zeros

• Blue: Loopwith IIRmodel poles xand zeros o

• Red: Loopwith FIRmodel poles xand zeros o

EE392m - Winter 2003 Control Engineering 2-31

LTI models - summary

• Linear system can be described by impulse response• Linear system can be described by frequency response =

Fourier transform of the impulse response• FIR, IIR, State-space models can be used to obtain close

approximations of a linear system• A pattern of poles and zeros can be very different for a

small change in approximation error.• Approximation error <=> model uncertainty

EE392m - Winter 2003 Control Engineering 2-32

Nonlinear map linearization• Nonlinear - detailed

model• Linear - conceptual

design model• Static map, gain

range, sectorlinearity

• Differentiation,secant method

)()( 0uuufufy −

∆∆≈=

EE392m - Winter 2003 Control Engineering 2-33

Nonlinear state space modellinearization

• Linearize the r.h.s. map

• Secant method

• Or … capture a response to small step and build animpulse response model

BvAqq

uuufxx

xfuxfx

vq

+=

−∆∆+−

∆∆≈=

&

4342143421& )()(),( 00

{ ]0...1...0[

)(

# jj

j

jj

ss

sxfxf

=

+=

∆∆

EE392m - Winter 2003 Control Engineering 2-34

Sampled time vs. continuous time

• Continuous time analysis (Digital implementation ofcontinuous time controller)– Tustin’s method = trapezoidal rule of integration for

– Matched Zero Pole: map each zero and a pole in accordance with

• Sampled time analysis (Sampling of continuous signalsand system)

+−⋅==→ −

1

1

112)()(

zz

TsHzHsH s

ssH 1)( =

sTes =

EE392m - Winter 2003 Control Engineering 2-35

Sampled and continuous time• Sampled and continuous time together• Continuous time physical system + digital controller

– ZOH = Zero Order Hold

Sensors

Controlcomputing

ActuatorsPhysicalsystem

D/A, ZOHA/D, Sample

EE392m - Winter 2003 Control Engineering 2-36

Signal sampling, aliasing

• Nyquist frequency:ωN= ½ωS; ωS= 2π/T

• Frequency folding: kωS±ω map to the same frequency ω• Sampling Theorem: sampling is OK if there are no frequency

components above ωN

• Practical approach to anti-aliasing: low pass filter (LPF)• Sampled→continuous: impostoring

Digitalcomputing

D/A, ZOHA/D, SampleLowPassFilter

LowPassFilter

EE392m - Winter 2003 Control Engineering 2-37

Simulation• ODE solution

– dynamical model:– Euler integration method:– Runge-Kutta: ode45 in Matlab

• Can do simple problems by integrating ODEs• Issues:

– mixture of continuous and sampled time– hybrid logic (conditions)– state machines– stiff systems, algebraic loops– systems integrated out of many subsystems– large projects, many people contribute different subsystems

),( txfx =&( )ttxfdtxdtx ),()()( ⋅+=+

EE392m - Winter 2003 Control Engineering 2-38

Simulation environment

• Block libraries

• Subsystem blocksdeveloped independently

• Engineered for developinglarge simulation models

• Supports code generation

• Simulink by Mathworks• Matlab functions and analysis• Stateflow state machines

• Ptolemeus -UC Berkeley

EE392m - Winter 2003 Control Engineering 2-39

Model block development• Look up around for available conceptual models• Physics - conceptual modeling• Science (analysis, simple conceptual abstraction) vs.

engineering (design, detailed models - out of simple blocks)

EE392m - Winter 2003 Control Engineering 2-40

Modeling uncertainty• Modeling uncertainty:

– unknown signals– model errors

• Controllers work with real systems:– Signal processing: data → algorithm → data– Control: algorithms in a feedback loop with a real system

• BIG question: Why controller designed for a model wouldever work with a real system?– Robustness, gain and phase margins,– Control design model, vs. control analysis model– Monte-Carlo analysis - a fancy name for a desperate approach

EE392m - Winter 2003 Control Engineering 3-1

Lecture 3 - Model-based ControlEngineering

• Control application and a platform• Systems platform: hardware, systems software.

Development steps• Model-based design• Control solution deployment and support• Control application areas

EE392m - Winter 2003 Control Engineering 3-2

Generality of control

• Modeling abstraction• Computing element - software• System, actuator, and sensor physics might be very

different• Control and system engineering is used across many

applications– similar principles– transferable skills– mind the application!

EE392m - Winter 2003 Control Engineering 3-3

System platform for control computing

• Workstations– advanced process control– enterprise optimizers– computing servers

(QoS/admission control)

• Specialized controllers:– PLC, DCS, motion controllers,

hybrid controllers

EE392m - Winter 2003 Control Engineering 3-4

System platform for control computing

• Embedded: µP + software• DSP

• FPGA

• ASIC / SoC

MPC555

EE392m - Winter 2003 Control Engineering 3-5

Embeddedprocessorrange

EE392m - Winter 2003 Control Engineering 3-6

System platform, cont’d• Analog/mixed electric circuits

– power controllers– RF circuits

• Analog/mixed other– Gbs optical networks

AGC = Auto Gain Control

EM = Electr-optModulator

EE392m - Winter 2003 Control Engineering 3-7

Controls development cycle• Analysis and modeling

– physical model, or empirical, or data driven– use a simplified design model– system trade study - defines system design

• Heavy use of CAD tools• Simulation

– design validation using detailed performance model

• System development– control application, software platform, hardware platform

• Validation and verification– against initial specs

• Certification/commissioning

EE392m - Winter 2003 Control Engineering 3-8

Controlapplicationsoftware

developmentcycle

• Matlab+toolboxes• Simulink• Stateflow• Real-time Workshop

EE392m - Winter 2003 Control Engineering 3-9

Hardware-in-the-loop simulation

• Aerospace• Process control• Automotive

Code Generation

codecodecode

Simulink/Stateflow

Applicationsoftware:

models, control

IDETool

Chain

OS / RTOS

(H/W Devices)Microprocessor

App. S/WRT Simulator

Simulation, Testing, Verification,Performance Optimization

PC/workstation

Embedded Target

RTOS

H/W DevicesMicrocontroller

App. S/WMiddleware

Plant RT Simulation

Trans-missionEngine

Real Plant

Hardware in the loop simulation,Real-world test

Real-TimeWorkshop

Embedded Software Development

EE392m - Winter 2003 Control Engineering 3-11

System development cycle

Ford Motor Company

EE392m - Winter 2003 Control Engineering 3-12

System development cycle

Cadence

EE392m - Winter 2003 Control Engineering 3-13

Control Technology• Science

– abstraction– concepts– simplified models

• Engineering– building new things– constrained resources: time, money,

• Technology– repeatable processes– control platform technology– control engineering technology

EE392m - Winter 2003 Control Engineering 3-14

Controls development cycleControl design model:

x(t+1) = x(t) + u(t)

Detailed simulationmodel

Conceptual controlalgorithm:

u = -k(x-xd)

Detailed control application:saturation, initialization, BIT,

fault recovery, bumpless transfer

ConceptualAnalysis

Applicationcode: Simulink

Hardware-in-the-loop sim

DeployedcontrollerDeployment

Systems platform:Run-time code, OSHardware platform

Physical plant

Prototypecontroller

Validation andverification

Syste

m a

nd so

ftwar

eC

ontr

ols a

naly

sis

EE392m - Winter 2003 Control Engineering 3-15

Controls analysisData model

x(t+1) = x(t) + u(t)

Identification & tuning

Detailed control application:saturation, initialization, BIT,fault recovery, manual/auto

mode, bumpless transfer,startup/shutdown

ConceptualAnalysis

Applicationcode:

Simulink

Fault model Accomodationalgorithm:

u = -k(x-xd)Control design model:

x(t+1) = x(t) + u(t)

Conceptual controlalgorithm:

u = -k(x-xd)

Detailedsimulation

model

EE392m - Winter 2003 Control Engineering 3-16

Algorithms/AnalysisMuch more than real-time control feedback computations• modeling• identification• tuning• optimization• feedforward• feedback• estimation and navigation• user interface• diagnostics and system self-test• system level logic, mode change

EE392m - Winter 2003 Control Engineering 3-17

Practical Issues of Control Design

• Technical requirements• Economics: value added, # of replications

– automotive, telecom, disk drives - millions of copies produced– space, aviation - unique to dozens to several hundreds– process control - each process is unique, hundreds of the same type

• Developer interests• Integration with existing system features• Skill set in engineering development and support• Field service/support requirements• Marketing/competition, creation of unique IP• Regulation/certification: FAA/FDA

EE392m - Winter 2003 Control Engineering 3-18

Major control applicationsSpecialized control groups, formal development processes• Aviation

– avionics: Guidance, Navigation, & Control– propulsion - engines– vehicle power and environmental control

• Automotive– powertrain– suspension, traction, braking, steering

• Disk drives• Industrial automation and process control

– process industries: refineries, pulp and paper, chemical– semiconductor manufacturing processes– home and buildings

EE392m - Winter 2003 Control Engineering 3-19

Commercial applicationsAdvanced design - commercial• Embedded mechanical

– mechatronics/drive control

• Robotics– lab automation– manufacturing plant robots (e.g., automotive)– semiconductors

• Power– generation and transmission

• Transportation– locomotives, elevators– marine

• Nuclear engineering

EE392m - Winter 2003 Control Engineering 3-20

High-performance applicationsAdvanced design• Defense and space

– aero, ground, space vehicles - piloted and unmanned– missiles/munitions– comm and radar: ground, aero, space– campaign control: C4ISR– directed energy

• Science instruments– astronomy– accelerators– fusion: TOKAMAKs, LLNL ignition

EE392m - Winter 2003 Control Engineering 3-21

Embedded applicationsNo specialized control groups• Embedded controllers

– consumer– test and measurement– power/current– thermal control

• Telecom– PLLs, equalizers– antennas, wireless, las comm– flow/congestion control– optical networks - analog, physics

EE392m - Winter 2003 Control Engineering 3-22

Emerging control applicationsA few selected cases• Biomedical

– life support: pacemakers anesthesia– diagnostics: MRI scanners, etc– ophthalmology– bio-informatics equipment– robotics surgery

• Computing– task/load balancing

• Finance and economics– trading

EE392m - Winter 2003 Control Engineering 4-1

Lecture 4 - PID Control

• 90% (or more) of control loops in industry are PID• Simple control design model → simple controller

EE392m - Winter 2003 Control Engineering 4-2

Example:Utilization control in a video server

P control• Integrator plant:

duy +=&

)( dP yyku −−=

• P controller:

admission rate

CPU

u(t)

completion rate

server utilization-u(t)

y(t)

d(t)

y(t)

yd(t)

-d(t)

Video stream i– processing time c[i], period p[i]– CPU utilization: U[i]=c[i]/p[i]

tUnew

∆∆=

tUdone

∆∆=

EE392m - Winter 2003 Control Engineering 4-3

P control• Closed-loop dynamics

dks

yks

kyP

dP

P

++

+= 1

dykyky dPP +=+&

• Steady-state (s = 0)

• Transient

• Frequency-domain (bandwidth)

SSP

dSS dk

yy 1+=

( )

P

TtSS

Pd

Tt

kT

edk

yeyty

/1

11)0()( //

=

−⋅

++= −−

( ) 1/

/)(ˆ)(ˆ)(ˆ

2 +

+=

P

Pd

k

kidiyiy

ω

ωωω

0.01 0.1 1 10-20-15-10-5

0

0 2 400.20.40.60.8

1

y(t)

|y(iω)|ti

tidd

eidtd

eiytyω

ω

ω

ω

)(ˆ)(

)(ˆ)(

=

=

EE392m - Winter 2003 Control Engineering 4-4

Example:• Servosystem command

• More:– stepper motor– flow through a valve– motor torque ...

I control

• Introduce integrator into control

• Closed-loop dynamics

)(,

dI yykvvu

−−==&

,dugy +⋅=

dgkssy

gksgky

Id

I

I

++

+=

y(t)

u(t)

EE392m - Winter 2003 Control Engineering 4-5

Sampled time I control

• Step to step update:

• Closed-loop dynamics

• Deadbeat control:

[ ]dI ytyktvtvtututdtugty

−=−+−=

+⋅=

)()()1()1()(

)()()(

[ ]dI yy

zku

dugy

−−

=

+⋅=

1

dgkz

zygkz

gkyI

dI

I

+−−+

+−=

11

1

sampled timeintegrator

1=Igk ( )dzyzy d11 1 −− −+=

EE392m - Winter 2003 Control Engineering 4-6

Run-to-run (R2R) control• Main APC (Advanced

Process Control) approach insemiconductor processes

• Modification of a productrecipe between tool "runs"

Tool

Run-to-run control

Cell controller

Process

Runtimecontroller Metrology

system

Tunable

recipe

parameters

• Processes:– vapor phase epitaxy– lithography– chemical mechanical

planarization (CMP)– plasma etch

[ ]dI ytyktututdtugty

−+−=+⋅=

)()1()()()()(

EE392m - Winter 2003 Control Engineering 4-7

ekvkuev

yye

PI

d

−−==

−=&

;

duyy ++−=&τ

PI control• First-order system:

• P control + integrator forcancelling steady state error

Example:• WDM laser-diode temperature control

• Other applications• ATE• EDFA optical amplifiers• Fiber optic laser modules• Fiber optic network equipment

duyy ++−=&τ

heat loss to environment

heat capacity

y(t) = temperature - ambient temperaturepumped

heatproduced

heat

TemperatureController

Peltier Heatpump

EE392m - Winter 2003 Control Engineering 4-8

Cascade loop interpretation:

PI control• P Control + Integrator for

cancelling steady state error

• Velocity form of the controller

{)(

;

vkekekvkuev

yye

P

Ikk

iPPI

d

−=−−==

−=&

Inner loop

Plant

kP

e(t)u(t)

ki∫

y-yd

PiI kkk ⋅=ekeku PI && −−=[ ])1()()()()1( −−−−=+ tetektektutu PI

EE392m - Winter 2003 Control Engineering 4-9

PI control• Closed-loop dynamics

• Steady state (s = 0): .No steady-state error!

• Transient dynamics: look at thecharacteristic equation

• Disturbance rejection

dSS yy =

0)1(2 =+++ IP kk λτλ

)(ˆ)()(ˆ ωωω idiHiy d ⋅=

dkskss

sykskss

kskyIP

dIP

IP

++++

++++=

)1()1( ττ

0

0.2

0.4y(t)

Frequency (rad/sec)

DISTURBANCE REJECTION

MA

GN

ITU

DE

(dB

)10 -2 100 102

-40

-30

-20

-10

0

)( ωiHd

EE392m - Winter 2003 Control Engineering 4-10

PLL Example• Phase-locked loop is arguably a

most prolific feedback system

PLL

VoltageControlledOscillator

Hi-freqLPF

Loop Filter(controller)

reference signal

signal phase-locked to reference

uK

ttAKettAK

vrKe

ooo

odom

oodm

m

=∆=

−+−≈+×+=

×=

ωθθθωω

θωθω

&

)sin()cos()sin(LPF2

LPF2e

u

EE392m - Winter 2003 Control Engineering 4-11

PLL Loop Model• Small-signal model:

PLL

VCO

Kd C(s)

reference error

phase

{o

uK

KKe

o

d

do

dd

θ

θωωθθθ

−+−=

≈=

43421&&

)sin(e

u

1<<−+−= odott θθωωθ

odott θθωωθ −+−=

sKo−

∫ ⋅+=

=−=

dtekeku

KeuKd

IP

d

o

θθ&

d

dkskKKs

sIPdo ++

= 2θ

• Loop dynamics:

EE392m - Winter 2003 Control Engineering 4-12

PD control• 2-nd order dynamics

• PD control

• Closed-loop dynamics

• Optimal gains (critical damping)

Example:• Disk read-write controlduy +=&&

ekekuyye

PD

d

−−=−=&

DISTURBVCM TTJ +=ϕ&&

VoiceCoilMotor

dekeke PD =++ &&&

dksks

ePD ++

= 21

2;2 ττ == PD kk

EE392m - Winter 2003 Control Engineering 4-13

es

eesse

D

D

DD 1/11

1 ++=

+≈

ττ

ττ&

PD control• Derivative (rate of e) can be obtained

– speed sensor (tachometer)– low-level estimation logic

• Signal differentiation– is noncausal– amplifies high-frequency noise

• Causal (low-pass filtered) estimate of the derivative

• Modified PD controller:eke

ssku P

DD −

+−=

EE392m - Winter 2003 Control Engineering 4-14

PD control performance• The performance seems to be infinitely improving for

• This was a simple design model, remember?• Performance is limited by

– system being different from the model• flexible modes, friction, VCM inductance

– sampling in a digital controller– rate estimation would amplify noise if too aggressive– actuator saturation– you might really find after you have tried to push the performance

• If high performance is really that important, carefulapplication of more advanced control approaches might help

∞→== τττ ;;2 2PD kk

EE392m - Winter 2003 Control Engineering 4-15

Plant Type

• Constant gain - I control• Integrator - P control• Double integrator - PD control• Generic second order dynamics - PID control

EE392m - Winter 2003 Control Engineering 4-16

PID Control• Generalization of P, PI, PD• Early motivation: control of first

order processes with deadtime

Example:•

us

geysTD

1+=

τ

Papermachinecontrol

DT

τ

g

EE392m - Winter 2003 Control Engineering 4-17

PID Control

• PID: three-term control

• Sampled-time PID

• Velocity form– bumpless transfer between

manual and automatic

∫ ⋅−−−=

−=

dtekekeku

yye

IPD

d

&

( ) ez

kekezku IPD 11

111 −

−++−−=

future present past

( )( ))2()1(2)(

)1()()()()1(−+−−−

−−−−=+tetetek

tetektektutu

D

PI

independent sensor or an estimate

1

2

1 −−=∆

−∆−∆−=∆

zekekeku IPD

EE392m - Winter 2003 Control Engineering 4-18

sim

Tuning PID Control

• Model-based tuning• Look at the closed-loop poles• Numerical optimization

– For given parameters run a sim,compute performance parametersand a performance index

– Optimize the performance indexover the three PID gains usinggrid search or Nelder method.

eskksku I

PD

++−=

Plant model

Optimizer

IPD kkk ,, Performance

EE392m - Winter 2003 Control Engineering 4-19

Zeigler-Nichols tuning rule

• Explore the plant:– set the plant under P control and start increasing the gain till the

loop oscillates– note the critical gain kC and oscillation period TC

• Tune the controller:

• Z and N used a Monte Carlo method to develop the rule• Z-N rule enables tuning if a model and a computer are both

unavailable, only the controller and the plant are.

kP kI kDP 0.5kC

______ ______

PI 0.45kC 1.2kP/TC______

PID 0.5kC 2kP/TC kPTC/8

EE392m - Winter 2003 Control Engineering 4-20

Integrator anti wind-up• In practice, control authority is

always limited:– uMIN ≤ u(t) ≤ uMAX

• Wind up of the integrator:– if the integral v

will keep growing while the controlis constant. This results in a heavyovershoot later

• Anti wind-up:– switch the integrator off if the

control has saturated

<≤≤

>=

−−==

MINcMIN

MAXcMINc

MAXcMAX

PIc

uuuuuuu

uuuu

ekvkuev

,,

,

&

MAXc uu >

<>≤≤

=MINcMAXc

MAXcMIN

uuuuuuue

vor if0,

for ,&

EE392m - Winter 2003 Control Engineering 4-21

Industrial PID Controller• A box, not an algorithm• Auto-tuning functionality:

– pre-tune– self-tune

• Manual/cascade mode switch• Bumpless transfer between

different modes, setpoint ramp• Loop alarms• Networked or serial port

EE392m - Winter 2003 Control Engineering 5-1

Lecture 5 - Feedforward

• Programmed control• Path planning and nominal trajectory feedforward• Feedforward of the disturbance• Reference feedforward, 2-DOF architecture• Non-causal inversion• Input shaping, flexible system control• Iterative update of feedforward

EE392m - Winter 2003 Control Engineering 5-2

Why Feedforward?

• Feedback works even if we know little about the plantdynamics and disturbances

• Was the case in many of the first control systems• Much attention to feedback - for historical reasons

• Open-loop control/feedforward is increasingly used• Model-based design means we know something• The performance can be greatly improved by adding open-

loop control based on our system knowledge (models)

EE392m - Winter 2003 Control Engineering 5-3

Feedforward

• Main premise of the feedforward control:a model of the plant is known

• Model-based design of feedback control -the same premise

• The difference: feedback control is lesssensitive to modeling error

• Common use of the feedforward: cascadewith feedback

Plant

Feedbackcontroller

PlantFeedforwardcontroller

– this Lecture 5

– Lecture 4 PID– Lecture 6 Analysis– Lecture 7 Design

Feedforwardcontroller

Plant

Feedbackcontroller

EE392m - Winter 2003 Control Engineering 5-4

Open-loop (programmed) control• Control u(t) found by solving an

optimization problem. Constraints oncontrol and state variables.

• Used in space, missiles, aircraft FMS– Mission planning– Complemented by feedback corrections

• Sophisticated mathematical methodswere developed in the 60s toovercome computing limitations.

• Lecture 12 will get into more detailof control program optimization. UX ∈∈

→=

uxtuxJ

tuxfx

,min),,(),,(&

)(* tuu =Optimal control:

EE392m - Winter 2003 Control Engineering 5-5

Optimal control• Performance index and constraints• Programmed control

– compute optimal control as a time function for particular initial(and final) conditions

• Optimal control synthesis– find optimal control for any initial conditions– at any point in time apply control that is optimal now, based on

the current state. This is feedback control!– example: LQG for linear systems, gaussian noise, quadratic

performance index. Analytically solvable problem.– simplified model, toy problems, conceptual building block

• MPC - will discuss in Lecture 12

EE392m - Winter 2003 Control Engineering 5-6

Path/trajectory planning

• The disturbance caused by the change of the command rinfluences the feedback loop.

• The error sensitivity to the reference R(s) is bandpass:|R(iω)|<<1 for ω small

• A practical approach: choose the setpoint command (path) asa smooth function that has no/little high-frequencycomponents. No feedforward is used.

• The smooth function can be a spline function etc

low level controller

Plant

Feedbackcontroller

Commandedoutput orsetpoint

-

yd(t)

EE392m - Winter 2003 Control Engineering 5-7

Disturbance feedforward

• Disturbance acting on the plantis measured

• Feedforward controller canreact before the effect of thedisturbance shows up in theplant output

Feedforwardcontroller

Plant

Feedbackcontroller

Disturbance

Example:Temperature control. Measureambient temperature and adjustheating/cooling• homes and buildings• district heating• industrial processes -crystallization• electronic or optical components

EE392m - Winter 2003 Control Engineering 5-8

low level controller

Command/setpoint feedforward• The setpoint change acts as

disturbance on the feedback loop.• This disturbance can be measured• 2-DOF controller

Feedforwardcontroller

Plant

Feedbackcontroller

Commandedoutput orsetpoint

Examples:

•Servosystems– robotics

•Process control– RTP

•Automotive– engine torque demand

-

EE392m - Winter 2003 Control Engineering 5-9

Feedforward as system inversion

• Simple example:

PlantFeedforwardcontroller

yd(t) y(t)u(t)

More examples:

•Disk drive long seek

•Robotics: tracking a trajectory

[ ] dd ysPuyy

usPy1)(

)(−=⇒=

=

[ ]s

ssP

sssP

211)(

121)(

1

++=

++=

yd(t)

dsDydsDusPe

d )()()(

−≡+=

EE392m - Winter 2003 Control Engineering 5-10

Feedforward as system inversion

• Issue– high-frequency roll-off

• Approximate inverse solution:– ignore high frequency in some way

[ ] dd ysPuyy

usPy1)(

)(−=⇒=

=

)()(~

)(~ωωω

iPiyiu d=

0.01 0.1 1 10-20

-15

-10

-5

0

[ ] ssPs

sP

+=+

=

− 1)(1

1)(

1

proper

non-proper

EE392m - Winter 2003 Control Engineering 5-11

Proper transfer functions• Proper means deg(Denominator) ≥ deg(Numerator)• Strictly proper <=> high-frequency roll-off, all physical

dynamical systems are like that• Proper = strictly proper + feedthrough• State space models are always proper• Exact differentiation is noncausal, non-proper• Acceleration measurement example

d

d

xxxxkmau

uxm

=⇒−−=

=)(

&& xa &&=

this is wrong!

accelerometer

EE392m - Winter 2003 Control Engineering 5-12

Differentiation• Path/trajectory planning - mechanical servosystems• The derivative can be computed if yd(t) is known ahead of

time (no need to be causal then).

)()(,1)(

1)( ][][1- tdt

ydtyyssP

ysP n

nn

dn

dnd =⋅=

ssP

+=

11)(

ddddd yyys

ys

sysP +=

+=+= &&&

111)(1-

EE392m - Winter 2003 Control Engineering 5-13

Approximate Differentiation• Add low pass filtering:

( ) )(1

11)(†

sPssP n ⋅

+=

τ

)1(1

1)(

11)(

† ss

sP

ssP

+⋅+

=

+=

τ

2 4 6 8 10 120

0.2

0.4

0.6

0.8

1

Compute d feedforward

2 4 6 8 10 120

0.2

0.4

0.6

0.8

1Des ired and produced output

2.0=τ

EE392m - Winter 2003 Control Engineering 5-14

‘Unstable’ zeros• Nonminimum phase system

– r.h.p. zeros → r.h.p. poles– approximate solution: replace r.h.p. zeros by l.h.p. zeros

• RHP zeros might be used to approximate dead time– exact causal inversion impossible

• If preview is available, use a lead to compensate for thedeadtime

sssP

sssP

++=

+−=

125.01)(,

25.011)( †

sTsTesP Ts

+−≈= −

11)( 2

EE392m - Winter 2003 Control Engineering 5-15

Two sided z-transform,non-causal system

• Linear system is defined by a pulse response. Do not constrainourselves with a causal pulse response anymore

∑∞

−∞=

−=k

kukxhxy )()()(

• 2-sided z-transform gives a “transfer function”

∑∞

−∞=

−=k

kzkhzP )()(

• Oppenheim, Schafer, and Buck, Discrete-Time Signal Processing,2nd Edition, Prentice Hall, 1999.

• Fourier transform/Inverse Fourier transform are two-sided

EE392m - Winter 2003 Control Engineering 5-16

Impulse response decay

i

Imaginary

poles

1 Real

r

r-1

• Decay rate from the center = log r

-10 0 10

0

TAP DELAY NUMBER

NONCAUS AL RES P O NS E

EE392m - Winter 2003 Control Engineering 5-17

Non-causal inversion• Causal/anti-causal decomposition

– 2-sided Laplace-transformcausal

anti-causal

s−11

s−11

sssP25.01

1)(+

−=

{←

−+−=

−+=

ssssP

125.125.0

125.01)(1-

-10 -5 0 5-0.2

-0.15

-0.1

-0.05

0

0.05

0.1

0.15

DELAY

IMPULSE RESPONSE OF THE INVERSE

)(1)(1-

ωω

iPiP =

iFFT

EE392m - Winter 2003 Control Engineering 5-18

Frequency domain inversion• Regularized inversion:

( ) min)()()()( 22 →+−∫ ωωρωωω diuiuiPiyd

)()()()()(

)()( †*

*

ωωωρωω

ωω iyiPiyiPiP

iPiu dd =+

=

-2 -1 0-1.5

-1

-0.5

0

0.5

DELAY

REGULARIZED INVERSE

)1)(25.01(1

)(

sss

sP

++−

=

P†(iω)

min2

2

2

2→+− uPuyd ρ

• Systematic solution– simple, use FFT– takes care of everything– noncausal inverse– high-frequency roll-off– Paden & Bayo, 1985(?)

EE392m - Winter 2003 Control Engineering 5-19

Input Shaping: point-to-point control• Given initial and final conditions

find control input• No intermediate trajectory

constraints• Lightly damped, imaginary axis

poles– preview control does not work– other inversion methods do not work

well

• FIR notch fliter– Seering and Singer, MIT– Convolve Inc.

PlantFeedforwardcontrolleryd(t)

y(t)u(t)

Examples:• Disk drive long seek• Flexible space structures• Overhead gantry crane

EE392m - Winter 2003 Control Engineering 5-20

Pulse Inputs

• Compute pulse inputssuch that there is novibration.

• Works for a pulsesequence input

• Can be generalized toany input

EE392m - Winter 2003 Control Engineering 5-21

Input Shaping as signal convolution

• Convolution: ( ) ∑∑ −=− )()(*)( iiii ttfAttAtf δ

EE392m - Winter 2003 Control Engineering 5-22

Iterative update of feedforward• Repetition of control tasks

• Robotics– Trajectory control tasks:

Iterative Learning Control– Locomotion: steps

• Batch process control– Run-to-run control in

semiconductor manufacturing– Iterative Learning Control

(IEEE Control System Magazine,Dec. 2002)

Example:One-leggedhopping machine(M.Raibert)

Height control:yd = yd(t-Tn;a)h(n+1)=h(n)+Ga

stepFeedforwardcontroller Plant

Step-to-stepfeedback update

EE392m - Winter 2003 Control Engineering 5-23

Feedforward Implementation• Constraints and optimality conditions known ahead of time

– programmed control

• Disturbance feedforward in process control– has to be causal, system inversion

• Setpoint change, trajectory tracking– smooth trajectory, do not excite the output error– in some cases have to use causal ‘system inversion’– preview might be available from higher layers of control system,

noncausal inverse

• Only final state is important, special case of inputs– input shaping - notch filter– noncausal parameter optimization

EE392m - Winter 2003 Control Engineering 5-24

Feedforward Implementation• Iterative update

– ILC– run-to-run– repetitive dynamics

• Replay pre-computed sequences– look-up tables, maps

• Not discussed, but used in practice– Servomechanism, disturbance model– Sinusoidal disturbance tracking - PLL– Adaptive feedforward, LMS update

EE392m - Winter 2003 Control Engineering 6-1

Lecture 6 - SISO Loop Analysis

SISO = Single Input Single Output

Analysis:• Stability• Performance• Robustness

EE392m - Winter 2003 Control Engineering 6-2

ODE stability• Lyapunov’s stability theory - nonlinear

systems– stability definition– first (direct) method

• exponential convergence– second method: Lyapunov function

• generalization of energy dissipation

x1

x2

• Lyapunov’s exponent– dominant exponent of the

convergence– for a nonlinear system– for a linear system defined

by the poles

t

x

Ae-ax

-Ae-ax

),( txfx =&

εδ

EE392m - Winter 2003 Control Engineering 6-3

Stability: poles

• Characteristic values = transferfunction poles– l.h.p. for continuous time– unit circle for sampled time

• I/O model vs. internal dynamics

Real

Imag s

Real

Imag1

1

z( ) DBAIsCsH

usHy

+−=

⋅=−1)(

)(DuCxyBuAxx

+=+=&

01

1

)()()( g

psg

psg

sDsNsH

n

n +−

++−

== K

EE392m - Winter 2003 Control Engineering 6-4

Stability: closed loop

• The transfer function poles are the zeros of

• Watch for pole-zero cancellations!• Poles define the closed-loop dynamics (including stability)• Algebraic problem, easier than state space sim

11

)( :controller PID

+++

ssk

skk

sC

DDIP τ

)( :Plant sP

-e e

y

yd

udyyeesCu

usPy−=−=

=;)(

)(

[ ] d

sS

ysCsPe 44 344 21)(

1)()(1 −+=

)()(1 sCsP+

EE392m - Winter 2003 Control Engineering 6-5

Stability• For linear system poles describe stability• … almost, except the critical stability• For nonlinear systems

– linearize around the equilibrium– might have to look at the stability theory - Lyapunov

• Orbital stability:– trajectory converges to the desired– the state does not - the timing is off

• spacecraft• FMS, aircraft arrival

EE392m - Winter 2003 Control Engineering 6-6

Performance

• Need to describe and analyzeperformance so that we candesign systems and tunecontrollers

• There are usually manyconflicting requirements

• Engineers look for areasonable trade-off

sim

eskk

ssku I

PD

D

++

+−=

Plant model

Optimizer

IPD kkk ,, Performance

EE392m - Winter 2003 Control Engineering 6-7

Performance: Example

• Selecting optimal b in theWatt’s governor - HWAssignment 1

sim

Plant model, given b

Optimizerb Performance

2 2.5 3 3.5 4 4.5 5

1.75

1.8

1.85

1.9

1.95

2

2.05

2.1

2.15

DAMPING b

Performance indexin a transient vs b

damping b

EE392m - Winter 2003 Control Engineering 6-8

Performance - poles• Steady state error: study transfer functions at s=0.• Step/pulse response convergence, dominant pole

• Caution! Fast response (poles far to the left) leads to peaking

0

slow response

fast response

{ } njjpa

1Remin

==

0

atAeC −+ dominant exponent

EE392m - Winter 2003 Control Engineering 6-9

Performance - step response• Step response shape characterization:

– overshoot

– undershoot

– settling time

– rise time

0

steady state error

EE392m - Winter 2003 Control Engineering 6-10

Performance - quadratic index

• Quadratic performance– response, in frequency domain

0

ωω

πωωω

π

ωωπ

diSdiyiS

diedttytyJ

d

td

∫∫

∫∫

=

==−=∞

=

STEP

222

2

0

2

1)(21)(~)(

21

)(~21)()(

• If yd(t) is a zero mean random process with thespectral power Q (iω)

ωωωπ

diQiSdttytyEJt

d )()(21)()( 2

0

2

∫∫ =

−=

=

[ ] 1)()(1)( −+= sCsPsS

EE392m - Winter 2003 Control Engineering 6-11

Transfer functions in control loop

vsTnsSysSdsSuvsSnsTysTdsSyvsSnsTysSdsSe

uduu

yd

yd

)()()()()()()()()()()()(

+++−=

+++=

++−=

)( Controller

sC

)( Plant

sP

-e e

y

yd

v

u

ddisturbance

feedforward

reference

output

controlerror

nnoise

EE392m - Winter 2003 Control Engineering 6-12

Transfer functions in control loop

Sensitivity

Complementary sensitivity

Noise sensitivity

Load sensitivity

[ ][ ][ ][ ] )()()(1)(

)()()(1)(

)()()()(1)(

)()(1)(

1

1

1

1

sPsCsPsS

sCsCsPsS

sCsPsCsPsT

sCsPsS

y

u−

+=

+=

+=

+=

esCudvusPy

nyye d

)())((

−=++=

+−=

vsTnsSysSdsSuvsSnsTysTdsSyvsSnsTysSdsSe

uduu

yd

yd

)()()()()()()()()()()()(

+++−=

+++=

++−=

EE392m - Winter 2003 Control Engineering 6-13

Sensitivities

• Feedback sensitivity– |S (iω)|<<1 for |L (iω) |>>1– |S (iω)|≈1 for |L (iω) |<<1– can be bad for |L (iω) | ≈ 1 - ringing, instability

dysTdsSy )()( +=

)()()(,)(1

1)( sCsPsLiL

iS =+

ω

)( rd Feedforwa

sF )( Plant

sP- e

y

yd

ddisturbance

reference

output

error)(

Controller sC

)( Plant

sP

-e e

y

yd

ddisturbance

reference

output

error

dysPsFdy )()(+=

• Feedforward sensitivity– good for any frequency– never unstable

1)( =ωiSFF

EE392m - Winter 2003 Control Engineering 6-14

Sensitivity requirements

• Disturbance rejection and reference tracking– |S (iω)|<<1 for the disturbance d ; |Sy(iω)|<<1 for the input ‘noise’ v

• Limited control effort– |Su(iω)|<<1 conflicts with disturbance rejection where |P(iω)|<1

• Noise rejection– |T (iω)|<<1 for the noise n, conflicts with disturbance rejection

)()(1)()(

)()(1)()(

)()(11)(

ωωωω

ωωωω

ωωω

iCiPiCiS

iCiPiPiS

iCiPiS

u

y

+=

+=

+=

vsTnsSysSdsSuvsSnsTysTdsSyvsSnsTysSdsSe

uduu

yd

yd

)()()()()()()()()()()()(

+++−=

+++=

++−=

EE392m - Winter 2003 Control Engineering 6-15

Robustness

• Ok, we have a controller that works for a nominal model.• Why would it ever would work for real system?

– Will know for sure only when we try - V&V - similar to debuggingprocess in software

• Can check that controller works for a range of differentmodels and hope that the real system is covered by this range– This is called robustness analysis, robust design– Was an implicit part of the classical control design - Nyquist, Bode– Multivariable robust control - Honeywell: G.Stein, G.Hartmann, ‘81– Doyle, Zames, Glover - robust control theory

EE392m - Winter 2003 Control Engineering 6-16

Control loop analysis

• Why control might work if the process differs from the model?• Key factors

– modeling error (uncertainty) characterization– time scale (bandwidth) of the control loop

Plant

Feedbackcontroller

y(t) u(t)

Plant

Feedbackcontroller

y(t) u(t)

∆∆∆∆

)( dI yykuguy

−−==

&0)( =−+ dI yygky&

0

Actual step response

Step response for the design model:

y(t)=gu(t)

Modeling error

Uncertainty

EE392m - Winter 2003 Control Engineering 6-17

Robustness - Small gain theorem• Nonlinear uncertainty!

• Operator gain

– G can be a nonlinear operator

• L2 norm

• L2 gain of a linear operator

u(t) G y(t)

∆∆∆∆

uGGu ⋅≤

1<∆⋅G

The loop is guaranteed stable if

∫∫ == ωωπ

diudttuu 222 )(~21)(

( )44 344 214434421

22

2222 )(~21)(sup)(~)(

21

uG

diuiGdiuiGGu ∫∫ ⋅≤= ωωπ

ωωωωπ

(Open-loop stability assumed)

Desoer and Vidyasagar, FeedbackSystems: Input-Output Properties, 1975

G.Zames

EE392m - Winter 2003 Control Engineering 6-18

Robustness• Additive uncertainty

T (s)

P(s)

C(s)

y(t) u(t)

∆∆∆∆

1)()()(1

)()( <∆⋅+

∆321

44 344 21

ωωω

ωω iiCiP

iCiP

T

Condition of robust stability

Su(s)

P(s)

C(s)

y(t) u(t)

∆∆∆∆

1)()()(1

)( <∆⋅+

∆321

44 344 21

ωωω

ω iiCiP

iC

uS

Condition of robust stability

• Multiplicative uncertainty

EE392m - Winter 2003 Control Engineering 6-19

Nyquist stability criterion

• Homotopy “Proof”– G(s) is stable, hence the loop is stable

for γ=0. Increase γ to 1. The instabilitycannot occur unless γG(iw)+1=0 forsome 0 ≤ γ ≤ 1.

– |G(iω180)|<1 is a sufficient condition

• Subtleties: r.h.p. poles and zeros– Formulation and real proof using the

agrument principle, encirclements of -1– stable → unstable → stable as 0→γ→1

u(t) G(s) y(t)

γ=1

Compare against Small Gain Theorem:

-

EE392m - Winter 2003 Control Engineering 6-20

Gain and phase margins

• Loop gain

• Nyquist plot for L– at high frequency

Im L(s)

Re L(s)

1/gm

ω180

ωgc

ϕm

-1

)(sC

)(sP-y

v

)(sC )(sPy

v1−=

[ ] 1)(1)(

)()()(−+=

=

sLsS

sCsPsL gain margin

phasemargin1)( ≤ωiL

EE392m - Winter 2003 Control Engineering 6-21

Gain and phase margins• Bode plots

Im L(s)

Re L(s)

1/gm

ω180

ωgc

ϕm

-1

ω180

ωgc

gain crossover

phase crossover

gain margin

phasemargin

EE392m - Winter 2003 Control Engineering 6-22

Advanced Control• Observable and controllable system

– Can put poles anywhere– Can drive state anywhere

• Why cannot we just do this?– Large control– Error peaking– Poor robustness, margins

• Observability and controllability = matrix rank• Accuracy of solution is defined by condition number

• Analysis of this lecture is valid for any LTI control,including advanced

EE392m - Winter 2003 Control Engineering 7-1

Lecture 7 - SISO Loop Design

• Design approaches, given specs• Loopshaping: in-band and out-of-band specs• Design example• Fundamental design limitations for the loop

– Frequency domain limitations– Structural design limitations– Engineering design limitations

EE392m - Winter 2003 Control Engineering 7-2

Modern control design• Observable and controllable system

– Can put poles anywhere– Can drive state anywhere– Can design ‘optimal control’

• Issues– Large control– Error peaking in the transient– Noise amplification– Poor robustness, margins– Engineering trade off vs. a single optimality index

EE392m - Winter 2003 Control Engineering 7-3

Feedback controller design

• Conflicting requirements• Engineers look for a

reasonable trade-off– Educated guess, trial and

error controller parameterchoice

– Optimization, if theperformance is reallyimportant

• optimality parameters areused as tuning handles

Analysis and simulation

eskk

ssku I

PD

D

++

+−=

Plant model

Design process

D

I

P

kkk

Stability Performance Robustness

IndexesConstraintsSpecs

EE392m - Winter 2003 Control Engineering 7-4

Loopshape requirementsPerformance

• Disturbance rejection and reference tracking– |S (iω)|<<1 for the disturbance d; |P(iω)S(iω)|<<1 for the load v– satisfied for |L (iωωωω)|>>1

• Noise rejection– |T(iω)|=|S(iω)L(iω)| < 1 is Ok unless |1+ L(iω)| is small

• Limited control effort– |C(iω) S(iω)|<1– works out with large |C(iω)| for low frequency, where |P(iω)|>1

[ ] 1)(1)(

)()()(−+=

=

ωωωωω

iLiS

iCiPiL

EE392m - Winter 2003 Control Engineering 7-5

Loopshape requirementsRobustness

• Multiplicative uncertainty– |T(iω)| < 1/δ(ω), where δ(ω) is the uncertainty magnitude– at high frequencies, relative uncertainty can be large, hence, |T(iω)|

must be kept small– must have |L(iω)|<<1 for high frequency, where δδδδ(ωωωω) is large

• Additive uncertainty– |C(iω) S(iω)| < 1/δ(ω), where δ(ω) is the uncertainty magnitude

• Gain margin of 10-12db and phase margin of 45-50 deg– this corresponds to the relative uncertainty of the plant transfer

function in the 60-80% range around the crossover

EE392m - Winter 2003 Control Engineering 7-6

Gain and phase margins

• Are less informativethan the noisesensitivity

Im L(s)

Re L(s)

1/gm

ϕm

-1[ ] 1)()(1)()( −+= sCsPsCsSu

Additive uncertainty|∆(iω)| radius

sensitivitypeak margin

• Can use uncertaintycharacterization andthe sensitivity instead

• Margins are useful fordeciding upon the loopshape modifications

EE392m - Winter 2003 Control Engineering 7-7

Loop Shape Requirements• Low frequency:

– high gain L= small S

• High frequency:– small gain L

= small T · large δ• Bandwidth

– performance can beonly achieved in alimited frequencyband: ω ≤ ωB

– ωB is the bandwidth

Fundamental tradeoff: performance vs. robustness

0 dB

ωgc

|L(iω)|

ωB

Performance

RobustnessBandwidth

slope

EE392m - Winter 2003 Control Engineering 7-8

Loopshaping design

• Loop design– Use P,I, and D feedback to shape the loop gain

• Loop modification and bandwidth– Low-pass filter - get rid of high-frequency stuff - robustness– Notch filter - get rid of oscillatory stuff - robustness– Lead-lag to improve phase around the crossover - bandwidth

• P+D in the PID together have a lead-lag effect

• Need to maintain stability while shaping the magnitude ofthe loop gain

• Formal design tools H2, H∞, LMI, H∞ loopshaping– cannot go past the fundamental limitations

EE392m - Winter 2003 Control Engineering 7-9

Example - disk drive servo• The problem from HW Assignment 2

– data in diskPID.m, diskdata.mat

• Design model: is an uncertainty

• Analysis model: description for• Design approach: PID control based on

the simplified model

)()( 20 sP

sgsP ∆+=

1)(

+++=

ssk

skksC

DD

IP τ

Disk servo control

EDISTURBANCVCM TTJ +=ϕ&&

VoiceCoilMotor

)(sP∆

)(sP∆

EE392m - Winter 2003 Control Engineering 7-10

Disk drive servo controller• Start from designing a PD controller

– poles, characteristic equation

( )

0

010)()(1

002

20

=++

=+⋅+⇒=+

PD

DP

kgksgssgskksPsC

02

000 /;/2 gwkgwk PD ==• Critically damped system

where frequency w0 is the closed-loop bandwidth

• In the derivative term make dynamics fasterthan w0. Select 0/25.0 wD =τ 1+s

skD

D τ

EE392m - Winter 2003 Control Engineering 7-11

Disk drive servo• Step up from PD to PID control

0

011

00023

20

=+++

=⋅

+++

IPD

IDP

kgksgkgsssgk

sskk

0030000

20 //;/;/ wcgbwkgawkgwk DIDP ==== τ

• Keep the system close to the critically damped, add integratorterm to correct the steady state error, keep the scaling

where a, b, and c are the tuning parameters

• Initial guess: w0 =2000; a=2; b=0.1; c =0.25• Tune a, b, c and w0 by watching performance and robustness

EE392m - Winter 2003 Control Engineering 7-12

Disk drive - controller tuning

• Tune a, b, w0 , and τD by trial and error• Find a trade off taking into the account

– Closed loop step response– Loop gain - performance– Robustness - sensitivity– Gain and phase margins

• Try to match the characteristics of C2 controller (demo)

• The final tuned values:w0 =1700; a=1.5; b=0.5; c=0.2

EE392m - Winter 2003 Control Engineering 7-13

Disk servo - controller comparison• PID is compared

against a referencedesign

• Reference design: 4-thorder controller: lead-lag + notch filter– Matlab diskdemo– Data in diskPID.m,diskdata.mat

4th-order compe nsa tor C2 (blue, das hed), PID (red)

Time (sec)

Ampl

itude

0 0.005 0.01 0.015-0.05

0

0.05

0.1

0.15

0.2

0.25

0.3

EE392m - Winter 2003 Control Engineering 7-14

Loop shape, marginsLOOP GAIN - C2 (blue, dashe d), PID (red)

Frequency (rad/sec)

Phas

e (d

eg)

Mag

nitu

de (d

B)

-100

-50

0

50

100

150

200

100 101 102 103 104-900

-720

-540

-360

-180

0

Crossoverarea of interest

EE392m - Winter 2003 Control Engineering 7-15

Disk drive servo - robustness

104

-30

-25

-20

-15ROBUS TNESS TO PLANT UNCERTAINTY (dB) - C2 (blue , da s he d), PID (re d)10

4

-50

-40

-30

-20

-10

TRANSFER FUNCTION AND ACCEP TABLE UNCERTAINTY - C2 (blue , da s he d), PID (re d, dotte d)

[m2,ph2]=bode(feedback(C2,Gd),w))

[mP,phP]=bode(feedback(PIDd,Gd),w))

Full model

Simple model

Robust stability bounds

PID

C2 - Matlab demo

plot(w,1./mP,w,1/m2)

1/|Su(iω)|

EE392m - Winter 2003 Control Engineering 7-16

Fundamental design limitations

• If we do not have a reference design - how do we know ifwe are doing well. May be there is a much bettercontroller?

• Cannot get around the fundamental design limitations– frequency domain limitations on the loop shape– system structure limitations– engineering design limitations

EE392m - Winter 2003 Control Engineering 7-17

Frequency domain limitationS(iω) + T(iω) = 1

• Bode’s integral constraint - waterbed effect

Robustness: |T(iω)|<<1 Performance: |S(iω)|<<1

-6

-4

-2

0

log |S(iω)|

0)(log0

=∫∞

ωω diS (for most real-life stable system, or worse for the rest)

EE392m - Winter 2003 Control Engineering 7-18

Structural design limitations

• Delays and non-minimum phase (r.h.s. zeros)– cannot make the response faster than delay, set bandwidth smaller

• Unstable dynamics– makes Bode’s integral constraint worse– re-design system to make it stable or use advanced control design

• Flexible dynamics– cannot go faster than the oscillation frequency– practical approach:

• filter out and use low-bandwidth control (wait till it settles)• use input shaping feedforward

EE392m - Winter 2003 Control Engineering 7-19

Unstable dynamics• Very advanced applications

– need advanced feedback control design

EE392m - Winter 2003 Control Engineering 7-20

Flexible dynamics• Very advanced

applications– really need control of 1-3

flexible modes

EE392m - Winter 2003 Control Engineering 7-21

Engineering design limitations• Sensors

– noise - have to reduce |T(iω)| - reduced performance– quantization - same effect as noise– bandwidth (estimators) - cannot make the loop faster

• Actuators– range/saturation - limit the load sensitivity |C(iω) S(iω)|– actuator bandwidth - cannot make the loop faster– actuation increment - sticktion, quantization - effect of a load variation– other control handles

• Modeling errors– have to increase robustness, decrease performance

• Computing, sampling time– Nyquist sampling frequency limits the bandwidth

EE392m - Winter 2003 Control Engineering 8-1

Lecture 8 - Model Identification• What is system identification?• Direct pulse response identification• Linear regression• Regularization• Parametric model ID, nonlinear LS

EE392m - Winter 2003 Control Engineering 8-2

What is System Identification?

• White-box identification– estimate parameters of a physical model from data– Example: aircraft flight model

• Gray-box identification– given generic model structure estimate parameters from data– Example: neural network model of an engine

• Black-box identification– determine model structure and estimate parameters from data– Example: security pricing models for stock market

Data Identification ModelExperiment

Plant

Rar

ely

used

inre

al-li

fe c

ontro

l

EE392m - Winter 2003 Control Engineering 8-3

Industrial Use of System ID• Process control - most developed ID approaches

– all plants and processes are different– need to do identification, cannot spend too much time on each– industrial identification tools

• Aerospace– white-box identification, specially designed programs of tests

• Automotive– white-box, significant effort on model development and calibration

• Disk drives– used to do thorough identification, shorter cycle time

• Embedded systems– simplified models, short cycle time

EE392m - Winter 2003 Control Engineering 8-4

Impulse response identification

• Simplest approach: apply control impulse and collect thedata

• Difficult to apply a short impulse big enough such that theresponse is much larger than the noise

0 1 2 3 4 5 6 70

0.2

0.4

0.6

0.8

1IMPULSE RESPONSE

TIME

0 1 2 3 4 5 6 7-0.5

0

0.5

1NOISY IMP ULSE RESPONSE

TIME• Can be used for building simplifiedcontrol design models from complex sims

EE392m - Winter 2003 Control Engineering 8-5

Step response identification

• Step (bump) control input and collect the data– used in process control

• Impulse estimate still noisy: impulse(t) = step(t)-step(t-1)0 200 400 600 800 1000

0

0.5

1

1.5STEP RESPONSE OF PAPER WEIGHT

TIME (SEC)

0 100 200 300 400 500 600

0

0.1

0.2

0.3

IMPULSE RESPONSE OF PAPER WEIGHT

TIME (SEC)

Actuator bumped

EE392m - Winter 2003 Control Engineering 8-6

Noise reduction

Noise can be reduced by statistical averaging:• Collect data for mutiple steps and do more averaging to

estimate the step/pulse response• Use a parametric model of the system and estimate a few

model parameters describing the response: dead time, risetime, gain

• Do both in a sequence– done in real process control ID packages

• Pre-filter data

EE392m - Winter 2003 Control Engineering 8-7

Linear regression

• Mathematical aside– linear regression is one of the main System ID tools

)()()(1

tetty j

N

jj +=∑

=

ϕθ

Data Regression weights Regressor Error

ey +Φ= θ

=

=

=

)(

)1(,,

)()(

)1()1(,

)(

)1( 1

1

1

Ne

ee

NNNy

yy

KK

K

MM

K

MOM

K

M

θ

θθ

ϕϕ

ϕϕ

EE392m - Winter 2003 Control Engineering 8-8

Linear regression

• Makes sense only when matrix Φ istall, N > K, more data available thanthe number of unknown parameters.– Statistical averaging

• Least square solution: ||e||2 → min– Matlab pinv or left matrix division \

• Correlation interpretation:

( ) yTT ΦΦΦ= −1θ̂

ey +Φ= θ

=

=

∑∑

∑∑

=

=

==

==

N

tK

N

t

N

tK

N

tK

N

tK

N

t

tyt

tyt

Nc

ttt

ttt

NR

1

11

1

2

11

11

1

2

)()(

)()(1,

)()()(

)()()(1

1

ϕ

ϕ

ϕϕϕ

ϕϕϕ

M

K

MOM

K

cR 1ˆ −=θ

EE392m - Winter 2003 Control Engineering 8-9

Example: linear first-order model

• Linear regression representation

)()1()1()( tetgutayty +−+−=

=−=−=

ga

tuttyt

θϕϕ

)1()()1()(

2

1

• This approach is considered in most of the technicalliterature on identification

• Matlab Identification Toolbox– Industrial use in aerospace mostly– Not really used much in industrial process control

• Main issue:– small error in a might mean large change in response

Lennart Ljung, System Identification: Theory for the User, 2nd Ed, 1999

( ) yTT ΦΦΦ= −1θ̂

EE392m - Winter 2003 Control Engineering 8-10

Regularization

• Linear regression, where is ill-conditioned• Instead of ||e||2 → min solve a regularized problem

r is a small regularization parameter• Regularized solution

• Cut off the singular values of Φ that are smaller than r

ey +Φ= θ

ΦΦT

min22 →+ θre

( ) yrI TT Φ+ΦΦ= −1θ̂

EE392m - Winter 2003 Control Engineering 8-11

Regularization• Analysis through SVD (singular value decomposition)

• Regularized solution

• Cut off the singular values of Φ that are smaller than r

njj

mmnnT sSRURVUSV 1,, }diag{;;; ==∈∈=Φ

( ) yUrs

sVyrI T

n

jj

jTT

+=Φ+ΦΦ=

=

12

1 diagθ̂

0 1 2 3 4 50

0.5

1

1.5

2

s

REGULARIZED INVERSE

1.02 +ss

EE392m - Winter 2003 Control Engineering 8-12

Linear regression for FIR model

• Linear regression representation

)()()()(1

tektukhtyK

k+−=∑

=

=

−=

−=

)(

)1(

)()(

)1()(1

Kh

h

Ktut

tut

K

MM θϕ

ϕ( ) yrI TT Φ+ΦΦ= −1θ̂

• Identifying impulse response byapplying multiple steps

• PRBS excitation signal• FIR (impulse response) model 0 10 20 30 40 50

-1

-0.5

0

0.5

1PRBS EXCITATION SIGNAL

PRBS =Pseudo-Random Binary Sequence,see IDINPUT in Matlab

EE392m - Winter 2003 Control Engineering 8-13

Example: FIR model ID

• PRBS excitationinput

• Simulated systemoutput: 4000samples, randomnoise of theamplitude 0.5

0 200 400 600 800 1000-1

-0.5

0

0.5

1PRBS excita tion

0 200 400 600 800 1000

-1

-0.5

0

0.5

1

SYSTEM RESPONSE

TIME

EE392m - Winter 2003 Control Engineering 8-14

Example: FIR model ID

• Linear regressionestimate of the FIRmodel

• Impulse responsefor the simulatedsystem:

T=tf([1 .5],[1 1.1 1]);

P=c2d(T,0.25);

0 1 2 3 4 5 6 7-0.05

0

0.05

0.1

0.15

0.2

FIR es tima te

Impuls e Res pons e

Time (s ec)0 1 2 3 4 5 6 7

-0.05

0

0.05

0.1

0.15

0.2

EE392m - Winter 2003 Control Engineering 8-15

Nonlinear parametric model ID

• Prediction model depending onthe unknown parameter vector

• Loss index

• Iterative numerical optimization.Computation of V as a subroutine sim

Model including theparameters

Optimizerθ Loss Index V

)(tu

∑ −= 2)|(ˆ)( θtytyV

θ

∑ −= 2)|(ˆ)( θtytyJ

)|(ˆ)MODEL()( θθ tytu →→

)(tyθ

Lennart Ljung, “Identification for Control: Simple Process Models,”IEEE Conf. on Decision and Control, Las Vegas, NV, 2002

EE392m - Winter 2003 Control Engineering 8-16

Parametric ID of step response• First order process with deadtime• Most common industrial process model• Response to a control step applied at tB

Example:

( )

−≤−>−

+=−−

DB

DBTtt

TttTtteg

tyDB

for ,0for ,1

)|(/)( τ

γθ

Papermachineprocess

DT

τ

g

=

DT

γ

θ

EE392m - Winter 2003 Control Engineering 8-17

Gain estimation

• For given , the modeled step response can bepresented in the form

• This is a linear regression

• Parameter estimate and prediction for given

),|()|( 1 DTtygty τγθ ⋅+=

∑=

=2

1

)()|(k

kk twty ϕθ

DT,τ

( ) yTw TTD ΦΦΦ= −1),(ˆ τ ),|(ˆˆ),|(ˆ 1 DD TtygTty τγτ ⋅+=

1)(),|()(

2

11

2

1

==

==

tTtyt

wgw D

ϕτϕ

γ

DT,τ

EE392m - Winter 2003 Control Engineering 8-18

Rise time/dead time estimation

• For given , the loss index is

• Grid and find the minimum of

DT,τ

∑=

−=N

tDTtytyV

1

2),|(ˆ)( τ

),( DTVV τ=DT,τ

EE392m - Winter 2003 Control Engineering 8-19

Examples: Step response ID• Identification results for real industrial process data• This algorithm works in an industrial tool used in 500+

industrial plants, many processes each

0 10 20 30 40 50 60 70 80-0.4

-0.2

0

0.2

0.4

0.6

0.8

1

0 100 200 300 400 500 600 700 800-0.2

0

0.2

0.4

0.6

0.8

1

1.2

1.4

1.6Proce s s pa ra me te rs : Ga in = 0.134; Tde l = 0.00; Tris e = 119.8969

time in s ec.; MD res pons e - solid; e s tima te d re spons e - da s hed

Linear Regression ID

of the first-ordermodel

Nonlinear Regression ID

Nonlinear Regression ID

EE392m - Winter 2003 Control Engineering 8-20

Linear filtering

• L is a linear filtering operator, usually LPF

• A trick that helps: pre-filter data• Consider data model

euhy += *

{ {

)(**)()*(

)*(

LuhuLhuhL

LeuhLLyff

ey

==

+=

• Can estimate h from filtered y and filtered u• Or can estimate filtered h from filtered y and ‘raw’ u• Pre-filter bandwidth will limit the estimation bandwidth

EE392m - Winter 2003 Control Engineering 8-21

Multivariable ID• Apply SISO ID to various input/output pairs• Need n tests - excite each input in turn

• Step/pulse response identification is a key part of theindustrial Multivariable Predictive Control packages.

EE392m - Winter 2003 Control Engineering 9-1

Lecture 9 - Processes withDeadtime, IMC

• Processes with deadtime• Model-reference control• Deadtime compensation: Dahlin controller• IMC• Youla parametrization of all stabilizing controllers• Nonlinear IMC

– Dynamic inversion - Lecture 13– Receding Horizon - MPC - Lecture 12

EE392m - Winter 2003 Control Engineering 9-2

Processes with deadtime

• Examples: transport deadtime in mining, paper, oil, food

EE392m - Winter 2003 Control Engineering 9-3

Processes with deadtime

• Example: resource allocation in computing

ComputingTasks

Resource

ResourceQueues

Modeling

DifferenceEquation

Feedback Control

DesiredPerformance

EE392m - Winter 2003 Control Engineering 9-4

Control of process with deadtime

• PI control of a deadtime process

0 5 10 15 20 25 300

0.2

0.4

0.6

0.8

1

PLANT: P = z -5 ; PI CONTROLLER: kP = 0.3, k I= 0.2

• Can we do better?– Make

– Deadbeat controller

d

sT

zPeP D

== continuous time

discrete time

dzPC

PC −=+1

d

d

zzPC −

−=

1 dzC −−

=1

1 0 5 10 15 20 25 30

0

0.2

0.4

0.6

0.8

1

DEADBEAT CONTROL

)()()( tedtutu +−=

EE392m - Winter 2003 Control Engineering 9-5

Model-reference control

• Deadbeat control has bad robustness, especially w.r.t.deadtime

• More general model-reference control approach– make the closed-loop transfer function as desired

)()()(1

)()( zQzCzP

zCzP =+

)(1)(

)(1)(

zQzQ

zPzC

−⋅=

• Works if Q(z) includes a deadtime, at least as large as inP(z)

EE392m - Winter 2003 Control Engineering 9-6

Dahlin’s controller

• Eric Dahlin worked for IBM in San Jose (?)then for Measurex in Cupertino.

• Dahlin’s controller, 1968

d

d

zz

zQ

zbz

bgzP

−−

−−

−−=

−−=

1

1

11)(

1)1()(

αα

dzzbgbzzC −−

−−−−⋅

−−=

)1(11

)1(1)( 1

1

ααα

• plant, generic first orderresponse with deadtime• reference model

• Dahlin’s controller

• Single tuning parameter: α - tuned controller

)(1)(

)(1)(

zQzQ

zPzC

−⋅=

EE392m - Winter 2003 Control Engineering 9-7

Dahlin’s controller• Dahlin’s controller is broadly used through paper industry

in supervisory control loops - Honeywell-Measurex, 60%.• Direct use of the identified model parameters.

0 10 20 30 40 50 600

0.2

0.4

0.6

0.8

1

CLOSED-LOOP STEP RESPONSE WITH DAHLIN CONTROLLER

Ta=2.5TDTa=1.5TDOpen-loop

0 10 20 30 40 50 600

0.5

1

1.5

CONTROL STEP RESPONSE

• Industrial tuningguidelines:Closed loop timeconstant = 1.5-2.5deadtime.

EE392m - Winter 2003 Control Engineering 9-8

Internal Model Control - IMC

• continuous time s• discrete time z

P

P0

e

QeuPuyre

=−−= )(

01 QPQC

−=

EE392m - Winter 2003 Control Engineering 9-9

IMC and Youla parametrization

QSQPT

QPS

u ==

−=

0

01• Sensitivities

udyryd

→→→

• If Q is stable, then S, T, and the loop are stable• If loop is stable, then Q is stable01 CP

CQ+

=

01 QPQC

−=

• Choosing various stable Q parameterizes all stabilizingcontrollers

• This is called Youla parameterization• Youla parameterization is valid for unstable systems as well

EE392m - Winter 2003 Control Engineering 9-10

Q-loopshaping

• Systematic controller design: select Q to achieve thetradeoff

• The approach used in modern advanced control design:H2/H∞, LMI, H∞ loopshaping

• Q-based loopshaping:

• Recall system inversion

01 QPS −= ( ) 101 −≈⇒<< PQS • in band

Inversion

EE392m - Winter 2003 Control Engineering 9-11

Q-loopshaping

• Loopshaping

• Lambda-tuned IMC †

0

01QPT

QPS=

−= ( )11

1

0

10

<<⇒<<≈⇒<< −

QPTPQS

( )nsF

FQPSFPQ

λ+=

−≈−==

11

11, 0†

0

• in band• out of band

• F is called IMC filter, F≈ T, reference model for the output

• For minimum phase plant

Loopshaping

( ) FTPFFPQ === − ,10

†0

EE392m - Winter 2003 Control Engineering 9-12

IMC extensions

• Multivariable processes• Nonlinear process IMC• Dynamic inversion in flight control - Lecture 13 - ?• Multivariable predictive control - Lecture 12

EE392m - Winter 2003 Control Engineering 9-13

Nonlinear process IMC

• Can be used for nonlinear processes– linear Q– nonlinear model P0

– linearized model L

e

EE392m - Winter 2003 Control Engineering 9-14

Industrial applications of IMC

• Multivariable processes with complex dynamics• Demonstrated and implemented in process control by

academics and research groups in very large corporations.• Not used commonly in process control (except Dahlin

controller)– detailed analytical models are difficult to obtain– field support and maintenance

• process changes, need to change the model• actuators/sensors off• add-on equipment

EE392m - Winter 2003 Control Engineering 9-15

Dynamic inversion in flight control

• HoneywellMACH

)(),(),(

1 FvGuuvxGvxFv

des −=+=

− &

&

=

NCVMCVLCV

v

X-38 - Space StationLifeboat

EE392m - Winter 2003 Control Engineering 9-16

Dynamic inversion in flight control• NASA JSC study for X-38• Actuator allocation to get desired forces/moments• Reference model (filter): vehicle handling and pilot ‘feel’• Formal robust design/analysis (µ-analysis etc)

EE392m - Winter 2003 Control Engineering 9-17

Summary

• Dahlin controller is used in practice– easy to understand and apply

• IMC is not really used much– maintenance and support issues

• Youla parameterization is used as a basis of modernadvanced control design methods.– Industrial use is very limited.

• Dynamic inversion is used for high performance control ofair and space vehicles– this was presented for breadth, the basic concept is simple– need to know more of advanced control theory to apply in practice

EE392m - Winter 2003 Control Engineering 10-1

Lecture 10 - Optimization

• LP– Process plants - Refineries– Actuator allocation for flight control– More interesting examples

• Introduce QP problem

• More technical depth– E62 - Introduction to Optimization - basic– EE364 - Convex Optimization - more advanced

EE392m - Winter 2003 Control Engineering 10-2

Real-time Optimization in Control

• Important part of multivariable control systems• Many actuators, control handles• Quasistatic control, dynamics are not important

– slow process– low-level fast control loops– fast actuators

EE392m - Winter 2003 Control Engineering 10-3

Optimization methods

• Need to state problem such that a solution can becomputed quickly, efficiently, reliably

• Least squares - linear quadratic problems– analytical closed form, matrix multiplication and inversion

• Linear Programming– simplex method

• Quadratic Programming– interior point

• Convex optimization: includes LP, QP, and more

EE392m - Winter 2003 Control Engineering 10-4

Optimization in Process Plants

EE392m - Winter 2003 Control Engineering 10-5

Optimization in Process Plants

EE392m - Winter 2003 Control Engineering 10-6

Linear programming

• LP Problem:

min→=

=≤

xfJhGxbAx

T

• Matlab Optimization Toolbox: LINPROG

≤⇔≤

nn yx

yxyx M

11

• Might be infeasible! … no solution satisfies all constraints

EE392m - Winter 2003 Control Engineering 10-7

Linear programming

fTx = const

xopt

-f

min→=

=≤

xfJhGxbAx

T

• Simplex method in a nutshell:– check the vertices for value of J, select optimal– issue: exponential growth of number of vertices with the problem size– Need to do 10000 variables and 500000 inequalities.

• Modern interior point methods are radically faster– no need to understand, standard solvers are available

EE392m - Winter 2003 Control Engineering 10-8

Refinery Optimization

• Crude supply chain - multiple oil sources• Distillation - separating fractions• Blending - ready products, given octane ratings• Objective function - profit• LP works ideally:

– linear equalities and inequalities, single linear objective function

EE392m - Winter 2003 Control Engineering 10-9

Blending Example• A Blending Problem: A refinery produces two grades of

fuel, A and B, which are made by blending five raw stocksof differing octane rating, cost and availability

Gasoline Octane Rating Price $/BA 93 37.5B 85 28.5

Stock Octane Rating Price $/B Availability1 70 9.0 20002 80 12.5 40003 85 12.5 40004 90 27.5 50005 99 27.5 3000

EE392m - Winter 2003 Control Engineering 10-10

Blending Example

US1

US2

US3

US4

US5

FA

FB

1

2

3

4

5

A

B

1

2

3

4

5

SA1,SB1

SA2,SB2

SA3,SB3

SA4,SB4

SA5,SB5

EE392m - Winter 2003 Control Engineering 10-11

Blending Example• LP problem formulation:J = 9US1 + 12.5US2 + 12.5US3 + 27.5US4 + 27.5US5 + 37.5FA + 28.5FB -> MAX

[Stock Availability]S1A +S1B +US1 = 2000

S2A + S2B + US2 = 4000S3A + S3B + US3 = 4000

S4A + S4B + US4 = 5000S5A+ S5B + US5 = 3000

[Fuel Quantity]S1A+S2A+S3A+S4A+S5A = FA

S1B+S2B+S4B+S5B = FB

[Fuel Quality]70S1A + 80S2A + 85S3A + 90S4A + 99S5A ≥ 93FA [Quality A]70S1B + 80S2B + 85S3B + 90S4B + 99S5B ≥ 85FB [Quality B]

[Nonnegativity]S1A,S2A,S3A,S4A,S5A,S1B,S2B,S4B,S5B,US1,US2,US3,US4,US5,FA,FB ≥ 0

EE392m - Winter 2003 Control Engineering 10-12

Matlab code for the example% OctRt Price $/BGas = [93 37.5;

85 28.5];%Stock OctRt Price $/B AvailabilityStock = [70 12.5 2000;

80 12.5 4000;85 12.5 4000;90 27.5 5000;99 27.5 3000];

% Revenuef = [zeros(10,1); Stock(:,3); Gas(:,2)];% Equality constraintG = [eye(5,5) eye(5,5) eye(5,5) zeros(5,2);

ones(1,5) zeros(1,5) zeros(1,5) -1 0;zeros(1,5) ones(1,5) zeros(1,5) 0 -1];

h = [Stock(:,3); zeros(2,1)];% Inequality (fuel quality) constraintsA = [-[Stock(:,1)' zeros(1,5) zeros(1,5);

zeros(1,5) Stock(:,1)' zeros(1,5)] diag(Gas(:,1))];b = zeros(2,1);% X=LINPROG(f,A,b,Aeq,beq,LB,UB)x = linprog(-f,A,b,G,h,zeros(size(f)),[]);Revenue = f'*x

EE392m - Winter 2003 Control Engineering 10-13

Blending Example - Results• Blending distribution:

Total Revenue:$532,125

1 2 3 4 50

1000

2000

3000

4000

5000SA

1 2 3 4 50

1000

2000

3000

4000

5000SB

Produced Fuel:A 2125B 15875

EE392m - Winter 2003 Control Engineering 10-14

GPS• Determining coordinates by comparing distances to several

satellites with known positions• See E62 website:

http://www.stanford.edu/class/engr62e/handouts/GPSandLP.ppt

EE392m - Winter 2003 Control Engineering 10-15

Computing Resource Allocation

• Web Server Farm• LP formulation for

the optimal loaddistribution

EE392m - Winter 2003 Control Engineering 10-16

Aircraft actuator allocation

• Mutiple flight control surfaces

EE392m - Winter 2003 Control Engineering 10-17

Aircraft actuator allocation• Mutiple flight control surfaces: ailerons, elevons, canard

foreplanes, trailing and leading edge flaps, airbrakes, etc

BuF

uVBMMM

yaw

pitch

roll

=

=

),,( ϕα

Allocation

AlgorithmFdesired u

EE392m - Winter 2003 Control Engineering 10-18

Actuator allocation

• Simplest approach - least squares

min1

→uwT

( ) TT BBBB

FBu1†

−=

=

solves min, 2

2→= uFBu

• LP optimization approach

0,1

≥⋅=∑ kkkT wuwuw

−+ −= uuu

FBuBuuu

uwuw TT

=−≥

→+

−+

+

−+

00

min

Solve the LP, get

LP,FBu =

EE392m - Winter 2003 Control Engineering 10-19

Actuator allocation

vFBu

vuwT

=

→− min1

• Need to handle actuator constrains (v - scale factor)

• LP can be extended to include actuator constrains

10 ≤≤≤≤

vuuu ul

10

0min

≤≤≤−≤

≤≤=−−→−+

+

−+

−+

vuuu

uuuvFBuBu

vuwuw

ul

ul

TT [ ]

[ ] 0,

,

01

,

10010000000000

1

=−−=

=

=

−−

=

−=

+

hFBBG

vuu

xu

uu

u

bII

II

A

wwf

l

u

l

u

TTT

min→

=≤

xfhGxbAx

T

EE392m - Winter 2003 Control Engineering 10-20

Actuator allocation example

• Problem:[ ][ ]

11 0.0010.020.10.1

0.10.40.7-0.9

≤≤−==

uwB

• LP problem solution for F = 1.5

1 2 3 4

-0.5

0

0.5

ACTUATOR WEIGHTSSOLUTION FOR F=1.5

1 2 3 4

0

0.2

0.4

0.6

0.8

vFBu

vuwT

=

→− min1

EE392m - Winter 2003 Control Engineering 10-21

Actuator allocation example• LP problem solution for F from -2.5 to 2.5

-3 -2 -1 0 1 2 3-1

0

1

-3 -2 -1 0 1 2 3-1

0

1

-3 -2 -1 0 1 2 3-1

0

1

-3 -2 -1 0 1 2 3-1

0

1

1 2 3 4

-0.5

0

0.5

ACTUATOR WEIGHTS

EE392m - Winter 2003 Control Engineering 10-22

Extreme actuator allocation

• (Xerox) PARC jet array table• Jets must be allocated to achieve commanded total force and

torque acting on a paper sheet

∑∑

×=

=

kk

k

rf

frr

r

T

F

EE392m - Winter 2003 Control Engineering 10-23

Actuator allocation

• Least squares + actuator constraint

min

,2 →

=

u

FBu

• This is a QP optimization problem

ul uuu ≤≤

EE392m - Winter 2003 Control Engineering 10-24

Quadratic Programming

• QP Problem:

min21 →+=

=≤

xfHxxJ

hGxbAx

TT

• Matlab Optimization Toolbox: QUADPROG• Same feasibility issues as for LP• Fast solvers available• More in the next Lecture...

EE392m - Winter 2003 Control Engineering 11-1

Lecture 11 - Optimal Program

• Grade change in process control– example

• QP optimization• Flexible dynamics: input shaping, input trajectory

– example

• Rocket, ascent• Robotics

EE392m - Winter 2003 Control Engineering 11-2

Optimization of process transitions

• Process plants manufacture different product varieties (grades)• Need to optimize transitions from grade to grade

EE392m - Winter 2003 Control Engineering 11-3

Product Grade Change

• The requirement: to changemanufacture from grade A to grade Bwith the minimum off-spec production.

• The implementation: using detailedmodels of process and operatingprocedures.

• The results: optimum setpointtrajectories for key process controllersduring the changeover, resulting inminimum lost revenue.

EE392m - Winter 2003 Control Engineering 11-4

Grade change control example• Simple process model:

– chemical reactor– server farm

0 20 400

0.02

0.04

0.06

0.08

0 20 40-0.2

-0.1

0

0.1

0.2

u

y1

y2

internal temperature

qualityvariable

• The process is the initial steady state: u = 0; y1= y2 = 0• Need to transition, as quickly as possible, to other steady state:

u = const; y1= const; y2 = yd

EE392m - Winter 2003 Control Engineering 11-5

Grade change control example

• Linear system model in the convolution formuhy *=

• Inequality constraints– Control

– Temperature

• Equality constraint (process transitioning to the new grade)

fd TTtTytyty +≤≤≡≡ for ,)(,0)( 21&

• Quadratic-optimal control( ) min)()( 22

2 →+−∫ dtturyty d &

*2

*

)(

)(

dty

utu

EE392m - Winter 2003 Control Engineering 11-6

Grade change control example• Sampled time: t = kτ, (k=1,…,N);

– Y is a 2N vector– H is a block-Toeplitz matrix

• Dynamics as an equality constraint:

HUUHUH

YY

Y =

=

=

2

1

2

1

...,)(

)(,

)(

)(

2

1

1

1 =

=

= Y

Ny

yY

Nu

uU

τ

τ

τ

τMM

UhUH *2,12,1 =

0=−YHU

EE392m - Winter 2003 Control Engineering 11-7

Grade change control example

• Inequality constraints– Control

– Temperature *1

**

0 TYuUu

≤≤≤≤−

• Quadratic-optimal control

min)()()()( 111122 →−−++−− dT

dTT

dT

d YYYYwDUDrUYYYY

=

1

1Mdd yY

min...2 222 →+−+ YYYYDUDU Td

TTT

=

000110

011

L

L

MOOM

L

D

optional

EE392m - Winter 2003 Control Engineering 11-8

Terminal constraint

=

f

T

YY

Y,1

,11

• Equality constraints (new grade steady state)

fdf YY ,,2 =

0,1 =fDY

=

000110

011

L

L

MOOM

L

D

=

f

T

YY

Y,2

,22

- transition - new steady state

- steady in the end

- at target in the end

t = 0 t = T t = Tf

EE392m - Winter 2003 Control Engineering 11-9

Quadratic Programming

• QP Problem:

min21 →+=

=≤

xfHxxJ

hGxbAx

TT

• Matlab Optimization Toolbox: QUADPROG

EE392m - Winter 2003 Control Engineering 11-10

SimQP Program for

the gradechange, noterminalconstraint

20205.01.0

75.0

*

*

==

===

uTr

yd

τ

0 5 10 15 20 25 30 35 400

5

10

15

20

CO

NTR

OL

INP

UT

(MV

)

0 5 10 15 20 25 30 35 400

0.5

1

1.5

2TE

MP

ER

ATU

RE

0 5 10 15 20 25 30 35 40-2

-1

0

1

QU

ALI

TY P

AR

AME

TER

TIME (HRS)

EE392m - Winter 2003 Control Engineering 11-11

SimQP Program for

the gradechange witha terminalconstraint atT = 8

20205.01.0

75.0

*

*

==

===

uTr

yd

τ

0 1 2 3 4 5 6 7 8 9 10-5

0

5

10

15

20

CO

NTR

OL

INP

UT

(MV

)

0 1 2 3 4 5 6 7 8 9 10-0.5

0

0.5

1

1.5

2TE

MP

ER

ATU

RE

0 1 2 3 4 5 6 7 8 9 10-3

-2

-1

0

1

QU

ALI

TY P

AR

AME

TER

TIME (HRS)

EE392m - Winter 2003 Control Engineering 11-12

Flexible Satellite Slew Control

• Single flexible mode model• Franklin, Section 9.2

)()()()(

212122

212111

xxbxxkxJguxxbxxkxJ

&&&&

&&&&

−+−=+−−−−=

BusFirst

flexiblemode

gu

2x→1x→ k

b

EE392m - Winter 2003 Control Engineering 11-13

Flexible Satellite Slew Control

• Linear system model CxyBuAxx

=+=&

BusFirst

flexiblemode

gu

2x→1x→ k

b

=

2

2

1

1

xxxx

x

&

&

−=

1

12

1

xxx

xy

&

• slew angle

• deformation

• slew rate

−−

−−=

2222

1111

////1000////0010

JbJkJbJk

JbJkJbJkA

=

00/0

1JgB

EE392m - Winter 2003 Control Engineering 11-14

Flexible Satellite Slew Control

• Linear system model in the convolution formuhy *=

• Inequality constraints– Control

– Deformation

– Slew rate

• Equality constraint (system coming to at target slew angle)fd TTtTyty +≤≤≡ for ,)(

• Quadratic-optimal controlmin)( 2 →∫ dttu

*3

*2

)(

)(

1)(

vty

dty

tu

EE392m - Winter 2003 Control Engineering 11-15

Flexible Satellite Slew Control• Sampled time: t = kτ, (k=1,…,N); Y is a 3N vector; H is a

block-Toeplitz matrixHUY =

• Inequality constraints– Control

– Deformation

– Slew rate

• Equality constraint (system coming to at target slew angle)dYSY =

• Quadratic-optimal controlmin→UU T

*3*

*2*

11

vYSvdYSd

U

≤≤≤≤

≤≤− This is a QPproblem

EE392m - Winter 2003 Control Engineering 11-16

SimQP Program

for theflexiblesatelliteslew

0 2 4 6 8 10 12 14 16 18 20-1

-0.5

0

0.5

1

CO

NTR

OL

0 2 4 6 8 10 12 14 16 18 200

0.5

1

1.5

2S

LEW

AN

GLE

0 2 4 6 8 10 12 14 16 18 20-0.05

0

0.05

DE

FOR

MA

TIO

N

0 2 4 6 8 10 12 14 16 18 20-0.05

0

0.05

0.1

0.15

SLE

W R

ATE

2.002.0

0036.0091.01.0

102.0

*

*

2

1

==

=====

vdbkJJg

EE392m - Winter 2003 Control Engineering 11-17

Robust design approach

• Replace exact terminal constraint by a given residual error• Consider the system for several different values of

parameters and group the results together• As an optimality index, consider the average performance

index or the worst residual error

EE392m - Winter 2003 Control Engineering 11-18

Ascend trajectory optimization• Rocket launch vehicles

– fuel (payload) optimality– orbital insertion constraint– flight envelope constraints– booster drop constraint

EE392m - Winter 2003 Control Engineering 11-19

Ascend trajectory optimization

• Nonlinear constraint optimization problem– not QP, not LP– iterative optimization methods: Gradient, Newton, Levenberg-

Marquardt, SQP, SSQP– can get results if supervised by a human– QP, LP are guaranteed always produce a solution if the problem is

feasible - suitable for one-line use inside control loop

EE392m - Winter 2003 Control Engineering 11-20

Mobile Robot Path Planning→ min

(p,q)

Point mass model:

Constraint optimization problemof finding an optimal path

From V. Lumelsky, Univ. Wisconsin, Madison

Future Combat Systems (FCS)

Follow-OnHeavy Forces(if Necessary)

Enem

y Fo

rce

Bui

ld U

p

• Ground and air robotics vehicles• Potential application of robotics research• Path planning and optimization are important

EE392m - Winter 2003 Control Engineering 12-1

Lecture 12 - Model Predictive Control

• Prediction model• Control optimization• Receding horizon update• Disturbance estimator - feedback• IMC representation of MPC• Resource:

– Joe Qin, survey of industrial MPC algorithms– http://www.che.utexas.edu/~qin/cpcv/cpcv14.html

EE392m - Winter 2003 Control Engineering 12-2

Control Hierarchy

EE392m - Winter 2003 Control Engineering 12-3

Models for MPC

Plant structure:• CV - controlled variables - y• MV - manipulated variables - u• DV - disturbance variables - v

• FSR - Finite Step Response model

– compact notation

Plant

MV: u

DV: v

CV: y

dtvstusty DU +∆+∆= ))(*())(*()(

dktvkSktukStyN

k

DN

k

U +−∆+−∆= ∑∑==

)()()()()(11

11;

−−=∆∆=

zsh

EE392m - Winter 2003 Control Engineering 12-4

FSR Model

FSR model

dktvkStyn

k+−∆=∑

=

)()()(1

• Ignores anything thathappened more than nsteps in the past

• This is attributed to aconstant disturbance d

EE392m - Winter 2003 Control Engineering 12-5

MPC Process Model Example

MV, DV

CV

EE392m - Winter 2003 Control Engineering 12-6

Prediction Model

+∆

∆=

)(

)()(

ntu

tutU M

+=

)(

)()(

nty

tytY M

+−∆

−∆=

)1(

)1()(

Ntu

tutU M

Discuss later

FSR model

EE392m - Winter 2003 Control Engineering 12-7

Prediction Modeldtvstusty DU +∆+∆= ))(*())(*()(

DdtVtUtUtY D +Φ+⋅Φ+Ψ= )()()()(

Hankel matrix

=

1

1MD

0)1()(

00)1(000

L

MOMM

L

L

nSnS

S

UU

U

Past DV

Toeplitz matrix

CV Prediction

Future MV Hankel matrixPast MV

Toeplitz matrix Hankel matrix

00)(

0)3()2()()2()1(

L

MOMM

L

L

NS

SSNSSS

D

DD

DDD

D

Unmeasured disturbance

Future impact of the disturbance

EE392m - Winter 2003 Control Engineering 12-8

Optimization of future inputs

• Optimization problem

4444 34444 21)(*

)()()()(tY

D DdtVtUtUtY +Φ+⋅Φ+Ψ=

( ) ( ) min)()()()()()( →+−−= tRUtUtYtYQtYtYJ Td

Td

=

=u

u

y

y

R

RR

Q

QQ

L

MOM

L

L

MOM

L

0

0,

0

0

+=

)(

)()(

Nty

tytY

d

d

d M

EE392m - Winter 2003 Control Engineering 12-9

Optimization constraints

• MV constraints

• CV constraints

• Terminal constraint:

maxmax )( utuu ∆≤∆≤∆−

)()()( maxmin tytyty ≤≤

maxmin )( utuu ≤≤

∑=

∆+−=+k

jtutuktu

1

)()1()(

pkktuykty d ≥=+∆=+ for 0)(;)(

maxmin

maxmax

)()(

uCtUuutUu

≤−Σ≤∆≤≤∆−

maxmin )( YtYY ≤≤

EE392m - Winter 2003 Control Engineering 12-10

QP solution

• QP Problem:

min21 →+=

=≤

xfQxxJ

bxAbAx

TT

eqeq

• Standard QP codes are available

=)()(

tYtU

x Predicted MVs, CVs

EE392m - Winter 2003 Control Engineering 12-11

Receding horizon control• Optimization problem solution at step t :

• Use the first computed control value only

• Repeat at each t)(]001[)( tUtu OPT⋅= K

)(tUU OPT=⇒→ min)(UJ

EE392m - Winter 2003 Control Engineering 12-12

Control dynamics• System dynamics as an equality constraint in optimization

• Update of the system state

)()()( * tYtUtY +Ψ=

[ ] )()()(* tdtXtY D +⋅ΦΦ=

• Optimization problem solution at step t :

• Use the first of the computed control values)(]001[)( tUtu OPT⋅= K

)(tUU OPT=⇒→ min))(;( UYUJ

)()()()1( tvBtuBtAXtX D∆+∆+=+

EE392m - Winter 2003 Control Engineering 12-13

State update and estimation

• State update - shift register

• Disturbance estimator (feedback)

• Integrator feedback

+−∆

−∆=

)1(

)1()(

Ntu

tutU M

+−∆

−∆=

)1(

)1()(

Ntv

tvtV M

=)()(

)(tVtU

tX

)(tu∆ )(tv∆

( ))()()()1( tytytdtd m −+=+

Actually measured CV

Unmeasured disturbance

CV Prediction based on the current state X(t)

EE392m - Winter 2003 Control Engineering 12-14

Optimization detail• Setpoint• Zone• Trajectory• Funnels

• Soft constraints (quadraticpenalties) and hardconstraints for MV, CV

• Regularization– penalty– singular value thresholding

EE392m - Winter 2003 Control Engineering 12-15

Advantages and Conveniences

• Industrial strength products that can be used for a broadrange of applications

• Flexibility to plant size, automated setup• Based on step response/impulse response model• On the fly reconfiguration if plant is changing

– MV, CV, DV channels taken off control / returned into MPC– measurement problems, actuator failures

• Systematic handling of multi-rate measurements andmissed measurement points– do not update d if no data

EE392m - Winter 2003 Control Engineering 12-16

Technical detail

• Tuning of MPC feedback control performance is an issue.– Works in practice, without formal analysis– Theory requires

• Large (infinite) prediction horizon• Terminal constraint

• Additional tricks for– a separate static optimization step– integrating and unstable dynamics– active constraints– regularization– shape functions for control– different control horizon and prediction horizon– ...

EE392m - Winter 2003 Control Engineering 12-17

MPC as IMC

• MPC is a special case of IMC• Closed-loop dynamics (filter dynamics)

– integrator - in disturbance estimator– N poles z=0 - in the FSR model update

Plant

Predictionmodel

Optimizerreference output

disturbance

∆d-

EE392m - Winter 2003 Control Engineering 12-18

Emerging MPC applications

• Vehicle path planning and control– nonlinear vehicle models– world models– receding horizon preview

EE392m - Winter 2003 Control Engineering 12-19

Emerging MPC applications

• Spacecraft rendezvous with space station– visibility cone constraint– fuel optimality

From Richards & How, MIT

EE392m - Winter 2003 Control Engineering 12-20

Emerging MPC applications

• Nonlinear plants– just need a computable model (simulation)

• Hybrid plants– combination of dynamics and discrete mode change

• Engine control• Large scale operation control problems

– operations management– campaign control

EE392m - Winter 2003 Control Engineering 13-1

Lecture 13 - Handling Nonlinearity• Nonlinearity issues in control practice• Setpoint scheduling/feedforward

– path planning replay - linear interpolation

• Nonlinear maps– B-splines– Multivariable interpolation: polynomials/splines/RBF– Neural Networks– Fuzzy logic

• Gain scheduling• Local modeling

EE392m - Winter 2003 Control Engineering 13-2

Nonlinearity in control practiceHere are the nonlinearities we already looked into• Constraints - saturation in control

– anti-windup in PID control– MPC handles the constraints

• Control program, path planning• Static optimization• Nonlinear dynamics

– dynamic inversion– nonlinear IMC– nonlinear MPC

One additional nonlinearity in this lecture• Controller gain scheduling

EE392m - Winter 2003 Control Engineering 13-3

Dealing with nonlinear functions

• Analytical expressions– models are given by analytical formulas, computable as required– rarely sufficient in practice

• Models are computable off line– pre-compute simple approximation– on-line approximation

• Models contain data identified in the experiments– nonlinear maps– interpolation or look-up tables

• Advanced approximation methods– neural networks

EE392m - Winter 2003 Control Engineering 13-4

Path planning

• Real-time replay of a pre-computed reference trajectoryyd(t) or feedforward v(t)

• Reproduce a nonlinear function yd(t) in a control system

Path planner,data arrays Y ,Θ

yd(t)t

jj

jj

jj

jjd

tY

tYty

θθθ

θθθ

−−

+−−

=+

++

+

11

1

1)(

=

==

=

nndn

d

d

yY

yYyY

Y

θ

θθ

θ

θθ

MM2

1

22

11

,

)(

)()(

Code:1. Find j, such that2. Compute

1+≤≤ jj t θθ

EE392m - Winter 2003 Control Engineering 13-5

Linear interpolation vs. table look-up• linear interpolation is more accurate• requires less data storage• simple computation

EE392m - Winter 2003 Control Engineering 13-6

Example

TEF=Trailing Edge Flap

Empirical models• Aerospace - most developed nonlinear approaches

– automotive and process control have second place

• Aerodynamic tables• Engine maps

– jet turbines– automotive

• Process maps, e.g., insemiconductormanufacturing

• Empirical map for aattenuation vs.temperature in anoptical fiber

EE392m - Winter 2003 Control Engineering 13-7

Approximation• Interpolation:

– compute function that will provide given values in the nodes– not concerned with accuracy in-between the nodes

• Approximation– compute function that closely corresponds to given data, possibly

with some error– might provide better accuracy throughout

jθjY

EE392m - Winter 2003 Control Engineering 13-8

B-spline interpolation

• 1st-order– look-up table, nearest neighbor

• 2nd-order– linear interpolation

• n-th order:– Piece-wise n-th order polynomials, matched n-2 derivatives– zero outside a local support interval– support interval extends to n nearest neighbors

∑=j

jjd tBYty )()(

EE392m - Winter 2003 Control Engineering 13-9

B-splines

• Accurate interpolation of smoothfunctions with relative few nodes

• For 1-D function the gain fromusing high-order B-splines is notworth an added complexity

• Introduced and developed in CADfor 2-D and 3-D curve and surfacedata

• Are used for definingmultidimensional nonlinear maps

EE392m - Winter 2003 Control Engineering 13-10

Multivariable B-splines

• Regular grid in multiple variables• Tensor product B-splines• Used as a basis of finite-element models

∑=kj

kjkj vBuBwvuy,

, )()(),(

EE392m - Winter 2003 Control Engineering 13-11

Linear regression for nonlinear map• Linear regression

• Multidimensional B-splines• Multivariate polynomials

• RBF - Radial Basis Functions

)()()( xxxy T

jjj φθϕθ ⋅==∑

nkn

knj xxxx )()(),,( 1

11 ⋅⋅= KKϕK+++++= 214

21322110 )( xxxxxy θθθθθ

( ) 2

)( jcxajj ecxRx −−=−=ϕ

=

nx

xx M

1

EE392m - Winter 2003 Control Engineering 13-12

Linear regression approximation

• Nonlinear map data– available at scattered nodal points

• Linear regression map

• Linear regression approximation– regularized least square estimate of the weight vector

• Works just the same for vector-valued data!

( ) TT YrI Φ+ΦΦ= −1θ̂

[ ])()1(

)()1(

N

N

xxyyY

K

K=

[ ] Φ=⋅= TNT xxY θφφθ )()( )()1( K

EE392m - Winter 2003 Control Engineering 13-13

Nonlinear map example - Epi• Epitaxial growth (semiconductor process)

– process map for run-to-run control

EE392m - Winter 2003 Control Engineering 13-14

Linear regression for Epi map• Linear regression model for epitaxial grouth

)()1()( 22112110 xpxcxpxcy −+=

324

2232101 )()( xwxwxwwp +++=

{ { { {3

21042

21032101100110 )()(4321

xxcwxxcwxxcwxcwpxcθθθθ

+++=

{ { { {3

21042

21032111110

2211

))(1())(1()1()1()()1(

8765

xxcwxxcvxxcvxcvxpxc

−+−+−+−

=−

θθθθ

),(),(),( 212121 xxxxxxy T

jjj φθϕθ ⋅==∑

EE392m - Winter 2003 Control Engineering 13-15

Neural Networks

• Any nonlinear approximator might be called a Neural Network– RBF Neural Network– Polynomial Neural Network– B-spline Neural Network– Wavelet Neural Network

• MPL - Multilayered Perceptron– Nonlinear in parameters– Works for many inputs

+=

+= ∑∑

jjjj

jjj xwfwyywfwxy ,20,2

11,10,1 ,)(

Linear in parameters

xexf −+

=1

1)(x

y y=f(x)

EE392m - Winter 2003 Control Engineering 13-16

Multi-Layered Perceptrons

• Network parameter computation– training data set– parameter identification

• Noninear LS problem

• Iterative NLS optimization– Levenberg-Marquardt

• Backpropagation– variation of a gradient descent

);()( θxFxy =

min);(2)()( →−=∑

j

jj xFyV θ

[ ])()1(

)()1(

N

N

xxyyY

K

K=

EE392m - Winter 2003 Control Engineering 13-17

Fuzzy Logic

• Function defined at nodes. Interpolation scheme• Fuzzyfication/de-fuzzyfication = interpolation• Linear interpolation in 1-D

• Marketing (communication) and social value• Computer science: emphasis on interaction with a user

– EE - emphasis on mathematical computations

∑∑

=

jj

jjj

x

xyxy

)(

)()(

µ

µ1)( =∑

jj xµ

EE392m - Winter 2003 Control Engineering 13-18

Neural Net application• Internal Combustion Engine

maps• Experimental map:

– data collected in a steady stateregime for various combinationsof parameters

– 2-D table

• NN map– approximation of the

experimental map– MLP was used in this example– works better for a smooth

surface

RPMsparkadvance

EE392m - Winter 2003 Control Engineering 13-19

)(),(),( xyxuxk dff

• Control design requires

• These variables arescheduled on x

Linear feedback in a nonlinear plant• Simple example

• Linearizing property of feedback for

)())(()()(

xuyyxkuuxgxfy

ffd +−−=+=

1)( >>xk( ) ( )dffd yuxgxfxgxkyy −+++= − )()()()(1 1

Plant

Controller

y

yd

u

Example:varyingprocessgain

EE392m - Winter 2003 Control Engineering 13-20

Gain scheduling

• Single out severalregimes - modellinearization orexperiments

• Design linear controllersin these regimes:setpoint, feedback,feedforward

• Approximate controllerdependence on theregime parameters

Nonlinear system

∑ Θ=Θj

jjYY )()( ϕ

=

)vec()vec()vec()vec(

DCBA

Y

Linear interpolation:

EE392m - Winter 2003 Control Engineering 13-21

Gain scheduling - example• Flight control• Flight envelope

parameters are usedfor scheduling

• Shown– Approximation nodes– Evaluation points

• Key assumption– Attitude and Mach are

changing much slowerthan time constant ofthe flight control loop

EE392m - Winter 2003 Control Engineering 13-22

Local Modeling Based on Data

Outdoortemperature

Timeof day

Heatdemand

ForecastedForecastedvariablevariable

ExplanatoryExplanatoryvariablesvariables

Query pointQuery point( What if ? )( What if ? )

RelationalDatabase

MultidimensionalData Cube

Heat LoadsHeat Loads• Data mining in the loop• Honeywell product

EE392m - Winter 2003 Control Engineering 14-1

Lecture 14 - Health Management• Fault detection and accommodation• Health management applications

– Engines– Vehicles: space, air, ground, marine, rail– Industrial plants– Semiconductor manufacturing– Computing

• Abnormality detection - SPC• Parameter estimation• Fault tolerance - redundancy

EE392m - Winter 2003 Control Engineering 14-2

Diagnostics in Control Systems• Control algorithms are less than 20% of the embedded

control application code in safety-critical systems• 80% is dealing with special conditions, fault accomodation

– BIT (Built-in Test - software)– BITE (Built-in Test Equipment - hardware)– Binary results– Messages– Used in development and in operation

HoneywellLF507

Example

EE392m - Winter 2003 Control Engineering 14-3

Health Management• Emerging technology - recent several years

– less established than most of what was discussed in the lectures

• Systems fault management functions– Abnormality detection and warning - something is wrong– Diagnostics - what is wrong– Prognostics - predictive maintenance– Accomodation - recover

• On-line functions - control system– Fault accommodation - FDIR

• Off-line functions - enterprise system– Maintenance automation– Logistics automation

EE392m - Winter 2003 Control Engineering 14-4

Vehicle Health Management• IVHM - Integrated Vehicle Health Management - On-board• PHM - Prognostics and Health Management - On-ground• Vehicles: space, air, ground, rail, marine

– Integrated systems, many complex subsystems– Safety critical, on-going maintenance, on-board fault diagnostics

EE392m - Winter 2003 Control Engineering 14-5

Airline enterprise - maintenance• Integrated on-board and on-ground system• Maintenance automation• Main expense/revenue• Current developments

Military

EE392m - Winter 2003 Control Engineering 14-6

Industrial plants

• Abnormal Situation Management– large cost associated with failures and

production disruption– solutions are presently being deployed

EE392m - Winter 2003 Control Engineering 14-7

Semiconductor manufacturing

• E-diagnostics initiative by SEMATECH

EE392m - Winter 2003 Control Engineering 14-8

Computing

• Autonomic computing– Fault tolerance– Automated management,

support, security– IBM, Sun, HP - Scientific

American, May 2002• Sun Storage Automated

Diagnostic Environment– Health Management and

Diagnostic Services

K.Gross, Sun Microsystems

EE392m - Winter 2003 Control Engineering 14-9

Abnormality detection - SPC

• SPC - Statistical Process Control (univariate)– discrete-time monitoring of manufacturing processes– early warning for an off-target quality parameter

• SPC vs EPC– EPC (Engineering Process Control) - ‘normal’ feedback control– SPC - operator warning of abnormal operation

• SPC has been around for 80 years• Three main methods of SPC:

– Shewhart chart (20s)– EWMA (40s)– CuSum (50s)

EE392m - Winter 2003 Control Engineering 14-10

Abnormality detection - SPC

• Process model - SISO– quality variable randomly changes around a steady state value– the goal is to detect change of the steady state value

• Shewhart Chart

detection:– Simple thresholding for deviation from the nominal value µ0

– Typical threshold of 3σ <=> 0.27% probablity of false alarm

σµ0)()( −= tXtY

1)( cZtY =>

>≠≤

≈TtNTtN

tX),,(

),,()( 2

01

20

σµµσµ

EE392m - Winter 2003 Control Engineering 14-11

SPC - EWMA

• EWMA = Exponentially Weighted Moving Average• First order low pass filter

– Detection threshold

)()1()1()1( tXtYtY λλ +−−=+

)2(2 λλ −= cZ

EE392m - Winter 2003 Control Engineering 14-12

SPC - CuSum

• CuSum = Cumulative Sum– a few modifications– one-sided CuSum most common

– Detection threshold

σµµ

σµ

2

)()(,0max)1(

01

0

+=

−−+=+

k

ktXtYtY

3cZ =

EE392m - Winter 2003 Control Engineering 14-13

Multivariate SPC - Hotelling's T2

• The data follow multivariate normal distribution

• Empirical parameter estimates

( )

( ) ))()()((1))((

)(1

1

1

µµµµ

µ

−−≈−−=Σ

≈=

=

=n

t

TT

n

t

tXtXn

XXE

tXn

XE

),()( Σ≈ µNtX

• The Hotelling's T2 statistics is

• T can be trended as a univariate SPC variable (almost)

( ) ( )µµ −Σ−= − )()( 12 tXtXT T )()(2 tYtYT T=

µ+Σ= )()( 2/1 tYtX

Uncorrelated white noise

EE392m - Winter 2003 Control Engineering 14-14

Example:• MSPC for Cyber

attack detection• X(t) consists of 284

audit events in Sun’sSolaris Basic SecurityModule

• Ye & Chen, Arizona State

Multivariate SPC

EE392m - Winter 2003 Control Engineering 14-15

Model-based fault detectionPlantModelPredictionModel

inputvariables

FaultDetectionalgorithms

predictionresidual

+-

output variables

PlantData Batch

Collected on-lineprocessed off-line

Inputdata

Outputdata

• Compute model-basedprediction residual– result of a simulation run

X = Y - f(U,θ)• If θ = 0 (nominal case)

we should have X = 0.• X reflects faults

EE392m - Winter 2003 Control Engineering 14-16

Model-based fault detection• Compute model-based prediction residual X(t) at cycle t

– flight/trip/maneuver for a vehicle– update time interval or a batch for a plant– semiconductor process run

• X(t) reflects modeling error, process randomness, and fault• Use MSPC for detecting abnormality through X(t)

– Hotelling’s T2

– CuSum

• Does not tell us what the fault might be (diagnostics)

EE392m - Winter 2003 Control Engineering 14-17

Parameter estimation

• Residual model: X = Y - f(U,θ)

• Fault models - meaning of θ– Sensor fault model - additive output change– Actuator fault model - additive input change

• Estimation technique– Fault parameter estimation - regression

ξθ +Φ=Xθ

θ∂

∂−=Φ ),(Uf

( ) XrI TT Φ+ΦΦ= −1θ̂

EE392m - Winter 2003 Control Engineering 14-18

Fault tolerance: Hardware redundancy• Boeing 777 Primary Flight Computer (PFC) Architecture

PowerSupply

Micro-Processor

AMD 29050

ARINC 629Interface

PowerSupply

Micro-Processor

Motorola 68040

ARINC 629Interface

PowerSupply

Micro-Processor

INTEL 80486

ARINC 629Interface

Lane 1 Lane 2 Lane 3

Flight Control ARINC Data Buses

Center PFC Right PFC

Left PFC

L

C

R

Voting to discard afaulty channel

EE392m - Winter 2003 Control Engineering 14-19

Analytical redundancy

• Analytical Redundancy– correlate data from diverse measurements through an analytical

model of the system

• Estimation techniques– KF observer

• Talked about in the literature• Used only in much simplified form:

– on loss of a sensor, use inferential estimate of the variable usingother sensor measurements

– on loss of an actuator, re-allocate control to other actuators

EE392m - Winter 2003 Control Engineering 15-1

Lecture 15 - Distributed Control

• Spatially distributed systems• Motivation• Paper machine application• Feedback control with regularization• Optical network application• Few words on good stuff that was left out

EE392m - Winter 2003 Control Engineering 15-2

Sensors

Actuators

Distributed Array Control• Sensors and actuators are organized in large arrays distributed

in space.• Controlling spatial distributions of physical variables• Problem simplification: the process and the arrays are

uniform in spatial coordinate• Problems:

– modeling– identification– control

EE392m - Winter 2003 Control Engineering 15-3

Distributed Control Motivation• Sensors and actuators are becoming cheaper

– electronics almost free

• Integration density increases• MEMS sensors and actuators• Control of spatially distributed systems increasingly common• Applications:

– paper machines– fiberoptic networks– adaptive and active optics– semiconductor processes– flow control– image processing

EE392m - Winter 2003 Control Engineering

Scanning gauge

MDmachinedirection

CDcross

direction

Paper Machine Process

• Control objective: flat profiles in the cross-direction• The same control technology for different actuator types: flow

uniformity control, thermal control of deformations, and others

© Honeywell

EE392m - Winter 2003 Control Engineering 15-5

Headbox with Slice Lip CD Actuators

© Honeywell

EE392m - Winter 2003 Control Engineering

Profile Control System

© Honeywell

EE392m - Winter 2003 Control Engineering

Biaxial Plastic Line Control

© Honeywell

EE392m - Winter 2003 Control Engineering 15-8

CD da ta box/actua tor number

mea surement gj

actua tor s e tpoint

Model Structure

• Process-independent model structure

• G - spatial response matrix withcolumns gj

• Known parametric form of the spatialresponse (noncausal FIR)

• Green Function of the distributedsystem

nmnm GUYUGY

,,, ℜ∈ℜ∈ℜ∈∆=∆

)(, jkkj cxgg −= ϕ

EE392m - Winter 2003 Control Engineering 15-9

Measured profileresponse, Y(t)

Actuator setpointarray, U(t)

CD

MD

Process Model Identification

• Extract noncausal FIR model• Fit parameterized response shape

EE392m - Winter 2003 Control Engineering 15-10

EE392m - Winter 2003 Control Engineering 15-11

Simple I control

• Compare to Lecture 4, Slide 5• Step to step update:

• Closed-loop dynamics

• Steady state: z = 1

[ ]dYtYktUtUtDtUGtY

−−−−=+⋅=

)1()1()()()()(

( ) [ ]DzkGYkGIzY d )1()1( 1 −++−= −

)(, 1 DYGUYY dd −== −

I control

EE392m - Winter 2003 Control Engineering 15-12

Simple I control

Issues with simple I control• G not square positive definite

– use GT as a spatial pre-filter

• For ill-conditioned G get verylarge control, picketing– use regularized inverse

• Slowly growing instability– control not robust– regularization helps again

.

0 50 100 150 2000

2

4ERROR NORM

0 20 40 60 80 100-0.5

0

0.5ERROR PROFILE

0 20 40 60 80 100-20

0

20CONTROL PROFILE

DGDYGYtDtUGGtY

TG

TG

GT

G

==

+⋅=

,

)()()(

EE392m - Winter 2003 Control Engineering 15-13

LTIPlant

Frequency Domain - Time

• LTI system is a convenient engineering model• LTI system as an input/output operator• Causal• Can be diagonalized by harmonic functions• For each frequency, the response is defined by amplitude

and phase

EE392m - Winter 2003 Control Engineering 15-14

LSIPlant

Frequency Domain - Space

• Linear Spatially Invariant (LSI) system• LSI system is a convenient engineering model• LSI system as an input/output operator• Noncausal• Can be diagonalized by harmonic functions• Diagonalization = modal analysis; spatial

modes are harmonic functions

EE392m - Winter 2003 Control Engineering 15-15

( ) )1()1()( −−−−−=∆ tSUYtYKtU d

Control with Regularization

• Add integrator leakage term

• Feedback operator K– spatial loopshaping

• KG ≈ 1 at low spatial frequencies• KG ≈ 0 at high spatial frequencies

• Smoothing operator S– regularization

• S ≈ 0 at low spatial frequencies• S ≈ s0 at high spatial frequencies - regularization

EE392m - Winter 2003 Control Engineering 15-16

Spatial Frequency Analysis

• Matrix G → convolution operator g (noncausal FIR) →spatial frequency domain (Fourier) g(v)

• Similarly: K → k(v) and S → s(v)• Each spatial frequency - mode - evolves independently

dkgz

szykgsz

kgy d )()(1)(1

)()()(1)()()(

ννν

νννννν

+−+−+

++−=

• Steady state

dkgs

sykgs

kgy d )()()()(

)()()()()()(

νννν

νννννν

++

+=

( ))()()()()(

)()( ννννν

νν dykgs

ku d −+

=

EE392m - Winter 2003 Control Engineering 15-17

Sample Controller Design

• Spatial domain loopshaping is easy - it is noncausal• Example controller with regularization

0 100 200 300 400 5000

1

2

3ERROR NORM

0 20 40 60 80 100-0.5

0

0.5ERROR PROFILE

0 20 40 60 80 100-2

0

2CONTROL PROFILE

-5 -4 -3 -2 -1 0 1 2 3 4 50

0.5

1PLANT

-5 -4 -3 -2 -1 0 1 2 3 4 50

0.10.20.30.4

FEEDBACK

-5 -4 -3 -2 -1 0 1 2 3 4 5-0.01

0

0.01

0.02

0.03SMOOTHING

0 1 2 3

0.5

1

1.52

0 1 2 30.50.50.50.50.5

0 1 2 3

0.010.020.030.04

G

K

S

For more depth and references, see: Gorinevsky, Boyd, Stein, ACC 2003

EE392m - Winter 2003 Control Engineering 15-18

WDM network equalization• WDM (Wave Division Multiplexing) networks

– multiple (say 40) independent laser signals with closely spacewavelength packed (multiplexed) into a single fiber

– each wavelength is independently modulated– in the end the signals are unpacked (de-mux) and demodulated– increases bandwidth 40 times without laying new fiber

EE392m - Winter 2003 Control Engineering 15-19

WDM network equalization• Analog optical amplifiers (EDFA)

amplify all channels• Attenuation and amplification distort

carrier intensity profile• The profile can be flattened through

active control

See more detail at:www126.nortelnetworks.com/news/papers_pdf/electronicast_1030011.pdf

-40

-35

-30

-25

-20

-15

-10

-5

0

5

1525 1535 1545 1555 1565

EE392m - Winter 2003 Control Engineering 15-20

WDM network equalization

• Logarithmic (dB)attenuation for asequence of notchfilters

)()( 01

ckwaN

kk −−=∑

=

λλϕλ

∑=

=

⋅⋅=N

kk

N

AA

AAA

1

1

loglog

K

Notch filter shapeAttenuation gain - control handle

WDM

EE392m - Winter 2003 Control Engineering 15-21

Good stuff that was left out

• Estimation and Kalman filtering– navigation systems– data fusion and inferential sensing in fault tolerant systems

• Adaptive control– adaptive feedforward, noise cancellation, LMS– industrial processes– thermostats– bio-med applications, anesthesia control– flight control

• System-level logic• Integrated system/vehicle control

top related