Padé Approximation of Time Delay Simulator Back
Control Engineering

Padé Approximation of Time Delay Simulator

Explore the Padé approximation, which replaces a pure time delay e^(−sT) with a rational transfer function. Change the approximation order or the delay and watch the phase response, effective bandwidth and the initial undershoot produced by right-half-plane zeros update in real time.

Parameters
Time delay T
s
Pure time lag before an input appears at the output
Padé order n
[n/n] approximation. Higher is more accurate but adds more right-half-plane zeros
Plant time constant τ
s
Time constant of the first-order plant cascaded with the delay
Plant gain K
Steady-state gain of the first-order plant (final value of the step response)
Results
Approximation order n
Right-half-plane zeros
Phase error @ω=1/T (deg)
Eff. bandwidth err<5° (rad/s)
Step-response mean-squared error
Initial undershoot
Step-response animation — true delay vs Padé

The dashed blue curve is the true delayed response (flat until t=T, then an exponential rise); orange is the Padé-approximated response. The dip before the rise is the initial undershoot from the right-half-plane zeros.

Phase response — true delay vs Padé phase
Step response — true delayed response vs Padé response
Theory & Key Formulas

$$e^{-sT}\approx\frac{N_n(s)}{D_n(s)},\qquad e^{-sT}\approx\frac{1-sT/2}{1+sT/2}\ \ (n=1)$$

The [n/n] Padé approximation of a time delay e^(−sT). Both numerator Nₙ(s) and denominator Dₙ(s) are polynomials of order n. For n=1 it becomes a first-order / first-order rational function.

$$e^{-sT}\approx\frac{1-sT/2+(sT)^2/12}{1+sT/2+(sT)^2/12}\ \ (n=2)$$

The second-order Padé approximation. The coefficients are c_k = (2n−k)!·n! / ((2n)!·k!·(n−k)!), with Dₙ(s)=Σ c_k(sT)^k and Nₙ(s)=Σ c_k(−sT)^k.

$$\left|\frac{N_n(j\omega)}{D_n(j\omega)}\right|=1,\qquad \angle e^{-j\omega T}=-\omega T$$

The Padé approximation is all-pass (unity gain at every frequency) and contributes n right-half-plane zeros. All of the error appears in the phase, and it grows away from the true value −ωT as the frequency rises.

What is the Padé Approximation of a Time Delay?

🙋
A "time delay" is the lag between applying an input and seeing the output, right? Can't that be written as a transfer function?
🎓
It can — the transfer function of a delay T is exactly e^(−sT). The trouble is that this is an "exponential function". Imagine measuring the temperature of water flowing through a pipe: it takes a few seconds for the water to travel from the heater to the thermometer. That lag is e^(−sT). But it has neither a polynomial numerator nor a polynomial denominator — it is an "irrational function" with infinitely many poles and zeros — so root locus, Bode-based design and state-space models cannot be applied to it directly.
🙋
I see... so the Padé approximation forces that e^(−sT) into a ratio of polynomials?
🎓
Exactly. The Padé approximation approximates e^(−sT) with a rational function "numerator Nₙ(s) ÷ denominator Dₙ(s)". Both are polynomials of order n; for n=1 it is the famous (1−sT/2)/(1+sT/2). Set the "order n" slider on the left to 1 and that very expression appears in the denominator. Now there are only finitely many poles and zeros, so you can fold the delay into ordinary controller design.
🙋
Looking at the step-response chart above, the Padé response dips downward for an instant before it rises. Is that a bug? The true delay is just flat.
🎓
Good catch — that is not a bug, it is an intrinsic property of the Padé approximation. The [n/n] Padé approximation has n "right-half-plane zeros" in its numerator. A system with right-half-plane zeros is called "non-minimum-phase" and always shows an inverse response: the moment a step is applied, the output moves opposite to the target. A real delay simply waits until t
🙋
So if I raise the order n, that dip disappears and it gets closer to the real thing?
🎓
Yes — raising n makes the undershoot smaller and shorter, and both the step response and the phase response move much closer to the true delay. Drag n from 1 to 5 on the left and you will see the "effective bandwidth" number (the frequency where the phase error exceeds 5°) widen monotonically. But every extra order adds more right-half-plane zeros and raises the system order. So in practice you pick the "smallest order" for which the delay phase is accurate enough across the control bandwidth you need. For PID design, first or second order is often enough.
🙋
Why does only the phase chart deviate a lot, while no magnitude chart shows up?
🎓
Because a time delay is an element that "changes only the phase, not the magnitude". e^(−jωT) always has magnitude 1 and just rotates its angle by −ωT. The Padé approximation faithfully inherits this property: |Nₙ/Dₙ|=1 holds exactly, making it an "all-pass" function. So the approximation error never appears in the magnitude — it all shows up in the phase. That is why the phase chart alone is what you watch.

Frequently Asked Questions

