# 18mar08

PSHIFT fixed, change A/D signal levels
A/D signal levels fixed, change PSHIFT
Table of levels within computing pipeline
Conclusions.

### Introduction

Jumps have been seen in spectral band passes that are spaced by power of two (in channels). These occur when the A/D rms input levels are small (10-30 A/D counts). The power of two spacing points to the butterfly stages of the FFT.
PSHIFT is a parameter that specifies when the downshifts in the butterfly stages of the FFT should occur. It is 13 bits long with the leftmost bit being the first butterfly stage and the rightmost  bit being the last butterfly stage (for and 8K transform). The rms of a noise like signal should increase as sqrt(N) addititions so every two butterfly stages we should down shift by 1. The initial 12 bit data is placed in the uppermost bits of the 18 bit data registers. We should be able to do 6 shifts without losing

To investigate this problem the following data sets were taken:
• 13mar08: PSHIFT=0x1ff5 and A/D rms = 80 counts. Take data for 300 seconds. This will be used as the bandpass correction. It is assumed that this spectra has no jumps in it (i couldn't see any..).
• 13mar08:Fix PSHIFT at 0x1ff5 and then vary the A/D rms levels from 5 to 30 and check how the jumps change.
• 17mar08:Fix the A/D rms level at 15 counts and then vary PSHIFT.
• Start with PSHIFT =0x1ff5 and decrease the number of shifts starting from the right: 0x1ff4,0x1ff0, etc
• Start with PSHIFT=0x1ff5 and decrease the number of shifts from the left : 0x0ff5, 0x07f5, ...
• Build a table showing the values within the pdev computation pipeline for each data set taken.
For each scan of data taken, the setup was:
• The downstairs IF/LO noise source with the 750 MHz IF was used. It was down converted to 250 MHz and then sent to the base band mixers (bbm's).
• The bbmixer LO's were set to 175 and 325 MHz. The mixer attenuation was set to give the desired A/D rms.
• The A/D rms signal levels were set with pdevattn --setrms=value . This runs pnet --sigstat, reads the rms's and then adjusts the bbm attenuators until the requested rms found.
• 120 seconds of .1 second dumps was taken in 32 bit mode (see the table below for the ashift,dshift settings).
The processing steps for each scan were:
• Average each scans worth of data and then normalize to a median of 1.
• Divide each averaged spectra by the rms=80 spectra and then subtract 1.

### PSHIFT fixed, change A/D signal levels  (top)

Jumps have been seen in spectra spaced by power of two when then A/D rms input levels are small (10-30 A/D counts). To quantify this, data was taken on 13mar08 with the following setup:
• The downstairs IF/LO noise source the the 750 MHz IF was used. It was down converted to 250 MHz and then sent to the bum's.
• The mixer L's were set to 175 and 325 MHz. The mixer attenuation was set to give the desired A/D rms.
• pdev was set to: pshift=0x1ff5, ashift=0,dshift=0, integration time=1second.
• Before each scan, pdevattn --setrms=value was run to set the signal level to the requested amount. pnet --sigstat was then run to verify the levels.
• 300 seconds of data was taken with the A/D rms set to 80 counts. This was used for the band pass correction.
• scans of 120 seconds of data were taken with the A/D rms set to 5,10,15,20,30 counts.
The processing steps were:
• Average each scans worth of data and then normalize to a median of 1.
• Divide each averaged spectra by the rms=80 spectra and then subtract 1.
• Look at beam0 low band polA data sets (the other bands are similar).
The plots show the spectra for different A/D rms counts (.ps) (.pdf):
• Page 1: averaged spectral bandpass. The spectra are offset for display. Black is A/D rms=5, red A/D rms=10..., brown A/ rms=80. The bottom plot is A blowup about DC.
• Page 2 Top: Spectra for A/D rms=5,10,15,20,30. The plots have been offset for display. The dashed vertical lines are at powers of 2 from the center: black=2048,red=1024,....
• The steps decrease as the rms increases.
• The largest step is at +/- 2048 counts (+/- 42.5 MHz). It is even seen in the rms=30 count spectra.
• Page 2 Bottom: Blowup +/- 3MHz about DC.
• The steps in positive freq occur at powers of 2.
• There are no steps in the negative frequency

### A/D signal level fixed, change PSHIFT.

The A/D input signal level was set to an rms of 15 count. 120 second scans were then taken with:
• PSHIFT=0x1ff5, 0x1ff4, 0x1ff0, 0x1fe0, 0x1fa0, 0x1f80, 0x1f00. This decreases the number of butterfly shifts from the right (the last butterfly stages). The final PSHIFT=0x1f00 set dshift=2 to prevent overflow in the accumulator.
• PSHIFT=0x0ff5, 0x07f5, 0x0af5, 0x02f5, 0x0075. This decreases the number of butterfly  shifts from the left (the first butterfly stages). The finale PSHIFT=0x0075 set dshift=3 to prevent overflow in the accumulator.
The plots show the spectra vs pshift value for fixed A/D input level (.ps) (.pdf):
• Page 1:Change PSHIFT from the right. Each bandpass is a different PSHIFT value. The top plot is the 300 second rms=80 spectra used for the bandpass correction. An offset has been included for display. The bottom plot is a blowup around DC. You can see the steps close to DC.
• Page 2: Change PSHIFT from the left. top plot is full 170 MHz, bottom plot is +/- 3MHz about DC.
• Page 3: Change PSHIFT from the right. spectra divided  by a/d=80 counts spectra. A 3rd order fit was then done and removed. The top plot is 170 MHz, the bottom plot is +/- 3MHz about DC. Steps are seen in:
• wide band jumps in PSHIFT=0x1ff5, 0x1ff4, 0x1ff0, 0x1fe0 over the wide band
• Jumps about DC in PSHIFT=0x1ff5, 0x1ff4, 0x1ff0, 0x1fe0, 0x1f80 in the positive frequency side only.
• Page4: Change PSHIFT from the left after bandpass correction. Steps are see in:
• Wide band jumps in PSHIFT=0x0ff5
• Jumps about DC in PSHIFT=0x0ff5 positive frequency side.

### Table of levels within computing pipeline (top)

The table below shows the computed data levels during the processing pipeline. It takes the output spectrum and the pdev configuration and computes backwards to the A/D sigmas at the input. The computation gets an a/dSigV too small by sqrt(2). The correct value (measured by pnet --sigstat) is shown in a/dSigCorV. The error is between the 1accumP and a/dSigCor. The computations are done for a noise like signal.

Table columns description:

• spcOutP - median value of the output spectrum. P is for Power.
• 1accumP - Value of 1 accumulation after power computation stage. This is the value added each dump to the 40 bit accumulator.
• fftOutV - output rms of the fft stage. V is for Voltage
• BflyMax/Min- Max/min rms value in the butterfly stages. These depend on how we group the butterfly shifts.
• dlpfOutV - output of the digital low pass filter
• dlpvInV - input to the digital low pass filter
• a/dSigV - a/d rms value in counts. It is low by sqrt(2)
• a/dSigV - a/d rms value after multiplying by sqrt(2).
• ashift - up shift when going from 40 bit accumulator to the output bits.
• dshift - down shift before adding 1 dump of power to 40 bit accumulator
• jump WB yes if a jump seen in the wide band spectra.
• pshift/totshifts - when the shifts were done in the butterfly's. Leftmost bit is the first stage  / N is the total number of shifts done.

 spcOutP 1accumP fftOutV BflyMax/Min fftinpV dlpfOutV dlpfInV a/dSigV a/dsigCorV ashift dshift jump WB pshift/ totshifts PSHIFT FIXED=0x1ff5, CHANGE A/D LEVEL 6.10e+05 7.52e+03 43.4 693.7/ 43.4 981.0 20.4 20.4 20.4 28.9 0 0 yes 0x1ff5/11 3.06e+05 3.77e+03 30.7 491.4/ 30.7 695.0 14.5 14.5 14.5 20.5 0 0 yes 0x1ff5/11 1.52e+05 1.87e+03 21.6 345.9/ 21.6 489.1 10.2 10.2 10.2 14.4 0 0 yes 0x1ff5/11 7.51e+04 926. 15.2 243.5/ 15.2 344.3 7.2 7.2 7.2 10.1 0 0 yes 0x1ff5/11 1.95e+04 240. 7.8 124.0/ 7.8 175.4 3.7 3.7 3.7 5.2 0 0 yes 0x1ff5/11 A/D LEVEL FIXED rms=15, CHANGE PSHIFT ON RIGHT 1.54e+04 1.90e+03 21.8 349.2/ 21.8 493.8 10.3 10.3 10.3 14.5 0 0 yes 0x1ff5/11 6.17e+04 7.61e+03 43.6 349.0/ 21.8 493.5 10.3 10.3 10.3 14.5 0 0 yes 0x1ff4/10 2.47e+05 3.05e+04 87.3 349.3/ 21.8 493.9 10.3 10.3 10.3 14.6 0 0 yes 0x1ff0/9 9.91e+05 1.22e+05 174.9 349.7/ 30.9 494.6 10.3 10.3 10.3 14.6 0 0 yes 0x1fe0/8 3.97e+06 4.90e+05 350.1 350.1/ 61.9 495.2 10.3 10.3 10.3 14.6 0 0 no 0x1fa0/7 1.59e+07 1.96e+06 700.4 700.4/ 61.9 495.3 10.3 10.3 10.3 14.6 0 0 no 0x1f80/6 1.59e+07 7.85e+06 1400.7 1400.7/ 87.5 495.2 10.3 10.3 10.3 14.6 0 2 no 0x1f00/5 A/D LEVEL FIXED rms=15, CHANGE PSHIFT ON LEFT 6.20e+04 7.64e+03 43.7 699.4/ 43.7 494.6 10.3 10.3 10.3 14.6 0 0 yes 0x0ff5/10 2.48e+05 3.06e+04 87.5 989.6/ 87.5 494.8 10.3 10.3 10.3 14.6 0 0 no 0x07f5/9 9.92e+05 1.22e+05 174.9 699.8/ 174.9 494.8 10.3 10.3 10.3 14.6 0 0 no 0x0af5/8 3.97e+06 4.90e+05 350.1 1400.3/ 350.1 495.1 10.3 10.3 10.3 14.6 0 0 no 0x02f5/7 7.96e+06 7.85e+06 1401.3 3963.4/ 700.6 495.4 10.3 10.3 10.3 14.6 0 3 no 0x0075/5

### Conclusions:

• Steps are seen in the spectra spaced by power of 2.
• Around DC steps are only seen on the positive frequency side
• For a fixed PSHIFT=0x1ff5 the steps decrease as the A/D input level increases. They are still seen with an rms of 30 counts.
• For a fixed  A/D sigma=15:
• removing shifts on the right show wide band jumps down to 0x1fe0
• removing shifts on the left show narrow band jumps down to 0x1f00
• removing shifts on the left show jumps for 0ff5 wide and narrow band
• Not shifting on the left (first butterfly stages) removes the jumps a lot quicker than removing shifts on the right
processing: x101/080313/chklvl.pro, 080317/pshift.pro