# The errors of estimates of the amplitude of harmonic signals in geophysical microcontroller measuring instruments

## Authors

- First Online:

- Received:

DOI: 10.1007/s11018-012-0067-z

- Cite this article as:
- Glinchenko, A.S. & Tronin, O.A. Meas Tech (2012) 55: 955. doi:10.1007/s11018-012-0067-z

- 36 Views

The errors of estimates of the amplitude of signals in microcontroller instruments for measuring the apparent resistance of a medium, and the conditions for using them to measure more accurate and informative spectral methods and ways of constructing them are substantiated.

### Keywords

signalamplitudemicrocontrollerapparent resistance of a mediumTo make digital amplitude measurements using software with limited computational resources and memory, such as microcontrollers, the simplest time estimates of the amplitude and approximate calculations of indirectly measured physical parameters are used, depending on the functional capabilities of the measuring instrument. The need therefore arises to determine the error of such measurements, including the justification for transferring to more accurate estimates and methods using effective computational systems such as signal processors or portable computers. This problem is a pressing one, in particular, when developing measuring receivers for dipole inductive profiling systems, designed to measure the apparent resistance of a geological medium using the measured parameters of received harmonic signals [1, 2]. The receiver in such systems is controlled using a basic microcontroller unit, and it is also used, in cheap systems, to make the measurements. A higher accuracy, reliability, and information content of the measurements can be obtained by including an external portable computer in the microcontroller unit. However, the cost of the measuring system then increases. A multifunction computer system for measuring signal parameters [3], for example, can be adapted for measurement problems in dipole inductive profiling systems.

In this paper, we consider time estimates of the amplitude of a harmonic signal from its mean rectified (MR) and root mean square (RMS) values. The first of these is most easily calculated, while the second provides greater possibilities for an analytic investigation of its errors and to extending them to estimate the mean-rectified value, taking into account the comparison of both estimates given in this paper.

The errors of time estimates of the RMS and MR values are due to the nonmultiplicity of the measurement time and of the signal period, the interference and noise, and for digital measurements the time sampling and level quantization of the signal. They contain systematic (constant and variable) and random components. In this paper, we consider only the constant components and the limit values of the variable components, since it is impossible to reduce the latter without considerable complication of the system or by changing to alternative means of measurement. The random error, due to noise, and in the microcontroller realization of the measuring instrument, may be effectively reduced by increasing the measurement time or averaging the results of multiple measurements.

The random errors are often variable components, which depend, in particular, on the initial signal phase, which, as a rule, are unknown in advance and are assumed to be random and equiprobable in the limits of ±π rad. It is of practical interest to determine this error also.

**Nonmultiplicity Errors of the Time Estimates of the Amplitude of Harmonic Signals.**For an analog harmonic signal

*x*(

*t*) =

*X*

_{m}sin(ω

*t*+ φ) with a specified frequency ω= 2π

*F*(period

*T*= 2π/ω) and an initial phase φ, the measured signal amplitude

*X*

_{m}is found from its root mean square value or mean rectified value: \( {X_m}=\sqrt{2}{X_{\mathrm{ms}}}=(\uppi /2){X_{\mathrm{mr}}} \), estimates of which are calculated in the specified measurement time

*T*

_{meas}from the expressions

*x*(

*n*) =

*X*

_{m}sin(ω

*nT*

_{s}+ φ), corresponding to samples of an analog signal at discrete instants of time

*nT*

_{s}:

*x*(

*n*) =

*x*(

*t*)|

_{t=nTs}, where

*n*= 0, 1, 2, … is the number of the signal sample, and

*T*

_{s}is the sampling period (ƒ

_{s}= 1/

*T*

_{s}is the sampling frequency), RMS and MR estimates in the measurement time

*T*

_{meas}=

*NT*

_{s}, for a number of signal samples

*N*, are defined as

The measurement time *T*_{meas}, i.e., the analog or digital integration time in (1), (2), is related to the signal period *T* by the relation: *T*_{meas} = *T*(*k* + α), where *k* = 1, 2, 3, … is the integer number of signal periods in the length of a sample, and α = 0 ± 0.5 is its fractional part. For α = 0 and ±0.5, estimates of the RMS and MR values are equal to their exact values: \( {X_{\mathrm{ms}}}={{{{X_m}}} \left/ {{\sqrt{2}}} \right.} \) and *X*_{mr} = 2*X*_{m}/π. For α ≠ 0 and α ≠ ±0.5, i.e., when the measurement time is not equal to an integer number of signal half-periods, an error arises in the estimates of the RMS and MR values, which also depend on the initial signal phase.

