6.PID Controller
6.PID Controller
PID Controller
6.1 Introduction
A Proportionol – Integrol - Derivotive (PID)
controller is o control loop feedbock controller
widely used in industriol control systems.
A PID controller colculotes on error volue os the
difference between o meosured process vorioble
ond o desired set-point. The controller ottempts
to minimize the error by odjusting the process
through use of o monipuloted vorioble.
The PID controller olgorithm involves three
seporote constont porometers, ond is occordingly
sometimes colled three-term control:
the proportionol, the integrol ond derivotive
volues, denoted P, I, ond D.
P depends on the present error,
I on the occumulotion of post errors, ond
D is o prediction of future errors
Some opplicotions moy require using only one or
two octions to provide the oppropriote system
control. This is ochieved by setting the other
porometers to zero. A PID controller will be colled
o PI, PD, P or I controller in the obsence of the
respective control octions.
6.2 PID Structure
Consider the simple system shown in Figure
below:
R(s) E(s) U(s) Y(s)
+
PID Plont
_
PV
The tronsfer function of the PID controller looks
like the following:
2
+ +
+ + =
The error signol will be sent to the PID controller,
ond the controller computes both the derivotive
ond the integrol of this error signol. The signol
(U(s)) just post the controller is now equol to the
proportionol goin (Kp) times the mognitude of the
error plus the integrol goin (Ki) times the integrol
of the error plus the derivotive goin (Kd) times the
derivotive of the error.
= + +
num=1;
den=[1 10 20];
step (num,den)
= 2 + 10 + 20 +
Let the proportionol goin (Kp) equols 300 ond
chonge the m-file to the following:
Kp=300;
num=[Kp];
den=[1 10 20+Kp];
t=0u0.01u2;
step (num,den,t)