Possibly a bug at librepilot
« on: December 12, 2016, 09:08:42 pm »
Hi,

I have my quadcopter with CC3D and I configured Openpilot with MaxAngle 80, CruiseControl and Angle Rate of 450 degree/sec.

The problem is this: I was flying and I was really high and I reduced throttle but I thought my quad was not getting down so I turned off the throttle in the air and left my drone fall for 4 or 5 seconds. During that, my drone fliped once or twice when falling and when I applied a high throttle to stop the descent the drone kept falling and falling and hit the ground. I am very sure when I applied a high throttle my quad was upside down and it kept that way till hit the ground! Which means that my quad was not responding to throttle when upside down, I could see the props spinning not very fast when it hitted the ground and almost everything was destroyed.

Has anyone had this problem before? I am a beginner and I was using ATTITUDE mode but I have a switch to change to RATTITUDE when I want to make flips, but in the case above I was in attitude mode all the time, I am pretty sure of that.

hwh

  • *
  • 1018
Re: Possibly a bug at librepilot
« Reply #1 on: December 12, 2016, 09:44:20 pm »
... I configured Openpilot ...
Are you running the old OpenPilot from early 2015 or one of the newer version's released by LibrePilot?  There are literally hundreds of bugs fixed and things changed between them.

Your description of props spinning slowly as it hit sounds like they were just freewheeling because of the air going past them.  Maybe it disarmed somehow.

Re: Possibly a bug at librepilot
« Reply #2 on: December 12, 2016, 10:10:11 pm »
I am using LibrePilot software in the latest version. No, my quad did not disarm, it's set to disarm after 60 seconds of zero throttle. I think that there is something with cruise control that turns off props while inverted but if my quad has no rotational inertia to complete a loop it keeps the upside down position. I really think an expert hobbyst could explain this better.

f5soh

  • *****
  • 4572
    • LibrePilot
Re: Possibly a bug at librepilot
« Reply #3 on: December 12, 2016, 10:38:35 pm »
You should enable ASWA (Always Stabilized While Armed) to avoid issues.
https://librepilot.atlassian.net/wiki/display/LPDOC/Always+Stabilized+When+Armed+mode+setup

Re: Possibly a bug at librepilot
« Reply #4 on: December 13, 2016, 12:55:30 am »
@f5soh THANKS A LOT! THAT LOOKS PROMISING!

BUT I have a question: Cruise Control will still turn of motors when the drone is upsite down? Cause that's the default behaviour of cruise control.

Re: Possibly a bug at librepilot
« Reply #5 on: December 16, 2016, 06:01:33 am »
Cruise Control slows the motors down to 5% when inverted.  It doesn't stop them unless you have your motor neutrals set too high or you have the throttle stick all the way down.

As long as the motors are commanded to spin (throttle above the bottom) LibrePilot has code in it that will increase the throttle how ever high it needs to be to perform control and stabilization.  If it needed to run one or two motors very fast because it needed to turn upright it would do it even at 5%.

mr_w

  • *
  • 207
    • LibrePilot
Re: Possibly a bug at librepilot
« Reply #6 on: February 07, 2017, 07:20:39 pm »
@batata003

what was the outcome of this? Did you find out what was causing the copter to behave like that?

I have seen also two different copters, both running 16.9, one is cc3d and another is revo_mini, trying to do flip (pitch axis, forward), and at low throttle, completely inverted, copter loses control, there is no throttle response until something happens few seconds later. Sometimes if it is hight enough, it is possible to regain control, but more often it results in crash. I am sure this is also not due to disarming, neither due to board rebooting. It also appears that this doesn't happen for rolls.

This behavior is reproducible, but I haven't got chance to do flight log yet.


Re: Possibly a bug at librepilot
« Reply #7 on: February 08, 2017, 03:25:27 am »
This is not fixed, resolved, or understood.

It may be partially caused by quads with improperly set motor neutrals.  It is assumed that 5% throttle will actually run the motors and if that is not the case, it may be an aggravating circumstance.  The Cruise Control default is for inverted motors to have 5% thrust, which should be fine for stabilization.

The best reason I have come up with is that windmilling props generate more drag than stopped (or slow) props.  Stop the props so that it could get upside down and let it fall a few seconds, then start the motors up whe upside down.  When completely upside down, and leaning a little left should pull hard left, which will actually generate roll right because the faster props will cause more drag.  As soon as it get past inverted the motors try to pull it the other way.  This has the effect of trying to stabilize it level, but inverted.

A test could be made for this.  Rotate roll 90 degrees in Rotate Virtual so that a 90 degree right bank is considered level.  Mount the quad on a pole with the rotating pole being a roll.  Hold the quad out the left side car window, throttle off, in the position it thinks is inverted (90 degree left roll) which has props blowing with the air flow.  Drive at about prop pitch speed.  Give a little throttle.  It is just like it is falling inverted, including airflow.  Try again a different car speed to see if you can get it to stabilize inverted.

Re: Possibly a bug at librepilot
« Reply #8 on: February 08, 2017, 04:05:56 am »
In addition to motor neutrals incorrectly set, I believe that low RPM, low pitch quads (low pitch speed) would recreate this issue more easily if it is caused by the above explanation.

