SparkFun Forums 

Where electronics enthusiasts find answers.

Have questions about a SparkFun product or board? This is the place to be.
By sebmadgwick
#142022
As I said in a recent post, I am attempting to characterise the MPU-6050 as a first step towards robust calibration. Part of this is achieved by logging the gyroscope zero-rate output over -20˚C to +70˚C. All investigations are conducted for a batch of 8 devices.

Results (see attached plot) suggest that the bias temperature relationship incorporates a hysteresis. This behaviour is observed for all tested devices. Other temperature sensitive devices (magnetometer and crystal oscillator) monitored during these tests do not display this behaviour.

Can anyone offer an explanation for this?
You do not have the required permissions to view the files attached to this post.
By skimask
#142025
Looks like it's pulling in an overall drift in the X axis of about 15 degrees per hour.
What would cause a 15 degree per hour drift in an otherwise stable/non-moving gyro?
Hmmmmm.......
By sebmadgwick
#142028
Skimask, I think you may be misinterpreting the plot. The plot shows the gyroscope output (in lsb) against temperature. It is not a plot of angle (integrated gyroscope output).

The gyroscope bias is subject to a random walk (drift) but this drift does not account for the observed behaviour. The bias drift is of very low amplitude and is a function of time. Therefore the significant deviation occurring within the seconds between C and D contrasted against the small deviation between B and C over almost an hour indicates that the deviations are not due to the bias random walk.
By sebmadgwick
#142060
Skimask, that explanation would not make sense. The rotation of the Earth could account for a maximum of 0.07 lsb and is constant. The final 10 lsb deviation in the above plot is clearly a function of temperature for the reasons I gave in my reply above. Also note that the gyroscope output remains constant once the temperature reaches steady state for the last 20 minutes of the data (there is a 20 minutes cluster of points at D).
By skimask
#142073
sebmadgwick wrote:The rotation of the Earth could account for a maximum of 0.07 lsb and is constant.
Depending on where you're located and the orientation of the sensor itself.
The final 10 lsb deviation in the above plot is clearly a function of temperature for the reasons I gave in my reply above. Also note that the gyroscope output remains constant once the temperature reaches steady state for the last 20 minutes of the data (there is a 20 minutes cluster of points at D).
You must be looking at a different graph 'cause I don't see any cluster of points at "D".
By sebmadgwick
#142082
It may not be clear in the image but the plot contains many points at "D". All points are the mean of 1000 measurements so they overlap tightly.

We don't seem to be getting any closer to a possible explanation. Some other observations to consider:
• For all devices, the hysteresis is most apparent in X and Y and far less so (or not at all) in Z.
• The hysteresis is in the same direction for all devices; i.e. zero-rate output increases when cooling.
• The temperature relationship apparent in X and Y seems far more complex (i.e. higher order polynomial) than Z. Each Z plot seems either linear or 2nd order.

The differences in Z relative to X and Y make me wonder if Z is a more accurate characterisation of the temperature relationship and that something (perhaps coupled with temperature) is causing the output of X and Y to significantly drift resulting in an apparent more complex temperature relationship and hysteresis when measurements are repeated.
By Mee_n_Mac
#142084
Is the slope of the Z output vs temp always shallower than the others ? Do the slopes always have the same signs as the above ? Has the orientation of the DUT wrt gravity been the same during all the tests ? If so, have you given any thought to doing a test with the DUT rotated by 90 degrees ?

I'd expect some change of the ZRO with temp, I don't know how to explain the schmoo plot just yet. I'd have thought the vibratory nature of the MEMS devices would have made such behavior impossible. There must be some asymmetry in the physical construction that allows this to happen. You may be hard pressed to find an answer w/o knowing those construction details and I wonder if the manufacturer would be willing to disclose them.
By sebmadgwick
#142091
Mee_n_Mac wrote:Is the slope of the Z output vs temp always shallower than the others?
Broadly speaking, yes. Some devices indicate a second order temperature relationship in Z in which case the gradient may be greater at some points.
Mee_n_Mac wrote:Do the slopes always have the same signs as the above ?
No. The predominant gradient varies between devices. I was expecting this as a colleague reported this during his own investigations of ST’s LSM303.
Mee_n_Mac wrote: Has the orientation of the DUT wrt gravity been the same during all the tests ? If so, have you given any thought to doing a test with the DUT rotated by 90 degrees ?
All devices have been mounted with Z pointing up. I will repeat the test for either X or Y pointing up.
Mee_n_Mac wrote: There must be some asymmetry in the physical construction that allows this to happen.
I agree that if hysteresis is occurring then it would be mechanical in nature. I had wondered if the expanding PCB was applying stresses to the MPU package, I know that the gyroscope bias can be shifted by several degrees with mechanical stress, though I don't think this is the case.

