Skip to main content
Signal-to-Noise Filtering Methods

What to Fix First in a Multi-Stage Filter Workflow: Threshold Drift or Lag Compensation

You've got a multi-stage filter chain—say a low-pass then a high-pass, maybe a notch after that. It worked fine in simulation. But live data comes in and the baseline keeps wandering. Or there's a noticeable delay between input and output. Or both. Now you're staring at a mess of drifting thresholds and lag artifacts, wondering which knob to turn first. This article is for that moment. Not a textbook on filter theory, but a field guide for when theory meets reality. We'll walk through who actually runs into this (hint: it's not just beginners), what you need before you start, and a step-by-step workflow to decide: threshold drift first, or lag compensation first. And we'll be honest about when the order doesn't matter—and when it does.

You've got a multi-stage filter chain—say a low-pass then a high-pass, maybe a notch after that. It worked fine in simulation. But live data comes in and the baseline keeps wandering. Or there's a noticeable delay between input and output. Or both. Now you're staring at a mess of drifting thresholds and lag artifacts, wondering which knob to turn first.

This article is for that moment. Not a textbook on filter theory, but a field guide for when theory meets reality. We'll walk through who actually runs into this (hint: it's not just beginners), what you need before you start, and a step-by-step workflow to decide: threshold drift first, or lag compensation first. And we'll be honest about when the order doesn't matter—and when it does.

Who Needs This and What Goes Wrong Without It

Engineers in real-time control

You're staring at a chart that should look like a smooth step response. Instead it jitters — false triggers every few seconds, then a delayed reaction that nearly overshoots the limit. That sinking feeling? It's not one bug. It's two bugs fighting each other. Drift first: the threshold creeps because your sensor bias changes with temperature, so the comparator fires early or not at all. Lag second: your low-pass filter introduces a phase shift that misaligns the crossing point, so even when the threshold is correct the action arrives late. Together they create a feedback loop of corrections that never land. I have seen teams spend two weeks tuning PID gains only to discover the root cause was a 2% drift in the reference voltage. That hurts.

Wrong order.

Most real-time control engineers treat threshold drift and lag compensation as independent knobs. They're not. The catch is that drift error propagates into the lag estimate — if your baseline moves 5%, your phase measurement shifts by an unpredictable amount. Fix the drift first or every lag adjustment becomes a guess. The odd part is how often people skip this diagnostic step because their oscilloscope looks clean at power-on. It never stays clean.

‘We tuned the lag compensator three times. Turned out the threshold was walking 0.3% per hour. We were fighting yesterday’s calibration.’

— lead controls engineer, industrial automation retrofit

Biomedical signal processing teams

ECG R-peak detection is the classic nightmare. Your algorithm hits 98% accuracy on the public dataset but falls apart on the first patient with baseline wander. That wander is threshold drift — the amplitude envelope shifts because the patient breathes, moves, or the electrode dries out. Meanwhile, your bandpass filter introduces a 40-millisecond lag that shifts the peak location. Two errors: one false positive from drift, one misaligned timestamp from lag. Compound them and you get a heart-rate variability metric that looks like a seizure.

I watched a grad student chase a phantom arrhythmia for three months. The hardware was fine. The drift was 0.1 Hz low-frequency noise, the lag was from a 50 Hz notch filter he forgot to account for. He fixed the drift by switching to a median-baseline estimator, then measured the remaining lag as a constant offset. Problem gone in an afternoon. That's what happens when you isolate the failure mode — not when you throw more filtering at the raw signal.

What usually breaks first is the implicit assumption that drift is slow enough to ignore. It's not. Even 0.05 Hz drift can push your detection threshold across the noise floor during a long recording. And lag compensation without knowing the actual drift direction? You amplify the error. The team that doesn't separate these two will ship a device that works in the lab and fails on the ward.

Audio pipeline developers

Digital audio workstations hide this problem behind buffers. Threshold drift in a compressor’s envelope follower means the gain reduction kicks in at —18 dBFS one minute and —14 dBFS the next. That sounds like pumping. Lag compensation in the lookahead path then tries to fix the timing, but if the drift is non-linear the phase alignment never holds. You end up with a transient response that smears snare hits and breathes on bass notes.

Most teams skip this: they fix the lag first because it's easier to measure with a test tone. You can see the group delay on an impulse response, slap on a delay line, and call it done. But the drift is still there — it's just masked by the fixed latency. Switch to a different input level and the compressor behaves differently. That's not a bug in the algorithm. It's a bug in the order of operations.

