CHEE 434/821 Process Control II Some Review...

147
1 CHEE 434/821 CHEE 434/821 Process Control II Process Control II Some Review Material Some Review Material Winter 2006 Winter 2006 Instructor: Instructor: M.Guay M.Guay TA: TA: V. V. Adetola Adetola Introduction Introduction In the chemical industry, the design of a control system is essential to ensure: Good Process Operation Good Process Operation Process Safety Process Safety Product Quality Product Quality Minimization of Environmental Impact Minimization of Environmental Impact

Transcript of CHEE 434/821 Process Control II Some Review...

1

CHEE 434/821CHEE 434/821Process Control IIProcess Control II

Some Review MaterialSome Review Material

Winter 2006Winter 2006

Instructor:Instructor:M.GuayM.Guay

TA:TA:V. V. AdetolaAdetola

IntroductionIntroduction

In the chemical industry,

the design of a control system is essential to ensure:

Good Process OperationGood Process OperationProcess SafetyProcess SafetyProduct QualityProduct QualityMinimization of Environmental ImpactMinimization of Environmental Impact

2

IntroductionIntroduction

What is the purpose of a control system?What is the purpose of a control system?“To maintain important process characteristics at

desired targets despite the effects of external perturbations.”

Control

Plant ProcessingProcessingobjectivesobjectives

SafetyMake $$$

Environment...

PerturbationsPerturbations

MarketEconomyClimateUpsets...

IntroductionIntroduction

Plant

ControlWhat constitutes a control system?

Combination of process sensors, actuators and computer systems designed and tuned to orchestratesafe and profitableoperation.

3

IntroductionIntroduction

Process Dynamics:

Study of the transient behavior of processes

Process Control

the use of process dynamics for the improvement of process operation and performance

or

the use of process dynamics to alleviate the effect of undesirable (unstable) process behaviors

IntroductionIntroduction

What do we mean by process?

A process, P, is an operation that takes an INPUT or a DISTURBANCE and gives an OUTPUT

INPUT: (u) Something that you can manipulateDISTURBANCE: (d) Something that comes as a result of some outside phenomenonOUTPUT: (y) An observable quantity that we want to

regulate

u

d

yP

Information Flow

4

ExamplesExamples

Stirred tank heater

MTin, w

Q

T, w

TinwQ

TProcess

InputsInputs Output

ExamplesExamples

The speed of an automobile

Force ofEngine

Friction

Inputs Output

Friction

EngineSpeedProcess

5

ExamplesExamples

e.g. Landing on Mars

ExamplesExamples

e.g. Millirobotics

LaparoscopicLaparoscopic ManipulatorsManipulators

6

IntroductionIntroduction

Process

A process, P, is an operation that takes an INPUT or a DISTURBANCE and gives an OUTPUT

INPUT: (u) Something that you can manipulateDISTURBANCE: (d) Something that comes as a result of some outside phenomenonOUTPUT: (y) An observable quantity that we want to

regulate

u

d

yP

Information Flow

ControlControl

What is control?

To regulate of a process output despite the effect of disturbances

Driving a carControlling the temperature of a chemical reactorReducing vibrations in a flexible structure

To stabilize unstable processesRiding a bikeFlight of an airplaneOperation of a nuclear plant

7

Benefits of ControlBenefits of Control

Economic BenefitsQuality (waste reduction)Variance reduction (consistency)Savings in energy, materials, manpower

Operability, safety (stability)PerformanceEfficiencyAccuracy

roboticsReliabilityStabilizability

bicycleaircraftnuclear reactor

ControlControl

A controller is a system designed to regulate a given process

Process typically obeys physical and chemical conservation lawsController obeys laws of mathematics and logic (sometimes intelligent)

e.g. - Riding a bike (human controller)- Driving a car- Automatic control (computer programmed to control)

Process

Controller

What is a controller?

8

Block representationsBlock representations

Block diagrams are models of the physical systems

Process

System Physical Boundary Transfer of

fundamental quantities

Mass, Energy and Momentum

Input variables Output variables

Physical

OperationAbstract

ControlControl

A controlled process is a system which is comprised of two interacting systems:

e.g. Most controlled systems are feedback controlled systems

The controller is designed to provide regulation of process outputs in the presence of disturbances

Process

Controller

OutputsDisturbances

Action Observation

monitorintervene

9

IntroductionIntroduction

What is required for the development of a What is required for the development of a control systemcontrol system??

1. The Plant (e.g. SPP of Nylon)1. The Plant (e.g. SPP of Nylon)

Water

Steam

Gas Make-up

Vent

Nylon

Blower

Dehumidifier

Reheater

ReliefPot

Heater

IntroductionIntroduction

What is required?What is required?

1. Process UnderstandingRequired measurementsRequired measurementsRequired actuatorsRequired actuatorsUnderstand design limitationsUnderstand design limitations

2. Process InstrumentationAppropriate sensor and actuator selectionAppropriate sensor and actuator selectionIntegration in control systemIntegration in control systemCommunication and computer architectureCommunication and computer architecture

3. Process ControlAppropriate control strategyAppropriate control strategy

10

ExampleExample

Cruise Control

Controller

FrictionProcess Speed

Engine

Human or Computer

Classical ControlClassical Control

Control is meant to provide regulation of process outputs about a reference, r, despite inherent disturbances

The deviation of the plant output, e=(r-y), from its intended reference is used to make appropriate adjustments in the plant input, u

ProcessController

Classical Feedback Control System

d

yur e+-

11

ControlControl

Process is a combination of sensors and actuators

Controller is a computer (or operator) that performs the required manipulations

e.g. Classical feedback control loop

yr eAC P

M

dComputer Actuator

Process

Sensor

-+

ExamplesExamples

Driving an automobile

yeAC P

M

Driver

Automobile-

+Steering

r

Visual and tactile measurement

Desired trajectoryr

Actual trajectoryy

12

ExamplesExamples

Stirred-Tank Heater

Tin, w

Q T, wHeater

TCThermocouple

yeAC P

M

Controller

Tank-

+Heater

Thermocouple

Tin, w

TR

ExamplesExamples

Measure T, adjust Q

Controller: Q=K(TR-T)+Qnominal

where Qnominal=wC(T-Tin)

Q: Is this positive or negative feedback?

Tin, w

TeAC P

M

Controller

Tank-

+Heater

Thermocouple

Feedback control

TR

13

ExamplesExamples

Measure Ti, adjust Q

A PC

MTi

Qi

ΔQ

Q

+

+

Feedforward Control

Control NomenclatureControl Nomenclature

Identification of all process variables

Inputs (affect process) Outputs (result of process)

Inputs

Disturbance variablesVariables affecting process that are due to external forces

Manipulated variablesThings that we can directly affect

14

Control NomenclatureControl Nomenclature

OutputsMeasured

speed of a carUnmeasured

acceleration of a carControl variables

important observable quantities that we want to regulatecan be measured or unmeasured

Controller

Manipulated

Disturbances

Process Control

Other

ExampleExample

T

L

T

wi, Ti

wc, Tci

wc, Tco

wo, To

h

Variables

• wi, wo: Tank inlet and outlet mass flows• Ti, To: Tank inlet and outlet temperatures• wc: Cooling jacket mass flow• Pc: Position of cooling jacket inlet valve• Po: Position of tank outlet valve• Tci, Tco: Cooling jacket inlet and outlet

temperatures• h: Tank liquid level

Po

Pc

15

ExampleExample

Variables Inputs Outputs

Disturbances Manipulated Measured Unmeasured ControlwiTiTciwchwoToPcPo

Task: Classify the variables

Process Control and ModelingProcess Control and Modeling

In designing a controller, we mustDefine control objectivesDevelop a process modelDesign controller based on modelTest through simulationImplement to real processTune and monitor

Model

Controlleryur e

d

Process

Design

Implementation

16

Control System DevelopmentControl System Development

Define Objectives

Develop a processmodel

Design controller based on model

Test bySimulation

Implement and Tune

MonitorPerformance

Control development is usually carried out following theseimportant steps

Often an iterative process, based on performance we may decide to retune, redesign or remodel a given control system

Control System Development Control System Development

Objectives“What are we trying to control?”

Process modeling“What do we need?”

Mechanistic and/or empirical

Controller design“How do we use the knowledge of process behavior to reach our process control objectives?”What variables should we measure?What variables should we control?What are the best manipulated variables?What is the best controller structure?

17

Control System DevelopmentControl System Development

Implement and tune the controlled processTest by simulationincorporate control strategy to the process hardwaretheory rarely transcends to realitytune and re-tune

Monitor performanceperiodic retuning and redesign is often necessary based on sensitivity of process or market demandsstatistical methods can be used to monitor performance

Process ModelingProcess Modeling

Motivation:

Develop understanding of processa mathematical hypothesis of process mechanisms

Match observed process behavioruseful in design, optimization and control of process

Control:

Interested in description of process dynamicsDynamic model is used to predict how process responds to given inputTells us how to react

18

Process ModelingProcess Modeling

What kind of model do we need?

Dynamic vs. Steady-state

Steady-stateVariables not a function of timeuseful for design calculation

DynamicVariables are a function of timeControl requires dynamic model

Process ModelingProcess Modeling

What kind of model do we need?

Experimental vs Theoretical

ExperimentalDerived from tests performed on actual processSimpler model formsEasier to manipulate

TheoreticalApplication of fundamental laws of physics and chemistrymore complex but provides understandingRequired in design stages

19

Process ModelingProcess Modeling

Dynamic vs. Steady-state

Step change in input to observeStarting at steady-state, we made a step changeThe system oscillates and finds a new steady-stateDynamics describe the transitory behavior

0 50 100 150 200 250 30040

45

50

55

60

65

Out

put

Time

Steady-State 1

Steady-State 2

Process ModelingProcess Modeling

Empirical vs. Mechanistic modelsEmpirical Models

only local representation of the process(no extrapolation)model only as good as the data

Mechanistic ModelsRely on our understanding of a processDerived from first principlesObserving laws of conservation of

MassEnergyMomentum

Useful for simulation and exploration of new operating conditionsMay contain unknown constants that must be estimated

20

Process ModelingProcess Modeling

Empirical vs Mechanistic modelsEmpirical models

do not rely on underlying mechanisms Fit specific function to match processMathematical French curve

0 50 100 150 200 250 3000.4

0.5

0.6

0.7

0.8

0.9

1

1.1

1.2

1.3

Out

put

Time

Process ModelingProcess Modeling

Linear vs NonlinearLinear

basis for most industrial controlsimpler model form, easy to identifyeasy to design controllerpoor prediction, adequate control

Nonlinearrealitymore complex and difficult to identifyneed state-of-the-art controller design techniques to do the jobbetter prediction and control

In existing processes, we really onDynamic models obtained from experimentsUsually of an empirical natureLinear

In new applications (or difficult problems)Focus on mechanistic modelingDynamic models derived from theoryNonlinear

21

Process ModelingProcess Modeling

General modeling procedure

Identify modeling objectivesend use of model (e.g. control)

Identify fundamental quantities of interestMass, Energy and/or Momentum

Identify boundaries

Apply fundamental physical and chemical lawsMass, Energy and/or Momentum balances

Make appropriate assumptions (Simplify)ideality (e.g. isothermal, adiabatic, ideal gas, no friction, incompressible flow, etc,…)

Write down energy, mass and momentum balances (develop the model equations)

Process ModelingProcess Modeling

Modeling procedure

Check model consistencydo we have more unknowns than equations

Determine unknown constantse.g. friction coefficients, fluid density and viscosity

Solve model equationstypically nonlinear ordinary (or partial) differential equationsinitial value problems

Check the validity of the modelcompare to process behavior

22

Process ModelingProcess Modeling

For control applications:

Modeling objectives is to describe process dynamics based on the laws of conservation of mass, energy and momentum

The balance equation

1. Mass Balance (Stirred tank)2. Energy Balance (Stirred tank heater)3. Momentum Balance (Car speed)

Rate of Accumulationof fundamental quantity

FlowIn

FlowOut

Rate ofProduction

= -

+

Process ModelingProcess Modeling

Application of a mass balanceHolding Tank

Modeling objective: Control of tank level

Fundamental quantity: Mass

Assumptions: Incompressible flow

h

F

Fin

23

Process ModelingProcess Modeling

Total mass in system = Total mass in system = ρV = ρAhFlow in = Flow in = ρFin

Flow out = Flow out = ρF

Total mass at time t = ρAh(t)Total mass at time Total mass at time t+Δt = = ρAh(t+Δt)Accumulation Accumulation

ρAh(t+Δt) − ρAh(t) = = ΔΔt(ρFin-ρF ),

ρ ρA dhdt

F Fin= −( ).

lim ( ) ( ) ( ),Δ

ΔΔt in

Ah t t Ah tt

F F→

+ − = −0

ρ ρ ρ

ρ ρ ρAh t t Ah tt

F Fin( ) ( ) ( ),+ − = −Δ

Δ

Process ModelingProcess Modeling

Model consistencyModel consistency“Can we solve this equation?”

Variables: h, ρ, Fin, F, A 5

Constants: ρ, A 2

Inputs: Fin, F 2

Unknowns: h 1

Equations 1

Degrees of freedom 0

There exists a solution for each value of the inputs Fin, F

24

Process ModelingProcess Modeling

Solve equationSolve equation

Specify initial conditions h(0)=h0 and integrate

h t h F FA

dint( ) ( ) ( ) ( )= +

−⎛⎝⎜

⎞⎠⎟∫0 0

τ τ τ

0 10 20 30 40 50 60 70 80 90 1000

0.5

1

1.5

2flo

w F

Fin

0 10 20 30 40 50 60 70 80 90 1000.9

1

1.1

1.2

1.3

h

Process ModelingProcess Modeling

Energy balance

Objective: Control tank temperatureFundamental quantity: EnergyAssumptions: Incompressible flow

Constant hold-up

MTin, w

Q

T, w

25

Process ModelingProcess Modeling

Under constant hold-up and constant mean pressure (small pressure changes)

Balance equation can be written in terms of the enthalpies of the various streams

Typically work done on system by external forces is negligible

Assume that the heat capacities are constant such that

dHdt

H H Qin out= − +& &

dHdt

H H Q Win out s= − + +& &

