Data mode

From MCEWiki
Revision as of 16:16, 30 September 2008 by 142.103.235.44 (talk) (1<sup>st</sup> Stage SQUID Feedback Calculation)

1st Stage SQUID Feedback Calculation

  • The error calculated by the MCE from the Series Array output is:
sq_error = <math>\Sigma</math>(adc_reading – adc_offset)
  • The feedback applied by the MCE to the 1st stage SQUIDs is:
sq_feedback = [(p_coeff*sq_error)+(i_coeff*integral)+(d_coeff*difference)] / [212]

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

  • The the formulas for the data modes listed below make liberal use of the sq_error and sq_feedback variables, which are defined above.
Data Mode Summary Pixel-Data Description RC Firmware Revision
0 Error 32b (signed) co-added Error signal err[31:0].

error_mode0 = sq_error

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

feedback_mode1 = sq_feedback

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

flt_fb_mode2 = sq_feedback * 1218 (@ DC)

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

raw_mode3 = (adc_reading – adc_offset) / (26),

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].

feedback_mode4 = sq_feedback / (212)

error_mode4 = sq_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].

feedback_mode5 = sq_feedback / (28)

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].

filtered_fb_mode6 = sq_feedback * 1218 / (211)

error_mode6 = sq_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].

filtered_fb_mode7 = sq_feedback * 1218 / (27)

error_mode7 = sq_error / (24)

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].

filtered_fb_mode8 = sq_feedback * 1218 / (28)

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].

filtered_fb_mode9 = sq_feedback * 1218 / (21)

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

filtered_fb_mode10 = sq_feedback * 1218 / (23)

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.