Problem in Designing Linear Phase (Zero Phase) FIR Filter!

2 visualizaciones (últimos 30 días)
Minerva Bionic
Minerva Bionic el 15 de Sept. de 2021
Comentada: Star Strider el 16 de Sept. de 2021
Hi everyone,
I'am going to design a linear phse low pass FIR filter.
It seems that I'm defining something wrong.
lpf = designfilt('lowpassfir','FilterOrder',6,'CutoffFrequency',5000,'PassbandRipple',1,'DesignMethod','cls','ZeroPhase',true,'SampleRate',1e6);
IIR filter works fine but with considerable phase shift.
lpf = designfilt('lowpassiir','FilterOrder',3,'PassbandFrequency',5000,'PassbandRipple',1,'StopbandAttenuation',55,'DesignMethod','ellip','SampleRate',1e6);
I dont have any idea...

Respuesta aceptada

Star Strider
Star Strider el 15 de Sept. de 2021
I do not see that you are doing anything wrong.
However I made some changes that might improve things —
lpf1 = designfilt('lowpassfir','FilterOrder',46,'CutoffFrequency',5000,'PassbandRipple',1,'DesignMethod','cls','ZeroPhase',true,'SampleRate',1e6);
↑ ← CHANGED
figure
freqz(lpf1.Coefficients,1,2^16,1E6)
lpf2 = designfilt('lowpassiir','FilterOrder',3,'PassbandFrequency',5000,'PassbandRipple',1,'StopbandAttenuation',55,'DesignMethod','ellip','SampleRate',1e6);
figure
freqz(lpf2.Coefficients, 2^16, 1E6)
These are two different filters with different characteristics.
The phase delay/distortion will likely disappear with fitlfilt rather than filter to filter the signal. Tha is true for FIR and IIR filters in MATLAB.
In general, FIR filters require a much higher order (and so are llss computationally efficient) than IIR filters to get the same response. Here, I increased the IIR filter order from 6 to 46.
.
  4 comentarios
Minerva Bionic
Minerva Bionic el 16 de Sept. de 2021
I will look for both you mentioned.
Thank you for your asistance.
Star Strider
Star Strider el 16 de Sept. de 2021
As always, my pleasure!
.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Filter Design and Analysis en Help Center y File Exchange.

Productos


Versión

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by