H C V T TP ref= −ρ ( )

& ( )H C w T Tout P ref= −ρ

& ( )H C w T Tin P in ref= −ρ

Process ModelingProcess Modeling

After substitution,

Since Tref is fixed and we assume constant ρ,Cp

Divide by ρ CpV

dTdt

wV

T T QC Vin

P

= − +( )ρ

ρ ρ ρC Vd T T

dtC w T T C w T T QP

refP in ref P ref

( )( ) ( )

−= − − − +

d C V T Tdt

C w T T C w T T QP refP in ref P ref

( ( ))( ) ( )

ρρ ρ

−= − − − +

26

Process ModelingProcess Modeling

Resulting equation:

Model ConsistencyModel Consistency

Variables: T, F, V, Tin, Q, Cp, ρ 7

Constants: V, Cp, ρ 3Inputs: F, Tin, Q 3Unknown: T 1

Equations 1

There exists a unique solution

dTdt

FV

T T QVCin

P= − +( )

ρ

Process ModelingProcess Modeling

Assume F is fixed

where τ=V/F is the tank residence time (or time constant)

If F changes with time then the differential equation does not have a closed form solution.

Product F(t)T(t) makes this differential equation nonlinear.

Solution will need numerical integration.

T t T e e T QC V dt t in

p

t( ) ( ) ( ( ) ( ) )/ ( )/= + +∫− −0

0

τ ς τ ζτ

ζρ ζ

dT tdt

F tV

T t T t Q tVCin

P

( ) ( ) ( ( ) ( )) ( )= − +

ρ

27

Process ModelingProcess Modeling

A simple momentum balance

Objective:Objective: Control car speedQuantityQuantity: MomentumAssumptionAssumption: Friction proportional to speed

MomentumMomentumOutOut==

Sum of forces Sum of forces acting on systemacting on system

MomentumMomentumInIn

Rate of Rate of AccumulationAccumulation --

++

Force ofEngine (u)

Friction

Speed (v)

Process ModelingProcess Modeling

Forces are: Force of the engine = uFriction = bv

Balance:

Total momentum = Mv

Model consistencyModel consistency

Variables: M, v, b, u 4Constants: M, b 2Inputs: u 1Unknowns v 1

d Mv tdt

M dv tdt

u t bv t( ( )) ( ) ( ) ( )= = −

28

Process ModelingProcess Modeling

Gravity tank

Objectives:Objectives: height of liquid in tankFundamental quantity:Fundamental quantity: Mass, momentumAssumptions:Assumptions:

Outlet flow is driven by head of liquid in the tankIncompressible flowPlug flow in outlet pipeTurbulent flow

h

L

F

Fo

Process ModelingProcess Modeling

From mass and momentum balances,

A system of simultaneous ordinary differential equations results

Linear or nonlinear?

dhdt

FA

A vA

dvdt

hgL

K vA

o P

F

P

= −

= −2

ρ

29

Process ModelingProcess Modeling

Model consistencyModel consistency

Variables Fo, A, Ap, v, h, g, L, KF, ρ 9

Constants A, Ap, g, L, KF, ρ 6

Inputs Fo 1

Unknowns h, v 2

Equations 2

Model is consistent

Solution of Solution of ODEsODEs

Mechanistic modeling results in nonlinear sets of ordinary differential equations

Solution requires numerical integration

To get solution, we must first:specify all constants (densities, heat capacities, etc, …)specify all initial conditionsspecify types of perturbations of the input variables

For the heated stirred tank,

specify ρ, CP, and Vspecify T(0)specify Q(t) and F(t)

dTdt

FV

T T QVCin

P= − +( )

ρ

30

Input SpecificationsInput Specifications

Study of control system dynamicsObserve the time response of a process output in response to input changes

Focus on specific inputs

1. Step input signals2. Ramp input signals3. Pulse and impulse signals4. Sinusoidal signals5. Random (noisy) signals

Common Input Signals

1. Step Input Signal: a sustained instantaneous change

e.g. Unit step input introduced at time 1

0 1 2 3 4 5 6 7 8 9 100

0.5

1

1.5

Inpu

t

Time

0 1 2 3 4 5 6 7 8 9 100

0.2

0.4

0.6

0.8

1

1.2

1.4

31

Common Input SignalsCommon Input Signals

2. Ramp Input: A sustained constant rate of change

e.g.

0 1 2 3 4 5 6 7 8 9 100

1

2

3

4

5

6

7

8

9

Inpu

t

Time

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

0

1

2

3

4

5

6

7

8

Out

put

Time

Common Input SignalsCommon Input Signals

3. Pulse: An instantaneous temporary change

e.g. Fast pulse (unit impulse)

0 1 2 3 4 5 6 7 8 9 100

10

20

30

40

50

60

70

80

90

100

Inpu

t

Time

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

0

0.05

0.1

0.15

0.2

0.25

0.3

0.35

0.4

0.45

Time

Out

put

32

Common Input SignalsCommon Input Signals

3. Pulses:

e.g. Rectangular Pulse

0 1 2 3 4 5 6 7 8 9 100

0.5

1

1.5

Inpu

t

Time

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

0

0.2

0.4

0.6

0.8

1

1.2

Out

put

Time

Common Input SignalsCommon Input Signals

4. Sinusoidal input

0 5 10 15 20 25 30-1.5

-1

-0.5

0

0.5

1

1.5

Inpu

t

Time

0 5 10 15 20 25 30-0.8

-0.6

-0.4

-0.2

0

0.2

0.4

0.6

0.8

Out

put

Time

33

Common Input SignalsCommon Input Signals

5. Random Input

0 5 10 15 20 25 30-1.5

-1

-0.5

0

0.5

1

1.5

Inpu

t

Time

0 5 10 15 20 25 30-0.8

-0.6

-0.4

-0.2

0

0.2

0.4

0.6

Out

put

Time

Solution of Solution of ODEsODEs using using LaplaceLaplaceTransformsTransforms

Process Dynamics and ControlProcess Dynamics and Control

34

Linear Linear ODEsODEs

For linear ODEs, we can solve without integrating by using Laplace transforms

Integrate out time and transform to Laplace domain

F s f t f t e dtst

t( ) [ ( )] ( )= ℑ = ∫ −

=

0

MultiplicationMultiplication

Y(s) = G(s)U(s)Y(s) = G(s)U(s)

IntegrationIntegration

dy tdt

ay t bu t

y c

( ) ( ) ( )

( )

= +

=0

Common TransformsCommon Transforms

Useful Useful LaplaceLaplace TransformsTransforms1. Exponential1. Exponential

2. Cosine 2. Cosine

f t e bt( ) = −

ℑ = = ∫∫

ℑ = −+

⎦⎥⎥

=+

− − − − +∞∞

−− + ∞

[ ]

[ ]

( )

( )

e e e dt e dt

e es b s b

bt bt st s b t

bts b t

00

0

1

f t t e ej t j t( ) cos( )= =

+−ω

ω ω

2

ℑ = ∫ + ∫⎧⎨⎩

⎫⎬⎭

=−

++

⎧⎨⎩

⎫⎬⎭

=+

− −∞

− +∞

[cos( )] ( ) ( )ω

ω ω ω

ω ωt e dt e dt

s j s js

s

s j t s j t12

12

1 10 0

2 2

35

Common TransformsCommon Transforms

Useful Useful LaplaceLaplace TransformsTransforms3. Sine3. Sine

f t t e ej

j t j t( ) sin( )= =

− −ω

ω ω

2

ℑ = ∫ − ∫⎧⎨⎩

⎫⎬⎭

=−

−+

⎧⎨⎩

⎫⎬⎭

=+

− −∞

− +∞

[sin( )] ( ) ( )ω

ω ωω

ω

ω ωtj

e dt e dt

j s j s j s

s j t s j t12

12

1 10 0

2 2

Common TransformsCommon Transforms

Operators1. Derivative of a function f(t)

2. Integral of a function f(t)

ℑ ∫⎡

⎣⎢

⎦⎥ = ∫∫ =−

∞f d e f d dt F s

s

t st t( ) ( ( ) ) ( )τ τ τ τ

0 00

] ]

du df

v e

dfdt

uv udv f t e sf t e dt

dfdt

s f t e dt f sF s f

st

st st

st

=

=

ℑ = − ∫ = − −∫

ℑ = ∫ − = −

∞ ∞− ∞ −

−∞

[ ] ( ) ( ( ) )

[ ] ( ) ( ) ( ) ( )

00 0 0

00 0

df tdt( )

36

Common TransformsCommon Transforms

g tt

f t t( )

( )=

<− ≥

⎧⎨⎩

0 ττ τ

[ ]ℑ = + −∫∫ − −∞

g t e dt e f t dtst st( ) ( ) ( )00

ττ

τ

[ ]ℑ = −g t e F ss( ) ( )τ

OperatorsOperators3. Delayed function f(t-τ)

Common TransformsCommon Transforms

Input Signals1. Constant1. Constant

2. Step 2. Step

3. Ramp function3. Ramp function

f tt

a t( ) =

<≥

⎧⎨⎩

0 00

ℑ = = − =∫ − − ∞∞

[ ( )] ( )f t ae dt aes

as

st st0

0

ℑ = = − =∫ − − ∞∞

[ ] ( )a ae dt aes

as

st st0

0

f t a( ) =

f tt

at t( ) =

<≥

⎧⎨⎩

0 00

[ ]ℑ = = −⎤

⎦⎥ + =−

∞ − ∞ −∞

∫ ∫f t ate dt e ats

aes

dt as

stst st

( )0 0 0

2

37

Common TransformsCommon Transforms

Input SignalsInput Signals4. Rectangular Pulse4. Rectangular Pulse

5. 5. Unit impulse

f tt

a t tt t

w

w

( ) =<

≤ <≥

⎨⎪

⎩⎪

0 00

0

[ ]ℑ = ∫ = −− −f t ae dt as

estt

t sww( ) ( )

01

[ ]ℑ = −→

−δ ( ) lim ( )tt s

et w

t s

w

w

0

1 1

[ ]ℑ = =→

−δ ( ) limt se

st

t s

w

w

01

Laplace Laplace TransformsTransforms

Final Value Theorem

Limitations:Limitations:

Initial Value Theorem

[ ] [ ]lim ( ) lim ( )t s

y t sY s→∞ →

=0

[ ]y t C

sY s s ss

( ) ,lim ( ) Re( )

∀ ≥→

1

00 exists

[ ]y sY ss

( ) lim ( )0 =→∞

38

Solution of Solution of ODEsODEs

We can continue taking Laplace transforms and generate a catalogue of Laplace domain functions. See SEM Table 3.1

The final aim is the solution of ordinary differential equations.

ExampleExampleUsing Laplace Transform, solve

Result

5 4 2 0 1dydt

y y+ = =, ( )

y t e t( ) . . .= + −05 05 0 8

Solution of Linear Solution of Linear ODEsODEs

Stirred-tank heater (with constant F)

taking Laplace

To get back to time domain, we mustSpecify Laplace domain functions Q(s), Tin(s)Take Inverse Laplace

dTdt

FV

T T QVC

T T

inP

= − +

=

( )

( )ρ

0 0

[ ] [ ] [ ]VF

dTdt

T t T tFC

Q t

T s T T s T s K Q s

T ss

Ts

T s Ks

Q s

inP

in P

inP

ℑ⎡⎣⎢

⎤⎦⎥

= ℑ − ℑ + ℑ

− = − +

=+

++

++

( ) ( ) ( )

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

( ) ( ) ( ) ( )

1

0

10 1

1 1

ρτ

ττ τ τ

39

Linear Linear ODEsODEs

Notes:Notes:The expression

describes the dynamic behavior of the process explicitly

The Laplace domain functions multiplying T(0),Tin(s) and Q(s) are transfer functions

11

1

1

τ

ττ

τ

sKs

s

P

+

+

+

T ss

Ts

T s Ks

Q sinP( ) ( ) ( ) ( )=

++

++

τ τ τ10 1

1 1

+

++

Tin(s)

Q(s)

T(0)

T(s)

Laplace Laplace TransformTransform

Assume Tin(t) = sin(ωt) then the transfer function gives directly

Cannot invert explicitly, but if we can find A and B such that

we can invert using tables.

Need Partial Fraction Expansion to deal withsuch functions

11 12 2τ

ωω τs

T ss s

in+=

+ +( )

( )( )

As

Bs s s2 2 2 21 1+

++

=+ +ω τ

ωω τ( )( )

40

Linear Linear ODEsODEs

We deal with rational functions of the form r(s)=p(s)/q(s) where degree of q > degree of p

q(s) is called the characteristic polynomial of the function r(s)

Theorem:Every polynomial q(s) with real coefficients can be factored into the product of only two types of factors

powers of linear terms (x-a)n and/orpowers of irreducible quadratic terms, (x2+bx+c)m

Partial fraction ExpansionsPartial fraction Expansions

1. q(s) has real and distinct factors

expand as

2. q(s) has real but repeated factor

expanded

q s s bii

n( ) ( )= +∏

=1

q s s b n( ) ( )= +

r ss b

i

ii

n( ) =

+∑=

α

1

r ss b s b s b

nn( )

( ) ( )=

++

++ +

+

α α α1 22 Λ

41

Partial Fraction ExpansionPartial Fraction Expansion

Heaviside expansion

For a rational function of the form

Constants are given by

Note: Most applicable to q(s) with real and distinct roots. It can be applied to more specific cases.

r s p sq s

p s

s b s bi

i

ni

ii

n( ) ( )

( )( )

( ) ( )= =

+∏=

+∑

=

=

1

1

α

αi is b

s b p sq s

i

= + ⎤

⎦⎥ =−( ) ( )

( )

Partial Fraction ExpansionsPartial Fraction Expansions

3. Q(s) has irreducible quadratic factors of the form

where

Algorithm for Solution of ODEs

Take Laplace Transform of both sides of ODESolve for Y(s)=p(s)/q(s)Factor the characteristic polynomial q(s)Perform partial fraction expansionInverse Laplace using Tables of Laplace Transforms

q s s d s d n( ) ( )= + +21 0

d d2

04<

42

Transfer Function Modelsof Dynamical Processe

Process Dynamics and ControlProcess Dynamics and Control

