FW3.1.3 - Switch to Loiter = CRASH!

Copter Specs:

APM 2.6: FW 3.1.3

Frame Type: Quad (X)

Motors: T-motor 4008-18 380kV

Props: APC SlowFly 14x4.7

ESC: Castle Creations Pheonix Edge Lite 50 Amp

LiPo: 6s 6000mAH 30C

Recently upgraded to firmware version 3.1.3 and went out to fly yesterday in moderate winds. The copter has not gone through any AutoTune yet but is flyable in Stabilize and in Altitude Hold (however it is not so smooth in this mode). After noticing that the copter was very unstable in GPS (rolled, pitched and oscillated) when left in position I performed another Magnetometer (Compass) calibration in the field and then flew again.

This flight went as follows: Took off in Stabilize. Switched to Altitude Hold, flew for a few seconds and then switched to loiter where immediately the copter flipped and crashed.

Can anyone tell me what happened here? I would greatly appreciate the help!

Kind regards,

Oliver Volkmann

2014-04-25 16-37-51.log

2014-04-25 16-37-51.log.gpx

2014-04-25 16-37-51.kmz

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

Join diydrones

Email me when people reply –

Replies

  • Developer

    By the way, I've had only one copter that I failed to get flying well with Arducopter.  That was a while ago and I know more now but it was a large quad with enormous propellers, a 6S battery (good) but very low KV motors.  I'm pretty certain now that the issue was the slow response of the ESCs because the next generation of those copters (linked in my response above) are all just as big but which use different ESCs all fly great.

    • Hi Randy,

      Just curious,  I'm building large quad with > 26" prop, Hobbywing Platinum ESC 30A (http://www.hobbywing.com/product_show.asp?id=285) and 135kv Tmotor.

      The esc datasheet: Refresh rate of the throttle signal: 50Hz to 432Hz

      Is the ESC good enough for APM 2.6 with 3.1.3v Arducopter ?

      or do you have any esc recommendation?

      Thanks.

      http://www.hobbywing.com/product_show.asp?id=285
  • Developer

    The problem may be the ANGLE_RATE_MAX parameter.  It looks a bit low at 9,000 the default is 18,000.  There seems to be error in the parameter descriptions which say it's valid range is 90,000 to 250,000...so I'm left slight unsure what it should be but I'd recommend trying the default of 18,000 and see if that makes it better.

    ANGLE_MAX is also 5000 which means the vehicle can lean to 50degrees.  On a big copter, I'd recommend no higher than 3000 (30degrees).  Top speed will still be very high but it'll be a bit more manageable especially during manual flight.

    The copter is very powerful indeed, hovering at about 32% throttle.  Rate Roll/Pitch P values of 0.06 ~ 0.08 sound find with that much power but Stabilize Roll/Pitch P values of less than 4.5 doesn't sound good.

    I think leaving the Loiter PID at 1.0 (you have it at 0.7) is probably best.  Early on in the AC3.1 release we recommended reducing it to 0.5 but generally that doesn't help anything.

    With a copter that hovers at such low throttle it doesn't leave a lot of room at the bottom end of the scale, you may find that the vehicle better with more weight (i.e. batteries) or it may help to reduce the THR_MIN from 130 down to 100.  It's almost never good to reduce it below 80 because then you run the risk of motors stopping in flight as you hit the ESC's lower dead zone.

    Below are some graphs of the actual roll ("Roll" in green) vs the desired roll ("Roll In" in red) and we can see deviations of 10+ degrees at time.  The pitch is perhaps even worse with pitch deviations of 15 degrees.  What's probably happening is a sudden lean angle request of 10 ~ 15 degrees from the navigation controller can cause the copter to flip. When you're flying it manually you're being extremely careful not to put in fast inputs but the autopilot is not being so gentle.

    Arducopter can definitely handle large copters though (video1, video2) so unless the response from the ESCs or motors is unusually slow it should be possible to get it working. 

    3701721119?profile=original

  • I had a lot of crashes on two of my pixhawk equiped quadcopters - both around 500 class, not enormously powerful, but with some weight towards the extremities. After a auto-tune they behaved quite okay... actually felt fairly locked in in stabilize mode.. however a brief spurt of roll or pitch back and forth a few times would seemingly unstabilize them.. resulting in a complete flip in the worst case, or losing altitude badly before sometimes regaining attitude control. The worst however was coming into loiter or during auto mission when it hit a waypoint... then it would quite strongly react leading to a loss of stability again. Video.

    Anyway, it turned out that a few things were a bit wrong. Namely the P and I values were too low.. despite feeling okay at the controls, I was able to increase them up a LOT before getting wobbles. There was simply not enough power (P) nor error correction (I) to overcome strong oscillations, and I_MAX needed to be allowed to wind up a lot more, changed from 500 up to 3000-4000....  I also helped reduce the rate of attitude changes being requested by reducing ATC_RATE_RP_MAX and ATC_ACCEL_RP_MAX. I reduced RATE down to half of the default, 90deg/s instead of 180deg/s. It could probably go lower.. but it's flying both waypoint and loiter much more reliably now.

    Anyway. Good luck! It's very frustrating watching your quadcopter fall out of the air for seemingly no reason, or at least a self induced one due to fast attitude change requests.

  • 3701720140?profile=original

    • Oliver, I have similar issues with my quad on larger props.

      Pixhawk
      Turnigy Talon 550mm frame kit with larger plates so its 580mm (very similar in size to the Turnigy HAL, but much ligher).
      NTM 3536 1100kv
      APC 12x4.5MR
      Q-Brain 25amp 4in1 ESC
      A-Spec 4500mah 3 cell

      I had very view issues with this on more flexible 10x4.7 props, Had rock solid loiter performance with only a slight adjustment in Rate P. 
      I went back to defaults when I went to the larger/ stiffer props and tried to tune from there.  I adjusted Rate P  down to .12 and it flew well in Alt hold and stabilize for several packs. Only noticeable issue was the oscillation through the prop wash while descending quickly in stabilize.
      It lasted about 3 seconds when I tried loiter...  rolled back and forth violently, a quick flip to stabilize wasnt enough to recover it, hit the dirt pretty hard.
      I rebuilt and decided to do auto tune, I tested the rebuild for about 5 min in alt hold, put a fresh pack in and went to try auto tune. It lasted about 3 of the quick rolls and then went crazy again and into the dirt just like with my switch to loiter.

      We've had crummy weather but I read a ton and decided my Stabilize P at 4.5 is way too much for this.  I left my Rate P at .12 and put Stabilize P on my ch 6 knob.  I have knob midpoint ~3.75 and am going to start from there.  So I too would benefit from a "two year old explanation" of the relationship between those.  I can post files or graphs if people are interested but I don't want to hijack the thread for my tuning issues... Just seems like its somewhat related.

  • Hi Everyone,

    So indeed this crash seems to have been from a loose motor arm. I have since tightened it but have made the following discoveries which I hope will somehow help someone to help me figure out what is going wrong with loiter on my quad. (Can you tell I'm begging yet?)

    AutoTune changed my parameters as follows:

    Stabilize P + R: 4.15

    Rate Pitch and Rate Roll to:

    P: 0.085

    I:  0.085

    D: 0.005

    Since the autotune, I reduced the Stabilize P and R from 4.1 down gradually trying to remove this sudden extreme pitching and rolling that would start when I gave quick horizontal stick movements (ie. forward, backward or left to right really fast) while in Altitude Hold and seemed to always end in a crash until I figured out to fly higher and switch to Stabilize Mode to eliminate whatever part of the system seems to be over-correcting on its own corrections over and over again. The ride gets quite violent.

    My new rates came from experimenting by lowering first the Stabilize values from 4.1 to 3.3 to 2.5 to 2.2 to 2.0. Each time I lowered them, the copter seemed to calm down a bit and not go into these violent rolls and pitches. After seeing no difference between 2.2 and 2.0 and doing a bit of reading online (although this whole tuning thing is really confusing) I came to the conclusion that perhaps I should lower the Rate P and Rate I value a little since it was adjusted from 0.06 to 0.085 by the Autotune procedure.

    The new PIDs are as follows:

    Stabilize P and R:   2.5

    Rate P and Rate R P Value:  0.075

    Rate P and Rate R I Value: 0.075

    Rate P and Rate R D Value: 0.005

    These new settings allow me to fly quite smoothly in both Stabilize Mode and Altitude Hold Mode. One of my tests to make sure it is stable is to rapidly move my lateral movement stick rapidly from one direction to the opposite repeatedly. If the copter stays calm and does not continue the movement by itself with increasing angles after I let go, I consider it a good. This is now the case with my platform... but here is the kicker:

    AS SOON AS LOITER is engaged, things take a dramatic turn. It sits quite nicely in light wind (< 3m/s) but as soon as there is a gust or a change in direction, it pitches and/or rolls dramatically like a child on a swing with the hulk pushing! I can fly the platform in loiter however as soon as I let go of the stick, this swinging starts taking place. One thing that I was able to repeat quite consistently is when flying forward in Loiter, it would not fly smoothly but rather more like a bumble bee, pitching back and forth and sometimes, especially when letting go of the controls, pitch really far back and then forward and start behaving like a pendulum. It gets bad enough that I have to immediately switch out of Loiter to Stabilize to get it to calm down. Pitch in VS Pitch does not seem to be consistent while flying in Loiter.

    A compass calibration was performed (my GPS/MAG combo is mounted about 10cm above the electronics and off to the side of my platform) and the Compass Learn feature is enabled. When I instruct the platform to fly forward ONLY while in loiter it "crabs" off to the left consistently. The heading does not match the course even though the GPS arrow is pointing to the front of the craft (x configuration) parallel to the APM which is also mounted correctly. The red and the black lines in MP confirm this.

    Please find attached to this post the log files from this last flight in which this behavior is observed. If anyone could help me get this sorted out, I'd be extremely grateful!

    NOTE: The attached log files are with the STABILIZE P and R values at 2.2. I have since increased them to 2.5 will post those logs next.

    2014-04-26 15-43-28.log

    2014-04-26 15-43-28.log.gpx

    2014-04-26 15-43-28.kmz

    https://storage.ning.com/topology/rest/1.0/file/get/3701719971?profile=original
    • Turn off the compass learn setting.  As mentioned somewhere else, make sure you have the declination proper.  Also check the HDOP numbers before taking off.  If the pre-arm checks are disabled you may have a high HDOP and if the compass if off as well you will have problems.

    • Developer

      Yes, compass learn (i.e. automatic learning of compass offsets) should certainly always be off because the motor interference on copters often messes up the learning algorithm.  AUTODEC (automatic lookup of declination) can be left on though.  I've actually never heard of a problem of the auto declination causing problems except in the case where someone has disabled it and then forgotten to update the number when they moved to a new location.  There probably have been cases but I think it's very rare.

    • Hmm, nice to know that the fatal problem was mechanical, as I speculated - a lot of times that's overlooked as we all tend to bury ourselves in the electronics.

      I notice now that yours is a really big quad (well, by most standards). Something I learned the long hard way with my now decommissioned "heavy" hex is that a great deal of the APM firmware and software has evolved to "fit" (as it were) a medium-size medium-power quad. It seems that the further one goes from the dimensions/configurations of, say, an Iris, the less straightforward a lot of tuning issues become.

      I suggest that you try to find someone with a quad similar to yours and compare parameters. Also, I've been hearing that 3.2 will be more accommodating for non "standard" birds, I myself am waiting for that release before bothering with some minor tuning issues on  my current "dead cat" pattern slightly up-powered quad.

      Otherwise, you might double-check that you selected the correct configuration on firmware upload.

      But I think the root of the problem may be that it just isn't tuned for its size.

      Sorry not to be of more specific help.

This reply was deleted.