How can I correct the baseline shift of the signal
17 次查看(过去 30 天)
显示 更早的评论
I'm processing EMG signals an there seems to be a shift of the signal on the raw and filtered signals. I'm using a bandpass filter, and the correct cutt off frequencys. Any clue how can I fix it?
0 个评论
采纳的回答
Star Strider
2019-8-28
The baseline constant offset is by definition at 0 Hz, and since your bandpass filter eliminates everything below 0.2 times your Nyquist frequency, the baseline of your filtered signal will be 0, not the baseline of your original signal, since you filtered out the baseline offset. You can add it back in, however that is usually not worrthwhile. Just use the filtered signal as it exists.
Also, use the phase-neutral filtfilt function, not filter, to do the actual filtering.
4 个评论
Star Strider
2019-8-29
I am not certain what you want to do. The bandpass filter should eliminate the baseline.
If you are talking about the line at the right side of the plot that goes to zero and then back to (0,0), that is likely the way your vector is written. It likely looks something like this:
x = [0:10 10 0];
y = [rand(1,11) 0 0];
figure
plot(x, y)
so to get rid of the straight line at the lower end of your plot, you would have to get rid of the zeros at the ends of both vectors. I do not have your vectors to work with, so you need to experiment with that until you get it the way you want it.
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!