In Sensirion_Engineering_Guidelines_SEN5x.pdf a "Gain factor" is discussed as follows:
(fresh-air and VOC events) at the same time. Note: this parameter may interfere with the gating behavior. The
gating threshold is fixed at VOC Index = 230 and thus, any event reaching this threshold will be treated
according to the setting of the “Gating Max Duration Minutes” or, in case the VOC Index output is always
below 230, the learning of offset and gain will always be active even during long VOC events.
My interpretation of this is that it describes the concepts of a gain and a gate, and that the gate with its fixed value of 230 would determine whether or not a VOC reading would influence the learning.
Q1: in the code there is a define for GasIndexAlgorithm_INDEX_GAIN
of 230, which is the only occurrence of 230 that I found. Shouldn't this be something like GasIndexAlgorithm_INDEX_GATING_THRESHOLD
given the discussion of Gain Factor and gating?
Q2: GasIndexAlgorithm_INDEX_GAIN
is used as a default value for params->mIndex_Gain
, which is then used as a multiplier in the process function. This would make sense were it actually a gain, however as the value of 230
appears to relate to the gating level, is this correct, or is there an unintentional gain of 230 being applied if using the default values?
Q3: Is 230 a sensible default value for the gain.
Q4: Is gating actually implemented, and if so, where/how? The value of 230 from GasIndexAlgorithm_INDEX_GAIN
appears only to be only used as mentioned above, and not as a comparison test.
I may have multiple misunderstandings, in which case apologies for that, however on the face of it there do appear to be some implementation issues here.