I have been using an APM 2.5 in an actual aircraft connected to my laptop running Mission Planner just for recording pitch/roll/yaw and comparing it to the "gold standard" G1000 logged data while doing a few roll and pitch step control tests. When I expect a 30 degree roll angle that is held for several seconds as seen on the G1000 data, I get the initial roll angle (sometimes a lot less though) on the recorded MP data but then it drifts back towards zero over five seconds or so. Similar results for pitch. The rates and accelerations look reasonable (hard to really tell - unless the maneuver is dramatic).

    I realize that this actual aircraft environment - especially the 100+ knots - is not what has been expected or tested for Ardupilot use, but I wondered if anyone has any ideas to try to improve the APM results. I see that I should probably upgrade the firmware to 2.6.8 since the accel noise reduction has been improved. Maybe this environment is a little too extreme. It's possible that I need to move the APM closer to the CG - I am unsure just how far away it is right now - it seems to be near the quarter chord position and is centered left to right. Also, should I isolate the APM with more foam? I don't feel much vibration and I have two layers of velcro between the airframe and the APM. Any ideas would be appreciated.

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

Replies

  • I have also tried this several times over the years. A year ago I tried this with an old version of apm and it worked poorly. I just tried again with 2.68 and it worked pretty well, although not perfectly. I had no reference ahrs to compare, but noticed a large discrepancy in most left handed coordinated turns, where apm would report a much larger pitch change than actual. I also noted sometimes significant heading issues where apm reported a crab which did not exist. the apm 2.5 was mounted in foam at the top of the windscreen well removed from obvious nearby magnetic objects and mag was enabled. I had done no tuning. I will test again and compare to a high performance GPS/imu when I get the chance.
  • 3692592015?profile=original3692592028?profile=original

    I have included some quick plots of the difference between G1000 (top) and APM data - just focus on the BLUE pitch data traces. You can see that the APM data retreats from the correct value right away - the same thing happens with roll data. This is still 2.6.5 data with the gains for GPS and accel corrections down in the .2 area

  • @Ralph Paul and Soren,

       Thanks very much for your expertise in trying to understand what I could do to make the APM pitch/roll attitude performance better! I am starting the APM with it level on the ground and disabling any further level even though I start and stop the Mission Planner logfiles before and after a 30 second test run. I have the UBLOX GPS and it is always tracking fine and I believe the magnetometer is enabled (this is an APM2.5 and I simply load the firmware (2.6.8) - no mods). I have the PARAMS (AHRS_GPS_GAIN) = .3 and AHRS_RP_P = .3. If either of you have any guidance as to setting these or other parameters, I would greatly appreciate it.

  • Hi,

    the gyros of the APM unit (MPU6050) are low grade and cheap. Invensense doesn't even provide data on "bias instability" in their datasheets nor advertise them for attitude heading reference purposes (unlike their new MPU3300 gyros which are getting close to tactical grade qualitiy) therefore one can assume that they are "low grade automotive" grade quality with bias instabilities of at least an order of > 100 deg/h or more which means that unless you use reliable additional information (sensors) your attitudes will drift off by this amount within an hour of use.

    One can use accelerometers, however they have biases too and you will need to address the kinematics of flight mechanics (e.g. coordinated turn) which are different than simply using the accelerometers to determine the direction of gravity (G1000 speak: "platform leveling" or "initial alignment" before take-off at stand still).

    To counter these drift effects one can use 3D magnetic information plus/or GPS plus optionally airspeed information and as they are correlated due to the aircraft motion, one can determine biases and drifts of individual sensors and correct the measured data. This is the know-how of companies selling small (MEMS) IMUs or AHRS (e.g. Garmin, iMAR, Xsens, SBG, Microstrain, SystronDonner, ...). However be aware any of these small unit will start drifting unless it has some absolute referenced information for determining corrections -- Note, another possible source is vision based information.

    The G1000 has an AHRS H/W unit (ARS77) of much better quality gyros, accelerometers and a better 3D-magnetometer (GMU44) and an aviation proven attitude heading reference S/W. Additionally the cost of the G1000 is > 100x as much as the APM therefore one should expect much better and reliable performance. If you look closely in the G1000 handbook, you will find that even the G1000 will flag "attitude invalid" if it doesn't have airspeed nor magnetometer nor GPS information.

    Nevertheless, constant attitudes fading back to zero within 5s sounds like a serious bug in the APM S/W.

    Note,

       - 100kts = 51.4 m/s = 185 km/h nor 30 degs of bank are too far out of range for rc planes and UAVs.

       - Did you have the magnetometer and GPS activated in the APM, did you perform any calibration with the APM.

       - Garmin recommends not isolating the GRU73/GRS77 with foam, instead they must be mounted firmly to the structure, "close to level for cruise speed" and properly aligned with the aircraft axes.

    Cheers

    Ralph

  • Hi,

    I guess your full-size plane takes longer time to accelerate, and end at a faster speed than a model does when put into a dive.

    At the start of the dive, the gyros will detect the rotation.

    During the dive, the APM will see a net acceleration (wrt. gravity) that is composed of forward acceleration and upward (opposition to gravity by lift). Its mounting plane is normal to that. On other words, for quite some time it will see the same as if it were lying on a desk on the ground.The gyro integrals will be pulled towards zero.

    When the plane starts to reach its terminal velocity in the dive, forward acceleration will stop and the APM should start to see an acceleration straight up again (up in global terms, not airframe-local).

    So the accelerometer estimate is incorrect for some time. Try find the parameter AHRSRP_P in Advanced Parameter List and see how far you can turn it down before gyro drift gets significant... If you can put the APM in an environment with a very stable temperature - and let it warm up to operation temperature before flight - maybe you can take it even further.

    With roll, it is pretty much the same situation - if you fly graceful coordinated turns and a tennis ball on the floor of the plane will barely move, then estimation by acceleration will think everything is perfectly level.

    Anyway that is my guess.

    Regards

    Soren

This reply was deleted.

Activity