0% found this document useful (0 votes)
12 views23 pages

PID Handout

Uploaded by

vicentfan0
Copyright
© © All Rights Reserved
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)
12 views23 pages

PID Handout

Uploaded by

vicentfan0
Copyright
© © All Rights Reserved
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/ 23

ECE 680 Fall 2009

Proportional-Integral-Derivative (PID) Control


Stanislaw H. Żak

1 Introduction
The proportional-integral-derivative (PID) controllers are without a doubt the most widely
used controllers in industry today. Åström and Hägglund [1, p. 198] regard the PID con-
troller as the “bread and butter” of control engineering. Knospe [3] estimates that over
90% of control loops employ PID control. The PID control strategy is most useful when a
mathematical model of the process to be controlled is not available to the control engineer.
To better appreciate the effectiveness of the PID control strategies, we first discuss a
general control design principle referred to as the internal model principle (IMP).

2 The Internal Model Principle (IMP)


Consider a block diagram of a closed-loop system shown in Figure 1.

Controller Plant
Nr (s) #
R(s) = Dr (s) @ E(s) Y (s)-
- @ - Nc (s) - Np (s)
+ −@
"!
@ Dc (s) Dp (s)
r(t) e(t) ?
y(t)
6
Gc (s) Gp (s)

Figure 1: Block diagram of a closed-loop control system.

c October 26, 2009 by Stanislaw H. Żak

1
Using basic rules of the block diagram algebra yields

E(s) = R(s) − Gp (s)Gc (s)E(s)


Nr (s) Np (s)Nc (s)
= − E(s).
Dr (s) Dp (s)Dc (s)
Performing simple manipulations, we obtain

Dp (s)Dc (s) Nr (s)


E(s) = (1)
Dp (s)Dc (s) + Np (s)Nc (s) Dr (s)

Nc (s)
Our objective is to design a controller Gc (s) = Dc (s)
so that

lim e(t) = lim (r(t) − y(t)) = 0,


t→∞ t→∞

where e(t) = L−1 (E(s)) is the inverse Laplace transform of E(s).


Suppose that the poles of the Laplace transform of the reference signal r(t) are in the
closed right half-plane, that is, they belong to the set {s : ℜ(s) ≥ 0}, where ℜ(s) denotes
the real part of the complex variable s. The polynomial

Pc (s) = Dp (s)Dc (s) + Np (s)Nc (s)

is the closed-loop characteristic polynomial (CLCP) of the closed-loop system depicted in


Figure 1 and the polynomial zeros are the closed-loop poles. Using (1), we can easily prove
the following result that we refer to as the Internal Model Principle (IMP).

Theorem 1 (Internal Model Principle) In the configuration depicted in Fig-


ure 1, where the poles of R(s) are in the closed right half-plane,

lim e(t) = 0
t→∞

if and only if

1. the closed-loop poles are in the open left-half plane;

2. Dr (s) is a factor of the open-loop characteristic polynomial Dp (s)Dc (s), that is,
there is a polynomial, say Q(s), such that Dp (s)Dc (s) = Q(s)Dr (s).

The second condition of the IMP an be interpreted as follows: the controller, Gc (s), must
be chosen in such a way that the open-loop transfer function, Gp (s)Gc (s), contains a model

2
Controller Plant
1 #
R(s) = s E(s) Y (s)-
- @
+@−@ - - 1
Gc (s) =?
"!
@ s+2
e(t) ?
y(t)
6
Nc (s)
Gc (s) = Dc (s)

Figure 2: A closed-loop control system of Example 1.

of the reference signal to be tracked. If none of the poles of R(s) is a pole of the plant’s
transfer function, Gp (s), then we can restate the IMP as follows:
Any good tracking controller must stabilize the closed-loop system and must contain
a model of the reference signal.
For an alternative approach to the IMP, we recommend Wolovich [7, pp. 254–255].
We now illustrate the IMP with two numerical examples.

Example 1 For the closed-loop system shown in Figure 2, our objective is to construct a
transfer function Gc (s) such that limt→∞ e(t) = 0. The Laplace transform of the error is

1 1 (s + 2)Dc (s) 1
E(s) = 1 Nc (s)
= .
1+ s+2 Dc (s)
s (s + 2)Dc (s) + Nc (s) s

