Difference between revisions of "Integral clamp"

From MCEWiki
(Commands and Usage)
m (Dvw moved page FSFB Clamping Commands to Integral clamp over redirect)
 
(36 intermediate revisions by 5 users not shown)
Line 1: Line 1:
This feature was implemented in an effort to eliminate the effects of unlocked and ramping pixels on locked pixels on an array. It is currently available in Readout Card rev. 5.0.9.
+
This feature was implemented in an effort to eliminate the effects of unlocked and ramping pixels on locked pixels on an array. This feature is available in rev. 5.0.e as a beta release. (A preliminary version was introduced starting RC firmware rev. 5.0.9, but it was not yet functional as of RC firmware 5.0.d.)
  
 
= Introduction =
 
= Introduction =
 
* Typically, the dominant term in the MCE's PID-loop calculation is the accumulated integral.  When the operating environment changes, it is possible that some pixels that were locked before can no longer.  When this occurs, the integral-term in the PID-loop calculation grows linearly in time until it wraps.  Because the FSFB affects the ground-plane level, a large change in the FSFB (i.e. wrapping) causes a considerable level shift in healthy pixels as well.
 
* Typically, the dominant term in the MCE's PID-loop calculation is the accumulated integral.  When the operating environment changes, it is possible that some pixels that were locked before can no longer.  When this occurs, the integral-term in the PID-loop calculation grows linearly in time until it wraps.  Because the FSFB affects the ground-plane level, a large change in the FSFB (i.e. wrapping) causes a considerable level shift in healthy pixels as well.
 
* Often, these unlocked/ ramping pixels are caught, but only after they ruin observing data.  At that time, they are turned off manually, usually by setting p_coeff = i_coeff = d_coeff = 0.
 
* Often, these unlocked/ ramping pixels are caught, but only after they ruin observing data.  At that time, they are turned off manually, usually by setting p_coeff = i_coeff = d_coeff = 0.
* The goal of the FSFB clamping feature is to stop pixels from ramping at all by clamping them at a user-specified value.  If their absolute value exceeds this value, then they are then clamped.  In this way, unlocked pixels no longer affect the rest of the array after they have reached that value.  
+
* The goal of the FSFB clamping feature is to stop pixels from ramping at all by clamping them at a user-specified value.  If their absolute value exceeds this value, then they are clamped.  In this way, unlocked pixels no longer affect the rest of the array after they have reached that value.  
  
= Commands and Usage =  
+
= Usage =  
* The '''i_clamp_val''' command specifies the maximum value of the integral term (before it is multiplied by the integral coefficient.) This register specifies the positive and negative value that, when exceeded, the integral term is clamped at. This prevents unlocked pixels from wrapping continuously in lock mode. The value of this register will be different for each experiment and depends on the range of the integral term.  The range is determined by the integral coefficient (i_coeff,) and flux-quanta size (flx_quanta) -- assuming that flux-jumping is enabled. The formula for determining an appropriate value is:
+
* The {{param|rc|integral_clamp}} parameter is a 32-bit positive number per Readout Card (8x41 pixels) and is set to 0 by default, meaning no clamping is performed by default. The {{param|rc|integral_clamp}} parameter is used to clamp the calculated servo integral-term (before it is multiplied by the integral coefficient aka {{param|rc|gaini0|gaini}}) on both positive and negative ends. This prevents unlocked pixels from wrapping continuously in lock mode. The value needs to be determined based on different parameter settings like: I-gain, flux-quanta, and other experiment dependent variables. Here is a guide to calculate what the value should be set to.
  
i_coeff_range  = {[2^20] * [flx_quanta]} / [i_coeff]    // flux-jumping ENABLED
+
* Note that this calculation assumes that P-gain = D-gain = 0.
  i_coeff_range  =                                        // flux-jumping DISABLED
+
* No matter how large the calculated value is, it must still allow for a reasonable margin between it and the wrap-point of the I-term. If the margin is too small, then calculated values of the I-term will wrap if the I-term value jumps from I-term < integral_clamp to I-term > I_term_max.
i_clamp_val    = (0.9)*(i_coeff_range)
+
* Note also that when integral_clamp = 0 (default), this feature is disabled.
  
* Note that this calculation assumes that p_coeff = d_coeff = 0.
+
//Typical for ACT:
* No matter how large the calculated value is, it must still allow for a reasonable margin between it and the wrap-point of the I-termIf the margin is too small, then calculated values of the I-term will wrap anyway when the I-term value does not fall between i_clamp_val< I-term < i_term_max.
+
wb rc1 {{param|rc|gaini0}} 480 480 ..
 +
wb rc1 {{param|rc|flx_quanta0}} 6500 6500 ..
 +
  ..(other PID-setup commands)
 +
wb rc1 {{param|rc|integral_clamp}} 6389760
 +
wb rc1 {{param|rc|flx_lp_init}} 1
  
* Usage:
+
* To calculate the right integral_clamp value, the maximum valid SQ1 FB value must be converted to an equivalent maximum I-term.  Since
wb rc1 i_clamp_val 45000000 //Typical for ACT: (0.9)*(2^20)*(6200)/128
+
  fb = gaini * I / 4096
 +
we have
 +
  I_max = fb_max * 4096 / gaini
  
