Signal Processing
- 1Apply time- and frequency-domain analysis to EMG signals
- 2Reason about sampling, aliasing, and filter trade-offs quantitatively
- 3Separate signal from artifact using principled methods
The electromyographic signal that reaches the screen is already a digital object — a finite sequence of numbers sampled from a continuous bioelectric field — and every quantity the clinician reports is a transformation of that sequence. Amplitude, duration, turns, median frequency, and latency are not properties of the patient but of the patient as processed: they emerge from choices about sampling rate, filter design, and analysis window that the instrument makes silently. Treating signal processing as the experimental apparatus it is — rather than as a black box behind the trace — is what separates a measurement one can defend from a number one merely reads, and the mathematics involved is neither optional nor incidental to expert interpretation.
Time-domain analysis: quantifying the interference pattern
The most direct descriptors live in the time domain, operating on the voltage sequence x[n] itself. Peak-to-peak amplitude captures the largest excursion but is dominated by the single nearest fibre and is therefore an unstable estimator of motor-unit population. The root-mean-square (RMS) amplitude, √(⟨x²⟩), integrates power across the whole window and is the preferred measure of contraction intensity precisely because it is insensitive to any one spike — it tracks the energy of the interference pattern rather than its tallest peak.
When voluntary effort recruits more units than the eye can resolve, the pattern becomes a dense interference pattern whose complexity must be quantified statistically. Turns analysis counts directional reversals exceeding an amplitude threshold (typically 100 µV), and amplitude per turn measures the mean voltage change between reversals; plotting turns against amplitude across graded contractions yields the Willison / turns–amplitude cloud, in which myopathy shifts the distribution toward many small turns and neuropathy toward few large ones. Zero-crossing counts — how often the signal traverses baseline per unit time — provide a cheap surrogate for spectral content, since a signal rich in high frequencies crosses zero more often. Together these descriptors let the interference pattern be quantitated objectively at high force, where individual MUAP analysis is impossible.
Frequency-domain analysis: the spectrum and fatigue
The complementary view decomposes the signal into its constituent frequencies. The discrete Fourier transform (DFT), computed efficiently by the fast Fourier transform (FFT), maps the time series onto a set of sinusoids; the squared magnitude of those coefficients, normalized for window length, is the power spectral density (PSD) — the distribution of signal power over frequency. From the PSD two scalar summaries are derived: the mean frequency (the power-weighted centroid) and the median frequency (the frequency dividing total power into equal halves). The median is generally preferred for being more robust to noise and additive interference.
The signature application is the study of muscle fatigue. As a sustained contraction proceeds, intramuscular pH falls, muscle-fibre conduction velocity slows, and the motor-unit action potentials broaden in time; a broader potential carries relatively more low-frequency energy, so the entire spectrum shifts leftward— the median frequency declines, often by 20–50% before mechanical failure. This spectral compression is detectable long before force output falls and provides a non-invasive, continuous index of peripheral fatigue that pure force or amplitude measures cannot supply.
Fatigue is non-stationary, so a single FFT over a long epoch blurs the drifting spectrum. The fix is a short-time Fourier transform— FFTs over sliding windows — but here the time–frequency uncertainty principle bites: a short window localizes the change in time yet resolves frequency coarsely, while a long window resolves frequency finely yet smears the timing. There is no setting that is sharp in both; the analyst chooses the window to match how fast the median frequency is expected to move, and reports the choice.
Sampling theory: Nyquist, bandwidth, and aliasing
Digitization is governed by the Nyquist–Shannon sampling theorem: a signal band-limited to a maximum frequency f_max can be reconstructed exactly only if it is sampled at a rate f_s > 2·f_max. The penalty for violating this is aliasing — frequency components above f_s/2 (the Nyquist frequency) fold back and masquerade as lower frequencies, irreversibly corrupting both the waveform and its spectrum. Crucially, aliasing cannot be undone after sampling; it must be prevented before the analog-to-digital converter by an anti-aliasing low-pass filter that removes energy above f_s/2.
Needle-EMG energy extends to roughly 10 kHz, with the fastest single-fibre spikes contributing components near that ceiling. Nyquist therefore demands a sampling rate well above 20 kHz — in practice > 20–40 kHzper channel — to capture the spike content faithfully and to leave a guard band for the anti-aliasing filter's finite roll-off. Undersampling does not merely soften the trace; it can manufacture spurious low-frequency oscillations that mimic spontaneous activity, which is why adequate sampling is a precondition for, not a refinement of, valid waveform analysis.
Raise the high-pass filter and the slow components of each potential vanish — amplitude falls and the waveform narrows, which can shorten apparent duration. Lower the low-pass filter and fast spikes are rounded off, reducing amplitude and adding latency. The 60 Hz notch removes line noise but carves a hole in the physiologic signal that lives there too.
Digital filtering: FIR, IIR, and phase
Once digitized, the signal is shaped by digital filters of two families. Finite impulse response (FIR) filters compute each output as a weighted sum of input samples only; with symmetric coefficients they achieve exactly linear phase, meaning every frequency is delayed by the same constant time. Linear phase preserves waveform morphology — the relative timing of peaks is undistorted — at the cost of higher computational order and a longer fixed latency. Infinite impulse response (IIR) filters feed previous outputs back into the computation, achieving sharp roll-off with far fewer coefficients, but their phase response is non-linear: different frequencies are delayed by different amounts, so the waveform shape is warped even when the magnitude response is ideal.
This phase behaviour is not academic. A non-linear-phase filter can shift the onset latency of a CMAP or SNAP and distort peak amplitude and morphology, biasing the very numbers used for diagnosis. The standard remedy in offline analysis is zero-phase filtering— passing the signal through the filter forwards and then backwards (as in a forward– reverse filtfilt operation) so the phase shifts cancel — which yields zero net latency distortion but is acausal and therefore unavailable in real time. The expert recognizes that a latency measured through an aggressive causal IIR high-pass is not directly comparable to one measured through a linear-phase or zero-phase path.
Artifact removal: ICA and template subtraction
Some contaminants overlap the signal in both time and frequency and so cannot be filtered away without destroying physiology; these demand model-based removal. Independent component analysis (ICA) assumes the recorded channels are linear mixtures of statistically independent sources and unmixes them, allowing a contaminant with a distinct spatial signature — power-line pickup, motion, or in surface recordings the electrocardiogram — to be identified as one component and removed before the channels are reconstructed. ICA is powerful for multichannel and high-density surface EMG but requires more sensors than sources and can leak signal into the rejected component if the independence assumption is only approximate.
For contaminants that are stereotyped and repetitive, template subtraction is more surgical. The recurring waveform — the stimulus artifact that obscures a short-latency onset, or the ECG complex riding on a trunk or proximal surface recording — is averaged into a template, aligned to each occurrence, and subtracted, leaving the underlying EMG intact between events. Because the template is derived from the artifact's own morphology rather than from a frequency band, it removes the offender precisely where a notch or high-pass would have gouged the physiologic signal as well. Both methods share a governing principle: model the contaminant explicitly and subtract it, rather than discarding a swath of spectrum and hoping the signal survives.
- Time-domain descriptors quantify the interference pattern: RMS tracks energy (robust to single spikes); turns/amplitude (Willison cloud) and zero-crossings summarize complexity where individual MUAPs cannot be resolved.
- The PSD (via FFT) yields mean and median frequency; the median frequency shifts leftward 20–50% with fatigue as fibre conduction slows and MUAPs broaden — a continuous index detectable before force fails.
- Nyquist requires f_s > 2·f_max; EMG energy reaches ~10 kHz, so sample at > 20 kHz with an anti-aliasing low-pass — aliasing folds high frequencies into spurious low ones and is irreversible after sampling.
- FIR filters can be linear-phase (preserve morphology, fixed delay); IIR filters are efficient but non-linear-phase, shifting latency and distorting amplitude — zero-phase forward–reverse filtering removes the bias offline but is acausal.
- Artifacts overlapping the signal need model-based removal: ICA unmixes spatially independent sources (line noise, ECG, motion) in multichannel data; template subtraction removes stereotyped stimulus or ECG artifact precisely without gouging the spectrum.
- 1.Merletti R, Farina D. Surface Electromyography: Physiology, Engineering, and Applications. Wiley-IEEE Press; 2016: time- and frequency-domain analysis, sampling.
- 2.Oppenheim AV, Schafer RW. Discrete-Time Signal Processing. 3rd ed. Pearson; 2010: sampling theorem, FIR/IIR design, linear phase.
- 3.Stålberg E, et al. Standards for quantification of EMG and neurography. Clin Neurophysiol. 2019;130:1688–1729 (turns/amplitude, quantitative EMG).
- 4.De Luca CJ. The use of surface electromyography in biomechanics. J Appl Biomech. 1997;13:135–163 (spectral fatigue, processing).
- 5.Hyvärinen A, Oja E. Independent component analysis: algorithms and applications. Neural Networks. 2000;13:411–430.