The quad that you say can recreate this issue: is it a low RPM, low pitch quad?  Say 1000KV on 3s, probably running 4.5 inch pitch for a max RPM pitch speed of about 18m/s or 65 kph.  Are the motor neutrals set correctly?  Do the motors easily start from a dead stop?

In the test mentioned in the previous post, it would be good for safety to run a low power, low RPM quad and further reduce the RPM by using a 2 cell pack instead of a 3 cell pack.  Also the quad on the pole should be balanced so that it doesn't favor any bank angle over another.

Re: Possibly a bug at librepilot
« Reply #9 on: February 08, 2017, 04:39:30 am »
I've tested this "in hand" several times with a weak quad on a reduced cell count battery, and it has worked correctly for me each time.  Using Attitude or Rattitude a little to the left if inverted and it pulls hard left toward upright.  Force it to a little right of inverted and it pulls hard right toward upright.  I confess to not having tested pitch much in this testing, just roll.

mr_w

  • *
  • 207
    • LibrePilot
Re: Possibly a bug at librepilot
« Reply #10 on: February 08, 2017, 11:12:36 am »
@cliff, the weather does not permit any testing now, but let me throw in some more facts -

Motors are cheapo readytosky 2204 2300kv running off 3S battery (pretty good one).
LP is configured to spin the motors even with low throttle when armed.
Always-stabilized is *not* enabled. Cruisecontrol is not used.
Props are 3 blade 5040, bullnose.
This happens in *Rate* mode.


Re: Possibly a bug at librepilot
« Reply #11 on: February 08, 2017, 12:26:59 pm »
Well that's good information.  I think until now the assumption by many is that CruiseControl was at fault for a bug in it's default setting of "reduce motors to 5% while inverted".

One more fact: I always tested with Revo class FC's.  Never with CC3D, and CC3D has different attitude estimation code.

I recall hearing about some strangeness with CC3D not handling inverted accurately, sounding something a singularity there.  I bet Laurent would remember more about this.

Is this with a Revo class FC or CC3D class?

mr_w

  • *
  • 207
    • LibrePilot
Re: Possibly a bug at librepilot
« Reply #12 on: February 08, 2017, 05:25:49 pm »
This is actually with both Revo and CC3D.

I have seen it personally happen on CC3D copter few days ago, and even have HD onboard video with some sound even, but no osd unfortunately.
With Revo, it happened last time a month ago, my friend claims the same situation - flip, and losing control while being inverted, and it wasn't the first time. That one ended up pretty much as disaster, falling from like 50 meters down to concrete floor. He was not able to regain control, and video was lost since recording process was violently interrupted. I *think* he was flying rattitude.

They both claim going very low throttle (maybe zero) while doing it, and having hard time recovering from there. I have never personally experienced this problem while flying - in fact, that CC3D one was mine before I gave it away, though I rarely fly even rattitude and stay clear of rate mode, due to my piloting skill level.


Re: Possibly a bug at librepilot
« Reply #13 on: February 08, 2017, 08:35:35 pm »
There was a version of firmware in one set of ESCs I have that was hard to start, but ran well once they were started.  When starting it in Attitude mode, I actually had to hold it level because the motors on the low side would be trying to start with a higher throttle setting and would not start.  I flashed the latest firmware and the problem went away.  Of course these ESCs would cause big problems if you ever stopped them once you were flying.

Do you think they have low throttle set to stop the motors?  Assuming they do, then in rate mode they might test for hard starting by holding some yaw while starting the motors.

Once motors are completely stopped, I can imagine a problem with falling.  If just one motor doesn't start it will drop.  Stabilization will turn that motor higher and the other motors lower, even at high throttle so it will look like you don't have control of throttle.  With the running motors running at all, the quad rotates faster in the wrong direction (or bank angle more to a wrong angle) which slows the running motors to minimum.

During ESC startup, I recall that ESCs first fire a fixed (effectively random since motor angle is unknown) winding during startup.  It fires it, then measures voltages to see if the direction is correct.  Only at that point does it know if it is starting up in the correct direction.  I would guess that a slowly (maybe backwards) spinning motor might confuse this.  All it takes is one motor not starting up.

There is a startup power setting in the ESC firmware that could be turned up in the ESCs, but I think you would have a higher risk of burning a motor if it is stuck in the grass.

I suspect that for falling stunts in Rate mode the thing to do is configure the motors to spin at zero throttle stick.  Even a little faster than normal slow speed.  That would be a good test to see if the problem goes away.

mr_w

  • *
  • 207
    • LibrePilot
Re: Possibly a bug at librepilot
« Reply #14 on: February 28, 2017, 07:52:34 pm »
Update - issue with cc3d has been solved in my case.

The problem was identified as: User Error

Original complaint was that he was not able to regain control after doing flip. But the real problem was that he was not applying enough throttle. Every time I tried to do similar thing, I could not reproduce the issue myself. Now he was watching what my fingers do - cutting the throttle completely, then pushing to max to quickly get it stable and climbing again. - He (my friend who complained) was really surprised and said - "Hey, but you are pushing the throttle so much!!"  :o .. well then, problem solved.

What I did after that is to help him configure steeper throttle curve, to help a bit with this.