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

16 次查看(过去 30 天)
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

采纳的回答

jibrahim
jibrahim 2020-11-2
Hi Patrick,
You can use dsp.FilterCascade to cascade dsp.BiquadFilter objects
  3 个评论
jibrahim
jibrahim 2020-11-2
Hi Patrick,
filter is not a supported command for dsp.FIlterCascade.
This is how you should call the object:
y = CascadedBiquads(out);

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Audio Processing Algorithm Design 的更多信息

产品


版本

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by