0% found this document useful (0 votes)
58 views13 pages

As Tromp Id

This document discusses PID (proportional-integral-derivative) control, which is the most common type of controller used in 90% of control problems. It introduces PID control and discusses some key aspects of implementing PID controllers, such as dealing with derivative filters, set point weighting, integrator windup, and computer implementation issues. The document also compares PID control to more advanced control techniques and discusses how incorporating insights from control theory can improve PID control design and performance.

Uploaded by

cosmedamiao
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
58 views13 pages

As Tromp Id

This document discusses PID (proportional-integral-derivative) control, which is the most common type of controller used in 90% of control problems. It introduces PID control and discusses some key aspects of implementing PID controllers, such as dealing with derivative filters, set point weighting, integrator windup, and computer implementation issues. The document also compares PID control to more advanced control techniques and discusses how incorporating insights from control theory can improve PID control design and performance.

Uploaded by

cosmedamiao
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

Lecture 9 - PID Control Introduction

K. J. Åström • Why PID?


– The most common controller
1. Introduction – Widely used in all applications of control (90% of all
2. Derivative Filter control problems)
3. Set Point Weighting • An essential element of more sophisticated controllers
4. Integrator Windup • Are there any research issues?
5. Computer Implementation • Nonlinear features
6. Tuning – Saturation and windup
7. Summary – Dead zones

Theme: The most common controller. A glimpse of implemen- – What can be done by PID?
tation. – What cannot be done by PID?

Introduction PID versus Advanced Control


• Feedback is a very powerful concept with many useful
properties
– Reduction of effects of disturbances
– Create robust linear relations
– Follow command with High Fidelity
– Robust to process variations
– But risk for instability
• Advances in control theory have given a good insight into
the design problem
• PID a simple powerful form of feedback
• Apply advances in control to PID control • Advanced control - other prediction methods
• Connect with the classic tradition of Ziegler and Nichols • What are the benefits?

c K. J. Åström, October 2002


& 1
The Amazing Property of Integral Action A PID Algorithm
Consider a PI controller In spite of the widespread use of PID it is only given moderate
Z t attention in education. Much information among the manufac-
u = ke + ki e(τ )dτ turers. PID control is much more than
0 Z t
de(t)
Assume that there is an equilibrium with constant e(t) = e0 u(t) = ke(t) + ki e(τ )dτ + kd
and constant u(t) = u0 . The error e0 then must be zero. Proof: 0 dt
Assume e0 = 0, then We have to consider
Z t Z t
• Derivative filter
u = ke0 + ki e(τ )dτ = ke0 + ki e0 dτ = ke0 + ki e0 t • Computer implementation
0 0 • Set point (reference)
• Mode switches
The right hand side is different from zero. Hence a contradiction weigthing
unless e0 = 0. • Bumpless parameter changes
• Integrator Windup
A controller with integral action will always give the correct Dealing with these issues is a good introduction to practical
steady state provided that a steady state exists. implementation of any control algorithm.

PID Control Differentiating Noisy Signals


Brusfri signal Brusfri derivata
Consider the signal 2 2
1. Introduction
y(t) = sin t + an sin ω t −2 −2
2. Derivative Filter 0 5 10 15 0 5 10 15

3. Set Point Weighting It has the derivative Brusig signal sb Derivatan av sb


2 2
d y ( t)
4. Integrator Windup = cos t + anω cos ω t −2 −2
dt
0 5 10 15 0 5 10 15
5. Computer Implementation
6. Tuning
7. Summary The curves are generated with ω = 100, a n = 0.01.
One percent error in the original signal gives 100% error in
derivative!

c K. J. Åström, October 2002


& 2
Approximate Differentiation - High Frequency Simulation of Approximate Derivative
Roll-off
Replace sT by
Bode Diagrams
Brusfri signal Brusfri derivata
2 2
40

