LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Reset an IIR Filter with new data

hello one and all,  i am creating waveforms and pumping them into an IIR filter.  at times the parameters of the experiment change and i want to reset the data that the IIR filter is drawing off of so that it is calculating from scratch.  i know about the reset input of the IIR filter, however, it is for redesigning the filter coefficients, etc., as stated in the labview help file.  so how do you tell the IIR filter that the waveforms coming in are now a new set of waveforms?

thank you in advance.

lucas
0 Kudos
Message 1 of 3
(3,322 Views)
Hi Lucas,

I assume you are using the Digital IIR Filter.vi.  The logic is not immediately obvious on the diagram of the instances of this VI, but there are two sorts of reset that can happen, namely a coefficient redesign, and a filter state reset.  The coefficient redesign happens when either:
1.  It is the first time the VI has been called
2.  The reset control (on Digital IIR Filter.vi) is true
3.  The dt value of the waveform changes from the previous iteration
4.  The design specifications change from the previous iteration.

The filter state reset (which is what you want I think) will happen:
1.  If there has been a coefficient redesign
2.  If the timestamp of the last point of the previous waveform does not match the timestamp of the first point of the current waveform + dt.  This is basically an assumption of continuity of the waveforms over consecutive calls to the VI.

I think you have two choices to get the behavior you want.  First, you can use the continuity of the waveforms as a way of controlling the reset of the filter state.  When you want a reset, then make the current waveform discontinuous.  The second option would be to use the lower level VIs on the signal processing->filters->IIR palette.  This allows you to explicitly separate the design and implementation of the filter on your diagram, with explicit reset control on the filter states.
Message 2 of 3
(3,317 Views)
ok, that makes sense and the information is completely useful.  thank you, i will make the t0 discontinuous, basically jump back to zero when i want to reset the filter.  and your assumption of me using the digital IIR filters is correct.  thank you and have a great day.  lucas
0 Kudos
Message 3 of 3
(3,312 Views)