Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Measure the bandwidth-modified two-sample phase/frequency stability
ResourceFunction["ModifiedAllanDeviation"][data,r,taus] calculates the bandwidth-modified two-sample deviation of data along sample times taus at rate r. |
| {{n}} | attempts to place n logarithmically-spaced samples |
| d | places logarithmic spaced samplings with log base d |
| {τ1,τ2,…} | tries to use the specified sample times |
| All | uses all possible sample times |
| Automatic | tries to place a reasonable amount of samples along the whole possible time range |
Calculate the overlapping modified Allan deviation of white noise at a rate of 0.1 for automatically chosen sampling points:
| In[1]:= |
| Out[2]= | ![]() |
Plot the results:
| In[3]:= |
| Out[3]= | ![]() |
Display the overlapping modified Allan deviation of white noise at a rate of 0.1 for certain sampling points:
| In[4]:= | ![]() |
| Out[6]= | ![]() |
Sample at all possible times:
| In[7]:= | ![]() |
| Out[9]= | ![]() |
Try to sample at five different time values:
| In[10]:= | ![]() |
| Out[12]= | ![]() |
The function will try to use a fast evaluation method when the data array is fully real, and otherwise prints a warning:
| In[13]:= | ![]() |
| Out[15]= | ![]() |
"FrequencyData" accepts a Boolean as argument. True signals the use of frequency data as opposed to phase data:
| In[16]:= | ![]() |
| Out[18]= | ![]() |
"Overlapping" accepts a Boolean as argument. False signals the use of non-overlapping strides in the deviation sampling:
| In[19]:= | ![]() |
| Out[21]= | ![]() |
Distinguish a random walk from white noise by their distinct slopes:
| In[22]:= | ![]() |
| Out[24]= | ![]() |
Detect a drift in frequency data by a rising slope in longer sample times:
| In[25]:= | ![]() |
| Out[27]= | ![]() |
Using the fast algorithm is approximately two times faster:
| In[28]:= |
| Out[29]= |
| In[30]:= |
| Out[30]= |
The function can process Around objects as well as exact inputs directly:
| In[31]:= | ![]() |
| Out[33]= | ![]() |
Compare ModifiedAllanDeviation with the AllanDeviation resource function:
| In[34]:= |
| In[35]:= | ![]() |
| Out[35]= | ![]() |
Requesting a certain amount of samples will not necessarily result in this amount of deviations:
| In[36]:= |
| Out[37]= |
The function can distinguish between white phase noise and flicker noise (pink noise), as opposed to the plain Allan deviation:
| In[38]:= | ![]() |
| Out[44]= | ![]() |
This work is licensed under a Creative Commons Attribution 4.0 International License