Difference between revisions of "Data mode"

From MCEWiki
Line 15: Line 15:
 
||32b (signed) SQ1 Feedback data fb[31:0].
 
||32b (signed) SQ1 Feedback data fb[31:0].
  
When servo_mode =3, this is the PID calculation result which has 12 more bits of accuracy than the actual 14b SQ1 feedback applied.
+
When servo_mode = 3, the gain of the feedback relative to the value applied to the DAC is 2<sup>12</sup>.
 
|| all
 
|| all
 
|-
 
|-
 
| 2  
 
| 2  
 
|| Filtered feedback  
 
|| Filtered feedback  
||32b (signed) SQ1 filtered feedback data fb[31:0].   
+
||32b (signed) low-pass filtered SQ1 feedback data fb[31:0].   
  
The gain relative to mode 1 is 1218. at DC.
+
The gain is 1218 relative to mode 1 at DC.
  
Low-pass-filtered SQ1 feedback data.
 
 
|| 2.0.5 and later
 
|| 2.0.5 and later
 
|-
 
|-
 
| 3  
 
| 3  
 
|| Raw 50 MHz  
 
|| Raw 50 MHz  
|| Raw data raw[13:0].   
+
|| Raw 50 MHz ADC samples raw[13:0].   
  
The gain relative to mode 0 is unity.
+
The gain is 1/(2<sup>6</sup>) relative to mode 0, except in rev. 4.3.7 where the gain is unity.
  
50MHz ADC samples in signed 14b format in firmware revision 4.3.7 (and in 8b format divided by 2<sup>6</sup> in all other versions).
 
 
|| Only 3.0.6, 3.0.16, 3.0.25, 4.1.7, 4.2.7, 4.3.7
 
|| Only 3.0.6, 3.0.16, 3.0.25, 4.1.7, 4.2.7, 4.3.7
 
|-
 
|-
Line 40: Line 38:
 
||Signed 18b SQ1 feedback fb[31] & fb[28:12] + signed 14b coadded error signal err[31] & err[12:0].   
 
||Signed 18b SQ1 feedback fb[31] & fb[28:12] + signed 14b coadded error signal err[31] & err[12:0].   
  
The gain is 1/2<sup>12</sup> relative to mode 1 for the feedback.
+
The gain is 1/(2<sup>12</sup>) relative to mode 1 for the feedback.
  
 
The gain is unity relative to mode 0 for the error.
 
The gain is unity relative to mode 0 for the error.
Line 50: Line 48:
 
|| Signed 24b SQ1 feedback fb[31:8] + signed 8b num_flux_jumps fj[7:0].
 
|| Signed 24b SQ1 feedback fb[31:8] + signed 8b num_flux_jumps fj[7:0].
  
The gain is 1/2<sup>8</sup> relative to mode 1
+
The gain is 1/(2<sup>8</sup>) relative to mode 1
  
 
|| all
 
|| all
Line 58: Line 56:
 
|| Signed 18b filtered data filter[31] & filter[27:11] + signed 14b coadded error signal err[31] & err[12:0].
 
|| Signed 18b filtered data filter[31] & filter[27:11] + signed 14b coadded error signal err[31] & err[12:0].
  
The gain is 1218/2<sup>11</sup> relative to mode 1 for the filter.
+
The gain is 1218/(2<sup>11</sup>) relative to mode 1 for the filter.
  
 
The gain is 1 relative to mode 0 for the error.
 
The gain is 1 relative to mode 0 for the error.
Line 68: Line 66:
 
|| Signed 22b filtered data filter[31] & filter[27:7] + signed 10b coadded error signal err[31] & err[12:4].
 
|| Signed 22b filtered data filter[31] & filter[27:7] + signed 10b coadded error signal err[31] & err[12:4].
  
The gain is 1218/2<sup>7</sup> relative to mode 1 for the filter
+
The gain is 1218/(2<sup>7</sup>) relative to mode 1 for the filter
  
The gain is 1/2<sup>4</sup> relative to mode 0 for the error
+
The gain is 1/(2<sup>4</sup>) relative to mode 0 for the error
  
 
|| 4.0.2 and later
 
|| 4.0.2 and later
Line 78: Line 76:
 
|| Signed 24b filtered data filter[31:8] + signed 8b num_flux_jumps fj[7:0].
 
|| Signed 24b filtered data filter[31:8] + signed 8b num_flux_jumps fj[7:0].
  
The gain is 1218/2<sup>8</sup> relative to mode 1 for the filter
+
The gain is 1218/(2<sup>8</sup>) relative to mode 1 for the filter
  
 
|| 4.0.4 only
 
|| 4.0.4 only
Line 86: Line 84:
 
|| Signed 24b filtered data filter[31] & filter[23:1] + signed 8b num_flux_jumps fj[7:0].
 
|| Signed 24b filtered data filter[31] & filter[23:1] + signed 8b num_flux_jumps fj[7:0].
  
The gain is 1218/2<sup>1</sup> relative to mode 1 for the filter
+
The gain is 1218/(2<sup>1</sup>) relative to mode 1 for the filter
  
 
|| 4.0.5 and later
 
|| 4.0.5 and later
Line 94: Line 92:
 
