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
Position double-integration turns low-frequency accelerometer errors into runaway drift within seconds. A capacitive Micro-Electro-Mechanical Systems (MEMS) accelerometer with a root-power spectral density of 20 micrograms per square-root hertz drifts by several meters after one minute of integration whenever residual DC bias and viscoelastic relaxations go uncorrected. Packaging epoxy stress relaxation, thermal gradients crossing the sensing beams, and dielectric charge accumulation all follow multi-exponential decay paths over time.
Prony analysis breaks these continuous physical relaxations down into discrete complex exponential poles. Representing the drift as an autoregressive state response lets the signal processor strip non-stationary baseline wander from dynamic inertial acceleration on the fly.
Datasheets typically quote bias repeatability and temperature coefficients under steady-state chamber conditions. Operating environments, however, deliver rapid temperature swings and uneven mounting torques that trigger structural viscoelastic relaxation. These disturbances unfold as stretched exponentials or as sums of distinct time constants that span fractions of a second to tens of minutes.
Standard high-pass filtering cuts into legitimate low-frequency kinematic acceleration, while classical polynomial detrending needs future samples, ruling out hard real-time signal paths. A Prony-derived filter bypasses both issues by tracking the assembly’s decay behavior directly in 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 these parameters requires separating pole identification from linear amplitude estimation. Fourier methods falter on heavily damped, transient data because continuous spectral leakage smears energy across adjacent low-frequency bins. Prony reformulated the non-linear optimization as a polynomial root-finding problem.
The sampled values satisfy a linear constant-coefficient difference equation whose roots yield the system poles directly.
Building the discrete linear prediction matrix anchors the autoregressive stage. 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). For baseline drift compensation, valid roots must sit strictly inside the unit circle along the positive real axis. Complex conjugate pairs indicate high-frequency mechanical resonance or ringing and are discarded to retain only monotonic drift relaxations.
Real roots between zero and one map to physical decay time constants tau(k) via tau(k) = -T / ln(z(k)).

Do Real Accelerometers Exhibit Multiple Distinct Decay Rates?
Differential scanning calorimetry and mechanical dynamic analysis show package stresses operating across clearly separated physical timescales. Die-attach adhesives show short-term viscoelastic creep over 1 to 5 seconds. Silicon-to-glass anodic bonds relax over 30 to 120 seconds, while convective thermal equilibrium across the surface-mount package takes hundreds of seconds to settle out.
Fitting drift with a single exponential pole inevitably misses either the initial steep transient or the long trailing edge. A third-order or fourth-order Prony series matches the multi-pole behavior observed across packaged silicon dice.
| 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% |
Finding the amplitude weights h(k) proceeds once the roots z(k) are known. Constructing a Vandermonde matrix from the roots over observation steps n from 0 to N minus one allows the weights h to be solved through a Moore-Penrose pseudoinverse. Because sensor noise in the autoregressive matrix Y can push calculated roots slightly outside the unit circle, implementations regularly project any unstable root back inside the stable unit boundary.
Ignoring higher-order package relaxation poles causes positional divergence when baseline velocity thresholds drift unchecked.

Lattice
Executing Prony coefficients inside embedded firmware requires a numerically well-behaved filter structure. Standard Direct Form II Infinite Impulse Response (IIR) topologies show high roundoff sensitivity when poles gather near z = 1. For an accelerometer running at 200 Hz with a physical decay constant of 50 seconds, the discrete pole sits at z = exp(-1 / (200 50)) = 0.99990.
On fixed-point microcontrollers or single-precision floating-point DSPs, rounding errors in direct-form structures routinely create limit cycles and noise accumulation.
Parallel state-space topologies and normalized lattice filters avoid these coefficient-sensitivity penalties. A parallel implementation decomposes the p-th order Prony model into p decoupled, first-order stages. Each branch tracks an isolated physical relaxation process without cross-coupling state errors into neighboring registers.
The state update equations run every sampling interval:
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 structure prevents internal instability. Keeping each sub-filter pole z(k) bounded between 0 and 1 maintains bounded-input bounded-output (BIBO) stability regardless of register precision limits. On integer microcontrollers, these first-order sections execute with elementary shift-and-add instructions, sidestepping real-time matrix evaluations.
Parallel first-order decoupling prevents pole-clustering roundoff degradation in precision floating-point registers.
Pole location quantization directly shifts the realized decay rate. A 16-bit fractional word causes noticeable time-constant errors whenever a pole lands within 0.0001 of the unit circle. Single-precision IEEE 754 floating point allocates 24 mantissa bits, resolving poles to six decimal places ~ adequate for decay constants spanning several minutes at kilohertz rates.
Applications demanding 1 kHz sampling alongside hour-long structural relaxation constants require 64-bit double-precision state variables so truncation does not halt state updates entirely.
On-chip factory trim tables zero out static room-temperature offsets, but leave transient thermal relaxation states uncompensated.

