Top Banner
By: Engr. Irfan Ahmed Halepoto Assistant Professor LECTURE#10 PID CONTROLLER AUTOMATION & ROBOTICS
31

By: Engr. Irfan Ahmed Halepoto Assistant Professor

Jan 07, 2016

Download

Documents

rafer

AUTOMATION & ROBOTICS. LECTURE#10 PID CONTROLLER. By: Engr. Irfan Ahmed Halepoto Assistant Professor. PID Controller Theme---Background. 80% of industrial control applications are installed by feedback control loop and devices. - PowerPoint PPT Presentation
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: By: Engr. Irfan Ahmed Halepoto Assistant Professor

By: Engr. Irfan Ahmed HalepotoAssistant Professor

LECTURE#10PID CONTROLLER

AUTOMATION & ROBOTICS

Page 2: By: Engr. Irfan Ahmed Halepoto Assistant Professor

PID Controller Theme---Background • 80% 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.

Page 3: By: Engr. Irfan Ahmed Halepoto Assistant Professor

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).

Page 4: By: Engr. Irfan Ahmed Halepoto Assistant Professor

Life before PID controller –Manual Control• With manual, all regulation tasks

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 bit–just enough to bring the temperature back to the desired value.

• If the water becomes too cold, he has to open the gas valve.

Page 5: By: Engr. Irfan Ahmed Halepoto Assistant Professor

Life with PID Controller• Through PID controller Set Point

feature, operator can set the desired temperature ranges.

• The Controller’s 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 controller’s 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.

Page 6: By: Engr. Irfan Ahmed Halepoto Assistant Professor

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).

Page 7: By: Engr. Irfan Ahmed Halepoto Assistant Professor

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.

Page 8: By: Engr. Irfan Ahmed Halepoto Assistant Professor

• 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 Control----Terms

Page 9: By: Engr. Irfan Ahmed Halepoto Assistant Professor

PID PROCESS CONTROLLER

Page 10: By: Engr. Irfan Ahmed Halepoto Assistant Professor

PID CONTROLLER: CLOSED-LOOP MODEL

Page 11: By: Engr. Irfan Ahmed Halepoto Assistant Professor

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.

Page 12: By: Engr. Irfan Ahmed Halepoto Assistant Professor

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-Nichols tuning rules are based on this controller algorithm.

Page 13: By: Engr. Irfan Ahmed Halepoto Assistant Professor

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.

Page 14: By: Engr. Irfan Ahmed Halepoto Assistant Professor

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.

Page 15: By: Engr. Irfan Ahmed Halepoto Assistant Professor

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

Page 16: By: Engr. Irfan Ahmed Halepoto Assistant Professor

PID Control ModesMode Combination Function Application

Proportional (P) To provide GAIN For small set points or small load changes

Proportional–plus-Integral (PI)

To eliminate OFFSETs For large and slow set points or load changes

Proportional –plus-Derivative (PD)

To speed up the response and minimize the OVERSHOOT

For sudden set points or quick load changes in a slow response system

Proportional –Integral-Derivative (PID)

To speed up the response, minimize the OVERSHOOT and eliminate OFFSETs

For large and sudden set points or load changes in a slow response system

Page 17: By: Engr. Irfan Ahmed Halepoto Assistant Professor

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.

Page 18: By: Engr. Irfan Ahmed Halepoto Assistant Professor

Proportional Control Mode

“correction proportional to error”

Page 19: By: Engr. Irfan Ahmed Halepoto Assistant Professor

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

Page 20: By: Engr. Irfan Ahmed Halepoto Assistant Professor

Proportional Bias

The controller output u is proportional to error signal e:

eeKu c 1

is proportional band

P control has steady state error

Page 21: By: Engr. Irfan Ahmed Halepoto Assistant Professor

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.

Page 22: By: Engr. Irfan Ahmed Halepoto Assistant Professor

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.

Page 23: By: Engr. Irfan Ahmed Halepoto Assistant Professor

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.

Page 24: By: Engr. Irfan Ahmed Halepoto Assistant Professor

Proportional Band and Gain• Proportional Band: the input change required to change

the output 100%

Page 25: By: Engr. Irfan Ahmed Halepoto Assistant Professor

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

Page 26: By: Engr. Irfan Ahmed Halepoto Assistant Professor

Response Versus PB, Proportional Control Only

Page 27: By: Engr. Irfan Ahmed Halepoto Assistant Professor

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.

Page 28: By: Engr. Irfan Ahmed Halepoto Assistant Professor

Proportional Control- Limitations• The 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

Page 29: By: Engr. Irfan Ahmed Halepoto Assistant Professor

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 oscillations and instability.

• Watch out a sample process output diagram when integral control is added.

Response shows the reduction of overshoots and oscillations compared to the picture before adding the integral action.

Page 30: By: Engr. Irfan Ahmed Halepoto Assistant Professor

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: let’s 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

Page 31: By: Engr. Irfan Ahmed Halepoto Assistant Professor

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.