Auto-zero/Auto-calibration

From Wikimization

(Difference between revisions)
Jump to: navigation, search
(Biochemical temperature control)
(Biochemical temperature control)
Line 36: Line 36:
where multiple temperature sensors are multiplexed into a data stream and one or more channels are set aside for Auto-calibration. Expected final systems accuracies of .05 degC are needed because mammalian temperature regulation has resulting in processes and diseases that are "tuned" to particular temperatures.
where multiple temperature sensors are multiplexed into a data stream and one or more channels are set aside for Auto-calibration. Expected final systems accuracies of .05 degC are needed because mammalian temperature regulation has resulting in processes and diseases that are "tuned" to particular temperatures.
* A simplified example, evaluating one calibration channel and one reading channel. In order to be more obvious the unknown and calibration readings are designated separately; instead of the convention given above. This is more obvious in a simple case, but in more complicated cases is unsystematic.
* A simplified example, evaluating one calibration channel and one reading channel. In order to be more obvious the unknown and calibration readings are designated separately; instead of the convention given above. This is more obvious in a simple case, but in more complicated cases is unsystematic.
-
** <math>V_x=V_{off}+\frac{V_{ref} \cdot R_x}{R_x + R_b}</math>
+
** <math>V_x=V_{off}+\frac{V_{ref}R_x}{R_x + R_b}</math>
** <math>R_x \,</math> can be either the calibration resistor <math>R_c \,</math> or the unknown resistance <math>R_t \,</math> of the thermistor
** <math>R_x \,</math> can be either the calibration resistor <math>R_c \,</math> or the unknown resistance <math>R_t \,</math> of the thermistor
** <math>V_x \,</math> is the corresponding voltage read: <math>V_c\,</math> or <math>V_t\,</math>
** <math>V_x \,</math> is the corresponding voltage read: <math>V_c\,</math> or <math>V_t\,</math>
Line 43: Line 43:
** <math>R_b \,</math> the bias resistor
** <math>R_b \,</math> the bias resistor
* With errors
* With errors
-
** <math>V_x=V_{off}+\frac{(V_{ref} +e_{ref}) \cdot (R_x +e_x)}{(R_x+e_x + R_b+e_b)}</math>
+
** <math>V_x=V_{off}+\frac{(V_{ref} +e_{ref})(R_x +e_x)}{(R_x+e_x + R_b+e_b)}</math>
* Calibration reading
* Calibration reading
** <math>V_c=\left.V_x\right|_{x\leftarrow c}</math>
** <math>V_c=\left.V_x\right|_{x\leftarrow c}</math>
* Thermistor (real) reading
* Thermistor (real) reading
** <math>V_t=\left.V_x\right|_{x\leftarrow t}</math>
** <math>V_t=\left.V_x\right|_{x\leftarrow t}</math>
-
* The problem is to optimally, an ambiguous term during design, estimate <math>R_t \,</math> based upon <math>V_t \,</math> and <math>V_c \,</math>
+
* The problem is to optimally estimate <math>R_t\,</math> based upon <math>V_t \,</math> and <math>V_c \,</math>
-
* The direct inversion formula illustrates the utility of mathematically using the error space <math>[V_{off}\,,e_c\,,e_b\,,e_{ref}] \,</math> during design and analysis. The direct inversion of <math>V_t \,</math> for <math>R_t \,</math> naturally invokes the error space as a link to <math>V_c \,</math>.
+
* The direct inversion formula illustrates the utility of mathematically using the error space <math>[V_{off}\,,e_c\,,e_t\,,e_b\,,e_{ref}] \,</math> during design and analysis. The direct inversion of <math>V_t \,</math> for <math>R_t \,</math> naturally invokes the error space as a link to <math>V_c \,</math>.
** Inversion for <math>R_t \,</math>
** Inversion for <math>R_t \,</math>
-
*** <math>R_t=\frac{(V_{off}-V_t)\cdot(e_x+R_b+e_b)+e_x\cdot (V_{ref}+e_{ref})}{V_t-V_{off}-V_{ref}-e_{ref}}</math>
+
*** <math>R_t=\frac{(V_{off}-V_t)(e_t+R_b+e_b)+e_t(V_{ref}+e_{ref})}{V_t-V_{off}-V_{ref}-e_{ref}}</math>
** Inversion in terms of estimates
** Inversion in terms of estimates
-
*** <math>\widehat{R_t}=\frac{(\widehat{V_{off}}-V_t)\cdot(\widehat{e_x}+R_b+\widehat{e_b})+\widehat{e_x}\cdot (V_{ref}+\widehat{e_{ref}})}{V_t-\widehat{V_{off}}-V_{ref}-\widehat{e_{ref}}}</math>
+
*** <math>\widehat{R_t}=\frac{(\widehat{V_{off}}-V_t)(\widehat{e_x}+R_b+\widehat{e_b})+\widehat{e_x}(V_{ref}+\widehat{e_{ref}})}{V_t-\widehat{V_{off}}-V_{ref}-\widehat{e_{ref}}}</math>
* The problem is to minimize some <math>Q(R_t,\widehat{R_t})</math>.
* The problem is to minimize some <math>Q(R_t,\widehat{R_t})</math>.
-
** One point, setpoint: when <math>R_t=R_c \,</math> then minimize <math>(1-\frac{\widehat{R_t}}{R_c}) \,</math>. This might seem a little strange, but applies when one is trying to set <math>R_t \,</math> to a setpoint <math>R_c \,</math> but errors occur during measurement. The division is induced when <math>R_t=k\cdot e^{b/t}</math> and <math>t \,</math> is the real variable of interest.
+
** One point, setpoint: when <math>R_t=R_c \,</math> then minimize <math>(1-\frac{\widehat{R_t}}{R_c}) \,</math>. This might seem a little strange, but applies when one is trying to set <math>R_t \,</math> to a setpoint <math>R_c \,</math> but errors occur during measurement. The division is induced when <math>R_t=ke^{b/t}</math> and <math>t \,</math> is the real variable of interest.
** Mode estimate: Maximize the probability of an estimate treating the calibration measurement <math>V_c \,</math> as a constraint hypersurface ((n-1)-dimensional foliate in a n-dimensional space) in the error space with a defined PDF function. This can done via KKT; and also extended to more calibration readings. In polynomial cases this can theoretically be solved via Groebner basis; but even given the "exact" solutions, one is forced into sub-optimal/approximate estimates.
** Mode estimate: Maximize the probability of an estimate treating the calibration measurement <math>V_c \,</math> as a constraint hypersurface ((n-1)-dimensional foliate in a n-dimensional space) in the error space with a defined PDF function. This can done via KKT; and also extended to more calibration readings. In polynomial cases this can theoretically be solved via Groebner basis; but even given the "exact" solutions, one is forced into sub-optimal/approximate estimates.
** Mean estimate: Using the same model the expected error of a estimate given all possible values on the constraint surface weighted by a PDF distribution on the constraint surface; is minimized. The projection of the original PDF on n-space, to the constraint surface can be done via differential geometry. There are probably statistical methods, but the statistics descriptions seem to take a cavalier attitude towards some transformations involving integrals.
** Mean estimate: Using the same model the expected error of a estimate given all possible values on the constraint surface weighted by a PDF distribution on the constraint surface; is minimized. The projection of the original PDF on n-space, to the constraint surface can be done via differential geometry. There are probably statistical methods, but the statistics descriptions seem to take a cavalier attitude towards some transformations involving integrals.

