Math.Net NeoDym digital filters

Aug 13, 2011 at 9:27 AM

Hi,

I'm trying to create a digital filter using NeoDym, for some reason the filter doesn't seem to output any data, I am initializing it with this code:

double[] mathNetFiltercoefficients = MathNet.SignalProcessing.Filter.IIR.IirCoefficients.BandPass(samplingFrequency, (samplingFrequency / 4), 100);

//MathNet.SignalProcessing.Filter.OnlineFilter.CreateBandpass(MathNet.SignalProcessing.Filter.ImpulseResponse.Infinite, samplingFrequency, (samplingFrequency / 4) - 10, (samplingFrequency / 4) + 10);

//tried above way to initialize

 MathNetFilter1 = new MathNet.SignalProcessing.Filter.IIR.OnlineIirFilter(mathNetFiltercoefficients);

 

I have this line in a for loop to process the samples:

filteredSample = MathNetFilter1.ProcessSample(sampleToProcess);

 

I am not sure what I did wrong here, also is the Math.net numerics take over signal processing in the future?

 

cheers,

Jamie

Coordinator
Aug 13, 2011 at 1:55 PM

Hi Jamie

Indeed, there seems to be an issue in the OnlineIirFilter class in the current master branch.

In a quick code scan, Line 81 of IirFilter.cs looks suspicious, but I'll need to check and verify the whole code base (and upgrade it to .Net 4 and VS2010 while we're at it).

Thanks,
Chris

Aug 15, 2011 at 1:40 AM

Hi Chris,

Ok well I am using a lot of filters in a project I am working on so I can do some rigorous testing if you want let me know :D

 

cheers,

Jamie

Jun 13, 2012 at 8:26 AM

Hi there,

I've got the same problem when I'm using OnlineIirFilter.

So, I decided to fix the problem, but I've got some questions about the code :

- The variable un is reinitialized in each loop. I don't understand why.

- What are leftcoefficients et rightcoefficients? (thanks to wikipedia, I think it's a and b coefficient, but I'm not sure)

 

Finaly, is there someone who already fix this problem?

Thanks!

Nov 2, 2012 at 4:38 PM

Hi all,

Did anyone come up with a fix for this? As above, I've found the IirFilter to be broken.

Thanks.

Feb 5, 2013 at 8:08 PM
Now there is an attempt to port the Neodym filters to Math.NET Numerics :-)

The actual development takes place in the filtering branch.
Every help is welcome.