sT 20
−2 −2
Gd (s) = y(t) = sin t + an sin ω t
1 + sT / N 0 5 10 15 0 5 10 15
0

Phase (deg); Magnitude (dB)


−20 Brusig signal sb Derivatan av sb
2 2
What does it mean? −40 Approximate deriva-
• ForPSfrag
100

small sreplacements
we have 80
tive −2 −2

Gd (s)  sT . 60
s 0 5 10 15 0 5 10 15

Gain G d ( s) = 2
Brusig signal sb
2
Fuskderivatan av sb

1 + s/5
40

• For large s we havePhase


20

Gd (s)  NFrequency −2 −2
0

. ω
−1 0 1 2
10 10 10 10

Frequency (rad/sec) 0 5 10 15 0 5 10 15

The system Gd (s) has the output T d y/dt for low fre-
quency signals. The gain of Gd is not greater than N .
A nice illustration of use of Bode Plots!

Different Parameterizations PID Control


Parallel form:
  1. Introduction
1 k
G ( s) = k 1 + + sTd = (1 + sTi + s2 Ti Td ) 2. Derivative Filter
sTi sTi
3. Set Point Weighting
Series form:
  4. Integrator Windup
1 k̃ 
G̃ (s) = k̃ 1 + (1 + sT̃d) = 1 + s(T̃i + T̃d ) + s2 T̃i T̃d 5. Computer Implementation
sT̃i sT̃i
6. Tuning
Relations between coefficients
7. Summary
T̃i + T̃d T̃i T̃d
k = k̃ , Ti = T̃i + T̃d, Td =
T̃i T̃i + T̃d
Parallel form is more general. Equivalence possible only if
Ti ≥ 4Td . Essential for tuning to know which form is used.

c K. J. Åström, October 2002


& 3
Sfrag replacements
Set Point (Reference) Response Set Point (Reference) Weighting
Set point weighting allows a moderate adjustment. A 2DOF A simple way to obtain some DOF benefits
structure makes set-point response independent of disturbance 1
b=1
response. 0.5
b = 0.5
0 b=0
d n 0 10 20 30 40

r e u x y b=1
F Σ CI Σ P Σ
2
b = 0.5
0 b=0
v 0 10 20 30 40

CR
−0.5 l n
−1
−1 0 10 20 30 40

 1 sTd  Notice different signal paths y → u and r → u. Not a complete


U (s) = k bR(s) − Y (s) + ( R(s) − Y (s)) − Y (s) 2DOF but often a good way to separate disturbance rejection from
Ti 1PSfrag
+ sTd/ N replacements
response to reference signals.

PID Control Effects of Saturation


r u
Controller Process y
1. Introduction
2. Derivative Filter
3. Set Point Weighting
4. Integrator Windup
• Practically all systems have saturations in actuators
5. Computer Implementation
• The feedback loop is broken when saturation occurs
6. Tuning
• Unstable modes in process and controller will grow
7. Summary
• An integrator is an unstable and it will wind up
• Windup protection is required in all controllers with integral
action
• Instabilities are essential difficulites!

c K. J. Åström, October 2002


& 4
Integrator Windup One Way to Avoid Windup
2 y
1 –y
r KT d s
0 Actuator
0 20 40 60 80 model Actuator
e = r− y
0.1
u
K Σ
−0.1
K 1 – +
0 20 40 60 80
Ti
Σ Σ
s

2
I
1 es
−2
Tt
0 20 40 60 80

Control with Anti-Windup Effect of Time Constant Tt


r Influence of the reset time constantTt.
1

0.5 y r Tt = 3
Tt = 2
1
0
Tt = 0.1, Tt = 1
0 10 20 30

0.15 0
u 0 10 20 30
0.05

0.1 Tt = 3
−0.05 Tt = 2
0 10 20 30 Tt = 0.1
0 Tt = 1
0
−0.1
I 0 10 20 30
−0.4

