topic IIR Direct Form II Structure Implementation in LabVIEW
https://forums.ni.com/t5/LabVIEW/IIR-Direct-Form-II-Structure-Implementation/m-p/1730580#M608011
<P>Hello all, I am trying to implement the IIR Direct Form II filter structure in Labview. I am doing this the "hard way" and I am not using the Labview built-in filter blocks. I have coded this in Matlab and have attached a zip file that contains: 1) the Labview VI. 2) the input waveform file for testing the Labview VI. 3) a document showing the Matlab graphs. The Matlab graphs are correct. The problem is that the first 3 graphs from the Labview VI match the Matlab graphs but the last one (Block 3 6th Order LPF output voltage) does not. The 6th Order Cascade LPF should be filtering out any frequency above 42Hz. As you can see from the other 3 graphs, the dominant frequency is 120Hz. But this is not being filtered out in the LPF. I should note that I am a new Labview user and have very limited knowledge on how to use this program. So, I will need detailed instructions, or even better, I would like for someone to modify the attached VI so I can see exactly how this should be done. Thanks! By the way the sample freq is 10kHz. But this is defaulted in the front panel. And all the coefficients that appear in the front panel are for the 6th order LPF and they agree (within round off error) with Matlab and with my hand calculations. I think my problem has something to do with how I am presenting the data to the filters. I am feeding the filter train directly with the waveform file. Maybe this is not correct?</P>Thu, 06 Oct 2011 13:54:28 GMTTheHardWay2011-10-06T13:54:28ZIIR Direct Form II Structure Implementation
https://forums.ni.com/t5/LabVIEW/IIR-Direct-Form-II-Structure-Implementation/m-p/1730580#M608011
<P>Hello all, I am trying to implement the IIR Direct Form II filter structure in Labview. I am doing this the "hard way" and I am not using the Labview built-in filter blocks. I have coded this in Matlab and have attached a zip file that contains: 1) the Labview VI. 2) the input waveform file for testing the Labview VI. 3) a document showing the Matlab graphs. The Matlab graphs are correct. The problem is that the first 3 graphs from the Labview VI match the Matlab graphs but the last one (Block 3 6th Order LPF output voltage) does not. The 6th Order Cascade LPF should be filtering out any frequency above 42Hz. As you can see from the other 3 graphs, the dominant frequency is 120Hz. But this is not being filtered out in the LPF. I should note that I am a new Labview user and have very limited knowledge on how to use this program. So, I will need detailed instructions, or even better, I would like for someone to modify the attached VI so I can see exactly how this should be done. Thanks! By the way the sample freq is 10kHz. But this is defaulted in the front panel. And all the coefficients that appear in the front panel are for the 6th order LPF and they agree (within round off error) with Matlab and with my hand calculations. I think my problem has something to do with how I am presenting the data to the filters. I am feeding the filter train directly with the waveform file. Maybe this is not correct?</P>Thu, 06 Oct 2011 13:54:28 GMThttps://forums.ni.com/t5/LabVIEW/IIR-Direct-Form-II-Structure-Implementation/m-p/1730580#M608011TheHardWay2011-10-06T13:54:28ZRe: IIR Direct Form II Structure Implementation
https://forums.ni.com/t5/LabVIEW/IIR-Direct-Form-II-Structure-Implementation/m-p/1732874#M608427
<P>I'm not very familiar with filter logic, but it appears there must just be an issue with the actual code. With all the data wires crossing each other, two of them may be connecting when you intended on to go over the other or vice versa.</P>
<P> </P>
<P>Is there a reason you do not want to use the built-in LabVIEW VIs? Furthermore, the LabVIEW Adaptive Filter Toolkit has several tools that make filtering much easier (sorry, I don't mean to sound like a salesman..). If you're concerned with performance, these functions are typically as efficient - and sometimes more efficient - than hard coding everything.</P>
<P> </P>
<P>Sorry I know this isn't terribly helpful, but I would recommend confirming that the logic is correct and/or trying to utilize some of LabVIEW's functions to make this a bit easier.</P>
<P> </P>
<P>-Chris G</P>Fri, 07 Oct 2011 22:12:32 GMThttps://forums.ni.com/t5/LabVIEW/IIR-Direct-Form-II-Structure-Implementation/m-p/1732874#M608427Chris-G2011-10-07T22:12:32Z