nmayorov / allan-variance

Simple allan variance in Python
MIT License
40 stars 19 forks source link

A bit empiric to estimate flicker #2

Closed dinya closed 3 years ago

nmayorov commented 7 years ago

Denis, I'm sorry but I don't see a justification of this approach. Try plotting AV curve after this adjustment --- it won't fit.

I suggest to maybe investigate deeper in how the Allan variance curve can be approximated more accurately, for example, Flicker noise being a constant is only approximation, etc.

dinya commented 7 years ago

Denis, I'm sorry but I don't see a justification of this approach. Try plotting AV curve after this adjustment --- it won't fit.

Pardon, I produced double fail :(.

Firstly I meant

if empiric_mode and x[2] == 0 and (x[3] != 0 or x[4] != 0):
    x[2] = np.min(avar)

istead of

if empiric_mode and x[2] == 0 and (x[3] != 0 or x[4] != 0):
    x[2] = np.min(avar)**2.

And the second is following from the results of np.min(avar) as you noted.

I suggest to maybe investigate deeper in how the Allan variance curve can be approximated more accurately, for example, Flicker noise being a constant is only approximation, etc.

Ok, I thought about this approach. But nnls doesn't allow to fix parameter. Which method from scipy battaries do you suggest? What do you think about lmfit?

nmayorov commented 7 years ago

Ok, I thought about this approach. But nnls doesn't allow to fix parameter. Which method from scipy battaries do you suggest? What do you think about lmfit?

Seems like your idea of fixing the coefficient is not directly related to what I meant. But to be honest I don't have any practical idea about how to make an improvement.

So back to fixing the coefficient. You can do it manually, then subtract the term from AV curve and fit the remainder. Check how the estimated AV curve will look.

lmfit is a convenient wrapper to scipy.