Let Nc (s) = 1 and Dc (s) = s, that is, let


1
Gc (s) = ,
s
Then,
(s + 2)s 1 s+2
E(s) = = 2 .
s2+ 2s + 1 s s + 2s + 1
It is easy to check using, for example, the final value theorem that limt→∞ e(t) = 0. Thus,
in this case, a simple integral (I) controller does the job.

3
Controller Plant
1 #
R(s) = s2 E(s) Y (s)-
- @
+@−@ - - 1
Gc (s) =?
"!
@ s+2
e(t) ?
y(t)
6
Nc (s)
Gc (s) = Dc (s)

Figure 3: A closed-loop control system of Example 2.

Example 2 Consider the closed-loop system shown in Figure 3. We wish to construct a


Nc (s)
controller Gc (s) = D c (s)
so that limt→∞ e(t) = 0, where the reference signal is the unit ramp
function. In Example 1, the simple integrator was all that we needed for the unit step as
the reference input. Let us try the same controller here. Then, the Laplace transform of the
error signal is
1 1
E(s) = 1 Nc (s)
1+ s+2 Dc (s)
s2
(s + 2)Dc (s) 1
=
(s + 2)Dc (s) + Nc (s) s2
s+2 1
= 2 .
s + 2s + 1 s
Note that now e(∞) = 2. Thus the simple integrator is not enough now to force the steady-
state error to zero. Note that in this case the polynomial Dr (s) was not a factor of Dc (s).
Let us then try a controller that would satisfy the second condition of the IMP, the
divisibility condition. If we take the double integrator then the divisibility condition will be
satisfied and we obtain
s+2
E(s) = 3 .
s + 2s2 + 1
However, now e(t) is divergent because the poles of E(s) are not stable. The three poles
of E(s) are located at -2.2056, and 0.1028 ± j0.6655. This time the first condition of the
Internal Model Principle is not satisfied.

4
Finally, let us try a controller of the form
Nc (s) s+a
Gc (s) = = 2 , (2)
Dc (s) s
where a is a design parameter that should be chosen to satisfy the both conditions of the
IMP. Note that the above controller contains the model of the reference signal. Thus, we
only need to select the design parameter a so that the CLCP, Pc (s), has its zeros in the open
left half-plane, where

Pc (s) = Dp (s)Dc (s) + Np (s)Nc (s)


= (s + 2)s2 + s + a
= s3 + 2s2 + s + a

Selecting a = 1 yields Pc (s) with its zeros at

−1.7549, −0.1226 ± j0.7449

and
s+2
E(s) =
s3
+ 2s2 + s + 1
We can now apply the final value theorem to E(s) to obtain, limt→∞ e(t) = 0.
The selection of a = 1 results in the desired steady-state behavior of the closed-loop
system. However, the above controller may, or may not, guarantee the desired transient
performance of the closed-loop system. Thus further tuning of the parameter a may be
necessary.

In industrial applications, control engineers usually specify the performance of the con-
trolled system based on the system step response. In such a case r(t) is a step function,
which sometimes is also referred to as the constant set-point, which can be represented as

 0 for t < 0
r(t) =
 A for t ≥ 0,

where A is the constant set-point value. Recall that the Laplace transform of the above
signal is
A
R(s) = L(r(t)) = .
s
5
Taking the above into account it is easy to see that the integral (I) controller contains the
model of the unit step function as well as any scalar multiple of it. If, in addition, the zeros
of the CLCP are all in the open left-half plane, then e(∞) = 0 for any step input. For this
reason, the I controller is often referred to as as reset controller because it automatically
ensures e(∞) = 0 without an operator manually altering or “resetting” the set-point value
to achieve a desired output value.

3 PID Controller Architecture


We begin our discussion with a basic PID controller architecture, also known as the type
A PID controller; it consists of three-terms. Later we discuss two modifications, B and C, of
the type A PID control architecture. The three terms of a PID controller attempt to fulfill
the transient and steady-state specifications.
To proceed, we need some notation. Let u(t) denote the output of the controller, which
is the input signal to the plant. Recall that e(t) is the tracking error, that is, the difference
between the desired plant output, r(t), and the actual plant output, y(t). Thus
e(t) = r(t) − y(t). (3)
The three-term type A PID control law can be described as
u(t) = uP (t) + uI (t) + uD (t), (4)
where uP is the proportional term, uI is the integral term, and uD is the derivative term.
We now analyze each term one by one.
• The proportional term, uP , has the form
uP (t) = KP e(t), (5)
where KP is the proportional gain.
The proportional term responds immediately to the current tracking error. Typically,
however, it cannot achieve the desired tracking accuracy without excessively large gain.

