[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4789: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3916)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4791: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3916)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4792: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3916)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4793: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3916)
AutoQuad Forum • View topic - Dangerous divergence: FIXED and understood
Page 1 of 10

Dangerous divergence: FIXED and understood

PostPosted: Tue Feb 12, 2013 12:18 pm
by afernan
When flying horizonlaly at maximum speed, if you suddenly release the stick, the copter can enter in a divergence oscillation that ends with a strong crash.

I´ve experimented already several times trying to tune PID´s to avoid it. See attached videos showing what I´ve explained. Those are real logs from real flight crashes. This happens mainly with light copters, since they are more sensible to this effect.

_________________________________________________________________
UPDATE: Problem fixed (see more details at page 8)

A short abstract is below:

The problem occurs due to a lack or loose of tilt control after reaching the CTR_MAX = 300pwm in a hard manoeuvre.

This is directly link to the mixing table used. When using 50% based table, the problem is increased since we need higher control levels, and so we reach the ctrl_max=300pwm earlier.

The issue has been solved doing two things (for my particular copter: light quad in X mode that showed big divergence issue):

1.- Using a mix table 80% based (instead of 50% from wiki)
2.- Increasing the CTRL_MAX = 400 (default =300)
___________________________________________________________________

My understanding
When the Pitch or Roll stick is released from a big angle, the copter will try to reach the horizontal position strongly. This happens correctly when there´s no horizontal speed.

Imagine we are flying with the maximum angle we´ve defined, let say 30º. The copter maintains a high horizontal speed. If we release suddenly the stick, It will try to recover the horizontal, but it overshooting strongly, swinging in a divergent way.

This should´n happen (not seen in other platforms like Arducopter or KK). It should reach the horizontal angle, keeps it and continue flying (with the inertia) until stop in the air.

PID´s adjustements

I´ve tryed many things:
- reduction of max angle. I´ve reduced the CTRL_FACT_PITC & CTRL_FACT_ROLL a lot (0.3). This impose a max angle = 750 x 0.03 = 22º (very small). This works perfectly while not high horizontal speed. In high speeds the divergence comes again in the same way explained.
- reduction of CTRL_TLT_ANG_P (=10, default=60). This slow a lot the stick movement and help to solve the problem, but the copter is very lazy. Even, if you climb high and then reach a high speed flying down and release the stick, the issue comes again.
- similar effect reducing CTRL_TLT_ANG_PM from 150 to 100. Not very effective.

Preliminary Conclussion
If you fly smooth and slow: NOT problem.
For a bit more agresive flight: This can be a big issue. I´ve got several hard crasses (se attache image) since the copter normally capsizes and hit the floor upside-down.
I don´t think this can be solved only with PID adjustement, but we need some code action. I continue investigating.

Hope this help

Angel

Re: Dangerous divergence issue: NOT YET SOLVED

PostPosted: Tue Feb 12, 2013 12:34 pm
by Max
Hi Angel,

Sorry to hear about the problem, and that's a sad picture you have there :(

