P, Pi, Pid Simulator
P, Pi, Pid Simulator
P, Pi, Pid Simulator
INSTRUCTION MANUAL
1
INTRODUCTION:
Technical Specifications:
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
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.
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.
Controller Kc Ti Td
P 0.5 Kcu - -
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.
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
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
15
Input = 0.1 V (P-P).
= 2.0/0.1
= 20V.
Result:
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
CALCULATION
Calculate the gain by using this formula.
Input = 1 V (P-P).
17
Output = 1.2 V (P-P).
= 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
CALCULATION
Calculate the gain by using this formula.
Input = 1 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
Td = 0.046/20 (Kc=20)
= 2.3 msec
Result:
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.
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
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
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