P, Pi, Pid Simulator

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 36

PID CONTROLLER

INSTRUCTION MANUAL

LABTECH ELECTRONICS PVT.LTD,


No.1/3, Kundrathur main road,
Periya Panicherry, Chennai-602101
Ph: 238 20617/18
E-mail: [email protected]

1
INTRODUCTION:

This trainer is specially designed to study about the analog PID


controller with the configuration of P, PI and PID. It consists of
simulated block like controller, process, motor drive and waveform
generator. Internal of the controller block are error detector, adder
calibrator (fine tuning 10 turn) pot meter are provided for proportional
gain, integral time and derivative time constant and in waveform
generator built-in synchronized square and triangle signal source are
provided with level and frequency controls. It enables the student to
study the response of PID on “CRO” and an important feature of this
system is that the simulated blocks are designed to be operated at
frequency suitable for CRO viewing, and for real time processing, DC
motor controller is provided along with this trainer provided with
digital indicator for set RPM and current RPM features and
temperature control as an optional feature.

Technical Specifications:

Built in Signal Sources


Square Wave : Amplitude - 1V (p-p)
Frequency - 10 Hz to 40 Hz
Triangular Wave : Amplitude - 1V (p-p)
Frequency -10 Hz to 40 Hz
Simulated Process : Delay
Integrator
Time Constant I &
Time Constant II
Error Detector
Gain
Controller Configuration: P,PI,PD & PID
2
Proportional band: 5% to 50 %
Controller gain: 2 to 20
Integral Time Constant: 10 to100msec
Derivative time constant: 0.2 to 20msec
Experiments
 Open & Closed loop response of simulated process like delay,
integrator, and time constant.
 Study and performance evaluation of Closed loop response of
P,PI,PD and PID controller.

OBJECT:
To study the performance characteristics of an analog P, PI
and PID controller under open loop and closed loop systems.

EXPERIMENTAL UNIT:
This is a very well designed and compact unit for class room
experiments on the study of proportional-integral-derivative
controllers. It comprises of a flexible process, a PID controller, signal
sources, a DVM and a stabilized power source for all the sub-systems.
The various sections along with their specifications are described
below.

Process or plant
In a practical situation the process or plant is that part of the
system which produces the desired response under the influence
of command signal. Usual processes are higher order, nonlinear
functions having inherent dead time or pure time delay. In process
control studies such plants are commonly modeled by transfer
functions of the form
Keθs 1
Gp(S) = τs+1

3
Where,  is the time delay in sec  is the effective time
constant and K is the controller gain.
In the present system, the process is an analogue simulation
through a few basic building blocks which may be connected
suitably to form a variety of processes or plants. These blocks are,
a) Integrator - having an approximate transfer function of 1/s
b) Simple pole - two identical units, each having a transfer
function of 1 /(1+0.0155s)
c) Pure time delay - a time delay of about 5.64 msec. generated by
a high order multiple pole approximation of the delay function.
Note that all the above blocks, except pure time delay, have 180°
phase shift between input and output.

Controller:
The controller for the process is an analog Proportional-
Integral-Derivative (PID) circuit in which the PID parameters are
adjustable. The values may be set within the following range
through 10 turn calibrated potentiometers:
Proportional Gain, K c : 2 to 20
Proportional Band : 5% to 50%
Integral Time Constant, T i : 10 - 100 msec.
Derivative Time Constant, Td : 2 - 20 msec.
It may be mentioned that although in an industrial PID
Controller it is common to adjust the above parameters directly,
but in the educational environment convenience and simplicity is
more important. In the present unit, therefore, it is the
proportional, integral and derivative gains viz. K c, Ki and K d,
which are made variable through 10 turn potentiometers
calibrated from 0 to 1.
The PID block has a phase angle of 0° between its input and
output.
Error Detector:

4
The error detector is a unity gain inverting adder which adds
the command signal with the feedback signal. To ensure negative
feedback it would therefore be necessary to have (2n+1) phase
shift in the forward path, for n = 0, 1, 2...

Uncommitted Amplifier:
It is a unity gain inverting amplifier. This amplifier may be
inserted in the loop, if required, to ensure a proper phase angle.

Signal Sources:
The signal source comprises of a low frequency square and
triangular wave generator having adjustable amplitude and
frequency. The square wave is used as command input to the
system, while the triangular wave is used for external x-deflection
in the CRO. This arrangement gives a perfectly steady display
even up to very low frequencies and is convenient for CRO
measurements.

