Time factor in setting PID parameters?

Time delay and process dynamics in PID tuning

Time Delay and Process Dynamics in PID Tuning: Why the Same Gains Behave Differently on Different Machines

A PID controller has no sense of whether it is controlling a fast pressure loop, a large heating vessel or a process with several minutes of transport delay. It only sees the measurements and timing presented to it.

This is why a set of gains that works well on one process can perform badly on another even when both applications use the same PLC and the same PID instruction.

Good tuning starts by understanding how the process moves in time.

How long after an output change does the measurement begin to respond? How quickly does it move after that? How much delay is created by the sensor? How often does the controller calculate? Is the analog input heavily filtered? Is the actuator itself slow?

Before tuning the controller, find out where the time is being spent.

The general tuning relationship between the controller gains and process response is discussed in PID gain and tuning.

Dead time, lag and sample time are not the same thing

Several different timing effects are often described casually as “delay”. They should be separated.

Dead time: the interval between changing the control input and seeing the first meaningful response at the measured process variable.

Process lag or time constant: how quickly the process develops its response after it has started moving.

Controller sample time: how often a digital controller reads the process and calculates a new output.

Measurement delay: delay caused by the sensor, transmitter, input filtering or conversion hardware.

Communication delay: time added when the process value or command must travel through a network or another controller.

Actuator delay: time introduced by equipment such as a slowly moving valve, a VFD ramp or a mechanical drive.

All of these affect the loop, but they do not have the same cause and should not be corrected in the same way.

Dead time means the controller is temporarily blind to its own action

Imagine changing a steam valve and then waiting 20 seconds before the downstream temperature sensor shows any response.

During those 20 seconds the PID controller has no evidence that its previous output change is working.

If the controller is tuned too aggressively, it may increase the output again, and then again, while the first correction is still travelling through the process.

When those corrections eventually reach the measurement point, their combined effect can produce a large overshoot.

This is one reason long-dead-time processes can oscillate even though the controller initially appears to be “too slow”.

A shower is a useful dead-time example

Turn the hot-water control and nothing happens immediately. Turn it again because the water still feels cold. A few seconds later the effect of both corrections arrives and the water becomes too hot.

You then make a large correction in the opposite direction and the same problem repeats.

A badly tuned delayed process behaves in much the same way.

When the process cannot report the result of a control action quickly, impatience becomes oscillation.

Process lag begins after the dead time

Dead time describes when the response starts. The process time constant describes how fast the response develops after that point.

Two processes can both wait five seconds before responding and then behave completely differently.

One may approach its new value within another ten seconds.

The other may require several minutes.

Calling both systems “five-second-delay processes” ignores most of their dynamics.

This distinction is particularly important when comparing pressure PID control with temperature PID control.

The ratio matters more than the number of seconds

A one-second delay can be irrelevant in a process that takes ten minutes to react.

The same one-second delay can be disastrous in a loop whose useful response occurs in two seconds.

For control purposes, dead time should therefore be judged relative to the natural speed of the process.

As dead time becomes large compared with the process time constant, the achievable closed-loop speed becomes increasingly limited.

The controller cannot respond intelligently to information that has not arrived yet.

The sensor can make a fast process look slow

Not all delay belongs to the process itself.

A temperature sensor installed inside a thick thermowell can respond much more slowly than the actual fluid temperature.

A pressure transmitter may be physically fast but configured with several seconds of electronic damping.

A PLC analog input may apply additional digital filtering.

By the time the PID controller sees the new process value, the physical process may already have changed considerably.

This is why sensor selection and transmitter configuration are part of control-loop design, not merely instrumentation details.

Filtering trades noise for delay

A noisy process variable can make derivative action difficult and can also create unnecessary output movement.

Filtering is often appropriate.

But every filter changes the dynamics of the signal.

If pressure feedback contains pump pulsation, increasing the input filter may make the SCADA trend look beautifully smooth. At the same time, it may delay the real pressure information enough to reduce control performance.

A smooth graph is not proof of a good feedback signal.

Before applying heavy software filtering, check cabling, shielding, grounding, transmitter damping and the physical source of the noise. The electrical side is covered in industrial analog signals.

Digital PID has a sample time whether you think about it or not

A PLC or microprocessor does not continuously evaluate the PID equation. It calculates at discrete intervals.

If the PID task is scheduled every 200 ms, the discrete controller is built around that time base.

The interval therefore affects integral and derivative calculations.

If execution sometimes occurs after 200 ms, sometimes after 500 ms and sometimes after one second, the actual controller no longer behaves like one running on a consistent 200 ms schedule.

This is especially important in PLC PID applications.

The PLC scan does not have to be the PID sample time

A PLC may execute normal machine logic every few milliseconds while the process PID runs in a slower periodic task.

There is no advantage in calculating an oven temperature PID thousands of times per second when the sensor and furnace barely change over several seconds.

Likewise, a fast pressure or flow loop should not be updated once every 30 seconds simply because another part of the program is slow.

The controller period should be selected from the process requirement, not merely copied from the PLC scan time.

Sampling faster is not always better

Very fast sampling can increase CPU work and make the controller react to measurement noise without providing useful new process information.

Very slow sampling adds delay and can miss important process changes.

The useful interval depends on:

sensor response,

input-module update rate,

process dynamics,

actuator response,

required closed-loop performance.

For systems with demanding timing requirements, see real-time PID control challenges.

Communication delay is not process dead time

A pressure process may respond quickly while the measurement takes one second to arrive through a remote network.

That one second belongs to the control architecture, not to the pipework.

This distinction matters because architectural delay may be removable.

A fast loop might be moved from a remote supervisory computer to a local PLC, RTU or drive.

The process has not changed, but the feedback path has become shorter and more predictable.

This is one reason SCADA and PID should not automatically mean that the fast control calculation belongs in the SCADA server.

Actuators can hide another delay

Suppose a pressure PID demands a rapid increase in pump speed.

The VFD may have a ten-second acceleration ramp.

The PID output jumps immediately, but the motor speed does not.

From the controller's point of view, the process appears slow.

If the PID integrator continues building during the VFD ramp, excessive output can accumulate before the pump reaches the requested speed.

This is why VFD PID applications must consider acceleration/deceleration settings as part of the complete loop.

Integral action becomes dangerous when the result arrives late

Integral action keeps accumulating error while the process remains away from the setpoint.

In a long-delay process, the controller may not yet know that its earlier correction is already sufficient.

The integral term continues to build.

When the delayed process response finally arrives, the stored integral action can drive the process beyond the target.

If the actuator has also reached its physical limit, ordinary integral accumulation can become windup.

Output limits and anti-windup behaviour are therefore important in delayed and saturated processes.

Derivative action cannot remove transport delay

Derivative action can contribute damping in suitable loops because it responds to rate of change.

It cannot make material move through a pipe faster or make heat reach a distant sensor instantly.

It also reacts strongly to high-frequency measurement noise.

This is why “increase D when there is dead time” is not a valid general tuning rule.

If derivative filtering is used, remember that the filter itself adds dynamics.

The general behaviour of the three terms is described in P, I and D components of PID control.

Why proportional gain often has to become less aggressive

A high proportional gain produces a large output correction for a given error.

That can be useful when the process responds quickly.

With long dead time, however, the controller must wait longer before learning whether the correction was enough.

A very aggressive gain can therefore produce several oversized control actions before useful feedback arrives.

The result can be large overshoot or loss of stability.

This does not mean there is a universal rule to “halve Kp when delay exists”.

The acceptable gain depends on the relationship between process gain, time constants, dead time and the desired closed-loop bandwidth.

A step test can reveal more than hours of random tuning

Where the process and safety conditions allow it, a controlled manual output change can provide valuable information.

For example, move a valve from 30% to 40% and record the process value.

Observe:

1. How long before PV starts moving?

2. How quickly does PV rise or fall?

3. Where does it settle?

4. Does the response appear approximately linear?

5. Is there unexpected oscillation or secondary dynamics?

From this response, an approximate process gain, dead time and dominant time constant may often be estimated.

That information is much more useful than adjusting PID gains blindly.

