You are on page 1of 6

Laboratory Activity 3: The PID Controller Subcircuits

1 Introduction
A proportionalintegralderivative controller (PID controller) is a generic control loop feedback
mechanism (controller) widely used in industrial control systems. A PID controller attempts to correct
the error between a measured process variable and a desired set point by calculating and then
outputting a corrective action that can adjust the process accordingly and rapidly, to keep the error
minimal.[1]
2 Pre-Laboratory Activities
Figure 1 shows the complete circuit diagram of the PID controller. The circuit makes use of op amps to
implement the three main elements of the PID controller, namely, the proportional, integral, and
derivative controllers. Likewise, op amps are used for the buffers, inverter, summer, and error detector
circuits.

Figure 1 Complete Circuit Diagram for PID Controller


1. From the circuit diagram of the proportional, integral, and derivative controller, shown in Fig.
1, derive a general equation for the output voltage of each circuit, in terms of R, C (when
applicable), and Vin. (Note: Do not include the inverter for the derivative controller.) Express
the equations in the time domain and in the s-domain.

2. Suppose that the proportional, integral, and derivative (plus inverter) controllers have the
same input Vin, derive a single equation for the transfer function of the PID controller after the
effect of the three elements have been summed up.
3. What is the general form of the PID control law? Compare it with the equations you have just
derived.
3 Materials
The following components will be used for this activity:
8 LM741 operational amplifiers
1 4.7-k resistor
3 100-k potentiometers
1 220- resistor
2 1-M potentiometers
1 10-F capacitor
10 100-k resistors
1 1-F capacitor
Other materials and equipment to be used are the following:
breadboard
oscilloscope
digital multimeter
power supply
wires & probes
4 Set Point and Process Variable Voltage
Construct the circuit shown in Fig. 2 twice, one for the set point voltage and another for the process
variable. Place +15-V and -15-V power supplies, respectively, to the positive and negative voltage
supplies of the op amp. (The same goes for all the other op amps in this activity.) Mind the placement
of the circuits (and the succeeding ones) on the breadboard to anticipate the construction of the
complete circuit, as shown in Fig. 1.
The voltage at the output of the op amps should go to zero as the adjustment knob is turned
counterclockwise. On the other hand, the voltage should go to +15 V if the adjustment knob is turned
clockwise.

Figure 2 Circuit Diagram for Set Point and Process Variable


4 Error Comparison
Construct the next stage to the PID controller, which is the error op amp, as shown in Fig. 3. Connect
the set point and process variable voltage as appropriate.

Figure 3 Circuit Diagram for Error Op Amp


Test if the error op amp is functioning properly. Turn the knob of the process variable voltage pot
halfway so that the output is approximately 7 V. Now, turn the knob of the set point all the way to the
left. Record the error output voltage for set point values of 0, 4, 7, 11, and 15 volts.
Table 1 Error Output Voltages for Various Set Points
(at 7-V Process Variable Voltage)
Set Point (V) Error Output (V)
0
4
7
11
15
5 Proportional Controller
Connect the proportional controller as shown in Fig. 4. The input to the controller is the output of the
error op amp. Connect the potentiometer such that the resistance increases as the adjustment knob is
turned to the right.

Figure 4 Circuit Diagram of Proportional Controller


Now, test if the circuit is working properly. Adjust the process variable and set point pots such that the
output of the error op amp is approximately 1 V. Turn the knob of the 100-k pot all the way to the
left. Then, measure the output voltage of the op amp for different resistance values of the
potentiometer. (Remember to turn off the power supply every time you measure the pot resistance.)
Record the voltages in Table 2 below.

Table 2 Proportional Output Voltage


for Various Feedback Resistance Values
Feedback
Output
Resistance ()
Voltage (V)
0
10k
30k
60k
80k
100k
6 Integral Controller
Construct the integral element of the controller as shown in Fig. 5. Connect the potentiometer so that its
resistance decreases as the knob is turned clockwise. Note that unlike the proportional controller, increasing
the resistance of the 1-M pot will decrease the gain.

Figure 5 Circuit Diagram of Integral Controller


To test if the integral controller is working, first connect the input (node before the pot) to ground, then
turn the pot all the way to the left (resistance 1 M). Then, adjust the process variable and set point pots
so that the error output is approximately 0.5 V. Connect the DMM, set as a voltmeter, to the integrator
output. Now, connect the input node to the error op amp output voltage, and observe what happens to the
DMM reading. Record the time it takes for the output to reach saturation, starting from the time the op amp
input is connected to the error op amp output. (What is the saturation voltage?) Repeat the process with the
input resistance set to 500 k and 800 k. Record charging time for these values. (Do not forget to connect
the input to ground, then to the error op amp, before observing the DMM.)

7 Derivative Controller
Assemble the derivative controller as shown in Fig. 6. Unlike the proportional and integral control elements,
the derivative controller must have its input inverted first before being fed to the circuit. Connect the
potentiometer such that its resistance increases as you turn the knob clockwise.

Figure 6 Circuit Diagram of Inverter and Derivative Controller


First, check the inverter circuit. Its output should have the same magnitude as the output from the process
variable potentiometer, but with different polarity.
Next, check the derivative controller. Since derivative acts according to how the process variable is
changing, you will have to change the value of the process variable in order to change the derivative. Using
the multimeter, observe what happens to the output of the circuit as you turn the process variable pot. What
happens to the controllers output when you quickly turn the potentiometer? What happens when
movements stop?

8 Adding Together the Controls


Add together the effects of the control elements by wiring the circuit shown in Fig. 7.

Figure 7 Circuit Diagram for Summer


To check if the complete circuit is working, first adjust the proportional, integral, and differentiator pots to
10 k,1 M, and 1 M respectively. Then, adjust the set point and process variable pots such that the output
of the error op amp is approximately 0.5 V. Now, disconnect the input from the integral and derivative op
amps, and measure the summer output using the DMM. Then, connect the input from the derivative op amp
and vary the process variable pot. As the pot is varied, observe the summer output using the DMM. The
behavior of the output should be the same as in Part 7. Reset the error output to 0.5 V. Finally, connect the
input from the integral op amp, and observe the summer output. You should be able to observe it increase to
the saturation voltage.

9 Post-Lab Questions
1. What type of op amp configuration does the error op amp implement? How about the
proportional circuit?
2. What are the theoretical and actual values of the closed-loop voltage gain in Part 5 of the
experiment? How do you account for the discrepancies in the theoretical and experimental
values, especially approaching the high theoretical gains?
3. Why does increasing the integral resistance decrease the gain of the integral element? How
does the value of the integral resistance affect the behavior of the integral output?
4. Why do you need to invert the signal before it is input to the derivative controller?
5. How does the rate of varying the process variable affect the differentiator output?
6. From the basic operation of the proportional, integral, and derivative elements, explain their
primary role in maintaining the function of the PID controller. How does each of them
contribute to achieving the desired set point?
10 References
[1]

PID controller. Wikipedia, the free encyclopedia. Accessed on July 7, 2009.


http://en.wikipedia.org/wiki/PID_controller

[2]

J.P. Thrower, S. Kiefer, K. Kelmer, and L. Silverberg. Basic Experiments in PID Control for Nonelectrical Engineers. May 1998.

You might also like