필터 지우기
필터 지우기

Extracting the individual filters in a crossover filter

조회 수: 18 (최근 30일)
Simon Stone
Simon Stone 2021년 5월 7일
댓글: Soli 2023년 12월 6일
I have set up a crossover filter like so:
cof = crossoverFilter(1, 5000, 48, 44100);
I know I can visualize the two constituent filters like so:
visualize(cof);
But for publication purposes, I would like to change the visualization quite a bit. That's why I'm looking for a way to extract the individual filters from the crossover filter in some way, but I cannot seem to figure it out. I even tried going through the code of the visualize function, but I am having a hard time making sense of it.
Am I missing something? Or is there really no easy way to get to the filter coefficients?

채택된 답변

jibrahim
jibrahim 2021년 5월 7일
Hi Simon,
There is no documented way to get the individual filters. However, there is a hidden function that should help you:
numCrossovers = 2;
cof = crossoverFilter(numCrossovers, [300 5000], 48, 44100);
% Get the SOS filter coefficients for the 3 filters
[b1,a1,b2,a2,b3,a3] = getFilterCoefficients(cof,numCrossovers);
% Use fvtool to visualize
fvtool([b1,a1],[b2,a2],[b3,a3])
% Visualize using dynamic filter visualizer
fv = dsp.DynamicFilterVisualizer('SampleRate',cof.SampleRate);
fv(b1,a1,b2,a2,b3,a3)
  댓글 수: 4
jibrahim
jibrahim 2023년 12월 4일
This method is not documented as of yet.
[b1,a1,b2,a2,b3,a3] = getFilterCoefficients(cof,numCrossovers);
b1 represents the numerator coefficients of the filter filter. a1 represents the denominator of the first filter. Each filter is a SOS filter, so b1 is N-by-3, where N is the number of sections in the SOS filter. a1 is N-by-3.
b2 and a2 represent the numerator and denominator coefficients of the second SOS filter, and so on.
Soli
Soli 2023년 12월 6일
Hi, perfect ! Thank you very much for this info! :)

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Signal Processing Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by