フィルターのクリア

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 Center および File ExchangeGet 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