Sunteți pe pagina 1din 31

AUTOMATION &

ROBOTICS
LECTURE#10
PID CONTROLLER

By: Engr. Irfan Ahmed Halepoto


Assistant Professor
PID Controller Theme---
80%
Background
of industrial control applications are installed by
feedback control loop and devices.
The controller compares a measured value from a
process with a reference setpoint value.
Error signal is then processed to calculate a new value
for a manipulated process input, which is responsible to
bring the process measured value to its desired setpoint.
Unlike simpler control algorithms, PID controller can adjust
process inputs based on the history and rate of change of
the error signal, which gives more accurate and stable
control.
It can be shown mathematically that a PID loop will produce
accurate stable control in cases where other control
algorithms would either have a steady-state error or would
cause the process to oscillate.
PID controller
A Proportional-Integral-Derivative controller (PID controller) is
a generic controller widely used in industrial control systems.
PID controllers can be used to regulate flow, temperature,
pressure, level, and many other industrial process variables.
PID controller describes the mathematic calculations that are
applied to calculate the error between the current result and
the desired set-point.
PID control equation involves three separate parameters; the
Proportional, Integral and Derivative terms.
Proportional term responds instaneously to the current
error (providing instaneous response).
Integral term (past errors) responds to the accumulation of
errors in the form of average (providing a slow response
that drives the steady-state error towards Zero).
Derivative term (future errors) responds to the rate at
which the error is changing (providing some anticipatory
response).
Life before PID controller

Manual
With manual, all regulation tasks
Control
will have to be done manually.
For example: To keep constant the
temperature of water discharged
from an industrial gas-fired
heater, an operator will have to
watch a temperature gauge and
adjust a fuel gas valve
accordingly
If the water temperature
becomes too high for some
reason, the operator has to close
the gas valve a bitjust enough
to bring the temperature back to
the desired value.
If the water becomes too cold,
he has to open the gas valve.
Life with PID Controller
Through PID controller Set Point
feature, operator can set the
desired temperature ranges.
The Controllers Output (CO) sets
the position of the control valve.
When everything is functional,
PID controller compares the PV to
its SP and calculates the
difference b/w the two signals as
an Error (E).
Based on the Error and PID
controllers tuning constants,
controller takes an appropriate
action that opens the control
valve to the right position for
keeping the temperature at the
set point.
If the temperature rise above its
set point, controller will reduce
the valve position and vice versa.
PID CONTROLLER BASICS
Not optimal, based on good properties of Three modes.
In a PID loop, the correction that's added is calculated from the
error in three ways
1. To cancel out the present error (proportional mode)
2. Average out past errors (Integral mode)
3. Anticipate the future a bit from the slope of the error(s)
over time (Derivative mode).
PID Equation
In PID control algorithm equation each of the three parts
of the equation are given a K constant.
However, PID controllers having the Integral and
Derivative constants are represented as

Ti and Td constants are referred to as the time value.


Ti is defined as the time required by the integral term to
generate an output equivalent to the proportional term.
Td is defined as the time required by the proportional term
to repeat the output provided by the derivative term.
With these substitutions, our equation now becomes:

In this equation, you can see that the proportional term


(Kp), has an amplifying effect on the entire algorithm.
PID Control----Terms
Proportional: To handle the present, the error is multiplied by a
negative constant P and added to the controlled quantity.
Note: When error is zero, proportional controller's output is zero.
Integral: To handle the past, error is integrated (added up) over a
time period, multiplied by a negative constant I and added to the
controlled quantity. I finds the process output's average error from
the setpoint.
A simple proportional system oscillates around the setpoint,
because there's nothing to remove the error.
By adding a negative proportion of the average error from the
process input, average difference between the process output
and the setpoint is reduced and the process output will settle at
the setpoint.
Derivative: To handle the future, the first derivative (slope) of the
error is calculated, multiplied by negative constant D, and added to
the controlled quantity.
The larger this derivative term, more rapidly the controller
responds to changes in the process output.
The D term dampens a controller's response to short term
changes.
PID PROCESS CONTROLLER
PID CONTROLLER: CLOSED-
LOOP MODEL
PID Control Algorithms
Controller manufacturers arrange the
Proportional, Integral and Derivative modes into
three different controller algorithms or controller
structures.
These are called Series, Ideal and Parallel
algorithms.
Some controller manufacturers allow you to
choose between different controller algorithms
as a configuration option in the controller
software.
Interactive Algorithm
This very popular controller algorithm is called as Series, Classical,
Real or Interactive algorithm.
The pneumatic and electronic controllers had this algorithm and it
is still found it in many controllers today.
The Ziegler-Nicholstuning rules are based on this controller
algorithm.
Noninteractive Algorithm
Noninteractive algorithm is also called the Ideal, Standard algorithm.
In this standard form, inner summation produces a new single error value
which is compensated for future and past errors.
Addition of proportional and derivative terms predicts the error value at Td
seconds in future.
Integral component adjusts the error value to compensate for the sum of all
past errors in Ti seconds .
The resulting compensated single error value is scaled by the single gain Kc.
The Cohen-Coon PID tuning rules were designed for this algorithm.
Parallel Algorithm
This parallel form, parameters are treated as simple gains,
This algorithm is simple to understand, but not perceptive to tune.
Reason is that it has no controller gain (affecting all three control
modes), it has a proportional gain instead (affecting only the
proportional mode).
Adjusting the proportional gain should be supplemented by adjusting
the integral and derivative settings at the same time.
PID algorithm Pseudocode
A software loop that implements the PID algorithm in its
'ideal, parallel' form:
previous_error = setpoint - actual_position
integral = 0
start:
error = setpoint - actual_position
integral = integral + (error*dt)
derivative = (error - previous_error)/dt
output = (Kp*error) + (Ki*integral) + (Kd*derivative)
previous_error = error
wait(dt)
goto start
PID Control Modes
Mode Function Application
Combination
Proportional (P) To provide GAIN For small set
points or small
load changes
Proportional To eliminate For large and slow
plus-Integral OFFSETs set points or load
(PI) changes
Proportional To speed up the For sudden set
plus-Derivative response and points or quick
(PD) minimize the load changes in a
OVERSHOOT slow response
system
Proportional To speed up the For large and
Integral- response, minimize sudden set points
Derivative (PID) the OVERSHOOT or load changes in
General rules of Design PID
Controller
Use P, if system has small time constant, small
disturbance and allow steady state error (off sets).
Use PI, if system has small time constant, small
disturbance and requires no steady state error.
Use PD function, if system has large time constant and
time delay (speed up process response).
Using PD if the system allows steady state error, then use
PID
Use more advanced control scheme, if system has large
time constant, large time delay and disturbance.
Proportional Control Mode

