Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

What design tools are available for generating coeffecients for the windowedfirlowpass filter?

What design tools are available for generating coeffecients for the windowedfirlowpass filter?
 
Are there any examples of generating the coefficients and using the routines?
 
I'm using Visual Basic .net
 
Thanks
 
Steve
0 Kudos
Message 1 of 3
(3,082 Views)

Hi Steve,

 

We don't have any shipping examples that use that specific function. However, we do have one example entitled Filtering and another called Windowing that show how to use similar methods.  Find them in the <MeasurementStudioVS2005>\dotNET\Examples\Analysis folder.

 

You may or may not already know this, but the NationalInstruments.Analysis.Dsp.Filters namepsace includes many classes of filters including the WindowedFirLowPassFilter class.  Here is a just a brief code snippet that shows the basics (Note. The numbers I used were just randomly picked numbers so they may not make sense in the "analysis" world but the example just shows how to correctly use the functions).


Dim inputData(1999) As Double

Dim filteredData(1999) As Double
Dim coefficients(4) As Double
Dim samplingFrequency, cutoffFrequency As Double
Dim numberOfCoefficients As Integer
Dim gaussianNoise As GaussianNoiseSignal = New GaussianNoiseSignal(1.0, 17)

' Generate a Gaussian noise signal that represents inputData
inputData = gaussianNoise.Generate(1000.0, 2000)

samplingFrequency = 1000.0
cutoffFrequency = 300.0
numberOfCoefficients = 4

Rest of code continued on next post.....

Hope this helps!

Best Regards,

Jonathan N.
National Instruments
0 Kudos
Message 2 of 3
(3,071 Views)

Last piece of code...

Dim filter As New WindowedFirLowpassFilter(samplingFrequency, cutoffFrequency, numberOfCoefficients, FirWindowType.Blackman)

filteredData = filter.FilterData(inputData)
coefficients = filter.GetCoefficients

Hope this helps!

Best Regards,

Jonathan N.
National Instruments
0 Kudos
Message 3 of 3
(3,069 Views)