But a step test is still a real process disturbance

Do not perform an aggressive identification test simply because a tuning method asks for one.

A pressure vessel, chemical reactor, expensive production process or high-temperature furnace may have operating limits that make large test disturbances unacceptable.

The test size must respect equipment limits, process safety and product quality.

Where available, manufacturer auto-tuning or identification procedures should be understood before use rather than treated as a one-button solution.

Ziegler-Nichols and Cohen-Coon are starting methods, not universal laws

Classical tuning methods are useful because they connect observable process behaviour with controller parameters.

They should not be presented as guaranteed optimum settings for every machine.

Different methods place different emphasis on speed, overshoot and disturbance rejection.

A tuning result that looks mathematically acceptable may still be too aggressive for the actual production requirement.

Modern tuning also places significant emphasis on robustness: the controller should continue behaving reasonably when the real process is not identical to the model used during tuning.

Robust tuning is usually more valuable than spectacular tuning

A loop can look excellent during one commissioning test and perform badly a week later when:

product viscosity changes,

ambient temperature changes,

a filter becomes dirty,

a pump wears,

a valve characteristic changes,

production rate increases.

A controller tuned exactly on the edge of stability may deliver impressive initial response but little tolerance for these variations.

Industrial tuning normally needs margin, not bravado.

For this reason, stable PID operation includes more than preventing visible oscillation.

Setpoint tracking and disturbance rejection are not identical objectives

A controller can be tuned to react strongly to setpoint changes.

Another loop may keep the setpoint almost constant and instead need excellent rejection of load disturbances.

Those two jobs can favour different controller behaviour.

In many industrial processes, disturbance rejection is actually more important than producing the fastest possible response to a new operator setpoint.

Therefore the phrase “best PID tuning” has no useful meaning unless the control objective is stated.

Smith Predictor: useful when dead time dominates the problem

When process dead time becomes very large compared with the useful process dynamics, ordinary PI or PID feedback may have to be tuned very slowly to remain robust.

A Smith Predictor is one model-based approach developed for this situation.

Instead of forcing the controller to rely only on the delayed measured output, the structure uses an internal process model to estimate the response without the full dead time.

The actual delayed measurement remains important for correcting model mismatch and external disturbances.

This can allow the main controller to behave as though it is dealing with a less delayed plant.

However, two pieces of information are required:

1. A useful model of the delay-free process dynamics.

2. A reasonable estimate of the process dead time.

A Smith Predictor does not eliminate the physical delay. It changes how the controller works around it.

Model error matters in dead-time compensation

If the real dead time changes from 20 seconds to 40 seconds while the controller model still assumes 20 seconds, prediction quality deteriorates.

The same is true if process gain or time constants change substantially.

This is why model-based dead-time compensation has to be evaluated for robustness rather than judged only with a perfect simulation model.

For a process whose dynamics change constantly, gain scheduling, adaptive methods or another control architecture may become more suitable.

The relationship between these methods is discussed in PID and other control strategies.

Before adding a Smith Predictor, ask whether the delay can simply be removed

Sometimes the most effective control improvement is physical rather than mathematical.

If an analyzer has a long sample tube, shortening or redesigning the sample system may reduce transport delay.

If a temperature sensor is installed too far from the actual controlled point, relocating it may help.

If excessive transmitter damping is responsible for slow feedback, the damping setting may be reconsidered.

If a fast loop is being closed through a remote network, moving the controller closer to the process can remove communication delay.

Do not build a sophisticated control algorithm to compensate for a delay that could have been eliminated with better instrumentation or architecture.

Feedforward can act before delayed feedback arrives

If an important disturbance can be measured early, feedforward control can reduce the burden placed on delayed feedback.

Consider a heat exchanger where product flow suddenly increases.

The outlet temperature may not change immediately because the process has thermal lag and transport delay.

If inlet flow is measured, a feedforward term can increase the heating demand before the temperature PID sees a large error.

The PID loop then corrects what the feedforward model did not predict correctly.

This is often more effective than forcing the PID gains to become extremely aggressive.

Cascade control can provide an earlier measurement

