PID Controller Design PDF
PID Controller Design PDF
Controller modes refer to the methods to generate different types of control signals to final control element
to control the process variable. So far, we have examined the benefits of feedback control, and studied how
the poles of P (s)C(s) affect the ability of the control system to track reference inputs. We will now study a
type of controller C(s) that is commonly used in practice, called proportional integral-derivative (PID)
controller.
To develop this controller, we will assume that the plant is a second order system of the form
bo
p(s) =
s2 + a1 s + a 0
Note that the transfer function from r to y for the above feedback loop is given by
𝑝(𝑠)𝑐(𝑠)
𝑇𝑟𝑦 (𝑠) =
1 + 𝑝(𝑠)𝑐(𝑠)
Proportional Controller
We start with a simple controller of the form C(s) = KP , where KP is a constant that we will choose. In this
case, the input to the plant is simply u(t) = KPe(t), which is proportional to the error.
With this controller, the transfer function from r to y in the feedback control system becomes
𝐾𝑝 bo
𝑇𝑟𝑦 (s) =
s2 + a1 s + (a0 + 𝐾𝑝 𝑏𝑜 )
Recall that the poles of this transfer function dictate how the system behaves to inputs. In particular, we
would like to ensure that the system is stable (i.e., all poles are in the OLHP). Since the gain KP affects
one of the coefficients in the denominator polynomial, it can potentially be used to obtain stability.
1 1
Example1: Suppose 𝑝1 (𝑠) = 𝑠2 +3𝑠−1
and 𝑝2 (𝑠) = 𝑠2 −3𝑠−1
. Can we stabilize those plants with
proportional controller? If yes design a Proportional (P) controller for a closed loop peak overshoot of 25%
and settling time of 2 seconds for a 2% criteria.
The above examples demonstrate that simple proportional control can stabilize some plants, but not others.
1
Another benefit of proportional control is that it can potentially be used to speed up the response of the
system. Recall the standard second order system had a denominator of the form 𝑠 2 + 2𝞷𝝎𝒏 𝒔 + 𝒘𝟐𝒏 , and the
larger 𝜔𝑛 is, the faster the system responds. In the closed loop transfer function Try(s) above, the term 𝒘𝟐𝒏
is given by a0 + KPb0, and thus we can potentially make 𝝎𝒏 very large by choosing KP to be very large,
thereby speeding up the system.
Now let’s consider tracking. Recall from the previous lecture that in order to track a step input perfectly
(i.e., with zero steady state error), the system must be of type 1 (a type 0 system would track a step within
bo
a finite steady state error). If C(s) = KP and p(s) = s2 +a1 s+ a0
, the system would only be of type 0 (if a0 is
not zero), and thus we will not be able to track a step perfectly. To rectify this, we will have to add an
integrator to the controller in order to make the system type 1.
Integral Controller
To obtain perfect tracking for step inputs, we will introduce an integrator into the controller (i.e., we will
add a pole at the origin) in order to ensure that the system will be of type 1. The controller thus
becomes 𝑢(𝑡) = 𝐾𝑖 ∫ 𝑒(𝑡)𝑑𝑡
Ki
c(s) =
s
With this controller, the transfer function from r to y is
𝐾𝑖 bo
𝑇𝑟𝑦 (s) =
s(s 2 + a1 s + a0 ) + 𝐾𝑖 𝑏𝑜
Integral control of the system thus eliminates the steady-state error in the response to the step input. This is
an important improvement over the proportional control alone, which gives offset. Note that integral control
action, while removing offset or steady-state error, may lead to oscillatory response of slowly decreasing
amplitude or even increasing amplitude, both of which are usually undesirable.
Example2: Design an Integral controller for a plant having the transfer function G(s) = 1/(s + 2) so that the
resulting closed loop system has a steady state error of 0.1 to a unity ramp input.
Proportional-Integral (PI) Control
The controller thus becomes
2
Ki
c(s) = 𝐾𝑝 +
s
In the time-domain, this corresponds to the input to the plant being chosen as
and thus this is called a proportional-integral controller. With this controller, the transfer function from r to
y is
𝑏𝑜 (𝐾𝑝 𝑠 + 𝐾𝑖 )
𝑇𝑟𝑦 (s) =
s3 + a1 𝑠2 + (a0 + 𝐾𝑝 𝑏𝑜 )𝑠 + 𝐾𝑖 𝑏𝑜
Note that we now have a third order system. Two of the coefficients of the denominator polynomial can be
arbitrarily set by choosing KP and Ki appropriately. Unfortunately, we still have no way to stabilize the
system if a1 < 0 (recall that for stability, all coefficients must be positive). Even if the system is stable with
the given value of a1, we might want to be able to choose better pole locations for the transfer function in
order to obtain better performance. To do this, we add one final term to the controller.
Derivative Controller
An advantage of using derivative control action is that it responds to the rate of change of the actuating
error and can produce a significant correction before the magnitude of the actuating error becomes too large.
Derivative control thus anticipates the actuating error, initiates an early corrective action, and tends to
increase the stability of the system.
Because derivative control operates on the rate of change of the actuating error and not the actuating error
itself, this mode is never used alone. It is always used in combination with proportional or proportional
plus-integral control action.
Practical differentiators are rarely in the form shown in the figure to the left. They usually include
an extra pole to “roll-off” the high frequency response. Consider the modified circuit to the right:
𝑣𝑜𝑢𝑡 (𝑠) 𝑠𝑅𝐶1
=
𝑣𝑖𝑛 (𝑠) 𝑠𝑅𝐶2 + 1
Proportional-Integral-Derivative (PID) Control
Consider the PI controller from the last section, and add a term that corresponds to the derivative of the
error. The controller with this additional term has the form
Ki
c(s) = 𝐾𝑝 + s
+ 𝐾𝑑 𝑠
In the time-domain, the input to the plant due to this controller is given by
3
𝑢(𝑡) = 𝐾𝑝 𝑒(𝑡) + 𝐾𝑖 ∫ 𝑒(𝑡)𝑑𝑡 + 𝐾𝑑 𝑒̇ (𝑡)
and so this controller is called a proportional-integral-derivative controller. The transfer function from r to
y is
𝑏𝑜 (𝐾𝑑 𝑠 2 + 𝐾𝑝 𝑠 + 𝐾𝑖 )
𝑇𝑟𝑦 (s) =
s 3 + (a1 + 𝐾𝑑 𝑏𝑜 )𝑠 2 + (a0 + 𝐾𝑝 𝑏𝑜 )𝑠 + 𝐾𝑖 𝑏𝑜
Note that we are now able to arbitrarily set all coefficients of the denominator polynomial, via appropriate
choices of KP, Ki and Kd! Thus we can now guarantee stability (only for a second order plant, though),
good transient behavior, and perfect tracking.
Another challenge in implementing the derivative term is that, in practice, all signals will contain high
frequency noise, and differentiating noise will once again create signals with large magnitudes. To avoid
1
this, the derivative term KDs is usually implemented in conjunction with a low pass filter of the form 𝜏𝑠+1,
for some small 𝜏. This has the effect of attenuating the high frequency noise entering the differentiator,
and produces the controller
Ki 𝐾𝑑 𝑠
c(s) = 𝐾𝑝 + +
s 𝜏𝑠 + 1
1
Example3: Consider the plant 𝑝(𝑠) = 𝑠2 −3𝑠−1
. Design a PID controller so that the closed loop system has
perfect tracking for a step input, and has poles at s = -5, -6, -7.
Therefor the effect of each controller parameter Kp, Kd and Ki on a closed loop system are summarized in
the table below.