Prony Series Digital Filter Implementation for Real Time Accelerometer Drift Compensation
Real-time Prony series filters model structural MEMS relaxation as discrete state poles to strip low-frequency drift before velocity integration.

Decay
Low-frequency accelerometer errors corrupt position double-integration within seconds. A capacitive Micro-Electro-Mechanical Systems (MEMS) accelerometer exhibiting a root-power spectral density of 20 micrograms per square-root hertz generates several meters of positional drift after one minute of integration if residual DC bias and thermal-viscoelastic relaxations remain unfiltered. Mechanical stress relaxation in packaging epoxy, thermal equilibration gradients across sensing beams, and dielectric charging exhibit multi-exponential temporal profiles.
Prony analysis decomposes these continuous physical relaxations into discrete complex exponential poles. Expressing the sensor error as an autoregressive state response allows the signal processor to strip non-stationary baseline drift from dynamic inertial acceleration in real time.
Sensor manufacturers routinely specify bias repeatability and temperature coefficients under steady-state chamber profiles. Real-world operation involves transient thermal steps and variable mechanical mounting torques that induce viscoelastic structural relaxations. These relaxations follow stretched-exponential forms or discrete sums of distinct time constants ranging from fractions of a second to tens of minutes.
Standard high-pass filtering distorts low-frequency dynamic kinematic accelerations, whereas a classical polynomial detrending algorithm requires future data samples, preventing hard real-time execution. A Prony-derived digital filter captures the precise decay dynamics of the sensor assembly directly within the time domain.
Viscoelastic packaging relaxation induces multi-rate baseline shifts across temperature steps that exceed steady-state datasheet calibration limits.
Prony approximation represents an empirical signal of length N as a linear combination of p damped complex exponentials sampled at uniform intervals. The continuous formulation maps to discrete time via poles defined in the complex z-plane:
y(n) = Sum over k from 1 to p of ( A(k) exp(alpha(k) n T) cos(omega(k) n T + theta(k)) )
The variable T defines the sampling period. The term alpha(k) governs the damping factor, omega(k) defines the angular frequency, A(k) represents the initial amplitude, and theta(k) provides the phase offset. Pure drift compensation operates along the real axis of the complex plane.
Non-oscillatory thermal-mechanical transient decays set omega(k) equal to zero, reducing the formulation to real damping exponents:
y(n) = Sum over k from 1 to p of ( h(k) (z(k))^n )
The discrete poles z(k) equal exp(alpha(k) T). The coefficients h(k) denote real weighting amplitudes. Extracting these discrete parameters converts raw sensor drift from an empirical nuisance into a deterministic autoregressive difference equation.

Poles
Extracting the characteristic parameters requires decoupling the pole identification from linear amplitude estimation. Classical Fourier transforms struggle with heavily damped, decaying signals because continuous spectral leakage spreads energy across low frequencies. Prony resolved this nonlinear optimization problem by transforming pole selection into a polynomial root-finding exercise.
The signal values satisfy a linear constant-coefficient difference equation whose characteristic equation roots yield the system poles.
Construction of the discrete linear prediction matrix establishes the foundation of the autoregressive step. Given a baseline calibration vector y containing N observed drift points recorded under thermal or mechanical stress transitions, the sequence relates to linear prediction coefficients a(i):
Sum over i from 0 to p of ( a(i) y(n – i) ) = 0, with a(0) = 1
This formulation structures an overdetermined set of linear equations solved via least-squares or singular value decomposition (SVD) methods:
Y a = -d
The matrix Y contains shifted data samples of size (N – p) by p, the vector a carries the prediction coefficients from index 1 to p, and the vector d contains the reference measurements from index p to N minus one. Solving this system yields the coefficients that form the characteristic polynomial:
P(z) = z^p + a(1) z^(p-1) +. + a(p-1) z + a(p) = 0
Factoring P(z) yields the discrete roots z(k). In an accelerometer drift compensation framework, the resulting roots must reside strictly inside the unit circle on the positive real axis. Complex conjugate pairs indicate high-frequency mechanical resonance or oscillatory ringing, which are stripped to preserve only monotonic drift relaxations.
Real roots between zero and one map directly to physical decay time constants tau(k) through the relation tau(k) = -T / ln(z(k)).