I am currently of the mind that the is no hysteresis but instead a combination of independent errors that give the impression of both hysteresis and a more complex temperature relationship. I have contacted Invensense and am waiting for a response.
By Mee_n_Mac
#142110
sebmadgwick wrote:I am currently of the mind that the is no hysteresis but instead a combination of independent errors that give the impression of both hysteresis and a more complex temperature relationship. I have contacted Invensense and am waiting for a response.
Have you done a few complete cycles, from A to B and back to A again, slowly ? Is the plot repeatable for any given device and axis ? Or does the random walk of the ZRO erase any possibility of that repeatability ? I had thought there was more randomness with these devices but your plots show a well behaved gyro vs time (and temp).
By sebmadgwick
#142129
Mee_n_Mac wrote:Have you done a few complete cycles, from A to B and back to A again, slowly ? Is the plot repeatable for any given device and axis ?
I have not investigated multiple cycles in any depth. This could be revealing but is practically difficult. I will at least repeat the test for the given device.
Mee_n_Mac wrote: Or does the random walk of the ZRO erase any possibility of that repeatability ? I had thought there was more randomness with these devices but your plots show a well behaved gyro vs time (and temp).
There seem to be misconceptions about this characteristic but the gyroscope bias drift is typically very small. For example, see the attached plot showing the zero-rate output variation for a constant temperature over 40 hours.
You do not have the required permissions to view the files attached to this post.
By Mee_n_Mac
#142131
sebmadgwick wrote:
Mee_n_Mac wrote: Or does the random walk of the ZRO erase any possibility of that repeatability ? I had thought there was more randomness with these devices but your plots show a well behaved gyro vs time (and temp).
There seem to be misconceptions about this characteristic but the gyroscope bias drift is typically very small. For example, see the attached plot showing the zero-rate output variation for a constant temperature over 40 hours.
Wow, that is a lot smaller than I had expected. Good to know. Thanks !
By sebmadgwick
#142172
Invensense have got back to me but only to say:
"We do not test MPU 6050 gyro accuracy / performance over the heat cycle. Just that the device continues operating. It’s possible that the delta T results in a faster device random walk during periods of fast heating /cooling, which would present as hysteresis. We don’t perform those tests, so we don’t have additional data to offer."

It looks like I'm going to have to solve this myself, hopefully with help from this forum.

I've been conducting investigations outside of the thermal chamber using a 'freeze spray' and a heat-gun. This results in crude thermal dynamics but has allowed me to improvise many investigations in a short space of time.

For now, I am assuming that the thermal chamber data for a monotonically increasing temperature (at ≤0.5˚C per minute) is the best available indication of the true bias temperature relationship. I have used this data to create an error model for each device which is a 6th order function of temperature. I then compared the gyroscope output against this model when heating and cooling with the heat-gun and freeze spray. See attached example plot for same device as original post.

If we assume that the bias random walk is responsible for the observed deviations then robust calibration would still achievable and could be represented by an n'th order polynomial temperature relationship that is 'shifted' by an appropriate off-set. Run-time estimation of this 'shift' would have to be provided at a higher level; e.g. the sensor fusion algorithm. However, the polynomial could only be defined if a calibration dataset could be collected over a temperature range that didn't incorporate any significant deviations due to random walk.

Any thoughts on this are welcome. I was hoping that someone on this forum might have some experience tackling this issue.
You do not have the required permissions to view the files attached to this post.
By UhClem
#142180
I can think of two possibilities:

1) Time lag from the temperature change. If the data you have presented is using the on board temp sensor this is less likely. But a lag in the response of the PCB causing stress is still a possibility.

2) Slow response of some zero bias adjusting system on the chip. The data sheet doesn't say that this exists but there are some big gaps into which it could fit.

With a step change in temperature (measure both on chip, test chamber, and perhaps the PCB) you should be able to see what the time constant for the bias change is. This might provide a hint as to where to look.
By sebmadgwick
#142182
UhClem wrote:1) Time lag from the temperature change. If the data you have presented is using the on board temp sensor this is less likely. But a lag in the response of the PCB causing stress is still a possibility.
The temperature measurements are provided by the MPU-6050’s internal thermometer. The PCB layout follows datasheet guidelines. I don’t see an immediate way of investigating if PCB stresses are significant as the effect will always be compounded. Moreover, such investigations (e.g. with free-wired devices) may not be of much practical benefit as my use requires that the MPU-6050 is soldered to a PCB.
UhClem wrote:2) Slow response of some zero bias adjusting system on the chip. The data sheet doesn't say that this exists but there are some big gaps into which it could fit.
I spoke to Invensense directly about this and they confirmed that the device provides the raw sensor data and that there are no background ‘corrective’ processes.