Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Temperature compensation without a sufficient temperature swing can make NaNs #1854

Open
nanodude opened this issue Jun 28, 2017 · 7 comments

Comments

@nanodude
Copy link
Contributor

  • Seen in version (release version or githash): Release-20170213.1
  • On flight controller (if applicable): BrainFPV RE1

Issue details:

After performing Temperature Compensation, it is no longer possible to perform an Automatic Level Detection. Looking at the Sensor Settings on the browser on the RHS, a few of the values are NANs. After these NANs are changed to zero, Automatic Level Detection works again.

@mlyle mlyle changed the title Failure to perform Automatic Level Detection after Temperature Compensation Temperature compensation without a sufficient temperature swing can make NaNs Jun 28, 2017
@mlyle mlyle added this to the Wired milestone Jun 28, 2017
@mlyle
Copy link
Member

mlyle commented Jun 28, 2017

For now I suggest you avoid temperature compensation

@nanodude
Copy link
Contributor Author

Thank you, Michael. The NANs don't appear on any of the polynomial coefficients, though. As far as I can tell, the coefs are legit after a 45C temp ramp. If I remember correctly, the NANs appeared on AccelBias, AccelScale and ZAccelOffset, but not all components.

@tracernz
Copy link
Member

I tried without changing the temp, then was able to do one automatic level detection, then a second attempt caused the firmware to crash. Attitude solution was obviously going crazy the whole time due to temperature noise + bogus coeffs. Simple solution seems to be just disable the "Accept Temperature Calibration" button until we've actually seen the temperature change by at least "Temperature range"?

@mlyle
Copy link
Member

mlyle commented Jun 28, 2017

The temp calibration is pretty .. finnicky from what I remember, and it's easy to get values in the polynomial that result in crazy oscillation etc. I think it really needs a thorough examination.

But it's not really worth the effort, because even multirotor nav works pretty well without gyro tempcal? 🤷‍♂️

@nanodude
Copy link
Contributor Author

nanodude commented Jun 28, 2017

Thanks for your work, guys! The funny thing is that tempcal worked perfectly, with very reasonable coefs (essentially a line for the three axes). For some reason, tempcal wrote some garbage values into AccelBias, AccelScale and ZAccelOffset even though I was under the impression that only the gyro stuff was affected. The only reason I like tempcal is due to chip self-heating. I can easily see a 10C temperature increase in a matter of minutes, thus "invalidating" the arming calibration.

@mlyle
Copy link
Member

mlyle commented Jun 28, 2017

@nanodude-- is the ongoing calibration we do with the accelKI term ineffective? it has always worked OK for me.

@nanodude
Copy link
Contributor Author

@mlyle I forget exactly which variables where affected. I'm going to repeat the calibration tonight, time permitting, and will post the results. Thanks!

@tracernz tracernz modified the milestones: Wired, Post-Wired Jan 31, 2018
@mlyle mlyle modified the milestones: Inconceivable, Ludicrous Mar 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants