フィルターのクリア

I need help with fixing my filtering for EMG signals

27 ビュー (過去 30 日間)
Cassandra
Cassandra 2024 年 9 月 4 日
回答済み: Star Strider 2024 年 9 月 4 日
Hello,
I am working with EMG signals for the lower body, but after rectifying, smoothing, filtering, and normalizing the signals, the amplitude of the normalized signal is near or reaches 100% activation for all 12 of the muscles. This result seems unlikely, as my participants are walking, not performing strenuous activities. I suspect the issue lies in the filtering process. However, when I try to adjust the filtering, to say bandpass or savitzky-golay, the normalized signal ends up with quite a bit of noise instead of the smoother line it should be.
%% Step 1: Rectification
% Full-wave rectification
rectified_Raw1 = abs(Raw1);
%% Step 2: Smoothing
MVC_window = 500; % milliseconds
MVC_samples = round(MVC_window / 1000 * Fs);
% moving average to smooth the rectified signal
smoothed_signal = movmean(rectified_Raw1, MVC_samples);
%% Step 3: Filtering
fc = 6; % Cutoff frequency in Hz (tried between 3&10, 6 worked best)
[b, a] = butter(2, fc / (Fs / 2), 'low'); % 2nd order Butterworth low-pass filter
filtered_signal = filtfilt(b, a, smoothed_signal); %filter the smoothed signal
%% Step 4: Normalization
mvc_peak = max(filtered_signal);
normalized_EMG = (filtered_signal / mvc_peak) * 100; % Normalize to percentage of MVC
Here are plots from 2 of the muscles below:

採用された回答

Star Strider
Star Strider 2024 年 9 月 4 日
You are filtering your signals twice — once wiith the movmean call and once with thte butter call. It would likely be best to filter once, preferably using the lowpass function(include the 'ImpulseResponse','iir' name-value pair). Note that you are also filtering the mean of the signal, that apparently has a D-C offset of V, however it is stiill a non-zero-offset. You can eliminate it with a highpass filter (or a bandpass filter to eliminate the D-C offset and frequencies higher than your lowpass cutoff), or simply by extracting tthe mean of the signal. The filter approach might be the better option.
The normalisation is doing exactly what you told it to do. (You can also use the rescale function for this.) The amplitudes of the filtered signal otherwiise appear to be appropriate.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSmoothing and Denoising についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by