# 02may08

The low pass digital filters (lpdf) were simulated in software. The processing was:
• Input lpdf for decimating by 4,8,16,32 hanning smoothing. These are the files loaded into the spectrometer.
• Generate an in band sine wave (amplitude=10) and process it through the lpdf for each decimation.
• Generate noise (with an rms of 10) and filter it with the 4 decimations.
• Compute the spectral shape of the filters.

The first plots show the filter gain and rms (.ps) (.pdf):
• Page 1: filter for decimate=4,8,16,32, The dcGain is the integral over each filter divided by the decimation length.
• The filter is generated by computing a sinx/x for the requested decimation length and then multiplying this by the hanning filter.
• The filter coeff read from disk have been normalized to 32K (since they are 16 bit numbers).
• Page 2: pushing a sine wave through the filter.
• Top: sine wave used as input. It actually extended for 64K samples.
• Bottom: (sine waves)/decimation after filtering. The amplitude of the sine wave has decreased by about .625 .
• Jeff reports the dc gain of these filters to be about .627 so the values agree.
• Page 3: filtering noise. The input noise had an rms of 10. There were 64K samples.
• Top: noise after filtering and decimating. The bottom (black) is decimate by 4. The top (blue) is decimate by 32. An offset has been added for display. There has been no divide by the decimation.
• Center: Noise Rms after filtering (with no divide by decimation). The noise rises as sqrt(decimation).
• Bottom: Noise Rms after filtering/sqrt(decimation). The value is constant at .61 . This is pretty close to jeffs .627 dc gain.

The second set of plots shows the dlpf bandpass shape (.ps) (.pdf):
• the hanning window was used for the windowing function.
• the plots werecomputed using the filter coef's and used   floating point arithmetic to compute the spectra.
• Page 1-4 show decimation of 4,8,16,32.
• The vertical scale for the plots are in db. The horizontal axis is frequency in units of the nyquist frequency.

### Conclusions:

• The dcGain reported by jeff for the filters agree with the simulated values:
• Jeff's dcGain: .627
• Simulated in band sine wave: .625
• Simulated rmsNoise/sqrt(decimation) = .61

processing: x101/070926/dlpfsim.pro