|| Signed 25b filtered data filter[27:3] + signed 7b num_flux_jumps fj[6:0].
 
|| Signed 25b filtered data filter[27:3] + signed 7b num_flux_jumps fj[6:0].
  
The gain is 1218/2<sup>3</sup> relative to mode 1 for the filter
+
The gain is 1218/(2<sup>3</sup>) relative to mode 1 for the filter
  
 
|| 4.1.6, 4.0.b and later
 
|| 4.1.6, 4.0.b and later

Revision as of 17:40, 22 August 2008

Table of Data Modes (Current as of Revision 4.0.c)

Data Mode Summary Pixel-Data Description RC Firmware Revision
0 Error 32b (signed) co-added Error signal err[31:0].

sample_num*(adc_reading – adc_offset)

all
1 Feedback 32b (signed) SQ1 Feedback data fb[31:0].

When servo_mode = 3, the gain of the feedback relative to the value applied to the DAC is 212.

all
2 Filtered feedback 32b (signed) low-pass filtered SQ1 feedback data fb[31:0].

The gain is 1218 relative to mode 1 at DC.

2.0.5 and later
3 Raw 50 MHz Raw 50 MHz ADC samples raw[13:0].

The gain is 1/(26) relative to mode 0, except in rev. 4.3.7 where the gain is unity.

Only 3.0.6, 3.0.16, 3.0.25, 4.1.7, 4.2.7, 4.3.7
4 18:14 Mixed Signed 18b SQ1 feedback fb[31] & fb[28:12] + signed 14b coadded error signal err[31] & err[12:0].

The gain is 1/(212) relative to mode 1 for the feedback.

The gain is unity relative to mode 0 for the error.

2.0.9 and later
5 24:8 mixed Signed 24b SQ1 feedback fb[31:8] + signed 8b num_flux_jumps fj[7:0].

The gain is 1/(28) relative to mode 1

all
6 obsolete 18:14 mixed Signed 18b filtered data filter[31] & filter[27:11] + signed 14b coadded error signal err[31] & err[12:0].

The gain is 1218/(211) relative to mode 1 for the filter.

The gain is 1 relative to mode 0 for the error.

3.0.30 to 4.0.6 only
7 22:10 mixed Signed 22b filtered data filter[31] & filter[27:7] + signed 10b coadded error signal err[31] & err[12:4].

The gain is 1218/(27) relative to mode 1 for the filter

The gain is 1/(24) relative to mode 0 for the error

4.0.2 and later
8 obsolete 24:8 mixed Signed 24b filtered data filter[31:8] + signed 8b num_flux_jumps fj[7:0].

The gain is 1218/(28) relative to mode 1 for the filter

4.0.4 only
9 24:8 mixed Signed 24b filtered data filter[31] & filter[23:1] + signed 8b num_flux_jumps fj[7:0].

The gain is 1218/(21) relative to mode 1 for the filter

4.0.5 and later
10 25:7 mixed Signed 25b filtered data filter[27:3] + signed 7b num_flux_jumps fj[6:0].

The gain is 1218/(23) relative to mode 1 for the filter

4.1.6, 4.0.b and later

Note regarding units

During normal readout (i.e. not raw mode), there are 4 data associated with each channel. These are:

  • co-added error ("error")
  • sq1 feedback ("sq1fb")
  • filtered sq1 feedback ("filtered sq1fb")
  • flux jump counter ("num_flux_jumps")

Depending on the data mode, these values will be windowed in a different way. The notes in the table above explain the windowing, in terms of how many bits are reported and the relative scaling of the windowed value relative to some reference data mode.

The scaling is quoted as being relative to some reference data mode. For example, in data mode 4 the text

"The feedback reported in this mode is divided by 212 compared to data_mode=1."

is meant to imply that if I were to observe the same system's feedback in data_mode 4 and data_mode 1, and call the two measurements fb_4 and fb_1, then I would expect

 fb_4 = fb_1 >> 12 = floor[ fb_1 / 2^12 ]

where >> denotes the right-bit-shift operator.

The reference data modes for error, sq1fb and filtered sq1fb are, respectively, 0, 1, and 2. In these modes, the meaning of the data are as follows:

Signal Reference data mode Description
co-added error 0 Co-added error for the current internal MCE frame. For ADC readings Y, adc_offset Yo and where n is the sample_num, the error e is <math>e = \sum_1^n (Y - Y_0)</math>, where n is sample_num.
SQ1 feedback 1 Calculated squid1 feedback. Note that this number should be distinguished from the sq1_DAC value, which is obtained from bits [25:12] of the SQ1 feedback. When flux-jumping is active, an integer multiple of the flux_quanta value will be subtracted from sq1_DAC prior to application to the DAC.
filtered SQ1 feedback 2 The output from the 4-pole Butterworth low-pass filter . The input to the filter is the SQ1 feedback signal. The effective DC gain, including quantization error, is approximately 1216.


Please note that, by default, mas_data.pro will rescale data in the following way:

  • error signals are rescaled to match the units of data mode 0.
  • sq1 feedback is rescaled to sq1_DAC units (i.e. data mode 1 divided by 212)
  • filtered sq1 feedback is rescaled to the units of data mode 2.