Why Analog Offsetting in DCM derivatives (ArduImu, Razor9DOF, Kixrazor)?

Hi all (especially Bill & Doug)
I wonder why "analog" offsetting is done for the gyros and accelerometers at program start? Why not filling omega_I with appropriate startup values instead? This way the code gets a bit leaner and kind of legacy-free.
Do me the favor:
Set all AN_OFFSETs to zero right before main loop.
Set Omega_I[0] to 6, Omega_I[1] to -6, and Omega_I[2] to 6 right before main loop (tested for Razor 9DOF). No levelling is required anymore to start with proper readouts. Ki_yaw may be set a bit larger.
Natalius



Views: 235

Reply to This

Replies to This Discussion

Hi Bill,

thanks again - I guess we are getting close to the end of this discussion which I think is/was a fruitful one.

Gyro lock & time to convergence: D'accord: {6,-6,6}.

But...

"I was also saying that the actual values of the offsets depend on temperature, so if you are going to be operating over a wide temperature range, you should record the offsets on power up."

...stays puzzling to me.

Perhaps I misunderstand it - if so, please correct me. In my understanding, DCM drift correction shuffles any faulty slow drift - regardless of its origin (e.g. from a temperature change) - into omega_i, this is one of its beauties. If this is correct however, omega_i will "forget" what was "fixed upon start" after a while. Omega_I has no "long term" memory and thus there is no reason why the conditions in the beginning are more important than later ones. It is more the opposite - Omega_i behaves as a kind of "short term memory".

Best regards,

Natalius
Hi Natalius,

Once again, I think we are saying the same thing, perhaps I should not have used the word "record".

What I was trying to say is that the gyro offsets are unknown at power up if you do not know the temperature, because the gyro offsets depend on temperature. So, you should measure the gyro offsets at power up if you are not doing temperature compensation of the gyros.

Once you have measured the gyro offsets, you then have two choices about what to do with them. You can either store them in RAM and simply subtract them from gyro samples before doing any other computations, or you can use them to initialize the integrators in the PI feedback drift controller.

If you store them in RAM as offsets, then the integrator in the PI feedback drift controller is adjusting to the change in offsets as the temperature changes. On the other hand, if you initialize the integrators in the drift controller, then the integrators represent the total offsets.

I think we are agreed about what happens after that if the temperature changes slowly. The gyro offsets will shift, the PI feedback controller will detect the shifts and adjust for them.

The point that I was trying to emphasize is that, unless you temperature compensate the gyros, you have to measure their offsets during power up. What you do with the offsets after that is up to you.

Best regards.
Bill
Hi Natalius,

One more thing.

You said:

"DCM drift correction shuffles any faulty slow drift - regardless of its origin (e.g. from a temperature change) - into omega_i, this is one of its beauties. If this is correct however, omega_i will "forget" what was "fixed upon start" after a while. Omega_I has no "long term" memory and thus there is no reason why the conditions in the beginning are more important than later ones. It is more the opposite - Omega_i behaves as a kind of "short term memory""

I agree with you 100%.

Best regards,
Bill
Hi Bill,

I learned from our discussion how deeply certain engineering paradigms sit inside our brains. Some of them even develop the status of a sacrilege ("Never ask.."). Initial offsetting seems to belong to this category.

We agreed that initial offsetting is done just for the sake of a faster gyro lock - shorter time to convergence. We also agreed that the DCM handles the drift shuffling for us autonomously - no need for a "guidance". We further agreed about the expectation values omega_i should have both for the case of zeroed AN_offset and measured/non-zeroed AN_offsets.

The question remains: What is the difference between the start from a "measured" AN_offset (or omega_i filled from the latter) and a hard-wired "good guess" such as {6,-6,6}? The answer is that the time to convergence for the measured case might be a bit faster. In my experience it is not senseable - the guess is good enough - and measuring takes time and code as well.

Let me conclude that initial offsetting is not needed in practice.

Best regards,

Natalius

RSS

Social Networking

Contests

Season Two of the Trust Time Trial (T3) Contest has now begun. The fourth round is an accuracy round for multicopters, which requires contestants to fly a cube. The deadline is April 14th.

A list of all T3 contests is here

Advertisement

© 2013   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service