Revision as of 01:29, 20 August 2010

Contents

Motivation

In instrumentation, both in a supporting role and as a prime objective, measurements are taken that are subject to systematic errors. Routes to minimizing the effects of these errors are:

  • Spend more money on the hardware. This is valid but hits areas of diminishing returns; the price rises disproportionately with respect to increased accuracy.
  • Apparently, in the industrial processing industry, various measurement points are implemented and regressed to find "subspaces" that the process has to be operating on. Due to lack of experience I (RR) will not be covering that here; although others are welcome to (and replace this statement). This is apparently called "data reconciliation".
  • Calibrations are done and incorporated into the instrument. This can be done by analog adjustments or written into storage mediums for subsequent use by operators or software.
  • Runtime Auto-calibrations done at regular intervals. These are done at a variety of time intervals: every .01 seconds to 30 minutes. I can speak to these most directly; but I consider the "Calibrations" to be a special case.

Mathematical Formulation

Let

  • LaTeX:  x\, a vector of some environmental or control variables that need to be estimated
  • LaTeX: \bar{x} a vector of calibration points
  • LaTeX: \hat{x} be the estimate of LaTeX: x\,
  • LaTeX: p\, a vector of nominal values of uncertain parameters affecting the measurement
    • Assumed constant or designed in
  • LaTeX: e\, be the errors in LaTeX: p\,
    • Assumed to vary but constant in the intervals between calibrations and real measurements
  • LaTeX: y\, be the results of a measurement processes attempting to measure LaTeX: x\,
    • LaTeX: y=Y(x;p,e)\, where LaTeX: e\, might be additive, multiplicative, or some other form.
    • LaTeX: \bar{y}=Y(\bar{x};p,e) the reading values at the calibration points
    • Subsequently LaTeX: p\, will be assumed fixed for the problem realm; and dropped from notation
  • LaTeX: \hat{e} be estimates of LaTeX: e\, derived from LaTeX: \bar{x}, \bar{y}
    • LaTeX: \hat{e}=E(\bar{x},\bar{y})
  • LaTeX: Q(x,\hat{x}) be a quality measure of resulting estimation; for example LaTeX: \sum{(x_i-\hat{x_i})^2}
    • Where LaTeX: x\, is allowed to vary over a domain for fixed LaTeX: \hat{x}
    • The example is oversimplified as will be demonstrated below.
    • LaTeX: \hat{x} is typically decomposed into a chain using LaTeX: \hat{e}


