Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Digital Filters and continues Datastreams?

During a long period of data acquisition I want to inform the user with intermediate results.
But I have to implement a LowpassFilter.
I couldn't find any information how to use Digital Filters of NationalInstruments.Analysis.DSP.Filters
with continues Datastreams.
Can anybody give me a hint ?
0 Kudos
Message 1 of 5
(3,565 Views)
hello heinz,

can you provide further information on the application, that you use?
do you continuous acquire blocks of data?
means intermediate results, that you present constant block of data or that you need the result for the whole time you acuired?

regards,

robert h
national instruments
0 Kudos
Message 2 of 5
(3,553 Views)

Hello robert,

thank you very much for your reply and sorry for the late reaction.

My application runs 24 hours a day an acquires data with a sample rate of 50kHz.

This data will be transfered in blocks of about 10k every 200ms to a low pass filter and then to a display to present intermediate results.  But the settling time of the filter is longer than the update frequency of the display.
In that case I need the possibility to give the filter an initial value. But I couldn't find any related method.

regards,

heinz

0 Kudos
Message 3 of 5
(3,529 Views)
hello heinz,

does this mean, that the time, for one filter operation with one of your packets takes longer as you have for displaying the result on the screen?

which filter do you use?
could you provide a code snippet?

regards,

robert h
0 Kudos
Message 4 of 5
(3,520 Views)

hello robert,

I think I found the problem. I used the filter as a traditional function.

      Private IStream() As Double
      Private QStream() As Double
      Private Filter As Filters.ButterworthBandpassFilter
      ....      

      Filter = New Filters.ButterworthLowpassFilter(cFilterOrder, nSampleRate, nCutOffFreq)
      ....

     IStream = Filter.FilterData(IStream)
     QStream = Filter.FilterData(QStream)

I used the same filter for 2 different data streams

But the filter is an object  with its own history, so

         Private Filter1 As Filters.ButterworthBandpassFilter
         Private Filter2 As Filters.ButterworthBandpassFilter
      ....      

      Filter1 = New Filters.ButterworthLowpassFilter(cFilterOrder, nSampleRate, nCutOffFreq)
      Filter2 = New Filters.ButterworthLowpassFilter(cFilterOrder, nSampleRate, nCutOffFreq)
      ....

     IStream = Filter1.FilterData(IStream)
     QStream = Filter2.FilterData(QStream)

     Now it seems to work!

 

Thank you very much

 

Heinz

 

Message Edited by heinzS on 08-31-2005 07:44 AM

0 Kudos
Message 5 of 5
(3,513 Views)