Features of Practical PID Controllers
Features of Practical PID Controllers
Although real PID controllers use algorithms which are very similar to the
'theoretical' one I've been using up to now, there are several differences in
the way real controllers operate. The topics covered in this section are:
dimensionless gain; proportional bandwidth; integral
windup; implementation of derivative action; other practical considerations;
and the use of the StrathPID controller.
Electrical and Electronic engineers like the term 'bandwidth' and when they
made up the bulk of control engineers, the term was carried over into control
engineering. The controller bandwidth is just an alternative way of
expressing the controller gain. The bandwidth is the range over which the
error must move to move the output of a proportional controller over its full
range. Low bandwidths are therefore equivalent to high gain. If
dimensionless controller gain is being used there is a simple conversion
between gain and bandwidth:
The reason for doing this is that it is quite possible to introduce sudden
changes in the setpoint (e.g. a step), that will produce very large error
derivatives (infinite for a step). If these are used for control they will cause
the control valve to suddenly move to its limit and then back (when the
derivative becomes reasonable). This isn't particularly desirable!
Although we won't be covering these any further in the course you should be
aware that they are a consideration if you are applying a controller for real.
1. Is the input reasonable? Most controllers include some checks on the
input. The normal method for analogue communication in process
plants is a 4-20mA current loop. If the current at a controllers input is
less than 4mA, or more than 20mA, then something is seriously
wrong. In situations like this, controllers should sound an alarm and
NOT carry out a control calculation. Input checking needs to be built
into a controller by the manufacturer.
2. Does the input need to be linearised? PID controllers are linear
controllers and produce less than optimal results when applied to
significantly non-linear processes. Often a signal will be passed
through a 'linearising' element to try to improve the controlled
systems performance (e.g. the signal from an orifice plate, the
differential pressure, isn't linearly related to the flow being measured,
but is proportional to the square of the flow. If the signal is passed
through an element which takes its square root, then the controller
input will then be linearly related to the flow, and flow control should
be improved)
3. Is the measurement noisy? Noise can enter a measurement signal
from a number of sources. Process noise is random variations arising
from a variety of minor process disturbances and tends to be
relatively low frequency. Measurement noise arises during the
measurement process and tends to be a high frequency signal (flow
measurements from orifice plates are notoriously noisy and are
affected by bubbles, suspended particles, vortices, etc,etc). Electrical
noise arises from induction from nearby power cables or electric
motors. Noise from power cables is always at 50Hz, the frequency of
the AC supply (except in countries where it is 60Hz!). Electrical noise
can usually be suppressed by shielding the data cables and keeping
them away from obvious sources of interference. High frequency
noise filtered relatively easily using low-pass analogue (i.e. NOT
digital) filters. Noise which has a frequency similar to the process
dynamics is very difficult to remove. The filtering of measurement
signals is not covered in this course, but it is important!
4. Are limits and alarms required? Most controllers allow alarm limits to
be set on measurement signals. These limits trigger an alarm to warn
operators when a variable is moving out of a desirable range. Many
controllers allow several alarm limits to be set ranging from: 'I think
you should have a look at this', to 'Panic and run'! As well as absolute
output limits, many controllers allow the setting of rate of change
limits on the output. Limits on the setpoint are also often applied to
prevent operators requesting process conditions which are outside of
the normal operating range of the process.
the controller is containing in the compound block in the centre. It has three
input signals: the setpoint; the measurement; and a special anti-windup input
for cascade control loops. The controller has two outputs: the controller
output for connection to the manipulated variable; and an anti-windup
output.
3. Select the controller block and 'copy' from the VisSim 'Edit' menu. It
isn't necessary to copy the variable blocks attached to the inputs and
outputs - these are only present for documentation.
4. Connect the controller inputs and outputs to the process. Unless you
are setting-up a cascade control system you won't need either the antiwindup input or output, and you can leave them unconnected.
Everything else MUST be connected or you will get very strange
results. The measurement input needs to be connected to the
controlled variable (process output) and the controller output needs to
be connected to the manipulation (process input). The setpoint needs
to be connected to whatever you are using as a setpoint source.
Usually this will be a constant block.
5. Double click on the controller block to open the configuration level:
The bits you are interested in this diagram are those with brown labels
against them - these allow you to set-up the various controller parameters,
they are:
Controller gain. This is the dimensionless controller gain
Integral time constant: Just what it says. The dimensions of this
time constant are the same as the time dimension you used in
building your simulation model. In real controllers the time
dimensions are usually minutes. To 'switch-off' integral action
just set this time constant to a very large value (e.g. 1e+6).
Derivative time constant. Again this has the same time
dimensions as your simulation model, but in real controllers is
usually in minutes. To switch off derivative action set this to
zero.
Derivative filter constant. This is the 'alpha' factor used in
creating a realisable method of calculating the error derivative
- I would recommend that you don't touch this.
Direction of control action. Rather than switch signs on the
formation of the error, to change the direction of control action
you need to change the sign on this variable. A value of 1
produces a direct acting controller, and a value of -1 produces a
reverse acting controller. Any other values will muck up the
controller gain!
The Bias term lets you set the initial controller output. If you
leave this at zero and connect the controller to a simulation
input that should be non-zero at steady-state then you'll end up
getting a huge start-up transient when you start the simulation
as the controller tries to find the correct output. You should
always start simulations with a short period of 'steady-state'
operation prior to introducing any disturbance or setpoint
changes. If you see the outputs moving significantly during
this period it means that the simulation isn't starting at steadystate and that any results you get will be incorrect.
The output minimum and maximum values do two things: they
limit the output signal; and they scale the dimensionless gain.
You should set these limits to the limits specified in your
simulation brief.
The input minimum and maximum limits are used to scale the
dimensionless gain. You should be provided with values for
these in your simulation brief ( in a real situation you would
use the real instrument limits obtained from the instrument
engineers).