Transfer FunctionTransfer Function

Heated stirred tank exampleHeated stirred tank example

e.g. e.g. The block

is called the transfer function relating Q(s)to T(s)

T ss

Ts

T s Ks

Q sinP( ) ( ) ( ) ( )=

++

++

τ τ τ10 1

1 1

11

1

1

τ

ττ

τ

sKs

s

P

+

+

+

+

++

Tin(s)

Q(s)

T(0)

T(s)

Ks

P

τ + 1

43

Process ControlProcess Control

Time DomainTime Domain

Transfer function Modeling, Controller Design and Analysis

Process Modeling,Experimentation and

Implementation

Laplace Laplace DomainDomain

Ability to understand dynamics in Laplace and time domains is extremely important in thestudy of process control

Transfer functionTransfer function

Order of underlying ODE is given by degree of characteristic polynomial

e.g. First order processes

Second order processes

Steady-state value obtained directlye.g. First order response to unit step function

Final value theorem

Transfer functions are additive and multiplicative

Y s Ks

U sP( ) ( )=+τ 1

Y s Ks s

U sP( ) ( )=+ +τ ξτ2 2 2 1

Y sK

s sp( )

( )=

+τ 1

[ ] [ ]lim ( ) lim ( )s s

PsY s G s K→ →

= =0 0

44

Transfer functionTransfer function

Effect of many transfer functions on a Effect of many transfer functions on a variable is additivevariable is additive

T ss

Ts

T s Ks

Q sinP( ) ( ) ( ) ( )=

++

++

τ τ τ10 1

1 1

11

1

1

τ

ττ

τ

sKs

s

P

+

+

+

+

++

Tin(s)

Q(s)

T(0)

T(s)

Transfer FunctionTransfer Function

Effect of consecutive processes in series in Effect of consecutive processes in series in multiplicativemultiplicative

Transfer FunctionTransfer Function

Ks

P

τ + 1Ks

P

τ + 1U(s) Y2(s)Y1(s)

Y s Ks

U s

Y s Ks

Y s

Y s Ks

Ks

U s

P

P

P P

1

2 1

1

1

1

1 1

( ) ( )

( ) ( )

( ) ( )

=+

=+

=+

⎛⎝⎜

⎞⎠⎟ +

⎛⎝⎜

⎞⎠⎟

τ

τ

τ τ

45

Deviation VariablesDeviation Variables

To remove dependence on initial conditione.g.

Remove dependency on T(0)

Transfer functions express extent of deviation from a given steady-state

ProcedureFind steady-stateWrite steady-state equationSubtract from linear ODEDefine deviation variables and their derivatives if requiredSubstitute to re-express ODE in terms of deviation variables

′ =+

′ ++

′T ss

T s Ks

Q sinP( ) ( ) ( )1

1 1τ τ

T ss

Ts

T s Ks

Q sinP( ) ( ) ( ) ( )=

++

++

τ τ τ10 1

1 1

Example

Jacketed heated stirred tankJacketed heated stirred tank

AssumptionsAssumptions: Constant hold-up in tank and jacketConstant heat capacities and densitiesIncompressible flow

ModelModel

F, Tin

Fc, TcinFc, Tc

F, T

h

dTdt

FV

T T h AC V

T T

dTdt

FV

T T h AC V

T T

inc c

Pc

c c

ccin c

c c

c Pc cc

= − + −

= − − −

( ) ( )

( ) ( )

ρ

ρ

46

Nonlinear Nonlinear ODEsODEs

Q: If the model of the process is nonlinear, how do we express it in terms of a transfer function?

A: We have to approximate it by a linear one (i.e.Linearize) in order to take the Laplace.

f(x0)

f(x)

∂∂fx

x( )0

xx0

Nonlinear systemsNonlinear systems

First order Taylor series expansion

1. Function of one variable

2. Function of two variables

3. ODEs

f x u f xs usf x u

x x xsf x u

u u uss s s s( , ) ( , ) ( , ) ( ) ( , ) ( )≈ + − + −∂∂

∂∂

f x f xsf x

x x xss( ) ( ) ( ) ( )≈ + −∂∂

& ( ) ( ) ( ) ( )x f x f xsf xs

xx xs= ≈ + −∂

47

Transfer functionTransfer function

Procedure to obtain transfer function from nonlinear process models

Find steady-state of processLinearize about the steady-stateExpress in terms of deviations variables about the steady-stateTake Laplace transformIsolate outputs in Laplace domainExpress effect of inputs in terms of transfer functions

Y sU s

G s

Y sU s

G s

( )( )

( )

( )( )

( )

11

22

=

=

First order ProcessesFirst order Processes

ExamplesExamples, Liquid storage

h

F

Fi

ρ ρ ρ ρ βA dhdt

F F F hi i= − = −

ρβ

ρβ

τ

τ

A dhdt

F h

dhdt

h K F

dhdt

h K F

i

p i

p i

= −

+ =

′ + ′ = ′

48

First Order ProcessesFirst Order Processes

ExamplesExamples: Speed of a Car

Stirred-tank heater

Note:

ρ ρ

ρ

τ

C V dTdt

C FT Q

VF

dTdt C F

Q T

dTdt

K Q T

p p

p

p

′ = − ′ + ′

′ = ′ − ′

′ = ′ − ′

1 ′′

=+

T sQ s

Ks

p( )( ) τ 1

M dvdt

u bv

Mb

dvdt b

u v

dvdt

K u vp

′ = ′ − ′

′ = ′ − ′

′ = ′ − ′

1

τ

′′

=+

v su s

Ks

p( )( ) τ 1

′ =T tin ( ) 0

First Order ProcessesFirst Order Processes

Liquid Storage Tank

Speed of a car

Stirred-tank heater

Kp τ

ρ/β ρA/β

M/b 1/b

1/ρCpF V/F

First order processes are characterized by:

1. Their capacity to store material, momentum and energy2. The resistance associated with the flow of mass, momentum or energy in reaching theircapacity

49

First order processesFirst order processes

Liquid storage:Capacity to store mass : ρAResistance to flow : 1/β

Car:Capacity to store momentum: MResistance to momentum transfer : 1/b

Stirred-tank heaterCapacity to store energy: ρCpVResistance to energy transfer : 1/ ρCpF

Time Constant = τ = (Storage capacitance)*(Resistance to flow)

First order processFirst order process

Step response of first order process

Step input signal of magnitude M

Y sKs

Ms

p( ) =+τ 1

0 1 2 3 4 5 60

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

0.632

y(t)/

KpM

t/τ

50

First order processFirst order process

What do we look for?What do we look for?

Process Gain: SteadyProcess Gain: Steady--State ResponseState Response

Process Time Constant:Process Time Constant:

ττ = =

What do we need?What do we need?

Process at steadyProcess at steady--statestateStep input of magnitude MStep input of magnitude MMeasure process gain from new steadyMeasure process gain from new steady--statestateMeasure time constantMeasure time constant

lims

pp

Ks

K yu→ +

⎣⎢

⎦⎥ = = =

0 1τOverall Change in yOverall Change in u

ΔΔ

Time Required to Reach 63.2% of final value

First order processFirst order process

Ramp response:Ramp response:

Ramp input of slope a

Y sKs

as

p( ) =+τ 1 2

0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 50

0.5

1

1.5

2

2.5

3

3.5

4

4.5

5

τ

a

t/τ

y(t)/

Kpa

51

First order ProcessFirst order Process

Sinusoidal responseSinusoidal response

Sinusoidal input Asin(ωt)

Y s Ks

As

P( ) =+ +τ

ωω1 2 2

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

-1

-0.5

0

0.5

1

1.5

2

AR

φ

y(t)/

A

t/τ

[ ]{ }lim ( ) sin( )t

PY s K A t→ ∞

−ℑ =+

+12 21 τ ω

ω φ

First order ProcessesFirst order Processes

10-2

10-1

100

101

102

10-2

10-1

100

AR

/Kp

τpω

Bode Plots

10-2

10-1

100

101

102

-100

-80

-60

-40

-20

0

φ

τpω

High Frequency

AsymptoteCorner Frequency

AR K=

+1 2 2τ ωφ ωτ= − −tan ( )1

Amplitude Ratio Phase Shift

52

Integrating ProcessesIntegrating Processes

Example: Liquid storage tankExample: Liquid storage tank

Process acts as a pure integrator

h

F

Fi

ρ ρ ρA dhdt

F F

Adhdt

F F

i

i

= −

= −

′′ =H s

F s

As

i

( )

( )

/1

F F F F F F

A dhdt

F F

i i is s

i

′ = − ′ = −′ = ′ − ′

,

′′ = −H s

F s

As

( )

( )

/1

Process ModelingProcess Modeling

Step input of magnitude MStep input of magnitude M

Y s Ks

Ms

KMs

( ) = = 2

Out

put

Time

Inpu

t

Time

Slope = KM

y tt

KMt t( ) =

<≥

⎧⎨⎩

0 00

53

Integrating processesIntegrating processes

Unit impulse responseUnit impulse response

Y s Ks

M KMs

( ) = =

Out

put

Time

Inpu

t

Time

KM

y tt

KM t( ) =

<≥

⎧⎨⎩

0 00

Integrating ProcessesIntegrating Processes

Rectangular pulse responseRectangular pulse response

Y s Ks

Ms

e KMs

et s t sw w( ) ( ) ( )= − = −− −1 12

Out

put

Time

Inpu

t

Time

y tKMt t t

KMt t tw

w w( ) =

<≥

⎧⎨⎩

54

Second Order ProcessesSecond Order Processes

Three types of second order process:

1. Multicapacity processes: processes that consist of two or more capacities in seriese.g. Two heated stirred-tanks in series

2. Inherently second order processes: Fluid or solid mechanic processes possessing inertia and subjected to some acceleratione.g. A pneumatic valve

3. Processing system with a controller: Presence of a controller induces oscillatory behaviore.g. Feedback control system

Second order ProcessesSecond order Processes

MulticapacityMulticapacity Second Order ProcessesSecond Order ProcessesNaturally arise from two first order processes in Naturally arise from two first order processes in seriesseries

By multiplicative property of transfer functionsBy multiplicative property of transfer functions

Y s K Ks s

U sP P( )( )( )

( )=+ +

1 2

1 21 1τ τ

Ks

P1

1 1τ +

U(s) Y(s)

Ks

P2

2 1τ +Y(s)U(s)

K Ks s

P P1 2

1 21 1( )( )τ τ+ +

55

Second Order ProcessesSecond Order Processes

Inherently second order process:Inherently second order process:e.g. Pneumatic Valve

Momentum Balance

x

p

M ddt

dxdt

pA Kx C dxdt

MK

d xdt

CK

dxdt

x AK

p

x sp s

AK

MK s C

K s

= − −

+ + =

′′

=+ +

2

2 1( )( )

Second order ProcessesSecond order Processes

Second order process:Second order process:Assume the general formAssume the general form

wherewhere ΚΚPP = Process steady= Process steady--state gainstate gainττ = Process time constant= Process time constantξξ = Damping Coefficient= Damping Coefficient

Three families of processesThree families of processes

ξξ<1<1 UnderdampedUnderdampedξξ==11 Critically DampedCritically Dampedξξ>1>1 OverdampedOverdamped

Note: Chemical processes are typically Note: Chemical processes are typically overdamped overdamped or critically dampedor critically damped

Y S Ks s

U sP( ) ( )=+ +τ ξτ2 2 2 1

56

Second Order ProcessesSecond Order Processes

Roots of the characteristic polynomial

Case 1) ξ>1: Two distinct real rootsSystem has an exponential behavior

Case 2) ξ=1: One multiple real rootExponential behavior

Case 3) ξ<1: Two complex rootsSystem has an oscillatory behavior

− ± −

− ± −

2 4 42

1 1

2 2 2

2

2

ξτ ξ τ ττ

ξτ τ

ξ

Second order ProcessesSecond order Processes

Step response of magnitude MStep response of magnitude M

Y S Ks s

Ms

P( ) =+ +τ ξτ2 2 2 1

0 1 2 3 4 5 6 7 8 9 100

0.2

0.4

0.6

0.8

1

1.2

1.4

1.6

1.8

2

ξ=2

ξ=0

ξ=0.2

57

Second order processSecond order process

Observations

Responses exhibit overshoot (y(t)/KM >1) when ξ<1

Large ξ yield a slow sluggish response

Systems with ξ=1 yield the fastest response without overshoot

As ξ (with ξ<1) becomes smaller system becomes more oscillatory

If ξ<0, system oscillates without bounds (unstable)

Second order processesSecond order processes

Example Example -- Two Stirred tanks in seriesTwo Stirred tanks in series

MTin, w

Q

T1, wM

Q

T2, w

Response of T2 toTin is an example of anoverdamped second order process

58

Second order ProcessesSecond order Processes

Characteristics of underdamped second order process

1. Rise time, tr

2. Time to first peak, tp

3. Settling time, ts

4. Overshoot:

5. Decay ratio:

OS ab

= = −−

⎝⎜⎜

⎠⎟⎟exp ξ

ξπ

1 2

DR cb

= = −−

⎝⎜⎜

⎠⎟⎟exp 2

1 2πξ

ξ

Second order ProcessesSecond order Processes

0 5 10 15 20 25 30 35 40 45 500

0.2

0.4

0.6

0.8

1

1.2

1.4

1.6

1.8

-5%

+5%

a

b

c

trts

P

tp

59

Second Order ProcessSecond Order Process

Sinusoidal ResponseSinusoidal Response

wherewhere

Y sK

s sA

sp( ) =

+ + +τ ξτ

ω

ω2 2 2 22 1

( )[ ] ( )y t

K Atp( ) sin( )=

− +

+

1 22 2 2ωτ ξτω φ

φ ξωτ

ωτ= −

⎣⎢⎢

⎦⎥⎥

−tan( )

12

21

( )[ ] ( )ARn =

− +

1

1 22 2 2ωτ ξωτ

Second Order ProcessesSecond Order Processes

Bode PlotsBode Plots

10-1 100 10110-1

100

101

10-1 100 101

-150

-100

-50

0

ξ=1

ξ=0.1

ξ=1

ξ=0.1

60

More Complicated processesMore Complicated processes

Transfer function typically written as rational function of polynomials