Another useful architecture is cascade control.

A slow primary variable may depend on a faster secondary variable that can be measured much earlier.

For example, final product temperature may change slowly while jacket temperature responds quickly.

The outer product-temperature PID can generate a setpoint for a faster inner jacket-temperature loop.

The inner loop deals with fast disturbances before the final product temperature has time to move significantly.

The value comes from obtaining useful feedback sooner, not merely from adding another PID block.

Different operating points may have different dynamics

A nonlinear process may not have one meaningful set of dynamics over its full operating range.

A fan system can behave differently at low and high flow.

A heating system can lose much more energy at high temperature.

A fluid can change viscosity dramatically with temperature.

One fixed PID setting may therefore be conservative in one region and aggressive in another.

Gain scheduling can use different tuning sets for known operating regions.

Adaptive control goes further by changing selected controller or model parameters based on observed system behaviour.

Neither approach should be used to conceal poor instrumentation or an incorrectly configured basic loop.

Example: pressure loop with PLC and VFD

Consider this loop:

Pressure transmitter → PLC → PID → VFD → Pump → Pipeline

Several different delays can exist.

The transmitter may have damping.

The PLC analog input may have filtering.

The PID may execute periodically.

The VFD may impose an acceleration ramp.

The motor and pump have mechanical dynamics.

The pipe volume and consumer demand determine how quickly pressure changes.

Tuning the PID without considering these elements treats the final symptom while ignoring the system producing it.

For the drive-specific side, see PID control with a VFD.

Example: a slow heating process

A heater changes output immediately, but the measured product temperature may continue rising long after heater power is reduced.

This is not necessarily dead time alone. Stored thermal energy and large time constants can continue driving the process.

An aggressive integral setting can therefore create large overshoot.

The controller may have already reduced its output by the time the temperature crosses the setpoint, yet the stored energy keeps pushing temperature upward.

This is one reason temperature PID control generally requires very different tuning from a fast pressure loop.

Example: level control is different again

A tank level may behave like an integrating process.

If inlet flow remains greater than outlet flow, the level continues to rise rather than naturally settling at a new value.

This behaviour differs fundamentally from a self-regulating temperature or pressure process.

Therefore PID level control should not inherit tuning simply because another loop uses the same PLC function block.

When a PID loop behaves badly, read the timing pattern

No visible response for a long period, followed by a large overshoot: investigate dead time, stored integral action and actuator delay.

Regular oscillation around the setpoint: controller bandwidth may be too aggressive for the loop delay or process dynamics.

PV looks exceptionally smooth but control is sluggish: sensor damping or input filtering may be excessive.

Controller output changes quickly but the process reacts slowly: inspect actuator dynamics, VFD ramps, valve travel and the physical process.

Tuning works at low production rate but becomes unstable at high rate: the plant dynamics probably change with operating point.

Local control works well but remote control does not: examine communication delay and jitter.

More general symptoms are covered in PID troubleshooting.

A useful timing audit before tuning

1. Measure or estimate the sensor response time.

2. Check transmitter damping.

3. Check analog-input filtering and update rate.

4. Verify the real PID task interval.

5. Check network delay if feedback or commands cross a network.

6. Check actuator response time.

7. Check VFD acceleration and deceleration ramps where applicable.

8. Estimate process dead time and dominant response time.

9. Check output saturation and integral windup behaviour.

10. Tune only after the complete timing chain is understood.

Related PID Timing and Process Topics

Tuning and stability: PID Gain and Tuning - Stable PID Operation - PID for Different Process Types - PID Limitations

Controllers and timing: PID with PLCs - Real-Time PID - PID with SCADA

Measurement: Analog Signals - Pressure Sensors - Temperature Sensors

Process applications: Pressure Control - Flow Control - Level Control - Temperature Control - PID with VFDs

Beyond basic PID: PID and Other Control Strategies

PID tuning should be based on the timing of the complete physical loop: sensor, measurement interface, controller execution, actuator and process. Parameter names and time-base definitions vary between controller manufacturers, so the documentation for the actual PLC, drive or process controller should also be checked.