• The integral term, uI , is given by


KP t
Z
uI (t) = e(τ )dτ, (6)
TI 0

where TI is the integral time constant.


The integral term yields a zero steady-state error in tracking a step function (a constant
set-point). This term is slow in response to the current tracking error.

6
• The derivative term, uD , is
de(t)
uD (t) = KP TD , (7)
dt
where TD is the derivative time constant.
The derivative term is especially effective for plants with significant dead-time resulting
in a poor representation of previous control actions in the current tracking error. This,
in turn, as pointed out by Knospe [3], may lead to large transient error when PI control
is used. The derivative action combats this problem by generating its action based on
a prediction of future tracking error. But there is a cost to be paid—the derivative
term amplifies higher frequencies sensor noise. To alleviate the problem, a filtering of
the differentiated signal is employed thus resulting in a PID controller with a derivative
filter referred to as a PIDF controller. We present a PIDF controller in a section on
implementing PID controllers.

Combining the above terms together, we obtain the type A PID control action, in the time
domain,

u(t) = uP (t) + uI (t) + uD (t)


!
1 t de(t)
Z
= KP e(t) + e(τ )dτ + TD . (8)
TI 0 dt

It is advantageous to work in the Laplace domain when analyzing the PID-controlled


plant. The Laplace transfer function of the type A PID controller, denoted GP ID (s), is

U(s) 1
 
GP ID (s) = = KP 1 + + TD s , (9)
E(s) TI s

where U(s) = L(u(t)) is the Laplace transform of u(t) and E(s) = L(e(t)) is the Laplace
transform of the tracking error e(t). In Figure 4, we show a PID-controlled system with the
type A PID controller in the forward path.

4 PID Controller Tuning


The control engineer’s task is to select the PID controller’s parameters to meet given perfor-
mance specifications. This process is referred to as the controller tuning. The most widely
known PID tuning rules were proposed by Ziegler and Nichols [8] in 1942. They proposed two
sets of tuning rules of the type A PID controllers. In both cases the controller’s parameters
are selected based on the experimental measurements of the controlled process.

7
Desired # Actual
output - @ output -
+@−@ - KP 1 + -
 
1
+ TD s Plant
"!
TI s
Reference @
input 6

Figure 4: A PID-controlled system.

Plant
u(t) y(t)

Figure 5: Open-loop test on the plant—measuring the step response of the plant.

4.1 The Open-Loop Method—Tuning Based on Open-Loop Tests


on the Plant
The first method of choosing control settings for the PID controller, proposed by Ziegler and
Nichols, is based on open-loop tests on the plant as shown in Figure 5. There is a restriction
on the applicability of this method. The method can only be applied if the step response
is S-shaped as shown in Figure 6. The S-shaped step response can be characterized using
three parameters: the delay time (dead-time) L, the time constant T , and the steady-state
gain (process gain) K.
We add that a plant with the S-shaped step response can be approximately modeled by
a first-order transfer function with transportation delay,

Y (s) Ke−Ls
= Gd (s) = . (10)
U(s) Ts + 1

We illustrate the procedure of approximating a system with an S-shaped step response using
a first-order transfer function with transportation delay given by (10) with the following
example.

Example 3 We consider, as in Ogata [5, p. 444], a plant modeled by the second-order

8
y(t)
Tangent line at

inflection point

0 t
L T

Figure 6: An S-shaped step response and its characterization using three parameters.

transfer function
10 10
Gp (s) = = 2 . (11)
(s + 1)(s + 5) s + 6s + 5
Using the procedure illustrated in Figure 6, we approximate the second-order transfer func-
tion (11) using the first-order transfer function with transportation delay,
Ke−Ls 2e−0.053s
Gd (s) = = . (12)
Ts + 1 0.798s + 1
In Figure 7, we compare the step responses of the above two transfer functions. One can see
that approximating the S-shaped step step response of a dynamic system using a first-order
transfer function with transportation delay is a challenging problem. Global optimization
methods, such as genetic algorithms and particle swarm optimizers are the tools that can
be used here effectively to determine parameters L and T that result in Gd (s) that “best”
approximates a given Gp (s).

