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

1 visualización (últimos 30 días)
Shawn Treacy
Shawn Treacy el 17 de Dic. de 2018
Comentada: Star Strider el 17 de Dic. de 2018
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.

Respuestas (1)

Star Strider
Star Strider el 17 de Dic. de 2018
See if the series (linik) function will do what you want.
  2 comentarios
Shawn Treacy
Shawn Treacy el 17 de Dic. de 2018
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 el 17 de Dic. de 2018
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.

Iniciar sesión para comentar.

Categorías

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

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by