Removing drift from EMG signal
12 ビュー (過去 30 日間)
古いコメントを表示
i want to remove the drift from my emg signal that i obtained. i am using the following script
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/963570/image.png)
the original emg looks like this:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/963575/image.png)
with the scipt above i get the following detrend:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/963580/image.png)
u can see that the drift isnt completely removed, can anyone see what i am doing wrong or what i can change in my script to get the perfect result around y=0
thanks in advance!
1 件のコメント
Star Strider
2022 年 4 月 14 日
One option woould be to calculate the fft of the signal to see where the low-frequency variations are, then using a highpass filter to pass everything above those frequencies. That should eliminate the baseline variations.
It will be necessary to experiment to determine the best cutoff frequency.
回答 (1 件)
Chunru
2022 年 4 月 14 日
%% detrend
% Remove polynomial trend
t = 0:20;
x = 3*sin(t) + t;
y = detrend(x);
plot(t,x,t,y,t,x-y,':k')
legend('Input Data','Detrended Data','Trend','Location','northwest')
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!