Developer

ArduPlane 2.68 released

I've just released ArduPlane 2.68

This key features of this release are changed in the MPU6000 filtering, and several bug fixes (including HIL fixes).

The changes are:

  • allow for remote reboot on APM1
  • fixed secondary aileron and manual servos in failsafe mode (so if the APM software dies, you still have secondary aileron control in manual)
  • added new THR_PASS_STAB option. This is for fuel planes, so you have direct throttle pass through when in stabilisation modes (STABILIZE and FBWA). This is useful if you have a throttle cut switch that drops the throttle below RC3_MIN
  • fixed THR_SLEWRATE option, which had previously not been functioning correctly. Also improved docs for this option.
  • internal changes to new AP_InertialSensor code from Randy
  • fixed HIL support for both attitude and sensors HIL.
  • fixed dataflash logging in HIL mode
  • added new INS_MPU6K_FILTER option, defaulting to 20Hz. This controls the filtering frequency of the gyros and accels and should help reduce the effects of vibration on attitude estimation. It made a huge difference on my HotDog, which has the most vibration I've ever seen in a plane.
  • fixed the build of a lot of the library example sketches
  • fixed reset of I and D terms in PID library, ensuring it doesn't cause problems during auto takeoff

The MPU6000 filtering changes are perhaps the most significant. We previously samples the MPU6000 at 200Hz and set an internal filter of 98Hz. The ArduPlane code then averaged over 4 samples to get a 50Hz update to DCM. Here is a graph of the accelerometer readings on my HotDog with the old code:

hotdog-accel-filter-98.pngthis is rather extreme, as I've setup my HotDog with the APM2 directly touching the fuselage close to the nitro engine. I wanted it to vibrate a lot to test the filtering, and it sure does! A value of 1000 on that graph is 1g, so we're seeing vibrational noise of about 6g in this plane.

I now fly my HotDog with INS_MPU6K_FILTER set to 10, which applies a 10Hz filter inside the MPU6000. We also run the MPU6000 at a sample rate of 50Hz, which means no averaging needed in the APM code. Here is a graph of the accelerometer readings now:

hotdog-accel-filter-10.pngquite a difference! The deviations are now real (from me flying loops and rolls) and not just dominated by noise.

It actually flew OK with the previous code, as the DCM code is quite noise robust these days, but I do prefer making DCM work less hard, and it will help it to reduce aliasing and recover from attitude errors faster.

You can see graphs of other filter settings and also of the gyros for the same plane here. I think the default of 20Hz will be the best for most planes, but if you have a lot of vibration you can try 10Hz, like I now use for the HotDog.

Happy flying!

Cheers, Tridge

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

Join diydrones

Email me when people reply –

Replies

  • Hi friends, I would like an answer, always hear talk about calibrating the compass offsets X Y Z, but then .. What's that for? and what is the correct way to calibrate? because I already tried to calibrate with the logs through flight, and every time this show a different value.

    I would like a clear answer about it, and that would result in a good calibration

  • hire my log files..

    using sw condor and set PID from Djalma C Jr

    test for stabilizer,FBW from flight mode on remote

    and RTH,loiter command from AMP planer

    sw_rute.kmz

  • Hi Guys!

     

    Can someone give an attention? is very important!

     

    thanks!!!

    http://diydrones.com/forum/topics/camera-stabilizer-pan-tilt?commen...

  • altitude change problems in home mode.

    and I noticed when I give problems changing altitude of 100 m to 200 m, the plane begins to climb but angle exceeds its limit to make a loop. this occurs when there is wind of 20 km / h. what would be the parameter to adjust?
    any explanation for this behavior?

    2013-01-06 15-26-17.rar

  • Hey

    I use an APM1 for my Plane. (FPV-EPP)

    Now i read, that there is a new firmware for the Mediatek GPS and the PPM Encoder.

    Is the new 1.9 Firmware from the GPS compatible with the actual APM1 Arduplane Code?

    And should i update my PPM Encoder, if i fly with a MX-20 from Graupner?

    I was an long time not in the forums, so i dont know, what actual is "the newest" Info.

    Hope u can help.

  • Moderator

    This version of ArduPlane still has a feature, left over I think from the old legacy versions and that is it applies full aileron and elevator deflections for 1 second on boot-up.

    This can be catastrophic if, at low level, the APM reboots in flight for whatever reason as the plane will, for that one second, roll and pitch violently. I had this happen recently after replacing a faulty elevator servo with a better, different type but the new one drew more current causing a brownout after the BEC voltage dipped too low, thankfully I had enough height and was able to regain control before hitting the ground.

    Yes, I now have a separate UBEC but is this potentailly dangerous aileron/elevator behaviour on bootup really neccessary?

  • Hi Guys,

    In this version as in previous, Condition_Change_Alt not working.  I make param 1 15 cm/sec,

    and param 2 an altitude (say 600 ft) which is supposed to be the end condition.  I write the WPs.

    When I read the WPs back, it keeps the 15 but loses the 600 (it says 0 instead).

    I'm using ArduPlane HIL for simming in Xplane 10.

    Is there a way to clear the memory of the Ardu chip, and then re-load everything fresh?

    Or is there another fix?

    Thanks!

    --David

  • Moderator

    I recently tried some long distance flights with FPV / APM and a couple of things regarding the failsafe protocol that I have discovered that I'm not entirely comfortable with.

    I had a few failsafe occurances while in Stabilize, FBW-A and AUTO, (VTx interfering with RCRx). In all cases the failsafe worked correctly however some shortcomings in it's implementation became apparent.

    First: after one second of lost signal the APM goes into circle mode, however in one instance I lost a fair bit of height, so I really think this should be changed to loiter so that height is maintained as well as position.

    Second: After 20 secs the plane will RTL however 20 secs feels like a very long LONG time in that situation, 10 secs would be much more appropriate (although if the plane was in a loiter and not loosing height max 15 secs would be probably be OK).

    It would be really great if one could choose the modes and duration of the recognition periods.

  • I have just got HIL working for the first time. Like everyone else no airspeed reading. No matter what I do the plane will fly at about 23m/s except in decent with throttle low.

    I have loaded other aircraft config files and they all do the same. The whole point was to see the affect of PIDs but nothing will change the speed this HIL (Rascle) flies!

     

  • Moderator

    How do I get "targetalt" to ramp up or down quicker?

This reply was deleted.

Activity

Neville Rodrigues liked Neville Rodrigues's profile
Jun 30
Santiago Perez liked Santiago Perez's profile
Jun 21
More…