BACKGROUND SUMMARY
Introduction:
The performance of a physical system is not always good
enough for a given application. In such a situation the
characteristics of the system needs to be modified. This is referred
to as ‘Compensation Design’. Standard procedure available for
compensation includes time and frequency domain designs of a
variety of compensation networks . Such design methods have been
successfully used in many practical dynamic control systems. The
performance of the system is evaluated in terms of a set of
performance specifications e.g. rise time, peak time, settling time,
peak percent overshoot and steady state error in the time domain,
and gain margin phase margin, closed loop bandwidth etc in the
frequency domain.

5
Fig 1: Block diagram of the Overall system

Another approach towards improving the performance of


systems has been through elementary control actions - called
control terms - inserted in the forward path of an existing control
system. The block diagram of Fig.1 shows the location of such a
controller in a unity feedback system. The controller work
comprise of two or three of the following control terms:
(a) Proportional, P
(b) Integral, I
(c) Derivative, D
The resulting controller may then turn out to be a P, PI or
PID controller.
The two, and three-term controllers indicated above have
been used more commonly by process industries e.g. petroleum,
chemical, power, food etc., for the control of temperature,
pressure, flow and similar variables. A common feature of these
systems is their sluggish response which calls for accurate and
slow integration and sensitive differentiation. Although near ideal
electronic differentiator and integrator circuits are difficult to
achieve except with high impedance operational amplifiers and
good quality component, PI and PD controller valves have existed
in the pneumatic and hydraulic environments for a long time.
In the present unit attempt has been made to expose the
students to the study and design of PID controllers using simulated
systems. The speed of response has been deliberately scaled up to
have a fast and easy viewing on CRO.
6
Structure of PID Controller:
The equation of a PID controller is given by.
de(t )
∫ e(t )dt + Kd dt 2
m (t) = Kc e(t) + Ki
Where,
e(t) = error signal
m(t) = P1D output or plant input
Kc = Proportional gain
Ki = Integral gain
Kd = Derivative gain

1n the Laplace domain, the above equation is written as

Fig.2. Block Diagram of PID Controller

Ki
M(s) = K c E(s) + s E(s) + sK d E(s)
The above equation is represented as a block diagram of PID
controller as shown in Fig. 2. An alternative representation of the
above equation which is more commonly used in process control
literature is as follows:

7
M(s) = K
( c
1+
1
Tis )
+T d s E (s) 3

Where,
Kc
Ti = Ki Integral time constant
Kd
Td = Kc
Derivative time constant
It is easy to develop the structure of PD, and PI controllers
from above, by substituting K i = 0 and K d = 0 respectively. A
special terminology used in process control literature is given
below to facilitate better understanding.
1
Proportional Band = K c x 100%
Ki 1
=
Reset Rate = Kc Ti per minute
Derivative Time Constant = Td
In the present unit, the three gains are adjustable in the
following range with the help of calibrated 10-turn
potentiometers.
Kc : 0 to 20
Ki : 0 to 1000
Kd : 0 to 0.01

Characteristics:
From Eq. (2), the transfer function of the PID controller may
be written as
2
M ( s) K s s +K c s+ K i
G PID ( s)= =
E( s) s 4
Kd
(s+ω 1 )( s+ω 2 )
s

8
Where 1 and 2 are the two zeros of the PID controller transfer
function.

Fig. 3 Bode diagram of PID controller


The above transfer function has a pole at the origin and two
real zeros for K c2 > 4KdKi Notice that a properly designed PID
controller should not, in general, have a pair of complex conjugate
zeros which may result in reduced damping. Bode diagram of the
PID controller is shown in Fig. 3. It may be seen that the controller
gain increase without limits as the frequency is decreased. This is
due to the integral term, and it results in a reduction of steady state
error. However, the negative phase angle introduced by the
controller at low frequencies has a destabilizing effect as well. The
corner frequency 1, should therefore be so located that large
negative phase angle occurs at sufficiently low frequencies only,
where the plant already has a good stability margin.
Again, the Bode diagram of the controller (Fig. 3) shows an
increased gain at high frequencies accompanied by a positive
phase angle. The positive phase angle has a stabilizing effect while
the large gain at high frequencies makes the system respond more
to fast or sudden changes. The overall system then becomes