The fix is boring but reliable. Stabilize the threshold baseline with a DC-blocking filter or a slow-slew-rate clamp before you touch any phase adjustment. Then measure the residual lag with the drift eliminated. Your latency figure will change — sometimes by a full sample period. That's the real value. Once the drift is gone, your lag compensation actually compensates for lag, not for the combination of two unknowns. It seems trivial. It's the step that separates a demo from a shipping product.

Prerequisites You Should Settle First

Stable baseline reference

You can't fix drift if you can't measure it. That sounds obvious — yet I have watched teams burn two weeks debugging a filter chain because their “reference” signal was itself drifting. The prerequisite is a stable baseline: a known, repeatable input that doesn't change between tests. A precision oscillator, a calibrated function generator feeding a fixed-frequency sine wave, or even a recorded sequence you loop through hardware. The catch is that the reference must be ground truth — not just “pretty stable” but traceable to a standard you trust. Most teams skip this. They assume the ADC input is clean, then spend days chasing phantom lag that turns out to be a 0.2 Hz wander in the source. Wrong order: measure the reference first, or you're fixing symptoms.

Honestly — most reading posts skip this.

That hurts. One concrete example: a telemetry pipeline we hardened last year — the baseline came from a thermocouple simulator with a published short-term drift specification below 0.01% per hour. Without that number, every correction we applied was guesswork. The prerequisite is not a lab-grade instrument; it's a documented reference that stays still while you poke the filter.

Known filter order and coefficients

Lag compensation is meaningless if you don't know what the filter should do. You need the filter order, the coefficient set, and the update rate — ideally in a form you can simulate offline. A 4th-order Butterworth low-pass behaves differently from a 5th-order Bessel, and the phase shift changes with every decibel of passband ripple. We fixed this by printing the actual coefficients from the firmware build, not trusting the design document that said “3rd order” when the code had five taps. The pitfall: undocumented modifications. Someone tuned the filter in production, forgot to update the spec, and now your lag measurement says 12 milliseconds but the real group delay is 19. The fix is to freeze the coefficient set before you start timing anything.

Check the filter response against a known input — a square wave works well. Does the rising edge overshoot? By how much? That overshoot is a direct measure of the phase nonlinearity you will later need to compensate. The tricky bit is that many engineers treat filters as black boxes. They're not. Know the poles, or you're flying blind.

Recorded test dataset with known events

You need a ground-truth dataset — a recording where every event has a known timestamp, preferably from a separate, independent measurement channel. A time-synchronized video feed, a contact closure from a mechanical switch, or a second sensor with negligible lag. Why? Because drift and lag are coupled. Without independent timestamps, you can't tell whether the output shifted in time or the baseline slipped in amplitude. I have seen this mistake more than any other: teams average the filter output and call it “lag” when the real problem was a 0.5% gain drift that pushed the threshold crossing earlier by six samples.

Record at least three minutes of data with known events every ten seconds. Crank the sample rate — 10x your filter bandwidth, minimum. Then inspect the edge alignment. The trade-off: longer datasets reveal slow drift but make manual labeling tedious. That's fine. Automation can flag candidate events; you verify a handful. The goal is a single dataset you trust completely. Use it to isolate drift, then to measure lag. Wrong sequence — trying both at once — guarantees you fix nothing.

Core Workflow: Diagnose Drift First, Then Lag

Step 1: Measure baseline drift over a quiet period

You can't fix what you have not measured. I have watched teams spend three days tuning lag compensation only to discover their threshold was creeping by 0.2 mV per minute—wasted effort. Park your signal in a known quiet state: no input, system idling, or a stable reference tone. Record at least 10 minutes of this baseline. The drift will show itself as a slow ramp, a periodic wobble, or a sudden step when a heater kicks on. Most people skip this because it feels unproductive. That hurts. Without that quiet window, you have no anchor, and every subsequent measurement inherits garbage.

Step 2: Correct drift with DC blocking or adaptive threshold

Once the drift pattern is visible, pick your weapon. For linear thermal drift—the kind that looks like a shallow ramp—a simple DC blocking high‑pass filter at 0.03 Hz usually kills it. But watch the phase shift at your signal frequencies; a poorly chosen cutoff shoves transient timing sideways, which masquerades as lag later. For non‑linear drift—sudden jumps from power supply glitches—an adaptive threshold that tracks the local median works better. The damn drift always looks innocent on a scope until it steals your lag numbers. — a technician after three false dead‑reckoning cycles, signal‑processing shop floor. We fixed this by logging both raw and corrected traces side‑by‑side for one full hour before trusting the correction.