Ziegler and Nichols proposed a set of tuning rules, formulas, using the parameters that
characterize the step response of the plant modeled by the transfer function (10). These
tuning formulas are shown in Table 1.
Substituting the tuning parameters given in Table 1 into the transfer function of the PID
controller gives
1
 
GP ID (s) = KP 1 + s + TD s
TI
T 1
 
= 1.2 1+ + 0.5Ls
L 2Ls

9
2 Step responses of two models

1.5

1 second-order system response

0.5

0
0 1 2 3
Approximation error
0.3

0.2

0.1

0
0 1 2 Time t 3

Figure 7: Comparison of step responses of the second-order system and its approximation
using a first-order system with transportation delay in Example 3.

Table 1: Ziegler-Nichols tuning formulas based on the step response of the plant (open-loop
method).
Controller KP TI TD
T
P L
∞ 0
PI 0.9 TL L
0.3
0
PID 1.2 TL 2L 0.5L

 2
1
s+ L
= 0.6T . (13)
s
Thus the type A PID controllers tuned using the formulas of the open-loop method can be
parameterized by two parameters, T and L.
The ACT controller manufacturer, as well as Li, Ang, and Chong [4], present slightly
modified Ziegler-Nichols open-loop tuning formulas shown in Table 2. The only difference
between the formulas shown in Table 1 and those in Table 2 is in the first column where
all the column elements of the first column of Table 2 are obtained by dividing by K the
corresponding elements of Table 1.

10
Table 2: Modified Ziegler-Nichols tuning formulas based on the step response of the plant
(open-loop method).
Controller KP TI TD
T
P LK
∞ 0
T L
PI 0.9 LK 0.3 0
T
PID 1.2 LK 2L 0.5L

rt
( ) ut ( ) yt
( )

+
_
Kp Plant

Figure 8: Experimental setup to determine the critical gain, Kcr and critical period of
oscillation, Pcr .

4.2 The Closed-Loop Method—Tuning Based on Closed-Loop Tests


on the Plant
The second method of Ziegler and Nichols of tuning PID controllers is also known as the
the closed-loop method. This method requires an experiment on the closed-loop system as
shown in Figure 8. We thus have a pure P-controller in the feed-forward path. A step is
applied as the input and the response is observed. The test is repeated with increased or
decreased controller gain until a sustained oscillation is achieved, as shown in Figure 9. This
gain is called the “critical gain” and denoted Kcr . The period of the sustained oscillation is
called the critical period and denoted Pcr . Using the parameters Kcr and Pcr , Ziegler and

yt
( )

Pcr

0 t

Figure 9: Measuring the period of the sustained oscillation, Pcr .

11
Nichols proposed tuning formulas depicted in Table 3. Substituting the tuning parameters

Table 3: Ziegler-Nichols tuning formulas based on critical gain Kcr and critical period Pcr
(closed-loop method).
Controller KP TI TD
P 0.5Kcr ∞ 0
Pcr
PI 0.45Kcr 1.2
0
PID 0.6Kcr 0.5Pcr 0.125Pcr

from Table 3 into the transfer function of the type A PID controller, we obtain
1
 
GP ID (s) = KP 1 + s + TD s
TI
1
 
= 0.6Kcr 1 + + 0.125Pcr s
0.5Pcr s
 2
4
s+ Pcr
= 0.075Kcr Pcr . (14)
s
As in the open-loop method, the type A PID controllers tuned using the formulas of the
closed-loop method can be parameterized by two parameters; this time by Kcr and Pcr .
In summary, both the open-loop and closed-loop Ziegler-Nichols tuning rules allow us
to parameterize the type A PID controllers using just two parameters. That is, we can
represent a family of type A PID controllers as

(s + a)2
GA−P ID = Kc , (15)
s
where Kc and a are design parameters. The above representation can be used to computa-
tionally obtain parameters’ values that satisfy design specifications.