Do Real Accelerometers Exhibit Multiple Distinct Decay Rates?
Differential scanning calorimetry and mechanical dynamic analysis confirm that package-induced stress propagates through multiple distinct physical mechanisms, each operating across its own timescale. Die-attach adhesives demonstrate short-term viscoelastic creep across 1 to 5 seconds. Silicon-to-glass anodic bond interfaces show relaxation across 30 to 120 seconds.
Ambient convective stabilization of the surface-mount package assembly settles across hundreds of seconds. Modeling drift with a single exponential pole fails to capture the initial steep transient without compromising the long-term tail. A third-order or fourth-order Prony series matches the physical multi-pole reality of packaged silicon sensors.
| Pole Order | Physical Root Type | Discrete Pole z(k) | Equivalent Time Constant | Typical Amplitude Share |
|---|---|---|---|---|
| k = 1 | Die-attach shear relaxation | 0.99335 | 1.50 s | 48% |
| k = 2 | Substrate thermal conduction | 0.99952 | 21.0 s | 31% |
| k = 3 | Enclosure mechanical settling | 0.99994 | 180.0 s | 16% |
| k = 4 | Dielectric charge accumulation | 0.99998 | 620.0 s | 5% |
Estimating the amplitude weights h(k) follows once the roots z(k) are established. The matrix formulation sets up a Vandermonde system using the evaluated roots across observation steps n from 0 to N minus one. Solving the Vandermonde system via Moore-Penrose pseudoinverse produces the vector of amplitude weights h.
Because small sensor noise perturbing the autoregressive matrix Y can displace poles outside the unit circle, real-world implementations routinely stabilize the solution by projecting any unstable pole back into the interior domain below unity.
Ignoring higher-order package relaxation poles causes positional divergence when baseline velocity thresholds drift unchecked.

Lattice
Converting the fitted Prony poles and coefficients into a real-time digital architecture requires a stable filter realization. Direct-form Infinite Impulse Response (IIR) filter realizations show extreme numerical sensitivity when poles cluster tightly near z = 1. In a sensor sampling at 200 Hz with a physical decay time constant of 50 seconds, the discrete pole resides at z = exp(-1 / (200 50)) = 0.99990.
In a fixed-point microcontroller or single-precision floating-point digital signal processor (DSP), rounding errors in standard Direct Form II implementations cause numerical instability, quantization noise buildup, and limit cycles.
A parallel state-space realization or a normalized lattice filter provides robust structural alternatives. The parallel structure partitions the p-th order Prony model into p independent first-order digital filter sections. Each sub-filter tracks one specific physical decay process without numerical crosstalk across state registers.
The update equations for each parallel stage k execute every sampling tick:
x_k(n) = z(k) x_k(n – 1) + (1 – z(k)) u(n)
The input u(n) represents the instantaneous baseline excitation flag or detected thermal gradient delta-T(n). The total reconstructed baseline drift estimate y_hat(n) emerges as the weighted linear summation of individual channel states:
y_hat(n) = Sum over k from 1 to p of ( g(k) x_k(n) )
The gain g(k) maps from the Prony amplitude h(k). Subtracting y_hat(n) from the raw accelerometer reading a_raw(n) produces the compensated dynamic acceleration reading:
a_comp(n) = a_raw(n) – y_hat(n)
This implementation eliminates numerical instability. Each first-order sub-filter pole z(k) operates strictly between 0 and 1, ensuring bounded-input bounded-output (BIBO) stability under all rounding precisions. Fixed-point microcontrollers execute these first-order sections using standard shift-and-add arithmetic, bypassing expensive high-order matrix inversions during runtime operations.
Parallel first-order decoupling prevents pole-clustering roundoff degradation in precision floating-point registers.
Quantization errors in the pole location directly alter the represented decay rate. A 16-bit fractional word representation creates significant time-constant distortion when encoding poles located within 0.0001 of the unit circle. Single-precision IEEE 754 floating-point allocations provide 24 bits of mantissa precision, resolving poles up to six decimal places, which accommodates decay constants up to several minutes at kilohertz sample rates.
For ultra-low-drift applications running at 1 kHz with time constants reaching an hour, a 64-bit double-precision register allocation for state storage remains mandatory to prevent mathematical truncation from freezing state advancement.
A vendor will claim that on-chip factory compensation removes all operational bias shifts without mentioning transient thermal relaxation states.