−0.8 Rules of thumb Tt = 0.5Ti for PI control or Tt = Ti Td for PID.
0 10 20 30 Simulation made with PI control with Ti = 1.

c K. J. Åström, October 2002


& 5
PID Control Computer Implementation
Practically all control systems are today implemented using
1. Introduction computers. We will briefly discuss some aspects of this.
2. Derivative Filter
AD and DA converters are needed to connect sensors and ac-
3. Set Point Weighting tuators to the computer. A clock is also needed to synchronize
4. Integrator Windup the operations. We will discuss
5. Computer Implementation • Sampling and aliasing
6. Tuning • A basic algorithm
7. Summary • Converting differential equations to difference equations
• Wordlength issues
• Bumpless parameter changes

Sampling, Aliasing and Antialiasing Filters A Basic Algorithm


1 The following operations are executed by the computer.
1. Wait for clock interrupt
0 2. Convert setpoint r and process output y to numbers
3. Compute control signal u
−1
0 1 2 3 4 5
4. Convert control signal to analog value
5. Update variables in control algorithm
• Samples of signals of different frequencies may be identical
6. Go to step 1
• Nyquist frequency = (Sampling frequency)/2
• To represent a continuous signal uniquely from its samples the Desirable to make time between 1 and 4 as short as possible.
continuous signal cannot have frequencies above the Nyqyist Defer as much as possible of the computations to step 5.
frequency which which is half the Nyquist frequency
• Antialiasing filters that reduce the frequency content above the
Nyquist frequency is essential.
c K. J. Åström, October 2002
& 6
A Practical PID Controller The PID Algorithm
The basic equation The PID controller is described by:
Z t
  d y f ( t) U (s) = P(s) + I (s) + D (s)
u(t) = k br(t) − y(t) + ki r(τ ) − y(τ ) dτ + kd(− ),  
0 dt P(s) = k bR(s) − Y (s)
Td dy f 1
Derivative filter N dt
+ yf = y I (s) = k ( R(s) − Y (s))
sTi
ki sTd
Feedback Gc (s) = k + s
+ kd 1+ssTf D (s) = − k Y ( s)
1 + sTd/ N
ki
Feedforward G f f (s) = bk + s Computers can only add and multiply, it cannot integrate or
Set point weighting b take derivatives. To obtain a programmable algorithm we must
approximate. There are many ways to do this.
Sometimes also high frequency roll-off
  Introduce the times tk when the clock ticks, assume that
k 1 
U (s) = bR(s) − Y (s) + R(s) − Y (s) − sTd Y (s) tk − tk−1 = h, ,where h is the sampling period.
(1 + sT f )2 sTi

The Proportional Part Integral Part


Z
p(tk) = k ∗ (br(tk) − y(tk)) k t
i( t ) = e(τ )dτ
No approximation required! Ti
Differentiate
di k
= e(t)
dt Ti
Approximate the derivative by a forward difference
i(tk+1) − i(tk ) ke(tk)
=
h Ti
This equation can be written as
kh
i(tk+1) = i(tk ) + e(tk )
Ti

c K. J. Åström, October 2002


& 7
Derivative Part Derivative Part Continued
sTd Td d(tk) − d(tk−1) y(tk) − y(tk−1)
D ( s) = − k Y (s) d( t k ) + = − kTd
1 + sTd/ N N h h
Hence Hence
(1 + sTd/ N ) D (s) = − ksTd Y (s)  Td  Td kTd 
In time domain 1+ d( t k ) = d(tk−1) − y(tk) − y(tk−1)
Nh Nh h
Td dd dy
d( t ) +
= − kTd or
N dt dt
Approximate derivative by backward difference Td kTd N 
d( t k ) = d(tk−1) − y(tk) − y(tk−1)
Td d(tk) − d(tk−1) y(tk) − y(tk−1) Td + Nh Td + Nh
d( t k ) + = − kTd
N h h Notice that the algorithm works well even if Td is small, this is
not the case if forward approximations are used.

