Digital Filter Group Delay Fundamentals in Embedded Control Loops
Digital filter group delay directly subtracts from loop phase margin at crossover, requiring observer prediction or notch filters to preserve loop stability.

Penalty
Inserting a digital filter into an embedded feedback path carries a steep stability cost. Sampling continuous physical dynamics through an analog front end translates continuous motion into discrete states, bringing along quantization noise, aliasing, and spectral contamination. Low-pass filters are routinely added to suppress high-frequency sensor hash, transducer resonance, or PWM switching artifacts.
But every reactive element, pole, and digital tap adds phase lag. Near the crossover frequency where open-loop gain approaches unity, that lag eats directly into the plant’s phase margin.
In discrete filtering, attenuation and time delay are tied together. Group delay measures the time shift of a signal envelope passing through the filter, defined mathematically as the negative derivative of the unwrapped phase response with respect to angular frequency: τ_g(ω) = – dθ(ω) / dω. If the phase response θ(ω) curves non-linearly, different frequency components are delayed by different amounts, distorting the waveform rather than simply delaying it.
Across real-time motion control, magnetic levitation, and active power filtering, this delay acts as an unmodeled transport lag inside the closed loop.
At a current-loop crossover frequency of 1500 Hz, a four-sample group delay at a 20 kHz execution rate strips 10.8 degrees of phase margin directly from the plant.
Losing phase margin degrades loop damping and drives up sensitivity peaks. When conditioning filters introduce lag near crossover, gain and phase margins shrink together, pushing closed-loop poles toward the unit circle in the z-domain. The physical system becomes underdamped, showing overshoot, ringing, and long settling times after step disturbances.
If phase erosion gets severe enough, it triggers limit cycles or mechanical oscillations that can shear couplings and trip inverter overcurrent protection.
- Transducer noise amplification occurs when derivative control gains react violently to high-frequency quantization steps and spectral noise folding back into the control band.
- Resonant plant destruction develops as phase lag aligns commanded actuation forces with the natural mechanical compliance of the rotor or load.
- Thermal drive overload results from high-amplitude limit-cycle hunting that draws continuous reactive current through motor windings without producing useful work.
Filtering out sensor noise without accounting for phase slope sacrifices closed-loop bandwidth. Dropping controller gains to recover lost phase margin slows loop response, making the system sluggish during load torque changes and setpoint tracking. Left uncorrected in hard real-time loops, phase erosion leads directly to instability and chatter.

Shaft
Rotational drives make the physical consequences of filter lag immediately obvious. In high-performance servomotors, CNC spindles, and robotic joints, position sensors ~ like optical encoders, resolvers, and giant magnetoresistive angle sensors ~ feed position data to velocity and torque observers. Differentiating encoder signals creates severe velocity noise at low speeds.
Placing a low-pass filter on that signal smooths the feedback, but the resulting group delay alters the drive’s synthesized mechanical impedance.
Torque ripple and mechanical resonance set strict timing limits. A servomotor coupled to an elastic shaft has a torsional resonance defined by rotor inertia, shaft stiffness, and load inertia. Field-oriented control systems run nested loops: a fast inner current loop at 10 kHz to 32 kHz, an intermediate velocity loop at 1 kHz to 5 kHz, and an outer position loop at 500 Hz to 1 kHz.
Phase lag in the velocity path rotates the effective phase of mechanical damping, turning electronic damping into positive feedback right at the torsional anti-resonance frequency.
| Transduction Principle | Primary Conditioning Filter | Filter Order | Group Delay (Samples) | Lag at 100 Hz (Deg) | Lag at 500 Hz (Deg) |
|---|---|---|---|---|---|
| Optical Incremental Encoder | First-Order IIR Low-Pass | 1 | 3.2 | 5.76 | 28.80 |
| Resolver to Digital Converter | Tracking Loop Second-Order | 2 | 8.5 | 15.30 | 76.50 |
| Giant Magnetoresistive (GMR) | Moving Average (Boxcar) | 8 | 4.0 | 7.20 | 36.00 |
| Linear Variable Differential | Butterworth Low-Pass | 2 | 6.1 | 10.98 | 54.90 |
| Inductive Encoder Tracking | Linear Phase FIR Low-Pass | 16 | 8.0 | 14.40 | 72.00 |
The physical shaft acts as a sounding board for phase error. If velocity signal group delay exceeds 500 microseconds in precision machining, the motor can shriek audibly near 800 Hz. Surface finish quality on milled paths degrades, leaving microscopic scallops and causing tolerance violations. Dynamic torque stiffness drops, allowing tool shock loads to push the rotor outside position limits.
These feedback instabilities are frequently attributed to improper loop tuning, even when internal hardware filtering on a transducer module has introduced fifteen samples of hidden latency into the signal chain.

