Author Topic: Setting up phase data for calculating the Allan deviation  (Read 966 times)

0 Members and 1 Guest are viewing this topic.

Offline MaskuTopic starter

  • Newbie
  • Posts: 1
  • Country: de
Setting up phase data for calculating the Allan deviation
« on: January 20, 2019, 08:25:01 pm »
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"?    ???
« Last Edit: January 20, 2019, 08:39:55 pm by Masku »
 

Online iMo

  • Super Contributor
  • ***
  • Posts: 4782
  • Country: pm
  • It's important to try new things..
Re: Setting up the phase data for calculating the Allan deviation
« Reply #1 on: January 20, 2019, 08:38:31 pm »
 

Offline awallin

  • Frequent Contributor
  • **
  • Posts: 694
Re: Setting up phase data for calculating the Allan deviation
« Reply #2 on: January 21, 2019, 06:02:01 am »
However, I'm not sure what I should use as phase data.

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).
« Last Edit: January 21, 2019, 05:17:04 pm by awallin »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf