Learn R Programming

allanvar (version 1.1)

avarn: Allan Variance (incremental cluster size by unit).

Description

The function avarn 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 n has been computed as the maximum number of cluster into N recorded values, which is ceil [(N-1)/2].

Usage

avarn(values, freq)

Arguments

values
Calibrated sensor output (i.e: angular velocity or acceleration)
freq
Sampling frequency rate in Hertz

Value

  • Return an object of class data.frame containing the Allan Variance computation with the following fields:
  • timeValue of the cluster time.
  • avThe Allan variance value: variance among clusters of same size.
  • errorError on the estimation: Uncertainty of the value.

Details

It computes the Allan variance in the same way that avar function. The difference is that the number of cluster time and size are selected as the maximum number of cluster into N recorded values. However, Papoulis et.al recommend to estimate the amplitude of different noise components defined as in avar function. Therefore is recommended to use the avar in most of the cases, considering also computational cost.

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

Run this code
#Load data 
data(gyroz)

#Allan variance computation using avarn
avngyroz <- avarn(gyroz@.Data, frequency(gyroz))
plotav(avngyroz)
abline(1.0+log(avngyroz$time[1]), -1/2, col="green", lwd=4, lty=10)
abline(1.0+log(avngyroz$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"))

Run the code above in your browser using DataLab