Physical AIUpdated 21 October 20268 min read

PID Control Explained: Tuning Guide for Automation Engineers

PID control corrects a process by combining proportional, integral and derivative action on the error between setpoint and measurement. An ABB paper states that over 90% of process control systems use PID controllers. This guide explains each term, a worked Ziegler-Nichols tuning example, windup and derivative noise, and PID_Compact in TIA Portal.

PID ControlProcess ControlPID TuningPLC ProgrammingZiegler-NicholsTIA Portal
Oil refinery tower and pipelines against a blue sky in Trzebinia, Poland

Key takeaways

  • An ABB process-solutions paper states that over 90% of process control systems use PID type controllers.
  • Proportional alone leaves a steady-state offset; integral removes it; derivative anticipates but amplifies noise.
  • Classic Ziegler-Nichols PID: Kp = 0.6 x Ku, Ti = 0.5 x Pu, Td = 0.125 x Pu; with Ku = 4 and Pu = 60 s that gives Kp = 2.4, Ti = 30 s, Td = 7.5 s.
  • Integral windup occurs when the output saturates; pause or cap the integral term (anti-windup).
  • PID_Compact on S7-1200 and S7-1500 offers pretuning, fine tuning and manual and automatic modes.

A PID controller continuously compares a measured process variable (PV) with a setpoint (SP) and adjusts its output to remove the difference, using proportional, integral and derivative action. It is the default algorithm of industrial control: an ABB process-solutions paper states that over 90% of process control systems are based on PID type controllers. Knowing what each term does, and how to tune a loop methodically, is a core skill for any automation engineer.

What do the P, I and D terms do?

Proportional reacts to the present error, integral to the accumulated past error, and derivative to how fast the error is changing. The error is e = SP - PV.

In plain text, the ideal (standard) form is:

Output = Kp x [ e + (1 / Ti) x (integral of e over time) + Td x (rate of change of e) ]

where Kp is the proportional gain, Ti the integral time and Td the derivative time.

TermResponds toEffectSide effect
Proportional (P)Current errorLarger error, larger correction; sets how aggressively the loop reactsAlone, it leaves a steady-state offset
Integral (I)Accumulated error over timeRemoves the offset by continuing to correct until error is zeroToo much causes overshoot, oscillation and windup
Derivative (D)Rate of change of errorAnticipates, damping the approach to setpointAmplifies measurement noise

Vendors write the equation differently (gain versus proportional band, integral time versus repeats per minute, parallel versus standard form), so check your platform's definition before reusing numbers from another system (Wikipedia, PID controller).

What does a control loop look like in practice?

A loop is a measurement, a controller and a final control element in a ring. The diagram below shows a flow loop: a flow transmitter (FTX 001) sends the process value to the flow indicating controller (FIC 001), which compares it with the setpoint and sends a valve-position signal to the flow control valve (FCV 001). The controller can be a stand-alone device or a function block inside a DCS, SCADA or PLC system. Our sensors guide and actuators guide cover the two ends of that loop.

Diagram of an industrial flow control loop with controller, flow transmitter and control valve
Diagram of an industrial flow control loop with controller, flow transmitter and control valvePhoto: Dougsim, CC BY-SA 4.0, via Wikimedia Commons

How do you tune a PID loop?

Put the loop in manual, bring the process to a steady state, then tune P first, then I, then D only if needed. Two widely taught methods are manual tuning and Ziegler-Nichols.

Manual tuning. Wikipedia's procedure: set integral and derivative to zero, increase Kp until the output oscillates, then reduce Kp to about half that value, add integral action to remove the offset, and add derivative action only if the response needs it. Make each change one at a time with a setpoint step and watch the response.

Ziegler-Nichols (closed-loop). John Ziegler and Nathaniel Nichols introduced this heuristic in the 1940s. Raise Kp, with I and D off, until the loop oscillates steadily; that gain is the ultimate gain Ku, and the oscillation period is Pu. The classic PID settings in Wikipedia's table are Kp = 0.6 x Ku, Ti = 0.5 x Pu and Td = 0.125 x Pu. For a PI controller, Kp = 0.45 x Ku and Ti is about 0.83 x Pu.

Worked example: suppose a temperature loop sustains oscillation at Ku = 4 with a period Pu = 60 seconds. Classic PID gives Kp = 0.6 x 4 = 2.4, Ti = 0.5 x 60 = 30 seconds and Td = 0.125 x 60 = 7.5 seconds. Treat these as starting values: they give a fairly aggressive response, so most process engineers detune them (lower Kp, longer Ti) to avoid overshoot. The test also drives the loop to sustained oscillation, which is unacceptable on many live processes, so agree it with operations first or use an open-loop step test instead.

This video introduces PID control and the intuition behind each term.

What Is PID Control? | Understanding PID Control, Part 1

What are integral windup and derivative noise?

They are the two classic ways a textbook PID misbehaves in a real plant. Integral windup happens when the output saturates (a valve fully open, say) while error persists: the integral term keeps accumulating, then takes a long time to unwind after the process recovers. Wikipedia lists the usual remedies: pause integration while the output is saturated, or cap the integral term. This is called anti-windup, and the MATLAB video below covers it.

Derivative action amplifies higher-frequency measurement noise, because a noisy signal has a large rate of change. Low-pass filtering helps but limits how much derivative is worth having, which is why derivative is often small or omitted on noisy flow loops. Wikipedia reports an estimate that derivative action is used in only about 25% of deployed controllers.

Anti-windup for PID control | Understanding PID Control, Part 2

Also look for bumpless transfer when switching between manual and automatic, so the output does not jump at the changeover.

How do you read the response and decide what to change?

Judge a setpoint step by its overshoot, how quickly it settles and whether it oscillates, then adjust one parameter at a time. These are typical symptoms and the usual corrective direction:

What you seeLikely causeUsual action
Sustained, regular oscillationGain too high, or integral too fastReduce Kp; lengthen Ti
Slow creep back to setpoint after a disturbanceIntegral too weakShorten Ti (more integral action)
Large overshoot after a setpoint stepAggressive tuning, or windupReduce Kp; check anti-windup; consider setpoint ramping
Jittery output on a steady processDerivative amplifying noiseReduce Td or filter the measurement
Output pinned at 0% or 100%Wrong action direction, or undersized final elementCheck direct or reverse acting, and the valve or drive sizing

Always confirm the action direction first. A heating loop is reverse acting (more output raises the PV), a cooling loop is direct acting, and getting this wrong makes the loop run away to a limit.

Beyond a single loop, Wikipedia describes two common upgrades: cascade control, where an outer loop (for example temperature) sets the setpoint of a faster inner loop (for example steam flow), and feed-forward, which adds a correction based on a measured disturbance before it shows up in the error. Both reduce the burden on the PID itself.

Which loops are typically PI and which need D?

As a rule of thumb, fast and noisy loops use PI and slow loops with long lags may use PID. These are typical starting points, not rules:

LoopTypical behaviourCommon starting point
FlowFast, noisyPI, modest gain, no derivative
Pressure (gas)FastPI
LevelIntegrating processP or PI, depending on how tight the level must be
TemperatureSlow, with lag and dead timePI or PID
Motor speedFast, often handled inside the drivePI inside the drive

How is PID implemented in Siemens TIA Portal?

TIA Portal provides the PID_Compact technology object for S7-1200 and S7-1500 CPUs. According to Siemens' documentation, PID_Compact calculates the proportional, integral and derivative parameters during pretuning, fine tuning can refine them further, and both manual and automatic modes are available. A sensible workflow is:

  1. Scale the process value to engineering units, and confirm the sensor reads correctly.
  2. Set realistic output limits for the final control element.
  3. Start from a stable operating point and run pretuning, then fine tuning if the response needs improving.
  4. Test setpoint steps and disturbances; check the behaviour when changing between manual and automatic.
  5. Record the final parameters and the operating conditions they were tuned for.

Auto-tuning is a starting point, not a substitute for judgement: always review the response and the limits against the process requirements.

How EDWartens can help

The Professional Module is a five-day live online Siemens TIA Portal class covering S7 PLC programming, HMI and WinCC SCADA, with self-paced Basic Engineering that includes control systems and automation. PID tuning is not a day-by-day topic of the live class, and the course is online and Siemens-focused, so there is no physical process rig. To practise loops, use the free process control simulator and the free PID control course. See the Professional Module or sign up.

Start free

Learn instrumentation and process control free, then practise the job

Free job simulation

Instrumentation Engineer

Instrument index, datasheets, loop diagrams and calibration on a process plant.

The first five days are free, no card needed.

Live UK jobs

Instrumentation jobs in the UK

Updated daily, with licensed visa sponsors marked.

Browse all engineering jobs

Frequently asked questions

What is a PID controller in simple terms?

A PID controller measures the error between a setpoint and the process variable and sets its output to remove it. The proportional term acts on the present error, the integral term on accumulated error, and the derivative term on how fast the error changes. Together they hold temperature, level, flow or pressure steady.

How do I tune a PID loop manually?

Set integral and derivative to zero and raise the proportional gain until the output oscillates, then reduce it to about half. Add integral action to remove the offset, and add derivative only if the response needs it. Change one parameter at a time and judge each change with a setpoint step.

Why is the derivative term often switched off?

Derivative action amplifies high-frequency noise, so on noisy signals such as flow it makes the output jittery. Filtering helps but reduces the benefit. Wikipedia cites an estimate that derivative action is used in only around 25% of deployed controllers; PI is enough for many loops.

What is integral windup and how do you prevent it?

Windup occurs when the controller output saturates, for example a valve fully open, and the integral term keeps accumulating error. When the process recovers the integral takes a long time to unwind, causing large overshoot. Anti-windup stops or limits the integral while the output is saturated.

Does Siemens PID_Compact tune itself?

PID_Compact on S7-1200 and S7-1500 has a pretuning function that calculates proportional, integral and derivative parameters, and a fine-tuning function that refines them. You still need to start from a stable process, set sensible output limits and check the response, because the result depends on the process conditions at the time of tuning.

Sources

  1. Tuning loop: control performance and diagnostics, ABB Process Solutions & Services
  2. PID controller, Wikipedia
  3. Ziegler-Nichols method, Wikipedia
  4. Technology object PID_Compact (S7-1200, S7-1500), Siemens TIA Portal documentation

Share this article

About the author

EDWartens Team

EDWartens Instructional Team

The EDWartens instructional team brings together UK-based automation engineers, certified Siemens and Rockwell specialists, and industry practitioners with decades of combined experience in PLC programming, SCADA engineering, and industrial AI.

View all articles by EDWartens

Ready to become job-ready?

Start with a free course today, or train live in Siemens PLC, HMI and SCADA on the Professional Module.

Related articles

Career

PLC Apprenticeship vs Short Course vs Degree: UK Routes

The official PLC apprenticeship is the Level 4 Automation and Controls Engineering Technician standard (ST0662), with a typical duration of 48 months and a maximum funding band of £14,000, according to Skills England. A degree takes about three years; a short course takes days or weeks. Which one fits depends on your age, your employer and how soon you need to be earning.

Read article
Physical AI

Siemens TIA Portal for Beginners: Your First PLC Project

TIA Portal is Siemens' single engineering environment for programming S7 PLCs, HMIs and drives. To start, install it, add an S7-1200 or S7-1500 CPU, write a start-stop rung in the Main [OB1] block and test it in a simulator. UK PLC Engineer adverts quoted a median of £60,000 in the six months to 21 October 2026 (ITJobsWatch).

Read article
Physical AI

PLC Programme Structure: Modular Design Best Practice

Good PLC programme structure splits a machine into reusable blocks: a thin main cycle, function blocks per piece of equipment with their own instance data, functions for stateless maths, and data blocks for shared data. This guide shows a practical layout in Siemens TIA Portal, with naming, documentation and version control habits.

Read article
Physical AI

PLC Programming Languages: LD, FBD, ST and SFC Explained

IEC 61131-3 defines four current PLC programming languages: ladder diagram, function block diagram, structured text and sequential function chart. Instruction list was deprecated in 2013. In the six months to 21 October 2026, ITJobsWatch counted 67 UK permanent adverts citing ladder logic, up from 22 a year earlier.

Read article