Saturation in the  PFB butterfly stages

26aug08

Terminology:
PFB: Polyphase Filter Bank which channelizes and then does the FFT on the input signal.
  
    The pdev device uses 12 bit A/D converters and 18 bit registers when computing the butterfly stages of the FFT. The input signal level should be set high enough to remove digitization noise. 9 level sensitivity is 96% of multi bit so 4 bits would be sufficient and 5 bits would probably be safer (in case the input power levels decrease.. eg.. going from high zenith angle to low zenith angle). Once the level is set for the noise, the extra bits can be used to handle the dynamic range needed for impulsive signals or rfi.
Note: turns out the pfb down shift does a down shift before the butterfly stage so you get a voltage divide by two if you downshift on the first stage.
   

Computational path:

    The 12 bit AtoD converter values are sent to the butterfly stages of the  polyphase filter bank (i'm ignoring hi-res mode here..). For the longest FFT (8K) there are log2(8192) = 13 butterflys. Each butterfly stage does a  multiply and add. Adding noise samples will cause the value to grow as the sqrt of the number of adds (i'm assuming the multiply gain is close to unity). To maintain the same dynamic range through the butterfly stages, we want to down shift the value by 1 bit  every 2 butterfly stages. The noise amplitude will then remain constant throughout the stages.
    When entering the pfb butterfly stages, pdev puts the 12 bit A/D samples in the upper 12 bits of the 18 bit register. This lets you do down shifts on the first 6 butterfly stages without having to worry about losing the noise. During these first 6 stages the noise will grow by 3 bits so you can actually do 9 contiguous down shifts before having to worry about losing bits on the noise.
    The pdev spectrometer lets you decide whether or not to downshift by 1 bit on each butterfly stage using the PSHIFT parameter. It is a bit map with a 1 --> downshift and a 0 --> no downshift on a particular stage. An 8k FFT has 13 stages. For a noise signal we can downshift the first 9 stages and then continue down shifting everyother butterfly stage. PSHIFT woud be: 1 1111 1111 0101 or 0x1ff5.

  But if you have a sine wave....
   The previous paragraph referred to noise where the level grows as the sqrt of the number of adds. If a sine wave is used then the level grows linearly with the number of adds and we want to shift on every butterfly stage to keep the same amplitude. Since we have to set the shift levels for noise, a sine wave will grow by  Nbuftterflys-Nshifts bits. In our 8k example with 11 shifts, the sine wave will grow by 13-11 = 2 bits. If it started with an amplitude of 1, it will exit the butterflys with and amplitude of 1*2^2= 4 (this is all being done in the voltage domain).  The maximum amplitude for a sine wave that won't saturate in the butterfly stages will then be 10 bits. The radars will look like a sine wave to the system.
   

Taking some data with a sine wave.

    On 26aug08 a sine wave was injected at 830 MHz into the downstairs IF/LO in place of the noise source. The 750 MHz IF mixers were used to bring the 750 band down to 250 MHz with a 1 GHz high side LO. The  birdie was now at  250-80=170 MHz. This band was then sent to the pdev device. The low band had its LO set to 175 MHz so the birdie should come out 5 MHz below the center of the band. The pdev spectrometers A/D input levels were set (back in apr08)  to .78 volts for 2048 counts  full scale.
    Data was taken for 3 seconds with the pdev spectrometer using  fftlens of: 8192,4096,2048,1024, and 512 channels. At each fftlen the rms counts out of the digitizer was varied (using the bbm attenuator) to give no pfb overflow and then pfb overflow. The pshift value used was the standard 9 down shifts then 0,1,0,1... For the shorter fft's the dshift parameter was set to 8 and then 12 to not overflow the accumulator (this made not difference for the pfb overflows). The table below shows the rms levels for the onset of pfb overflows:
fftlen
pshift
Onset pfb overflow
A/D rms (counts)
notes
8192
0x1ff5
425

4096
0xffa
425

2048
0x3fd
1250
This is higher than expected
1024
0x3fe
875

512
0xff
no overflow
This is expected since we shift every butterfly.

Conclusions:

    processing: x101/080826/injsine.pro

<- page up
home_~phil