Extremely low frequency filters

I guess it depends on several factors, among others the order of the filter, but you have a few possibilities:

  1. Find a signal generator that gets there. These are rather inexpensive nowadays.
  2. Trust the math. This is a digital filter and as such it scales with sampling rate. If you can increase the sampling rate by two orders of magnitude you would have a filter with a 5Hz cutoff, much easier to measure. Likewise, if the limiting factor becomes the ADC you can isolate it from the filter and feed in some artificial digital data.
  3. Use a step response (many wideband signals would do). Calculate the step response of your desired filter and compare with the result. Or, alternatively, compute the frequency response by means of the FFT of the step response.

We use a variation of alternative 3 in some of our test setups, not because we cannot generate the slow waveforms required, but because the <0.01Hz cutoff of our analog filters would take way too long to characterize if we tried even a rough frequency sweep. This reduced the testing time from more than an hour to mere minutes.


I would use my Agilent function generator, which goes down to 1\$\mu\$Hz, a fairly unremarkable (and obsolete) Model 33522A. My Rigol DG4102, I think, similarly has 1\$\mu\$Hz resolution and cost less.

Unfortunately, you can't get that low with cheap DDS (eg. AD9850) modules because the tuning word is only 32 bits and the clock is typically 125MHz, so that's 0.03Hz resolution. I suppose it would give you a few data points (0.0291/0.0582/0.0873 Hz)

You also could feed it a step and look at the time domain response.


Option 1: Test on the PC.

If your DSP code is written in C, then you can set up a test harness in GCC or Visual Studio. You know the sample rate for your DSP code, so use Excel to generate a test input CSV file, and have your test harness dump a CSV file output which you can check.

Option 2: Test on the DSP with a PC interface.

If your DSP code has to run on the DSP, you can still use the PC to test it. Set up a test harness on the DSP which receives a value from the PC, runs one step of the DSP filter, and then reports the filter output for that step back to the PC (using USB, RS-232 or TCP/IP depending on how you're connecting to the DSP). You'll also need a PC-side test harness to send and receive those values. Again, you can set up a test input CSV file on the PC, pass successive samples to the filter code, and dump a CSV file output which you can check.

For both...

If you're filtering at 0.05Hz, chances are your sample rate is going to be fairly slow too. Using a test harness will let you run these tests faster than real-time, which will make your testing process more efficient.