9
relatively more stable, as it is capable of taking `anticipatory'
action in the presence of signals having fast variations.
Design:
The PID Controller can be designed both in the frequency
domain and in the s-plane, through the classical or trial-and-error
design procedure. The method needs the pole-zero locations or
frequency-phase responses of the plant, for its implementation. A
large number of process control systems are however characterized
by,
Incomplete or inaccurate plant equation
Extremely slow response
Presence of time delays
High order transfer function
Limited possibility of experimentation for identification of the
plant and need for fine trimming the compensator at site
In such a situation alternative simpler techniques of setting the
controller parameters (K C, Ti Td), or tuning, are of great practical
value. Presented below are three techniques of tuning a PID
controller aimed at obtaining a satisfactory step response of the
overall system.

Trial-and-error tuning
This is a simple and systematic method for on-line tuning of a
PID controller. The method assumes that the three parameters K c,
Ki and Kd are available for adjustment. Following are the steps for
its implementation.
1. Disconnect or reduce derivative and integral block signals
by setting Ki and Kd to zero.
2. Starting from a low value increase K c, gradually till
Sustained oscillation sets in. This condition is tested by small
disturbances generated by varying the reference signal a little. The
value of- proportional gain so obtained is called ultimate gain, K cu.

10
3. Set Kc to 1/2 of the value obtained in step 2.
4. Increase K, gradually until sustained oscillations start
again. Set Ki to 1/3 of this value.
5. Increase Kd gradually until sustained oscillations start
again. Set Td to 1/3 of this value.
The above method, though very simple in operation, has the
following limitations:
(i)A number of systems which are, or may be approximated
to, first or second order transfer functions without time delay do
not oscillate. Step 3 is then not possible and the method fails.
(ii) Open loop unstable systems cannot be handled by this
method.
(iii) Tuning of very slow systems by this method is extremely
time consuming.
(iv) Sustained oscillations may not be acceptable or may be
risky in some physical processes such as a large chemical process.

(b) Continuous Cycling Method


In this method, given by Ziegler and Nichols, the first step is
to determine experimentally the value of ultimate gain, K cu as
suggested in the previous method. The time period of the resulting
sustained oscillations is referred to as ultimate period P u Based on
the values of K cu and Pu the controller settings are obtained from
Table I below which is essentially empirical in nature.

Controller Kc Ti Td

P 0.5 Kcu - -

PI 0.45 Kcu 0.833 Pu -

PID 0.6 Kcu 0.5 Pu 0.125 Pu

Table 1: Empirical values for tuning the controller

11
Some variation in the coefficient settings have also been
suggested by various workers. In case the above values should be
taken as the `initial settings' and should invariably be followed by
fine-tuning via trial-and-error. Most of the limitations of the first
method are still present in this method; however the continuous
cycling method is less time consuming.

Fig 4 Step response of (a) Type – 0 (b) Type – 1 system

c) Process Reaction Curve Method


This is a second on-line tuning method proposed by Ziegler and
Nichols and is very attractive because it is based on a simple
experimentation. The plant is modeled as a first order function
with time delay. The open loop step response of the plant, called
reaction curve of the process, is experimentally obtained.
Typical step responses for Type-0, and higher type number
systems are shown in Fig. 4(a) and 4(b) respectively. The step
responses are characterized by two parameters.
(i)Slope S of the tangent drawn at the point of inflection
(ii)Time T at which the tangent intersects the X-axis.

12
The values of S and T are obtained graphically as shown in Fig. 4.
If the input step change was M then the PID parameters are given
by the Table 2 below.

Controller Kc Ti Td
P M/ST - -
PI 0.9 M/ST 3.33 T -
PID 1.2 M/ST 2T 0.5 T
Table 2: Tuning Parameters using Process Reaction Curve.
Once again, the above values are empirical in nature and
therefore fine tuning of the parameters may be needed in specific
cases. The values of Ki and K d may be calculated from Eq. (2) for
implementation on the present unit.
Although the process reaction curve method based on a single
experimentation is fast and simple, it does have some limitation as
given below:
(i) The step response obtained in the open-loop may not be
satisfactory in case the system is highly nonlinear or open loop
unstable.
(ii) Accuracy is limited due to the graphical procedure involved.
In conclusion it may be said that any method used to
calculate the parameters must be followed by a fine tuning on the
operational process.

EXPERIMENTS:
13
STUDY OF PID RESPONSE

Aim:
To study the response of a PID controller under calibration
mode.

Apparatus Required:
 PID controller trainer kit.
 CRO.
 CRO probes.
 Patch cards

Self Calibration of CRO:

 Keep amplitude knob in 2V position in channel 1.


 Keep traces at center using X-Y position.
 Choose calibrate set 2V.
 Give 2V input which is available in CRO for calibrating
purpose to channel 1.
 Verify 2V / 1 deviation in screen.
 Digital panel meter for motor control.

