필터 지우기
필터 지우기

Is there a function to find the product of a transfer function array?

조회 수: 2 (최근 30일)
Shawn Treacy
Shawn Treacy 2018년 12월 17일
댓글: Star Strider 2018년 12월 17일
I have a transfer function array created, for example, by
%sample number of biquads
numBQs = 20;
%preallocate transfer function
BQtfs = tf(zeros(1,1,numBQs));
Fs = 12000; %Hz
%loop over each biquad to create discrete transfer function
for i1 = 1:numBQs
%create discrete transfer function
BQtfs(:,:,i1) = tf([1 -1.5 0.9], [1 -0.9 0.9], 1/Fs);
end
The biquad filter coefficients are typically coming from matrices containing the numerator (and denominator) coefficients in a row such that the transfer function array would be filled by something that looks like
BQtfs(:,:,i1) = tf(BQ_b(i1,:),BQ_a(i1,:), 1/Fs);
If I now want to combine my biquad filters into a single filter, I create the product of the transfer functions. Is there a function or a better way to combine them than a simple loop such as
BQtf = BQtfs(:,:,1);
for i1 = 2:lenBQs
BQtf = BQtf*BQtfs(:,:,i1);
end
The end game is simply to be able to plot the individual filters and the combined filter.
bode(BQtfs)
can be used to efficiently plot the transfer function array, but I'm not sure if there is a better way than this to plot the combined filter.

답변 (1개)

Star Strider
Star Strider 2018년 12월 17일
See if the series (linik) function will do what you want.
  댓글 수: 2
Shawn Treacy
Shawn Treacy 2018년 12월 17일
I saw that function, but I'm unable to get it to operate on the array. Do you have a working syntax for that?
Star Strider
Star Strider 2018년 12월 17일
If I understand correctly what you want to do, I would do something like this:
Fs = 12000; %Hz
sys = tf([1 -1.5 0.9], [1 -0.9 0.9], 1/Fs);
sys1 = 1;
%sample number of biquads
numBQs = 20;
%loop over each biquad to create discrete transfer function
for i1 = 1:fix(numBQs/2)-1
%create discrete transfer function
sys1 = series(sys1,sys);
end
figure
bode(sys1)
This produces a tf object as ‘sys1’.
You will likely have to experiment with it to get the result you want.

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

카테고리

Help CenterFile Exchange에서 Get Started with Control System Toolbox에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by