5 Implementing PID Controllers


If the reference input is a step, then because of the presence of the derivative term, the
controller output will involve an impulse function. In addition, the derivative term amplifies
high frequency sensor noise. To alleviate the above problems, the pure derivative term is
replaced with a derivative filter, which results in the PIDF controller.

12
5.1 PIDF Controller
In the PIDF controller, the pure differentiator is approximated with the pure differentiator
cascaded with a first-order low-pass filter. Thus the pure derivative term is replaced by the
approximate differentiator and so the derivative term contribution would take the form,
TD s
UD (s) = E(s), (16)
γTD s + 1
where γ is a small parameter, for example, γ = 0.1. The transfer function of the type A
PIDF controller has the form
!
1 TD s
GP IDF = KP 1+ s+ . (17)
TI γTD s + 1

For a step reference, the PIDF controller output will involve a sharp pulse rather than
an impulse function. This is referred to as the set-point kick phenomenon.

Example 4 In this example, we use the open-loop Ziegler-Nichols tuning formulas given in
Table 1 to tune the PIDF controller for plant models in Example 3. We first apply the PIDF
controller to the second-order transfer function given by (11). We add that the proportional
gain was tuned as
T
KP = 1.2 = 18.068
L
T
because for the modified gain, KP = 1.2 LK , the closed-loop system becomes unstable. The
remaining parameters are:

TI = 2L = 0.106, TD = 0.5L = 0.0265, and γ = 0.1.

The plant output and the control signal plots versus time are shown in Figure 10. The
system output is very oscillatory and takes long time to settle down. We can observe the
set-point kick phenomenon in the plot of the control effort versus time.
We then applied the type A PIDF controller to the transfer function given by (12). Here,
T
on the other hand, we used KP = 1.2 LK because for KP = 1.2 TL the closed-loop system
becomes unstable. The plant output and the control signal plots versus time are shown in
Figure 11. Here, as in the previous case, we can observe a set-point kick phenomenon. The
closed-loop system is much faster here but the overshoot is at unacceptable level.
We conclude that the open-loop Ziegler-Nichols tuning rules do not necessarily yield ex-
cellent performance of the PID-controlled system. The controller requires careful additional
tuning. To illustrate this point, we doubled the values of KP , TI , and TD . The re-tuned

13
Plant output
1.5

0.5

0
0 1 2 3
Control signal
200

100

0
0 1 2 Time t 3

Figure 10: PIDF-controlled second-order system’s step response of Example 4, where the
reference input is a step function delayed by 0.5 s in order to better observe the set-point
kick phenomenon.

14
Plant output
2

0
0 0.5 1 1.5
100 Control signal

50

0
0 0.5 1 1.5
Effect of delay on control signal
100

50

0
0 0.5 1 Time t 1.5

Figure 11: Step response of the PIDF-controlled first-order system with transportation delay
in Example 4.

PIDF controller performance applied to the second-order plant is shown in Figure 12. This
re-tuning was suggested by Ogata [6, p. 165]. However the re-tuned controller does not work
for the first-order plant with transportation delay. The closed-loop system driven by this
controller is in fact unstable.

As we observed before, in addition to the transient performance, the designer has to deal
with the set-point kick phenomenon. We address this issue next.

5.2 Integrator Windup


When implementing a PID controller, we need to take into account physical constraints of
the controlled plant. In particular, a control engineer has to remember that all actuators
have physical limitations; a motor has a finite limited speed while a valve can only be opened
to its limits. Thus a control engineer will be faced with the problem of actuator saturation.

15
Plant output

0.5

0
0 0.5 1 1.5
Control signal
400

300

200

100

0
0 0.5 1 Time t 1.5

Figure 12: Step response of the closed-loop system with re-tuned PIDF controller and second-
order plant in Example 4.

To illustrate the issue, consider Example 4. Suppose now that the actuator saturation limits
are ±10, that is,
|u(t)| ≤ 10
These constraints are violated in the above example because of the set-point kick phe-
nomenon. Let us now impose the constraints on the control action and see how this affects
the closed-loop system behavior.

Example 5 First, we consider the second-order plant (11) simulated in the previous ex-
ample. We now impose constraints on the actuator, |u(t)| ≤ 10. The PIDF controller
parameters are the same as the ones we used in the simulation shown in Figure 12. The
output of the closed-loop system is shown in Figure 13.