The relative errors of the estimates \( \updelta {{\hat{X}}_{\mathrm{ms}}}=({{\hat{X}}_{\mathrm{ms}}}-{X_{\mathrm{ms}}})/{X_{\mathrm{ms}}} \) and \( \updelta {{\hat{X}}_{\mathrm{mr}}}=({{\hat{X}}_{\mathrm{mr}}}-{X_{\mathrm{mr}}})/{X_{\mathrm{mr}}} \) for arbitrary values of α and φ are found analytically or numerically from expressions (1) and (2).

*k*≥ 2) analytical expressions for the relative error in estimating the root mean square value, found from (1), have the form

For example, for *k* = 2 and α = –0.25, the errors of the accurate and approximate expressions are (–0.0468, 0.0445) and ±0.0455, while the maximum of the error is shifted to α ≈ –0.2645.

*x*] is the symbol of the sign of the argument.

For example, for *k* = 2 and α = –0.25 the error is equal to 0.059, which is 1.3 times greater than for the RMS estimate. Graphs of the error of the estimate of the mean rectified value as a function of the initial phase are asymmetrical for all values of α, as its maximum positive and negative values (7) are not equal in modulus.

*a*,

*b*, we show graphs of the errors in estimating the root mean square and mean rectified values as a function of α for

*k*= 2 and values of the initial phase φ, corresponding to the maxima of the error for α = ±0.25 (graphs

*3*and

*4*) and α = –0.125 (graphs

*1*and

*2*).

*1*) and \( \updelta {{\hat{X}}_{\mathrm{ms}}} \) (

*2*) against

*k*+ α for a fixed value φ = π/4, which maximizes the error when α = ±0.25.

For *k* > 10, the maximum errors of both estimates are practically less than 1%.

α | ±1/16 | ±1/8 | ±3/16 | ±1/4 | ±5/16 | ±6/16 | ±7/16 |
---|---|---|---|---|---|---|---|

\( {\upsigma_{{\updelta {{\hat{X}}_{\mathrm{mr}}}}}}/\updelta {{\hat{X}}_{{\mathrm{mr}\;\max }}} \) | 0.47 | 0.618 | 0.668 | 0.725 | 0.673 | 0.618 | 0.55 |

The value of the root mean square deviation is closest to the limit error when α = ±0.25 and decreases as α approaches zero and ±0.5, where the distribution of the random error of this estimate differs increasingly from arcsine.

_{s}/

*F*=

*N*/(

*k*+ α) (the larger the number of samples of it per period). Thus, the maximum (in modulus) errors in estimating the root mean square value (2) for specified α and α close to ±0.25, are given by the expressions

*N*)(

*k*+ α)] ≈ (2π/

*N*)(

*k*+ α), i.e., when

*N*/

*k*> (16–32), they are identical with the corresponding expressions for the error in estimating the root mean square value of continuous time. Time-sampling has a more complex effect on the error in estimating the mean-rectified value, due to the differences in the spectra of the averaged digitized signals

*x*

^{2}(

*n*) and |

*x*(

*n*)|. However, a consideration of the problems connected with this is outside the scope of this paper.

**Interpretation of the Nonmultiplicity Error in the Frequency Region.** The frequency interpretation of the errors of both estimates is based on convolution of the spectra of an averaged signal sample and the frequency characteristic of the weight function (WF). A rectangular weight function (*w*(*t*) or *w*(*n*)) with a high level of side lobes of the frequency characteristic corresponds to estimates (1) and (2). The use of more complex weight functions enables one to add more effectively the components of the spectrum which differ from the constant component, which cause the error in estimating the mean values.