STUDY OF P CONTROLLER
14
Connection details
 Connect the output of the generator (square wave) to the
input of P controller.
 Keep P controller knob at zero position initially (0.00)
rotate anticlockwise fully.
 Connect the output of P controller to the positive terminal
of CRO.
 Connect negative terminal of CRO to GND of the trainer
(channel 1).

Step: 1

 Switch ON the trainer.


 Connect CRO (channel 2) positive terminal to the
waveform generator (square wave).
 Connect negative terminal of CRO to the GND of the
trainer (channel 2).
 Set amplitude of square wave as 0.1 V (P-P) & time period
as 25msec in square wave generator by varying amplitude
knob.
 Connect the output of the square wave generator to the
input of the P controller.
 Verify that the P controller pot in zero position.
 Now vary the P controller pot from min to max position
and the response (square wave amplitude) of the P
controller.

Calculate the gain by using this formula.

15
Input = 0.1 V (P-P).

Output = 2.0 V (P-P).

Kc(max) = P-P square wave output / square wave input.

= 2.0/0.1

= 20V.

Result:

Thus the response of a P controller under calibration mode


was studied and the gain was calculated.

STUDY OF I CONTROLLER

Connection details

16
 Connect the output of the generator (square wave) to the
input of I controller.
 Keep I controller knob at zero position initially (0.00)
rotate anticlockwise fully.
 Connect the output of I controller to the positive terminal
of CRO.
 Connect negative terminal of CRO to GND of the trainer
(channel 1).

Step: 1

 Switch ON the trainer.


 Connect CRO (channel 2) positive terminal to the
waveform generator (triangular wave)
 Connect negative terminal of CRO to the GND of the
trainer (channel 2).
 Set amplitude of square wave as 0.1 V (P-P) & time period
as 70msec in square wave generator by varying amplitude
knob.
 Connect the output of the triangular wave generator to the
input of an I controller.
 Verify that the I controller pot in zero position.
 Now vary the I controller pot from min to max position
and the response (square wave amplitude) of the P
controller.

CALCULATION
Calculate the gain by using this formula.
Input = 1 V (P-P).

17
Output = 1.2 V (P-P).

K i (max) = 4*f* (P-P) triangular wave output amplitude in volts


/ p-p square wave input amplitude in volts.

= 4*40*1.2/1
= 192 sec.
Integral Time Constant Ti = Kc/Ki
= 2/192 (Kc=2)
= 10.4 msec

Ti = Kc/Ki
= 20/192 (Kc=20)
= 104 msec

Result:
Thus the response of I controller under calibration mode was
studied and the gain was calculated.
STUDY OF D CONTROLLER

Connection details
 Connect the output of the generator (triangular wave) to
the input of D controller.

18
 Keep D controller knob at zero position initially (0.00)
rotate anticlockwise fully.
 Connect the output of D controller to the positive terminal
of CRO.
 Connect negative terminal of CRO to GND of the trainer
(channel 1).

Step: 1

 Switch ON the trainer.


 Connect CRO (channel 2) positive terminal to the
waveform generator (square wave)
 Connect negative terminal of CRO to the GND of the
trainer (channel 2).
 Set amplitude of triangular wave as 0.84 V (P-P) & time
period as 70msec in square wave generator by varying
amplitude knob.
 Connect the output of the square wave generator to the
input of the D controller.
 Verify that the D controller pot in zero position.
 Now vary the D controller pot from min to max position
and the response (square wave amplitude) of the D
controller.

CALCULATION
Calculate the gain by using this formula.
Input = 1 V (p-p)

Output = 7.5 V (p-p)

19
Kd(max) = P-P square wave output / 4* f* (P-P) triangular wave input

= 7.5 / 4* 40 * 1

= 0.046

Derivative Time Constant (Td) = Kd/Kc


= 0.046/2 (Kc=2)
= 23 msec

Td = 0.046/20 (Kc=20)
= 2.3 msec

Result:

Thus the response of a D controller under calibration mode


was studied and the gain was calculated.

Ex.No.1 CLOSED LOOP RESPONSE OF P CONTROLLER

Aim
To find the peak overshoot and steady state error of a P
controller.

20
Apparatus Required
 PID controller trainer kit.
 CRO
 CRO probes Patch cards

Procedure
 Set the amplitude of the square wave at 1V (P-P) and
frequency to a low value.
 Connect the output of waveform generator (square wave)
to the error detector input.
 Connect the P controller output to the adder input.
 Connect the adder output the delay input.
 Connect the delay output to the time constant1 input.
 Time constant1 output is connected to the amplitude input.
 The amplitude output is connected to error detector