correction proportional to
error
Proportional-only Controller
Proportional controllers are simple to understand and easy to
tune.
The controller output is simply the output of the proportional
control mode, plus a bias.
The bias is needed so that the controller can maintain an output
(say at 50%) while there is no error (set point = process variable).

A proportional-only controller algorithm


Proportional Bias

The controller output u is proportional to error si


1 is proportional band
u Kce e

P control has steady state
Proportional Action
In Proportional mode, controller simply multiplies the Error by
the Proportional Gain (Kp) to get the controller output.
Small proportional gain (Kp) is the safest way to get to
setpoint, but your controller performance will be slow.
If the Kp is increased, Overshoot in the signal will be present.
Proportional action is useful for improving the response of a
stable system but cannot control an unstable system by itself.
Additionally, the gain is the same for all frequencies leaving the
system with a non-zero steady-state error.
Proportional Action Only
Proportional control mode is
the main driving force of
controller.
It changes the controller
output in proportion to the
error.
If the error gets bigger, the
control action gets bigger,
more control action is needed
to correct large errors.
Adjustable setting for
proportional control is called
Controller Gain (Kc).
If the controller gain is set too
high the control loop will begin
oscillating and become
unstable.
If the controller gain is set too
low, it will not respond
adequately to disturbances or
set point changes.
Role of proportional Controller
The main purpose of the
proportional control is minimize the
fluctuations that occur within the
system.
A proportional constant or value as
entered into the controller will
determine how large the
"proportional band" is.
When process parameter is inside
the proportional band, controller
output will vary the amount of
change required to reduce
overshoot of the SP.
Proportional controller will also
experience "droop".
when the process and set point
values are equal, the process
will generally stabilize
somewhere below the set point.
The amount of droop increases
with larger proportional bands.
Proportional Band and Gain
Proportional Band: the input change required
to change the output 100%
Proportional Band
While most controllers use
controller gain (Kc) as the
proportional setting, some
controllers use
Proportional Band (PB),
which is expressed in
percent.
Table 1 shows the
relationship between Kc
and PB.

Table 1. Relationship
between Kc and PB
Response Versus PB, Proportional
Control Only
Proportional Gains
Consider an example of a
Proportional controller with
different Proportional Gains.
As the gain is increased the
system time response is faster
, but system starts to
oscillates.
Comments: Clearly, it is not
possible to achieve low steady
state error and good transient
response using only
proportional control.
As the gain is increased, the
response becomes faster, but
it has a lower phase margin.
To remove the steady-state
error and have better
response, integral and/or
derivative terms must be
included in the controller.
Proportional Control-
The Limitations
P-controller usually has steady-state errors unless the
control gain is large.
As the control gain becomes larger, issues arise with the
stability of the feedback loop.
For instance, reducing the rise time implies a high proportional
gain, and reducing overshoot and oscillations implies a small
proportional gain. This is not possible to achieve in all systems.

process output of
proportional control
Proportional control------Solution
The way to eliminate these
steady-state errors is by
adding an integral action.
The integral term in the
equation drives the error to
zero.
Higher Integral constant (1 /
Tt) drives the error to zero
sooner but also invites Response shows the reduction of
overshoots and oscillations
oscillations and instability.
compared to the picture before
Watch out a sample process adding the integral action.
output diagram when
integral control is added.
Proportional-only Controller

Dilemma
The use of proportional control alone
has a large drawback of offset.
Offset is a sustained error that
cannot be eliminated by proportional
control alone.
For example: lets consider controlling
the water level in the tank with a
proportional-only controller.
As long as the flow out of the tank
remains constant, the level will
remain at its set point.
But, if the operator should increase
the flow out of the tank, the tank
level will begin to decrease due to
the imbalance between inflow and
outflow.
While the tank level decreases, the
error increases and our proportional
controller increases the controller
output proportional to this error. Level control, with operator causing
a disturbance
Proportional-only Controller
Dilemma
Consequently, the valve controlling the flow into
the tank opens wider and more water flows into
the tank.
As the level continues to decrease, the valve
continues to open until it gets to a point where
the inflow again matches the outflow.
At this point the tank level (and error) will remain
constant. Because the error remains constant our
P-controller will keep its output constant and the
control valve will hold its position.
The system now remains at balance, but the tank
level remains below its set point. This residual
sustained error is called Offset.

S-ar putea să vă placă și