Then the problem can be formulated as:

  • Given LaTeX: \bar{x},\bar{y}
  • Find a formula or process to select LaTeX: (\bar{x},\bar{y})\xrightarrow{\hat{X}}\hat{x} so as to minimize LaTeX: Q(x,\hat{x})
    • The reason for the process term LaTeX: \hat{X} is that many correction schemes are feedback controlled; LaTeX: \hat{X} is never computed, internally, although it might be necessary in design or analysis.

Examples

Biochemical temperature control

where multiple temperature sensors are multiplexed into a data stream and one or more channels are set aside for Auto-calibration. Expected final systems accuracies of .05 degC are needed because mammalian temperature regulation has resulting in processes and diseases that are "tuned" to particular temperatures.

  • A simplified example, evaluating one calibration channel and one reading channel. In order to be more obvious the unknown and calibration readings are designated separately; instead of the convention given above. This is more obvious in a simple case, but in more complicated cases is unsystematic.
    • LaTeX: V_x=V_{off}+\frac{V_{ref}R_x}{R_x + R_b}
    • LaTeX: R_x \, can be either the calibration resistor LaTeX: R_c \, or the unknown resistance LaTeX: R_t \, of the thermistor
    • LaTeX: V_x \, is the corresponding voltage read: LaTeX: V_c\, or LaTeX: V_t\,
    • LaTeX: V_{off} \, is the reading offset value, an error
    • LaTeX: V_{ref} \, the bias voltage
    • LaTeX: R_b \, the bias resistor
  • With errors
    • LaTeX: V_x=V_{off}+\frac{(V_{ref} +e_{ref})(R_x +e_x)}{(R_x+e_x + R_b+e_b)}
  • Calibration reading
    • LaTeX: V_c=\left.V_x\right|_{x\leftarrow c}
  • Thermistor (real) reading
    • LaTeX: V_t=\left.V_x\right|_{x\leftarrow t}
  • The problem is to optimally estimate LaTeX: R_t\, based upon LaTeX: V_t \, and LaTeX: V_c \,
  • The direct inversion formula illustrates the utility of mathematically using the error space LaTeX: [V_{off}\,,e_c\,,e_t\,,e_b\,,e_{ref}] \, during design and analysis. The direct inversion of LaTeX: V_t \, for LaTeX: R_t \, naturally invokes the error space as a link to LaTeX: V_c \,.
    • Inversion for LaTeX: R_t \,
      • LaTeX: R_t=\frac{(V_{off}-V_t)(e_t+R_b+e_b)+e_t(V_{ref}+e_{ref})}{V_t-V_{off}-V_{ref}-e_{ref}}
    • Inversion in terms of estimates
      • LaTeX: \widehat{R_t}=\frac{(\widehat{V_{off}}-V_t)(\widehat{e_x}+R_b+\widehat{e_b})+\widehat{e_x}(V_{ref}+\widehat{e_{ref}})}{V_t-\widehat{V_{off}}-V_{ref}-\widehat{e_{ref}}}
  • The problem is to minimize some LaTeX: Q(R_t,\widehat{R_t}).
    • One point, setpoint: when LaTeX: R_t=R_c \, then minimize LaTeX: (1-\frac{\widehat{R_t}}{R_c}) \,. This might seem a little strange, but applies when one is trying to set LaTeX: R_t \, to a setpoint LaTeX: R_c \, but errors occur during measurement. The division is induced when LaTeX: R_t=ke^{b/t} and LaTeX: t \, is the real variable of interest.
    • Mode estimate: Maximize the probability of an estimate treating the calibration measurement LaTeX: V_c \, as a constraint hypersurface ((n-1)-dimensional foliate in a n-dimensional space) in the error space with a defined PDF function. This can done via KKT; and also extended to more calibration readings. In polynomial cases this can theoretically be solved via Groebner basis; but even given the "exact" solutions, one is forced into sub-optimal/approximate estimates.
    • Mean estimate: Using the same model the expected error of a estimate given all possible values on the constraint surface weighted by a PDF distribution on the constraint surface; is minimized. The projection of the original PDF on n-space, to the constraint surface can be done via differential geometry. There are probably statistical methods, but the statistics descriptions seem to take a cavalier attitude towards some transformations involving integrals.
    • Worst case: where points considered where the constraint meets some boundary; say +- .01%
    • Any of the above extended to cover a range of LaTeX: R_t \, as well as the range of errors.
  • It should be mentioned that, in this case LaTeX: (R_t - \widehat{R_t}) is not a good (or natural) function. A better function for both results and calculations is LaTeX: (1-\frac{R_t}{\widehat{R_t}}). I consider the form of errors to be a natural variation from problem to problem and should be accommodated in any organized procedure.
  • Sensitivities are needed during design in order to determine which errors are tight and find out how much improvement can be had by spending more money on individual parts; and during analysis to determine the most likely cause of failures.

Infrared Gas analysers

with either multiple stationary filters or a rotating filter wheel. In either case the components, sensors, and physical structures are subject to significant variation.

Various forms of LaTeX: Q()\,

  • Weighted least squares of LaTeX: Q()\, over the range of LaTeX:  x\,
  • Minimize mode of LaTeX: \hat{e} with respect to the range of LaTeX: e\, and the measurements LaTeX: \bar{y}=Y(\bar{x};p,e)
  • Minimize the mean of LaTeX: \hat{e} with respect to the range of LaTeX: e\, and the measurements LaTeX: \bar{y}=Y(\bar{x};p,e)
  • Minimize the worst case of LaTeX: Q()\, over the range of LaTeX:  x\,
  • Some weighting of the error interval with respect to LaTeX: Q()\,


Areas of optimization

Design

Runtime

Calibration usage

Personal tools