Difference between revisions of "Data mode"
(→MCE Data Types) |
|||
Line 1: | Line 1: | ||
− | + | = MCE Data Types = | |
+ | During data readout from the MCE, there are different types of data associated with each detector. These are: | ||
− | + | # calculated SQ1 feedback ('''''sq1_fb'''''): | |
− | + | #* <math>sq1\_fb_{n+1} = \frac{1}{2^{12}} \left[\left(gainp \times q_{n}\right) + \left(gaini \times \sum_{i=1}^{n} error_i\right) + \left(gaind \times [error_{n} - error_{n-1}]\right)\right] </math> | |
− | # '''sq1_fb''' | ||
− | #* <math>sq1\_fb_{n+1} = \frac{1}{2^{12}} \left[\left(gainp \times q_{n}\right) + \left(gaini \times \sum_{i=1}^{n} error_i\right) + \left(gaind \times [error_{n} - error_{n-1}]\right) \right]</math> | ||
#* where <math> q_n=error_n + b\times q_{n-1}</math> | #* where <math> q_n=error_n + b\times q_{n-1}</math> | ||
#* ''n'' is the multiplexing-frame index | #* ''n'' is the multiplexing-frame index | ||
− | #* ''i'' is reset when the PID servo is restarted by setting the ''servo_mode'' to 3 or ''flx_lp_init'' to 1. | + | #*''i'' is reset when the PID servo is restarted by setting the ''servo_mode'' to 3 or ''flx_lp_init'' to 1. |
− | #* ''b'' < 1 and specified by ''pterm_decay_bits''. See [http://www.phas.ubc.ca/~mce/mcedocs/software/SC2_ELE_S580_515_mce_command_description.pdf mce_command_description]. | + | #*''b'' < 1 and specified by ''pterm_decay_bits''. See [http://www.phas.ubc.ca/~mce/mcedocs/software/SC2_ELE_S580_515_mce_command_description.pdf mce_command_description]. |
− | # '''error''': | + | # coadded error ('''''error'''''): |
− | #* <math>error = \sum_{ | + | #* calculated from the Series-Array signal sampled @ 50MHz by the ADC |
− | # '''sq1_fb_filtered''': | + | #* <math>error = \sum_{1}^{sample\_num} (adc\_reading_{i} - adc\_offset)</math> |
− | + | # low-pass filtered SQ1 feedback ('''''sq1_fb_filtered'''''): | |
− | # '''num_flux_jumps''' | + | #*see [[ Digital 4-pole Butterworth Low-pass filter | 4-pole Butterworth low-pass filter ]]. |
− | # ''' | + | #* The effective DC gain, including quantization error, is approximately: <math>sq1\_fb\_filtered_{n} \simeq 1218 \times \left[sq1\_fb_{n-1}\right]</math> |
+ | # flux-jump counter ('''''num_flux_jumps'''''). See [[ Flux jumping ]]. | ||
+ | # raw ADC samples @ 50 MHz ('''''raw'''''). See [[ Raw-mode readout ]]. | ||
= Data Modes and Windowing = | = Data Modes and Windowing = | ||
− | + | The type of data reported by the MCE during data acquisition is determined by the MCE parameter ''data_mode''. Depending on the data mode, the reported data will be windowed in a different way. The notes in the table below 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 reference data modes for error, sq1fb and filtered_sq1fb are, respectively, 0, 1, and 2. | |
− | |||
− | |||
− | |||
− | |||
{| border="1" | {| border="1" | ||
|- | |- | ||
− | ! | + | ! data-mode !! data-type !! Description !! RC Firmware Revision |
|- | |- | ||
| 0 | | 0 | ||
− | || | + | || co-added error |
− | || 32b (signed) co-added | + | || 32b (signed) co-added error <br /> |
* [31:0] = error | * [31:0] = error | ||
Line 35: | Line 32: | ||
|- | |- | ||
| 1 | | 1 | ||
− | || | + | || sq1 feedback |
− | || | + | || 32b (signed) calculated SQ1 feedback. |
− | 32b (signed) SQ1 | + | * [31:0] = sq1_fb * 2<sup>12</sup> when servo_mode =3 |
− | * [31:0] = sq1_fb * 2<sup>12</sup> | + | * [31:0] = sq1_fb when servo_mode != 3 |
− | |||
− | |||
− | * [31:0] = sq1_fb | ||
− | |||
''Note that servo_mode=3 is the normal running condition. The non-servoing form, used at times during array-auto-tune for example, is included here for completeness. | ''Note that servo_mode=3 is the normal running condition. The non-servoing form, used at times during array-auto-tune for example, is included here for completeness. | ||
'' | '' | ||
Line 48: | Line 41: | ||
|- | |- | ||
| 2 | | 2 | ||
− | || | + | || filtered sq1 feedback |
− | ||32b (signed) low-pass filtered SQ1 feedback data | + | ||32b (signed) low-pass filtered SQ1 feedback data. <br /> |
* [31:0] = sq1_fb_filtered | * [31:0] = sq1_fb_filtered | ||
Line 55: | Line 48: | ||
|- | |- | ||
| 3 obsolete <br /> (see 12) | | 3 obsolete <br /> (see 12) | ||
− | || Raw 50 MHz | + | || Raw 50 MHz Samples |
|| Raw 50 MHz ADC samples raw[13:i], where i=0 in rev. 4.3.7 and i=6 in all previous firmware. <br /> | || Raw 50 MHz ADC samples raw[13:i], where i=0 in rev. 4.3.7 and i=6 in all previous firmware. <br /> | ||
* [31:0] = raw_data / (2<sup>i</sup>), | * [31:0] = raw_data / (2<sup>i</sup>), | ||
Line 63: | Line 56: | ||
| 4 | | 4 | ||
|| 18:14 Mixed | || 18:14 Mixed | ||
− | || | + | ||signed 18b SQ1 feedback + signed 14b coadded error <br /> |
* [31:14] = sq1_fb | * [31:14] = sq1_fb | ||
* [13:0] = error | * [13:0] = error | ||
Line 71: | Line 64: | ||
| 5 | | 5 | ||
|| 24:8 mixed | || 24:8 mixed | ||
− | || | + | || signed 24b SQ1 feedback + signed 8b num_flux_jumps[7:0]. <br /> |
* [31:8] = sq1_fb * 2<sup>4</sup> | * [31:8] = sq1_fb * 2<sup>4</sup> | ||
* [7:0] = num_flux_jumps | * [7:0] = num_flux_jumps | ||
Line 79: | Line 72: | ||
| 6 obsolete | | 6 obsolete | ||
|| 18:14 mixed | || 18:14 mixed | ||
− | || | + | || signed 18b filtered data + signed 14b coadded <br /> |
* [31:13] = sq1_fb_filtered / (2<sup>11</sup>) | * [31:13] = sq1_fb_filtered / (2<sup>11</sup>) | ||
* [12:0] = error | * [12:0] = error | ||
Line 87: | Line 80: | ||
| 7 | | 7 | ||
|| 22:10 mixed | || 22:10 mixed | ||
− | || | + | || signed 22b filtered data + signed 10b coadded error<br /> |
* [31:10] = sq1_fb_filtered / (2<sup>7</sup>) | * [31:10] = sq1_fb_filtered / (2<sup>7</sup>) | ||
* [9:0] = error / (2<sup>4</sup>) | * [9:0] = error / (2<sup>4</sup>) | ||
Line 95: | Line 88: | ||
| 8 obsolete | | 8 obsolete | ||
||24:8 mixed | ||24:8 mixed | ||
− | || | + | || signed 24b filtered data + signed 8b num_flux_jumps[7:0]. <br /> |
* [31:8] = sq1_fb_filtered / (2<sup>8</sup>) | * [31:8] = sq1_fb_filtered / (2<sup>8</sup>) | ||
* [7:0] = num_flux_jumps | * [7:0] = num_flux_jumps | ||
Line 103: | Line 96: | ||
| 9 obsolete | | 9 obsolete | ||
|| 24:8 mixed | || 24:8 mixed | ||
− | || | + | || signed 24b filtered data + signed 8b num_flux_jumps[7:0]. <br /> |
* [31:8] = sq1_fb_filtered/ (2<sup>1</sup>) | * [31:8] = sq1_fb_filtered/ (2<sup>1</sup>) | ||
* [7:0] = num_flux_jumps | * [7:0] = num_flux_jumps | ||
Line 111: | Line 104: | ||
| 10 | | 10 | ||
|| 25:7 mixed | || 25:7 mixed | ||
− | || Signed 25b filtered data | + | || Signed 25b filtered data sq1_fb_filtered[27:3] + signed 7b num_flux_jumps[6:0]. <br /> |
* [31:7] = sq1_fb_filtered / (2<sup>3</sup>) | * [31:7] = sq1_fb_filtered / (2<sup>3</sup>) | ||
* [6:0] = num_flux_jumps | * [6:0] = num_flux_jumps |
Revision as of 17:04, 18 July 2012
Contents
MCE Data Types
During data readout from the MCE, there are different types of data associated with each detector. These are:
- calculated SQ1 feedback (sq1_fb):
- <math>sq1\_fb_{n+1} = \frac{1}{2^{12}} \left[\left(gainp \times q_{n}\right) + \left(gaini \times \sum_{i=1}^{n} error_i\right) + \left(gaind \times [error_{n} - error_{n-1}]\right)\right] </math>
- where <math> q_n=error_n + b\times q_{n-1}</math>
- n is the multiplexing-frame index
- i is reset when the PID servo is restarted by setting the servo_mode to 3 or flx_lp_init to 1.
- b < 1 and specified by pterm_decay_bits. See mce_command_description.
- coadded error (error):
- calculated from the Series-Array signal sampled @ 50MHz by the ADC
- <math>error = \sum_{1}^{sample\_num} (adc\_reading_{i} - adc\_offset)</math>
- low-pass filtered SQ1 feedback (sq1_fb_filtered):
- see 4-pole Butterworth low-pass filter .
- The effective DC gain, including quantization error, is approximately: <math>sq1\_fb\_filtered_{n} \simeq 1218 \times \left[sq1\_fb_{n-1}\right]</math>
- flux-jump counter (num_flux_jumps). See Flux jumping .
- raw ADC samples @ 50 MHz (raw). See Raw-mode readout .
Data Modes and Windowing
The type of data reported by the MCE during data acquisition is determined by the MCE parameter data_mode. Depending on the data mode, the reported data will be windowed in a different way. The notes in the table below 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 reference data modes for error, sq1fb and filtered_sq1fb are, respectively, 0, 1, and 2.
data-mode | data-type | Description | RC Firmware Revision |
---|---|---|---|
0 | co-added error | 32b (signed) co-added error
|
all |
1 | sq1 feedback | 32b (signed) calculated SQ1 feedback.
Note that servo_mode=3 is the normal running condition. The non-servoing form, used at times during array-auto-tune for example, is included here for completeness. |
all |
2 | filtered sq1 feedback | 32b (signed) low-pass filtered SQ1 feedback data.
|
2.0.5 and later |
3 obsolete (see 12) |
Raw 50 MHz Samples | Raw 50 MHz ADC samples raw[13:i], where i=0 in rev. 4.3.7 and i=6 in all previous firmware.
|
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 + signed 14b coadded error
|
2.0.9 and later |
5 | 24:8 mixed | signed 24b SQ1 feedback + signed 8b num_flux_jumps[7:0].
|
all |
6 obsolete | 18:14 mixed | signed 18b filtered data + signed 14b coadded
|
3.0.30 to 4.0.6 only |
7 | 22:10 mixed | signed 22b filtered data + signed 10b coadded error
|
4.0.2 and later |
8 obsolete | 24:8 mixed | signed 24b filtered data + signed 8b num_flux_jumps[7:0].
|
4.0.4 only |
9 obsolete | 24:8 mixed | signed 24b filtered data + signed 8b num_flux_jumps[7:0].
|
4.0.5 till 4.0.a |
10 | 25:7 mixed | Signed 25b filtered data sq1_fb_filtered[27:3] + signed 7b num_flux_jumps[6:0].
|
4.1.6, 4.0.b and later |
11 | 6:3 mixed, debugging mode | Unsigned 6b row_index + unsigned 3b column_index.
|
5.0.0 and later |
12 | Raw 50 MHz | Raw 50 MHz ADC samples raw[13:0], sign-extended to 32 bits.
|
4.0.d, 4.0.e, 5.0.1+ |
Automatic loading of data with mas_data.pro
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_feedback (DAC) units (i.e. data mode 1 divided by 212)
- filtered sq1 feedback is rescaled to the units of data mode 2.
This means the IDL user does not need to worry about the windowing of the different data modes for many applications.