The coefficients *a*_{0}, *a*_{1} on the Hamming weight function are *a*_{0} = 0.54 and *a*_{1} = 0.46, and those on the Hahn weight function are *a*_{0}= *a*_{1} = 0.5, the scaling factor *m* is equal to 2 for a triangular weight function and 1/*a*_{0} for Hahn and Hamming weight functions.

The gain obtained in reducing the error by weighted averaging with *k* = 2 and α = –0.25 is 5.5 and 11.25, respectively, while for α = 0.25 it is 7.07 and 19.25, respectively, and increases rapidly as *k* increases (particularly for the Hahn weight function).

For estimates of the discrete time, the gain is close to estimates of the direct time for large ratios ƒ_{s}/*F*.

The errors of a discrete estimate of the mean rectified value with a triangular weight function with *k* = 2 and α = ±0.25 are, from the results of modeling, 0.73% and 1%, respectively (compared with 4.6% and 5.9% for a rectangular weight function).

The specially constructed step weight functions correspond to a microcontroller realization, which, in practice, does not complicate the calculations for values of the weight functions equal to an integer negative power of two 2^{−l} [4]. Hence, a simple four-step weight function under the same conditions as above, reduces the error in estimating the mean-rectified value to 1.4% and 1.5%.

**Errors of the Estimates due to Interference.** Another source of error in estimates of the mean values is concentrated harmonic interference. As a result of the nonlinear interaction of the signal and interference, constant estimate bias occurs, which depends on the ratio of their levels and is variable due to combination components and harmonics.

Thus, in the case of an estimate of the root mean square value when a single interference acts, the averaged square of the sum of the harmonic signal and interference [*x*_{s}(*t*) + *x*_{i}(*t*)]^{2} contains two constant components *X*^{2}_{ms}/2 and *X*^{2}_{mi}/2 and four variable components: the second harmonics of the signal and interference –(*X*_{ms}/2)cos(2ω_{s}*t* + 2φ_{s}), –(*X*_{mi}/2)cos(2ω_{i}*t* + 2φ_{i}) and their combination components (*X*_{ms}*X*_{mi}/2)cos[(ω_{i}– ω_{s})*t* + φ_{i}– φ_{s}], –(*X*_{ms}*X*_{mi}/2)cos[(ω_{i}+ ω_{s})*t* + φ_{i} + φ_{s}].

*k*

_{s}

*T*

_{s}=

*k*

_{i}

*T*

_{i}=

*T*

_{meas}, the estimate of the root mean square value is determined solely by the constant components

*X*

^{2}

_{ms}/2 and

*X*

^{2}

_{mi}/2:

*X*

_{mi}<<

*X*

_{ms}, it can be calculated approximately as

The above variable components characterize the error in estimating the root mean square value, which depends on the values and ratios of the frequencies and phases of the signal and interference. It reaches maximum values when the harmonics and combination components are identical in frequency with the maxima of the sidelobes of the frequency characteristic of the weight function and are in phase. These conditions cannot be simultaneously satisfied for all the variable components. For the combination components they correspond to ratios of the phases φ_{i} – φ_{s} = ±π/2, φ_{i} + φ_{s}= ∓π/2, which are satisfied when φ_{i} = π, φ_{s} = ±π/2 and φ_{s}= π, ϕ_{i} = ±π/2, and frequency ratios ƒ_{i} – ƒ_{s}= (ƒs_{amp}/*N*)(*p*_{1}+ α_{1}), ƒ_{i} + ƒ_{s}=(ƒ_{samp}/*N*)(*p*_{2} + α_{2}), where *p*_{1} and *p*_{2} are integer periods of the difference and sum frequencies in the measurement interval *T*_{meas} = *NT*_{samp}, and α_{1}= α_{2} = ±0.5 is their fractional part.

_{i}– φ

_{s}= π/2, while the “–” sign corresponds to φ

_{i}– φ

_{s}= –π/2.

*N*= 800 for ƒ

_{samp}= 10 kHz and ƒ

_{samp}/

*N*= 12.5 Hz.

S/I | 1 | 2 | 3 | 4 | 5 | 10 | 20 | 50 |
---|---|---|---|---|---|---|---|---|

\( \updelta {{\hat{X}}_{\mathrm{ms}}} \) | 0.414 | 0.118 | 0.054 | 0.031 | 0.020 | 0.005 | 0.0012 | 2·10 |

\( \updelta {{\hat{X}}_{\mathrm{mr}}} \) | 0.273 | 0.062 | 0.028 | 0.016 | 0.01 | 0.0026 | 7.5·10 | 2.2·10 |

S/I | 1 | 2 | 3 | 4 | 5 | 10 | 20 | 50 |
---|---|---|---|---|---|---|---|---|

\( \updelta {{\hat{X}}_{{\mathrm{ms}\;\max }}} \) | 0.594 | 0.223 | 0.136 | 0.094 | 0.071 | 0.0315 | 0.015 | 0.0056 |

\( \updelta {{\hat{X}}_{{\mathrm{ms}\;\min }}} \) | 0.208 | –0.01 | –0.035 | –0.037 | –0.035 | –0.022 | –0.012 | –0.005 |

\( \updelta {{\hat{X}}_{{\mathrm{ms}\;\max }}} \) | 0.515 | 0.214 | 0.129 | 0.091 | 0.07 | 0.033 | 0.016 | 6.2·10 |

\( \updelta {{\hat{X}}_{{\mathrm{ms}\;\min }}} \) | 0.033 | –0.08 | –0.072 | –0.06 | –0.05 | –0.027 | –0.014 | –0.006 |

The data in Table 2 correspond to an integer number of signal and interference periods in the measurement interval *k*= 2, *k*_{i} = 3, and α_{s} = α_{i}= 0 (ƒ_{s} = 25 Hz and ƒ_{i} = 37.5 Hz with φ_{s} = φ_{i} = 0). They are independent of the values of *k*_{s}, *k*_{i} and φ_{s}, φ_{i} for an estimate of the root mean square value and depend on these for an estimate of the mean rectified value, which is due to the presence in the spectrum of the modulus of the sum of the signal and interference of harmonics and combination components of higher order.

The data in Table 3 correspond to the case *k*_{s} = 2, *k*_{i} = 3, α_{s} = 0, and α_{i} = 0.5 (ƒ_{s} = 25 Hz and ƒ_{i} = 43.75 Hz), when the action of the combination components of the difference and sum frequencies with parameters *p*_{1} + α_{1} = 1.5 and *p*_{2}+ α_{2} = 5.5, and values of the initial phases φ_{i}= π, φ_{s} = –π/2 (the maxima of the errors) and φ_{i} = π and φ_{s} = π/2 (the minima of the errors) occurs to the greatest extent.

The errors of both estimates, due to interference, are fairly close, but as regards the range (the difference between the maximum and minimum values) the error in estimating the mean rectified value is somewhat higher than for the root mean square value. The errors in Table 3 can be reduced to the values in Table 2 by weighted averaging (filtering) of the combination components and the harmonics outside the main lobe of the frequency characteristic of the weight function.

The errors of the estimates increase rapidly when the combination component of frequency ƒ_{i} – ƒ_{s} is in the region of the main lobe of the frequency characteristic of the weight function; its half-width is equal to 1/*T*_{meas} (or ƒ_{samp}/*N*) for a rectangular weight function and 2/*T*_{meas} (or 2ƒ_{samp}/*N*) for a triangular weight function.

It should also be taken into account that, for a discrete time, the frequencies of the harmonics of the signal, interference and their combination components, which exceed the Nyquist frequency (ƒ_{samp}/2), are converted into any of the frequencies of the main band (0–ƒ_{samp}/2).

For random and equiprobable initial phases of the signal and interference, the variable component of the error can be estimated from its root mean square deviation using (9). The above analysis shows that the root mean square deviation of the error is close to its limit value (10) without taking the constant component into account.

**Errors of the Estimates due to Noise.**An estimate of the root mean square value of the additive sum of the harmonic signal

*x*

_{s}(

*t*) and the normal stationary noise

*e*(

*t*) with variance σ

_{n}

^{2}is calculated in the well-known way in terms of the mathematical expectation of its square (the upper averaging bar):

*X*

_{ms}, as

*N*= 16000 for

*k*

_{s}= 2 and α

_{s}= 0.

S/N | 1 | 2 | 3 | 4 | 5 | 6 | 8 | 10 | 20 |
---|---|---|---|---|---|---|---|---|---|

\( \updelta \hat{X}_{{\mathrm{ms}\;(\mathrm{n})}}^{\mathrm{c}} \) | 0.414 | 0.12 | 0.054 | 0.031 | 0.020 | 0.014 | 0.008 | 0.005 | 0.0012 |

\( \updelta \hat{X}_{{\mathrm{m}\mathrm{s}\;(\mathrm{n})}}^{\mathrm{m}} \) | 0.41 | 0.12 | 0.050 | 0.030 | 0.019 | 0.015 | 0.01 | 0.006 | 0.001 |

\( \updelta \hat{X}_{{\mathrm{m}\mathrm{r}\;(\mathrm{n})}}^{\mathrm{m}} \) | 0.28 | 0.07 | 0.023 | 0.015 | 0.009 | 0.008 | 0.006 | 0.005 | 0.001 |

It follows from Table 4 that the bias of the estimate of the mean rectified value is less than the bias of the estimate of the root mean square value, and approaches it as the signal/noise ratio increases. For a signal/noise ratio of greater than 10, the bias of both estimates becomes very small.

In addition to the bias of the estimates, a random noise component of the error arises, which depends on the averaging time (the number of signal samples *N*) or the number of averaging cycles, and can be reduced to an acceptable value when they are increased.

**Conclusions.** The results of our investigations show that the use of an estimate of the mean rectified value for microcontroller amplitude measurements is preferable (compared with the root mean square value) from the point of view of the amount of calculation required, but one must then bear in mind certain differences in the values and nature of their errors. One must also take into account the availability at the present time of microcontrollers with computational possibilities and the accuracy, corresponding to the realization of the estimate of the root mean square value. From the analytical descriptions of the components of the error due to interference and noise, one can also determine, with acceptable accuracy, directly or with a certain correction, the errors in estimating the mean rectified value, which is confirmed by the results of modeling.

The use of limit values to estimate the variable components of the measurement errors, which depend on the a priori unknown initial signal phase, is also justified.

However, a common drawback of these estimates is the presence in them of large values of the nonmultiplicity error when there is a small number of signal periods in the length of the sample and of constant and variable systematic errors, due to interference and noise. They reduce both the accuracy and reliability of the measurement results. Reducing these involves complicating the apparatus, using microcontroller measuring systems.

In this respect, time estimates of the amplitude of the harmonic signals are considerably inferior to its spectral estimates [3]. In dipole inductive profiling systems, it can be calculated, for example, using specialized portable microcomputers, made by the GETAC Company, including with built-in GPS navigation receivers for positioning on a location.