Chapter 4 · Biomedical Instrumentation & Signal Processing · ~40 min read

Biomedical Signal Processing

9 blueprint items · MoE Revised Blueprint 2016 E.C

1. Chapter Overview

Biomedical signal processing (BSP) is the engineering discipline that converts raw physiological measurements into clinically meaningful information. Every bedside monitor, Holter recorder, EEG cap, and EMG diagnostic system depends on a chain of acquisition, conditioning, digitization, and algorithmic interpretation. For the BME exit exam, this chapter sits inside the Biomedical Instrumentation & Signal Processing theme, which carries roughly 35% of the blueprint — making it one of the highest-yield study areas.

Why This Chapter Matters

Exit exam items in BSP test whether you can reason across three layers:

  1. Physics and physiology — What is being measured (ion flux, muscle contraction, blood flow)?
  2. Instrumentation — How is the weak biosignal extracted from noise and digitized?
  3. Digital processing — How are filters, transforms, and detectors applied to support diagnosis?

Students who memorize filter names without understanding why a high-pass removes baseline wander, or who confuse Z-transform with Fourier transform, consistently miss questions. This section highlights concepts that frequently appear on exit exams. This chapter targets those gaps directly.

The BME Role

Biomedical engineers do not replace clinicians, but they design and maintain the signal path that clinicians trust:

  • Specify electrode types and lead configurations for ECG/EEG/EMG
  • Design anti-aliasing and notch filters before ADC sampling
  • Implement digital filters (FIR/IIR) for noise rejection and feature enhancement
  • Validate algorithms (R-peak detection, HRV, arrhythmia screening) against standards
  • Troubleshoot artifacts — 50/60 Hz mains, motion, baseline drift, electrode pop-off

Healthcare Relevance

BiosignalTypical bandwidthClinical information
ECG0.05–150 Hz (diagnostic)Heart rate, arrhythmias, ischemia (ST changes), conduction blocks
EEG0.5–45 HzSleep stages, seizures, cognitive state
EMG20–500 HzMuscle activation, neuromuscular disorders
Arterial pressureDC + 0.5–40 HzSystolic/diastolic, pulse pressure waveform

Without correct sampling (Nyquist), appropriate filtering, and stable digital processing, these signals become misleading — leading to false alarms, missed arrhythmias, or incorrect diagnoses.


2. Learning Outcomes

After mastering this chapter, you should be able to:

  1. Classify biosignals as electrical (ECG, EEG, EMG, ENG) or non-electrical (pressure, flow, temperature, ultrasound echoes) and state their physiological origins.
  2. Describe the acquisition chain from electrode/transducer through amplifier, filter, and ADC to digital processing.
  3. Represent discrete-time signals using δ[n]\delta[n], u[n]u[n], exponentials, and finite sequences; compute basic Z-transforms and convolutions by hand.
  4. Analyze LTI discrete systems using impulse response, difference equations, convolution, and transfer functions H(z).
  5. Apply frequency-domain tools — DTFT, DFT, FFT — to interpret spectral content of digitized biosignals.
  6. Determine stability of discrete systems from pole locations and region of convergence (ROC).
  7. Select and justify filters — low-pass, high-pass, band-pass, notch — for specific clinical noise problems.
  8. Apply the sampling theorem to choose sampling rates, explain aliasing, and justify anti-aliasing filters.
  9. Outline an ECG processing pipeline from acquisition through QRS detection and clinical feature extraction.

These outcomes align with MoE blueprint competencies: understanding electrical/non-electrical biosignals and their collection, processing, and measurement.


3. Core Concepts

3.1 Signal Classification

Continuous-time (CT) signals x(t) are defined for every instant t ∈ ℝ. Examples: analog ECG from an amplifier output, continuous blood pressure waveform.

Discrete-time (DT) signals x[n] are defined only at integer indices n ∈ ℤ. They arise after sampling: x[n] = x(nT_s), where T_s is the sampling period and f_s = 1/T_s is the sampling frequency.

Analog vs digital: Analog signals are continuous in time and amplitude. Digital signals are discrete in both — after quantization by an ADC.

Electrical biosignals originate from ionic currents in excitable tissue:

  • ECG — summation of cardiac action potentials detected on the body surface
  • EEG — cortical postsynaptic potentials
  • EMG — motor unit action potentials from skeletal muscle

Non-electrical biosignals require transducers: pressure catheter → voltage, thermistor → resistance change, ultrasound → RF echoes.

3.2 Elementary Discrete-Time Sequences

Unit impulse (unit sample):

