Skip to main content
edited title
Link
JRE
  • 73.6k
  • 10
  • 112
  • 195

Implementing ana very sharp IIR (125Hz sampling rate, 0.2Hz bandwidth)

Source Link
richieqianle
  • 1.6k
  • 3
  • 27
  • 45

Implementing an very sharp IIR (125Hz sampling rate, 0.2Hz bandwidth)

I am trying to design a IIR lowpass filter. The purpose of this filter is to get pure DC from noises.

  1. The sampling rate is: 125Hz.
  2. The bandwidth of the filter: 0.2Hz.

I designed the filter with Matlab:

[b,a] = ellip(3,0.001,60,0.001);
freqz(b,a);
figure(2)
out = filter(b,a,ones(1,2000));
plot(out)

The frequency response: at 0.3Hz is -20dB, which is good for me. enter image description here

The step response: enter image description here

The coefficients:

a = [1.000000000000000 -2.984668175804313 2.969460975930567 -0.984792292477895];

b = 1.0e-04 *[0.750233362790290 -0.747695120994728 -0.747695120994729 0.750233362790290];

My questions

  1. From the step response, it seems that the 452th data is close to 1. Can I say that I have to wait for 451 data to get a desired DC value? By desired, I do not care much about the gain ripple on DC, meaning that it is fine for me if DC has a small gain(0.9-1.1) on it.

  2. The filter coefficients seem to be pretty small, especially the b part. Can I implement the filter successfully on a Cortex-M4, which is a 32 bit MCU with FPU?