Filter node
Impedance
Real-time electrode contact quality monitor for EEG systems. Two measurement modes: LOFF (true kΩ via ADS1299 AC lead-off excitation) and Signal Quality (passive noise-proxy estimation without current injection). GPU-accelerated Goertzel analysis with color-coded bar chart visualization and per-electrode quality classification.
Inputs
| Port | Type | Default |
|---|---|---|
| EnableOff stops measuring, forgets the running averages and reports the electrodes as not all good. | bool | true |
| EEG DataThe raw EEG stream to measure. Cable it from an EEG device or simulator node; without it the bars stay empty. | structure | — |
| ModeSignal Quality estimates contact from noise and mains hum with no current injected, LOFF reads true kΩ but needs the excitation firmware and pollutes the raw EEG. Anything outside the two falls back to Signal Quality. | int | 1 |
| Mains HzYour local power-line frequency, so hum pickup can be measured in the right band — 50 in Europe, 60 in the Americas. Only the ±2 Hz band around it is examined. | float | 50.0 |
| XHorizontal centre of the bar chart, in Grafit units where the shorter screen edge spans -1…1. Not limited. | float | 0 |
| YVertical centre of the bar chart, in Grafit units. Not limited. | float | 0 |
| WidthWidth of the bar chart in Grafit units; the channels share it evenly. Not limited, but 2 fills the shorter screen edge. | float | 2.0 |
| HeightHeight of the bar chart in Grafit units. Not limited; below about 0.1 the labels crowd the bars. | float | 0.5 |
| Show LabelsDraws the electrode names under the bars and the unit above them. Off also frees the margins, so the bars grow wider. | bool | true |
| Label SizeText size for the labels, in points; the value readouts use 85 percent of it. Not limited, but 9…18 keeps the chart readable. | float | 12.0 |
| Good ThresholdBelow this the contact counts as good and the bar turns green. In kΩ for LOFF, in the same scale for Signal Quality; around 10 is the usual gel-electrode target. | float | 100.0 |
| Bad ThresholdAt or above this the contact counts as bad and the bar turns red, with the span between the thresholds shown as marginal. Always kept at least 1 above Good Threshold. | float | 500.0 |
| WindowHow many seconds of signal each measurement looks at. Longer is steadier but slower to react; anything beyond what the ring buffer holds is trimmed to its length. | float | 1.0 |
Outputs
| Port | Type |
|---|---|
| Image | image |
| WidthWidth of the bar chart in Grafit units; the channels share it evenly. Not limited, but 2 fills the shorter screen edge. | float |
| HeightHeight of the bar chart in Grafit units. Not limited; below about 0.1 the labels crowd the bars. | float |
| Impedances | json |
| All Good | bool |
How It Works
The Impedance node monitors electrode contact quality in real time, helping you ensure reliable EEG signal acquisition before and during recording sessions. It reads raw data from the EEG device’s shared Metal buffer and computes per-channel impedance or quality metrics.
Two Measurement Modes
The node supports two fundamentally different approaches to impedance measurement:
| Mode | Method | Output Unit | Requires |
|---|---|---|---|
| LOFF (kΩ) | ADS1299 AC lead-off excitation at fDR/4 | kΩ (true impedance) | Firmware ENABLE_IMPEDANCE_LOFF = 1 |
| Signal Quality | Passive noise analysis (thermal noise + mains hum) | SQI 0–100 (quality score) | No firmware changes needed |
Signal Quality Mode
Signal Quality mode estimates electrode contact quality from the noise characteristics of each channel — without injecting any excitation current. This is the default and recommended mode for most EEG applications.
How It Works
The fundamental principle: poorly connected electrodes have higher impedance, which amplifies both thermal noise and mains interference. The node measures three independent metrics per channel:
| Metric | Frequency Range | What It Measures |
|---|---|---|
| High-band RMS | 70–200 Hz | Thermal noise (Johnson–Nyquist). Proportional to √Z. Measured above the EEG content band, below Nyquist/2. |
| Mains hum ratio | 50 or 60 Hz | Powerline interference pickup. Higher impedance electrodes act as better antennas for mains hum. |
| Broadband RMS | Full band | Reference signal level for mains ratio normalization. |
Signal Quality Index (SQI)
The three metrics are combined into a single score from 0 to 100:
| Score | Meaning | Typical Cause |
|---|---|---|
| 80–100 | Excellent contact (green) | Well-applied wet gel electrode, <5 kΩ |
| 40–80 | Marginal contact (yellow) | Drying gel, loose contact, dry electrode |
| 0–40 | Poor contact (red) | No gel, electrode not touching skin |
| 0 | Disconnected (grey) | ADC saturation detected (>50% samples at rail) |
GPU Acceleration
All six Goertzel frequency filters (5 high-band + 1 mains) run in parallel per channel via a Metal compute kernel. A single pass over the ring buffer computes all metrics simultaneously. GPU acceleration reduced computation time from 2.13 ms to 0.39 ms (5.5× speedup).
50.0 for Europe/Asia, 60.0 for North/South America. The node uses this to tune the mains hum Goertzel filter.LOFF Mode
LOFF mode uses the ADS1299’s built-in AC lead-off detection circuit for true impedance measurement in kiloohms.
How It Works
The ADS1299 ADC injects a small AC excitation current at fDR/4 (500 Hz at 2 kSPS) through each electrode. The Impedance node then:
Extracts the amplitude of the 500 Hz excitation signal per channel using a single-frequency Goertzel filter. GPU-accelerated: all channels processed in parallel via Metal compute shader.
Converts the measured voltage to impedance: . The firmware uses 24 nA peak excitation current (ILEAD_OFF_24nA setting).
Exponential moving average (α = 0.92, ~0.6 s time constant) prevents flickering while remaining responsive to cable changes.
Each channel is classified as good, marginal, bad, or disconnected based on the configurable Good/Bad thresholds.
ENABLE_IMPEDANCE_LOFF = 1. The excitation current adds a 500 Hz signal to the raw EEG data, which will appear in spectral analysis. Disable LOFF before recording clean EEG data.Quality Classification
Both measurement modes use the same color-coded quality classification system. Thresholds are configurable via the Good Threshold and Bad Threshold inputs.
| Quality | Color | LOFF Condition | Signal Quality Condition |
|---|---|---|---|
| Good | Green | Z < Good Threshold | SQI > Good Threshold |
| Marginal | Yellow | Good ≤ Z < Bad Threshold | Bad Threshold ≤ SQI < Good Threshold |
| Bad | Red | Z ≥ Bad Threshold | SQI < Bad Threshold |
| Disconnected | Red | ADC saturation detected (>50% of samples at 95% of 24-bit max) | |
| Dead | Grey | Hardware fault or shorted channel (no signal) | |
Output: Impedances (JSON)
The Impedances output port provides per-electrode values as an OrderedJSON object with anatomical electrode ordering:
// LOFF mode (kΩ):
{"Fp1": 4.2, "Fp2": 3.8, "C3": 12.1, "C4": 8.7, "P3": 5.4, "P4": 6.2, "O1": 45.3, "O2": 7.1}
// Signal Quality mode (SQI 0–100):
{"Fp1": 92, "Fp2": 95, "C3": 67, "C4": 78, "P3": 88, "P4": 91, "O1": 12, "O2": 85}
Output: All Good (Bool)
The All Good output is true when every electrode is classified as “good”. Use this as a gate signal to start recordings only when all electrodes are properly connected.
Settings Reference
Measurement
| Parameter | Default | Description |
|---|---|---|
| Mode | Signal Quality | Measurement mode: 0 = LOFF (kΩ), 1 = Signal Quality (SQI) |
| Mains Hz | 50.0 | Powerline frequency: 50 Hz (Europe/Asia) or 60 Hz (Americas) |
| Window | 1.0 | Analysis window in seconds. Longer = smoother, shorter = more responsive. |
| Good Threshold | 10.0 | Threshold for “good” classification (kΩ in LOFF, SQI in Signal Quality) |
| Bad Threshold | 50.0 | Threshold for “bad” classification |
Display
| Parameter | Default | Description |
|---|---|---|
| X, Y | 0, 0 | Position in Grafit coordinates |
| Width | 2.0 | Width of the bar chart display |
| Height | 0.5 | Height of the bar chart display |
| Show Labels | true | Display electrode names and value labels |
| Label Size | 12.0 | Font size for electrode labels |
Typical Graph Configurations
Pre-Recording Electrode Check
Monitor electrode quality before starting an EEG recording session:
Quality-Gated Recording
Only allow recording when all electrodes show good contact:
Per-Electrode Impedance Routing
Extract individual electrode values for custom processing:
Performance
GPU Acceleration
Both LOFF and Signal Quality modes use Metal compute shaders for parallel processing across all channels. The GPU performs the numerically intensive Goertzel DFT filtering, while lightweight score computation runs on the CPU.
| Metric | Value | Notes |
|---|---|---|
| Compute rate | 25 Hz | Throttled to avoid 60 fps overhead. ~2 of every 3 frames use cached output. |
| LOFF GPU time | < 0.3 ms | Single Goertzel filter per channel, all channels parallel |
| Signal Quality GPU time | 0.39 ms | 6 Goertzel filters per channel, single ring buffer pass |
| EMA smoothing | α = 0.92 | ~0.6 s time constant, prevents visual flickering |
| Channel support | 1–32 | Scales with device electrode count |
Open Impedance in the interactive catalog →
Impedance is one of 381 nodes in Grafit Pro.
Free download. Every feature for 7 days, no card. Then €99.99 once — or keep playing your projects as a Player.