Sensor Fusion - rotation overshoot

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Sensor Fusion - rotation overshoot

909 Views
markguzewski
Contributor I

I'm pretty new at this but I completed the on-line courses here and I'm getting a better understanding of what's involved. And I'm not sure of this post should be in the MCUXpresso area or in the Sensors area. Maybe both?

Anyway, I'm having a bit of an "out-of-the-box" issue and I wonder if someone can explain. The kit I'm using is the FRDM-K64F-AGM01.

  • The NXP Sensor Fusion Toolbox is installed. and running on my Windows PC.
  • I flashed the binary FSFK-K64F-AGM01-GL-NED.bin.
  • I selected the Gyro Stabilized Compass algorithm because that's kind of what we're doing.
  • Moving the unit around finally shows the magnetometer as calibrated.

And it seems to work, except for a couple of unexpected things happening.

Primarily troublesome is some kind of over-shoot when I rotate the unit. It responds fine, but when I stop rotation the model slowly rotates in the opposite direction for a few seconds to some stable point. I have attached a screen cap video of what I'm seeing. The quick rotations are because of me, and the slow rotations in the other direction happen all by themselves.

The other issue is the the model position drifts quite a bit over time. Our application requires that the thing maintain an accurate compass and tilt reading over extended periods (several hours, in fact). The tilt seems rock solid, but the compass will drift a couple of degrees per minute, and sometime exhibits a noticeable amount of jitter.

Is this some sort of calibration problem? Interference? Or is there something else I should be aware of?

Tags (1)
0 Kudos
1 Reply

690 Views
lisettelozano
NXP Employee
NXP Employee

Hello Mark,

 

I've done some testing to try to recreate the issue. I could calibrate the magnetometer for this algorithm and reduce (but not fully attenuate) the slow rotations after a quick rotation. However, is still affected by any interference near to the sensors and giving some drifting to the compass.

 

The Gyro Stabilized Compass algorithm (also known as 9-axis as per includes the accelerometer, magnetometer, and gyroscope sensors) combines the strengths and weaknesses for these sensors to compute orientation with respect to the global earth frame. It provides an accurate orientation estimate even in the presence of high linear acceleration and the presence of an external magnetic disturbance. However, you can still see some effects due to the magnetic interference or linear acceleration; they are largely but not fully attenuated when those sources of interference are nearing a steady state.

 

The algorithm takes advantage that we know how each of the 3 vectors in question (gravity, earth field, and rotation) should change relative to the others when the board rotates. Introduction of constant offsets into assumed gravity and earth field vectors will throw off those calculations.

 

I hope this information can be helpful.

 

Best Regards,

Paulina

0 Kudos