δ[n]={1,n=00,n0\delta[n] = \begin{cases} 1, & n = 0 \\ 0, & n \neq 0 \end{cases}

Unit step:

u[n] = \begin{cases} 1, & n \geq 0 \\ 0, & n < 0 \end{cases} **Exponential sequence:** $x[n] = a^n u[n]$ — models decaying transients, pole responses. **Relationship:** $u[n] = \sum_{k=0}^{n} \delta[k]$; $\delta[n] = u[n] - u[n-1]$. Any finite or infinite sequence can be written as a sum of shifted impulses:

x[n] = \sum_{k} x[k] \cdot \delta[n - k]

Thisdecompositionisthefoundationofdiscreteconvolution.This decomposition is the foundation of discrete convolution.

3.3 LTI Systems

A linear time-invariant (LTI) system satisfies:

  • Linearity: T{ax1[n]+bx2[n]}=aT{x1[n]}+bT{x2[n]}T\{ax_1[n] + bx_2[n]\} = aT\{x_1[n]\} + bT\{x_2[n]\}
  • Time invariance: If y[n]=T{x[n]}y[n] = T\{x[n]\}, then y[nk]=T{x[nk]}y[n-k] = T\{x[n-k]\}

The output of any LTI system is the convolution of input with impulse response h[n]h[n]:

y[n]=x[n]h[n]=kx[k]h[nk]y[n] = x[n] \ast h[n] = \sum_{k} x[k] \cdot h[n - k]

Causality: A system is causal if h[n]=0h[n] = 0 for all n<0n < 0 (no response before input arrives). Real-time biosignal processors must be causal.

BIBO stability: Bounded input produces bounded output. For causal LTI systems, stability requires all poles of H(z) inside the unit circle |z| = 1.

Convolution properties (LTI lecture):

PropertyExpression
Commutativex[n]h[n]=h[n]x[n]x[n] \ast h[n] = h[n] \ast x[n]
Associativex[n](h1[n]h2[n])=(x[n]h1[n])h2[n]x[n] \ast (h_1[n] \ast h_2[n]) = (x[n] \ast h_1[n]) \ast h_2[n]
Distributivex[n](h1[n]+h2[n])=x[n]h1[n]+x[n]h2[n]x[n] \ast (h_1[n] + h_2[n]) = x[n] \ast h_1[n] + x[n] \ast h_2[n]
Identityx[n]δ[n]=x[n]x[n] * \delta[n] = x[n]
Shiftx[n]δ[nk]=x[nk]x[n] * \delta[n - k] = x[n - k]

Any discrete signal can be decomposed as x[n]=kx[k]δ[nk]x[n] = \sum_k x[k]\delta[n - k] — convolution sums scaled shifted impulse responses.

Continuous-time analogue: y(t)=x(t)h(t)=x(τ)h(tτ)dτy(t) = x(t) * h(t) = \int x(\tau)h(t - \tau)\,d\tau — same LTI framework for analog front-end analysis.

Discrete systems are often described by linear constant-coefficient difference equations:

y[n]=ibix[ni]jajy[nj]y[n] = \sum_{i} b_{i} x[n-i] - \sum_{j} a_{j} y[n-j]

Example — first-order low-pass (exponential smoother):

y[n]=αx[n]+(1α)y[n1]y[n] = \alpha x[n] + (1-\alpha) y[n-1]

Example — discrete integrator/accumulator:

y[n]=y[n1]+x[n]H(z)=11z1y[n] = y[n-1] + x[n] \quad \to \quad H(z) = \frac{1}{1 - z^{-1}}

Pole at z=1z = 1 → marginally stable (integrator).

3.5 DTFT, DFT, and FFT

DTFT (Discrete-Time Fourier Transform) — for a sequence x[n]x[n]:

X(ω)=nx[n]ejωnX(\omega) = \sum_{n} x[n] e^{-j\omega n}

Maps discrete time to continuous frequency ω[π,π]\omega \in [-\pi, \pi] (normalized) or [fs/2,fs/2][-f_s/2, f_s/2] in Hz.

Time-shift property: x[nk]ejωkX(ω)x[n-k] \leftrightarrow e^{-j\omega k} X(\omega)

DFT (Discrete Fourier Transform) — for finite NN-point sequence:

X[k]=n=0N1x[n]ej2πkn/N,k=0,1,,N1X[k] = \sum_{n=0}^{N-1} x[n] e^{-j2\pi kn/N}, \quad k = 0, 1, \ldots, N-1

The DFT is what you compute on digitized biosignals. It produces N frequency bins at spacing f_s/N.

FFT — Fast Fourier Transform; same result as DFT, O(N log N) instead of O(N²). Used for real-time spectral monitoring of EEG bands.

Spectral leakage: Truncating a signal to finite length spreads energy across frequency bins. Window functions (Hamming, Hanning, Blackman) taper edges to reduce leakage.

3.6 Z-Transform

Definition (bilateral): X(z) = \sum_{n} x[n] z^{-n} Unilateral (causal signals, n ≥ 0): same sum starting at n = 0.

Key pairs:

x[n]X(z)ROC
δ[n]\delta[n]1All z
u[n]u[n]11z1\dfrac{1}{1-z^{-1}}$
anu[n]a^n u[n]11az1\dfrac{1}{1-az^{-1}}$
δ[nk]\delta[n-k]zkz^{-k}All z (k0k \geq 0)

Properties:

  • Linearity: ax1[n]+bx2[n]aX1(z)+bX2(z)ax_1[n] + bx_2[n] \leftrightarrow aX_1(z) + bX_2(z)
  • Time shift: x[nk]zkX(z)x[n-k] \leftrightarrow z^{-k} X(z)
  • Convolution: x[n]h[n]X(z)H(z)x[n]*h[n] \leftrightarrow X(z)H(z)

Transfer function: H(z)=Y(z)/X(z)H(z) = Y(z)/X(z) for LTI systems.

ROC (Region of Convergence): Set of z for which the defining sum converges. ROC + pole locations determine stability and causality.

Stability criterion: For a causal LTI system, BIBO stable iff all poles lie inside the unit circle |z| < 1, equivalently ROC includes |z| = 1.

3.7 Digital Filters

FIR (Finite Impulse Response): h[n]h[n] has finite length NN. H(z)H(z) is a polynomial in z1z^{-1} only — no poles except at z=0z = 0.

  • Always stable (no recursive poles)
  • Can achieve exact linear phase (symmetric coefficients)
  • Sharper cutoff requires more taps (higher order)

IIR (Infinite Impulse Response): Recursive — uses past outputs. H(z) is a rational function with poles.

  • Fewer coefficients for sharp cutoff
  • Risk of instability if poles outside unit circle
  • Designed via bilinear transform, impulse invariance (exam: bilinear transform is standard for IIR)

Realization structures:

  • Direct Form I/II — compact but sensitive to coefficient quantization at high order
  • Cascade form — breaks high-order filter into second-order sections; better numerical stability (exam answer for high-order filters)

Band-pass from low-pass + high-pass: Cascade LPF (removes highs) with HPF (removes lows) → passband between cutoffs.

3.8 Sampling Theorem and Aliasing

A band-limited signal with maximum frequency fmaxf_{\max} can be perfectly reconstructed from samples if:

fs2fmax(Nyquist criterion)f_{s} \geq 2 f_{\max} \quad \text{(Nyquist criterion)}

Nyquist rate = 2fmax2 f_{\max} (minimum sampling frequency).

Nyquist frequency = f_s/2 (maximum representable frequency without aliasing).

Aliasing: If f_s < 2 f_max, high-frequency components fold into the baseband as false low frequencies — irreversible after sampling.

Anti-aliasing filter: Analog low-pass before ADC, cutoff below f_s/2, attenuates content above Nyquist.

Practical ECG: Diagnostic bandwidth ~150 Hz → f_s ≥ 300 Hz minimum; clinical devices often use 250–1000 Hz with guard band.

3.9 ECG Processing Pipeline (Overview)

Skin → Electrodes → Lead wires → Instrumentation amplifier
    → High-pass (baseline) → Low-pass (muscle noise) → Notch (50/60 Hz)
    → ADC → Digital filters → QRS detector → Feature extraction → Display/storage

Key waveform features:

  • P wave — atrial depolarization (atrial fibrillation assessment)
  • QRS complex — ventricular depolarization (arrhythmia detection, R-peaks)
  • T wave — ventricular repolarization
  • ST segment — elevation/depression → myocardial ischemia/infarction
  • R-R interval — heart rate variability (HRV)

Pan-Tompkins algorithm — standard for R-peak detection in ECG.

ECG acquisition lab insights: Heart rate varies with posture (supine vs seated vs post-exercise) and respiration phase (inhale vs exhale) — R–R interval changes reflect autonomic influence. Ventricular systole shortens with exercise; diastole lengthens at rest. These are signal interpretation contexts, not filter design issues.

EMG processing note: Surface EMG requires higher bandwidth than ECG (~10–500 Hz) and aggressive motion-artifact rejection; amplifier gain must match expected mV-level muscle potentials without saturating ADC.

The Laplace transform X(s)X(s) analyzes continuous-time systems and is central to analog filter design. The Z-transform is its discrete-time counterpart. They connect through sampling:

s=1Tsln(z)or approximatelyz=esTss = \frac{1}{T_{s}} \ln(z) \quad \text{or approximately} \quad z = e^{sT_{s}}

Bilinear transform maps analog H(s)H(s) to digital H(z)H(z):

s=2Ts1z11+z1s = \frac{2}{T_{s}} \cdot \frac{1 - z^{-1}}{1 + z^{-1}}

Prewarping corrects frequency warping so analog cutoff maps accurately to digital cutoff. Exam items ask why bilinear transform uses prewarping — to avoid aliasing in the filter frequency response mapping.

When to use which transform on the exam:

Question about…Tool
Analog RC/op-amp filterLaplace H(s)
Digitized ECG/EEG spectrumDFT/FFT
Discrete filter poles/stabilityZ-transform H(z)
Continuous non-periodic signal spectrumFourier X(ω)
Periodic continuous signalFourier series

3.11 Impulse Invariance vs Bilinear Transform (IIR Design)

Impulse invariance: Sample the analog impulse response h(t) at t = nT_s. Major weakness (exit Q33): aliasing in the frequency response because sampling can fold high-frequency analog poles into the digital passband.

Bilinear transform: Maps entire s-plane to z-plane without aliasing of the response (with frequency warping). Preferred for medical device digital filter design when converting Butterworth/Chebyshev analog prototypes.

3.12 Quantization and ADC Errors

After anti-aliasing and sampling, quantization maps continuous amplitude to discrete levels:

Quantization step \Delta = V_{\mathrm{FS}} / 2^{B}

where V_FS is full-scale voltage and B is bit resolution.

Signal-to-quantization-noise ratio improves ~6 dB per bit. For 12-bit ADC, theoretical SQNR ≈ 72 dB — adequate for ECG if gain is set correctly. Clipping (saturation) is worse than quantization — always set amplifier gain so QRS peaks use 70–80% of ADC range.


4. Technical Deep Dive

4.1 Convolution — Physical Intuition

Convolution answers: "If I know how the system responds to a single impulse, what is the response to any input?"

Decompose x[n] into weighted impulses. Each impulse produces a scaled, shifted copy of h[n]. Sum all contributions → convolution.

Worked Example — Convolution of {1, 1, 1} with itself:

Let x[n] = {1, 1, 1} for n = 0, 1, 2 (length 3).

Output length = 3 + 3 − 1 = 5.

Flip-and-slide (or tabular method):

nOverlap productsy[n]
01×11
11×1 + 1×12
21×1 + 1×1 + 1×13
31×1 + 1×12
41×11

Result: y[n] = {1, 2, 3, 2, 1}

The triangular envelope is the signature of convolving a rectangular pulse with itself — relevant to moving-average and boxcar filters.

Sifting property:

x[n]δ[nk]=x[k]x[n] * \delta[n - k] = x[k]

Equivalently, the full sequence form is x[nk]x[n-k] in some textbooks; know your exam's convention. The exit bank uses x(k) as the sampled value.

4.2 Z-Transform — Worked Examples

Example 1: Z{\delta[n]}

X(z)=nδ[n]zn=1z0=1X(z) = \sum_{n} \delta[n] z^{-n} = 1 \cdot z^{0} = 1

Example 2: Z{δ[n3]}=z3Z\{\delta[n-3]\} = z^{-3}

Example 3: Finite sequence x = {2, −1, 4} (nonzero at n = 0, 1, 2)

X(z)=2+(1)z1+4z2X(z) = 2 + (-1)z^{-1} + 4z^{-2}

Finite-duration → polynomial in z1z^{-1}, no poles. This is the FIR filter form.

Example 4: Causal exponential x[n] = (0.5)^n u[n]u[n]

X(z)=1/(10.5z1),ROC:z>0.5X(z) = 1/(1 - 0.5z^{-1}), ROC: \lvert z \rvert > 0.5

Pole at z = 0.5 → inside unit circle → stable.

Example 5: Integrator y[n] = y[n−1] + x[n]

Y(z)(1z1)=X(z)H(z)=1/(1z1)=z/(z1)Y(z)(1 - z^{-1}) = X(z) \to H(z) = 1/(1 - z^{-1}) = z/(z-1)

Pole at z = 1 → marginally stable (not strictly BIBO stable).

4.3 Nyquist — Worked Examples

Example 1: ECG with f_max = 150 Hz

Nyquistrate=2×150=300HzNyquist rate = 2 \times 150 = 300 Hz

Choose f_s = 500 Hz or 1000 Hz for margin.

Example 2: EEG alpha band study, f_max = 45 Hz

Nyquist rate = 90 Hz; typical f_{s} = 256 or 512 Hz

Example 3: Signal with f_max = 5 kHz (exam question)

Nyquistrate=2×5kHz=10kHzAnswer:10kHzNyquist rate = 2 \times 5 kHz = 10 kHz \to Answer: 10 kHz

Example 4 — Aliasing calculation:

f_s = 200 Hz, f_s/2 = 100 Hz. A 120 Hz component aliases to:

falias=120200=80Hz(appearsasfalse80Hzenergy)f_{\mathrm{alias}} = |120 - 200| = 80 Hz (appears as false 80 Hz energy)

4.4 Signal Flow — ASCII Diagrams

LTI system in time domain:

x[n]h[n]y[n]=x[n]h[n]x[n] \to h[n] \to y[n] = x[n] * h[n]

LTI system in z-domain:

X(z)H(z)Y(z)=X(z)H(z)X(z) \to H(z) \to Y(z) = X(z) \cdot H(z)

Complete biosignal acquisition chain:

┌──────────┐   ┌────────────┐   ┌─────────┐   ┌──────────┐   ┌─────────┐
│Electrode │──→│ Amp + ISO  │──→│ Filters │──→│   ADC    │──→│  DSP    │
│ /Sensor  │   │  (gain)    │   │ HP/LP/  │   │ sample  │   │ FIR/IIR │
│          │   │            │   │ Notch   │   │ quantize│   │ FFT/QRS │
└──────────┘   └────────────┘   └─────────┘   └──────────┘   └─────────┘
     ↑              ↑                ↑              ↑
  biopotential   CMRR, input      anti-alias +    f_s ≥ 2f_max
  or transducer  impedance         conditioning

DFT spectral analysis flow:

x[n]w[n]DFT/FFTX[k]2x[n] \to w[n] \to \mathrm{DFT/FFT} \to \lvert X[k]\rvert^2

Block diagram reduction rules (control/BSP lecture):

RuleReduction
Series (cascade)Geq=G1G2G_{\mathrm{eq}} = G_1 \cdot G_2
ParallelGeq=G1+G2G_{\mathrm{eq}} = G_1 + G_2
Negative feedbackGeq=G/(1+GH)G_{\mathrm{eq}} = G / (1 + GH)
Summing point relocationPreserve signal equivalence when moving junction

Procedure: write component equations → Laplace/z-transform with zero ICs → assemble blocks → reduce to single H(s) or H(z).

4.5 Pole-Zero Analysis and Stability

Consider H(z)=10.5z110.9z1H(z) = \dfrac{1 - 0.5z^{-1}}{1 - 0.9z^{-1}}.

  • Zero at z = 0.5
  • Pole at z = 0.9

Since |0.9| < 1, causal system is stable. Pole near unit circle (0.9) → slow decay, narrow resonance — useful for notch-like behavior but sensitive to coefficient errors.

ROC for causal stable system: |z| > r_max where r_max is largest pole magnitude, and ROC must include |z| = 1.

Exit Q394 rule: BIBO stable iff ROC includes the unit circle. Poles outside |z| = 1 → unstable → output grows without bound → amplifier saturation and corrupted clinical data.

4.6 STFT and Wavelets — When Fourier Is Not Enough

Standard Fourier/DFT assumes signal statistics are constant over the analysis window. EEG and evoked potentials violate this — frequency content shifts with sleep stage, attention, or seizure onset.

STFT: Slide a windowed FFT across time:

STFT(m,k)=nx[n]w[nm]ej2πkn/NSTFT(m, k) = \sum_{n} x[n] w[n-m] e^{-j2\pi kn/N}

Trade-off: short window → good time resolution, poor frequency resolution. Long window → opposite.

Wavelet transform: Analyze at multiple scales (mother wavelet dilated/compressed). Captures transient QRS morphology, EEG spikes, and non-stationary artifacts. Exam answer for QRS isolation and non-stationary analysis: wavelet transform.

4.7 Event Detection and Pattern Recognition

Event detection identifies specific temporal patterns — R-peaks, seizure onset, apnea episodes. Distinct from generic filtering or spectral analysis (exit Q125).

Pipeline:

Filtered signal → derivative/squaring (Pan-Tompkins) → threshold → peak classification → clinical alarm

Autocorrelation finds periodic components (e.g., periodic arrhythmias). Matched filtering correlates signal with template waveform for known morphology detection.

4.8 Extended Convolution Example

Convolve x[n] = {1, 0, 2} with h[n] = {1, 1}:

y[0]=1×1=1y[1]=1×1+0×1=1y[2]=0×1+2×1=2y[3]=2×1=2y[0] = 1\times1 = 1 \\ y[1] = 1\times1 + 0\times1 = 1 \\ y[2] = 0\times1 + 2\times1 = 2 \\ y[3] = 2\times1 = 2

Result: {1, 1, 2, 2} — length 4 = 3 + 2 − 1.

4.9 Extended Z-Transform Example — Step and Exponential

Unit step u[n]u[n]:

U(z)=1/(1z1),ROC:z>1U(z) = 1/(1 - z^{-1}), ROC: \lvert z \rvert > 1

Causal sequence x[n]=(0.9)nu[n]x[n] = (0.9)^n u[n]:

X(z)=1/(10.9z1)X(z) = 1/(1 - 0.9z^{-1})

Combination: x[n]=δ[n]0.5δ[n1]x[n] = \delta[n] - 0.5\delta[n-1]:

X(z)=10.5z1(FIR of length 2)X(z) = 1 - 0.5z^{-1} \quad \text{(FIR of length 2)}

4.10 Sampling — Full Design Example

Problem: Record diagnostic ECG (f_max = 150 Hz) with 12-bit ADC.

Step 1 — Nyquist: f_s,min = 300 Hz.

Step 2 — Choose f_s: 500 Hz (common clinical standard).

Step 3 — Anti-aliasing: Analog LPF, cutoff f_c = 150 Hz (or 200 Hz with sharp roll-off), stopband attenuation > 40 dB above 250 Hz (Nyquist of 500 Hz).

Step 4 — Digital conditioning: HP 0.05 Hz (baseline), optional notch 50 Hz, LP 150 Hz if needed.

Step 5 — Verify: QRS energy (5–30 Hz) preserved; mains rejected; no clipping on ADC.


5. Equipment and Device Focus

5.1 Electrodes and Transducers

  • Ag/AgCl gel electrodes — standard for surface ECG/EEG; low polarization
  • Needle electrodes — EMG, intramuscular recording
  • Pressure transducers — strain gauge, piezoresistive; require excitation voltage
  • Grounding — patient ground reference reduces common-mode interference; right-leg drive in ECG

5.2 Amplifiers

Instrumentation amplifier (INA):

  • High input impedance (≥ 10 MΩ) — does not load high-impedance skin-electrode interface
  • High CMRR (common-mode rejection) — rejects 50/60 Hz and power-line common-mode voltage
  • Adjustable gain — typical biosignals are 0.5–5 mV (ECG) to μV (EEG)

Primary function: increase signal amplitude for further processing.

5.3 Filters in the Analog Front End

Filter typeRole in biosignal chain
High-pass (0.05–0.5 Hz)Remove baseline wander, DC offset
Low-pass (35–150 Hz)Limit bandwidth, anti-alias before ADC
Notch (50 or 60 Hz)Remove power-line interference
Band-passCombine HP + LP for specific applications

Analog filtering before ADC is mandatory for anti-aliasing — digital filters cannot undo aliasing.

5.4 Analog-to-Digital Converter (ADC)

Essential for converting analog biosignals to digital form.

Key parameters:

  • Sampling rate f_s — must satisfy Nyquist for signal bandwidth
  • Resolution (bits) — determines quantization noise (typically 12–16 bit for medical)
  • Input range — must match amplified signal swing
Digitalcode=round(Vanalog/Vfullscale×(2B1))Digital code = round( V_{a}nalog / V_{f}ullscale \times (2^{B} - 1) )

5.5 Block Diagram — Real-Time ECG Monitor

Exam answer pattern: Amplifier, Low-pass filter, ADC, Microcontroller

Patient ── ECG leads ── INA ── HP(0.05Hz) ── LP(150Hz) ── Notch(50Hz)
                                                      │
                                                      ▼
                                              ADC (f_s = 500 Hz)
                                                      │
                                                      ▼
                                         Microcontroller / DSP
                                         (filter, Pan-Tompkins,
                                          heart rate, alarms)
                                                      │
                                                      ▼
                                              Display / telemetry

5.6 Common-Mode Rejection and AC Noise in ECG

AC noise in ECG arises from (exit Q502 pattern):

  • Power-line coupling (50/60 Hz) through patient cables acting as antennas
  • Electrode impedance imbalance — converts common-mode voltage to differential mode
  • Patient motion modulating electrode contact resistance
  • Electrosurgical or adjacent equipment radiated interference

Mitigation stack:

  1. Shielded cables, twisted pairs
  2. Instrumentation amplifier with high CMRR (>100 dB)
  3. Right-leg drive (active ground) — drives body toward amplifier common
  4. Notch filter at mains frequency
  5. Proper skin preparation and electrode placement

5.7 Bioelectric Potential Source

Bioelectric potentials are ionic in nature (exit Q477) — redistribution of Na⁺, K⁺, Ca²⁺, Cl⁻ across excitable membranes generates dipole fields detectable at the body surface. This is not electronic conduction through wires; tissue is an electrolytic volume conductor.

5.8 Heart Rate from ECG

In a normal individual, heart rate from ECG is determined by measuring R-R interval (exit Q480):

HR(bpm)=60/(meanRRintervalinseconds)HR (bpm) = 60 / (mean R-R interval in seconds)

Instantaneous HR uses consecutive R-peaks; average HR uses mean over N beats.


6. Practical Biomedical Engineering Perspective

6.1 ECG Acquisition and Processing

Typical settings:

  • Bandwidth: 0.05–150 Hz (diagnostic)
  • Sampling: 250–1000 Hz
  • Resolution: 12+ bits

Noise sources and remedies:

ArtifactFrequency/contentRemedy
Baseline wander< 0.5 HzHigh-pass filter
Muscle (EMG) artifact20–200 HzLow-pass filter
Power-line (50/60 Hz)NarrowbandNotch filter
Motion artifactLow frequency + spikesSecure electrodes, HP filter, adaptive filtering

Clinical feature extraction:

  • Heart rate from R-R intervals
  • HRV from R-R variability
  • Arrhythmia from QRS morphology and timing
  • MI from ST-segment elevation

6.2 EEG Acquisition and Processing

Frequency bands (memorize for exam):

BandFrequencyClinical association
Delta (δ)0.5–4 HzDeep sleep
Theta (θ)4–8 HzDrowsiness, meditation
Alpha (α)8–13 HzRelaxed wakefulness, eyes closed
Beta (β)13–30 HzActive thinking, cognitive load, attention
Gamma (γ)> 30 HzBinding, high-level processing

Processing steps:

  1. High-pass (~0.5 Hz) — remove DC drift
  2. Low-pass (~45 Hz) — remove muscle artifact
  3. Notch (50/60 Hz)
  4. Artifact rejection — PCA, ICA for eye blink and motion
  5. Band-power analysis via FFT in each band

Non-stationarity: EEG frequency content changes over time → STFT or wavelet transform preferred over single FFT.

6.3 EMG Acquisition and Processing

  • Bandwidth: 20–500 Hz (or up to 10 kHz for research)
  • Sampling: ≥ 1–2 kHz
  • Band-pass filter emphasizes motor unit firing
  • Rectification and envelope detection for activation level
  • Used in prosthetics, rehabilitation, neuromuscular diagnosis

6.4 SNR Enhancement Pipeline

Exam pattern for improving SNR:

  1. Filtering — remove out-of-band noise
  2. Averaging — ensemble average reduces random noise (√N improvement)
  3. Normalization — scale for consistent amplitude comparison

7. Frequently Tested Concepts

The following callouts cover frequently tested signal-processing concepts. Study each EXAM CALLOUT until you can explain the concept from first principles.

Discrete-Time Fundamentals

EXAM CALLOUT — Q109 / Q544 (exit-0109): Which represents a discrete-time signal?

Answer: x[n] = e^(−n) — note the [n] index, not x(t).

Key insight: CT uses t (continuous); DT uses n (integer only). x(t) = e^(−t) and cos(2πt) are continuous. If the independent variable is n, it is discrete-time.

EXAM CALLOUT — Q110 (exit-0110): What does δ[n]\delta[n] represent?

Answer: Value 1 at n = 0, zero elsewhere.

Key insight: Do not confuse with δ(t) in continuous time or with u[n]u[n] (step is 1 for all n ≥ 0).

EXAM CALLOUT — Q111 / Q545 (exit-0111): Z-transform of δ[n]\delta[n]?

Answer: 1 (not zz, not z1z^{-1}).

Key insight: X(z)=nδ[n]zn=1X(z) = \sum_n \delta[n] z^{-n} = 1. Only the n=0n = 0 term survives. z1z^{-1} is the transform of δ[n1]\delta[n-1] (one-sample delay).

Sampling and Nyquist

EXAM CALLOUT — Q128 (exit-0128): Why is Nyquist rate important?

Answer: Ensures sufficient sampling to avoid aliasing.

Key insight: Nyquist rate = 2 × f_max. Below this, high frequencies fold into the signal band permanently.

EXAM CALLOUT — Nyquist calculation: f_max = 5 kHz → Nyquist rate = 10 kHz.

EEG Frequency Bands

EXAM CALLOUT — Q112 (exit-0112): Alpha waves?

Answer: 8–13 Hz (relaxed wakefulness).

Key insight: Delta = 0.5–4 (deep sleep, Q120). Theta = 4–8. Beta = 13–30 (cognitive load, Q140). Do not swap alpha and delta.

EXAM CALLOUT — Q120 (exit-0120): Delta waves indicate?

Answer: Deep sleep.

Filtering Applications

EXAM CALLOUT — Q113 (exit-0113): Purpose of low-pass filter in BSP?

Answer: Remove high-frequency noise (passes lows, attenuates highs).

EXAM CALLOUT — Q116 (exit-0116): Remove 60 Hz power-line interference?

Answer: Notch filter (band-stop at 60 Hz). Same for 50 Hz in regions using 50 Hz mains.

EXAM CALLOUT — Q117 (exit-0117): Remove high-frequency noise from ECG?

Answer: Low-pass filter.

EXAM CALLOUT — Q121 (exit-0121): Baseline wander?

Answer: Low-frequency drift in the ECG baseline. Remedy: high-pass filter (Q120 pattern in Telegram Q&A).

Transforms and LTI

EXAM CALLOUT — Q118 (exit-0118): Purpose of Fourier Transform?

Answer: Convert time domain → frequency domain.

EXAM CALLOUT — Q546 (exit-0546): Represent discrete-time signals in frequency domain?

Answer: DFT (Discrete Fourier Transform). FFT is the fast algorithm to compute DFT.

EXAM CALLOUT — Q123 (exit-0123): Z-transform provides?

Answer: Frequency-domain / complex-domain representation for analysis and design of discrete systems. Convolution becomes multiplication.

EXAM CALLOUT — Q124 (exit-0124): Output of LTI system?

Answer: Convolution of input with impulse response.

EXAM CALLOUT — Q394 (exit-0394): BIBO stable LTI — ROC condition?

Answer: ROC includes the unit circle |z| = 1 (all poles inside for causal systems).

EXAM CALLOUT — Q468 (exit-0468): x(n) * δ(n−k) = ?

Answer: x(k) — sifting property.

EXAM CALLOUT — Q469 (exit-0469): Causal LTI necessary condition?

Answer: h(n) = 0 for n < 0.

EXAM CALLOUT — Q476 (exit-0476): {1,1,1} * {1,1,1} = ?

Answer: {1, 2, 3, 2, 1}.

EXAM CALLOUT (biosignal-processing-exit-2024): Primary amplifier function in acquisition = increase signal amplitude — not digitize, filter, or change frequency.

EXAM CALLOUT (biosignal-processing-exit-2024): Delta EEG waves (0.5–4 Hz) indicate deep sleep — not alpha (8–13 Hz) or beta.

EXAM CALLOUT (LTI lecture): Convolution valid only for LTI systems — time-varying systems have h[n,k] dependent on both input time and observation time.

ECG Clinical Features

EXAM CALLOUT — Q114 (exit-0114): QRS complex?

Answer: Ventricular depolarization.

EXAM CALLOUT — Q135 (exit-0135): MI diagnosis from ECG?

Answer: ST segment elevation.

EXAM CALLOUT — Q139 (exit-0139): Atrial fibrillation?

Answer: Analyze P wave (atrial depolarization).

EXAM CALLOUT — Q142 (exit-0142): HRV?

Answer: R-R interval variability.

EXAM CALLOUT — Q130 (exit-0130): R-peak detection?

Answer: Pan-Tompkins algorithm.

Advanced Processing

EXAM CALLOUT — Q131 (exit-0131): Transient characteristics?

Answer: STFT (Short-Time Fourier Transform) — time-frequency representation.

EXAM CALLOUT — Q136 (exit-0136): Non-stationary signals?

Answer: Wavelet transform.

EXAM CALLOUT — Q143 (exit-0143): Wavelet over Fourier for transients?

Answer: Provides both time and frequency information.

EXAM CALLOUT — Q132 (exit-0132): IIR filter design?

Answer: Bilinear transformation.

EXAM CALLOUT — Q134 (exit-0134): Window functions?

Answer: Mitigate spectral leakage.

EXAM CALLOUT — Q129 (exit-0129): High-order filter stability?

Answer: Cascade form realization.

EXAM CALLOUT — Q140 (exit-0140): Sharp cutoff?

Answer: FIR filter (linear phase, design flexibility).

EXAM CALLOUT — Q473 (exit-0473): Pre-filter before sampling?

Answer: Anti-aliasing filter.


8. Comparison Tables

ECG vs EEG vs EMG

PropertyECGEEGEMG
OriginCardiac muscleBrain cortexSkeletal muscle
Typical amplitude0.5–5 mV10–100 μV0.1–5 mV
Bandwidth0.05–150 Hz0.5–45 Hz20–500 Hz
ElectrodesLimb/chest Ag/AgClScalp cup/discSurface or needle
Main artifactBaseline wander, 50/60 HzEye blink, motionMotion, crosstalk
Key filterHP 0.05 + LP 150 + notchHP 0.5 + LP 45 + notchBand-pass 20–500 Hz
Sampling rate250–1000 Hz256–512 Hz1–10 kHz
Clinical useArrhythmia, ischemiaSleep, seizuresNeuromuscular disorders

FIR vs IIR Digital Filters

CriterionFIRIIR
Impulse response lengthFiniteInfinite (recursive)
StabilityAlways stableConditional (pole placement)
PhaseCan be linear phaseGenerally nonlinear
Sharp cutoffMore taps neededFewer coefficients
Design methodWindow, Parks-McClellanBilinear transform, etc.
H(z)H(z) formPolynomial in z1z^{-1}Rational (poles + zeros)
Biosignal useLinear-phase ECG filteringEfficient sharp notch/LP

Analog vs Digital Filters

CriterionAnalogDigital
ImplementationR, L, C, op-ampDSP code, FPGA
FlexibilityFixed hardwareReprogrammable
PrecisionComponent toleranceHigh (with sufficient word length)
Exam advantageSimple, no aliasing concern in analog stageFlexibility and precision
Anti-aliasing roleRequired before ADCApplied after digitization for further conditioning

Low-Pass vs High-Pass vs Band-Pass vs Notch

FilterPassesAttenuatesBiosignal example
Low-passLow frequenciesHigh frequenciesRemove muscle noise from ECG
High-passHigh frequenciesLow frequenciesRemove baseline wander
Band-passMid bandLow and highHeart sounds 20–150 Hz
Notch (band-stop)All except narrow bandSingle frequency50/60 Hz mains hum

Fourier vs Z-Transform vs Laplace

TransformDomainSignal typePrimary use
Fourier (CT)Continuous timeCT signalsFrequency content, analog analysis
DFT/DTFTDiscrete timeSampled sequencesSpectral analysis of digitized biosignals
Z-transformDiscrete timeSequencesSystem analysis, filter design, poles/zeros
LaplaceContinuous timeCT signalsAnalog system design, transfer functions H(s)

Key distinction: Laplace for continuous analog systems; Z-transform for discrete digital systems. Fourier requires integrability; Laplace handles transients with ROC. Z-transform is the discrete counterpart with z instead of s.


9. Exam-Oriented Memory Aids

EEG Bands — "A Tall Bad Doctor Giggles"

LetterBandHzState
Deltaδ0.5–4Deep sleep
Thetaθ4–8Drowsy
Alphaα8–13Awake relaxed
Betaβ13–30Busy brain
Gammaγ>30High cognition

Nyquist

"Double the max" — f_Nyquist = 2 × f_max

"Half the sample rate" — f_Nyquist frequency = f_s / 2

Filter Selection for ECG Noise

"High base, Low muscle, Notch mains"

  • Baseline wander → High-pass
  • Muscle artifact → Low-pass
  • Power line → Notch

Z-Transform Essentials

"Delta gives One" — Z{\delta[n]} = 1

"Delay is z to the minus k" — $Z{\delta[n-k]} = z^{-k}

"Poles inside = stable ride" — causal BIBO stable iff |poles| < 1

Convolution Length

"Add lengths, subtract one" — len(x*h) = len(x) + len(h) − 1

ECG Wave Order

"P-QRS-T"P atria, QRS ventricles depolarize, T ventricles repolarize

Causality

"No response before impulse" — h[n] = 0 for n < 0


10. Chapter Summary

Essential Formulas

ConceptFormula
Convolutiony[n]=kx[k]h[nk]y[n] = \sum_{k} x[k]h[n-k]
Z-transformX(z)=x[n]znX(z) = \sum x[n]z^{-n}
Z{\delta[n]}1
Time shiftx[n-k] \leftrightarrow z^{-k}X(z)
Convolution propertyx*h \leftrightarrow X(z)H(z)
Nyquist ratef_{s} \geq 2f_{\max}
DFTX[k]=x[n]ej2πkn/NX[k] = \sum x[n]e^{-j2\pi kn/N}
DTFT shiftx[nk]ejωkX(ω)x[n-k] \leftrightarrow e^{-j\omega k} X(\omega)
IntegratorH(z)=1/(1z1)H(z) = 1/(1-z^{-1})
Stability (causal)All poles |z| < 1

Concept Checklist

  • δ[n]\delta[n] is 1 at n=0; Z{\delta[n]} = 1
  • DFT (not CT Fourier) for digitized frequency analysis
  • Anti-aliasing is analog, before ADC
  • Notch for 50/60 Hz; HP for baseline; LP for high-freq noise
  • QRS = ventricular depolarization; ST elevation = MI
  • Alpha 8–13 Hz; Delta 0.5–4 Hz deep sleep
  • FIR: stable, linear phase; IIR: efficient, bilinear design
  • Cascade form for high-order numerical stability
  • Pan-Tompkins for R-peaks; R-R for HRV
  • ROC includes unit circle ↔ BIBO stable

11. Exam Practice Section

Basic Questions (10 MCQs)

B1. What is a continuous-time signal?

A) Defined only at discrete times
B) Defined at every instant of time
C) A digital signal
D) A sampled signal

