1. Raw Crash Signal Inspection and Artifact Identification

Why the raw signal must be inspected before any filter is applied

Every downstream decision in a crash signal processing chain — cutoff frequency, filter order, phase compensation, integration to velocity and displacement — depends on what the raw acceleration record actually contains. A filter cannot distinguish between a genuine structural resonance and a sensor artifact; it will attenuate both. If clipping, dropouts, or baseline drift are present and undocumented, the filtered result may look clean while being physically wrong. The task in this case is therefore diagnostic, not corrective: load one raw acceleration channel, examine it in the time domain and the frequency domain, and produce an explicit, itemized list of visible artifacts with their time locations and suspected causes. That list becomes the baseline against which every later filtering step is judged.

Inputs and inspection setup

Work with a single uniaxial accelerometer channel from a frontal impact test, sampled at 10 kHz (Δt = 0.1 ms), with the positive axis defined as the vehicle longitudinal direction pointing forward. State this convention explicitly, because the sign of the initial deceleration pulse and the polarity of any baseline offset are interpreted against it. A representative teaching record can be described by these parameters:

  • Duration: 150 ms pre-trigger to 300 ms post-trigger (4500 samples).
  • Nominal full-scale range: ±500 g; sensor saturation at ±500 g.
  • Expected event: sharp deceleration onset near t = 0 ms, peak magnitude in the 60–120 g band for a moderate frontal pulse.
  • Known good reference: a second, co-located channel or a documented static calibration offset, used only to confirm suspected artifacts.

If you are working in Python, the inspection itself needs no filtering library — only loading, plotting, and a spectrum estimate:

import numpy as np
import matplotlib.pyplot as plt

# Load: two columns, time [s] and acceleration [g]
data = np.loadtxt("raw_channel.csv", delimiter=",", skiprows=1)
t, a = data[:, 0], data[:, 1]
fs = 1.0 / np.mean(np.diff(t))          # ~10000 Hz
print(f"samples={a.size}, fs={fs:.0f} Hz, dt={1000/fs:.3f} ms")

# Time-domain overview
fig, ax = plt.subplots(2, 1, figsize=(10, 6))
ax[0].plot(t * 1000, a, lw=0.8, color="#1f6feb")
ax[0].set_xlabel("time [ms]"); ax[0].set_ylabel("acceleration [g]")
ax[0].set_title("Raw crash acceleration — time domain")
ax[0].grid(alpha=0.3)

# Frequency domain: one-sided amplitude spectrum
a0 = a - a.mean()                        # remove DC only for display
freq = np.fft.rfftfreq(a.size, d=1/fs)
amp = 2.0 * np.abs(np.fft.rfft(a0)) / a.size
ax[1].semilogy(freq, amp, lw=0.8, color="#0f9d58")
ax[1].set_xlim(0, fs/2); ax[1].set_xlabel("frequency [Hz]")
ax[1].set_ylabel("amplitude [g]")
ax[1].set_title("One-sided amplitude spectrum")
ax[1].grid(alpha=0.3, which="both")
plt.tight_layout(); plt.savefig("raw_inspection.png", dpi=150)

Two practical notes on the spectrum. First, subtracting the mean removes only the DC bin; a slow drift still spreads energy across the lowest few hertz and will appear as a rising skirt near 0 Hz — that skirt is itself diagnostic evidence. Second, do not apply a window before you have looked at the raw time series; a window can mask a dropout at the record edges.

Reading the time domain: the three artifact signatures

Inspect the time plot at full resolution and then zoom into the impact window. The three artifact classes have distinct, recognizable shapes:

ArtifactTime-domain signatureFrequency-domain footprintTypical cause
ClippingFlat-topped plateau at a constant value; consecutive samples identical to the last bitBroadband harmonics; elevated high-frequency floor during the clipped intervalExceeding sensor full-scale or amplifier rail
DropoutAbrupt step to zero or to a held value, then a step back; often a single sample or short runImpulse-like broadband energy; comb structure if periodicLoose connector, telemetry packet loss, ADC fault
Baseline driftSlow, low-frequency wander of the pre- and post-event mean away from zeroEnergy concentrated below ~5 Hz; rising 1/f-like skirtThermal drift, charge amplifier offset, DC coupling error

Quantify each candidate rather than eyeballing it. For clipping, count samples within one LSB of the maximum absolute value and report the contiguous run length and its start/end times. For dropouts, compute the first difference and flag any |Δa| that exceeds a physically plausible slew limit (for this sensor, a few thousand g/s); a step of tens of g in one sample is almost certainly an artifact, not mechanics. For drift, compute the mean over a quiet pre-trigger window (e.g., −150 to −20 ms) and over a post-event window (e.g., 200–300 ms); a difference of more than a few g between them, with no corresponding physical event, indicates drift.

Record every flagged artifact as a row: artifact type, start time, end time, peak or offset magnitude, and the evidence used to classify it. This table is the deliverable of the case and the input to every later filtering decision.

Artifact map and decision logic

The figure below summarizes how the three signatures are separated during inspection and what each one implies for the subsequent processing chain. It is a classification and consequence map, not a processing sequence: the branches show which evidence confirms each artifact and which later step is affected.

Raw crash acceleration: artifact identification map Raw channel, 10 kHz, ±500 g time plot + one-sided spectrum Clipping flat-top plateau at ±500 g Evidence: run of identical samples at full-scale; harmonic floor rises during the plateau Dropout step to zero / held value Evidence: |Δa| exceeds slew limit; impulse-like broadband energy in spectrum Baseline drift slow mean wander Evidence: pre vs post mean differ by > few g; energy below ~5 Hz Artifact log: type · t_start · t_end · magnitude · evidence baseline for all later filtering decisions Clipping → peak amplitude unreliable Dropout → local spectrum corrupted · Drift → low-frequency bias

Verification and common failure modes

Confirm the inspection before trusting it. A useful check is to re-plot the record with the flagged intervals shaded and the pre/post means drawn as horizontal reference lines; if the shading does not sit exactly on the visible anomaly, the time indexing is wrong — a frequent error when the time column starts at a negative pre-trigger value and the array index is used instead of the time value. Verify that the sample count equals duration × fs; a mismatch means the loader dropped rows or the delimiter was misread, which can itself create apparent dropouts.

Typical symptoms and their interpretation:

  • Spectrum shows a strong line at exactly fs/2 or at a fixed low frequency unrelated to the pulse: suspect aliasing or a periodic telemetry artifact, not mechanics; check the anti-alias filter setting and the packet rate.
  • Every channel shows the same flat-top at the same instant: the saturation is in the shared amplifier or recorder, not the individual sensor; the artifact log should note the common cause.
  • Drift appears only after integration: the raw acceleration drift was small but the integration constant amplified it; record the pre-trigger mean so the later high-pass step has a documented reference.
  • No artifacts found but the pulse looks implausibly smooth: the record may already have been filtered upstream; check metadata before proceeding, since a pre-filtered record invalidates cutoff selection.
Do not "fix" anything at this stage. Correcting clipping by interpolation or removing drift now would destroy the evidence needed to choose and validate the filters in the following steps. The output of this case is a documented artifact log, not a cleaned signal.

When the log is complete — each artifact typed, time-stamped, quantified, and tied to its evidence — the raw record has a defensible baseline. Any later filter can then be evaluated against a known set of defects, and improvements in peak preservation or drift removal can be attributed to the filter rather than to an undocumented edit of the raw data.