where r(s) and q(s) can be factored as

s.t.

G s r sq s

a a s a s

b b s b s( ) ( )

( )= =

+ + +

+ + +

0 1

0 1

Κ

Κ

ρρ

θθ

q s b s s sr s a s s sa a a

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

= + + +

= + + +0 1 2

0 1 2

1 1 11 1 1

τ τ ττ τ τ

θ

θ

Λ

Λ

G s Ks s

s sa a

( )( ) ( )

( ) ( )=

+ +

+ +

τ τ

τ τρ

θ

1 1 1

1 11

Λ

Λ

Poles and zeroesPoles and zeroes

Definitions:the roots of r(s) are called the zeroszeros of G(s)

the roots of q(s) are called the polespoles of G(s)

Poles: Directly related to the underlying differential equation

If Re(pi)<0, then there are terms of the form e-pit in y(t) - y(t) vanishes to a unique point

If any Re(pi)>0 then there is at least one term of the form epit - y(t) does not vanish

z za a

11 1

1= − = −

τ τρρ

, ,Λ

p p11

1 1= − = −

τ τθθ

, ,Λ

61

PolesPoles

e.g. A transfer function of the form

with can factored to a sum of

A constant term from sA e-t/τ from the term (τ1s+1)A function that includes terms of the form

Poles can help us to describe the qualitative behavior of a complex system (degree>2)

The sign of the poles gives an idea of the stability of the system

e t

e t

t

t

ξτ

ξτ

ξ τ

ξ τ

2

2

1

1

22

22

sin( )

cos( )

Ks s s s( )( )τ τ ξτ1

2 221 2 1+ + +

0 1≤ <ξ

Poles

Calculation performed easily in MATLAB

Function ROOTSe.g.

» ROOTS([1 1 1 1])ans =

-1.0000 0.0000 + 1.0000i0.0000 - 1.0000i

»

q s s s s( ) = + + +3 2 1

MATLAB

62

PolesPoles

Plotting poles in the complex plane

Roots: -1.0, 1.0j, -1.0j

-1.2 -1 -0.8 -0.6 -0.4 -0.2 0 0.2-1

-0.8

-0.6

-0.4

-0.2

0

0.2

0.4

0.6

0.8

1

Imag

inar

y ax

is

Real axis

q s s s s( ) = + + +3 2 1

PolesPoles

Process Behavior with purely complex poles

0 5 10 15 20 25 30 35 40 45 500

0.2

0.4

0.6

0.8

1

1.2

1.4

1.6

1.8Unit Step Response

y(t)

t

63

PolesPoles

-0.5 -0.4 -0.3 -0.2 -0.1 0 0.1 0.2 0.3 0.4 0.5-1

-0.8

-0.6

-0.4

-0.2

0

0.2

0.4

0.6

0.8

1

Imag

inar

y ax

is

Real axis

Roots: -0.4368, -0.4066+0.9897j, -0.4066-0.9897j

2 2 5 3 13 2s s s+ + +.

PolesPoles

Process behavior with mixed real and complex poles

0 2 4 6 8 10 12 14 16 18 200

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1Unit Step Response

y(t)

t

64

PolesPoles

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

-1

-0.5

0

0.5

1

1.5

Imag

inar

y ax

is

Real axis

2 2 5 3 054 3 2s s s s+ + + −. .

Roots: -0.7441, -0.3805+1.0830j, -0.3805-1.0830j, 0.2550

PolesPoles

Process behavior with unstable pole

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

0

20

40

60

80

100

120

140

160Unit Step Response

y(t)

t

65

ZerosZeros

Transfer function:Transfer function:

Let τ1 is the dominant time constant

G sK ss s

p a( )( )

( )( )=

+

+ +

ττ τ

11 11 2

y t K M e epa

ta

t( ) = +

−−

+−−

⎝⎜⎜

⎠⎟⎟

− −1 1

1 22

1 21 2τ τ

τ ττ ττ τ

τ τ

τ τ1 2>

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

0

0.5

1

1.5

2

2.5

3

Time

y(t)/

KM

16

8

4

21

0-1 -2

ZerosZeros

Observations:

Adding a zero to an overdamped second order process yields overshoot and inverse response

Inverse response is observed when the zeros lie in right half complex plane, Re(z)>0

Overshoot is observed when the zero is dominant ( )

Pole-zero cancellation yields a first order process behavior

In physical systems, overshoot and inverse response are a result of two process with different time constants, acting in opposite directions

τ τa > 1

66

ZerosZeros

Can result from two processes in parallel

If gains are of opposite signs and time constants are different then a right half plane zero occurs

U(s) Y(s)

Ks2

2 1τ +

Ks

11 1τ +

G s K ss s

a( ) ( )( )( )

= ++ +τ

τ τ1

1 11 2

K K K= +1 2 τ τ τa

K KK K

=++

1 2 2 11 2

Dead TimeDead Time

Time required for the fluid to reach the valve

usually approximated as dead time

h

Fi

Control loop

Manipulation of valve does not lead to immediatechange in level

67

Dead timeDead time

Delayed transfer functions

e.g. First order plus dead-time

Second order plus dead-time

e d s−τ G s( )U(s) Y(s)

Y s e G s U sd s( ) ( ) ( )= −τ

G se K

s

d sp( ) =

+

−τ

τ 1

G s e Ks s

d sP( ) =

+ +

−τ

τ ξτ2 2 2 1

Dead timeDead time

Dead time (delay)

Most processes will display some type of lag time Dead time is the moment that lapses between input changes and process response

0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 5.50

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

y/K

M

t/tauτD

Step response of a first order plus dead time process

G s e d s( ) = −τ

68

Dead TimeDead Time

Problemuse of the dead time approximation makes analysis (poles and zeros) more difficult

Approximate dead-time by a rational (polynomial) function

Most common is Pade approximation

G se K

s

d sp( ) =

+

−τ

τ 1

e G ss

s

e G ss s

s s

s

s

≈ =−

+

≈ =− +

+ +

θ

θ

θ

θ

θ θ

θ θ

1

2

22

22

12

12

12 12

12 12

( )

( )

Pade Pade ApproximationsApproximations

In general Pade approximations do not approximate dead-time very well

Pade approximations are better when one approximates a first order plus dead time process

Pade approximations introduce inverse response (right half plane zeros) in the transfer function

Limited practical use

G se K

s

s

s

Ks

sp p( ) =

+≈

+ +

−θ

τ

θ

θ τ1

12

12

1

69

Process ApproximationProcess Approximation

Dead timeDead timeFirst order plus dead time model is often used First order plus dead time model is often used for the approximation of complex processesfor the approximation of complex processes

Step response of an Step response of an overdampedoverdamped second second order processorder process

0 1 2 3 4 5 6 7 80

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

- First Order plus dead timeo Second Order

Process ApproximationProcess Approximation

Second order Second order overdamped overdamped or first order or first order plus dead time?plus dead time?

Second order process model may be more Second order process model may be more difficult to identifydifficult to identify

0 1 2 3 4 5 6 7 8-0.2

0

0.2

0.4

0.6

0.8

1

1.2

-- First order plus dead time- Second order overdampedo Actual process

70

Process ApproximationProcess Approximation

Transfer Function of a delay system

First order processes

Second order processes

Y s K es

U sP

sD

( ) ( )=+

− τ

τ 1

Y S K es s

U sP

sD

( ) ( )=+ +

− τ

τ ξτ2 2 2 1

G(s)e Ds− τ

Y(s)U(s)

Process ApproximationProcess Approximation

More complicated processesHigher order processes (e.g. N tanks in series)

For two dominant time constants τ1 and τ2process well approximated by

For one dominant time constant τ1, process well approximated by

Y(s)K K Ks s s

P P PN

N

1 2

1 21 1 1Λ

Λ( )( ) ( )τ τ τ+ + +U(s)

G se K

s

sp

ii

N( )

( )≈

+=

=∑

θ

τθ τ

1 21

G se K

s s

sp

ii

N( )

( )( )≈

+ +=

=∑

θ

τ τθ τ

1 2 31 1

71

Process ApproximationProcess Approximation

ExampleExample

G ss s s

( )( )( )( )

=+ + +

110 1 25 1 1 2

0 20 40 60 80 100 120 140 160 180 200-0.2

0

0.2

0.4

0.6

0.8

1

1.2

G s es

s1

12

25 1( ) =

+

G s es s

s2

2

10 1 25 1( )

( )( )=

+ +

Empirical ModelingEmpirical Modeling

Objective:

To identify low-order process dynamics (i.e.,first and second order transfer function models)Estimate process parameters (i.e., Kp, τ and ξ)

Methodologies:

1. Least Squares Estimationmore systematic statistical approach

2. Process Reaction Curve Methodsquick and easybased on engineering heuristics

72

Empirical ModelingEmpirical Modeling

Least Squares Estimation:Simplest model form

Process Description

where y vector of process measurementx vector of process inputsβ1, β0 process parameters

Problem:Find β1, β0 that minimize the sum of squared

residuals (SSR)

E y x[ ] = +β β0 1

y x= + +β β ε0 1

SSR y xi ii

n= − −

=∑ ( )β β0 1

2

1

Empirical ModelingEmpirical Modeling

SolutionDifferentiate SSR with respect to parameters

These are called the normal equations. Solving for parameters gives:

where

∂∂ β

β β

∂∂ β

β β

SSR y x

SSR x y x

i ii

n

i i ii

n0

0 11

10 1

1

2 0

2 0

= − − − =

= − − − =

=∑

=∑

( ∃ ∃ )

( ∃ ∃ )

∃ ∃

β β

β

0 1

11

2 2

1

= −

=−

=∑

=∑

y x

x y nxy

x nx

i ii

n

ii

n

x xn

y yn

ii

n ii

n= =

=∑

=∑,

1 1

73

Empirical ModelingEmpirical Modeling

Compact formDefine

Then

Problemfind value of β that minimize SSR

Y

yy

y

X

xx

xn n

=

⎢⎢⎢⎢

⎥⎥⎥⎥

=

⎢⎢⎢⎢

⎥⎥⎥⎥

=⎡

⎣⎢

⎦⎥

1

2

1

2 0

1

11

1Μ Μ Μ

, , βββ

E

y xy x

y x

Y X

n n

=

− −− −

− −

⎢⎢⎢⎢

⎥⎥⎥⎥

= −

1 0 1 1

2 0 1 2

0 1

β ββ β

β β

βΜ

SSR E ET=

Empirical ModelingEmpirical Modeling

Solution in Compact FormNormal Equations can be written as

which can be shown to give

or

In practiceManipulations are VERY easy to perform in MATLABExtends to general linear model (GLM)

Polynomial model

∂∂ βE ET

= 0

X X X YT T∃β =

( )∃β =−

X X X YT T1

E y x x[ ] = + +β β β0 1 1 11 12

E y x xp p[ ] = + + +β β β0 1 1 Κ

74

Empirical ModelingEmpirical Modeling

Control Implementation:previous technique applicable to process model that are linear in the parameters (GLM, polynomials in x, etc…)

i.e. such that, for all i, the derivatives are not a function of β

typical process step responsesfirst order

Nonlinear in Kp and τoverdamped second order

Nonlinear in Kp, τ1 and τ2

nonlinear optimization is required to find the optimum parameters

∂∂ β

ei

E y t K M ept[ ( )] ( )/= − −1 τ

E y t K M e ep

t t[ ( )]

/ /= − −

⎝⎜⎜

⎠⎟⎟

− −1 1 2

1 2

1 2τ ττ τ

τ τ

Empirical ModelingEmpirical Modeling

Nonlinear Least Squares required for control applications

system output is generally discretized

or, simply

First Order process (step response)

Least squares problem becomes the minimization of

This yields an iterative problem solution best handled by software packages: SAS, Splus, MATLAB (function leastsq)

SSR y K M ei ptni

i= − − −∑

=

( ( ))/1 2

1

τ

y t y y yn( ) [ , , , ]→ 1 2 Κ

y t y t y t y tn( ) [ ( ), ( ), , ( )]→ 1 2 Κ

E y K M ei pti[ ] ( )/= − −1 τ

75

Empirical ModelingEmpirical Modeling

Example

Nonlinear Least Squares Fit of a first order process from step response data

Model

Data

E y t K ept[ ( )] . ( )/= − −30 1 τ

0 10 20 30 40 50 60 70 80-0.5

0

0.5

1

1.5

2

2.5

3

3.5

4

4.5

y(t)

t

Step Response

Empirical ModelingEmpirical Modeling

Results:Using MATLAB function “leastsq” obtained

Resulting Fit

Kp = =13432 118962. , .τ

0 10 20 30 40 50 60 70 80-0.5

0

0.5

1

1.5

2

2.5

3

3.5

4

4.5

y(t)

t

Step Response

76

Empirical ModelingEmpirical Modeling

Approximation using delayed transfer functions

For first order plus delay processes

DifficultyDiscontinuity at θ makes nonlinear least squares difficult to apply

Solution1. Arbitrarily fix delay or estimate using

alternative methods2. Estimate remaining parameters3. Readjust delay repeat step 2 until best value of

SSR is obtained

E yt

K M e tip

ti[ ]( )( )/=

≤ <− ≥

⎧⎨⎩

− −0 0

θθ τ

Empirical ModelingEmpirical Modeling

Example 2Underlying “True” Process

Data

G ss s s

( )( )( )( )

=+ + +

110 1 25 1 1 2

0 20 40 60 80 100 120 140-0.5

0

0.5

1

1.5

2

2.5

3

3.5

y(t)

t

77

Empirical ModelingEmpirical Modeling

Fit of a first order plus dead time

Second order plus dead time

G s es s

s2

20 994624 9058 1 101229 1

( ) .( . )( . )

=+ +

G s es

s1

111000027 3899 1

( ) .( . )

=+

0 20 40 60 80 100 120 140-0.5

0

0.5

1

1.5

2

2.5

3

3.5

t

y(t)

Empirical Modeling

Process reaction curve method:based on approximation of process using first order plus delay model

1. Step in U is introduced2. Observe behavior ym(t)3. Fit a first order plus dead time model

GpGc

Gs

M/s D(s)

Y(s)

Ym(s)

Y*(s)

U(s)

Manual Control

Y s KMes sm

s( )