Answer: B — CT signals x(t) exist for all real t.


B2. Which represents a discrete-time signal?

A) x(t) = e^(−t)
B) x[n] = e^(−n)
C) x(t) = cos(2πt)
D) x(t) = u(t)

Answer: B — Discrete indexing uses n.


B3. What does δ[n]\delta[n] represent?

A) Sequence of ones
B) Sequence of zeros
C) One at n=0, zero elsewhere
D) Sinusoidal sequence

Answer: C


B4. Z-transform of δ[n]\delta[n]?

A) z
B) 1
C) $z^{-1}

D) δ(z)

Answer: Bnδ[n]zn=1\sum_n \delta[n] z^{-n} = 1.


B5. Nyquist rate for f_max = 5 kHz?

A) 2.5 kHz
B) 5 kHz
C) 10 kHz
D) 15 kHz

Answer: C — 2 × 5 = 10 kHz.


B6. Alpha EEG band?

A) 0.5–4 Hz
B) 4–8 Hz
C) 8–13 Hz
D) 13–30 Hz

Answer: C


B7. Purpose of low-pass filter in BSP?

A) Amplify high-frequency noise
B) Remove high-frequency noise
C) Amplify low-frequency noise
D) Remove low-frequency noise

Answer: B


B8. QRS complex in ECG represents?

