-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Onboard Temperature Calibration [WIP] #6413
Conversation
* @returns multiplied matrix i.e. A*B | ||
*/ | ||
|
||
float *mat_mul(float *A, float *B, uint8_t n) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we compare this to https://github.com/PX4/Matrix, what parts of this standalone Matrix implementation can be replaced by the standard? I would much prefer to extend Matrix with whatever is missing and not have any math classes in here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah this is all supported by matrix. see the temp cal doc for the math. All you need is pseudoinverse. I can add a convenience method if you need. This code is very clean so of you see anything in matrix you can improve, let me know/ submit a PR. This math only supports a standard y = f (T), if you look at the temp cal document the math is much more general, could add more info like gyro data. I will try to sketch up the math for this in matrix.
Is anyone online to give me an overview of the online temp sampling strategy? |
I am online, which mode do you prefer for comm.
On Sat, 21 Jan 2017 at 9:10 PM James Goppert < mailto:James Goppert <notifications@github.com> > wrote:
a, pre, code, a:link, body { word-wrap: break-word !important; }
Is anyone online to give me an overview of the online temp sampling strategy?
—
You are receiving this because you authored the thread.
Reply to this email directly,
#6413 (comment)
, or
https://github.com/notifications/unsubscribe-auth/AFbvCBqvlUqkg5ba_IjiGQfVnIONiPL_ks5rUibggaJpZM4LqEKe
.
|
@bugobliterator and I came up with a short term plan:
Fit interface:
When a sample is received, the bin is updated. We could update by storing the number of samples and sum and calculating the mean, or by using a low pass filter. The disadvantage of the man is that the value will become very static if we use this for online adaptation. The disadvantage to the low pass filter is that we will need to initialize it when we get the first sample and set the cutoff frequency very low so it might get stuck on the initial value. Maybe when initializing the bin we wait for 10 samples or so and initialize with the mean of those 10 samples. Long term support for online adaptation: |
@jgoppert @LorenzMeier I have changed to using Matrix functions in polyfit and converted it into a template with changeable order of polynomial, hence it can be used for anything relating to polynomial/curve/spline fitting. So do you think its a good idea to move it to the matrix library as well for anybody to use? |
Ok. Please integrate with this PR next: #6396 and enable the full operation. I would propose that:
This is a bit different from min and max as we likely need to work with what the user gives us (best effort). It would also be good to be able to set min and max as additional gates - if they are not reached, the calibration will be considered invalid. We would set those to relatively small values though (e.g. -5 to 35) by default to users can reach them. |
@bugobliterator yes, I think we should add it to Matrix. Let's pull it in after we get this temp call stuff wrapped up. |
@bugobliterator Where is this standing? |
Discussion and PR moved to #6425 |
Temperature Calibration Scheme for calibrating sensors. The module will be running onboard and processing data realtime.
TODOs:
Parameters for post and pre calibration stage not yet saved, add mechanism to store them.
Currently only gyro, include accel and baro.
Integrate with Events interface
Current Results:
Gyro Temperature Cal Temperature vs Gyro Bias plots (Temperature is on reference offset scale):
![gyro0_x](https://cloud.githubusercontent.com/assets/5697288/22174650/b99b6852-e009-11e6-92a5-2f25ddebaee9.jpg)
![gyro0_y](https://cloud.githubusercontent.com/assets/5697288/22174651/bdab91d8-e009-11e6-9d3c-1061ec26796e.jpg)
![gyro0_z](https://cloud.githubusercontent.com/assets/5697288/22174653/c111f448-e009-11e6-9ab9-ecfe34c9a63f.jpg)
tempcal start
inside nsh will kick off temperature cal.