A pure time delay e^(−sT) is an exponential function of s, not a rational transfer function with polynomial numerator and denominator. Because it is an irrational function with no finite poles or zeros, you cannot directly apply control-design methods that assume a rational transfer function — root locus, Bode-based design, state-space models. The Padé approximation expresses e^(−sT) as a ratio of a numerator Nₙ(s) and a denominator Dₙ(s). This gives the delay finite poles and zeros, so it can be folded into ordinary controller design and numerical simulation.
Raising the order n widens the frequency band over which the true delay phase −ωT is reproduced accurately. The "effective bandwidth" in this tool is the frequency at which the phase error first exceeds 5°, and it grows monotonically as n goes from 1 to 5. On the other hand the [n/n] Padé approximation introduces n right-half-plane (unstable) zeros, so the higher the order the more elaborate the initial undershoot of the step response becomes. In practice, pick the smallest order for which the delay phase is accurate enough across your control bandwidth. For most PID designs a first- or second-order approximation is sufficient.
The [n/n] Padé approximation carries n right-half-plane zeros (zeros in the right side of the s-plane) in its numerator. A system with right-half-plane zeros is "non-minimum-phase" and shows an inverse response (undershoot): just after a step input the output moves opposite to the target. A true delay simply stays at zero for t
All-pass means the gain (magnitude ratio) is 1 at every frequency ω. For the [n/n] Padé approximation Nₙ(jω)/Dₙ(jω), the numerator and denominator are conjugate-related, so |Nₙ/Dₙ|=1 holds exactly. This matches the true delay e^(−jωT), which has |e^(−jωT)|=1 and contributes pure phase lag without changing magnitude. In other words the Padé approximation correctly captures the essence of a delay — "change only phase, not magnitude" — and all of the approximation error appears on the phase side.

Real-World Applications

Process control (chemical plants, temperature control): Transport lags in pipes, the response delay of heat exchangers, the sampling delay of analyzers — process systems always carry a time delay. When tuning a PID loop or designing a model predictive controller, the delay is first rationalised with a Padé approximation so that gain margin and crossover frequency can be evaluated. The larger the delay, the more it eats into the phase margin, so the accuracy of the approximation directly drives the accuracy of the control-performance estimate.

Servo systems and control with communication latency: In remote control over a network, or digital control loops that include sensor and actuator computation delays, a delay inside the loop is a common cause of oscillation. At the design stage the delay is replaced with a Padé approximation, and a Nyquist or Bode plot quantifies "how much phase the delay consumes" so the control bandwidth can be chosen on the safe side.

Understanding dead-time compensation such as the Smith predictor: The fastest route to learning a dead-time compensator (Smith predictor) is to first feel "what happens when a delay can be treated as a rational transfer function". The Padé approximation is also used as the internal model of the compensator, and knowing how the closed-loop behaviour changes with the approximation order is directly relevant to designing and tuning the compensator.

Control-engineering education and CAE pre-study: The root locus and frequency response of a delayed system are often computed by analysis software only "after replacing the delay with a Padé approximation". Visualising the relationship between order and error, as this tool does, lets you read those results while understanding what the software is doing internally and why a higher order makes the inverse response more elaborate.

Common Misconceptions and Pitfalls

The most common misconception is that "the higher the order n, the better". The accurate phase band does widen, but the [n/n] Padé approximation always introduces n right-half-plane zeros. Designing a controller on a model that contains them can make the design harder, because the controller tries to compensate even the non-minimum-phase quirks the approximation creates. A higher model order also increases the computational load. The rule of thumb is to choose the "smallest order for which the delay phase is accurate enough across the target control bandwidth" — blind escalation of the order is to be avoided.

Next, assuming the Padé approximation is identical to a time delay. The Padé approximation is only a rational approximation, and its phase deviates significantly from the true delay, especially at high frequency. The phase chart in this tool also shows the Padé phase departing from the true value −ωT beyond a certain frequency. The approximation is trustworthy only inside the "effective bandwidth". If the control bandwidth exceeds it, the stability-margin estimate becomes optimistic and the real machine can oscillate unexpectedly.

Finally, mistaking the initial undershoot (inverse response) for a numerical error or a simulation bug. The step response moving backward before it rises is the correct behaviour of a non-minimum-phase system with right-half-plane zeros. It is an unavoidable price the Padé approximation pays to represent the "waiting time of a delay" with a rational system; it shrinks as the order rises but never disappears completely. Rather than doubting the approximation when you see the inverse response, understanding it as a manifestation of non-minimum phase is essential when analysing delayed systems.

How to Use

  1. Enter the time delay T (seconds) in tNum, typically 0.01–2.0 s for process control systems.
  2. Set approximation order n in nNum (range 1–6); higher orders reduce phase error but increase model complexity.
  3. Define gain k in kNum and adjust sampling range parameters tRange, nRange, tauRange, kRange to explore sensitivity across operating regions.
  4. Execute simulation to generate Padé rational transfer function H(s) = N(s)/D(s) replacing e^(−sT).
  5. Review output metrics: phase error at ω=1/T, effective bandwidth where error stays below 5°, and step-response MSE.

Worked Example

For a pneumatic actuator with time delay T=0.15 s and gain k=2.5, using 3rd-order Padé approximation: the rational function becomes H(s)=(−s³+40s²−600s+4000)/(s³+40s²+600s+4000). At ω=1/T≈6.67 rad/s, phase error is 8.3°. Effective bandwidth (error <5°) extends to 4.2 rad/s. Step-response initial undershoot measures 12% and MSE=0.018 versus pure delay benchmark, suitable for cascade PID tuning without Smith predictor complexity.

Practical Notes

  1. For dead-time dominated loops (T > 0.5 s), use n≥3 to keep phase error below 10° across control bandwidth; n=2 often under-approximates mid-frequency response in hydraulic systems.
  2. Right-half-plane zeros in Padé approximants of order n≥2 can destabilize aggressive feedback; validate closed-loop pole locations when gain k > 3.
  3. Effective bandwidth where error remains <5° typically spans 0.3–0.6 rad/s for first-order processes; use this as design constraint for controller crossover frequency.
  4. Compare step-response MSE across orders: jump from n=1 to n=2 yields 40–60% improvement; beyond n=4 gains diminish and numerical conditioning degrades in digital implementation.