What should the order of my FIR filter be?
24 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Dear all,
I'm having difficulty deciidng on the order (labelled as x) of an FIR filter. I am creating speech-shaped noise using audio files with an Nfft = 4096 & a sampling rate = 22050. When doing the following:
FIR = fir2(x,NormFrqs,MagSpect);
If the order is < Nfft (as is suggested), then when subsequently trying to use pwelch:
[spect,frqs]=pwelch(SSN, win_, overlap*Nfft, Nfft, Fs,'power');
Pwelch does not run as the window (ie. hann(Nfft) or rectwin(Nfft)) is greater than the the input sample (noise filtered through the FIR filter). Does anyone know what the solution to this is? I have tried making the order of the filter > Nfft, however, the resulting speech file is has an entirely different duration to the original audio files.
Thank you!
0 comentarios
Respuestas (1)
Star Strider
el 27 de Mzo. de 2020
The fir2 function documentation appears to favour even-numbered filter orders. (The only MATLAB functions that I know of that calculate the order for FIR filters are kaiserord and firpmord.) It’s likely best to experiment to determine the lowest filter order that successfully matches the design requirements.
6 comentarios
Star Strider
el 30 de Mzo. de 2020
I appreciate the update.
I will delete my Answer in a few minutes.
Ver también
Categorías
Más información sobre Digital Filter Design en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!