LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Implementation details of "IIR Cascade Filter.vi"

I am trying to understand the implementation of "IIR Cascade Filter.vi".  In Chapter 3 of the Analysis Concepts manual, March 2004 Edition, Part Number 370192C-01, on page 3.22, the details of the implementation are given and in the "Second-Order Filtering" section it is stated that the total number of reverse (a) coefficients is 2Ns and the total number of forward (b) coefficients is 3Ns.  The implementation above this section would not use all of these coefficients. 
 
For example, for 4 stages, the following coefficients would be used at each stage,k:
 
          a1k a2k b0k b1k b2k
k=1    a1  a2    b0   b1   b2
k=2    a2  a4    b0   b2   b4
k=3    a3  a6    b0   b3   b6
k=4    a4  a8    b0   b4   b8
 
i.e 6 a coefficients (not 😎 and 7 b coefficients (not 12).
 
I think that instead of using coefficients a1k, a2k, b0k, b1k and b2k, if the number of coefficients required for a given number of stages is correct, something like coefficients a(2k-2), a(2k-1), b(3k-3), b(3k-2) and b(3k-1) must be used.  This would give the following coefficient usage at each stage:
 
k=1    a0  a1    b0   b1   b2
k=2    a2  a3    b3   b4   b5
k=3    a4  a5    b6   b7   b8
k=4    a6  a7    b9   b10 b11
 
i.e 8 a coefficients and 12 b coefficients, as expected.
 
Am I right that these are the coefficients used at the various stages?  Can you provide a complete, corrected, algorithm description?
 
Thanks in advance,
 
Andrew Whitefield
0 Kudos
Message 1 of 3
(2,705 Views)
I have realised that I have interpreted the equations incorrectly.  I now believe that a1 is one vector of Ns coefficients, a2 is another vector, also of Ns coefficients, etc.  This was unclear, as the "Butterworth Coefficients.vi" and other similar VIs just give one vector of Forward coefficients (b) and one of Reverse coefficients (a), rather than five separate vectors.  I believe that these vectors each have the values for all coefficients for the first stage, followed by all coefficients for the second stage, etc.
0 Kudos
Message 2 of 3
(2,703 Views)
Hi,
Thank you very much for making the tests.
 
Actually you can observe the issue only the first time you transmit a frame superior at 4096 octets.
 
For example, if you transmit 6000 octets  on a 8186, you should see that you need 2 iterations (on the PXI) to read all the data.
First iteration you read            debut HHHHHHHHHHHHHHHHHHHHHHHHHH....
Second iteration you read       HHHHHHHHHHHHHHHHHHHHHHHHHHH fin
To make sure to observe it, you can increase the "Wait until next ms" in the "TCP READ SERVER while loop"
If you transmit 6000 octets a second time, you should read all the data at once.
You should read                      debut HHHHHHHHHHHHHHHHHHHHHH..........HHHHHHHH fin.
 
You should not observe this behavior with the frame inferior of 4096 octets.
 
Thanks again for your help.
 
 
 
0 Kudos
Message 3 of 3
(2,582 Views)