Step 3: Measure lag via impulse response or cross‑correlation

Now that drift is tamed, lag measurement becomes honest. Inject a sharp impulse—a pulse one sample wide if your system tolerates it—and record the output edge. Cross‑correlation between input and output gives you the group delay in samples, not just a vague “seems slow.” The catch: correlation windows must be at least 2× the expected lag span, or you alias the timing. I have seen a 15‑sample delay read as 1.2 samples simply because the window was too short. That misleads you into over‑compensating. Measure three times with different impulse widths; if the delay shifts more than one sample, your drift correction is still leaky. Go back to Step 1.

Step 4: Apply compensation—phase correction or delay buffer

With a reliable lag number, you choose. If the lag is constant across frequency, a simple sample‑delay buffer reverses it. If it varies with frequency—common in analog anti‑aliasing filters—you need a phase‑correction IIR or an all‑pass filter. Don't guess: plot the phase response from your correlation data. Compensating a variable lag with a fixed buffer works only for one frequency band; the rest of your signal gets misaligned. The practical trade‑off: a buffer costs zero memory but adds latency in the opposite direction—your output now leads the input. That occasionally breaks closed‑loop controllers that expect causal data. Always verify with a second impulse test after compensation. If the lag flips sign, your drift is back. Tighten the DC block or raise the adaptive threshold’s learning rate. Wrong order guarantees a second debugging pass—one you could have avoided.

Tools, Setup, and Environment Realities

Software tools: scipy.signal, MATLAB, or hardware Biquad filters

Your toolchain decides which fix you can even attempt. Python's scipy.signal gives you sosfiltfilt for zero-phase filtering — tempting, but it chews through memory holding the entire signal twice. MATLAB's filtfilt does similar work with a cleaner UI, but licensing locks you out of headless deployments. Hardware biquad filters, the kind baked into DSP chips on sensor bridges, run at sample rates you can't touch with software. The trade-off is brutal: software lets you iterate on lag compensation in an afternoon; hardware locks the filter topology before the first board spin. I have watched teams waste three weeks proving a roll-off coefficient on a dev kit when a software patch would have taken ninety minutes.

That sounds fine until you hit a real-time loop that can't buffer past 256 samples.

The catch is — most teams pick the tool they know, not the one that matches the drift profile. A drifting temperature sensor with a 0.01 Hz corner frequency doesn't need a 24th-order Chebyshev; it needs a simple moving average with a lag that you can measure in samples, not seconds. Meanwhile, a vibration signal sampled at 10 kHz will drown your Python loop if you attempt a 60 dB stopband attenuation in software. Wrong order. Not yet. Choose the filter structure that fits the symptom, not the resume.

Real-time vs offline constraints

Offline lets you cheat. You can run forward-backward filtering, trim the edge transients, and even iterate on drift parameters after seeing the full dataset. Real-time gives you none of that slack. The filter must finish before the next sample arrives, or your pipeline drops data — and that drop becomes its own noise source. I once saw a prototype where the Kalman lag compensation was tuned perfectly in post-processing, then collapsed under a 50 Hz control loop because the matrix inversion took 23 microseconds too long. The gap between offline elegance and real-time grit is where threshold drift hides.

Not every reading checklist earns its ink.

What usually breaks first is the assumption that lag compensation from offline analysis translates directly.

Real-time constraints force a dirtier trade: accept a simpler drift estimator that converges faster, or optimize the lag compensator until it fits one core at 80% utilization. Neither choice feels clean. The trick I use is to instrument both paths — run the offline version on the same data while the real-time loop fires, then diff the output. If the error stays under one sample period, you're safe. If it drifts, your environment just vetoed your compensation strategy.

Resource limits (memory, CPU) and their effect on compensation choices

Memory caps squeeze both drift and lag fixes differently. Drift correction often needs a history buffer to estimate the baseline — a 10-second window at 1 kHz is 10,000 floats, trivial on a laptop, impossible on a Cortex-M0 with 16 KB of RAM. Lag compensation, by contrast, trades memory for phase accuracy: an FIR filter with linear phase needs N coefficients for N taps, so a 400-tap FIR eats 1.6 KB just for the coefficients. That's not the problem. The problem is the output delay — 200 samples of lag you now have to reverse somewhere else, which demands yet more buffering.

