cancel
Showing results for 
Search instead for 
Did you mean: 

FIR-filter for STM32F4 and several frequency bands?

BSchm.6
Associate III

Hi,

there are a lot of examples and tutorials available that describe how to use a FIR-filter (via function arm_fir_f32()). Unfortunately all these examples are either simple low-, high-, or bandpass-filters. Now what I'm looking for, is a possibility, to have frequency bands (e.g. 16 or something like that) spread across the whole frequency range and each of these frequency bands comes with an own attenuation level.

So how can I do that? How can I calculate FIR filter coefficients for several frequency bands? Or is a FIR-filter the wrong way to implement something like that?

Thanks!

 

1 ACCEPTED SOLUTION

Accepted Solutions

is there a similar library available which provides these functions in a similar way like arm_fir_f32()?


So you can find FIR functions, but cannot find transform functions in the same CMSIS-DSP library?

Guys, you are both wrong here. First, "FFT => modify_spectrum => iFFT" is effectively exactly what the FIR filter does! Second, you don't have to process 16 filters, but have to design a single combined filter. You can even "draw the necessary spectrum", do the iFFT and get the impulse response (coefficients) of the respective FIR filter. Third, graphic equalizers for audio are typically done as IIR filters because of tiny processing requirements and latency, but those have non-linear phase response.

View solution in original post

4 REPLIES 4
MasterT
Lead

Attenuation level you say, does it mean "pass trough" filter , like audio ?

If bands are equal in ranges, than FFT & iFFT would be more efficient, otherway 16 bandpass FIR in series

BSchm.6
Associate III

Yes, it is intended to be some kind of frequency-dependent adjusting of audio data.

With 16 FIR filters I have doubts there is enough computing power available with thw STM32F4.

And FFT/iFFT: is there a similar library available which provides these functions in a similar way like arm_fir_f32()?

 

I don't know about library. There is a book with C code examples:

516TQIKLySL._SX380_BO1,204,203,200_.jpg

is there a similar library available which provides these functions in a similar way like arm_fir_f32()?


So you can find FIR functions, but cannot find transform functions in the same CMSIS-DSP library?

Guys, you are both wrong here. First, "FFT => modify_spectrum => iFFT" is effectively exactly what the FIR filter does! Second, you don't have to process 16 filters, but have to design a single combined filter. You can even "draw the necessary spectrum", do the iFFT and get the impulse response (coefficients) of the respective FIR filter. Third, graphic equalizers for audio are typically done as IIR filters because of tiny processing requirements and latency, but those have non-linear phase response.