PID Implementation
PID Implementation
(EMEg5171)
CHAPTER 3
CONTROLLER IMPLEMENTATION
Lecture
Lidiya A.
2022 gc
OUTLINE
1. Introduction
2. General Features
3. Electronic controllers
4. Pneumatic controllers
If both the controller output and error expressed in terms of voltage, then the above
equation is a summing amplifier.
Cont…
Design Procedure:
I. Determine input voltage range (from the range of measurement, from which the
error voltage will be taken)
II. Output voltage range (from controller output range)
III. Calculate the gain (Gp), which is not simply Kp.
Proportional gain tells 1% change of input error results change of controller output.
Thus,
(Note that if PB is given instead of Kp, since Kp = 100/.PB the formula can
alternatively written as: )
Finally we can get the resistors and . (i.e. choose a value to one resistor and
compute the other with the gain formula )
Example
Example
Example
Integral Mode
The values of R and C can be adjusted to obtain the desired integration time.
The initial controller output is the integrator output at t = 0.
Cont…
If is made too large, the output rises so fast that overshoots of the optimum setting
occur and it results cycling.
Determination of GI
The actual value of GI and therefore R and C, is determined from KI and the input
and output voltage ranges.
Integral gain says that, an input error of 1 % must result an output that changes KI %
per second. Or if an error of 1% lasts for 1s, the output must change by KI percent.
Thus,
Note: is often given in minute because industrial processes are slow. Thus we
need to convert it into second.
And it is often expressed in integration time,
Example
Derivative Mode
The derivative mode is never used alone because it can not provide a controller output
when the error is zero or constant.
𝑑 𝑒𝑝
𝑝 (𝑡 )= 𝑘𝐷
𝑑𝑡
𝒅𝑽 𝒆
𝑽 𝒐𝒖𝒕 =− 𝑹𝑪
𝒅𝒕
From a practical perspective, this circuit can not be used because it tends to be unstable,
that is, it may begin to exhibit spontaneous oscillations in the output voltage.
The reason for this instability is the occurrence of very large gain at high frequencies
where the derivative is very large.
Cont…
To study this effect, consider the input voltage given by a sinusoidal voltage oscillating
With some frequency f. Then sin (2π ft ). using ac analysis
shows that the magnitude of the output voltage increases linearly with frequency, so in
principle, as the frequency goes to infinity, so does the output.
Clearly this is unacceptable in control theory. A little high frequency noise will cause
a very large change in output voltage.
A modification is provided that essentially clamps the gain above some
frequency to a constant value.
Cont…
The output of the modified circuit become:
+
Thus
+
Example
PD mode
PD mode controller equation is given by:
Thus
The circuit include clamp to protect against high gain at high frequency in derivative
term.
and
Example
PID mode
+
is chosen from:
Example
As the flapper moves away, the signal pressure will drop because of leaking of air.
Finally, when the flapper is far away, the pressure will stabilize at some value
determined by the maximum leak through the nozzle.
Cont…
Note the great sensitivity in the central region.
A nozzle/flapper is designed to operate in the central region where the slope of the
line is greatest.
In this region, the response will be such that a very small motion of the flapper can
change the pressure by an order of magnitude.
P-Mode responds to magnitude of error
I-Mode responds to the time the error stays
(accumulation of error in time)
D-Mode responds to rate of change of error
Proportional Mode
Because the bellows are usually of fixed geometry, the gain is varied by changing the lever
arm length.
PI
Cont…
In this case, an extra bellows with a variable restriction is added to the proportional system.
Suppose the input pressure shows a sudden increase.
This drives the flapper toward the nozzle, increasing output pressure until the proportional bellows
balances the input as in the previous case. (i.e. Proportional actiion)
The integral bellows is still at the original output pressure, because the restriction prevents
pressure changes from being transmitted immediately.
As the increased pressure on the output bleeds through the restriction, the integral bellows
slowly moves the flapper closer to the nozzle, thereby causing a steady increase in output
pressure. (i.e. Integral action)
The variable restriction allows for variation of the leakage, rate, and hence the integration
time.
PD
Cont…
A variable restriction is placed on the line leading to the balance bellows.
Thus, as the input pressure increases, the flapper is moved toward the nozzle with no
impedance, because the restrictions prevent an immediate response of the balance bellows.
Thus the output pressure rises very fast and then, as the increased pressure leaks in to the
balance bellows, the output pressure starts to decreases as the balance bellows moves the
flapper back away from the nozzle. (PD action)
Adjustment of the variable restriction allows for changing the derivative time constant.
PID