The odd part is — CPU limits often hurt drift correction more.

A floating-point division for an exponential moving average costs roughly 50 cycles on a low-end ARM. Run that at 50 kHz across six channels and you lose a noticeable slice of your instruction budget. Hardware multipliers on a DSP can fuse the multiply-accumulate into a single cycle, so a Biquad cascade runs faster than a single-pole IIR in software. The asymmetry matters: if your drift filter is cheap but your lag compensator is expensive, the bottleneck shifts. Most teams skip this: they benchmark the filter in isolation, not the cascade. Then the seam blows out under load. My rule of thumb is to profile both fixes with a worst-case burst of three simultaneous signals — returns spike, memory fragments, and your tidy scheme collapses.

Variations for Different Constraints

Biomedical sensors: low-frequency drift dominates, lag less critical

In a continuous glucose monitor or an EEG headset, drift is the silent killer. Temperature shifts, electrode polarization, or even sweat chemistry changes can slowly pull the baseline away from zero—and once that drift enters the filter chain, everything that follows gets skewed. Lag, by contrast, is often tolerable. A 200-millisecond delay in heart-rate onset detection? The clinician doesn’t notice. But a baseline that has wandered 0.3 mV over an hour? That corrupts every peak-picking algorithm downstream. I watched a research team waste two weeks chasing false apnea events before they realized the high-pass filter was fighting a drift that should have been corrected at the input stage. Wrong order. The fix: stabilize the hardware reference channel first, then apply a gentle 0.01 Hz high-pass as a trim—not as the primary drift remover. That alone halved their rework rate.

The catch is that biomedical devices are sensitive to phase distortion. If you compensate drift with aggressive filtering, you introduce a phase shift that shifts R-wave timing in an ECG—bad for beat-to-beat variability analysis. So you fix drift mechanically or via baseline subtraction before the digital filter touches the data. Hardware-level drift correction, then digital smoothing. Lag becomes a secondary concern—you can afford 100–300 ms of group delay in most clinical monitoring. What breaks a study is a drifting offset that gets amplified by subsequent stages.

Audio pipelines: lag must be minimal, drift often DC offset

Audio flips the priority. Here, lag is the enemy—anything above 10 milliseconds of added latency breaks live monitoring, folds back, or makes a vocalist feel like they’re swimming through mud. Drift? Usually a constant DC offset from a bad preamp or phantom-power leak, which a single DC-blocking filter (cut around 10–20 Hz) can kill in one pass. No iterative correction needed. The odd part is—people still try to run drift-first methods in DAW plugins, adding a slow adaptive filter that introduces 50 ms of smearing. That hurts. A session guitarist will notice 15 ms of latency immediately; they won’t notice a 5 mV offset that the speaker cabinet can’t reproduce anyway.

‘Fix the thing the human ear hears first. That's never the DC offset.’

— mixing engineer, after a late-night session with a drifting vocal chain

So in audio, you apply a fixed DC-blocking high-pass before any dynamic processing, then tune your lag compensation aggressively—often by oversampling or using minimum-phase filters. If you reverse the order, you get a low-latency drift compensator that actually adds ripple in the passband. Not a good trade. The rule: zero-lag offset removal is cheap; zero-compromise latency is not.

Industrial control: both matter, but drift from temperature changes

Industrial sensors—pressure transmitters, thermocouples, accelerometers on a spinning shaft—live in a different beast. Drift arrives as a slow ramp caused by ambient temperature cycling across a plant floor. A 0.1% drift per degree Celsius sounds small until your process vessel is seeing 40 °C swings over a shift. Lag, simultaneously, matters because feedback loops need real-time response—a 500 ms delay in a PID loop can cause over-correction oscillation. So which do you fix first? The answer is neither in isolation: you calibrate the thermal behavior as a precondition. Most teams skip this: they build a two-stage filter where the first stage is a temperature-compensated offset model (not a classic filter), and the second stage is a latency-tuned low-pass. That way, drift is handled by mapping temperature to baseline shift—effectively predicting the drift rather than filtering it afterward—and the lag compensation is only concerned with the residual.