A) Atrial depolarization
B) Ventricular depolarization
C) Atrial repolarization
D) Ventricular repolarization

Answer: B


B9. Primary function of amplifier in acquisition?

A) Convert to digital
B) Increase signal amplitude
C) Filter noise
D) Change frequency

Answer: B


B10. Discrete-time frequency representation?

A) Laplace Transform
B) Fourier Transform (continuous)
C) Z-Transform only
D) DFT

Answer: D


Intermediate Questions (10 MCQs)

I1. Remove 60 Hz from biosignal?

A) Low-pass
B) High-pass
C) Band-pass
D) Notch

Answer: D


I2. Remove high-frequency noise from ECG?

A) High-pass
B) Low-pass
C) Band-pass
D) Notch

Answer: B


I3. Reduce baseline wander in ECG?

A) Low-pass
B) High-pass
C) Notch
D) Band-pass

Answer: B


I4. Delta waves in EEG indicate?

A) Wakefulness
B) Deep sleep
C) Relaxation
D) Intense mental activity

Answer: B


I5. Baseline wander is?

A) High-frequency noise
B) Low-frequency drift
C) Sudden spikes
D) Constant amplitude

Answer: B


I6. Frequency content of biosignals analyzed by?

A) Time-domain only
B) Frequency-domain analysis
C) Spatial-domain
D) Color-domain

