Location of noise rms bits in the DLPF processing
There are various stages in the
pdev processing where shift values need to be set (hr_shift, pshift). These need to be
set to maintain sufficient bits on the noise while retaining the
maximum dynamic range (probably a redundant statement!!). To measure
this, time domain data was taken with a noise source input. The
The dlpf operations are a multiply and accumulate.
The number of additions is equal to the decimation specified. The rms
noise should increase as the square root of the number of additions.
- Red noise source was input to box 103 sp0.
- The input noise rms was set to 48 (via pnet --sigstat).
- 16 bit time domain sampling of polA was used.
- Decimations of 4,8,16, and 32 were used.
- hr_shift was kept constant at 10.
- This sent the 16 bit output of the digital low pass filter
(dlpf) out to disc.
- the gain of each filter used was about .62.
- Data was taken for .1 seconds. This gave about 1e6 time samples.
The plots show the
rms values from the various decimations (.ps) (.pdf):
- Page 1: 500 time samples of the 16 bits data for the various
decimations. Black is digI and red is digQ. The vertical scale if 16
bit counts. The rms values for the entire 1e6 samples is printed in the
upper left of each plot.
- Page 2: Histogram of the decimate by 4 data. The bottom plot is a
blowup of the histogram.
- Each bin is separated by 16 counts --> the bottom most
4 bits of the 16 bit number are always 0.
- Page 3: The measured rms for each decimation divided
by the sqrt(decimation).
- This is constant for the various decimations showing that the
noise does increase by the sqrt(decimation).
- The top plot uses the entire 16 bits. The bottom plot divides
by 16 to look at the 12 bits of actual data.
- Dividing by the sqrt(dec) gives the rms with no decimation. The
bottom plot is 8. We started with an rms of 48. The filter gain is .62
so we would expect an rms/sqrt(dec) of 30 not 8.
- The rms increases as the square root of the decimation.
- The algorithm for hr_shift to keep the same number of bits on the
noise should be:
- hr_shift= 10 -
hi-res bits are in the upper most 12 bits of the 16 bit output.
- The lower 4 bits are 0.
- This may be happening because the data is traversing a 12
bit bus somewhere in the fpga.
- When hi res spectra are taken, the upper most 12 bits are
passed to the polyphase filter bank.
- The measured rms:8 (with no decimation) is smaller than the
expected rms (48 measured*.62filter=30). I'm not sure where this
discrepancy is coming from.
- The pshift parameter in
the butterfly stages should work the same way since the butterfly
is a multiply add.
- The noise will grow as the sqrt(numAdds).
- Every two stages of the butterfly there should be a down shift.
- There are an odd number (13) of stages in an 8K butterfly.
- Since you want 1 shift every 2 stages, you can not maintain the
same rms through the butterfly's:
- 7 shifts (0x1555) will decrease the rms by sqrt(2)
- 6 shifts (0x0aaa) will increase the rms by sqrt(2).
- You should increase(7),decrease(6) the input rms by sqrt(2)
depending on the number of shifts used.