I saw a steel mill tear out a $12,000 filter module because they applied drift-first correction (a slow notch at 0.002 Hz) that introduced 800 ms of delay—the rolling mill started producing gauge errors. They swapped to a thermal-model precompensation, kept the lag at 40 ms, and the drift problem vanished. The lesson: when both dimensions are critical, don’t solve one at the cost of the other. Use domain physics to absorb the drift before the filter chain starts.

A practical pitfall here: temperature compensation models need re-calibration every few months, as sensor aging changes the drift-to-temperature slope. If you skip that, the order of your filter stages becomes irrelevant—the whole system drifts anyway. Schedule a monthly baseline check alongside your filter maintenance.

Honestly — most reading posts skip this.

Pitfalls, Debugging, and When It Fails

Overcorrecting drift masks non-stationary lag

The most common trap I see: teams apply aggressive drift correction—say, a high-pass filter at 0.5 Hz—then declare lag is null because the baseline looks flat. That sounds fine until the signal drifts back mid-recording faster than your correction time constant. The real culprit is non-stationary lag—varying delay across frequency bands—which drift correction can't touch. You end up with a clean baseline and a completely mangled phase response. Wrong order. The giveaway: residual slope visible in the first 100 samples after every lag compensation step, but gone when you re-run drift first. Check by plotting the phase difference before and after your lag fix; if drift reappears, you buried it, not solved it.

Phase compensation increasing noise at edges

Phase compensation—typically an all-pass filter—promises to flatten group delay without touching magnitude. The catch: edge transients. I have debugged a system where applying lag correction via a minimum-phase equaliser introduced 12 dB of high-frequency noise at the start of every burst. The compensation shifted the phase, yes, but it also pushed energy into bins where the signal-to-noise ratio was already marginal. That hurts more than the original lag. One check: compare the variance in the first 50 samples against the middle third of your record. If the edge variance is >2× the middle variance, your phase stage is injecting noise, not removing delay. A concrete fix: window your compensation impulse response with a Tukey window (α=0.2) — the trade-off is a few extra milliseconds of effective delay, but the noise floor drops. Not a miracle, but it works.

Checking for interaction between stages

Most workflows treat drift and lag as orthogonal. They're not. A Kalman-filter-based drift estimator can alias into lag if your process noise covariance is too tight — the filter interprets every slow deviation as true drift and every fast deviation as lag. Suddenly your lag compensator sees a signal that's half-drift, half-lag, and tries to undo both. The result is a muddled mess. I have watched two perfectly tuned stages cancel each other out when cascaded. The diagnostic is blunt but effective: run each stage alone on a synthetic chirp with known drift and known lag. Compare outputs. If the combined output shows worse latency than either stage alone, you have an interaction. Rarely does a simple series connection work out of the box — you need a cross-correlation check between the two outputs. Most teams skip this. They pay for it in debugging time later.

'We fixed drift, we fixed lag, but the cascade still oscillated at 0.1 Hz. Turned out the lag stage was re-integrating the DC removed by drift.'

— engineer describing a real post-mortem, not hypothetical

You can limit interactions by inserting a 2-second gap of zeros between the stages during testing. If the combined output diverges from the sum of isolated outputs, you have coupling. That's your cue to insert a buffer — a simple energy-based gate that passes the drift-corrected signal only when the lag estimator is settled. Adds 50 ms of delay. Acceptable. The hardest part is resisting the urge to tune both stages simultaneously. Don't. Tune drift alone until you can flip the signal upside-down and still recover the baseline. Then tune lag. I have never seen this order fail unless the signal itself has no stationary region — and in that case, no multi-stage filter will save you.

FAQ: Quick Answers to Common Questions

Can I fix both at once?

In theory—yes. A single optimization pass that adjusts threshold and lag simultaneously sounds elegant. I have seen teams try this, and the result is almost always a mess you can't debug. The problem is attribution. When you tweak both knobs at the same time and the output improves, you don't know which adjustment did the heavy lifting. Worse: if the output degrades, you have no idea which parameter introduced the error. The pragmatic answer is no—fix one, measure, then fix the other. That sounds slow. It's faster than unwinding a coupled failure two weeks later.

What if drift and lag are coupled?

They often are, and that's where most workflows break. A drifting threshold can create the illusion of lag—your filter misses events, you blame delay, you add compensation, and suddenly noise floor rises because you were reacting to drift, not true latency. The reverse happens too: lag makes your threshold look unstable because peaks arrive late and overlap with the next noise burst. How do you untangle them? Freeze one variable. Set lag to a safe, slightly generous value, then run your drift diagnostics. Once drift is stable, tighten lag in isolation. I once spent three days chasing a "lag bug" that turned out to be a 2 % drift in a temperature-sensitive ADC reference. Freezing lag first saved the week.

