LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

IIR filter sampling rate

Hi

 

I am using DFD build a filter from transfer function.vi  to create my filter. I am filtering a signal which is sampled at 100s/s using DFD filtering.vi (point by point) continuously. Input to DFD filtering is double (not an array). I want to know at what rate is my filter sampling? And filtering function should have some memory to it. Because it need to process previous samples. Is that the way filter works in labview?

0 Kudos
Message 1 of 11
(4,350 Views)

suni,

 

        Could you post your code so we can see what you are doing? It is hard to say what your sampling rate is without seeing this. You might also want to check out this information on the DFD. I also don't quite understand your question about the memory. The data that was aquired from your signal would be sent with the data flow until the VI stopped or another aquistion was made. Is this what you meant?

0 Kudos
Message 2 of 11
(4,312 Views)
 
0 Kudos
Message 3 of 11
(4,301 Views)

Hi Money

sorry for the empty post. I posted the whole code so you can see what i am doing. In order to digital filter to process, it needs present aquired sample and the previous 2 samples from the signal and two prevous o/p samples from the filter to calculate the output. BY Memory of the digital filter this is what i meant( storing these privious samples).

 

 

0 Kudos
Message 4 of 11
(4,300 Views)

suni,

 

         Your sampling rate on your filter should be close to your 100 Hz rate that you are aquiring. Close meaning that some of your rate will be eaten up by other parts of your code and operating system performances. As for the memory, I don't think that they maintain previous samples if they are on a point by point basis. I don't know which VI you are talking about specifically but we do have some VIs that have an internal FIFO but I don't know if this is the case. I would try it out and see if the results are what you are expecting. You can go to Tool>>Profile>>Performance and Memory if you would like to see how much time your VIs are taking to run. These results are variable though depending on your OS. Hope this helps!!

0 Kudos
Message 5 of 11
(4,273 Views)

Hi Money,

Thanks for the reply. That was helpful. I was referring to DFD filtering.vi. My main concern is to make digital filtering process faster. I have attached two functions in labview. I am using DFD filtering vi in my application. Can I use IIR filter vi instead to make process faster. I thought that if digital filter use direct form 2 realization it uses previous samples to to calculation. That is why i asked you about memory.

0 Kudos
Message 6 of 11
(4,262 Views)

suni,

 

         I think the IIR Filter would be your better bet. This cuts out the step the DFD has of creating a filter with coefficients by just inputting the coefficients right to it. I would try looking at the performance with both, but I would bet that the IIR would end up being faster.

0 Kudos
Message 7 of 11
(4,256 Views)

Hi Money

Thanks for the reply. IIR filter takes 1D array of data. But my control application process one sample at a time. Can i use build array and connect to IIR filter?

0 Kudos
Message 8 of 11
(4,243 Views)

Yea, You would use Build Array to add all of your data points and then pass that into the IIR Filter.

0 Kudos
Message 9 of 11
(4,236 Views)

Hi

Thanks for the reply. I found IIR filter point by point vi function. I didn't need to use build array function. I analyzed the filter which i got using build a filter from transfer function vi using DFD plot frequency response vi. But as i increase my notch frequency of my filter frequency reponse plot showed less notch frequency than i entered. Is this because i use tustin transform to convert S domain coefficents to Z domain? Is there any transform i can use to avoid this?

0 Kudos
Message 10 of 11
(4,233 Views)