S1518 of 56
0 XP
  1. Hook
  2. Play
  3. Predict
  4. Name it
  5. Check
  6. Explain

S15 · Lesson 18 · EEG, EMG and processing biopotentials

The amplitudes and bandwidths of the ECG, EEG and EMG, EEG rhythms, choosing sample rates and converter resolution, high-pass corners and baseline wander, notch filters, ensemble averaging of evoked potentials, and detecting QRS complexes

The brain's electrical activity reaches the scalp at tens of microvolts, filtered and smeared by the skull. Muscles produce millivolt bursts with energy up to several hundred hertz. A visual or auditory stimulus evokes a brain response of a microvolt or less, completely hidden in the ongoing EEG. Each signal sets different demands on the front end and on the processing after it, and the tools come straight from C9 and S7: anti-aliasing and sampling, high-pass and notch filters, and the averaging that pulls a repeatable response out of noise.

  • A 2 µV evoked response buried in 20 µV of background EEG, after averaging N repetitions time-locked to the stimulus.
  • The response adds coherently while the background, uncorrelated from sweep to sweep, grows only as √N, so the noise in the average falls as 1/N.
  • Four times the sweeps halves the noise.

Predict

An evoked potential of 1 µV sits in 20 µV (RMS) of background EEG. How many stimulus repetitions must be averaged to reach a signal-to-noise ratio of 5?

Name it

The signals

SignalTypical amplitudeBandwidth
ECG0.5 to 4 mV0.05 to 150 Hz (diagnostic)
EEG5 to 300 µV0.5 to about 100 Hz
Surface EMG0.1 to 5 mVabout 20 to 500 Hz
Evoked potentials0.1 to 10 µVdepends on the test

EEG rhythms are named by band: delta below 4 Hz, theta 4 to 8, alpha 8 to 13 (eyes closed, relaxed), beta 13 to 30, gamma above.

Sampling and resolution

Sample at least twice the highest frequency kept, with an anti-aliasing filter below half the sample rate (C9): 500 samples/s is common for diagnostic ECG. Modern front ends use 24-bit delta-sigma converters, whose step over ±2.5 V is 0.3 µV, fine enough to skip most analog gain. A recorder's raw data rate is channels × sample rate × bits.

Filters

  • High-pass filters remove electrode offset and the slow baseline wander from breathing and movement. A first-order corner fc has time constant 1/(2πfc) and adds phase lead tan−1⁡(fc/f), which distorts the ST segment; diagnostic ECG therefore uses 0.05 Hz, or a linear-phase digital filter.
  • Notch filters at 50 or 60 Hz remove residual line interference; a notch with quality factor Q removes a band about f0/Q wide, and distorts any signal energy inside it.

Ensemble averaging

For a response that repeats identically after each stimulus, averaging N sweeps keeps the response and reduces uncorrelated noise by N: SNRN=NSNR1.

QRS detection

Heart-rate monitors find each beat with algorithms like Pan and Tompkins': a 5 to 15 Hz band-pass that favors the QRS over P and T waves, a derivative for slope, squaring, a moving-window integral about 150 ms long, and an adaptive threshold.

Worked example

A 64-channel EEG system samples at 1000 per second with 24-bit converters spanning ±2.5 V. What's its step size and its raw data rate?

Show the solution
  1. Step size. The ±2.5 V span is 5 V: q=5V224=0.298μV about a hundredth of the smallest EEG.
  2. Raw data rate. R=64×1000×24=1.536Mbit/s about 0.7 GB per hour.

Answer the step is 0.298 µV, and the raw data rate is 1.536 Mbit/s, about 0.7 GB an hour.

Worked example

What time constant does a 0.05 Hz high-pass have, and how much phase lead does it give a 1 Hz component? How wide is a 60 Hz notch with Q = 30?

Show the solution
  1. Time constant. τ=12π×0.05=3.18s
  2. Phase lead at 1 Hz. ϕ=tan−1⁡(0.05)=2.9° small enough to keep slow ECG features intact.
  3. Notch width. Δf=6030=2Hz removed around 60 Hz.

Answer the high-pass has τ = 3.18 s and gives 2.9° of lead at 1 Hz, and the notch is about 2 Hz wide.

Worked example

Neural spikes are detected by a threshold at 4 standard deviations of the noise, which is flat from 0 to 5 kHz. How often does noise alone cross the threshold?

Show the solution
  1. Rice's formula. For band-limited Gaussian noise flat from 0 to B, upward crossings of a level a come at the rate ν=B3e−a2/2σ2
  2. At 4σ. With B = 5 kHz, the exponent is −16/2 = −8: ν=50003×e−8=0.97per second
  3. Against real spikes. A real neuron firing at 10 spikes a second would see about one false spike in ten.
  4. At 5σ. False crossings fall to 0.011 per second, but small spikes are missed.
  5. The trade-off. The threshold trades misses against false alarms, as in any detector.

Answer noise alone crosses a 4σ threshold about 0.97 times a second.

Check

A 1 µV evoked response sits in 10 µV RMS of background. How many sweeps must be averaged for a signal-to-noise ratio of 10?

Check

A 16-bit converter spans 2 V. What's its step size?

Write units the way you normally would: 1.5 µV, 1500 nV and 0.0015 mV are the same answer.

Check

A recorder has 64 channels sampled at 250 per second with 24-bit samples. What's its raw data rate?

Write units the way you normally would: 1.5 Mb/s, 1500 kb/s and 0.0015 Gb/s are the same answer.

Check

What's the time constant of a first-order high-pass filter with a 0.5 Hz corner?

Write units the way you normally would: 1.5 s and 1500 ms are the same answer.

Check

A first-order high-pass has its corner at 0.05 Hz. How much phase lead does it give a 1 Hz component?

Check

About how wide a band does a 50 Hz notch with Q = 10 remove?

Write units the way you normally would: 1.5 Hz, 1500 mHz and 0.0015 kHz are the same answer.

Check

A spike detector's noise is Gaussian and flat from 0 to 5000 Hz; its threshold sits at 3 standard deviations.

(a)

How often does noise alone cross the threshold upward?

Write units the way you normally would: 1.5 Hz, 1500 mHz and 0.0015 kHz are the same answer.

(b)

How often does the noise cross zero?

Check

An evoked response of s µV sits in n µV RMS of background, uncorrelated from sweep to sweep.

Step 1

What signal-to-noise ratio do N averaged sweeps give?

Type it the way you would write it, like 3sin(2πft) or 3*sin(2*pi*f*t). Angles can be in radians or carry a degree sign, like 45°.

Explain why

Why does averaging many stimulus-locked sweeps reveal an evoked potential that's invisible in any single sweep?

Practice

Keep practicing

10 kinds of problem on this topic, dealt one at a time with new numbers every time, for as long as you like.