필터 지우기
필터 지우기

How can I correct the baseline shift of the signal

조회 수: 17 (최근 30일)
Gemma Malagón
Gemma Malagón 2019년 8월 28일
편집: Gemma Malagón 2021년 4월 10일
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?

채택된 답변

Star Strider
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
Gemma Malagón
Gemma Malagón 2019년 8월 29일
I tried using that code and is still not working, is there another way I could get rid of that flat line?
Star Strider
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개)

제품


릴리스

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by