Removing drift from EMG signal
9 ビュー (過去 30 日間)
古いコメントを表示
i want to remove the drift from my emg signal that i obtained. i am using the following script

the original emg looks like this:

with the scipt above i get the following detrend:

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!
3 件のコメント
Ben Halkon
2024 年 7 月 31 日
The problem with filtering is that it messes up the phase (which might need to be preserved for subsequent processing, e.g. subtraction of this signal from another; "zero phase shift" double-pass are never truly zero phase shift) and is never good at the beginning/end of the data (which generally has to be truncated).
Star Strider
2024 年 7 月 31 日
There are other ways to remove a baseline shift. One I’ve used successfully uses the islocalmin function with 'MinProminence' and then fit a polynomial to those points. (This usually requires some experimentation.) After that, evaluate the polynomial on the entire independent variable vector, and subtract that result from the signal. The problem with using detrend for this is that it considers the entire signal. This method considers only the selected minima.
回答 (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!