Poles
Filter architecture dictates how group delay behaves across frequency. Finite impulse response (FIR) and infinite impulse response (IIR) topologies balance stopband attenuation, coefficient complexity, and phase linearity using fundamentally different mathematical approaches. Examining z-plane poles and zeros shows how each topology impacts loop margin.
Symmetric FIR filters deliver constant group delay across all frequencies. An N-tap linear-phase FIR filter has a constant temporal group delay equal to (N – 1) / (2 f_s) seconds, where f_s is the sampling frequency. The unwrapped phase angle decreases linearly with frequency, preventing phase distortion because every spectral component reaches the controller delayed by the exact same amount.
The catch is filter length. Getting sharp transition bands to attenuate out-of-band noise requires high tap counts, introducing latency that quickly exceeds what the loop can tolerate.
Linear phase digital filters preserve waveform envelopes across passbands at the absolute expense of uniform transport delay.
IIR filters use both poles and zeros, providing steep roll-off with a fraction of the computational load of FIR designs. A second-order biquad can match stopband attenuation that would otherwise demand dozens of FIR taps. But that efficiency comes with non-linear phase response.
Group delay varies across the passband, peaking near the cutoff frequency. In closed-loop systems subject to varying excitation frequencies, this phase dispersion creates state-dependent delays.
- Bessel-Thomson designs maintain maximally flat group delay across the passband, preserving pulse shape while accepting a broader transition region.
- Butterworth alignments offer a maximally flat passband magnitude response while introducing moderate delay peaking near the 3 dB corner frequency.
- Chebyshev topologies provide steep roll-off into the stopband, at the cost of severe group delay dispersion and phase lag near the cutoff frequency.
- Elliptic configurations yield the steepest transition bands for a given filter order, but produce severe phase delay spikes that can destabilize feedback loops.
Choosing among these filter types forces a trade-off between processing overhead and phase degradation. When an embedded processor is tight on instruction cycles, a high-order Chebyshev biquad might be chosen to scrub transducer ripple ~ even though its group delay peaks at four times the static DC value right inside the crossover region.
| Filter Topology | Execution Taps / Biquads | DC Group Delay (ms) | Peak Group Delay (ms) | Peak Delay Frequency | Phase Margin Loss at 300 Hz |
|---|---|---|---|---|---|
| Bessel IIR | 2 Biquads | 0.31 | 0.31 | 0 Hz (Flat) | 33.5° |
| Butterworth IIR | 2 Biquads | 0.43 | 0.72 | 850 Hz | 49.2° |
| Chebyshev Type I (0.5 dB) | 2 Biquads | 0.54 | 1.45 | 980 Hz | 68.1° |
| Elliptic (0.5 dB / 40 dB) | 2 Biquads | 0.48 | 1.82 | 990 Hz | 62.4° |
| Symmetric FIR | 31 Taps | 1.50 | 1.50 | All Frequencies | 162.0° |
Phase dispersion creates real measurement uncertainty under multi-frequency excitation. A control loop cannot easily maintain disturbance rejection across varying motor load spectra when feedback phase lag changes dynamically with rotor speed.

