Lab Experiment # 05: Objective
Lab Experiment # 05: Objective
Theory:
Introduction: Consider the following unity feedback system as shown in Figure 6.1:
KP = Proportional gain
KI = Integral gain
KD = Derivative gain
First, let's take a look at how the PID controller works in a closed-loop system using the
Schematic shown above. The variable (e) represents the tracking error, the difference between
the desired input value (R) and the actual output (Y). This error signal (e) will be sent to the PID
controller, and the controller computes both the derivative and the integral of this error signal.
The signal (u) just past the controller is now equal to the proportional gain (KP) times the
magnitude of the error plus the integral gain (KI) times the integral of the error plus the
derivative gain (KD) times the derivative of the error.
This signal (u) will be sent to the plant, and the new output (Y) will be obtained. This new output
(Y) will be sent back to the sensor again to find the new error signal (e). The controller takes this
new error signal and computes its derivatives and it’s internal again. The process goes on and on.
Example Problem:
Suppose we have a simple mass, spring, and damper problem as shown in Figure 6.2.
Let
M = 1kg
b = 10 N.s/m
k = 20 N/m
F(s) = 1
Plug these values into the above transfer function
The goal of this problem is to show you how each of Kp, Ki and Kdcontributes to obtain
Fast rise time
Minimum overshoot
No steady-state error
Open-loop step response: Let's first view the open-loop step response.
num=1;
den=[1 10 20];
plant=tf(num,den);
step(plant)
This Step response is shown in Figure 6.3.
Proportional-Integral-Derivative control:
Now, let's take a look at a PID controller. The closed-loop transfer function of the given
system as shown in Figure 6.10 with a PID controller is:
Figure 6.10: System with PID control
After several trial and error runs, the gains Kp=350, Ki=300, and Kd=50 provided the
desired response. To confirm, enter the following commands to an m-file and run it in the
command window. You should get the following step response.
Kp=350;
Ki=300;
Kd=50;
contr=tf([KdKp Ki],[1 0]);
sys_cl=feedback(contr*plant,1);
t=0:0.01:2;
step(sys_cl,t)
Note that these corrections may not be accurate, because KP, KI, and KD are dependent of each
other. In fact, changing one of these variables can change the effect of the other two. For this
reason the table should only be used as a reference when you are determining the values for K P,
KI, and KD.
Procedure:
......................................
Lab Tasks
Q1: Consider a process given below to be controlled by a PID controller,
Comments:
………………………
Conclusion:
………………………