The Discrete PID Algorithm Add Protection Against Windup


Summarizing we find
p(tk) = k ∗ (br(tk ) − y(tk))
p(tk) = k ∗ (br(tk ) − y(tk)) Td  
d(tk) = d(tk−1) − kN y(tk) − y(tk−1)
e( t k ) = r( t k ) − y ( t k ) Td + Nh
Td   v = p(tk) + i(tk) + d(tk)
d(tk) = d(tk−1) − kN y(tk) − y(tk−1)
Td + Nh u(tk) = sat(v)
u(tk) = p(tk) + i(tk) + d(tk) e( t k ) = r( t k ) − y ( t k )
kh kh kh 
i(tk+1) = i(tk) + e( t k ) i(tk+1) = i(tk) + e( t k ) + u−v
Ti Ti Tr

• Useful to precompute parameters


• Make sure updating is done safely
• Organize the code right

c K. J. Åström, October 2002


& 8
Wordlength Issues Bumpless Parameter Changes
Consider updating of the integral part A PID controller is often switched between three modes: off,
manual and automatic control. It is important that there are no
kh
i(tk+1 ) = i(tk ) + e(tk) switching transients.
Ti
It is also important that parameter changes do not generate
Example
transients. This can be avoided by proper coding.
• h=0.05 s
Example:
• Ti =5000 s
This implementation gives This implementation does
• k=1 bumps not give bumps
kh Z Z t
• = 10−5 k t k
Ti i= e(s)ds i= e(s)ds
Ti Ti
If the error has 3 digits the integral need to be updated with 8
digits (28 bits) to avoid rounding off the errors! PSfrag replacementsThe basic issue is that multiplication with a time function does
not commute with differentiation or integration.

PID Control Requirements


d n
1. Introduction
r e u x y
2. Derivative Filter F Σ C Σ P Σ
3. Set Point Weighting
4. Integrator Windup
−1
5. Computer Implementation
6. Tuning
• Reduce the effect of load disturbances
7. Summary
• Do not inject too much measurement noise
• Low sensitivity to process variations
• Good response to set point changes

c K. J. Åström, October 2002


& 9
Introduction Ziegler-Nichols’ Step Response Method
A wide range of methods have been developed to design and • Switch controller to manual.
tune PID controllers • Make a step in the control variable.
• Special methods for PID controllers • Log process output. Normalize the curve so that it corre-
• Application of general techniques for control system design sponds to a unit step.
like pole placement that you have learned in the class. • Determine intercepts of tangent with steepest slope
The methods differ with respect to i.e. parameters a and L. The controller parameters are
obtained from a table.
• Models
3

• Model acquisition
2

• Criteria
1
• Design techniques
0

We will present a selection


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

Ziegler-Nichols’ Step Response Method Ziegler-Nichols’ Frequency Response Method


Data: apparent time delay L and intercept a. Controller param- • Switch the controller to
eters are given by pure proportional. 0.5

• Adjust the gain so that the


Controller k Ti Td Tp closed loop system is at
P 1/ a 4L the stability boundary. 0

PI 0.9/a 3L 5.7L • Determine the gain ku


PID 1.2/a 2L L/2 3.4L (the ultimate gain) and
the period Tu (the ultimate −0.5

Parameter Tp is an estimate of the response time of the closed period) of the oscillation.
loop system. • Suitable controller param-
−1
eters are obtained from a −0.5 0 0.5 1

table.

c K. J. Åström, October 2002


& 10
Ziegler-Nichols’ Frequency Response Method Properties of Ziegler Nichols Rules
Data: ultimate gain ku and ultimate period Tu . Controller Properties
parameters given by.
+ Easy to explain and use
+ Very common
Reg. k Ti Td Tp
- The closed loop system obtained too oscillatory ζ  0.2.
P 0.5ku Tu
Part of the criterion (quarter amplitude damping)
PI 0.4ku 0.8Tu 1.4Tu
- Too large overshoot
PID 0.6ku 0.5Tu 0.125Tu 0.85Tu
- Sensitive to process variations
Parameter Tp is an estimate of the response time of the closed Large scope for improvements.
loop system.
More process information needed.

