www.controlsystemslab.com Page 1
Digital PID Controllers
Dr.Varodom Toochinda
http://www.controlsystemslab.com
June 2011
Proportional-Integral-Derivative (PID) control is still widely used in industries because of its
simplicity. No need for a plant model. No design to be performed. The user just installs a
controller and adjusts 3 gains to get the best achievable performance. Most PID controllers
nowadays are digital. In this document we discuss digital PID implementation on an embedded
system. We assume the reader has some basic understanding of linear controllers as described in
our other document.
Different forms of PID
A standard “textbook” equation of PID controller is
t
d
i
dt
tde
Tde
T
teKtu
0
)(
)(
1
)()(
(1)
where the error e(t), the difference between command and plant output, is the controller input,
and the control variable u(t) is the controller output. The 3 parameters are K (the proportional
gain), T
i
(integral time), and T
d
(derivative time).
Performing Laplace transform on (1), we get
d
i
sT
sT
KsG
1
1)(
(2)
Another form of PID that will be discussed further in this document is sometimes called a
parallel form.
)()()()(
0
te
dt
d
KdeKteKtu
d
t
ip
(3)
With its Laplace transform
d
i
p
sK
s
K
KsG )(
(4)