Instrumentation and PID control
An assembly machine works with yes-or-no signals: the part is there or it is not. But as soon as a temperature, pressure, level or flow has to be held steady, instrumentation (measuring well) and process control (correcting automatically) come into play. This is the world of transmitters, 4–20 mA signals and PID controllers, and it is where most time is lost during commissioning if it is not understood.
Sensor, transmitter and instrument
The sensor is what feels the quantity: a diaphragm that flexes with pressure, a resistor that changes with temperature. The transmitter converts that measurement into a standard signal the PLC understands, usually 4–20 mA. Many transmitters also have a display and are configured with buttons or over HART.
- 4–20 mA: the most common signal. 4 mA is 0 % and 20 mA is 100 %; 0 mA means a fault. The guide what is 4–20 mA explains it.
- HART: a digital signal carried on top of the 4–20 mA without disturbing it. It is used to configure the transmitter and read diagnostics over the same pair of wires.
- 0–10 V: simple, but sensitive to cable length and noise. Used over short distances.
- Fieldbuses and IO-Link: the value arrives already digital, with more information (units, alarms, status).
What is measured
- Temperature with a Pt100 RTD: a platinum resistor of 100 Ω at 0 °C that rises by about 0.385 Ω per degree. It is connected with 2, 3 or 4 wires: 3-wire compensates for the cable resistance; with 2 wires the cable adds error.
- Temperature with a thermocouple: two different metals joined together generate a very small voltage (a type K gives about 41 µV per degree). It withstands very high temperatures, but needs extension cable and cold junction compensation.
- Pressure: gauge (relative to atmosphere, what ordinary gauges show) or absolute (relative to vacuum). Not mixing them up is half the job.
- Level: from the pressure at the bottom of the tank (1 m of water is about 98 mbar, or about 1.42 psi), by ultrasound, by radar or with level switches for alarms.
- Flow: magnetic flowmeters for conductive liquids, Coriolis when mass matters, vortex for steam and gases.
Tags on P&IDs
On process diagrams every instrument has a tag following ISA-5.1. The first letter is the measured variable and the following ones, the function:
| Tag | What it is |
|---|---|
| PT-101 | Pressure transmitter (P = pressure, T = transmitter) |
| TT-205 | Temperature transmitter |
| LSH-301 | Level switch high (L = level, S = switch, H = high) |
| FIC-102 | Flow indicating controller: a control loop |
| FV-102 | The valve of flow loop 102 |
Calibrating and checking a transmitter
A transmitter is defined by its zero (the value at 4 mA) and its span (the difference between the value at 20 mA and at 4 mA). To check it, a known value is applied (with a pressure calibrator, a temperature bath or an RTD simulator) at several points, for example 0, 25, 50, 75 and 100 %, and the current is compared with what it should be. The error is expressed as a percentage of span.
The control loop
A closed loop has four parts: the process (the oven, the tank), the transmitter that measures the process variable (PV), the controller that compares it with the setpoint (SP) and the final element (a valve, a heater, a drive) that receives the controller output (CV). The difference between setpoint and measurement is the error.
- On/off with hysteresis: the simplest control. It switches on below one value and off above another. It is enough for many things (a thermostat), but the variable always swings between the two limits.
- PID: calculates a proportional, continuous output so the variable settles at the setpoint without oscillating.
The three PID actions
- P (proportional): corrects in proportion to the error. On its own it nearly always leaves a steady-state error (offset): it needs an error to produce an output. Too much P makes the loop oscillate.
- I (integral): accumulates the error over time and removes it. Too much integral (too short an integral time) makes the loop slow to settle and oscillating.
- D (derivative): reacts to how fast the error is changing and brakes before overshooting. It helps on slow processes such as ovens, but amplifies measurement noise: it is hardly used on flow and pressure.
You can see each action separately in the PID controller simulator, with an oven and a tank.
How to tune it
- Check the controller action. On a heating loop, if the temperature drops, the output must rise (reverse action). On a cooling loop it is the other way round (direct action). With the action wrong, the controller pushes the variable in the wrong direction.
- Run an open-loop test. With the controller in manual, step the output and record how the process responds: how much it changes (gain), how long before it starts (dead time) and how long it takes to get there (time constant).
- Work out starting values with a known rule (Ziegler-Nichols, SIMC or others) or with the controller’s auto-tune, such as PID_Compact in TIA Portal and many panel controllers.
- Fine-tune in automatic, with small setpoint changes, until the response is fast with little overshoot.
In a PLC, the PID is always called at fixed intervals: in Siemens, from a cyclic interrupt (OB 30 onwards), never from the free-running OB 1 cycle, whose duration varies.
The control valve
In fluid processes, the final element is usually a control valve with a positioner that drives it to the opening requested by the 4–20 mA signal. You need to know what it does if it loses air or signal: fail closed (for example, the steam to a heat exchanger) or fail open (for example, cooling water). It is a safety decision in the process design.
Typical mistakes
- Setting the controller action the wrong way round and watching the variable run to the limit.
- Scaling a different range in the PLC from the one configured in the transmitter.
- Using derivative on a flow or pressure loop with a noisy measurement.
- Mixing up integral time in seconds and minutes, or gain and proportional band, when copying settings.
- Calling the PID from OB 1 instead of a cyclic interrupt.
- Raising the gain to "make it faster" until the loop oscillates.
Summary
- The transmitter turns the measurement into 4–20 mA; 0 mA is a fault.
- Pt100 with 3 wires to compensate the cable; gauge or absolute pressure, without mixing them up.
- ISA tags: first letter the variable, the next ones the function (PT, TT, FIC, LSH…).
- P leaves an offset, I removes it, D brakes but amplifies noise.
- Before tuning: the controller action and an open-loop test.
- The PID at fixed intervals, with anti-windup.
Test what you have learned
40 practical questions with explained answers. Free, no sign-up.
Start the test