avar: Allan Variance (cluster size as a power of 2).

Description Usage Arguments Details Value Author(s) References Examples

Description

The function avar computes the Allan Variance of a set of values with a given constant sampling frequency. The input has to be the output rate/acceleration from the sensors. In this version of the Allan variance computation the number and size of cluster has been computed as a power of 2 n=2^l, l=1,2,3,...(Allan 1987) which is convenient to estimate the amplitude of different noise components.

Usage

1
avar(values, freq)

Arguments

values

Calibrated sensor output (i.e: angular velocity or acceleration)

freq

Sampling frequency rate in Hertz

Details

Considering a number N of outputs from the sensor at a constant time interval of t_0. n groups of consecutive data points could be formed (n<N/2), each member of the groups is a cluster. Associated with each cluster is a time τ, which is equal t_0, 2t_0, 3t_0 … nt_0. Taking the instantaneous output of the inertial sensors (i.e. angular velocity) here denoted by Ω(t), the cluster average is:

\bar{Ω}_k(τ)= 1/τ \int_{t_k}^{t_{k+1}} Ω(t)dt

Where \bar{Ω}(t) represents the cluster average value of the output rate for a cluster which starts from the kth data point and contains n data points depending on the length of τ. The definition of the subsequent cluster average is as following, where t_{k+1}= t_k + τ

\bar{Ω}_{k+1}(τ)= 1/τ \int_{t_{k+1}}^{t_{k+1}+τ} Ω(t)dt

The interesting value for the Allan variance analysis is the difference for each of two adjacent clusters.

\varepsilon_{k+1,k} = \bar{Ω}_{k+1}(τ) - \bar{Ω}_k(τ)

For each cluster of time τ, the ensemble of defined of the previous formula forms a set of random variables. The important information is the variance of \varepsilon_s over all the clusters of the same size that can be formed from the entire data. Then the Alla Variance of the length τ, is defined as

θ^2(τ)= 1/(2(N-2n)) ∑_{k=1}^{N-2n} [ \bar{Ω}_{k+1}(t) - \bar{Ω}_k(t)]^2

Obviously, for any finite number of data points (N), a finite numbers of cluster of a fixed length (τ) can be formed. Hence θ^2(τ) represents an estimation of the real variance. The quality of estimate depends on the number of independent clusters of a fixed length that can be formed. Defining the parameters as the percentage error in estimating the Allan standard deviation of the cluster due to the finiteness of the number of clusters gives

ζ_{AV} = (σ(τ,M) - σ(τ))/(σ(τ))

where σ(τ,M) denotes the estimate of the Allan standard deviation obtained from M independent clusters, σ(τ,M) approaches its theoretical value σ(τ) in the limit of M approaching infinity. A lengthy and straightforward calculation shows the percentage error, the formula has been used in the error of the estimation of the Allan Variance and it is equal to :

σ(ζ_{AV}) = 1/(√{2(N/n-1)})

Where N is the total number of data points in the entire data set and n is the number of data points contained in the cluster. The equation shows that the error of the estimation is short when the length of the cluster is small as the number of independent cluster performed is large.

Characterization of stochastic errors requires identifying its PSD function. There is a unique relationship between the Allan variance (time-domain) and the PSD (frequency-domain) of the random process defined by

σ^2(τ) = 4 \int_{0}^{∞}S_Ω(f)(\sin^4(π f τ))/((π f τ)^2)df

Where S_Ω(f) is the two-side PSD of the random process.

Value

Return an object of class data.frame containing the Allan Variance computation with the following fields:

time

Value of the cluster time.

av

The Allan variance value: variance among clusters of same size.

error

Error on the estimation: Uncertainty of the value.

Author(s)

Javier Hidalgo Carrio <javier.hidalgo_carrio@dfki.de>

References

Allan, D. W. (1966) Statistics of Atomic Frequency Standards Proceedings of IEEE, vol. 54, no. 2, pp. 221-230, Feb, 1966.

IEEE Std 952-1997 IEEE Standard Specification Format Guide and Test Procedure for Single Axis Interferometric Fiber Optic Gyros.

Papoulis, A and Unnikrisha,S (2002) Probability, Random Variables and Stochastic Processes Fourth Edition. McGraw Hill Series in electrical and Computer Engineering.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
#Load data 
data(gyroz)

#Allan variance computation using avar
avgyroz <- avar(gyroz@.Data, frequency(gyroz))
plotav(avgyroz)
abline(1.0+log(avgyroz$time[1]), -1/2, col="green", lwd=4, lty=10)
abline(1.0+log(avgyroz$time[1]), 1/2, col="green", lwd=4, lty=10)
legend(0.11, 1e-03, c("Random Walk"))
legend(25, 1e-03, c("Rate Random Walk"))

jhidalgocarrio/allanvar documentation built on May 19, 2019, 9:26 a.m.