( )=

+

−θ

τ 1

78

Empirical Modeling

First order plus dead-time approximations

Estimation of steady-state gain is easyEstimation of time constant and dead-time is more difficult

0 1 2 3 4 5 6 7 8-0.2

0

0.2

0.4

0.6

0.8

1

1.2

τ

KM

θ

Empirical ModelingEmpirical Modeling

Estimation of time constant and dead-time from process reaction curves

find times at which process reaches 35.3% and 85.3%

Estimate

0 20 40 60 80 100 120 140 1600

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

y(t)

t

τ

t1 t2

θτ

= −= −

13 0 290 67

1 2

2 1

. .. ( )

t tt t

79

Empirical ProcessEmpirical Process

ExampleFor third order process

Estimates:

Compare:Least Squares Fit Reaction Curve

G ss s s

( )( )( )( )

=+ + +

110 1 25 1 1 2

t t1 223 62 51178 26 46

= =∴ = =

, .. , .θ τ

G s es

s1

117810026 46 1

( ) .( . )

.=

+

−G s e

s

s1

111000027 3899 1

( ) .( . )

=+

Empirical ModelingEmpirical Modeling

Process Reaction Curve Method

based on graphical interpretationvery sensitive to process noiseuse of step responses is troublesome in normal plant operations

frequent unmeasurable disturbancesdifficulty to perform instantaneous step changesmaybe impossible for slow processes

restricted to first order models due to reliabilityquick and easy

Least Squaressystematic approachcomputationally intensivecan handle any type of dynamics and input signalscan handle nonlinear control processesreliable

80

Feedback ControlFeedback Control

Steam heated stirred tankSteam heated stirred tank

Feedback control system: Valve is manipulated to increase flow of steam to control tank temperature

Closed-loop process: Controller and process are interconnected

TT TC

IP

Ps

Condensate

Steam

Fin,Tin

F,TIP

LT

LC

Feedback ControlFeedback Control

Control Objective:maintain a certain outlet temperature and tank level

Feedback Control:

temperature is measured using a thermocouplelevel is measured using differential pressure probesundesirable temperature triggers a change in supply steam pressurefluctuations in level trigger a change in outlet flow

Note:level and temperature information is measured at outlet of process/ changes result from inlet flow or temperature disturbances inlet flow changes MUST affect process before an adjustment is made

81

ExamplesExamples

Feedback Control:requires sensors and actuators

e.g. Temperature Control Loop

Controller:software component implements math hardware component provides calibrated signal for actuator

Actuator:physical (with dynamics) process triggered by controllerdirectly affects process

Sensor:monitors some property of system and transmits signal back to controller

Tin, F

TeAC P

M

Controller

Tank-

+Valve

Thermocouple

TR

ClosedClosed--loop Processesloop Processes

Study of process dynamics focused on uncontrolled or Open-loop processes

Observe process behavior as a result of specific input signals

In process control, we are concerned with the dynamic behavior of a controlled or Closed-loopprocess

Controller is dynamic system that interacts with the process and the process hardware to yield a specific behaviour

GpY(s)U(s)

Gc

Gm

GpGv+

-+ +

controller actuator process

sensor

R(s) Y(s)

D(s)

82

ClosedClosed--Loop Transfer FunctionLoop Transfer Function

Block Diagram of Closed-Loop Process

Gp(s) - Process Transfer Function

Gc(s) - Controller Transfer Function

Gm(s) - Sensor Transfer Function

Gv(s) - Actuator Transfer Function

Gc

Gm

GpGv+

-+ +

controller actuator process

sensor

R(s) Y(s)

D(s)

ClosedClosed--Loop Transfer FunctionLoop Transfer Function

For control, we need to identify closed-loop dynamics due to:- Setpoint changes Servo- Disturbances Regulatory

1. Closed-Loop Servo Responsetransfer function relating Y(s) and R(s) when D(s)=0

Isolate Y(s)

[ ][ ]

Y s G s V s

Y s G s G s U s

Y s G s G s G s E s

Y s G s G s G R s Y s

Y S G s G s G s R s G s Y s

p

p v

p v c

p v c s m

p v c m

( ) ( ) ( )

( ) ( ) ( ) ( )

( ) ( ) ( ) ( ) ( )

( ) ( ) ( ) ( ) ( )

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

=

=

=

= −

= −

Y sG s G s G s

G s G s G s G sR sp v c

p v c m( )

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

( )=+1

83

ClosedClosed--Loop Transfer FunctionLoop Transfer Function

2. Closed-loop Regulatory Response

Transfer Function relating D(s) to Y(s) at R(s)=0

Isolating Y(s)

[ ][ ]

Y s D s G s V s

Y s D s G s G s U s

Y s D s G s G s G s E s

Y s D s G s G s G s Y s

Y s D s G s G s G s G s Y s

p

p v

p v c

p v c m

p v c m

( ) ( ) ( ) ( )

( ) ( ) ( ) ( ) ( )

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

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

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

= +

= +

= +

= + −

= + −

0

0

Y sG s G s G s G s

D sp v c m

( )( ) ( ) ( ) ( )

( )=+

11

ClosedClosed--loop Transfer Functionloop Transfer Function

2. Regulatory Response with Disturbance Dynamics

Gd(s) Disturbance (or load) transfer function

3. Overall Closed-Loop Transfer Function

Y s G sG s G s G s G s

D sd

p v c m( ) ( )

( ) ( ) ( ) ( )( )=

+1

Y sG s G s G s

G s G s G s G sR s

G sG s G s G s G s

D s

p v c

p v c m

dp v c m

( )( ) ( ) ( )

( ) ( ) ( ) ( )( )

( )( ) ( ) ( ) ( )

( )

=+

+

+

1

1

Regulatory

Servo

84

PID ControllersPID Controllers

The acronym PID stands for:P - ProportionalI - IntegralD - Derivative

PID Controllers: greater than 90% of all control implementationsdates back to the 1930svery well studied and understoodoptimal structure for first and second order processes (given some assumptions)always first choice when designing a control system

PID controller equation:

u t K e t e d dedt

ucI

Dt

R( ) ( ) ( )= + +⎡

⎣⎢

⎦⎥ +∫

10τ

ζ ζ τ

PID ControlPID Control

PID Control Equation

PID Controller ParametersKc Proportional gainτI Integral Time ConstantτD Derivative Time ConstantuR Controller Bias

u t K e t e d dedt

ucI

Dt

R( ) ( ) ( )= + +⎡

⎣⎢

⎦⎥ +∫

10τ

ζ ζ τ

Proportional Action

IntegralAction

DerivativeAction

ControllerBias

85

PID ControlPID Control

PID Controller Transfer Function

or:

Note:

numerator of PID transfer function cancels second order dynamicsdenominator provides integration to remove possibility of steady-state errors

[ ]ℑ − = ′ = + +⎛⎝⎜

⎞⎠⎟u t u U s K

ss E sR c

ID( ) ( ) ( )1 1

ττ

′ = + +⎛⎝⎜

⎞⎠⎟

U s P Is

Ds E s( ) ( )

PID ControlPID Control

Controller Transfer Function:

or,

Note:

Many variations of this controller existEasily implemented in SIMULINKeach mode (or action) of controller is better studied individually

G s Ks

sc cI

D( ) = + +⎛⎝⎜

⎞⎠⎟1 1

ττ

G s P Is

Dsc ( ) = + +⎛⎝⎜

⎞⎠⎟

86

Proportional FeedbackProportional Feedback

Form:

Transfer function:

or,

Closed-loop form:

u t u K e tR c( ) ( )− =

U s K E sc' ( ) ( )=

G s Kc c( ) =

Y sG s G s K

G s G s K G sR s

G s G s K G sD s

p v c

p v c m

p v c m

( )( ) ( )

( ) ( ) ( )( )

( ) ( ) ( )( )

=+

+

+

1

11

Proportional FeedbackProportional Feedback

Example:Given first order process:

for P-only feedback closed-loop dynamics:

G sKs

G s G spp

v m( ) , ( ) , ( )=+

= =τ 1

1 1

Y s

KpKcKpKc

KpKcs

R s

KpKcs

KpKc

KpKcs

D s

( ) ( )

( )

=+

+

⎝⎜⎜

⎠⎟⎟ +

++

⎝⎜⎜

⎠⎟⎟ +

+

+

⎝⎜⎜

⎠⎟⎟ +

1

11

11

1

11

τ

τ

τ

Closed-LoopTime Constant

87

Proportional FeedbackProportional Feedback

Final response:

Note:for “zero offset response” we require

Possible to eliminate offset with P-only feedback (requires infinite controller gain)

Need different control action to eliminate offset (integral)

lim ( ) , lim ( )t

yservo tKpKc

KpKc tyreg t

KpKc→∞=

+ →∞=

+11

1

lim ( ) , lim ( )t

servot

regy t y t→∞ →∞

= =1 0

Tracking Error Disturbance rejection

Proportional Feedback

Servo dynamics of a first order process under proportional feedback

- increasing controller gain eliminates off-set

0 1 2 3 4 5 6 7 8 9 100

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

0.01

0.5

1.0

5.0

10.0

Kc

y(t)/

KM

t/τ

88

Proportional Feedback

High-order processe.g. second order underdamped process

increasing controller gain reduces offset, speeds response and increases oscillation

0 5 10 15 20 250

0.5

1

1.5

5.0

2.5

1.0

0.5

0.01

y(t)/

KM

Proportional FeedbackProportional Feedback

Important points:proportional feedback does not change the order of the system

started with a first order processclosed-loop process also first orderorder of characteristic polynomial is invariant under proportional feedback

speed of response of closed-loop process is directly affected by controller gain

increasing controller gain reduces the closed-loop time constant

in general, proportional feedbackreduces (does not eliminate) offsetspeeds up responsefor oscillatory processes, makes closed-loop process more oscillatory

89

Integral ControlIntegral Control

Integrator is included to eliminate offset

provides reset actionusually added to a proportional controller to produce a PI controller

PID controller with derivative action turned offPI is the most widely used controller in industryoptimal structure for first order processes

PI controller form

Transfer function model

u t K e t e d ucI

tR( ) ( ) ( )= +

⎣⎢

⎦⎥ +∫

10τ

ζ ζ

′ = +⎛⎝⎜

⎞⎠⎟U s K

sE sc

I( ) ( )1 1

τ

PI FeedbackPI Feedback

Closed-loop response

more complex expressiondegree of denominator is increased by one

Y sG s G s K s

s

G s G s K ss

G sR s

G s G s K ss

G sD s

p v cI

I

p v cI

Im

p v cI

Im

( )( ) ( )

( ) ( ) ( )( )

( ) ( ) ( )( )

=

+⎛⎝⎜

⎞⎠⎟

+ +⎛⎝⎜

⎞⎠⎟

+

+ +⎛⎝⎜

⎞⎠⎟

ττ

ττ

ττ

1

1 1

1

1 1

90

PI FeedbackPI Feedback

ExamplePI control of a first order process

Closed-loop response

Note:offset is removedclosed-loop is second order

G sKs

G s G spp

v m( ) , ( ) , ( )=+

= =τ 1

1 1

Y s s

K Ks

K KK K

sR s

K Ks

K Ks

K Ks

K KK K

sD s

I

Ic p

c p

c pI

Ic p

Ic p

Ic p

c p

c pI

( ) ( )

( )

=+

⎝⎜

⎠⎟ +

+⎛

⎝⎜

⎠⎟ +

+

⎝⎜

⎠⎟ +

⎝⎜

⎠⎟

⎝⎜

⎠⎟ +

+⎛

⎝⎜

⎠⎟ +

ττ τ τ

τ τ τ

τ τ τ

11

1

11

2

2

2

PI FeedbackPI Feedback

Example (contd)effect of integral time constant and controller gain

on closed-loop dynamics

natural period of oscillation

damping coefficient

integral time constant and controller gain can induce oscillation and change the period of oscillation

τ τ τcl

I

c pK K=

ξτ

ττ=

+⎛

⎝⎜

⎠⎟1

21K

KK K

K Kp

c Ic p

c p

91

PI Feedback

Effect of integral time constant on servo dynamics

0 1 2 3 4 5 6 7 8 9 100

0.2

0.4

0.6

0.8

1

1.2

1.4

1.6

1.8

y(t)/

KM

0.01

0.1

0.5

1.0

Kc=1

PI Feedback

Effect of controller gain

affects speed of responseincreasing gain eliminates offset quicker

0 1 2 3 4 5 6 7 8 9 100

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

y(t)/

KM 0.1

0.51.0

5.010.0

τI=1

92

PI Feedback

Effect of integral action of regulatory response

reducing integral time constant removes effect of disturbancesmakes behavior more oscillatory

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

-0.05

0

0.05

0.1

0.15

0.2

0.25

0.3

0.35

0.4

y(t)/

KM

PI FeedbackPI Feedback

Important points:

integral action increases order of the system in closed-loop

PI controller has two tuning parameters that can independently affect

speed of responsefinal response (offset)

integral action eliminates offset

integral actionshould be small compared to proportional actiontuned to slowly eliminate offsetcan increase or cause oscillationcan be de-stabilizing

93

Derivative ActionDerivative Action

Derivative of error signalUsed to compensate for trends in output

measure of speed of error signal changeprovides predictive or anticipatory action

P and I modes only response to past and current errorsDerivative mode has the form

if error is increasing, decrease control actionif error is decreasing, decrease control action

Always implemented in PID form

u t K e t e d dedt

ucI

Dt

R( ) ( ) ( )= + +⎡

⎣⎢

⎦⎥ +∫

10τ

ζ ζ τ

DK

dedtc

D≡ τ

PID FeedbackPID Feedback

Transfer Function

Closed-loop Transfer Function

Slightly more complicated than PI form

′ = + +⎛⎝⎜

⎞⎠⎟U s K

ss E sc

ID( ) ( )1 1

ττ

Y s

G s G s K s ss

G s G s K s ss

G s

R s

G s G s K s ss

G s

D s

p v cD I I

I

p v cD I I

Im

p v cD I I

Im

( )

( ) ( )

( ) ( ) ( )

( )

( ) ( ) ( )

( )

=

+ +⎛

⎝⎜⎜

⎠⎟⎟

+ + +⎛

⎝⎜⎜

⎠⎟⎟

+

+ + +⎛

⎝⎜⎜

⎠⎟⎟

τ τ ττ

τ τ ττ

τ τ ττ

2

2

2

1

1 1

1

1 1

94

PID FeedbackPID Feedback

Example:PID Control of a first order process

Closed-loop transfer function

G sKs

G s G spp

v m( ) , ( ) , ( )=+

= =τ 1

1 1

Y s s s

K Ks

K KK K

sR s

K Ks

K Ks

K Ks

K KK K

sD s

D I I

Ic p

D Ic p

c pI

Ic p

Ic p

Ic p

D Ic p

c pI

( ) ( )

( )

=+ +

+⎛

⎝⎜⎜

⎠⎟⎟ +

+⎛

⎝⎜⎜

⎠⎟⎟ +

+

⎝⎜⎜

⎠⎟⎟ +

⎝⎜⎜

⎠⎟⎟

+⎛

⎝⎜⎜

⎠⎟⎟ +

+⎛

⎝⎜⎜

⎠⎟⎟ +

τ τ τ

τ τ τ τ τ

τ τ τ

τ τ τ τ τ

2

2

2

2

11

1

11

PID Feedback

Effect of derivative action on servo dynamics

0 1 2 3 4 5 6 7 8 9 100

0.2

0.4

0.6

0.8

1

1.2

1.4

1.6

2.01.00.5

0.1

y(t)/

KM

95

PID Feedback

Effect of derivative action on regulatory response

increasing derivative action reduces impact of disturbances on control variableslows down servo response and affects oscillation of process

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

-0.05

0

0.05

0.1

0.15

0.2

0.25

2.01.00.50.1

Derivative ActionDerivative Action

Important Points:

Characteristic polynomial is similar to PIderivative action does not increase the order of the systemadding derivative action affects the period of oscillation of the process

good for disturbance rejectionpoor for tracking

the PID controller has three tuning parameters and can independently affect,

speed of responsefinal response (offset)servo and regulatory response

derivative actionshould be small compared to integral actionhas a stabilizing influencedifficult to use for noisy signalsusually modified in practical implementation

96

Closed-loop Stability

Every control problem involves a consideration of closed-loop stability

General concepts:

BIBO Stability:

“ An (unconstrained) linear system is said to be stable if the output response is boundedfor all bounded inputs. Otherwise it is unstable.”

Comments:Stability is much easier to prove than unstabilityThis is just one type of stability

Closed-loop Stability

Closed-loop dynamics

if GOL is a rational function then the closed-loop transfer functions are rational functions and take the form

and factor as

Y sG G GG G G G

Y sG G G G

D sc v p

c v p m c v p m( ) ( ) ( )*=

++

+11

1

GOL

G s r sq s

a a s a s

b b s b s( ) ( )

( )= =

+ + +

+ + +

0 1

0 1

Κ

Κ

ρρ

θθ

G s Ks s

s sa a

( )( ) ( )

( ) ( )=

+ +

+ +

τ τ

τ τρ

θ

1 1 1

1 11

Λ

Λ

97

Closed-loop stability

General Stability criterion:

“ A closed-loop feedback control system is stable if and only if all roots of the characteristic polynomial are negative or have negative real parts. Otherwise, the system is unstable.”

Unstable region is the right half plane of the complex plane.

Valid for any linear systems.

Underlying system is almost always nonlinearso stability holds only locally. Moving away from the point of linearization may cause instability.

Closed-loop Stability

Problem reduces to finding roots of a polynomial

Easy (1990s) way : MATLAB function ROOTS

Traditional:1. Routh array:

Test for positivity of roots of a polynomial

2. Direct substitutionComplex axis separates stable and unstable regionsFind controller gain that yields purely complex roots

3. Root locus diagram Vary location of poles as controller gain is variedOf limited use

98

Closed-loop stability

Routh array for a polynomial equation

is

where

Elements of left column must be positive to have roots with negative real parts

a s a s a s ann

nn+ + + + =−

−1

11 0 0Λ

a a aa a a

b b bc c

z

n n n

n n n

− −

− − −

2 4

1 3 5

1 2 3

1 2

1

ΛΛΛ

ΛΜ

1234

n +

b a a a aa

b a a a aa

c b a b ab

c b a b ab

n n n n

n

n n n n

n

n n n n

11 2 3

12

1 4 5

1

11 3 2 1

12

1 5 3 1

1

= − = −

= − = −

− − −

− − −

− − − −

, ,

, ,

Κ

Κ

Example: Routh Array

Characteristic polynomial

Polynomial Coefficients

Routh Array

Closed-loop system is unstable

2 36 149 058 121 0 42 0 78 05 4 3 2. . . . . .s s s s s+ − + + + =

a a aa a ab b bc cd de

5 3 1

4 2 0

1 2 3

1 2

1 2

1

2 36 0 58 0 42149 121 0 782 50 082 0

0 72 0 78189 00 78

( . ) ( . ) ( . )( . ) ( . ) ( . )

( . ) ( . ) ( )( . ) ( . )( . ) ( )( . )

− −

a a a a a a5 4 3 2 1 02 36 149 058 121 0 42 0 78= = = − = = =. , . , . , . , . , .

99

Direct Substitution

Technique to find gain value that de-stabilizes the system.

Observation: Process becomes unstable when poles appear on

right half plane

Find value of Kc that yields purely complex poles

Strategy:Start with characteristic polynomial

Write characteristic equation:

Substitute for complex pole (s=jω)

Solve for Kc and ω

q j K r jc( ) ( )ω ω+ = 0

( )1 1+ = +K G s G s G s K r s

q sc v p m c( ) ( ) ( ) ( )

q s K r sc( ) ( )+ = 0

Example: Direct Substitution

Characteristic equation

Substitution for s=jω

Real Part Complex Part

System is unstable if

1 105 05 0 75

0

05 05 0 75 0

05 05 0 75 0

3 2

3 2

3 2

+ +

+ − −=

+ − − + + =

+ + − + − =

K ss s s

s s s K s K

s s K s K

c

c c

c c

. . .. . .

. ( . ) ( . )

( ) . ( ) ( . ) ( . )

. ( . ) ( . )

j j K j K

j K j Kc c

c c

ω ω ω

ω ω ω

3 2

3 205 05 0 75 0

0 5 05 0 75 0

+ + − + − =

− − + − + − =

− + − =0 5 0 75 02. .ω Kc ( . )Kc − − =05 03ω ω

∴ = + ⇒ + − − =

⇒ − + =

⇒ = ± =

K

K

c

c

0 5 0 75 05 0 75 0 5 0

05 0 25 02 2 1

2 2 3

2. . ( . . . )

. ./ ,

ω ω ω ω

ω

ω

Kc > 1

100

Root Locus Diagram

Old method that consists in plotting poles of characteristic polynomial as controller gain is changed

e.g.

s s K s Kc c3 205 05 0 75 0+ + − + − =. ( . ) ( . )

-1.5 -1 -0.5 0 0.5 1 1.5-1.5

-1

-0.5

0

0.5

1

1.5Im

agin

ary

Axi

s

Real Axis

Kc-0

Kc-0 1

Stability and Performance

Given plant model, we assume a stable closed-loop system can be designed

Once stability is achieved - need to consider performance of closed-loop process - stability is not enough

All poles of closed-loop transfer function have negative real parts - can we place these poles to get a “good” performance

S: Stabilizing Controllers for a given plant

P: Controllers that meet performance

S

P

CSpace of all Controllers

101

Controller Tuning

Can be achieved byDirect synthesis : Specify servo transfer function required and calculate required controller - assume plant = model

Internal Model Control: Morari et al. (86) Similar to direct synthesis except that plant and plant model are concerned

Tuning relations:Cohen-Coon - 1/4 decay ratiodesigns based on ISE, IAE and ITAE

Frequency response techniquesBode criterionNyquist criterion

Field tuning and re-tuning

Direct Synthesis

From closed-loop transfer function

Isolate Gc

For a desired trajectory (C/R)d and plant model Gpm, controller is given by

not necessarily PID forminverse of process model to yield pole-zero cancellation (often inexact because of process approximation)used with care with unstable process or processes with RHP zeroes

CR

G GG Gc p

c p=

+1

GG

CRC

Rc

p=

⎝⎜⎜

⎠⎟⎟

11

( )( )G

G

CRC

Rc

pmd

d

=−

⎜⎜

⎟⎟

11

102

Direct Synthesis

1. Perfect Control

cannot be achieved, requires infinite gain

2. Closed-loop process with finite settling time

For 1st order Gp, it leads to PI controlFor 2nd order, get PID control

3. Processes with delay θ

requiresagain, 1st order leads to PI control2nd order leads to PID control

CR d

⎛⎝⎜

⎞⎠⎟

= 1

CR sd c

⎛⎝⎜

⎞⎠⎟

=+

11τ

CR

esd

s

c

c⎛⎝⎜

⎞⎠⎟ =

+

−θ

τ 1

θ θc ≥

IMC Controller Tuning

Gpm

Gp

R

-+

+-

++

D

CGc

*

Closed-loop transfer function

CG G

G G GR

G G

G G GDc p

c p pm

c p

c p pm=

+ −+

+ −

*

*

*

*( ) ( )1

1

1

In terms of implemented controller, Gc

G GG G

cc

c pm=

*

*1

103

IMC Controller Tuning

1. Process model factored into two parts

where contains dead-time and RHP zeros, steady-state gain scaled to 1.

2. Controller

where f is the IMC filter

based on pole-zero cancellationnot recommended for open-loop unstable processesvery similar to direct synthesis

G G Gpm pm pm= + −

Gpm+

GG

fcpm

* = −1

fsc

r=+

11( )τ

Example

PID Design using IMC and Direct synthesis for the process

Process parameters: K=0.3, τ=30, θ=9

1. IMC Design: Kc=6.97, τI=34.5, τd=3.93Filter

2. Direct Synthesis: Kc=4.76, τI=30Servo Transfer function

G s esps

( ) .=+

−9 0 330 1

fs

=+

112 1

CR

esd

s⎛⎝⎜

⎞⎠⎟

=+

−9

12 1

104

Example

Result: Servo ResponseIMC and direct synthesis give roughly same results

IMC not as good due to Pade approximation

0 50 100 150 200 250 3000

5

10

15

20

25

y(t)

t

IMC

DirectSynthesis

Example

Result: Regulatory response

Direct synthesis rejects disturbance more rapidly (marginally)

0 50 100 150 200 250 30015

20

25

30

35

40

y(t)

t

IMC

Direct Synthesis

105

Tuning Relations

Process reaction curve method:based on approximation of process using first order plus delay model

1. Step in U is introduced2. Observe behavior ym(t)3. Fit a first order plus dead time model

GpGc

Gs

1/s D(s)

Y(s)

Ym(s)

Y*(s)

U(s)

Manuel Control

Y s Kesm

s( ) =

+

−θ

τ 1

Tuning Relations

Process response

4. Obtain tuning from tuning correlationsZiegler-NicholsCohen-CoonISE, IAE or ITAE optimal tuning relations

0 1 2 3 4 5 6 7 8-0.2

0

0.2

0.4

0.6

0.8

1

1.2

τ

KM

θ

106

Ziegler-Nichols Tunings

Controller Kc Ti Td

