Filter löschen
Filter löschen

How can I correct the baseline shift of the signal

17 Ansichten (letzte 30 Tage)
Gemma Malagón
Gemma Malagón am 28 Aug. 2019
Bearbeitet: Gemma Malagón am 10 Apr. 2021
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?

Akzeptierte Antwort

Star Strider
Star Strider am 28 Aug. 2019
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 Kommentare
Gemma Malagón
Gemma Malagón am 29 Aug. 2019
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 am 29 Aug. 2019
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.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Produkte


Version

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by