In my latest flight test with the ArduIMU, I found that I probably need to tune it a bit. First of all, the data:-

http://vimeo.com/10887900

My preliminary observations are that the output converges onto the accelerometer settings too quickly. This in-spite of the 1G vector magnitude guard in the code.

Can someone explain to me the relationship between the Ki and Kp to the tuning. I have some idea of what they do but am not sure how they interact with each other.

Thanks,
Daniel Wee

Views: 120

Reply to This

Replies to This Discussion

I made some experiments last week. This graph shows the sum of 16 gyro samples




As you can see there is a lot of noise. If you right shift it 4 times, you remove a lot of noise but you keep the ADC resolution of 10bits. (so around 1°/s).

On the yaw there is no correction and after a flight of 10 min, it was drifting at a speed of 1°/s.
I also tried to put a motor close to the IMU to generate noise and in static conditions the yaw drift is very important

(X unit is 100ms so the total experiment length is 100s)

With a Kalman filter (of DCM which is use in ArduIMU) of course you can made it but if you don't rely on acceleros for 10s I am not sure you will manage to have a correct angle estimation.

Loris
I am only interested in roll and pitch. Yaw if totally unimportant to me.

Is that graph from the ArduIMU? The noise level looks about right and is comparable to my own test samples.

While the magnitude of the noise is 1-degree/s for 10-bits, you have to remember that the noise should be Gaussian so that the sum of the noise should be smaller than that, shouldn't it? Even if we assume 1-degree a second noise error, a 10-second turn would yield an error of 10-degrees if all the noise were biased in the same direction. 10-seconds is quite long for a turn normally, but if you are circling, of course, then it's a different story.

Daniel
Can you provide the data stream from the first graph, as a CSV file or equivalent? What are the units on your axes? Is this plot in-flight, or at rest?
Hi,

I attached data. It was taken at ground and it is the sum of 16 samples (there is bad data sometimes (29824 30335 -26497 -29568 -16261 -29308) due to serial reading errors so you should remove it). It was recorded "in real time" so at around 155Hz. (adc clock is 250khz)

I plot this data :



Y axis is ADC steps and represent Value-mean(value).

Yaw is not corrected so it is based only on gyros and as you can see the drift is around 0.5 - 1°/s. If this drift is not too high for you so you should success.

I just tried to divide by 1000 the ROLLPITCH gains and the drift is around 0.5-1°/s but the problem is to remove the static error. So if you don't make to many turns it should work.

Loris
Attachments:
With the imu at 30cm from a motor (just laying on the same piece of wood) (same units)


Actually, it is the white noise that has that standard deviation. The bias instability looks invisible at that time scale, at least to me. If this was an ADXRS610-based system, I would advise taking a 1000 second long sample stream. With the low ADC resolution, it might need to be longer in order to observe the bias shift. Can you take a 30-min sample stream (at rest, motor off), compress it, and repost?

Do you have the high-pass filters removed from your device? If you don't, then don't bother, because you won't ever observe the bias instability.

I'm going to code up an Allan Variance parameter estimation program tonight (US Eastern time). I am very interested in the AV performance for ArduIMU.

Thanks,
-Jonathan
ArduIMU 2+ doesn't have the high pass filter.

Do you use an oversampling error? or any averaging? Because I can't remove the yaw drift. Even just after the startup (after gyro offset calibration) the yaw is drifting (and other angles if I remove the accelerometers feedback). The drift speed is low (~0.2°/s but is still present).
Is the drift constant and does vibration affect the amount of drift?

In my own testing I have found that many gyros exhibit a rather peculiar behaviour in the presence of vibrations - that is the bias induced by vibrations is non-random. This means that when there is vibrations, you will see a definite change in bias in a constant direction. I am not sure if this is the case here but it is one possibility.

As Jonathan mentioned, unless you take large samples, it is very difficult to actually see the bias. Another possibility is quantization error in the ADC sampling since the MCU only has 10-bits. I think by over-sampling 16x, you only get just under 2 additional bits of resolution.

Another possibility is temperature induced variations. I have also found that it can take several minutes from powering up for the system to reach a thermal equilibrium. Until then you are likely to see some temperature induced bias drift.

One thing you can try for a sample set is to run a histogram on the data set. You may discover that the distribution is non-Gaussian. This is what I have often found.

Daniel
If you see one of my previous post you will see that the noise is more important on axis X for the gyros but I don't know if it is a gyro problem of if my "noise generator" generates more noise in this axis.

On the DCM code I use I took 16 samples to add 2 bits of resolution. But I run the ADC at 250Khz and I found it add a little bit of noise (around 1 LSB). And for stability (with noise) it is better to do an average on 16 samples rather than try to get 2 extra bits of resolution. I need to do more tests to find the best way of averaging but it will take times.

In the previous test I made, I found that the more we right shift the gyros data the lower the variance is. But for the accelerometer it did not decrease the variance. Sometimes the variance increases and I can't understand why.


Loris

RSS

Groups

© 2012   Created by Chris Anderson.

Badges  |  Report an Issue  |  Terms of Service