Professional Documents
Culture Documents
W7B
W7B
The PID control scheme is named after its three correcting terms,
whose sum constitutes the manipulated variable (MV). The
proportional, integral, and derivative terms are summed to calculate
the output of the PID controller. Defining u(t) as the controller output,
the final form of the PID algorithm is:
After Laplace transformation, one can obtain the transfer function of
𝑈(𝑠)
PID controller, :
𝐸(𝑠)
Frequently, the performance characteristics of a control system are
specified in terms of the transient response to a unit-step input, which
are given as follows:
1. Steady-state error : is the
difference between the input
and the output for a prescribed
test input as 𝑡 → ∞.
2. Rise time, 𝑇𝑟 . The time
required for the waveform to
go from 0.1 of the final value to
0.9 of the final value.
3. Percent overshoot, %OS.
The amount that the waveform
overshoots the steady-state, or
final, value at the peak time, expressed as a percentage of the steady-
state value.
4. Settling time, 𝑇𝑠 .The time required for the transient’s damped
oscillations to reach and stay within 2% of the steady-state value.
5. Time Constant: We call 1/a the time constant of the response.
From Equation:
the time constant can be described as the time for 𝑒 𝑎𝑡 to decay to 37%
of its initial value. Alternately, from Equation:
the time constant is the time it takes for the step response to rise to
63% of its final value.
What are the characteristics of P, I, and D controllers?
• A proportional controller (𝐾𝑝 ) will have the effect of reducing the
rise-time (10% to 90% of steady-state (final) value) and will reduce, but
never eliminate the steady-state error.
• An integral control (𝐾𝑖 ) will have the effect of eliminating the
steady-state error, but it may make the transient response (or system
stability) worse.
• A derivative control (𝐾𝑑 ) will have the effect of increasing the
stability of the system, reducing the overshoot, and improving the
transient response, but never eliminate the steady- state error.
o Effects of each of controllers 𝐾𝑝 , 𝐾𝑑 , and 𝐾𝑖 on a closed-loop (CL)
system are shown below.
General Tips for Designing a PID Controller:
When you are designing a PID controller for a given system, follow the
steps shown below to obtain a desired response.
1. Obtain an open-loop response & determine what needs to be
improved.
2. Add a proportional control to improve the rise time.
3. Add a derivative control to improve the overshoot .
4. Add an integral control to eliminate the steady-state error.
5. Adjust each of 𝐾𝑝 , 𝐾𝑖 , and 𝐾𝑑 until you obtain a desired overall
response.
o Lastly, please keep in mind that you do not need to implement all
three controllers (proportional, derivative, and integral) into a single
system, if not necessary. (7)
𝑋(𝑠) 𝐺𝑐 𝑠 𝐺𝑝 (𝑠) 1
= 𝐺𝑝 (𝑠) = 2
𝐹(𝑠) 1 + 𝐺𝑐 𝑠 𝐺𝑝 (𝑠) 𝑠 + 10𝑠 + 20
For a P controller: 𝐺𝑐 = 𝐾𝑝
𝑋(𝑠) 𝐾𝑝
= 2
𝐹(𝑠) 𝑠 + 10𝑠 + (20 + 𝐾𝑝 )
For a PD controller: 𝐺𝑐 = 𝐾𝑝 + 𝐾𝑑 𝑠
𝑋(𝑠) 𝐾𝑑 𝑠 + 𝐾𝑝
= 2
𝐹(𝑠) 𝑠 + (10 + 𝐾𝑑 )𝑠 + (20 + 𝐾𝑝 )
For a PI controller: 𝐾𝑖
𝐺𝑐 = 𝐾𝑝 +
𝑠
𝑋(𝑠) 𝐾𝑝 𝑠 + 𝐾𝑖
= 3
𝐹(𝑠) 𝑠 + 10𝑠 2 + 20 + 𝐾𝑝 𝑠 + 𝐾𝑖
𝐾𝑖 𝐾𝑑 𝑠 2 + 𝐾𝑝 𝑠 + 𝐾𝑖
For a PID controller: 𝐺𝑐 = 𝐾𝑝 + + 𝐾𝑑 𝑠 =
𝑠 𝑠
𝑋(𝑠) 𝐾𝑑 𝑠 2 + 𝐾𝑝 𝑠 + 𝐾𝑖
= 3
𝐹(𝑠) 𝑠 + (10 + 𝐾𝑑 )𝑠 2 + 20 + 𝐾𝑝 𝑠 + 𝐾𝑖
o Let the proportional gain 𝐾𝑝 = 300 as before and let 𝐾𝑑 = 10. Enter
the following commands into an m-file and run it in the MATLAB
command window.
𝐾𝑝 = 300; 𝐾𝑑 = 10 𝑛𝑢𝑚 = [𝐾𝑑 𝐾𝑝 ]; 𝑑𝑒𝑛 = [1 10 + 𝐾𝑑 20+ 𝐾𝑝 ];
t = 0:0.01:2; step(num,den,t)
o This plot shows that the
derivative controller reduced both
the overshoot and the settling
time, and had small effect on the
rise time and the steady-state
error.
Before going into a PID control, let's take a look at a PI control. From the
table, we see that an integral controller 𝐾𝑖 decreases the rise time,
increases both the overshoot and the settling time, and eliminates the
steady-state error. For the given system, the closed-loop transfer
function with a PI control is:
𝑋(𝑠) 𝐾𝑝 𝑠 + 𝐾𝑖
= 3
𝐹(𝑠) 𝑠 + 10𝑠 2 + 20 + 𝐾𝑝 𝑠 + 𝐾𝑖
Let's reduce the 𝐾𝑝 to 30, and let 𝐾𝑖 = 70. Create a new m-file and
enter the following commands.
𝐾𝑝 = 30; 𝐾𝑖 = 70 𝑛𝑢𝑚 = [𝐾𝑝 𝐾𝑖 ]; 𝑑𝑒𝑛 = [1 10 20+ 𝐾𝑝 𝐾𝑖 ];
t = 0:0.01:2; step(num,den,t)
𝑋(𝑠) 𝐾𝑑 𝑠 2 + 𝐾𝑝 𝑠 + 𝐾𝑖
= 3
𝐹(𝑠) 𝑠 + (10 + 𝐾𝑑 )𝑠 2 + 20 + 𝐾𝑝 𝑠 + 𝐾𝑖
After several trial and error runs, the gains 𝐾𝑝 = 350, 𝐾𝑖 = 300, and
𝐾𝑑 = 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 step response given below.
𝐾𝑝 = 350; 𝐾𝑖 = 300; 𝐾𝑑 = 50
𝑛𝑢𝑚 = [𝐾𝑑 𝐾𝑝 𝐾𝑖 ];
𝑑𝑒𝑛 = [1 10 + 𝐾𝑑 20+ 𝐾𝑝 𝐾𝑖 ];
t = 0:0.01:2;
step(num,den,t)
Now, we have obtained the system with no overshoot, fast rise time,
and no steady-state error.
Homework # 3