0
\$\begingroup\$

I am working on a project that is challenging me. I've researched on the subject as best I can, but would like additional opinions.

I have a 4' long aluminum c-channel (essentially, a metal rod) with a 9DOF sensor on the end of it (FXOS8700 + FXAS21002, accel & mag + gyro). The sensor is under constant acceleration as it rotates in a circle of radius 4'. This "rod" rests on a small castor wheel that lets it move along the ground. The base that the rod is fixed to does not move laterally. Thus, the sensor moves in a 4' circle, and rises and falls with changes in elevation.

Here is our goal: to measure the pitch of the sensor as it moves at regular intervals

First of all, because the sensor is under constant acceleration, am I correct in understanding that the equation of pitch using arctan (used for static applications) will not be correct?

I believe we need to use an IMU in this case. I have tried using the the Mahony and a Kalman filter (written for our particular sensor, based on NXP's Sensor Fusion algorithm, but is not hardware-dependent like NXP's algorithm is).

Both algorithms are 9DOF, incorporating all three sensors. However, I am wondering if this isn't a good idea for us. When we used the same sensor to get the yaw, our results tended to vary terribly. I attributed this to soft-iron errors from fluctuating magnetic fields. The algorithms would function better when we calibrated (using MotionCal software) for hard and soft iron errors, but as soon as we moved the system elsewhere we would get terrible accuracy problems. So my thought is to ignore input from the magnetometer, since we aren't looking to get a heading, just a pitch.

Now, would this mean using a 6DOF algorithm instead, if we wanted to ignore our magnetometer? I am not sure that it's possible to tell either algorithm to "ignore" the magnetometer.

I am also aware about drift error from the gyro. I have tried following the instructions from this post: AHRS algorithm under continuous linear accelerations by taking several readings from the gyro for a few seconds before each run, and then averaging them and subtracting them from subsequent readings.

Here is our problem at the moment: when we read the pitch from either algorithm, even with the sensor not rotating in a circle, the values are constantly falling. They will fall to zero, and then wrap around. Occasionally, they seem to be stable, and respond very quickly and accurately to changes in actual sensor pitch, but other times, they simply fall without stopping.

Other members of my team believe that I am way over complicating things, and all we really need is the y-component of the accelerations. But I believe that we are not looking for accelerations due to gravity exactly, but rather a dynamic pitch, which is complicated slightly by a radial acceleration.

Am I incorrect in my line of thinking somewhere? If so, please correct me.

\$\endgroup\$
  • \$\begingroup\$ What exactly do you mean by 'pitch'? \$\endgroup\$ – Bruce Abbott Mar 9 '18 at 8:14
  • \$\begingroup\$ We define "pitch" to mean "the angle the arm makes with the ground-plane the base sits on." Hopefully this picture clarifies it slightly (please forgive the slight crudeness) goo.gl/ZAw2Tt \$\endgroup\$ – usinjin Mar 9 '18 at 16:28
  • \$\begingroup\$ "Here is our goal: to measure the pitch of the sensor... We define "pitch" to mean the angle the arm makes with the ground-plane the base sits on... The sensor is under constant acceleration as it rotates in a circle of radius 4'..." - if you only want to measure the arm angle, why do you have the sensor mounted 4' out rather than at the base where acceleration is much lower? \$\endgroup\$ – Bruce Abbott Mar 9 '18 at 19:57
  • \$\begingroup\$ This is really interesting, I literally thought of this last night. Doesn’t this mean we won’t be able to use the magnetometer? We placed the sensor further down the arm so that it wouldn’t be as affected by fields from the mcu and batteries (which are located at the base) \$\endgroup\$ – usinjin Mar 11 '18 at 4:35
  • \$\begingroup\$ You might want to consider using separate sensors, each located in a position optimized for it. \$\endgroup\$ – Bruce Abbott Mar 11 '18 at 6:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.