Bench
Bench validation isolates real kinematic motion from package-level baseline decay. Verifying an implementation requires precise multi-axis motion generation combined with thermal shock profiling. The evaluation bench utilizes an air-bearing rate table mounted on an isolated seismic block with structural vibration attenuation surpassing 80 dB up to 200 Hz. A programmable Peltier thermal test plate clamped directly to the device-under-test provides rapid, repeatable thermal steps up to 2 degrees Celsius per second while the table maintains zero mechanical rotation.
Testing proceeds along a structured sequence designed to separate mechanical hysteresis from pure thermal relaxation effects.
- Baseline Thermal Stabilization requires soaking the accelerometer at 25.0 degrees Celsius for 120 minutes until the uncompensated Allan deviation slope demonstrates white noise performance without random run drift.
- Step Excitation Application introduces a rapid 30.0 degrees Celsius temperature step within 15 seconds using closed-loop Peltier control while sampling acceleration and internal temperature registers at 500 Hz.
- Transient Drift Recording captures the uncompensated output over a 1800-second dwell period to ensure capture of the slow structural relaxation tail.
- Offline Parameter Extraction applies Prony factorization to the baseline drift profile, yielding the system pole vector and amplitude weights.
- Firmware Filter Deployment loads the parallel lattice coefficients into the target processor and repeats the thermal step to verify real-time baseline cancellation.
Evaluating compensation effectiveness relies on overlapping Allan deviation metrics. Allan deviation plots quantify how error scales across averaging intervals tau. Uncompensated MEMS devices exhibit a distinct upturn at tau values between 10 seconds and 100 seconds, denoting dominant bias drift and random walk phenomena.
An operational Prony filter flattens this curve, extending the bias instability plateau out past 500 seconds.
| Performance Metric | Uncompensated Raw Die | Standard High-Pass (0.05 Hz) | Prony Digital Filter (p = 3) |
|---|---|---|---|
| Velocity Random Walk (m/s/sqrt(h)) | 0.042 | 0.041 | 0.042 |
| Bias Instability (micro-g) | 14.8 | 6.2 | 2.1 |
| Position Error at t = 60 s (m) | 3.85 | 0.92 | 0.08 |
| Position Error at t = 300 s (m) | 94.20 | 28.50 | 0.45 |
| Passband Group Delay (ms) | 0.0 | 2200.0 | 0.0 |
The comparative data reveals that while a standard high-pass filter reduces low-frequency bias, it introduces excessive phase delay and severely attenuates sustained sub-Hertz dynamic maneuvers. The Prony filter runs as a forward feed-subtract model driven by state transitions, preserving DC through-pass for genuine static inertial gravity vectors while nullifying internal structural decay transients.
Calibration errors propagate when the physical device operates under mechanical boundary constraints differing from the calibration fixture. Clamping an accelerometer to a rigid stainless-steel calibration chuck artificially restricts thermal expansion. Soldering that same component onto an FR4 printed circuit board introduces local asymmetric bending moments due to mismatched coefficients of thermal expansion.
The board flexes during temperature steps, altering the effective physical time constants. Characterization protocols execute on fully populated production circuit boards mounted within final enclosures to ensure the extracted Prony poles accurately mirror end-use mechanics.
Failing to account for mechanical board-level stress boundaries shifts the decay poles, leaving substantial residual drift uncorrected.