Answer: B


I7. LTI system output determined by?

A) Differentiation
B) Integration
C) Convolution
D) Modulation

Answer: C


I8. Main advantage of digital over analog filters?

A) Higher cost
B) Flexibility and precision
C) Simplicity
D) Lack of stability

Answer: B


I9. Nyquist rate important because?

A) Sets maximum amplitude
B) Prevents aliasing
C) Filters noise
D) Converts to digital

Answer: B


I10. Essential for analog-to-digital conversion?

A) Amplifier
B) Filter
C) ADC
D) DAC

Answer: C


Advanced Questions (10 MCQs)

A1. R-peak detection algorithm?

A) Fourier Transform
B) Wavelet only
C) Pan-Tompkins
D) Hilbert only

Answer: C


A2. IIR digital filter design uses?

A) Differentiation
B) Integration
C) Bilinear transformation
D) Sampling alone

Answer: C


A3. High-order filter for numerical stability?

A) Direct Form I
B) Direct Form II
C) Cascade form
D) Parallel only

Answer: C


A4. Band-pass from low-pass?

A) Cascade with high-pass
B) Increase cutoff only
C) Decrease cutoff only
D) Multiple LPF stages

Answer: A


A5. ST segment elevation indicates?

A) Normal variant only
B) Myocardial infarction
C) Bradycardia only
D) Electrode fault only