feedback input.
 Ensure that the circuit will from a closed loop control.
 Connect the CRO (channel1) positive terminal to the
amplitude output.
 Connect the negative terminal (channel1) of the CRO to
GND.
 Connect the CRO (channel 2) positive terminal to the
triangular output.
 Vary the potentiometer of the P controller from minimum
to maximum position and note down the peak overshoot &
steady state error from the graph.

 Calculate % of steady state error and peak overshoot


value.
Model Graph

21
Tabular Column

SI.No. Kc X Y Steady % of
state overshoot
error
1 1 0.5 0.58 0.5 16

Calculation
Input = 1V (P-P) square wave low frequency
Kc = 0 to max.
Steady State Error = (P-P) input – x / (P-P) input = (1-0.5)/1
% Overshoot = y-x / x *100
=[(0.58-0.5)/0.5]*100=16%

Patching diagram

22
Result
Thus the peak overshoot and steady state error of a P controller
was founded out and the graph of time Vs amplitude was plotted.
Ex.No.2 CLOSED LOOP RESPONSE OF PI CONTROLLER

Aim
To find the peak overshoot and steady state error of a PI controller.
23
Apparatus Required
 PID controller trainer kit.
 CRO
 CRO probes
 Patch cards

Procedure
 Set the amplitude of the square wave at 1V (P-P) and frequency
to a low value.
 Connect the output of waveform generator (square wave) to the
error detector input.
 Connect the P & I controller output to the adder input.
 Connect the adder output the delay input.
 Connect the delay output to the time constant1 input.
 Time constant1 output is connected to the amplitude input.
 The amplitude output is connected to error detector feedback
input.
 Ensure that the circuit will from a closed loop control.
 Connect the CRO (channel1) positive terminal to the amplitude
output.
 Connect the negative terminal (channel1) of the CRO to GND.
 Connect the CRO (channel 2) positive terminal to the triangular
output.
 Vary the potentiometer of the P controller from minimum to
maximum position and note down the peak overshoot & steady state
error from the graph.
 Calculate % of steady state error and peak overshoot value.
Model Graph

24
Tabular Column

Steady % of
S.No Ki X Y state overshoot
error
1. 0.9 0.6 0.66 0.4 10%

Calculation
Input = 1V (P-P) square wave low frequency
Kc= 0.6

Steady State Error = (P-P) input – x / (P-P) input =(1-0.6)/1=0.4

% Overshoot = y-x / x *100 =[(0.66-0.6)/0.6]*100= 10%

Patching diagram

25
Result
Thus the peak overshoot and steady state error of a PI controller
was founded out and the graph of time Vs amplitude was plotted.
Ex.No.3 CLOSED LOOP RESPONSE OF PID CONTROLLER
26
Aim
To find the peak overshoot and steady state error o a PID
controller.

Apparatus Required
 PID controller trainer kit
 CRO
 CRO probes
 Patch cards
Procedure
 Set the amplitude of the square wave at 1V (P-P) and frequency
to a low value.
 Connect the output of waveform generator (square wave) to the
error detector input.
 Connect the P, I & D controller output to the adder input.
 Connect the adder output the delay input.
 Connect the delay output to the time constant1 input.
 Time constant1 output is connected to the amplitude input.
 The amplitude output is connected to error detector feed back
input.
 Ensure that the circuit will from a closed loop control.
 Connect the CRO (channel1) positive terminal to the amplitude
output.
 Connect the negative terminal (channel1) of the CRO to GND.
 Connect the CRO (channel 2) positive terminal to the triangular
output.
 Vary the potentiometer of the P controller from minimum to
maximum position and note down the peak overshoot & steady state
error from the graph. Calculate % of steady state error and peak
overshoot value.
Model Graph

27
Tabular Column

Kd X Y Steady % of
Sl.N state overshoot
o error
1. 0.9 0.72 0.76 0.28 5.55

Calculation
Input = 1V (P-P) square wave low frequency
Kc = 0.6 , Ki=0.006,
Steady State Error = (P-P) input – x / (P-P) input
= 1 – 0.72/ 1 = 0.28

% Overshoot = y-x / x *100


= 0.76-0.72 /0.72 * 100 = 5.55%

Patching diagram

28
Result:
Thus the peak overshoot and steady state error of a PID
controller was founded out and the graph of time Vs amplitude was
plotted.
Appendices:

29
Circuits used in PID Controller:

30
31
32
33
34
35
36

You might also like