I built an hexa in order to have additional motors and be able to handle a motor/prop failure, I tuned my copter for perfect stability and quite decent response (a little too smooth maybe). First time a motor failed, the whole thing flipped and smashed on the ground. Luckily I was one meter high and with no camera on it.
I'm entering now deeper into PID regulation to achieve the failproof behavior I was looking for at the beginning so, what I want to discuss with you is where to tweak.
From my understanding the RATE_P parameter balances the difference in inclination speed (regarding pitch for example) and the one required (acting like an ideal STABILIZE_D parameter). So RATE_I would ack as a steady state error compensation for inclination speed and could be a good candidate for failproofness.
Am I totally wrong, or does it make sense?
Has anyone done any tests or knows something more about the topic?
I might be doing some test as soon as I find time to make a safe testing setup and the ability to turn off a single motor.
The PIPI loop is like this:
Angle of copter * Stabilize P = desired rate
(actual gyro rate - desired rate) * Rate P = output
output is converted to PWM and sent out to the motors.
We have a basic crash avoider that reduces the speed of the opposing motor. if the required PWM goes past 100%. I'm sure we could do more if your up for some investigation and testing.
Interesting!! So, if the crash avoider is working good in dealing with channel saturation, the RATE_I parameter might be really effective in stopping the flip (more than RATE_P or STABILIZE_I) without affecting too much the behavior when no failure is present (as STABILIZE_I would do).
Complex story to analyze stability, though.
Thank you Jason
I hope to do some testing asap or a simple simulator or excel page to help understanding the behavior...
If anyone finds it helpful attached is the log of the crash.
Ok, I did some tests and got some results.
I have 90 MB for 25 videos of tests on different PID settings so whoever wants them can have them (or is there anywere I can upload them)... The RATE_I parameter is the one that does the trick but pretty high values are needed and can lead to instability. Against my odds the STABILIZE_P doesn't play such an important rule and actually it does seems that the less STABILIZE_I the faster the copter recovers... which doesn't make sense. I also tried negative STABILIZE_I which gave me good results... what does this means? How are negative values treated?
Also the whole recovering thing looks more difficult when higher throttle is applied.
The ideal settings for my hexa are:
Thanks for sharing this, Augusto. My Hexa (with 4 cell Lipo) reacts very nervous at the moment, so I am thankful for every hint.
No problem. Just be careful 'cos I never tested such a high RATE_I in flight. I was flying with RATE_I = 0 and today I tied 2 of the 6 arms on a bench and did the tests on the RATE_I. As soon as rain stops I'll try flying.
I'm flying a hexa and I have very different PIPI values. StabP is more like 1.6 and a very high rateP. I also have some hig I values (like 0.3). This way a have a stable platform not too nervous and without oscilations.
I will try to download from the APM( I restore my pc and lost all config stored). It's a mk hexa xl with Jdrones 30 esc and Jd 880 motors (12x4.5 props)