Answer: B


A6. Non-stationary signal analysis?

A) Single FFT
B) Z-transform only
C) Wavelet transform
D) DC measurement

Answer: C


A7. Window functions purpose?

A) Reduce computation
B) Mitigate spectral leakage
C) Convert to analog
D) Increase amplitude

Answer: B


A8. HRV measured from?

A) QRS duration
B) R-R interval
C) P-R interval
D) ST segment

Answer: B


A9. Sharp digital filter cutoff?

A) FIR
B) All-pass
C) DC blocker only
D) Differentiator only

Answer: A


A10. EEG artifact detection via?

A) PCA
B) DC offset only
C) Integration
D) Open circuit only

Answer: A


Short Answer Questions (10)

SA1. Define δ[n]\delta[n] and state its Z-transform.

Answer: δ[n]={1,n=00,n0\delta[n] = \begin{cases} 1, & n = 0 \\ 0, & n \neq 0 \end{cases}. Z{δ[n]}=1Z\{\delta[n]\} = 1.


SA2. State the Nyquist sampling criterion.

Answer: A band-limited signal with maximum frequency f_max can be reconstructed from samples if f_s ≥ 2f_max. Equivalently, sampling rate must be at least twice the highest frequency component.


SA3. What is baseline wander and how is it removed?

Answer: Slow low-frequency drift of the ECG baseline caused by respiration, motion, or electrode impedance changes. Removed with a high-pass filter (typical cutoff 0.05–0.5 Hz).


SA4. Distinguish FIR and IIR filters.

Answer: FIR has finite impulse response, polynomial H(z), always stable, can have linear phase. IIR has recursive structure, rational H(z) with poles, more efficient sharp cutoff but must ensure pole stability inside unit circle.


SA5. What is aliasing?

Answer: When f_s < 2f_max, high-frequency components fold into lower frequencies in the digitized signal, creating false spectral content that cannot be corrected digitally.


SA6. State the causality condition for discrete LTI systems.

Answer: h[n] = 0 for all n < 0. Output depends only on present and past inputs.


SA7. List four EEG frequency bands and one clinical association each.

Answer: Delta (0.5–4 Hz, deep sleep); Theta (4–8 Hz, drowsiness); Alpha (8–13 Hz, relaxed wakefulness); Beta (13–30 Hz, active cognition).


SA8. What does the QRS complex represent?

Answer: Ventricular depolarization — the electrical activation of the ventricles producing the major deflection on the ECG.


SA9. Purpose of anti-aliasing filter?

Answer: Analog low-pass before ADC limits signal bandwidth below f_s/2 so sampling does not create aliased components.


SA10. Why is cascade form preferred for high-order digital filters?

Answer: Second-order sections reduce coefficient quantization effects and numerical rounding errors, improving stability and performance compared to direct-form structures.


Scenario-Based Questions (10)

SC1. An ECG recorder shows 60 Hz sinusoidal overlay on all leads. What filter do you recommend?

Answer: Notch (band-stop) filter centered at 60 Hz with narrow bandwidth. Verify ground and shielding; ensure right-leg drive is functional.


SC2. EEG recorded at f_s = 100 Hz for clinical band analysis up to 45 Hz. Is this adequate?

Answer: Nyquist rate = 90 Hz. f_s = 100 Hz provides minimal margin (Nyquist frequency = 50 Hz). Adequate but tight; 256 Hz is safer clinical practice. Anti-aliasing filter cutoff must be below 50 Hz.


SC3. ECG baseline drifts slowly with patient breathing. Signal processing step?

Answer: Apply high-pass filter (~0.05 Hz) to remove baseline wander while preserving QRS content (>5 Hz).


SC4. Design real-time ECG monitor — list key hardware blocks.

Answer: Electrodes → instrumentation amplifier → high-pass (baseline) → low-pass (anti-alias, ~150 Hz) → notch (50/60 Hz) → ADC (≥500 Hz) → microcontroller/DSP for QRS detection and heart rate.


SC5. EMG contaminated by 50 Hz mains. Sampling at 200 Hz. Concern?

Answer: 50 Hz is below Nyquist (100 Hz) so mains is in-band. Use notch at 50 Hz before or after ADC. If 50 Hz were above f_s/2 it would alias — e.g., 120 Hz at f_s=200 aliases to 80 Hz.


SC6. Patient appears asleep in EEG. Which band dominates?

Answer: Delta band (0.5–4 Hz) dominates in deep sleep.


SC7. Suspected myocardial infarction — which ECG feature?

Answer: ST segment elevation in relevant leads (with clinical correlation).


SC8. Heart sound analysis needs heartbeat frequencies 20–150 Hz. Filter choice?

Answer: Band-pass filter with passband 20–150 Hz.


SC9. Stored ECG needs QRS isolation for morphology analysis. Technique?

Answer: Band-pass (e.g., 5–15 Hz) plus Pan-Tompkins or wavelet-based QRS enhancement; optionally template matching.


SC10. Long-term HRV study from ambulatory ECG. Critical feature?

Answer: Accurate R-peak detection and R-R interval extraction; handle missed/extra beats; use appropriate filtering to preserve QRS timing.


Calculation Problems

C1. Nyquist Rate

A blood pressure waveform contains significant harmonics up to 40 Hz. What is the minimum sampling rate?

Solution:

fmax=40HzNyquistrate=2×40=80Hzf_{\max} = 40 Hz \\ Nyquist rate = 2 \times 40 = 80 Hz

Minimum f_s = 80 Hz. Practical choice: 100–200 Hz with anti-aliasing LPF cutoff < 40 Hz.


C2. Nyquist Rate — Exam Classic

Maximum frequency 5 kHz. Find Nyquist rate.

Solution:

fNyquist=2×5kHz=10kHzf_{N}yquist = 2 \times 5 kHz = 10 kHz

C3. Aliasing Frequency

f_s = 500 Hz. An interference component at 280 Hz is present before ADC (no anti-alias filter). What frequency appears after sampling?

Solution:

fs/2=250Hz280Hz>250Hzaliasesfalias=280500=220Hz(folds into 0–250 Hz band)f_{s}/2 = 250 Hz \\ 280 Hz > 250 Hz \to aliases \\ f_{\mathrm{alias}} = |280 - 500| = 220 Hz \quad \text{(folds into 0–250 Hz band)}

Appears as 220 Hz component (destructive to ECG interpretation).


C4. Discrete Convolution

Compute x[n] * h[n] where x[n] = {1, 2} and h[n] = {3, 1} (n = 0, 1).

Solution:

Length = 2 + 2 − 1 = 3.

y[0]=1×3=3y[1]=1×1+2×3=1+6=7y[2]=2×1=2y[0] = 1\times3 = 3 \\ y[1] = 1\times1 + 2\times3 = 1 + 6 = 7 \\ y[2] = 2\times1 = 2

y[n] = {3, 7, 2}


C5. Convolution — Exam Pattern

x[n] = h[n] = {1, 1, 1}. Find convolution.

Solution:

y = {1, 2, 3, 2, 1}

(See Section 4.1 for step-by-step.)


C6. Z-Transform of Finite Sequence

x[n] = {3, 0, −2} for n = 0, 1, 2. Find X(z).

Solution:

X(z)=3+0\cdotz1+(2)z2=32z2X(z) = 3 + 0\cdotz^{-1} + (-2)z^{-2} = 3 - 2z^{-2} ---

C7. Z-Transform of Shifted Impulse

Find Z{δ[n4]}Z\{\delta[n-4]\}.

Solution:

X(z)=z4Representsfoursampledelay.X(z) = z^{-4} Represents four-sample delay. ---

C8. Stability Check

H(z) = 1/(1 - 0.8z^{-1})$. Is the causal system stable?

Solution:

Pole at z = 0.8. |0.8| < 1 → BIBO stable.


C9. DFT Bin Spacing

f_s = 512 Hz, N = 512 points. What is frequency resolution per bin?

Solution:

Δf=fs/N=512/512=1 Hz per bin\Delta f = f_{s} / N = 512/512 = 1 \text{ Hz per bin}

Bin kk corresponds to frequency k×1k \times 1 Hz.


C10. Heart Rate from R-R Interval

Average R-R interval = 0.8 s. Find heart rate in bpm.

Solution:

HR=60/RRI=60/0.8=75 bpmHR = 60 / RRI = 60 / 0.8 = 75 \text{ bpm}

C11. Z-Transform of Combined Impulses

Find X(z)X(z) for x[n]=3δ[n]+2δ[n1]δ[n4]x[n] = 3\delta[n] + 2\delta[n-1] - \delta[n-4].

Solution:

X(z)=3+2z1z4X(z) = 3 + 2z^{-1} - z^{-4}

Apply linearity and the delay property term by term. This pattern appears when decomposing short FIR impulse responses.


C12. Convolution Length Verification

x[n] has length 8, h[n] has length 5. What is the length of y[n] = x[n] * h[n]?

Solution: Length = N + M - 1 = 8 + 5 - 1 = 12 samples Use this formula before computing to catch indexing errors.


C13. Minimum EEG Sampling Rate

An EEG acquisition system must capture content up to 70 Hz. What is the theoretical minimum sampling rate?

Solution:

fmax=70 Hzf_{\max} = 70 \text{ Hz} Nyquist rate=2×70=140 Hz\text{Nyquist rate} = 2 \times 70 = 140 \text{ Hz}

Clinical devices typically use 256 Hz or 512 Hz to provide guard band for anti-aliasing filter roll-off and software filter margins.


C14. Moving Average via Convolution

A 3-point moving average has h[n] = {1/3, 1/3, 1/3}. Input x[n] = {3, 6, 9, 12}. Compute y[n] = x[n] * h[n].

Solution:

nOverlap sumy[n]
03/31
1(3+6)/33
2(3+6+9)/36
3(6+9+12)/39
4(9+12)/37
512/34

y[n] = {1, 3, 6, 9, 7, 4} — smoothed version of input; moving averages are low-pass FIR filters used in ECG baseline estimation and Pan-Tompkins integration stage.


C15. Difference Equation to Transfer Function

Given y[n] − 0.25y[n − 2] = x[n], find H(z) and classify as FIR or IIR.

Solution: Y(z)(1 - 0.25z^{-2}) = X(z) \ H(z) = 1 / (1 - 0.25z^{-2}) = z^{2} / (z^{2} - 0.25) Poles at z = ±0.5 — both inside unit circle → stable IIR. Feedback terms (past outputs) define IIR structure.


Supplementary Deep Dive: Z-Transform Mastery

This section targets the highest-error cluster in the BSP bank (64 missed items). Study this section until Z-transform, convolution, and sampling feel automatic.

Extended Z-Transform Pair Table

x[n]x[n], causalX(z)X(z)ROC
δ[n]\delta[n]11all zz
u[n]u[n]zz1\dfrac{z}{z-1}z>1\lvert z\rvert > 1
anu[n]a^n u[n]zza\dfrac{z}{z-a}z>a\lvert z\rvert > \lvert a\rvert
nanu[n]n a^n u[n]az(za)2\dfrac{az}{(z-a)^2}z>a\lvert z\rvert > \lvert a\rvert
sin(ω0n)u[n]\sin(\omega_0 n)\,u[n]zsinω0z22zcosω0+1\dfrac{z\sin\omega_0}{z^2 - 2z\cos\omega_0 + 1}z>1\lvert z\rvert > 1

ROC and Stability Decision Tree

Is the system causal?
├── No → check exam stem for two-sided ROC (rare on exit exam)
└── Yes → list poles of H(z)
    ├── Any |pole| > 1 → UNSTABLE (do not use in real-time monitor)
    ├── All |pole| < 1 → BIBO STABLE
    └── Pole on |z| = 1 → MARGINALLY STABLE (integrator, accumulator)

Convolution Drill Set (Self-Test)

Work these without calculator before the exam:

  1. {1, 2} * {1, 1} → {1, 3, 2}
  2. {1,0,2}δ[n1]\{1, 0, 2\} * \delta[n-1]{0, 1, 0, 2} (shifted sequence)
  3. {1, 1, 1} * {1, 1, 1} → {1, 2, 3, 2, 1}
  4. x[n]δ[n]=x[n]x[n] * \delta[n] = x[n] (identity)

Sampling Design Case Study: Rural Clinic ECG

Design a 3-lead rhythm monitor for 50 Hz mains environment:

  1. Clinical goal: Heart rate and basic arrhythmia — bandwidth 0.5–40 Hz sufficient.
  2. Electrodes: Ag/AgCl, gel, impedance < 5 kΩ; secure attachment reduces motion artifact.
  3. Amplifier: Gain ~1000, CMRR > 90 dB, input Z > 10 MΩ.
  4. Analog chain: HP 0.5 Hz → LP 40 Hz → optional notch 50 Hz.
  5. Nyquist: f_max = 40 Hz → Nyquist rate 80 Hz; choose f_s = 250 Hz for margin.
  6. ADC: 12-bit, anti-aliasing LP at ~35–40 Hz before sampler.
  7. Digital: Pan-Tompkins R-peak detection; compute HR = 60/mean(R-R).
  8. Alarm: Bradycardia/tachycardia thresholds on HR.

Every bullet maps to an exam concept: transduction, conditioning, filter selection, sampling theorem, feature extraction.

Fourier and Laplace Connections (AAiT Lecture Alignment)

From the BSP course Fourier and Laplace chapters:

  • Fourier series decomposes periodic continuous signals into harmonics at nf₀.
  • Fourier transform handles aperiodic and periodic continuous-time signals.
  • DFT/FFT is the computational tool for sampled, finite data — what monitors actually run.
  • Laplace transform uses s = σ + jω for continuous-time system analysis (analog circuits, transfer functions).
  • Z-transform is the discrete-time analog; relationship z = e^(sT) under sampling.

Exam routing rule: Independent variable n → Z or DFT. Independent variable t (seconds) → Laplace or Fourier. "Convert CT to DT" → sampling.

Five-Day Study Plan

DayFocusTasks
1δ[n]\delta[n], Z pairsMemorize table; 10 transforms from scratch
2Convolution5 hand convolutions; verify lengths
3Nyquist & aliasing10 f_s problems; sketch alias folding
4Filter selection20 clinical stems → LP/HP/BP/notch
5Timed mixed set50 MCQs from BSP bank; error log review

Top 10 must-memorize answers:

  1. Z{\delta[n]} = 1
  2. Nyquist rate = 2f_max
  3. Baseline wander → high-pass
  4. 60 Hz hum → notch
  5. Alpha EEG = 8–13 Hz; Delta = 0.5–4 Hz (deep sleep)
  6. LTI output → convolution
  7. Discrete frequency → DFT
  8. Anti-aliasing before ADC
  9. y[n] = x[n] + y[n−1] → H(z) = z/(z−1)
  10. x[n]δ[nk]x[n] * \delta[n-k]samples at k

Quantization and Dynamic Range

For B-bit ADC, Δ = V_ref / 2^B. Theoretical SNR ≈ 6.02B + 1.76 dB. A 12-bit ADC with V_ref = 3 V has Δ ≈ 0.73 mV — adequate for amplified ECG but requiring proper gain staging so the QRS uses most of the range without clipping.

EMG and Heart Sound Processing Notes

EMG differs from ECG and EEG in bandwidth and amplitude. Surface EMG captures motor unit action potentials from 10–500 Hz at 0.1–5 mV. A typical chain uses differential electrodes over the muscle belly, band-pass 20–450 Hz, notch at mains frequency, and f_s ≥ 1000 Hz (Nyquist for 500 Hz content). Rectification and low-pass envelope extraction (cutoff ~5 Hz) yield a smooth activation trace for prosthetic control or rehabilitation feedback.

Heart sounds (phonocardiography) occupy roughly 20–150 Hz — lower than EMG but higher than ECG low-frequency content. A band-pass 20–150 Hz emphasizes S1 and S2 while rejecting low-frequency murmur rumble and high-frequency noise. Simultaneous ECG gating helps align acoustic events to the cardiac cycle. Exam stems asking which filter emphasizes heartbeat frequencies expect band-pass 20–150 Hz, not low-pass at 20 Hz (which would remove the signal of interest).

Window Functions and Spectral Analysis Practicalities

When performing DFT on finite EEG epochs, multiplying by a rectangular window (implicit in block extraction) creates sidelobes that spread energy across frequency bins — spectral leakage. Applying Hamming or Hanning windows tapers the epoch edges:

Windowed segment before FFT: x_w[n] = x[n] \cdot w[n]

Trade-off: reduced leakage versus broader main lobe (worse frequency resolution). For detecting a narrow 50 Hz interference line, choose epoch length N so that 50 Hz falls near a bin center: bin spacing Δf = f_s/N. At f_s = 500 Hz and N = 1000, Δf = 0.5 Hz — 50 Hz maps exactly to bin 100.

Bilinear Transform and Prewarping (Advanced Exam Awareness)

IIR digital filters are often designed by mapping analog prototypes via the bilinear transform:

s = (2/T) \cdot (1 - z^{-1})/(1 + z^{-1})

Prewarping adjusts the analog cutoff before mapping so the digital filter meets the intended −3 dB point — the exam may ask why prewarping is used (to correct frequency warping in the bilinear mapping, not to fix input-signal aliasing). Cascade of second-order sections (biquads) implements high-order IIR filters with better numerical stability than direct-form structures at the same order — the standard answer for "high-order IIR realization."

Real-Time vs Offline Filter Causality

Causal filters use only present and past samples — mandatory for live ICU monitors and wearable devices. Non-causal (zero-phase) filters use future samples and can be applied offline to stored Holter data to preserve QRS morphology without phase distortion. Confusing these contexts leads to wrong answers on scenario questions about defibrillator or bedside monitor constraints.


End of Chapter 4 — Biomedical Signal Processing