As can be seen in Figure 13 and 14, in both cases the control signal saturates in the
moment the reference input is applied. The input to the plant remains saturated in the
sense that the feedback loop is broken because the controller’s output is not responding to

16
1.5 Plant output
1
0.5
0
0 0.5 1 1.5
10 Control signal
5
0
-5
0 0.5 1 1.5
Integral term output
0.4

0.2

0
0 0.5 1 Time t 1.5

Figure 13: A PIDF-controlled second-order plant with with constrained actuator.

Plant output
1.5
1
0.5
0
0 0.5 1 1.5
10 Control signal

0
0 0.5 1 1.5
Effect of delay on control signal
10

0
0 0.5 1 Time t 1.5

Figure 14: Plant output of the PIDF-controlled first-order plant with with transportation
delay and constraints on input.

17
Actuator
model
Es
+
Us
TDs
( )
KP
( ) +

- +
1 + 1
TI s
+

TA

Figure 15: A type A PID controller with the integrator anti-windup.

its input. The output of the integral term continues to increase because the tracking error is
positive. The output of the integral term starts decreasing when the plant’s output becomes
larger than the reference input. However, the controller stays saturated for some time because
of the excessively large output of the integral term. As a result of the integral term excessive
output, the plant’s output has a large overshoot. This phenomenon of excessive integrator
term output resulting in the large overshoot of the plant’s output is called the integrator
windup.
We can avoid or reduce the integrator windup by reducing the integral term output when
the actuator saturates. A possible anti-windup scheme is shown in Figure 15. This anti-
windup mechanism is referred to as tracking or back calculation. In Figure 16, we show the
output of the PIDF-controlled second-order plant with the anti-wind, where TA = TI /0.075.
In Figure 17, we show the output of the first-order plant with transportation delay controlled
with a PIDF controller with the integrator windup. The PIDF controller parameters are the
same as in the simulation of Figure 11, and TA = 0.21.

6 Modified PID Control Schemes


We now discuss two alternative schemes to eliminate the set-point kick phenomenon. We
first take another look at the type A PID control architecture as shown in Figure 18. In order
to avoid differentiating a step reference input, it is proposed to operate the derivative action
in the feedback as shown in Figure 19; hence its name, the PI-D controller also referred to
as the type B PID controller. A practical implementation of this controller that we refer to

18
Plant output
0.8

0.4

0
0 0.5 1 1.5
Control signal
10

0
0 0.5 1 1.5
Integral term output
0
-0.2
-0.4
-0.6
0 0.5 1 Time t 1.5

Figure 16: Plant output of the PIDF-controlled second-order plant with the integrator ani-
windup circuit.

as the type B PIDF controller action can be described as


1 KP TD s
 
U(s) = KP 1 + E(s) − Y (s).
TI s γTD s + 1
We can go even further and move the proportional and derivative actions into feedback
giving us the I-PD control or the type C PID controller shown in Figure 20. A practical
implementation of this controller that we refer to as the type C PIDF controller action can
be described as !
KP TD s
U(s) = E(s) − KP 1 + Y (s).
TI s γTD s + 1

7 Digital Implementation
In this section we present a method of implementing PID controllers using a computer. To
obtain a computer implementation, we need to discretize the continuous-time differential
equation describing a controller at hand. We now discuss discretization of different terms of
the type A PIDF controller. The types B and C PIDF controllers can be easily obtained by

19
Reference input and plant output
1

0.5

0
0 0.2 0.4 0.6
Control signal
10

0
0 0.2 0.4 0.6
Effect of transportation delay on control signal
10

0
0 0.2 0.4 Time t 0.6

Figure 17: Plant output of the PIDF-controlled first-order plant with transportation delay
and the integrator ani-windup.

Rs
( ) Es
( ) Ys
( )
1 +
KP Gp s
TIS
+ + ( )
_
+

TDS

Figure 18: More detailed view of the type A PID controller.

Rs
( ) Es
( ) Ys ( )
1 +
KP Gp s
TS
+ + ( )
_ _
I

TDS

Figure 19: Type B PID controller.

