Part 14 · Electronics and Computing
Process Controllers and Control Valves
A controller compares a measured temperature, pressure, level or flow with the value you want and moves a valve until they agree, every second, day and night. How proportional, integral and derivative action work in plain words, how to build a pneumatic controller from a nozzle and a flapper and an electronic one from a microcontroller, how control valves and their actuators are made and sized, and how to tune a loop so it holds steady without swinging.
- Difficulty
- ●●●●●
- Time
- A week to build a pneumatic controller; a few days for a microcontroller controller; a month to make a control valve and actuator; an afternoon to tune a loop
- Steps from zero
- 56 prerequisites →
This unlocks
—The full path from nothing — 56 steps before this one
- Fire
- Cordage and Rope
- Stone Tools
- Finding and Preparing Clay
- Finding and Identifying Ores
- Measurement from Scratch
- Writing and Numbers
- Hunting and Trapping
- Basic Woodworking
- Charcoal
- Pottery
- The Kiln
- Arithmetic and Fractions
- Hides and Leather
- Tiles and Clay Pipes
- Salt
- Lime
- Bricks
- Surveying and Levelling
- Fermentation
- Lye and Potash
- The Wheel and Axle
- Glass
- Firebrick and Refractories
- Bellows
- Distillation
- The Lathe
- Gears
- Copper Smelting
- Iron (the Bloomery)
- Lead
- Laboratory Glassware
- Pumps
- The Waterwheel
- Blacksmithing
- The Blast Furnace and Cast Iron
- Pipes, Plumbing and Aqueducts
- The Battery
- The Thermometer
- Steel
- The Steam Engine
- Bellows to Air Compressors
- Copper Wire
- Electrolysis
- Hydrogen, Oxygen and Gases
- Machine Tools
- Petroleum and Refining
- The Electromagnet
- Ammonia
- Measuring Electricity
- Thermostats and Automatic Control
- Ice and Refrigeration
- Liquid Air, Nitrogen and the Noble Gases
- Natural Gas and Helium
- Water and Gas Meters
- Instruments, Chart Recorders and Control Rooms
- Process Controllers and Control Valves
Do them roughly in this order. See it on the tech tree →
Why it matters
A thermostat switches a heater fully on or off. Most of a works cannot run that way: the steam to an evaporator, the chlorine dose at a waterworks, the level in a boiler drum all need a valve held part open and nudged whenever something changes. By hand, that means someone watching a gauge every minute of every shift.
A process controller does it by itself. It reads a measurement from a transmitter (Instruments, Chart Recorders and Control Rooms), compares it with the value you want, and moves a control valve until the two agree. A good one holds a temperature to a degree through changes in load, fuel and weather, and lets a handful of people run a boiler house, a waterworks, a Distillation column or an Ammonia plant. It is the flyball governor made general.
How it works
The loop
- The measurement (the process variable): a temperature, pressure, level or flow, sent as 0.2–1.0 bar of air or 4–20 mA (Instruments, Chart Recorders and Control Rooms).
- The set point: the value you want.
- The controller: works out the error (set point minus measurement) and decides the output.
- The final element: usually a control valve; sometimes a pump speed or heater power (Power Electronics and Motor Drives, Motor Starters, Contactors and Protection).
The valve changes the process, the process changes the measurement, the measurement changes the output. That circle is feedback.
Proportional action
Filling a tank to a mark by hand, you open the tap wide when far below and close it gradually as the water rises: proportional action.
- Gain says how hard it pushes. With a gain of 2, an error of 5 % of the measuring range moves the valve 10 % of its travel.
- Makers usually give the proportional band: the error, in per cent of range, that moves the valve from shut to fully open. Proportional band = 100 ÷ gain. A band of 50 % is a gain of 2.
Proportional action alone leaves an offset: to hold the valve 60 % open against a heavy load, a steady error must remain to hold it there, like the droop of a governor. A narrow band shrinks the offset, but too narrow a band over-corrects and swings (hunting).
Integral action (reset)
Integral action adds to the output, little by little, for as long as any error remains, and stops only when the error is zero. It removes the offset, like a patient operator who, finding the temperature still a degree low after ten minutes, opens the valve another notch. Its setting is the integral time in minutes: shorter corrects faster but can cause slow swings. Some makers give repeats per minute (1 ÷ integral time).
Windup. If the valve is already wide open and the measurement still cannot reach the set point (during start-up, or when the steam fails), the integral keeps growing. When the process recovers, the stored-up integral holds the valve open far too long and the temperature overshoots badly. Every controller must stop integrating when its output reaches 0 % or 100 %.
Derivative action (rate)
Derivative action watches how fast the measurement is changing and acts early, as a driver lifts off before the top of a hill. Its setting is the derivative time. It helps slow temperature loops. On fast, noisy measurements such as flow it turns every flicker into a jerk of the valve: leave it off there.
With all three terms it is a PID or three-term controller.
Delay is the enemy
A tank takes minutes to warm after the steam valve opens (lag); water takes seconds to travel from a dosing point to the sensor (dead time). The longer the dead time, the gentler the controller must be, so put sensors close to where the change is made.
Direction and failure
A heater loop is reverse acting (measurement up, output down); a cooling loop is direct acting. Set this wrongly and the controller drives the valve fully the wrong way at once.
Decide for every valve what it must do if air or power fails. A steam valve to a heater should fail shut; cooling water to a reactor or condenser should fail open; boiler feedwater should fail open, because a boiler run dry is far worse than one overfilled (Boilers and Pressure Vessels).
What you need
| Item | Use | See |
|---|---|---|
| Clean, dry compressed air at 1.4 bar, with filter, drain trap and regulator | Pneumatic controllers and actuators | Bellows to Air Compressors |
| Brass bar and tube, brass shim 0.1–0.2 mm | Nozzles, flappers, bellows, relays | Zinc and Brass, The Lathe |
| Fabric-reinforced rubber sheet 2–3 mm | Diaphragms | Rubber, Synthetic Rubber Works (Overview) |
| Spring steel wire 6–8 mm | Actuator springs | Springs |
| Cast iron, bronze or cast steel; stainless or hard-faced trim | Valve bodies, plugs and seats | Metal Casting, Alloy and Stainless Steels |
| Braided graphite or PTFE packing | Stem seal | Packing, Gaskets and Seals |
| Microcontroller, relay or thyristor, 4–20 mA circuits | Electronic controller | Microcontrollers |
| Gauges and a 4–20 mA calibrator | Setting up | Pressure and Vacuum Gauges, Electronic Test Equipment |
The pneumatic controller
From the 1930s to the 1970s most refineries and power stations ran on controllers worked by air alone: no electricity, no sparks, and buildable with a lathe and hand tools.
The flapper and nozzle
- Restriction. Supply air at 1.4 bar enters through a hole about 0.25 mm across in a removable brass plug.
- Nozzle. Beyond it, a small chamber and a nozzle of 0.5–0.8 mm bore with a flat, smooth end.
- Flapper. A flat strip of hard brass or stainless steel faces the nozzle. Well away, air escapes and the chamber pressure is near zero; touching, it rises to 1.4 bar. The whole change takes only 0.02–0.05 mm of flapper movement, a hair's breadth. This is a very sensitive amplifier of movement into pressure.
The relay
The nozzle passes only a trickle, too little to fill an actuator. A relay boosts it: nozzle pressure on a diaphragm about 5 cm across opens a small ball valve admitting supply air to the output, or, as the pressure falls, a second valve venting the output. A good relay fills a 1-litre actuator in a second or two.
Assembling it
- Beam. A light brass beam 15–20 cm long on a cross-spring flexure (two thin spring-steel strips crossed at right angles, which bend instead of rubbing).
- Measurement. The 0.2–1.0 bar signal enters a measuring bellows 25–40 mm across (Sheet Metal and Rolling) pushing on the beam.
- Set point. A spring pushes the other way, set by a screw with a pointer and scale.
- Proportional feedback. The output feeds a second bellows that pushes the beam back. Without it the controller is merely on–off; with it, the output moves only as far as needed to balance the error.
- Band adjustment. The feedback bellows acts through a sliding contact along a slot. Near the pivot it pushes weakly (narrow band, high gain); far out, strongly (wide band). Mark the slot from about 5 % to 500 %.
- Reset. A third bellows opposes the feedback bellows, fed from the output through a fine needle valve into a 5–20 cm³ chamber. After a change it slowly fills and cancels the feedback, so the output keeps moving until the error is zero. Opening the needle valve shortens the integral time, from seconds to about 20 minutes.
- Derivative (temperature controllers only): a second needle valve and small volume delaying the feedback, so a fast change gives an extra kick.
- Auto–manual valve, so an operator can set the output by hand with a small regulator, and three small gauges on the face for measurement, set point and output.
Good versus bad. With the loop open, a good controller moves its output smoothly through 0.2–1.0 bar as the input changes, and repeats within about 0.5 % from above or below. Jumps and drift mean a sticky pivot, dirt or a leaking bellows.
Tip Instrument air must be clean and dry. One drop of water or speck of rust blocks a 0.25 mm hole. Fit a filter and a water trap drained every shift; use copper or brass tube, not old steel pipe.
The electronic PID controller
The simplest modern controller is a microcontroller reading a 4–20 mA input and driving a 4–20 mA output to a valve, or a relay or thyristor switching a heater.
Time-proportioning. For heaters, 40 % output means on for 40 % of each cycle: a cycle of 10–30 seconds with a contactor (so the contacts last years), or 1 second with a solid-state switch (Power Electronics and Motor Drives).
The program. Run this every sample time, a tenth of the loop's lag or less (a second for temperature, a tenth of a second for flow):
- Read the measurement PV in per cent of range.
- Error e = set point − PV (reverse acting; the other way for direct).
- P = gain × e.
- I = I + gain × (sample time ÷ integral time) × e. Clamp I so that P + I stays between 0 and 100 %: that is the anti-windup.
- D = − gain × derivative time × (PV − last PV) ÷ sample time. Using the change in measurement rather than error means a set-point change does not kick the valve. Average a few readings to smooth it.
- Output = P + I + D, clamped to 0–100 %.
- In manual, set I = output − P each time round, so switching to automatic starts from where the operator left it, with no bump.
Store the settings in memory that survives a power cut, and send the output to a safe value if the input falls below about 3.6 mA (a broken wire). Earlier electronic controllers did the same with amplifiers and resistor–capacitor networks.
The control valve
A control valve is made to be held anywhere between shut and open and to move in small, smooth steps thousands of times a day for years. The commonest is the globe valve: a cast body with an S-shaped passage, a replaceable seat ring, and a plug on a stem that slides straight through packing in the bonnet. Plug, seat and stem are the trim. For large pipes at low pressure (air, cooling water, flue gas) a butterfly valve, a disc on a shaft turned up to 60–70°, is simpler.
Making one (a 25 or 50 mm valve first):
- Body. Cast iron for water and low-pressure steam, Bronze for sea water, cast steel for high-pressure steam, in a two-part sand mould with a core for the passage (Metal Casting, Pressure Vessels and Valves). Walls at least 8 mm for cast iron at 10 bar; flanges to match your pipe (Pipes, Plumbing and Aqueducts).
- Seat ring. Turned from stainless bar with a narrow 45° seating face, screwed in over a gasket.
- Plug. Hard stainless, turned with a contoured nose; for wet steam or gritty water, hard-faced with Stellite by welding (Welding, Nickel and Cobalt). Soft trim erodes into grooves in weeks.
- Stem. Stainless, 10–12 mm for a 50 mm valve, ground straight, pinned into the plug, running in a long guide bush so the plug cannot rattle.
- Packing. Rings of braided graphite or PTFE (Fluorspar and Fluorine Compounds), only lightly compressed: too tight and the stem sticks.
- Lap plug into seat with fine paste (Abrasives and Grinding Stones) until it seals.
The characteristic is how flow changes with travel, set by the plug's shape. A flat disc (quick opening) gives most of the flow in the first quarter: on–off duty only. A moderate cone gives linear flow, good for level loops. A long, curved nose gives equal percentage: each equal step of travel adds the same percentage to the flow already passing. Use equal percentage for most temperature, pressure and flow loops; it makes up for the pipes and pump taking more pressure as flow rises.
Sizing. A valve's Kv is the water flow in m³/h it passes fully open with 1 bar across it. For any liquid:
Kv needed = flow (m³/h) × √(specific gravity ÷ pressure drop in bar)
Example: 18 m³/h of water with 2 bar across the valve: Kv = 18 × √(1 ÷ 2) = 12.7. Choose a valve of full-open Kv about 1.3–2 times that, say 20, so it normally works 50–80 % open. Too big a valve runs nearly shut and wears its seat; too small has nothing left for upsets. Roughly, a 25 mm globe valve has a Kv of 8–10, a 50 mm 30–40; measure yours by timing a tank fill at a known pressure drop. Let the valve take a quarter to a third of the pump's pressure, or it does little until nearly shut.
The valve actuator
The cheapest and most reliable actuator is a rubber diaphragm pressed by air against a spring.
- Casing. Two pressed steel dishes bolted at the rims, clamping a fabric-reinforced rubber diaphragm. For a 50 mm valve, an effective area of 400–600 cm² (casing about 30 cm across).
- Plate and stem. A steel plate under the diaphragm drives the actuator stem, joined to the valve stem by a split clamp so the travel can be set.
- Spring of 6–8 mm wire (Springs), preloaded by a nut so travel starts at 0.2 bar and ends at 1.0 bar.
- Yoke joining actuator to bonnet, with a travel pointer and scale.
Force = pressure × area. On 500 cm², each 0.1 bar gives 500 N, so the 0.8 bar span gives 4,000 N, the weight of 400 kg. A 50 mm seat with 5 bar across it needs about 1,000 N to hold shut plus a few hundred for packing friction: ample.
Air to open or air to close. Turned over, the same parts make a valve that opens on air and fails shut, or closes on air and fails open. Choose by the fail-safe rule and paint it on the yoke.
Big butterfly valves use air cylinders at 5–6 bar; where there is no air, an electric actuator (a motor and screw with limit switches, The Electric Motor) works but fails where it stands.
The valve positioner
Packing friction makes a stem stick, then jump: the signal creeps up, nothing moves, then it leaps too far. The loop then cycles every minute or two whatever the tuning. A positioner cures it: a small flapper-and-nozzle controller on the yoke, in which a lever from the stem balances a spring set by the incoming signal, sending whatever air (up to full supply) is needed to put the stem exactly where the signal says. Fit one on any valve with tight packing, high pressure or long stroke. A current-to-pressure converter, a small coil moving a flapper, lets a 4–20 mA controller drive an air actuator.
Good versus bad valve. Raise the signal in 1 % steps and watch the pointer. A good valve moves a little at every step, the same up and down, within 0.5 % of travel. A bad one sits still, then jumps (stiction), or stops in different places going up and down (hysteresis). Shut with full pressure on, it should leak no more than a trickle.
Tuning a loop
Tune with the plant running normally, an operator watching, and a chart recorder on measurement and output.
First, a manual step. In manual, move the output 5–10 % and watch. Does the measurement go the right way? Does the valve move smoothly? Fix a sticky valve or slow sensor before tuning. From the chart read:
- K, the process gain: change in measurement ÷ change in output, both in per cent. A 10 % step that moves the temperature 5 % of its range gives K = 0.5.
- Dead time: from the step to the first movement.
- Time constant: from the first movement until the measurement has gone 63 % of the way to its new level.
Method 1: from the step (gentle, safe)
Pick a target time for the response: start with the time constant, or three times the dead time if larger. Then:
- Integral time = time constant
- Gain = time constant ÷ (K × (target time + dead time))
- No derivative at first.
This settles without overshoot and stays stable if the plant changes. Shorten the target time to tighten it.
Method 2: the ultimate gain (Ziegler and Nichols)
Faster, but it makes the plant swing, so use it only where a swing is harmless. Turn integral and derivative off. Raise the gain step by step, nudging the set point each time, until the measurement swings in a steady wave that neither grows nor dies. Note that gain Ku and the time of one full swing Pu.
| Controller | Gain | Integral time | Derivative time |
|---|---|---|---|
| P only | 0.5 Ku | none | none |
| PI | 0.45 Ku | Pu ÷ 1.2 | none |
| PID | 0.6 Ku | Pu ÷ 2 | Pu ÷ 8 |
These are lively (each swing a quarter of the last). For most plants, halve the gain afterwards.
Starting settings if you cannot test: liquid flow, band 150–300 %, integral 5–20 seconds, never derivative; level, band 50–100 %, integral 5–20 minutes or none (let it float so outflow stays smooth); gas pressure, band 10–50 %, integral 1–5 minutes; temperature, band 20–100 %, integral 2–20 minutes, derivative a quarter of the integral.
How to tell it worked
- Valve stroke: at 0.2, 0.6 and 1.0 bar (or 4, 12, 20 mA) the valve is shut, half open and fully open within 2 % of travel, up and down.
- Set-point step of 5 %: the measurement gets there with at most one small overshoot and settles without hunting.
- Over a shift, the chart shows a narrow band round the set point and an output that moves smoothly, not banging between limits.
- Fail-safe: shut off the air or power; every valve goes to the position painted on its yoke.
Note Troubleshooting. Even swings of seconds to a minute → gain too high or derivative too large. Widen the band. Slow, wide swings over many minutes → integral time too short. Swings no tuning cures, output moving in steps → valve stiction. Fit a positioner, ease the packing, repair the valve. Big overshoot after start-up → integral windup. Check the clamp; start up in manual. Output jitters constantly → noisy measurement. Filter the input, remove derivative. Valve driven the wrong way → direct/reverse set wrong, or the valve fails the other way from what you assumed. Pneumatic output stuck at zero → restriction blocked. Clear it with a fine wire.
Dangers
Danger A controller is not a safety device. Controllers fail, are left in manual, or are mistuned. Every vessel that can over-pressure needs its own safety valve, every boiler its own low-water cut-off, every furnace its own flame-failure valve and high-temperature trip, working independently of the controller from separate sensors (Pressure Vessels and Valves, Boilers and Pressure Vessels).
Danger Runaway reactions. Where a reaction gives off heat, a cooling valve that is already wide open means the temperature will climb faster and faster. Know the limit of your cooling, alarm well below the danger point, and have a way to stop the feed or dump the batch that does not depend on the controller.
- Actuators crush. 4,000 N closing on a finger takes it off. Shut off and vent the air before reaching near a stem.
- Never adjust packing under pressure: steam round a stem scalds.
- A controller left in manual after maintenance silently stops controlling. Check every one at shift change.
What this unlocks
Process control turns tanks and pipes into a continuous plant: refinery columns (Petroleum and Refining), Ammonia and contact Sulfuric Acid works, Synthetic Rubber Works (Overview) reactors, Portland Cement kilns, The Steam Turbine power stations and automatic Water Treatment for a Town. Controllers watched and adjusted from far away become Telemetry and Remote Control; controllers inside computers become the programmable controllers of Robots and Automation.
How it was first done
Ktesibios held the level in his water clocks with a float valve in the 3rd century BC (Hourglasses, Water Clocks and Simple Timers); James Watt's flyball governor of 1788 was analysed by James Clerk Maxwell in 1868, the first theory of why feedback hunts. In 1922 Nicolas Minorsky, watching helmsmen, wrote down the three-term law for automatic ship steering. Pneumatic proportional controllers appeared in industry in the 1920s; Foxboro's Stabilog of about 1931 added automatic reset, and Taylor Instruments added derivative ("pre-act") later that decade. John Ziegler and Nathaniel Nichols of Taylor published their tuning rules in 1942. Electronic controllers spread in the 1950s, and the distributed control systems of the mid-1970s put hundreds of PID loops, still following the same three terms, on a network of small computers.
Source: content/entries/electronics/process-control.md