Auto-zero/Auto-calibration
From Wikimization
(→Mathematical Formulation) |
|||
| Line 7: | Line 7: | ||
== Mathematical Formulation == | == Mathematical Formulation == | ||
| - | + | Nomenclature: | |
| - | *<math> | + | It will be presumed, unless otherwise stated, that collected variables compose a (topological) manifold; i.e. a collection designated by single symbol and id. Not necessarily possessing a differential geometry metric. The means that there is no intrinsic two dimensional tensor, <math>g_{ij} \,</math>, allowing a identification of contravarient vectors with covarient ones. These terms are presented to provide a mathematically precise context to distinguish: contravarient and covariant vectors, tangent spaces and underlying coordinate spaces. Typically they can be ignored. |
| - | *<math>\bar{x}</math> a | + | * The quintessential example of covariant tensor is the differential of a scaler, although the vector space formed by differentials is more extensive than differentials of scalars. |
| + | * The quintessental contravariant vector is the derivative of a path <math>p \,</math> with component values <math>e^i =f_i(s) \,</math> on the manifold. With <math>(p)^j=\frac{\partial e^j}{\partial s}\cdot \frac {\partial}{\partial e^j} \,</math> being a component of the contravariant vector along <math>p \,</math> parametrized by "s". | ||
| + | *Using <math>e \,</math> (see directly below) as an example | ||
| + | ** <math>e_{id} \,</math> refers to collection of variables identified by "id" | ||
| + | *** Although a collection does not have the properties of a vector space; in some cases we will assume (restrict) it have those properties. In particular this seems to be needed to state that the Q() functions are convex. | ||
| + | ** <math>e_{id}^i \,</math> refers to the <math>i'th \,</math> component of <math>e_{id} \,</math> | ||
| + | ** <math>(e_{id})_j^i\,</math> refers to the tangent/cotangent bundle with <math>i \,</math> selecting a contravariant component and <math>j \,</math> selecting a covariant component | ||
| + | ** <math>(expr)_{|x\leftarrow c} \,</math> refers to an expression, "expr", where <math>(expr)</math> is evaluated with <math>x=c</math> | ||
| + | ** <math>(expr)_{|x\rightarrow c} \,</math> refers to an expression, "expr", where <math>(expr)</math> is evaluated as the limit of "x" as it approaches value "c" | ||
| + | Definitions: | ||
| + | |||
| + | *<math> x\, </math> a collection of some environmental or control variables that need to be estimated | ||
| + | *<math>\bar{x}</math> a collection of calibration points | ||
*<math>\hat{x}</math> be the estimate of <math>x\,</math> | *<math>\hat{x}</math> be the estimate of <math>x\,</math> | ||
| + | *<math>p \,</math> a collection of parameters that are constant during operations but selected at design time. The system "real" values during operation are typically <math>p+e \,</math>; although other modifications, <math>E(p,e) \,</math> are possible indicating variance of parameters from nominal. "p" are mostly included in symbolic formulas to allow sensitivity calculations or completeness in symbolic expressions. | ||
*<math>e\,</math> be errors: assumed to vary, but constant during intervals between calibrations and real measurements | *<math>e\,</math> be errors: assumed to vary, but constant during intervals between calibrations and real measurements | ||
* <math>y\,</math> be the results of a measurement processes attempting to measure <math>x\,</math> | * <math>y\,</math> be the results of a measurement processes attempting to measure <math>x\,</math> | ||
| - | ** <math>y=Y(x;e)\,</math> where <math>e\,</math> might be additive, multiplicative, or some other form. | + | ** <math>y=Y(x;p,e)\,</math> where <math>e\,</math> might be additive, multiplicative, or some other form. |
| - | ** <math>\bar{y}=Y(\bar{x};e)</math> the reading values at the calibration points | + | ** <math>\bar{y}=Y(\bar{x};p,e)</math> the reading values at the calibration points |
*<math>\hat{e}</math> be estimates of <math>e\,</math> derived from <math>\bar{x}, \bar{y}</math> | *<math>\hat{e}</math> be estimates of <math>e\,</math> derived from <math>\bar{x}, \bar{y}</math> | ||
**<math>\hat{e}=E(\bar{x},\bar{y})</math> | **<math>\hat{e}=E(\bar{x},\bar{y})</math> | ||
| Line 20: | Line 33: | ||
**Where <math>x\,</math> is allowed to vary over a domain for fixed <math>\hat{x}</math> | **Where <math>x\,</math> is allowed to vary over a domain for fixed <math>\hat{x}</math> | ||
**The example is oversimplified as will be demonstrated below. | **The example is oversimplified as will be demonstrated below. | ||
| - | ** <math>\hat{x}</math> is typically decomposed into a chain using <math>\hat{e}</math> | + | ** <math>\hat{x} \,</math> is typically decomposed into a chain using <math>\hat{e}</math> |
Then the problem can be formulated as: | Then the problem can be formulated as: | ||
*Given <math>\bar{x},\bar{y}</math> | *Given <math>\bar{x},\bar{y}</math> | ||
| - | *Find a formula or process to select <math>(\bar{x},\bar{y})\xrightarrow{\hat{X}}\hat{x}</math> so as to minimize <math>Q(x,\hat{x})</math> | + | *Find a formula or process to select <math>(\bar{x},\bar{y})\xrightarrow{\hat{X}}\hat{x} \,</math> so as to minimize <math>Q(x,\hat{x})</math> |
| - | ** The reason for the process term <math>\hat{X}</math> is that many correction schemes are feedback controlled; <math>\hat{X}</math> is never computed, internally, although it might be necessary in design or analysis. | + | ** The reason for the process term <math>\hat{X} \,</math> is that many correction schemes are feedback controlled; <math>\hat{X} \,</math> is never computed, internally, although it might be necessary in design or analysis. |
== Examples == | == Examples == | ||
Revision as of 11:51, 21 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
Nomenclature:
It will be presumed, unless otherwise stated, that collected variables compose a (topological) manifold; i.e. a collection designated by single symbol and id. Not necessarily possessing a differential geometry metric. The means that there is no intrinsic two dimensional tensor, , allowing a identification of contravarient vectors with covarient ones. These terms are presented to provide a mathematically precise context to distinguish: contravarient and covariant vectors, tangent spaces and underlying coordinate spaces. Typically they can be ignored.
- The quintessential example of covariant tensor is the differential of a scaler, although the vector space formed by differentials is more extensive than differentials of scalars.
- The quintessental contravariant vector is the derivative of a path
with component values
on the manifold. With
being a component of the contravariant vector along
parametrized by "s".
- Using
(see directly below) as an example
-
refers to collection of variables identified by "id"
- Although a collection does not have the properties of a vector space; in some cases we will assume (restrict) it have those properties. In particular this seems to be needed to state that the Q() functions are convex.
-
refers to the
component of
-
refers to the tangent/cotangent bundle with
selecting a contravariant component and
selecting a covariant component
-
refers to an expression, "expr", where
is evaluated with
-
refers to an expression, "expr", where
is evaluated as the limit of "x" as it approaches value "c"
-
Definitions:
a collection of some environmental or control variables that need to be estimated
a collection of calibration points
be the estimate of
a collection of parameters that are constant during operations but selected at design time. The system "real" values during operation are typically
; although other modifications,
are possible indicating variance of parameters from nominal. "p" are mostly included in symbolic formulas to allow sensitivity calculations or completeness in symbolic expressions.
be errors: assumed to vary, but constant during intervals between calibrations and real measurements
-
be the results of a measurement processes attempting to measure
-
where
might be additive, multiplicative, or some other form.
-
the reading values at the calibration points
-
be estimates of
derived from
be a quality measure of resulting estimation; for example
- Where
is allowed to vary over a domain for fixed
- The example is oversimplified as will be demonstrated below.
-
is typically decomposed into a chain using
- Where
Then the problem can be formulated as:
- Given
- Find a formula or process to select
so as to minimize
- The reason for the process term
is that many correction schemes are feedback controlled;
is never computed, internally, although it might be necessary in design or analysis.
- The reason for the process term
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.
-
-
can be either the calibration resistor
or the unknown resistance
of the thermistor
-
is the corresponding voltage read:
or
-
is the reading offset value, an error
-
the bias voltage
-
the bias resistor
-
- With errors
-
- Calibration reading
-
- Thermistor (real) reading
-
- The problem is to optimally estimate
based upon
and
- The direct inversion formula illustrates the utility of mathematically using the error space
during design and analysis. The direct inversion of
for
naturally invokes the error space as a link to
.
- Inversion for
-
- Inversion in terms of estimates
-
- Inversion for
- The problem is to minimize some
.
- One point, setpoint: when
then minimize
. This might seem a little strange, but applies when one is trying to set
to a setpoint
but errors occur during measurement. The division is induced when
and
is the real variable of interest.
- Mode estimate: Maximize the probability of an estimate treating the calibration measurement
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
as well as the range of errors.
- One point, setpoint: when
- It should be mentioned that, in this case
is not a good (or natural) function. A better function for both results and calculations is
. 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
- Weighted least squares of
over the range of
- Minimize mode of
with respect to the range of
and the measurements
- Minimize the mean of
with respect to the range of
and the measurements
- Minimize the worst case of
over the range of
- Some weighting of the error interval with respect to
Areas of optimization
Design
Runtime
Calibration usage