Bench
Bench validation requires separating genuine kinematic motion from structural package relaxation. Running this qualification demands stable multi-axis rotation combined with isolated thermal forcing. The test fixture mounts an air-bearing rate table onto an isolated seismic mass that maintains over 80 dB of vibration isolation up to 200 Hz. A programmable Peltier plate clamped to the device-under-test generates thermal transitions up to 2 degrees Celsius per second while the table stays motionless.
The bench evaluation runs through a defined sequence to distinguish mechanical hysteresis from thermal transients.
- 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.
Allan deviation plots highlight compensation performance across different integration horizons tau. Raw MEMS readouts swing upward between tau = 10 seconds and tau = 100 seconds as bias drift and rate random walk take over. The Prony filter flattens this region, pushing the onset of bias instability 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 profiles break down if mechanical boundary conditions differ between test sockets and production enclosures. Bolting an accelerometer to a rigid stainless-steel calibration chuck artificially constrains package expansion. Soldering that same part onto an FR4 printed circuit board introduces uneven thermal expansion moments as the substrate flexes across temperature, changing the physical decay time constants.
Reliable characterization requires logging transient profiles on fully populated circuit boards installed in their operating enclosures.
Failing to account for mechanical board-level stress boundaries shifts the decay poles, leaving substantial residual drift uncorrected.

Runtime
Transitioning from offline fitting to real-time firmware execution introduces operational constraints. Field thermal variations arrive as irregular gradients rather than clean test steps, meaning the filter needs a continuous reference input to drive the compensation model. On-die temperature sensors supply this signal, though raw readings contain quantization steps that require smoothing before entering the filter pipeline.
The runtime pipeline pairs temperature derivative estimation with zero-velocity updates (ZUPT). Whenever external states verify that the sensor is stationary ~ such as during footstrike intervals in pedestrian navigation or equipment idle states ~ the firmware refines pole amplitudes in the background. A recursive least squares (RLS) routine adjusts the weight vector h at a low update frequency.
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.
Resource usage remains modest during runtime. A third-order Prony filter requires three multiplies, two additions, and three state updates per incoming sample. That computational footprint runs comfortably inside low-power ARM Cortex-M0+ devices or sensor-hub DSP blocks without straining microampere power budgets.
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.
Memory-limited architectures demand careful wordlength allocation during fast interrupt servicing. Modeling slow relaxation poles requires keeping 32 fractional bits inside the filter states even when accelerometer channels report 16-bit values. If state registers underflow from premature truncation, the synthetic drift estimate drops out entirely, dumping uncompensated baseline steps directly into downstream velocity integrations.
The core computational trade-off balances filter order against execution cycle latency inside constrained interrupt routines.

Yield
Prony compensation fundamentally changes production testing economics. High-performance MEMS units rack up calibration costs primarily through long thermal dwell cycles on multi-axis rate tables. Thermal soak cycles of two to four hours per production lot throttle test throughput, establishing a high floor on tactical-grade sensor manufacturing costs.
Prony filtering substitutes long equilibrium soaks with transient characterization. Instead of waiting hours for thermal equilibrium across multiple step plateaus, test stations apply a single 15-minute thermal ramp. Production software logs the transient, calculates component-specific poles, and burns the polynomial parameters into module EEPROM.
This shortens per-unit calibration from hours to under twenty minutes without sacrificing baseline stability.
This workflow requires updating incoming procurement specifications. Standard agreements specify static bias temperature coefficients (milli-g per Kelvin) alongside turn-on bias repeatability. Specifications incorporating Prony compensation need to bound transient parameters directly, defining allowable pole distributions, settling envelopes, and allowable residual peak error 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.
Lot-to-lot packaging variation presents a continuing supply risk. Silicon dies maintain consistent resonant characteristics across fabrication batches, but packaging resins vary in cure shrinkage and plasticizer loss. When an epoxy compound changes without notice, physical relaxation time constants change with it.
An algorithm tuned for a 12-second package relaxation leaves noticeable residual error when run against a resin showing an 18-second decay profile.
Managing this risk requires formal engineering change notices written into supplier contracts. Modifications to die-attach elastomer chemistry, lead-frame finishes, or mold resins must trigger recalibration of the transient model. Holding ownership of the extraction pipeline while procuring bare sensors or standard modules against transient drift limits protects navigation systems from unannounced packaging revisions.
Unannounced adjustments to resin chemistries shift relaxation poles, leaving incoming quality assurance to absorb re-characterization overhead when fixed-coefficient firmware filters fail validation.