P-only )/)(/1( θτpKPI )/)(/9.0( θτpK θ3.3PID )/)(/2.1( θτpK θ0.2 θ5.0

- Note presence of inverse of process gain in controllergain- Introduction of integral action requires reduction incontroller gain- Increase gain when derivation action is introduced

Example:

PI: Kc= 10 τI=29.97PID: Kc= 13.33 τI=18

τI=4.5

G s esps

( ) .=

+

−9 0 330 1

Example

Ziegler-Nichols Tunings: Servo response

0 50 100 150 200 250 30020

25

30

35

40

45

50Z-N PI

Z-N PID

Direct Synthesisy(t)

t

107

Example

Regulatory Response

Z-N tuningOscillatory with considerable overshootTends to be conservative

0 50 100 150 200 250 30010

15

20

25

30

35

40

Direct Synthesis

Z-N PID

Z-N PI

Cohen-Coon Tuning Relations

Designed to achieve 1/4 decay ratiofast decrease in amplitude of oscillation

Example:

PI: Kc=10.27 τI=18.54Kc=15.64 τI=19.75τd=3.10

Controller Kc Ti TdP-only ]3/1)[/)(/1( τθθτ +pKPI ]12/9.0)[/)(/1( τθθτ +pK

)/(209)]/(330[

τθτθθ

++

PID]

12163)[/)(/1(τ

τθθτ +pK

)/(813)]/(632[

τθτθθ

++

)/(2114

τθθ

+

108

Tuning relations

Cohen-coon: Servo

More aggressive/ Higher controller gainsUndesirable response for most cases

0 50 100 150 200 250 30020

25

30

35

40

45

50

55

C-C PID

C-C PI

Tuning Relations

Cohen-Coon: Regulatory

Highly oscillatoryVery aggressive

0 50 100 150 200 250 3005

10

15

20

25

30

35

40

C-C PI

C-C PID

y(t)

t

109

Integral Error Relations

1. Integral of absolute error (IAE)

2. Integral of squared error (ISE)

penalizes large errors

3. Integral of time-weighted absolute error (ITAE)

penalizes errors that persist

ITAE is most conservativeITAE is preferred

ISE e t dt= ∫∞

( )2

0

ITAE t e t dt= ∫∞

( )0

IAE e t dt= ∫∞

( )0

ITAE Relations

Choose Kc, τI and τd that minimize the ITAE:

For a first order plus dead time model, solve for:

Design for Load and Setpoint changes yield different ITAE optimum

∂∂

∂∂τ

∂∂τ

ITAEK

ITAE ITAEc I d

= = =0 0 0, ,

Type ofInput

Type ofController

Mode A B

Load PI P 0.859 -0.977I 0.674 -0.680

Load PID P 1.357 -0.947I 0.842 -0.738D 0.381 0.995

Set point PI P 0.586 -0.916I 1.03 -0.165

Set point PID P 0.965 -0.85I 0.796 -0.1465D 0.308 0.929

110

ITAE Relations

From table, we getLoad Settings:

Setpoint Settings:

Example

( ) ( )Y A KK A BB

c Id= = = = +θ

ττ

τθ

ττ

τ ,

( )Y A KKB

c Id= = = =θ

ττ

ττ

τ

G es

Gss

L=+

=−0 3

30 11

9. ,

ITAE Relations

Example (contd)Setpoint Settings

Load Settings:

( )KK

K K

c

c

= =

= = =

−1357 4 2437

4 2437 4 24370 3 1415

930

0 947. .

. .. .

.

( )

( )

ττ

τ τ

ττ

τ τ

I

I

d

d

= =

= = =

= =

= =

−0842 2 0474

2 047430

2 0474 14 65

0 381 930 01150

01150 34497

930

0 738

0 995

. .

. . .

. .

. .

.

.

( )KK

K K

c

c

= =

= = =

−0 965 2 6852

2 6852 2 68520 3 8 95

930

0 85. .

. .. .

.

( )

( )

ττ

τ τ

ττ

τ τ

I

I

d

d

= − =

= = =

= =

= =

0 796 01465 0 7520

0 752030

0 7520 39 89

0 308 930 01006

01006 30194

930

0 929

. . .

. . .

. .

. .

.

111

ITAE Relations

Servo Response

design for load changes yields large overshoots for set-point changes

0 50 100 150 200 250 30020

25

30

35

40

45

50

55

60

ITAE(Load)

ITAE(Setpoint)

ITAE Relations

Regulatory response

Tuning relations are based GL=Gp

Method does not apply to the processSet-point design has a good performance for this case

0 50 100 150 200 250 3000

5

10

15

20

25

30

35

40

ITAE(Setpoint)

ITAE(Load)

112

Tuning Relations

In all correlations, controller gain should be inversely proportional to process gain

Controller gain is reduced when derivative action is introduced

Controller gain is reduced as increases

Integral time constant and derivative constant should increase as increases

In general,

Ziegler-Nichols and Cohen-Coon tuning relations yield aggressive control with oscillatory response (requires detuning)

ITAE provides conservative performance (not aggressive)

θτ

θτ

ττ

dI

= 0 25.

CHE 446Process Dynamics and Control

Frequency Response ofFrequency Response ofLinear Control SystemsLinear Control Systems

113

First order ProcessFirst order Process

Response to a sinusoidal input signal

Recall: Sinusoidal input Asin(ωt) yields sinusoidal output caharacterized by AR and φ

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

-1

-0.5

0

0.5

1

1.5

2

AR

φ

y(t)/

A

t/τ

[ ]{ }lim ( ) sin( )t

PY s K A t→ ∞

−ℑ =+

+12 21 τ ω

ω φ

First order ProcessesFirst order Processes

10-2

10-1

100

101

102

10-2

10-1

100

AR

/Kp

τpω

Bode Plots

10-2

10-1

100

101

102

-100

-80

-60

-40

-20

0

φ

τpω

High Frequency

AsymptoteCorner Frequency

AR K=+1 2 2τ ω

φ ωτ= − −tan ( )1

Amplitude Ratio Phase Shift

114

Second Order ProcessSecond Order Process

Sinusoidal ResponseSinusoidal Response

wherewhere

Y sK

s sA

sp( ) =

+ + +τ ξτ

ω

ω2 2 2 22 1

( )[ ] ( )y t

K Atp( ) sin( )=

− +

+

1 22 2 2ωτ ξτω φ

φ ξωτ

ωτ= −

⎣⎢⎢

⎦⎥⎥

−tan( )

12

21

( )[ ] ( )ARn =

− +

1

1 22 2 2ωτ ξωτ

Second Order ProcessesSecond Order Processes

Bode Plot

10-1 100 10110-1

100

101

10-1 100 101

-150

-100

-50

0

ξ=1

ξ=0.1

ξ=1

ξ=0.1

Amplitude reachesa maximum at

resonance frequencyARφ

ω

115

Frequency Response

Q: Do we “have to” take the Laplace inverse to compute the AR and phase shift of a 1st or 2nd order process?

No

Q: Does this generalize to all transfer function models?

Yes

Study of transfer function model response to sinusoidal inputs is called “Frequency Domain Response” of linear processes.

Frequency Response

Some facts for complex number theory:

i) For a complex number:

It follows that where

such that

w a bj= +

a w b w= =Re( ), Im( )

Re

Im

w

θa

b

a w b w= =cos( ), sin( )θ θ

w w w= +Re( ) Im( )2 2 θ = = ⎛⎝⎜

⎞⎠⎟

−arg( ) tan Im( )Re( )

w ww

1

w we j= θ

116

Frequency Response

Some facts:ii) Let z=a-bj and w= a+bj then

iii) For a first order process

Let s=jω

such that

w z z w= = − and arg( ) arg( )

G sKs

p( ) =+τ 1

G jKj

jj

K Kjp p p( ) ( )

( )ω

τ ωτ ωτ ω τ ω

ωτ

τ ω=

+−−

=+

−+1

11 1 12 2 2 2

G jK

AR

G j

p( ) ( )

arg( ( )) tan ( )(

ωτ ω

ω ωτ

=+

=

= − =−1 2 2

1 Phase Lag)

Frequency Response

Main Result:

The response of any linear process G(s) to a sinusoidal input is a sinusoidal.

The amplitude ratio of the resulting signal is given by the Modulus of the transfer function model expressed in the frequency domain, G(iω).

The Phase Shift is given by the argument of the transfer function model in the frequency domain.

i.e.

AR G j G j G j

G jG j

= = +

= = ⎛⎝⎜

⎞⎠⎟

( ) Re( ( )) Im( ( ))

tan Im( ( ))Re( ( ))

ω ω ω

ϕ ωω

2 2

1Phase Angle

117

Frequency ResponseFrequency Response

For a general transfer function

Frequency Response summarized by

where is the modulus of G(jω) and ϕis the argument of G(jω)

Note: Substitute for s=jω in the transfer function.

G s r sq s

e s z s zs p s p

sm

n( ) ( )

( )( ) ( )

( ) ( )= = − −

− −

−θ1

1

ΛΛ

G j G j e j( ) ( )ω ω ϕ=

G j( )ω

Frequency Response

The facts:

For any linear process we can calculate the amplitude ratio and phase shift by:

i) Letting s=jω in the transfer functionG(s)

ii) G(jω) is a complex number. Its modulus is the amplitude ratio of the process and its argument is the phase shift.

iii) As ω, the frequency, is varied that G(jω) gives a trace (or a curve) in the complex plane.

iv) The effect of the frequency, ω, on the process is the frequency response of the process.

118

Frequency Response

Examples:

1. Pure Capacitive Process G(s)=1/s

2. Dead Time G(s)=e-θs

G j Kj

jj

K j( )ωω

ωω ω

=−−

⎛⎝⎜

⎞⎠⎟

= −

AR K K= =

−⎛⎝⎜

⎞⎠⎟

= −−ω

φ ω π, tan /10 2

G j e j( )ω ωθ= −

AR = = −1, φ ωθ

Frequency Response

Examples:

3. n process in series

Frequency response of G(s)

therefore

G s G s G sn( ) ( ) ( )= 1 Λ

G j G j G j

G j e G j en

jn

j n

( ) ( ) ( )

( ) ( )

ω ω ω

ω ωφ φ

=

=

1

1 1

Λ

Λ

AR G j G j

G j G j

ii

n

ii

ni

i

n

= = ∏

= = =∑ ∑

=

= =

( ) ( )

arg( ( )) arg( ( ))

ω ω

φ ω ω φ

1

1 1

119

Frequency Response

Examples.

4. n first order processes in series

5. First order plus delay

G s Ks

Ks

n

n( ) =

+ +1

1 1 1τ τΛ

( ) ( )

AR K Kn

n

n

=+ +

= − − −− −

1

12 2 2 2

11

1

1 1τ ω τ ω

φ ωτ ωτ

Λ

Λtan tan

G sK e

sp

s( ) =

+

−θ

τ 1

ARKp=+

= − −−( ), tan ( )

1

1 2 21

τ ωφ ωτ θω

Frequency Response

To study frequency response, we use two types of graphical representations

1. The Bode Plot:Plot of AR vs. ω on loglog scalePlot of φ vs. ω on semilog scale

2. The Nyquist Plot:Plot of the trace of G(jω) in the complex plane

Plots lead to effective stability criteria and frequency-based design methods

120

Bode Plot

AR K= = −ω

ϕ π2

10-2 10-1 100100

101

102

AR

10-2 10-1 100-91

-90.5

-90

-89.5

-89

Frequency (rad/sec)

Pha

se A

ngle

Pure Capacitive Process

Bode Plot

G s G s G s G s( ) ( ) ( ) ( )= 1 2 3

G ss

G ss

G ss1 2 3

110 1

15 1

11

( ) , ( ) , ( )=+

=+

=+

G j( )( )( )( )

tan ( ) tan ( ) tan ( )

ωω ω ω

ϕ ω ω ω

=+ + +

= − − −− − −

1

1 10 1 5 1 1

10 5

2 2 2 2 2 2

1 1 1

10-4 10-3 10-2 10-1 100 10110-4

10-2

100

10-4 10-3 10-2 10-1 100 101-300

-200

-100

0

G1

G2

G3

G

121

Bode Plot

Example: Effect of dead-time

G s e s( ) = −θ

G j( ) ,ω ϕ θ ω= = −1

G s e G s G s G sds( ) ( ) ( ) ( )= −2

1 2 3

10-4 10-3 10-2 10-1 100 10110-4

10-2

100

10-4 10-3 10-2 10-1 100 101

-300

-200

-100

0

G=Gd

GGd

Nyquist Plot

Plot of G(jω) in the complex plane as ω is varied

Relation to Bode plot

AR is distance of G(jω) for the originPhase angle, ϕ , is the angle from the Real positive axis

Example First order process (K=1, τ=1)

ϕ

G j( )ω

122

Nyquist Plot

DeadDead--timetime

Second OrderSecond Order

ω

ξ ≥ 1

ξ < 1

Nyquist Plot

Third Order

Effect of dead-time (second order process)

G ss s

Gd s e s( ) , ( )=+ +

= −12 3 1

2

G ss s s

( ) =+ + +

13 3 13 2

123

Che 446: Process Dynamics andControl

Frequency DomainController Design

PI Controller

AR KcI

I

= +

= −−

1 1

1

2 2

1

ω τ

ϕ ωτtan ( / )

10-3 10-2 10-1 100 101100

101

102

103

10-3 10-2 10-1 100 101-100

-80

-60

-40

-20

0

AR

ϕ

ω

124

PID Controller

AR Kc DI

DI

= −⎛⎝⎜

⎞⎠⎟ +

= −⎛⎝⎜

⎞⎠⎟−

ωτωτ

ϕ ωτωτ

1 1

1

2

1tan

10-3 10-2 10-1 100 101100

101

102

103

10-3 10-2 10-1 100 101-100

-50

0

50

100

AR

ϕ

ω

Bode Stability Criterion

Consider open-loop control system

1. Introduce sinusoidal input in setpoint (D(s)=0) and observe sinusoidal output

2. Fix gain such AR=1 and input frequency such that φ=-180

3. At same time, connect close the loop and set R(s)=0

Q: What happens if AR>1?

GpGc

Gs

D(s)

Y(s)

Ym(s)

R(s)

U(s)

Open-loop Response to R(s)

+-++

125

Bode Stability Criterion

“A closed-loop system is unstable if the frequency of the response of the open-loop GOL has an amplitude ratio greater than one at the critical frequency. Otherwise it is stable. “

Strategy:

1. Solve for ω in

2. Calculate AR

arg( ( ))G jOL ω π= −

AR G jOL= ( )ω

Bode Stability Criterion

To check for stability:

1. Compute open-loop transfer function2. Solve for ω in φ=-π3. Evaluate AR at ω4. If AR>1 then process is unstable

Find ultimate gain:

1. Compute open-loop transfer function without controller gain2. Solve for ω in φ=-π3. Evaluate AR at ω4. Let

KARcu =1

126

Bode Criterion

Consider the transfer function and controller

- Open-loop transfer function

- Amplitude ratio and phase shift

- At ω=1.4128, φ=-π, AR=6.746

G s es s

s( )

( )( . )

.=

+ +

−51 05 1

01G s

sc ( ) ..

= +⎛⎝⎜

⎞⎠⎟

0 4 1 101

G s es s sOL

s( )

( )( . ).

.

.=

+ ++⎛

⎝⎜⎞⎠⎟

−51 05 1

0 4 1 101

01

AR =+ +

+

= − − − − ⎛⎝⎜

⎞⎠⎟

− − −

5

1

1

1 0 250 4 1 1

0 01

01 05 101

2 2 2

1 1 1

ω ω ω

φ ω ω ωω

..

.

. tan ( ) tan ( . ) tan.

Ziegler-Nichols Tuning

Closed-loop tuning relation

With P-only, vary controller gain until system (initially stable) starts to oscillate.Frequency of oscillation is ωc,

Ultimate gain, Ku, is 1/M where M is the amplitude of the open-loop systemUltimate Period

Ziegler-Nichols Tunings

P Ku/2PI Ku/2.2 Pu/1.2PID Ku/1.7 Pu/2 Pu/8

Puc

=2πω

127

Nyquist Stability Criterion

“If N is the number of times that the Nyquist plot encircles the point (-1,0) in the complex plane in the clockwise direction, and P is the number of open-loop poles of GOL that lie in the right-half plane, then Z=N+P is the number of unstable roots of the closed-loop characteristic equation.”

Strategy

1. Substitute s=jω in GOL(s)2. Plot GOL(jω) in the complex plane3. Count encirclements of (-1,0) in the clockwise direction

Nyquist Criterion

Consider the transfer function

and the PI controller

G s es s

s( )

( )( . )

.=

+ +

−51 05 1

01

G ssc ( ) .

.= +⎛

⎝⎜⎞⎠⎟

0 4 1 101

128

Stability Considerations

Control is about stability

Considered exponential stability of controlled processes using:

Routh criterionDirect SubstitutionRoot LocusBode Criterion (Restriction on phse angle)Nyquist Criterion

Nyquist is most general but sometimes difficult to interpret

Roots, Bode and Nyquist all in MATLAB

MAPLE is recommended for some applications.

