信号対雑音比 SNR。臨床 ECG では通常 20 dB 以上を確保。ノイズ増大で QRS 検出精度が低下
What is Biomedical Signal Analysis?
🙋
What exactly is an ECG signal showing us? I see the wavy line, but what do the spikes mean?
🎓
Basically, an ECG is the electrical story of your heartbeat. Each spike and wave corresponds to a specific electrical event in the heart muscle. The big spike you see is the R-peak, which marks the powerful contraction of the ventricles pumping blood. Try moving the "Heart Rate" slider above—you'll see the time between those R-peaks change instantly, which is the core measurement.
🙋
Wait, really? So the time between the peaks is more important than the shape? And what's all that other wiggly stuff on the signal?
🎓
Great question! The shape tells us how the heart is beating, but the timing tells us how fast. That time between R-peaks is the RR interval. The other "wiggles" are noise—like muscle tremors or electrical interference. In practice, engineers use filters to clean this up. For instance, slide the "Noise Level" control up and down to see how real signals can get corrupted, and then use the "High-Pass Filter" slider to try and remove the slow, drifting "baseline wander."
🙋
Okay, I get the time domain. But what's the "Frequency Spectrum" graph for? Why do we need to look at frequencies for a heartbeat?
🎓
In practice, the frequency view is a detective tool. A pure, steady heartbeat would show a single frequency peak. But a real heart rate varies slightly—that's Heart Rate Variability (HRV), a key health indicator. The spectrum reveals the balance of your nervous system. A common case is using the "Low-Pass Filter" to isolate the high-frequency noise, like 60Hz power line hum, which shows up as a sharp spike in the spectrum. Changing the heart rate slider moves the main peak, while adding noise adds other spikes.
Physical Model & Key Equations
The most fundamental calculation in ECG analysis is determining heart rate from the time interval between ventricular depolarizations (R-peaks).
$$HR = \frac{60}{RR}$$
HR: Heart Rate in beats per minute (BPM). RR: RR interval in seconds, the time between consecutive R-peaks in the QRS complex. This is the direct measurement you can see changing on the simulator's waveform when you adjust the Heart Rate parameter.
To analyze the rhythm and autonomic nervous system influence, we quantify the variation in these intervals. A common simple metric is the Standard Deviation of NN intervals (SDNN), where NN intervals are normal-to-normal (sinus rhythm) RR intervals.
SDNN: Standard Deviation of NN intervals (ms). A higher value generally indicates greater parasympathetic (rest-and-digest) activity and better cardiovascular health. $RR_i$: Individual RR interval. $\overline{RR}$: The mean RR interval over the measurement period.
Frequently Asked Questions
In real biological signal measurements, electromyographic noise, power line noise, and baseline drift are inevitably mixed in. In this tool, you can adjust the intensity of these noises using the noise level slider, and by changing the filter cutoff, you can observe the effect of noise removal in real time.
When you adjust the heart rate slider, the new RR interval is applied starting from the next R wave. Therefore, the waveform change may be delayed until the current heartbeat completes. Please also check the RR interval graph, which updates in real time.
In the ECG frequency spectrum, peaks appear at the fundamental frequency corresponding to the heart rate (e.g., approximately 1 Hz for 60 bpm) and its harmonics. When noise is high, unwanted components increase in low and high frequencies, so you can emphasize the target signal components by adjusting the filter settings.
No, this tool is a simplified simulator for educational and learning purposes. It does not have the accuracy or clinical validity of actual ECG/EEG devices and should not be used for diagnosis or treatment decisions. Please use it solely for understanding signal processing principles and practicing parameter adjustments.
Real-World Applications
Clinical Cardiac Diagnosis: ECG analysis is the first-line tool for diagnosing arrhythmias like atrial fibrillation, myocardial infarction (heart attack), and bradycardia/tachycardia. Engineers design algorithms to automatically detect these abnormal patterns in real-time monitoring equipment, much like the peak detection shown in this simulator.
Ambulatory Holter Monitoring: Patients wear a portable ECG device for 24-48 hours to capture intermittent heart issues. Signal processing, including the filtering techniques you can experiment with here, is crucial to remove motion artifact noise from daily activities while preserving the critical cardiac data.
Brain-Computer Interfaces (BCIs): For EEG signals, frequency band analysis (Alpha, Beta, Theta waves) is used to control external devices with thought. For instance, a user focusing might increase Beta wave power, which a BCI can translate into a command to move a robotic arm or type on a screen.
Sleep Stage Analysis & Neurological Assessment: Polysomnography (sleep studies) uses EEG to characterize sleep stages based on dominant wave frequencies. Similarly, EEG is used to diagnose and monitor conditions like epilepsy by detecting abnormal spike-and-wave discharge patterns that would stand out in both the time-domain waveform and frequency spectrum.
Common Misconceptions and Points to Note
First, be aware of the common tendency to think "removing all noise is perfect." In the simulator, if you apply a strong "filter cutoff," the waveform will indeed become smooth. However, in actual clinical settings, sharp corners in the waveform (high-frequency components) can sometimes contain crucial information. For example, the waveform of a premature ventricular contraction (PVC) becomes wider, but if you round it off with an excessively strong filter, you risk missing this characteristic. Remember that filtering is a "trade-off" operation.
Next, the assumption that "heart rate is constant." The simulator's heart rate slider sets a fixed value, but a living person's heart rate is constantly fluctuating (Heart Rate Variability: HRV). For instance, even at rest, RR intervals subtly vary, e.g., 0.85 seconds, 0.92 seconds, 0.88 seconds... This variation itself is a barometer of autonomic nervous system activity. During analysis, it's important to focus not only on the short-term average heart rate but also on this range of variation.
Finally, the misidentification that "any prominent peak is a QRS complex." Actual ECGs can have artifacts (false signals) appearing as large peaks. Examples include large-amplitude baseline wander from a detached electrode or strong electromyographic (EMG) noise. In the simulator, setting the noise level to maximum can reproduce the phenomenon of another peak riding on top of the QRS wave. When automatically detecting QRS complexes with an algorithm, you need "logic" that makes a comprehensive judgment based not just on amplitude but also on waveform shape and the surrounding context.
Set heart rate (60–180 bpm) using the hr slider to establish baseline ECG rhythm.
Adjust noise level (0–50 µV) with the noise control to simulate real clinical acquisition conditions.
Configure low-frequency cutoff (0.05–1 Hz) via lfc to remove baseline wander and respiration artifacts.
Select signal duration (5–60 seconds) with the dur parameter to capture adequate RR interval variability.
Click Generate to render the waveform, RR interval histogram, and FFT spectrum.
Worked Example
Patient with sinus rhythm at 72 bpm, 15 µV EMG noise floor, 0.5 Hz high-pass filter, 30-second window. Raw signal shows 30 QRS complexes with RR intervals clustering around 833 ms. After filtering, PR segments reveal baseline stability within ±20 µV. FFT peak at 1.2 Hz confirms heart rate component; secondary peaks at 50/60 Hz indicate powerline contamination successfully attenuated by the 0.5 Hz cutoff.
Practical Notes
For arrhythmia detection (atrial fibrillation), increase noise to 20–30 µV and set hr above 100 bpm; RR interval variance exceeding 50 ms flags irregular rhythm.
EEG alpha band (8–12 Hz) requires noise below 5 µV and lfc minimum 0.1 Hz to prevent loss of slow-wave sleep (0.5–4 Hz delta components).