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.

Dimensionless Controller Gain

The controller gain we've been using up to now has always had dimensions of 'controller output units/controller input units'. Most (if not all) practical controllers use dimensionless gains, where the input and output signals are made dimensionless be expressing them as a percentage of their range. For example, imagine a proportional temperature controller which moves its control signal (an output to a valve) by 2mA for every 5 degC change in temperature. Assume the temperature instrument has measurement limits of -20 to 150 degC and that the controller output has limits of 4-20mA. Using the gain definition we've been using up to now, the controller gain is 2mA/5degC = 0.4 mA/degC. Using the dimensionless gain expression, the gain becomes:

eqn67.gif (2198 bytes)

 

To convert between from dimensioned to dimensionless gain you need to multiply the dimensioned gain by 'Input range'/'Output range'.

The simulation work you'll be doing from now on will use a controller which uses this dimensionless gain. All that you'll have to do is supply the input and output limits (which are problem dependant) and then controller will do the rest. The controller is described below.

Controller Proportional Bandwidth

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:

eqn68.gif (1354 bytes)

The bandwidth, or proportional band, is a rather old-fashioned way of expressing controller gain, but can still be found on even modern control systems - you need to be aware of what it means.

Controller Output Constraints and Integral Windup

The controllers we've been using up to now have had no constraints at all on their output values (other than the numerical capacity of VisSim). Real controllers obviously do, since a valve can't close any more than fully closed and can't open any more than fully open. This doesn't cause any problems for proportional and derivative actions, but does cause difficulties for integral action. The problem that integral action suffers from is called 'integral windup' or 'reset windup'.

A movie demonstrating the effect of reset windup is here and the VisSim model used in the demonstration is here.

There are a number of ways of protecting a controller from windup. The method used in the StrathPID controller is to switch off the integration whenever the output limits are exceeded, and to switch it back on when the output returns to within its range. YOU NEVER NEED TO WORRY ABOUT THE INTERNAL MECHANISM A CONTROLLER USES. Windup protection is built into controllers and is invisible to users. The only time you need to take special care about windup is when setting up cascade controllers.

Practical Implementation of Derivative Action

It isn't possible to obtain the derivative of a signal directly from an instantaneous measurement. As a result, most controllers obtain the derivative of a signal by passing it through a first-order 'filter' (a first-order differential equation):

eqn69.gif (1379 bytes)

where alpha.gif (867 bytes) = a manufacturer's adjustable 'filter constant', with a value in the range [0,1], but normally set between 0.1 and 0.2.

            tauD.gif (887 bytes) = Derivative time constant

            y  = the output of the derivative element.

This equation can be manipulated to obtain an expression which is 'physically realisable', i.e. it is possible to implement:

eqn70.gif (2774 bytes)

You saw in an earlier section how sensitive derivative action is to noise in measurements. The filter in the derivative element provides a limited amount of noise resistance, but extra filtering is usually required.

Another modification that is often made to the derivative action in practical controllers is to take the derivative of only the measurement signal, and not the error. In the absence of setpoint changes this gives exactly the same result:

eqn71.gif (1828 bytes)

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!

Other practical aspects

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.

 

Using the 'StrathPID' controller

In the remainder of the simulation work for this course you will be using a more realistic controller than the simple arrangements we've been using up to now. The controller is contained in the file 'StrathPID.vsm' which you will find in the 'StrathModels' subdirectory or click here. To use the StrathPID controller in your simulations you'll need to follow the following procedure:

  1. Open a new instance of the VisSim program (just press the Windows 'Start' button and start-up a new copy of VisSim). When you've done this you'll have two copies of VisSim running: one containing your model; and the other currently empty.
  2. Open the StrathPID file into the empty instance of VisSim. You will see the following:

StrathPID.gif (6432 bytes)

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.

  1. 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.
  2. Connect the controller inputs and outputs to the process. Unless you are setting-up a cascade control system you won't need either the anti-windup 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.
  3. Double click on the controller block to open the configuration level:

StrathPID1.gif (11816 bytes)

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: