Borrar filtros
Borrar filtros

How can I correct the baseline shift of the signal

17 visualizaciones (últimos 30 días)
Gemma Malagón
Gemma Malagón el 28 de Ag. de 2019
Editada: Gemma Malagón el 10 de Abr. de 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?

Respuesta aceptada

Star Strider
Star Strider el 28 de Ag. de 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 comentarios
Gemma Malagón
Gemma Malagón el 29 de Ag. de 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 el 29 de Ag. de 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.

Iniciar sesión para comentar.

Más respuestas (0)

Productos


Versión

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by