LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

IIR filter, not contiguous, signal processing

Hello!
 
I am acquiring data countinuously from several voltage output sensors. I am sending the waveforms through an express vi filter (bandpass) and I am using the default setting for IIR filtering. The program is setup such that data acquisition is done with a while loop. The DAQ wile loop is inside of a bigger while loop which is related to program start and stop.
 
Every time I am doing data acqusition through the filter I get a warning that tell me the waveforms are not contiguous. Again, this is not flagged as an error but rather as a warning. The attached example might clarification.
 
The question is: is the IIR filter uses previous waveform information to judge the current waveform? If this is true, then I do not like the solution; if this is not true, the I should probably just ignore the warning...
 
Does the express vi has some type of reset that would activate when the whole program stops because I do not see the warning message first time I start the vi?
 
Thanks
0 Kudos
Message 1 of 4
(3,331 Views)

Come on guys! Give it a try:

I acquire a waveform, take it through the express filter (set on IIR, Butterworth) and save the filtered signal. If I stop data acquisition but not the program, wait a couple of seconds (time of interruption does not matter) and then restart data acquisition, I get a warning from the filter that tells me the data is not contiguous. I am not decimating the data or doing anything with it before the filter and right now it appears that the IIR filter refers to the old waveform to handle the new waveform coming in (which I do not like by the way).

If I stop not just the data acquisition but also the whole program and restart, then the warning signal does not show up. (Does the express filter has some sort of hidden reset?).

Anybody?!

 

0 Kudos
Message 2 of 4
(3,321 Views)
An IIR filter can have a non-zero response which extends infinitely over time. Thus the current output of the filter may depend significantly on the values of previous inputs. If an interruption in the inputs occurs, the internal state of the filter may not be appropriate for the new inputs. This is the reason for the Reset Filter input. Note that after resetting the filter, a transient settling time may need to pass before the new outputs accurately represent the result of filtering the new input. This is because the filter now thinks that your signal was indentically zero for all time before the first sample. The duration of the transient depends on the characteristics of the filter and is not easily specified, although as a general rule its duration will be on the order of the inverse of the filter bandwidth.

You can open the front panel of an Express VI and convert it to a regular VI. Then you can work your way down through the subVIs to see what it does internally. When you get down to the IIR Filter for N Chan.vi you will find that it has a sampling continuity checker and then calls a filter VI using the Call Library Function.

Lynn
0 Kudos
Message 3 of 4
(3,317 Views)

Thank you for your answer.

From your answer I deducted that whenever I restart the data acquisition while the main program is still running I'd better make sure I reset the filter such that it will now "know" that it is new data coming in. I did not have a chance to check inside the express vi yet but from what you are saying it must be some sort of reset button in there that I could 'pull out' in the connector block of the subvi..

The band widths I am using are anywhere between 100 Hz to 40000 Hz so the transient duration will be short to very short and the system, the way it is setup now, will allow enough time to the IIR filter to handle correctly new data.

Finally there is always the option to acquire just the raw data. later I could read it back and filter it if necessary. However, there are situations when I want to filter out noise and possible alising frequencies; moreover, I acquire vibrations and forces in the same time on the same board - if I need the 40kHz sampling rate for vibrations, automatically I will have it too for the "low end" signals as well (0 to 10V from power and force sensors). I believe doing some filtering and maybe some decimation after filtering will help me keep the amount of data low on the 'low end' signals side. Am I correct in my assumptions?

Thanks again.

0 Kudos
Message 4 of 4
(3,311 Views)