20
Rs
( ) Ys
( )
1
KP Gp s
TS
+ + ( )
_ _
I

1 TDS

Figure 20: Type C PID controller.

modifying the A PIDF architecture. In our discussion, we assume that the sampling instants
are equally spaced. We denote the sampling period as h, and sampling instants as tk , where
k = 0, 1, 2, . . . .

• The discrete-time version of the proportional term, uP (tk ), has the form

uP (tk ) = KP e(tk ), (18)

where KP is the proportional gain.

• Recall that the continuous-time integral term, uI (t), is given by


KP t
Z
uI (t) = e(τ )dτ,
TI 0

Differentiating both sides of the above integral equation yields


duI (t) KP
= e(t).
dt TI
We can now use several methods to discretize the above differential equation. Using
the forward difference discretization gives
KP h
uI (tk+1 ) = uI (tk ) + e(tk ). (19)
TI
For other discretization methods, the reader may wish to consult the section on nu-
merical techniques.

• Performing cross-multiplication in (16) and representing the resulting polynomial equa-


tion, into the Laplace variable s, in the time domain gives the continuous-time differ-
ential equation describing the filtered derivative term,
duD (t) de(t)
γTD + uD (t) = KP TD . (20)
dt dt
21
The forward difference discretization of the above differential equation yields
!
h KP
uD (tk+1 ) = 1 − uD (tk ) + (e(tk+1 ) − e(tk )) . (21)
γTD γ
On the other hand, the backward difference discretization of the differential equa-
tion (20) gives,
γTD KP
uD (tk ) = uD (tk−1 ) + (e(tk ) − e(tk−1 )) . (22)
γTD + h γTD + h

Combining (18), (19), and (22), we obtain a discrete-time approximation of the type A PIDF
controller, 
uP (tk ) = KP e(tk ) 


γTD KP

uD (tk ) = γTD +h uD (tk−1 ) + γTD +h (e(tk ) − e(tk−1 )) 

(23)
u(tk ) = uP (tk ) + uI (tk ) + uD (tk ) 



uI (tk+1 ) = uI (tk ) + KTPI h e(tk )

To implement the above controller, one can use the zero-order hold.

8 Notes
The first PID controllers for industrial applications were introduced in 1939 by the Taylor
Instrument Company and the Foxboro Instrument Company. For an account of the PID
controller development along with an overview of early process control devises, we recom-
mend Bennett [2]. For an account of recent advances in PID control, see an article by Li,
Ang, and Chong [4].
Many engineers are familiar with PID controllers and prefer to enhance the performance
of a well-known solution through additional capabilities rather than switch to an untested
solution. Knospe [3] observers that even alternative digital control methods have not sup-
planted PID’s primacy in industrial control with a possible exception of model predictive
control, where the control action is calculated on the fly. Knospe [3] adds that PID control
still has a role even in this case by handling lower level loops.

References
[1] K. J. Åström and T. Hägglund. PID Control. In W. S. Levine, editor, The Control
Handbook, chapter 10.5, pages 198–209. CRC Press in cooperation with IEEE Press,
Boca Raton, Florida 33431, 1996.

22
[2] S. Bennett. Development of the PID controller. IEEE Conrol Systems Magazine,
13(6):58–65, December 1993.

[3] C. Knospe. PID control—Introduction to the special section. IEEE Conrol Systems
Magazine, 26(1):30–31, February 2006.

[4] Y. Li, K. H. Ang, and G. C. Y. Chong. PID control system analysis and design: Problems,
remedies, and future directions. IEEE Conrol Systems Magazine, 26(1):32–41, February
2006.

[5] K. Ogata. Modern Control Engineering. Prentice Hall, Upper Saddle River, New Jersey
07458, third edition, 1997.

[6] K. Ogata. Solutions Manual to Modern Control Engineering. Prentice Hall, Upper Saddle
River, New Jersey 07458, third edition, 1997.

[7] W. A. Wolovich. Automatic Control Systems: Basic Analysis and Design. Saunders
College Publishing, Harcourt Brace College Publishers, Fort Worth, 1994.

[8] J. G. Ziegler and N. B. Nichols. Optimum settings for automatic controllers. Transactions
of the American Society of Mechanical Engineers, 64:759–768, November 1942.

23

You might also like