Pregunta

i'm trying to implement a low-pass this way, as in the Digital signal processing guide book, but my alfa = 2.660393305517957e-55 which is obviously wrong. Here's the code:

x = exp(-2*pi*20);

a0 = 1 - x;
b1 = x;

eda2(1) = eda_raw2(1);

for n = 2:length(eda_raw2)
    eda2(n) = a0*eda_raw2(n) + b1.*eda2(n - 1);
end
¿Fue útil?

Solución

The problem is how you are computing the pole (x) of the discrete-time filter. You are not considering the sampling frequency! The computation should be x = exp(-2*pi*20/fm);, where fm is the sampling frequency in Hz.

Otros consejos

Check the online mathworks page : Low Pass Filter Design

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top