Академический Документы
Профессиональный Документы
Культура Документы
BITS Pilani
Pilani Campus
Swapna Kulkarni
Hard-wired Programming
The event sequence required and described by the
ladder program will be provided by the relay system
when power is applied.
Thus, the program has been wired into the relays that
make up the relay logic panel.
If the event sequence is to be changed, it is necessary
to rewire all or part of the panel. It may even be
necessary to ass more relays to the system or to use
more relays than in the previous program.
Such a task is quite troublesome and time consuming.
Hard-wired Programming
A number of ingenious methods are used to ease some
of the problems of changing the relay program. One is
the use of patch panels for the programming.
In these systems, all relay contacts and oils are brought
to an array of sockets.
Cords with plugs in each end are used to patch the
required coils, contacts, inputs and outputs together in
manner required by the ladder diagram.
The patch panel acts like a memory in which the
program is placed.
With the development of reliable computers, it was an
easy decision to replace relay logic-based systems with
computer-controlled systems.
BITS Pilani, Pilani Campus
Curtis Johnson
Process Control Instrumentation Technology, 8e]
Processor
The processor is a computer that executes a program to perform
the operations specified in a ladder diagram or a set of Boolean
equations.
The processor performs arithmetic and logic operations on input
variable data and determines the proper state of the o/p variables.
The processor functions under a permanent supervisory operating
systems that directs the overall operations from data input and
output to execution of user programs.
The processor, being a computer, can perform only one operation at
a time.
Like most computers, it is a serial machine.
Thus, it must sequentially sample each of the inputs, evaluate the
ladder diagram program, provide each o/p, and then repeat the
whole process. The speed of the processor is important.
BITS Pilani, Pilani Campus
Processor
The heart of a PLC is microprocessor, much like
the ones used in modern personal computers.
Because much of the data in PLC operation is
processed bit by bit, special microprocessors
optimized for such operation, such as the AMD
2901 and 2903, are often employed.
With the great increases in processor speed, it is
now possible to employ a desktop personal
computer with data I/O boards running PLC
software to emulate PLC operation.
BITS Pilani, Pilani Campus
Input Modules
The input modules examine the state of
FIGURE 8.26 Typical wiring to a
physical switches and other input devices
PLC input module.
and put their state into a form suitable
for the processor. The PLC is able to
accommodate a number of inputs, called
channels.
Early versions of solid-state PLCs
continued the familiar association by
having an input module which was
connected to input devices through ac
line, as shown in fig.
If a switch PB1 was closed, the ac voltage
was impressed on the input module that
would internally provide a conversion to
a digital signal (1 or 0) as required by the
Copyright 2006 by Pearson Education, Inc.
computer-based PLC processing unit.
Upper Saddle River, New Jersey 07458
All rights reserved.
Input Modules
Modern PLCs and the input sensors to which they
are connected are much more versatile.
The input module can usually be configured so
that the input device is simply connected with no
reference power.
Regardless of how the process input devices are
connected to the input module, the result is that
the state of each device is presented to the PLC
processor for evaluation by the ladder diagram.
BITS Pilani, Pilani Campus
Output Module
The objective of the o/p module is ultimately to supply
power to an external device such as a motor, solenoid, and
so on, as required by the ladder diagram.
Early relay-logic sequencers were able to provide 120 vac
directly to devices as long as the power requirement was
not too great.
When solid-state PLCs were introduced this was no longer
possible.
The output of PLC was now a high (a) or Low(0) signal of
low power dc.
Thus, the modern output module is designed to input the
processor digital o/p and use this to activate relays, SCRs,
TRIACs, BJTs, and other solid-state switches that can handle
the high-power ac requirements.
BITS Pilani, Pilani Campus
Output Module
In this case the PLC o/p module can be
wired directly to the o/p device and the
ac power source, as shown in fig.
This shows how the channels of the o/p
module are connected between the ac
power and common.
If the device, such as motor in fig.
requires a current that exceeds the
module output capability, then external
relays or solid-state switches can be
used.
Modern o/p modules can now provide
many other kinds of o/ps such as dc
voltages, pulse outputs, and even serial
digital o/ps that can be transmitted to
the o/p device over a network.
PLC Operation
The operation is not simultaneous for the
entire ladder diagram and is not continuous as
it is for relay sequencers.
This is very important and can have significant
impact if not taken into consideration in a
design.
Operation of the programmable controller can
be considered in two modes: I/O scan mode
and the execution mode.
BITS Pilani, Pilani Campus
Execution Mode
During this mode, the processor evaluates each rung of the
ladder diagram program that is being executed sequentially,
starting from the first rung and proceeding to the last rung.
As a rung is evaluated, the last known of each switch and relay
contact in the rung is considered, and if any TRUE path to
output device is detected, then that output is indicated, then
that output is indicated to be energized-i.e set to ON.
At the end of the ladder diagram, the I/O mode is entered
again, and all output devices are provided with the ON or OFF
state determined from execution of the ladder diagram
program.
All inputs are sampled, and the execution mode starts again.
BITS Pilani, Pilani Campus
Scan Time
An important characteristic of the programmable
controller is how much time is required for one
complete cycle of I/O scan and execution.
This depends on how many i/p and o/p channels
are involved and on the length of the ladder
diagram. A typical max. scan/execution time is 5
to 20 ms.
The speed of the controller depends on the clock
frequency of the processor.
The higher the clock frequency, the greater the
speed, and the faster the scan/execution time.
BITS Pilani, Pilani Campus
Scan Time
The length of time for one scan consists of three
parts: 1) input time 2)execution time and
3)Output time.
Most of the scan time comes from the execution
phase.
The scan time may have an impact on the ability
of the PLC to detect events that occur on the
inputs.
Ex. If some limit switch goes to the On state for
less than a scan time, it may be missed by the
PLC.
BITS Pilani, Pilani Campus
Example
Ex. A complex
manufacturing operation
results in a 30 ms PLC
scan time. The PLC must
detect individual 2 cm
objects moving on a high
speed conveyor. Fig. a
shows that the object
breaks a light beam, and
this provides a high input
to the PLC. What is the
highest speed of the
conveyor to be sure the
object is detected?
Solution
Programming Unit
It is an external electronic package that is
connected to the programmable controller
when programming occurs.
The unit usually allows input of a program in
ladder diagram symbols.
The unit then transmits that program into the
memory of the programmable controller.
Programming Unit
It may be small, self contained units,
such as shown in fig. 8.29.
In this unit, the ladder diagram is
displayed one rung at a time in a
special liquid crystal display(LCD).
The user can enter a program, perform
diagnostic tests, run the program
through the programmable controller,
and perform editing of the installed
program.
The installed program is stored in a
temporary memory that will be lost
without ac power or backup.
The program can be permanently
burned into a ROM for final
installation.
Programming Unit
Another type of programming unit is
able to display many rungs of the
ladder diagram. Such a unit is shown
in fig. 8.30.
The program is still in temporary
memory.
Once the program has been
debugged, the programming unit is
disconnected, and the programmable
controller can now operate the
process according to the ladder
program.
There is the danger of loss of program
because of power failure, but this can
be prevented by placing the program
into the permanent memory.
Programming Unit
The dedicated PLC programming unit can be
replaced by software and I/O boards on
common desktop or laptop personal
computers.
Special software allows the pc to program the
PLC and then download the program into the
PLC unit.
PLC Networks
Modern plants employ computer network technology to
link PLCs and other control hardware via network
communications systems.
These systems may use custom installations of Ethernettype local area networks (LANs) or dedicated control
networks such as Foundation Fieldbus or Profibus.
In any case, it is often possible to download PLC
programming from a development computer to the PLC
in which it will be used.
The network can also be used to edit an existing PLC
program and to transfer process data to a network
computer to analyze plant operation.
BITS Pilani, Pilani Campus
RAM/ROM
The temporary memory used during ladder diagram program
testing and evaluation is called RAM, for read and write memory.
Program in RAM can be easily modified.
When a program has been debugged and is considered finished, it
may be burned into a ROM.
ROM is read only memory and cannot be changed and is not
affected by power failure.
Rom can be programmed directly by the controller programming
unit. When the ROM is plugged into the programmable controller,
the device is ready to be placed into service in the industrial setting.
In the case of network programmable PLCs, the final PLC program is
downloaded into special re-programmable ROM in the PLC can be
erased and rewritten but that still its retains contents after powerdown.
BITS Pilani, Pilani Campus
Programming
Although the programmable controller can be
programmed directly in ladder diagram symbols
through the programming unit, there are some special
considerations.
These considerations include the availability of special
functions and the relation between external I/O
devices and their programmed representations.
The programmable controller has no real relays or
relay contacts.
The only real devices are those that are actually part of
the process being controlled-i.e. limit switches, motors,
solenoids and so on.
BITS Pilani, Pilani Campus
Addressing
In the ladder diagram, each switch device, output device, and relay
was referred to by a label.
Ex. CR1 referred to control relay 1
The programmable controller uses a similar method of identifying
devices, but it is referred to as the device address or channel.
The addresses are used to identify both physical and software
devices according to the following categories:
1. Physical input devices-ON or OFF
2. Physical output devices-energized (ON) or de-energized (OFF)
3. Programmed control relay coils and contacts
4. Programmed time-delay relay coils and contacts
5. Programmed counters and contacts
6. Special functions
BITS Pilani, Pilani Campus
Addressing
The address designation depends on the type
of programmable controller.
Some controllers may reserve certain
addresses for physical I/O devices, other
addresses for software control relays, and yet
others for special functions.
Table 8.1 PLC addressing
Function
Address
Input channels
00 to 07
Output Channels
08 to 15
Internal relays
16 to 31
32 to 39
BITS Pilani, Pilani Campus
In a programmed diagram,
Contact
NO
NC
Open
FALSE
TRUE
Closed
TRUE
FALSE
FIGURE 8.31 Using an NC switch to turn on a light with relay logic and with PLC
programming: (a) Wrong, the button turns the light OFF; (b) with relay logic, the
button turns the light ON;
FIGURE 8.31 Using an NC switch to turn on a light with relay logic and with
PLC programming: (c) with a PLC program, the button turns the light ON.
Control Relay
The software control relay is denoted by a
circle with an identification number.
It can have any number of NO or NC contacts,
which are identified by the same number as
the relay.
Counter
A counter is programmed function that
FIGURE 8.35 The basic
counts(increment) every time the input
PLC counter.
changes from False to True.
If in one scan the input is False and in the
next scan the input is True, the counter
increments.
No further counts will occur until the input
goes False again and then True.
There are two input lines, one for the count
input and another to reset the counter.
The counter has an address and a preset
number of counts.
When the preset number of counts have
been accumulated, the counter becomes
True and can activate some other part of
Copyright 2006 by Pearson Education, Inc.
Upper Saddle River, New Jersey 07458
All rights reserved.
the ladder diagram.
BITS Pilani, Pilani Campus
Counter
There are also counters that start with some
preset value and count down to zero, at which
time the counter becomes true.
Different PLC manufacturers have their individual
ways of addressing and describing the counter
function.
Some treat the counter as a device with a logic
output, in which case the counter output will be a
True or False and fed to some output device.
Some PLCs also provide a counter that can count
either up or down depending upon the state of
an input.
BITS Pilani, Pilani Campus
Timers
The programmed timer function plays an important
role in PLC applications to provide for needed delays in
some manufacturing sequence and to specify the
period of time that some operation is to last.
While activated by a true path, the timer begins to
accumulate time in front of ticks.
Each tick is worth a certain amount of time. The timer
is pre-loaded with a specified number of these ticks.
When the accumulated time ticks equal the pre-load
value, the timer itself becomes true.
Simpler Timer
The timer will have an address and FIGURE 8.37 PLC timer
functions: (a) simple timer
the preset number of ticks to count.
The amount of time per tick is a
function of the type of PLC being
used.
Typical values are 10 ms and 100
ms.
The timer only counts while it has a
true input.
If the input becomes False and then
True again, the timer will reset to
zero and start to count again.
Copyright 2006 by Pearson Education, Inc.
Upper Saddle River, New Jersey 07458
All rights reserved.
Accumulating Timer
This will retain a tick count
when its output goes false.
When the input goes true
again, the tick count will
pick up where the previous
one left off.
It is necessary to have a
reset input to this timer so
that, when desired, the
timer can reset back to zero.
Special Functions
The one shot is an o/p that will go true for
only one scan when its input path is true. This
device is used for initialization and other
instances when an event is to occur only once,
even though the conditions that make it True
may occur again.
A shift-register is used to remember a certain
number of previous states of a rung. A four
event shift register could be used to
remember the state of a rung for the latest
four scans.
BITS Pilani, Pilani Campus
Special Functions
Modern PLCs are able to handle multi-digit
numbers as well as single-bit, binary numbers.
Thus, it is possible for a PLC to accept input from
an 8-bit ADC and store the result in a known
memory location or register.
These PLCs have the ability to perform a variety of
math operations on this data from simple +,-,* and
/ , to an exponential and trigonometric operations.
In this way, a PLC can be made to process
continuous plant data such as a PID control.
BITS Pilani, Pilani Campus
Summary
1.
2.
3.
4.
5.
6.
Controller Principles
BITS Pilani
Pilani Campus
Swapna Kulkarni
CONTENTS
Introduction
Objectives
Process Characteristics
Control System Parameters
Discontinuous Controller Modes
Continuous Controller Modes
Composite Controller Modes
INTRODUCTION
We study the nature of controller action for
systems with operations variables that range
over continuous values.
Using measurements the controllers solve the
certain equations to calculate the proper output.
The equations necessary to obtain the control are
independent of both process and controller
function.
OBJECTIVES
Define understand the process characteristics
process system parameters
Describe the discontinuous and continuous
controller modes
Describe the composite controller modes
Compare and differentiate discontinuous and
continuous controller modes and their
advantages
applications.
BITS Pilani, Pilani Campus
PROCESS CHARACTERISTICS
Selection of controller modes is a function of
process characteristics.
Important Process Characteristics
Process Equation
Process Load
Process Lag
Self Regulation
FIGURE 9.1
Curtis Johnson
Process Control Instrumentation Technology, 8e]
Process Equation
The process equation is a function which
describes the process and provides the
information about other process parameters
which
influence the controlled variable.
For liquid temperature control the process
equation is
TL f (QA QB QS TA TS TO)
BITS Pilani, Pilani Campus
Process Load
The process load refers to set of all process
parameters excluding the controlled variable.
Nominal Set: It is possible to identify a set of values for the
process parameters that results in the controlled variable
having the setpoint value. This set of parameters is called as
nominal set.
Process Load: It refers to this set of all parameters, excluding
the controlled variable.
Nominal Load: When all parameters have their nominal
values, we speak of the nominal load on the system.
Nominal value: The required controlling variable value under
these conditions is the nominal value of that parameter.
BITS Pilani, Pilani Campus
Process Load
The controlling variable is adjusted to
compensate for this load change and its effect
on the dynamic variable to bring it back to
setpoint.
Transient
Another type of change involves a temporary
variation of one of the load parameters.
After the excursion, the parameter returns to its
nominal value. This variation is called a transient.
A transient causes variations of the controlled
variable, and the control system must take
equally transient changes of the controlling
variable to keep error to a minimum.
A transient is not a load change because it is not
permanent.
BITS Pilani, Pilani Campus
Process Lag
Process lag refers to the time consumed by the process itself to
bring the controlled variable to setpoint value during load
change.
Example: If the inlet flow is suddenly doubled in fig. 9.1, a large
process-load change radically changes the TL.
The control loop responds by opening the control valve to allow
more stem and het input to bring the liquid temp. back to
setpoint. The loop itself reacts faster than the process.
In fact, the physical opening of the control valve is slowest part
of the loop.
Once steam is flowing at the new rate, however, the body of
liquid must be heated by the steam before the setpoint value is
reached again. This time delay or process lag in heating is a
function of the process, not the control system.
BITS Pilani, Pilani Campus
Self Regulation
Some processes adopt to stable value without
being regulated via process control loop.
In fig. 9.1,(1) suppose we fix the steam valve at 50% and
open the control loop so that no changes in valve position
are possible.
(2) The liquid heats up until the energy carried away by the
liquid equals that input energy from the steam flow.
(3) If the load changes, new temp. is adopted (because the
system temp. is not controlled).
(4) The process is self-regulating, however, because the
temp. will not run away, but stabilizes at some value
under given conditions.
BITS Pilani, Pilani Campus
Error
Variable Range
Control Parameter Range
Control Lag
Dead Time
Cycling
Controller Modes
Error
The deviation of controlled variable from the
setpoint is called error.
The error is given by the following equation
e =r - b
Where e= error
b= measured value of variable
r= setpoint of variable (desired)
Error
Example : If the setpoint in a 4-20 mA range
corresponds to 7.5 mA and the measured value is
10.0 mA then the error is -2.5 mA.
This current error has little direct meaning
unless it is related the controlled variable.
It is necessary to work back and prove that this
error corresponds to some variable value (flow
level temp etc).
Error
To describe controller operation in a general way,
it is better to express the error as percent of the
measured variable range (i.e., the span).
The measured value of a variable can be
expressed as percent of span over a range of
measurement by the equation
cp=(c-cmin)/( cmax- cmin)*100
where cp=measured value as percent of
measurement range
c= actual measured value
cmax= maximum of measured value
cmax= minimum of measured value
BITS Pilani, Pilani Campus
Error
It is always better to express the error in
percent of span. The equation is given by
ep= (r-b)/(bmax-bmin)*100
where ep= error as percent span
bmax =max. value of measured variable
bmin =min. value of measured variable
Problem
A velocity control system has a range of 220 to
460 mm/s. If the setpoint is 327 mm/s and the
measured value is 294 mm/s calculate the
error as of span.
Solution:
ep= (r-b) / (bmax- bmin) x 100
ep =(327 -294)/ (460-220) x 100
ep =13.75%
BITS Pilani, Pilani Campus
Variable range
The variable range can be expressed as the
minimum and maximum value of the variable
or the nominal value the deviation spread
about the nominal value.
Ex. Temperature range is 300-400 K
Problem
A controlling variable is a motor speed
that varies from 800-1750 rpm. If the speed is
controlled by a 25 to 50 v dc signal calculate
(a) the speed produced by an input of 38 v
and
(b) the speed calculated as a percent of
span.
Solution
The linear relationship between
speed and voltage is given by the basic
equation S =mVin+ c
The two simultaneous equations are
800 =25 m +c
1750= 50 m+c
Solving the above equations we get
m =38 and c =150
Control Lag
Control lag refers to the time for the process
control loop to make necessary adjustments
to the final control element.
The control system also has a lag associated
with its operation that must be compared
with process lag for appropriate control
action.
Example Actuating the steam control valve
BITS Pilani, Pilani Campus
Dead Time
Dead time is the elapsed time between the
instant a deviation (error) occurs and the
corrective action first occurs.
This time is a function of both process and
process control system.
Example: The control of chemical reaction by
varying reactant flow through a long pipe
Cycling
Cycling is defined as the oscillations of the
error about zero value or nominal value.
This means that the variable will be cycling
above and below the setpoint value.
Two types of cycling
1) Steady state cycling
2) Transient cycling or error
Transient Cycling
Transient cycling is one in which oscillations
will decay to zero after some time.
In such conditions initial error and period of
cyclic oscillations are important in
understanding the nature of process variable.
Controller Mode
Controller modes refer to the methods to
generate different types of control signals to final
control element to control the process variable.
Classification of Controller modes
(1) Discontinuous Controller Modes
Two-position (ON/OFF) Mode
Multiposition Mode
Floating Control Mode Single Multiple Speed
BITS Pilani, Pilani Campus
Controller Mode
(2) Continuous Controller Modes
Proportional Control Mode
Integral Control Mode
Derivative Control Mode
(3) Composite Controller Modes
Proportional-Integral Control (PI Mode)
Proportional-Derivative Control (PD Mode)
Proportional-Integral-Derivative Control (PID or
Three Mode Control)
Controller Mode
Based on the controller action on the control
element there are two modes
1) Direct Action: If the controller output increases with
increase in controlled variable then it is called direct
action.
Ex.: A level control system that outputs a signal to an
output valve. If the level rises, the valve should be
opened(i.e. its drive signal should be increased)
2) Reverse Action: If the controller output
decreases with increase in controlled variable then it is
called reverse action
Ex.: A simple temp. control from a heater. If the temp.
increases, the drive to the heater should be decreased.
BITS Pilani, Pilani Campus
Neutral Zone
In virtually any practical
implementation of the twoposition controller, there is an
overlap as ep increases through
zero or decreases through zero.
In this span, no change in
controller output occurs.
In fig., the range 2ep which is
referred as neutral zone or
differential gap, is often purposely
designed above certain minimum
quantity to prevent excessive
cycling. The existence of such a
neutral zone is an example of
desirable hysteresis in a system.
Applications
Generally, the two-position control mode is best
adapted to large-scale systems with relatively slow
process rates.
Ex. A room heating, air conditioned system, liquid-bath
temp. control and level control in large-volume tanks,
etc.
The process under two-position control must allow
continued oscillation in the controlled variable
because, by its nature, this mode of control always
produce such oscillation.
For large systems, these oscillations re of long duration,
which is partly a function of the neutral-zone size.
BITS Pilani, Pilani Campus
Multiposition Mode
This mode is used in attempt to reduce the
cycling behavior and overshoot and undershoot
inherent in the two-position mode.
p=pi
ep>ei i=1,2,3,.,n
As the error exceeds certain set limits ep, the
controller output is adjusted to preset values, pi.
The most common example is the three-position
controller where
p= 100
ep>e2
=50
-e1 <ep <e2
=0
ep<-e1
BITS Pilani, Pilani Campus
Single Speed
In the single speed floating control mode, the
output of the control element changes at a fixed
rate when the error exceeds the neutral zone.
dp
KF
ep ep
dt
dp
Where dt =rate of change of controller output
with time
K F =rate constant (%/s)
e p =half the neutral zone
ep ep
p= K F t+p(0)
where p(0)=controller output at t=0
BITS Pilani, Pilani Campus
Single Speed
Present output depends on the time history of
errors that have previously occurred.
The actual value of p floats at an
undetermined value.
Multiple Speed
In the floating point multiple speed mode, not
one but several possible speeds are changed
by the controller output.
Usually the rate increases as the deviation
exceeds certain limits.
If we have certain speed change points, epi,
depending on the error, then each has its
corresponding output rate change, Ki.
dp
K Fi
dt
e p e pi
Applications
Primary applications of the floating point control
mode are for the single speed controllers with a
neutral zone.
This mode has an inherent cycle nature much like
the two-position, although this cycle can be
minimized, depending on the application.
The method is well suited to self-regulation
processes with very small lag or dead time, which
implies small capacity processes.
When used with large capacity systems, the
inevitable cycling must be considered.
BITS Pilani, Pilani Campus