How do I cascade biquad filters (dsp.BiquadFilter)?

18 visualizaciones (últimos 30 días)
Patrick Boettcher
Patrick Boettcher el 2 de Nov. de 2020
Comentada: Patrick Boettcher el 3 de Nov. de 2020
Hello everyone,
I want to cascade twelve biquad filters and apply the result to an audio signal.
My problem is that I have twelve frequencies that I want to boost on an audio signal.
My solution would be to use a biquad filter in MATLAB with the dsp.biquad object. I use the designParamEQ function for a parametric equalizer design, so that I'm able to set the gain, bandwidth, filter order and frequency. See the code below from this example.
Fs = 48e3;
N1 = 2;
G = 5; % 5 dB
Wo = 10000/(Fs/2);
BW = 4000/(Fs/2);
[B1,A1] = designParamEQ(N1,G,Wo,BW);
BQ1 = dsp.BiquadFilter('SOSMatrix',[B1.',[1,A1.']]);
Cascading twelve biquad filters with the dfilt.cascade function does not work. Cascades must be made of discrete-time filter (DFILT) objects and I currently use dsp.BiquadFilter objects.
Is there a way to design a biquad filter with the dsp.BiquadFilter object that is able to boost twelve frequency coefficients? If yes, how do I do this?
By the way, I don't want to change the bandwidth for each frequency. There should be one bandwidth variable and one gain variable with decreasing amplitude for all the frequency coefficients.
How do I apply my biquad filter to an audio signal? Which function should I use?
Is there a better solution than to use a parametric equalizer design?
I can't find any help on this in the MATLAB documentation.
Thanks in advance,
Patrick

Respuesta aceptada

jibrahim
jibrahim el 2 de Nov. de 2020
Hi Patrick,
You can use dsp.FilterCascade to cascade dsp.BiquadFilter objects
  3 comentarios
jibrahim
jibrahim el 2 de Nov. de 2020
Hi Patrick,
filter is not a supported command for dsp.FIlterCascade.
This is how you should call the object:
y = CascadedBiquads(out);
Patrick Boettcher
Patrick Boettcher el 3 de Nov. de 2020
Thank you for helping me!

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Applications en Help Center y File Exchange.

Etiquetas

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