Budget
Total loop latency is the cumulative sum of physical, electronic, and algorithmic delays across the entire embedded chain. Focusing only on digital filter group delay misses the time lost in hardware peripherals. A complete timing analysis accounts for every microsecond between a physical state change and the resulting PWM voltage update.
Transducer physics sets the first delay. Hall effect current sensors and fluxgate magnetometers have physical settling times dictated by magnetic core saturation, carrier modulation, and front-end op-amps. Next comes ADC sampling and conversion.
Successive approximation register (SAR) ADCs add sample-and-hold latencies typically lasting 0.5 to 2 microseconds. Delta-sigma converters use high-rate oversampling modulators paired with hardware sinc decimation filters; a third-order sinc filter with an oversampling ratio of 64 adds noticeable hardware delay before data ever reaches firmware registers.
IEC 61800-5-2 functional safety certification mandates that loop transport delays and filter response ceilings remain bounded within validated tolerances across all thermal operating envelopes.
Once raw values enter memory via DMA, the RTOS or timer interrupt service routine schedules execution. Interrupt latency, register stacking, state observers, and control calculations consume fixed time windows. Finally, output voltages update timer registers for the power switches.
Double-update space-vector PWM updates duty cycles at both peaks and valleys of the carrier wave, adding a zero-order hold transport lag of half the carrier period: T_pwm / 2. Single-update schemes introduce a full carrier period of lag: T_pwm.
- Physical transduction delay includes magnetic flux diffusion, piezo-charge settling, or resolver carrier demodulation dynamics.
- Analog front-end filtering applies RC anti-aliasing hardware poles that establish base analog phase lag before conversion.
- ADC conversion time represents the sample-and-hold interval and SPI bus transmission latency.
- Digital filter group delay contributes mathematical phase slope lag from discrete biquads or FIR convolution.
- Controller computation time covers interrupt latency, floating-point math, saturation clamps, and memory writes.
- PWM transport hold injects discrete zero-order hold lag across the switching period.
Consider an industrial induction motor drive running its current loop at a 10 kHz switching frequency (T_s = 100 µs) with double-update PWM. Analog anti-aliasing adds 5 µs. A SAR ADC converts in 2 µs, and SPI transfer takes 3 µs.
The digital feedback path uses a second-order Butterworth IIR filter with a 2 kHz cutoff, contributing 72 µs of group delay at the 1 kHz current-loop bandwidth. Firmware execution consumes 18 µs, and double-update PWM adds half a switching period (50 µs). Total transport latency reaches 150 µs ~ equivalent to 1.5 sample cycles.
At a 1 kHz crossover frequency, this 150 µs delay generates 54.0 degrees of phase loss, leaving very little room in a standard 60-degree phase margin allowance.
| Signal Chain Subsystem | Mechanism of Delay | Latency (µs) | Effective Samples | Phase Loss at 1 kHz (Deg) |
|---|---|---|---|---|
| GMR Current Sensor Die | Carrier Demodulation Bandwidth | 2.5 | 0.025 | 0.90 |
| RC Anti-Aliasing Filter | Passive Hardware Low-Pass Pole | 5.0 | 0.050 | 1.80 |
| SAR ADC Conversion | Sample, Hold, and SAR Bit Cycling | 2.0 | 0.020 | 0.72 |
| SPI Bus Transfer | Clock Transmission to MCU Core | 3.5 | 0.035 | 1.26 |
| Digital Feedback Filter | Second-Order IIR Low-Pass Math | 72.0 | 0.720 | 25.92 |
| Field-Oriented Math ISR | Clarke, Park, PID, Space Vector | 15.0 | 0.150 | 5.40 |
| PWM Zero-Order Hold | Half-Period Double Update | 50.0 | 0.500 | 18.00 |
System requirements and contracts often define strict latency budgets that prevent suppliers from modifying transducer firmware revisions without full qualification testing.

Bypass
Addressing filter group delay requires architectural changes rather than tuning compromises. Modern control systems work around the trade-off between noise suppression and phase lag by using model-based estimation, observer structures, and multi-rate processing. When feedback states are predicted instead of simply filtered, phase delay drops out of the control loop.
Luenberger observers and Kalman filters avoid phase lag by combining dynamic plant models with real-time sensor data. Rather than passing noisy signals through a lagging digital filter, raw measurements feed an observer that tracks true plant states. The observer predicts states using the system model and corrects drift with an innovation error signal.
The resulting state estimates introduce almost zero group delay across operational frequencies, protecting phase margin while still suppressing sensor noise via covariance gains.
Dual-path feedback structures split control actions across frequency bands. High-frequency ripple and switching spikes bypass digital filtering entirely, routing to fast analog comparators for hardware overcurrent protection. Low-frequency tracking uses filtered signals in outer loops where low crossover frequencies absorb group delay.
Targeted notch filters can then replace broad low-pass filters to suppress specific inverter harmonics or mechanical resonances without degrading passband phase margin.
Multi-rate decimation aligns filtering depth with loop bandwidth. Fast inner loops process raw or minimally filtered signals using short moving-average windows. Slower velocity and position loops apply heavier filtering, taking advantage of lower bandwidths to absorb group delay.
Phase-lead compensators placed in firmware can also offset residual phase slope near crossover, pulling open-loop response vectors away from the stability limit.
High-frequency noise suppression handled in hardware combined with predictive observers for low-frequency tracking keeps the loop robust without sacrificing phase margin.
