Difference between revisions of "Integral clamp"

From MCEWiki
(Commands and Usage)
Line 7: Line 7:
  
 
= Commands and Usage =  
 
= Commands and 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 '''integral_clamp''' 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.   
 
* Note that this calculation assumes that p_coeff = d_coeff = 0.
 
* Note that this calculation assumes that p_coeff = d_coeff = 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 < i_clamp_val to I-term > i_term_max.
+
* 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 i_clamp_val = 0 (default), this feature is disabled.
+
* Note also that when integral_clamp = 0 (default), this feature is disabled.
  
 
* Usage:
 
* Usage:
Line 17: Line 17:
 
  wb rc1 flx_quanta0 6500 6500 ..
 
  wb rc1 flx_quanta0 6500 6500 ..
 
  ..(other PID-setup commands)
 
  ..(other PID-setup commands)
  wb rc1 i_clamp_val 6389760  
+
  wb rc1 integral_clamp 6389760  
 
  wb rc1 servo_mode 3
 
  wb rc1 servo_mode 3
 
  wb rc1 flx_lp_init 1
 
  wb rc1 flx_lp_init 1
  
* The formula for determining an appropriate value for i_clamp_val is:
+
* The formula for determining an appropriate value for integral_clamp is:
 
  fsfb_bits            =  14 bits //fixed
 
  fsfb_bits            =  14 bits //fixed
 
  fsfb_shift          =  12 bits //fixed
 
  fsfb_shift          =  12 bits //fixed
Line 34: Line 34:
 
  signed_integral_bits = pid_integral_bits - 1          //flux-jumping ENABLED, signed
 
  signed_integral_bits = pid_integral_bits - 1          //flux-jumping ENABLED, signed
 
  signed_integral_bits = pid_integral_bits - fj_bits - 1 //flux-jumping DISABLED, signed
 
  signed_integral_bits = pid_integral_bits - fj_bits - 1 //flux-jumping DISABLED, signed
  i_clamp_value        = clamp_margin * 2^signed_integral_bits  
+
  integral_clamp      = clamp_margin * 2^signed_integral_bits  
  
 
* Typical Values (Calculated in data_mode_outputs.xls)
 
* Typical Values (Calculated in data_mode_outputs.xls)
Line 40: Line 40:
 
|-
 
|-
 
! Telescope !! Flux Quanta !! I Coefficient  
 
! Telescope !! Flux Quanta !! I Coefficient  
! i_clamp_val
+
! integral_clamp
 
(Flux Jumping ON)
 
(Flux Jumping ON)
! i_clamp_val
+
! integral_clamp
 
(Flux Jumping OFF)
 
(Flux Jumping OFF)
 
|-  
 
|-  

Revision as of 17:26, 20 September 2010

This feature was implemented in an effort to eliminate the effects of unlocked and ramping pixels on locked pixels on an array. A preliminary version was introduced starting RC firmware rev. 5.0.9, but it is not yet functional as of RC firmware 5.0.d. This feature is considered UNDER DEVELOPMENT for now (Sept. 20, 2010).

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 then clamped. In this way, unlocked pixels no longer affect the rest of the array after they have reached that value.

Commands and Usage

  • The integral_clamp 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.
  • Note that this calculation assumes that p_coeff = d_coeff = 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.
  • Usage:
//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 servo_mode 3
wb rc1 flx_lp_init 1
  • The formula for determining an appropriate value for integral_clamp is:
fsfb_bits            =  14 bits //fixed
fsfb_shift           =  12 bits //fixed
max_fjs              = 256 fjs //fixed
clamp_margin         =  0.90 //adjustable
flux_quanta          = <experiment specific>
i_coeff              = <experiment specific>

fj_bits              = log2(max_fjs * flux_quanta) - fsfb_bits
total_fsfb_bits      = fj_bits + fsfb_bits + fsfb_shift
integral_bits        = total_fsfb_bits - log2(i_coeff)
signed_integral_bits = pid_integral_bits - 1           //flux-jumping ENABLED, signed
signed_integral_bits = pid_integral_bits - fj_bits - 1 //flux-jumping DISABLED, signed
integral_clamp       = clamp_margin * 2^signed_integral_bits 
  • 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