Runtime
Moving from static offline fitting to dynamic execution introduces operational constraints. In field applications, thermal disturbances arrive as continuous unpredictable variations rather than isolated step inputs. The digital filter relies on an accurate driving excitation signal to trigger compensation dynamics.
Utilizing internal sensor temperature registers provides this proxy mechanism, but raw temperature readings contain high-frequency digitized quantization noise that must be conditioned.
The driver pipeline utilizes a low-overhead temperature derivative calculation combined with zero-velocity updates (ZUPT). When an auxiliary condition, such as a stationary footstrike in pedestrian navigation or an idle condition in industrial machinery, confirms zero motion, the filter performs a background correction of the pole amplitude weights. Dynamic adaptation updates the scaling vector h through a recursive least squares (RLS) solver operating at a reduced sample rate.
The operational signal chain follows a fixed sequence:
- Thermal Gradient Acquisition reads the embedded temperature register at 50 Hz and calculates the localized derivative with respect to time.
- State Variable Propagation advances each uncoupled first-order Prony filter pole register using hardware multiply-accumulate units.
- Synthetic Drift Reconstitution scales and sums individual channel states into an instantaneous bias estimate.
- Dynamic Acceleration Extraction strips the reconstructed drift profile from the primary inertial measurement channel.
- Zero Motion Recalibration executes background coefficient adjustments when kinematic standstill conditions are verified.
Computational efficiency remains high during operation. A third-order Prony realization requires only three multiplications, two additions, and three state updates per raw sample tick. This low instruction overhead enables integration directly inside low-power ARM Cortex-M0+ or specialized sensor hub DSP cores without exceeding microampere-level power allocations.
Section 6.2 of the IEEE 1293 standard specifies that accelerometer thermal drift test profiles must capture stabilization times exceeding three package thermal time constants.
Execution constraints intensify when memory-constrained platforms require single-cycle execution. The mathematical precision demands of slow decay poles dictate that state accumulator registers retain 32-bit fractional representation even when the primary sensor data path operates across 16-bit integers. If the state registers underflow due to premature bit truncation, the synthetic drift prediction collapses to zero, exposing the downstream integrator to uncompensated physical baseline steps.
The core computational trade-off balances filter order against execution cycle latency inside constrained interrupt routines.

Yield
Integrating Prony drift compensation impacts procurement specifications and production test economics. High-performance MEMS accelerometers carry substantial testing costs, driven by long dwell times inside multi-axis rate tables with integrated thermal chambers. Production soak times of two to four hours per batch limit test throughput, establishing a high commercial cost floor for tactical-grade inertial units.
Deploying Prony filtering shifts calibration burdens from long physical soaks to rapid transient characterization. Instead of waiting for thermal equilibrium across multiple temperatures, manufacturing lines apply a sharp, controlled 15-minute thermal ramp. The transient trajectory is logged, high-speed automated software extracts the component-specific Prony poles, and the resulting polynomial coefficients write to non-volatile EEPROM registers on the sensor module.
Factory cycle time per unit drops from several hours to under twenty minutes, lowering assembly costs.
This operational shift alters standard supplier warranty and specification frameworks. Standard procurement contracts specify static bias temperature coefficients (expressed in milli-g per Kelvin) and run-to-run bias stability. A sourcing specification utilizing Prony filtering must define transient metrics, explicitly bounding allowable pole locations, settling limits, and maximum residual peak errors during active thermal transitions.
- Transient Thermal Peak Error specifies the maximum permitted acceleration deviation during a 2.0 degrees C per second thermal transient.
- Pole Stability Margin mandates that all identified discrete roots fall within a bounding circle radius of 0.99999 to guarantee mathematical convergence.
- Residual Drift Integral restricts the double-integrated positional error over a 60-second window following a thermal disturbance.
- Register Configuration Mapping governs the storage layout and coefficient precision of the calibrated decay parameters within module memory.
Component lot variation introduces another procurement risk. Silicon wafers manufactured across different fab lots demonstrate consistent mechanical resonant frequencies, but package assembly mold compounds show varying degrees of cure shrinkage and plasticizer outgassing. If a supplier changes epoxy resins or mold compounds without notification, the physical decay time constants drift away from the baseline model.
An algorithm tuned for a 12-second package relaxation will undercompensate a new formulation exhibiting an 18-second decay profile.
Sourcing strategies handle this risk by establishing explicit change notification protocols within supply contracts. Any alteration to die-attach elastomer chemistry, lead-frame plating, or package encapsulation resin requires mandatory re-characterization of the transient decay model. Engineering teams retain ownership of the pole-fitting software pipeline while procuring bare sensors or standard modules against rigorous transient baseline behavior.
This approach secures predictable long-term navigation and instrumentation performance without exposing the end platform to undocumented packaging adjustments.
When packaging formulations shift without warning, who absorbs the redesign cost if firmware filters fail incoming qualification?

