フィルターのクリア

Optimal Cutoff Frequency for Static Noise Detection in ECG Signals?

43 ビュー (過去 30 日間)
rawaa mejri
rawaa mejri 2024 年 6 月 17 日
コメント済み: Star Strider 2024 年 7 月 2 日 21:14
Hello MATLAB Community,
I am currently working on optimizing the detection of static noise in ECG signals and would greatly appreciate your expertise. Specifically, I am looking to determine the best cutoff frequency for filtering this noise. Below, I have listed the SNR (Signal-to-Noise Ratio) values for different cutoff frequencies in two leads, Lead I and Lead aVL:
  • Cutoff Frequency = 0.5 Hz
  • SNR in Lead I: 7.98 dB
  • SNR in Lead aVL: 5.41 dB
  • Cutoff Frequency = 1.0 Hz
  • SNR in Lead I: 7.29 dB
  • SNR in Lead aVL: 5.11 dB
  • Cutoff Frequency = 5.0 Hz
  • SNR in Lead I: 4.03 dB
  • SNR in Lead aVL: 3.23 dB
  • Cutoff Frequency = 10.0 Hz
  • SNR in Lead I: 2.17 dB
  • SNR in Lead aVL: 1.96 dB
Quantification of Noise:
  • Cutoff Frequency = 0.5 Hz
  • Number of noise points in Lead I: 299
  • Number of noise points in Lead aVL: 341
  • Cutoff Frequency = 1.0 Hz
  • Number of noise points in Lead I: 278
  • Number of noise points in Lead aVL: 304
  • Cutoff Frequency = 5.0 Hz
  • Number of noise points in Lead I: 179
  • Number of noise points in Lead aVL: 213
  • Cutoff Frequency = 10.0 Hz
  • Number of noise points in Lead I: 127
  • Number of noise points in Lead aVL: 137
Additionally, I have attached an image showing the residuals ( lead I ) .
To determine the best threshold value, I used an approach based on minimizing the number of noise points detected in the filtered signal. Here is a detailed explanation of the process:
Process to determine the best threshold value
Calculation of the filtered signal:
For each cutoff frequency, I applied a high-pass filter to remove low-frequency components from the ECG signal.
Threshold definition:
I tested different threshold values, defined as multiples of the standard deviation (STD) of the filtered signal. The tested thresholds were 0.25 * STD, 0.5 * STD, 0.75 * STD, and 1 * STD.
Noise point detection:
For each threshold value, I detected points in the filtered signal where the amplitude exceeds the threshold.
The number of detected noise points is counted for each threshold value.
Selection of the best threshold:
The best threshold is the one that minimizes the number of detected noise points. The hypothesis is that the optimal threshold eliminates noise without affecting the useful components of the ECG signal.
Based on this data, I am seeking advice on the most suitable cutoff frequency for effectively reducing static noise while preserving the integrity of the ECG signal. Any suggestions or insights into methodologies for determining this would be highly valuable.
Thank you in advance for your help!
Best regards,

採用された回答

Star Strider
Star Strider 2024 年 6 月 17 日
You have not defined ‘static noise’ so I have no idea what you’re actually filtering.
The bandwidth of a normal EKG is generally 0 Hz (D-C) to 45 Hz, although with complex arrythmias (most notably atrial fibrillation), it can go up to 100 Hz, and baseline drift will show up as low-freqauency noise, usually less than 2 Hz. Any lowpass (for only high-frequency noise) or bandpass (for baseline drift with high-frequency noise) filter with cutoff frequencies outside those limits (higher or lower, respectively) will eliminate some information. For isolated mains/powerline frequency noise (usually 50-60 Hz), you can use a notch filter to eliminate it, although a lowpass filter with a 45 Hz cutoff will work as well in that instance.
The filter choice is generally IIR, and I prefer elliptic filters for their computational efficiency.
The best way to design a filter for any purpose is to first calculate the Fourier transform of the signal, see if the noise is band-limited (as opposed to broadband) and then choose the cutoff frequencies with that in mind. For band-limited noise, a frequency-selective filter will work. For broadband noise, I usually use a Savitzky-Golay filter or wavelet denoising, whichever is more efficient for that particular problem.
The signal you posted appears to be relatively ‘clean’, so I would be tempted to just lleave it as it is.
If you want to plot a 2D vectorcardiogram, you can use Lead I and aVF as:
figure
plot(Lead_I, Lead_aVF)
grid
I suggest doing that experiment.
.
  16 件のコメント
rawaa mejri
rawaa mejri 2024 年 7 月 2 日 20:54
Thank you very much @Star Strider.
Do you advise me to treat each type of noise separately or to use the same treatment you did here and ignore the noise in the dataset? After that, should I apply Z-score normalization?
Thank you very much.
Star Strider
Star Strider 2024 年 7 月 2 日 21:14
As always, my pleasure!
I doubt that there is a way to treat each sort of noise differently, essentially because there is no way to differentiate them. You could see if using wavelets to detect them individually would work, however thaty is likely not possible either.
I am not certain why you would want to normalise them at all. The impiortant features in an EKG (and for most — if not all — physiological signals) is the signal morphology (important signal features) in the signals, and normalising them eliminates those features. Also, the relative amplitudes of the R-deflection (and other deflections) in the various leads are important, for example in calculating the cardiac axis, and normalising the various leads to ome set of amplitudes destroys that. There is also normal amplitude variations in any given lead that is also important and shoold not be changed by normalising them.
I would just elimiinate as much high-frequency noise and low-frequency baseline variation and offset as possible, and leave it at that. There are various ways to do that, and I outlined frequency-selective filters and multiband filters (Savitzky-Golay filters) in my discussion here, that are the only available ways to deal with the various types of noise. If you have the Wavelet Toolbox, you can see if wavelet denoising (the wdenoise function, and related functions) can improve these signals, however I doubt if they could significantly improve what has already been done here.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSingle-Rate Filters についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by