Polynomial (no dead-time)

CHE 446Process Dynamics and

Control

Advanced Control Techniques:Advanced Control Techniques:1. 1. Feedforward Feedforward ControlControl

129

Feedforward Control

Feedback control systems have the general form:

where UR(s) is an input bias term.

Feedback controllersoutput of process must change before any action is takendisturbances only compensated after they affect the process

GpGc

Gs

Y(s)

Ym(s)

R(s)

U(s)+

+ +GD

Gv+ +

D(s)

UR(s)

Feedforward Control

Assume that D(s)can be measured before it affects the processeffect of disturbance on process can be described with a model GD(s)

Feedforward Control is possible.

Feedback/Feedforward ControllerStructure

GpGc

Gs

Y(s)

Ym(s)

R(s)

U(s)+

+ +GD

Gv

Gf

+ +

D(s)

FeedforwardController

130

Feedforward Control

Heated Stirred Tank

Is this control configuration feedback or feedforward?How can we use the inlet stream thermocouple to regulate the inlet folow disturbancesWill this become a feedforward or feedback controller?

TTTC1

Ps

Condensate

Steam

F,Tin

F,T

TT

Feedforward Control

A suggestion:

How do we design TC2?

TT

TC1Ps

Condensate

Steam

F,Tin

F,T

TC2

++TT

131

Feedforward Control

The feedforward controller:

Transfer Function

Tracking of YR requires that

Gp Y(s)U(s) ++

GD

Gv

Gf

+ +

D(s)

UR(s)

Y s G s D s G s G s U sY s G s D s G s G s U s G s D s

Y s G s G s G s G s D s G s G s U s

Y s G s G s G s G s D s Y s

D P v

D P v R f

D p v f p v R

D p v f R

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

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

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

= += + +

= + +

= + +

G s G s G s G s

G s G sG s G s

D p v f

fD

p v

( ) ( ) ( ) ( )

( ) ( )( ) ( )

+ =

⇒ = −

0

Feedforward Control

Ideal feedforward controller:

Exact cancellation requires perfect plant and perfect disturbance models.

Feedforward controllers:very sensitive to modeling errorscannot handle unmeasured disturbancescannot implement setpoint changes

Need feedback control to make control system more robust

G s G sG s G sf

Dp v

( ) ( )( ) ( )

= −

G s G s G s G sD p v f( ) ( ) ( ) ( )+ ≠ 0

132

Feedforward Feedforward ControlControl

GpGc

Gs

Y(s)

Ym(s)

R(s)

U(s)+

+ +GD

Gv

Gf

+ +

D(s)

What is the impact of Gf on the closed-loopperformance of the feedback control system?

Feedback/Feedforward Control

Feedforward Control

Regulatory transfer function of feedforward/feedback loop

Perfect control requires that (as above)

Note:Feedforward controllers do not affect closed-loop stabilityFeedforward controllers based on plant models can be unrealizable (dead-time or RHP zeroes)Can be approximated by a lead-lag unit or pure gain (rare)

C sD s

G s G s G s G sG s G s G s G s

D f v p

c v p m

( )( )

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

=+

+1

G s G sG s G sf

D

v p( ) ( )

( ) ( )= −

G s K ssf f( ) ( )

( )=

++

ττ

1

2

11

G s KK Kf

D

v p( ) = −

133

Feedforward Control

Tuning: In absence of disturbance model lead-lag approximation may be good

Kf obtained from open-loop data

− τ1 and τ2

from open-loop data

from heuristics

Trial-and-error

G s K ssf f( ) ( )

( )=

++

ττ

1

2

11

K KK Kf

D

v p= −

τ τ τ τ1 2= =p D,

ττ

ττ

1

2

1

205 2 0= =. .

τ τ1 2− = c

Feedforward Control

Example:

Plant:

Plant Model:

Feedback Design from plant model: IMC PID tunings

G ss s s

G ss s

p

D

( )( )( )( )

( )( . )( )

=+ + +

=+ +

1010 1 5 1 1

12 5 1 1

G s es

G s espm

sDm

s( ) ( )

.=

+=

+

− −1010 1 2 5 1

6

Kc I D= = =0 26 13 2 31. , , .τ τ

134

Feedforward Control

Possible Feedforward controllers:

1. From plant models:

Not realizable

2. Lead-lag unit

3. Feedforward gain controller:

G s e ssf

s( ) ( )

( . )= − +

+

5

1010 12 5 1

τ τ1 210 2 51

10

= =

= −

, .

K f

K f = − 110

Feedforward Control

For Controller 2 and 3

Some attenuation observed at first peakDifficult problem because disturbance dynamic are much faster

0 20 40 60 80 100 120 140 160 180 200-0.6

-0.4

-0.2

0

0.2

0.4

0.6

0.8

1

1.2Disturbance Controller with Feedforward

.. - Gain Controller

-- - Lead-Lag Controller

- - No FF Controller

135

Feedforward Feedforward ControlControl

Useful in manufacturing environments if good models are available

outdoor temperature dependencies can be handle by gain feedforward controllersscheduling issues/ supply requirements can be handled

Benefits are directly related to model accuracy

rely mainly on feedback control

Disturbances with different dynamics always difficult to attenuate with PID

may need advanced feedback control approach (MPC, DMC, QDMC, H -controllers, etc…)

Use process knowledge (and intuition)

CHE 446:Process Dynamics and

Control

Advanced Control Techniques2. Cascade Control

136

Cascade Control

Jacketed Reactor:

Conventional Feedback Loop:operate valve to control steam flowsteam flow disturbances must propagate through entire process to affect outputdoes not take into account flow measurement

TTTC1

Ps

Condensate

Steam

F,Tin

F,T

TT

FT

Cascade Control

Consider cascade control structure:

Note:TC1 calculates setpoint cascaded to the flow controllerFlow controller attenuates the effect of steam flow disturbances

TTTC1

Ps

Condensate

Steam

F,Tin

F,T

TT

FTFC

137

Cascade Control

Cascade systems contain two feedback loops:

Primary Loopregulates part of the process having slowerdynamicscalculates setpoint for the secondary loope.g. outlet temperature controller for the jacketed reactor

Secondary Loopregulates part of process having fasterdynamicsmaintain secondary variable at the desired target given by primary controllere.g. steam flow control for the jacketed reactor example

Cascade Control

Blo

ck D

iagr

am G

c2G

p1G

p2G

v2

Gm

2

Gm

1

Gc1

D1

D2

--

++

++

138

Cascade Control

Closed-loop transfer function

1. Inner loop

2. Outer loop

Characteristic equation

CR

G G GG G G G

Gp v c

p v c mcl

2

2

2 2 2

2 2 2 221

=+

=

CR

G G GG G G G

p cl c

p cl c m11

1 2 1

1 2 1 11=

+

1 0

11

0

1 0

1 2 1 1

12 2 2

2 2 2 21 1

2 2 2 2 1 2 2 2 1 1

+ =

++

=

+ + =

G G G G

GG G G

G G G GG G

G G G G G G G G G G

p cl c m

pp v c

p v c mc m

p v c m p p v c c m

Cascade Control

1 02 2 2 2 1 2 2 2 1 1+ + =G G G G G G G G G Gp v c m p p v c c mStability of closed-loop process is governed by

Example

GKs

G K G G

GKs

G K G

pp

c c v m

pp

c c m

11

11 1 1 1

22

22 2 2

11

11

=+

= = =

=+

= =

τ

τ

, ,

, ,

11 1 1

022

21

2

2

1

1+

++

+ +=K

Ks

KKs

Ksc

pc

p pτ τ τ

( )( ) ( )τ τ τ1 2 2 2 1 1 2 11 1 1 0s s K K s K K Kc p c p p+ + + + + =

τ τ τ τ τ1 22

1 2 2 2 1 2 2

1 2 1

1

0

s K K s K K

K K Kc p c p

c p p

+ + + + + +

=

( )

139

Cascade Control

Design a cascade controller for the followingsystem:

1. Primary:

2. Secondary:

G s es s

G

G Kcs

ps

m

cI

101

1

1 1

05 1 11

1 1

( )( . )( )

, ,.

=+ +

=

= +⎛⎝⎜

⎞⎠⎟

τ

Gs

G G

G K

p v m

c c

2 2 2

2 2

101 1

1=+

= =

=.

,

Cascade Control

1.1. PI controller only

Critical frequency

Maximum gain

G Ks s

es sOL c

s1 1

011 1 1

01 1 05 1 1= +⎛

⎝⎜⎞⎠⎟ + + +

. ( . )( )

.

AR Kc= ++ + +

1 2 2 2 21 1 1

0 01 1

1

0 25 1

1

1ω ω ω ω. .

ϕω

ω

ω ω ω

= − ⎛⎝⎜

⎞⎠⎟

− − −

− −

− −

tan tan ( . )

tan ( . ) tan ( ) .

1 1

1 1

1 01

05 01

ωc AR= =2 99 0178. , .

Kc1 561= .

140

AR

ϕ

Bode Plots

Cascade Control

ϕ

ln(ω)

Cascade Control

2. Cascade Control

Secondary loop

no critical frequency gain can be largeLet Kc2=10.

Primary loop

G KsOl c2 21

01 1=

+.

G Ks

s

s

es s

K e

s s s

OL cs

cs

1 101

101

1 110

01 11 10 1

01 105 1 1

1011 05 1 01

111

= +⎛⎝⎜

⎞⎠⎟

+

++

+ +

=+ +

.

.( . )( )

( . )( . )

.

.

141

Cascade Control

Closed-loop stability:

Bode

Maximum gain Kc1=10.44Secondary loop stabilizes the primary loop.

ωc AR= =413 0 0958. , .

ARKc1 2

22

1 1

1011

1 1

1 0111

1

1 0 25

201 01

1105

=

+ ⎛⎝⎜

⎞⎠⎟

+

= − − − ⎛⎝⎜

⎞⎠⎟

−− −

ωω

ω

φ π ω ω ω

. .

. tan . tan ( . )

Cascade Control

Use cascade when:conventional feedback loop is too slow at rejecting disturbancessecondary measured variable is available which

responds to disturbanceshas dynamics that are much faster than those of the primary variablecan be affected by the manipulated variable

Implementation

tune secondary loop firstoperation of two interacting controllers requires more careful implementation

switching on and off

142

CHE 446Process Dynamics and Control

Advanced Control Techniques3. Dead-time Compensation

Dead-time Compensation

Consider feedback loop:

Dead-time has a de-stabilizing effect on closed-loop systemPresence of dead-time requires detuning of controllerNeed a way to compensate for dead-time explicitly

Gc Gp e-θsR C

D

143

Dead-time Compensation

Motivation

G s es s

G ss

s

c

( ) , . .

( )

=+ +

≤ ≤

= +⎛⎝⎜

⎞⎠⎟

−θθ2 3 2

01 0 75

4 1 1

0.10.75 0.5 0.25

Dead-time Compensation

Use plant model to predict deviation from setpoint

Result:Removes the de-stabilizing effect of dead-time

Problem:Cannot compensate for disturbances with just feedback (possible offset)Need a very good plant model

Gc Gp e-θsR C

D

Gpm

144

Dead-time Compensation

Closed-loop transfer function

Characteristic Equation becomes

Effect of dead-time on closed-loop stability is removedController is tuned to stabilize undelayed process modelNo disturbance rejection

C sD s

C sR s

G G eG G

c ps

c pm

( )( )

, ( )( )

= =+

−1

1

θ

1 0+ =G Gc pm

Dead-time Compensation

0 1 2 3 4 5 6 7 8 9 100

0.5

1

1.5Servo Response

0 1 2 3 4 5 6 7 8 9 100

0.2

0.4

0.6

0.8

1Regulatory Response

e-0.5sR C

4 1 1+⎛

⎝⎜⎞⎠⎟s

13 22s s+ +

13 22s s+ +

D

145

Dead-time Compensation

Include effect of disturbances using model predictions

Adding this to previous loop gives

∃( ) ( ) ∃( )

∃( ) ( ) ( )∃

D s Y s Y s

D s G e U s G e U sps

pms

= −

= −− −θ θ

Gc Gp e-θsR C

D

Gpm Gpm e-θs

+

+

+-

++

+ -

Dead-time Compensation

Closed-loop transfer function

Characteristic Equation

Effect of dead-time on stability is removed Disturbance rejection is achievedController tuned for undelayed dynamics

C sD s

e e G G

G G G G e G e

C sR s

G G e

G G G G e G e

s sc pm

c pm c ps

pms

c ps

c pm c ps

pms

( )( )

( )

( )

( )( ) ( )

=+ −

+ + −

=+ + −

− −

− −

− −

1

1

1

θ θ

θ θ

θ

θ θ

1 0+ + − =− −G G G G e G ec pm c ps

pms( )

∃θ θ

Fast Dynamics

SlowDynamics

146

Dead-time Compensation

e-0.5sR C

4 1 1+⎛

⎝⎜⎞⎠⎟s

13 22s s+ +

13 22s s+ +

D

e-0.5s13 22s s+ +

+

+

+-

∃( )D s

+

+

+ -

0 1 2 3 4 5 6 7 8 9 100

0.5

1

1.5Servo Response

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

0

0.5

1Regulatory Response

Dead-time Compensation

Alternative form

Reduces to classical feedback control system with

called a Smith-Predictor

Gc Gp e-θsR C

D

Gpm(1-e-θs)

+

+

+

+

+ -

G s G sG e

cc

pmsm

*( ) ( )( )

=+ − −1 1 θ

147

Dead-time compensation

Smith-Predictor Design

1. Determine delayed process model

2. Tune controller Gc for the undelayed transfer function model Gpm

3. Implement Smith-Predictor as

4. Perform simulation studies to tune controller and estimate closed-loop performance over a range of modeling errors (Gpm and θm)

∃( ) ( )Y s G s epmsm= −θ

G s G sG e

cc

pmsm

*( ) ( )( )

=+ − −1 1 θ

Dead-time Compensation

Effect of dead-time estimation errors:

e-0.5sR C

4 1 1+⎛⎝⎜

⎞⎠⎟s

13 22s s+ +

13 22s s+ +

D

e-τs13 22s s+ +

+

+

+-

∃( )D s

+

+

+ -

τ