* Typical flx_quanta and i_coeff Values
+
* With flux-jumping '''enabled''', the maximum FB value can be as large as the number of allowable flux jumps (127) times the flux quantum:
{| border="1"
+
  fb_max = 127 * flux_quantum
 +
  I_max  = 127 * 4096 * flux_quantum / gaini
 +
 
 +
* When flux jumping is '''disabled''', the maximum FB can be taken to lie within a single DAC range (+-8192):
 +
  fb_max = 8192
 +
  I_max  = 8192 * 4096 / gaini
 +
 
 +
* Including a factor of 0.9 (to keep the clamp value slightly lower than the critical cut-off), and rounding, we have the rules:
 +
  integral_clamp ~ I_max * 0.9
 +
 
 +
                  { 30,000,000 / gaini                (for flux jumping OFF)
 +
                = {
 +
                  { 470,000 * flux_quantum / gaini    (for flux jumping ON)
 +
 
 +
* Typical Values (Calculated in data_mode_outputs.xls)
 +
{| class="wikitable"
 
|-
 
|-
! Telescope !! Flux Quanta !! I Coefficient !! i_clamp_val
+
! Telescope !! Flux Quanta !! I Coefficient  
 +
! integral_clamp
 +
(Flux Jumping ON)
 +
! integral_clamp
 +
(Flux Jumping OFF)
 
|-  
 
|-  
| ACT || 6500 || 480 || 2<sup>22</sup>
+
| ACT || 6500 || 480 || 6389760 || 62915
 
|-  
 
|-  
| SPIDER || 9500 || 50 || 2<sup>26</sup>
+
| SPIDER || 9500 || 50 || 89653248 || 603980
 
|-  
 
|-  
| SCUBA-2 || 6500 || 2024 || 2<sup>20</sup>
+
| SCUBA-2 || 6500 || 2024 || 1515358 || 14920
 
|}
 
|}
 +
 +
[[Category:Readout Card Firmware]]

Latest revision as of 15:34, 13 July 2018

This feature was implemented in an effort to eliminate the effects of unlocked and ramping pixels on locked pixels on an array. This feature is available in rev. 5.0.e as a beta release. (A preliminary version was introduced starting RC firmware rev. 5.0.9, but it was not yet functional as of RC firmware 5.0.d.)

Introduction

  • Typically, the dominant term in the MCE's PID-loop calculation is the accumulated integral. When the operating environment changes, it is possible that some pixels that were locked before can no longer. When this occurs, the integral-term in the PID-loop calculation grows linearly in time until it wraps. Because the FSFB affects the ground-plane level, a large change in the FSFB (i.e. wrapping) causes a considerable level shift in healthy pixels as well.
  • Often, these unlocked/ ramping pixels are caught, but only after they ruin observing data. At that time, they are turned off manually, usually by setting p_coeff = i_coeff = d_coeff = 0.
  • The goal of the FSFB clamping feature is to stop pixels from ramping at all by clamping them at a user-specified value. If their absolute value exceeds this value, then they are clamped. In this way, unlocked pixels no longer affect the rest of the array after they have reached that value.

Usage

  • The integral_clamp parameter is a 32-bit positive number per Readout Card (8x41 pixels) and is set to 0 by default, meaning no clamping is performed by default. The integral_clamp parameter is used to clamp the calculated servo integral-term (before it is multiplied by the integral coefficient aka gaini) on both positive and negative ends. This prevents unlocked pixels from wrapping continuously in lock mode. The value needs to be determined based on different parameter settings like: I-gain, flux-quanta, and other experiment dependent variables. Here is a guide to calculate what the value should be set to.
  • Note that this calculation assumes that P-gain = D-gain = 0.
  • No matter how large the calculated value is, it must still allow for a reasonable margin between it and the wrap-point of the I-term. If the margin is too small, then calculated values of the I-term will wrap if the I-term value jumps from I-term < integral_clamp to I-term > I_term_max.
  • Note also that when integral_clamp = 0 (default), this feature is disabled.
//Typical for ACT: 
wb rc1 gaini0 480 480 ..
wb rc1 flx_quanta0 6500 6500 ..
..(other PID-setup commands)
wb rc1 integral_clamp 6389760 
wb rc1 flx_lp_init 1
  • To calculate the right integral_clamp value, the maximum valid SQ1 FB value must be converted to an equivalent maximum I-term. Since
 fb = gaini * I / 4096

we have

 I_max = fb_max * 4096 / gaini
  • With flux-jumping enabled, the maximum FB value can be as large as the number of allowable flux jumps (127) times the flux quantum:
 fb_max = 127 * flux_quantum
 I_max  = 127 * 4096 * flux_quantum / gaini
  • When flux jumping is disabled, the maximum FB can be taken to lie within a single DAC range (+-8192):
 fb_max = 8192
 I_max  = 8192 * 4096 / gaini
  • Including a factor of 0.9 (to keep the clamp value slightly lower than the critical cut-off), and rounding, we have the rules:
 integral_clamp ~ I_max * 0.9
 
                  { 30,000,000 / gaini                (for flux jumping OFF)
                = {
                  { 470,000 * flux_quantum / gaini    (for flux jumping ON)
  • Typical Values (Calculated in data_mode_outputs.xls)
Telescope Flux Quanta I Coefficient integral_clamp

(Flux Jumping ON)

integral_clamp

(Flux Jumping OFF)

ACT 6500 480 6389760 62915
SPIDER 9500 50 89653248 603980
SCUBA-2 6500 2024 1515358 14920