Assessment of Ziegler-Nichols Methods Dynamics of Processes Suitable for PID Control


• Published in 1942 in Trans. ASME 64(1942)759–768. A B

1 1

• Tremendously influential 0.5


0.5

• The beginning of process control 0

0 −0.5

• Slight modifications used extensively by controller manu-


0 5 10 15 20 0 5 10 15 20
C D
10

facturers and process engineers 1


5

• Uses too little process information: only 2 parameters 0.5


0

• Substantial improvements can be obtained with modified 0


0 5 10
E
15 20
−5
0 5 10
F
15 20

rulse based on 3 parameters 20 1.5

15

• Basic design principle quarter amplitude damping is not


1
10
0.5
robust, gives closed loop systems with too high sensitivity 5

( Ms > 3) and too poor damping (ζ  0.2)


0 0
0 5 10 15 20 0 5 10 15 20

R∞ R ∞
Essentially monotone step responses: 0
h(t)dt 0
hh(t)hdt  1

c K. J. Åström, October 2002


& 11
Characterize Dynamics by 3 Parameters A Modified Step Response Method
Step response method: K , L and T Lag dominated dynamics: L < 0.1T
T
3

K = 0.3 , Ti = 8L
KpL
2

0
Balanced dynamics 0.1T < L < 2T
−1
0 2 4 6 8 10 12 14 16 18 20

T
K = 0.3 , Ti = 0.8T
Frequency response method: ω u , h P(ω u)h and P(0) KpL
Delay dominated dynamics L > 2T
0.5

0.15
K = , Ti = 0.4L
0

Kp
−0.5

−1
−0.5 0 0.5 1

PI Balanced Process Dynamics L  T PI Lag Dominated Dynamics L << T


2
Zigler-Nichols (dashed) modified (full) 2
Zigler-Nichols (dashed) modified (full)

1.5 1.5
y

1 1

y
0.5 0.5

0 0
0 10 20 30 40 50 60 70 80 0 1 2 3 4 5 6 7 8 9 10
t t

2.5
Zigler-Nichols (dashed) modified (full) Zigler-Nichols (dashed) modified (full)
15

2
10
Sfrag replacements 1.5
5
u

1
u

0
0.5
PSfrag replacements
0 −5

−0.5 −10
0 10 20 30 40 50 60 70 80 0 1 2 3 4 5 6 7 8 9 10
t t

c K. J. Åström, October 2002


& 12
PI Delay Domiated Dynamics L >> T PID Control
Zigler-Nichols (dashed) modified (full)
2 1. Introduction
1.5
2. Derivative Filter
y

1
3. Set Point Weighting
0.5
4. Integrator Windup
0
0 2 4 6 8 10
t
12 14 16 18 20
5. Computer Implementation
1.2
Zigler-Nichols (dashed) modified (full) 6. Tuning
1

0.8
7. Summary
0.6
u

0.4

Sfrag replacements 0.2

−0.2
0 2 4 6 8 10 12 14 16 18 20
t

Summary Recommendations for Studies


• Remember control fundamentals The PI(D) controller is the most common controller. You should
– Load disturbances and measurement noise learn how it works and how to tune it. A laboratory is strongly
recommended, you can take a lab course in the spring of
– Reference signals
2003.
– Model uncertainty
– Six responses are needed Reading suggestions:
• Many practical and operational issues • Study Chapter 6
– Derivative filter
– Set point weighting (2DOF)
– Integrator windup
– Digital control
– Tuning
• Relevant for all control systems
c K. J. Åström, October 2002
& 13

You might also like