Perhaps you could post more about your setup, or link to a post describing it? I've flown my quad very aggressively in PH mode and never experienced the kind of oscillation you're describing when releasing the direction stick (and the quad isn't even perfectly calibrated).

-Max

Re: Dangerous divergence issue: NOT YET SOLVED

PostPosted: Tue Feb 12, 2013 1:19 pm
by bn999
I've hear of this a few times now. This condition can probably be solved with PID tuning, but first you should verify that your ESC's (if not ESC32) are properly calibrated and your motor / prop combination is not over or under sized for your craft. Take a look at the log immediately before and during the incident to check these two things looking for motor output saturation.

If all of the above are ok, then try reducing CTRL_TLT_ANG_IM. If the I output is so high that it swamps the P output, you could end up with an divergent oscillation in extreme conditions. Reducing CTRL_TLT_ANG_P may exaggerate the problem as there is less P to overcome a large I.

One other thing to be considered is to reduce the TLT_RTE_D. This term fights changes in tilt rate. When you have a very fast tilt back to level, this term can cancel some of the TLT_ANG PID's attempts to slow down - enough to where there is an overshoot.

Re: Dangerous divergence issue: NOT YET SOLVED

PostPosted: Tue Feb 12, 2013 3:41 pm
by afernan
Thanks Bill & Max for your comments.
The copter is a quad (see attached image), 0.8 Kg (w/o batt) , T-Motor 2212, 10x4.5 props and ESC Simon-K.

I have also ESC-32 that I can substitute to see the effect. The combination is quite standard (equilibrated) for me. Used from long time ago in this and other FC´s like Arducopter and others working very well.
I´ll check what bill suggest:
- motors saturation just at the moment of the oscillation
- About the I term, it make sense that a high value can swamp the P output. So, keep high CTRL_TLT_ANG_P and low the I term.
- Also I´ll try reducing the TLT_RTE_D a bit, as sugested

Angel

Re: Dangerous divergence issue: NOT YET SOLVED

PostPosted: Tue Feb 12, 2013 5:02 pm
by kinderkram
Dammit - that's really sad and frustrating!
Is there anything else damaged than the dome? I hope the precious have survived...

Norbert

Re: Dangerous divergence issue: NOT YET SOLVED

PostPosted: Tue Feb 12, 2013 7:56 pm
by afernan
The FC is OK.
This crash was fully upside down, so I´ve broke all 4 propeller, ground shield (resoldered again) and dome.
This semiesferic dome is really effitient to protect the FC because semiesferic shapes has a big strength in compression. It literally "exploded" in the shock, but saved the important!
Angel

Re: Dangerous divergence issue: NOT YET SOLVED

PostPosted: Tue Feb 12, 2013 8:56 pm
by phynix
I feel really sorry for you.

Im going to use almost the same setup for a test of the AQ, so thank you for reporting! Maybe i should think about a similar solution for protecting the electronics ^^. Can you give an update when available whether changing the PID values does avoid such a behaviour? I had to send back my AQ because it didnt work ...

Sören

Re: Dangerous divergence issue: NOT YET SOLVED

PostPosted: Tue Feb 12, 2013 9:11 pm
by skew
afernan, been there and done that I have a trashcan full of broken arms and props to prove it. I have pretty much the same issue changing PID's did not seem to help the only thing that mostly fixed it was changing CTRL_FACT_PITC & CTRL_FACT_ROLL to .4 now about the only time it will over correct and crash is if the wind is really strong 15mph+ and Im going in fast flight and stop or change direction really fast. Its almost like it revs the motors too quick and too much and corrects too much of an angle. My esc's are calibrated via receiver all 4 motors start and stop at same time and my quad hovers perfect at 700 on throttle exact.

Re: Dangerous divergence issue: NOT YET SOLVED

PostPosted: Tue Feb 12, 2013 9:25 pm
by LPR
skew

I struggled with the same problem and had to empty my trash can a few times. Now my quad and octo fly very aggressively and stop right on top of the waypoint no over shooting.

After much changing of the PIDs I when back to the default values and only adjusted the tilt rate D.
Lowering D lets the multi tilt faster so it does not over react and start to oscillate over a waypoint.

If D is too low you get oscillation in hover and too high of D and the multi tilts too slowly.

I set tilt rate D a little higher than where I start to get oscillation. I keep CTRL_FACT_PITC & CTRL_FACT_ROLL set to default and Tilt Rate D = 5000 for the quad and 5800 for the octo.

Larry

Re: Dangerous divergence issue: NOT YET SOLVED

PostPosted: Tue Feb 12, 2013 10:18 pm
by kinderkram
To me it sounds like lowering TLT_RTE_D is the primary key.
Going back to defaults and trying to fight that particular problem might be the best strategy like Larry wrote.

Will make this thread sticky and add a warning to the Wiki once we agree how to address the problem.
We mention to increase the value to fight oscillation but we neither warn that you can overdo nor that these settings cause a crash if they're too high by default for that paticular airframe.