The biggest pitfall here is assuming linearity. Drift and lag don't stack cleanly—they interact in ways that vary with signal frequency. A low-frequency drift masks a high-frequency lag problem. A bursty signal makes both look like random jitter. The only reliable disambiguation is a controlled sweep: inject a known pulse, record the filter response, and compare expected vs. actual timing and amplitude. That test takes twenty minutes. Skipping it costs days.

Do I always need a test dataset?

Yes. No shortcuts. The one time you skip it's the one time coupling hides in plain sight. But "test dataset" doesn't mean a massive labeled corpus—it means a few minutes of representative signal where you know the ground truth. Record a clean pulse train, inject controlled noise, run your filter, and compare outputs. That's your baseline. Without it, you're guessing.

The absence of a test set is the single most common reason multi-stage filters fail in production.

— Field observation from a telemetry project that lost eight hours to a coupling bug a simple pulse test would have caught in eight minutes.

Start with a 60-second capture. Mark three expected events by hand. Verify your filter hits them within your tolerance. If it doesn't, run the drift-first diagnosis. If it does, tighten lag. That's your minimum viable test. Scale up later if constraints demand it—but one known-good capture beats a terabyte of unverified logs.

What to Do Next: Your Action Checklist

Record a 1-Minute Baseline With No Signal

Before you touch a single filter knob, capture silence. Disconnect the sensor input, short it if possible, and log raw ADC values for sixty seconds. This is your ground truth — not theory, not a spec sheet number. I have seen teams waste two full days chasing a phantom drift that turned out to be a loose connector wiggling at 0.03 Hz. The baseline tells you what the hardware itself is doing before you ask it to measure anything real. No excuses. Every real-world filter workflow I have debugged started here; the ones that skipped it died later on false triggers and buried step edges.

Measure Drift Slope and Variance

Take that one-minute trace and run a simple linear fit. What is the slope in microvolts per second? What is the residual variance around that line? If the slope exceeds 0.1 % of your expected signal amplitude over the window, you have a drift problem — not a lag problem. Wrong order. Don't move to lag compensation until drift is gone or characterized. The catch is that drift hides inside low-frequency wander that looks like a legitimate signal shift. Plot the autocorrelation of your baseline; a slow exponential decay means thermal or bias drift, not a step event. We fixed one patient-monitor feed by realizing the drift slope was exactly the op-amp warm-up curve — seven minutes of settling time we had never accounted for.

If Drift Present, Implement DC Removal or Adaptive Threshold

Simple high-pass at 0.1 Hz works for steady-state systems. But what if your sensor platform rotates or your patient moves? Then you need an adaptive threshold that tracks the local mean over a sliding window — say, 5x your expected event duration. Trade-off: too aggressive a window kills slow, legitimate signal features. Too wide and drift leaks through. I prefer a median filter over a mean filter for the baseline estimator; it shrugs off outlier spikes that would pull a moving average astray. That hurts when spikes are frequent, so add a blanking rule: ignore samples above a hard clipping threshold when updating the baseline. Not pretty. It works.

Then Measure Lag via Cross-Correlation on a Known Step Event

Drift is tamed. Now inject a sharp step — a calibrated pulse, a mechanical tap, or a software-generated square wave through the analog front end. Cross-correlate the expected edge with the actual filtered output. The peak offset in samples is your lag. Do this ten times and take the median. Most teams skip this: they assume filter latency equals half the filter order divided by bandwidth. That's a textbook number — not the real delay from op-amp slew limits, anti-aliasing phase ripple, or a misconfigured buffer. The odd part is that lag often varies with signal amplitude; low-amplitude steps can slip through with less phase shift because the filter's internal rails never saturate. Measure across three amplitudes. Write down the numbers. Then you decide: do you subtract a fixed delay in post-processing, or do you tighten the filter bandwidth and accept more noise? That is the real workflow — drift first, lag second, trade-offs third.

“We zeroed drift with a DC block, then found the lag was 12 ms. We never would have spotted the 12 ms if the drift was still wandering 50 mV.”

— Field engineer, after retrofitting an industrial vibration monitor

Share this article:

Comments (0)

No comments yet. Be the first to comment!