Electronics > Beginners
Setting up phase data for calculating the Allan deviation
(1/1)
Masku:
Hi!
I'm having a project where I'm measuring the concentration of carbon dioxide gas with an infrared sensor. I need to find the optimal averaging time for the signal, the one that minimizes the Allan deviation. I have a code that calculates the (overlapping) Allan variance using this formula:
sigma^2 = 1/(2*n^2*tau^2*(N-2*n)) * sum_(i=0 to N-2*n-1) (x_(i+2*n) - 2x_(i+n) + x_i)^2),
where N is the number of data points, n is the averaging multiplier, tau is the averaging time and x is the phase data point
However, I'm not sure what I should use as phase data. The signal is a time series of ppm values - should I transform it into radians somehow, like defining the minimum as 0 and the maximum as 2pi? Or could the raw data be passed as "phase"? ???
iMo:
Try to play with TimeLab
http://www.ke5fx.com/timelab/readme.htm
awallin:
--- Quote from: Masku on January 20, 2019, 08:25:01 pm ---However, I'm not sure what I should use as phase data.
--- End quote ---
when 'misusing' ADEV (and similar) for other things than time/frequency you almost certainly want to use your measurement data as frequency data.
so either convert your measurements to 'phase' by differentiating integrating - and use the phase ADEV formula.
or use your measurements directly as 'frequency' - and a formula for ADEV that takes (unitless) frequency.
whether you want to normalize your measurements (divide by the mean) or not can be discussed... usually in time and frequency the frequency is always normalized before calculating adev.
allantools is a python library for this, if you don't want to use the free windows-binaries available (timelab or stable32).
Navigation
[0] Message Index
Go to full version