TriFlight 0.5 Beta 3

@lkaino lkaino released this May 17, 2016 · 1275 commits to master since this release

Based on Triflight 0.5 Beta 2 (Cleanflight v1.12.0).

FLASHING THIS VERSION WILL FORCE FULL CHIP ERASE! BACKUP YOUR STUFF.

New features

Dynamic yaw output

On a Tricopter the yaw output is based on the servo angle and the speed (thrust) of the tail motor. Dynamic yaw output takes the motor speed into account, increasing yaw authority on low speed and decreasing it on higher speeds. These features replace the old YAW TPA.

Related CLI parameters:
tri_motor_acceleration
Motor acceleration from min throttle to max throttle (and vice versa for deceleration) in seconds. Default is 0.18 (180 ms). The speed is used to calculate virtual motor speed feedback.

tri_dynamic_yaw_minthrottle
Dynamic yaw gain when tail motor is spinning at min throttle. Default is 290 (%).

Example values:
100: Dynamic gain disabled. Yaw output is same as in mid throttle.
150: Yaw output at min throttle is 50% greater than on mid throttle.
300: Yaw output at min throttle is 300% (3 times) greater than on mid throttle.
Values between mid and min throttle are linearly interpolated.

Tuning tips:
To gain more low throttle authority, increase the value. Remember that there's a limit on how much yaw can be produced at min throttle. Extremely high values reduce the resolution of PID output and causes oscillations.

tri_dynamic_yaw_maxthrottle
Dynamic yaw gain when tail motor is spinning at max throttle. Default is 100 (%). This is the opposite of tri_dynamic_yaw_minthrottle, it reduces the yaw output at high tail motor speeds. It's possible to increase it, but usually not preferred. By default this parameter has no effect as the value is 100 %.

Example values:
100: Dynamic gain disabled. Yaw output is same as in mid throttle.
75: Yaw output at max throttle is 25% lower than on mid throttle.
50: Yaw output at max throttle is 50% lower than on mid throttle.
25: Yaw output at max throttle is 75% lower than on mid throttle.
0: 100% reduction of yaw output at max throttle. This means no yaw output at all.

Values between mid and max throttle are linearly interpolated.

Tuning tips:
Reduce the value if you are experiencing yaw oscillation at higher throttle values.

Motor acceleration correction

When a motor is accelerating or decelerating, the change in torque forces the copter to turn on yaw axis. On a tricopter where there's an odd number of motors this is visible on rapid throttle change scenarios. When motor is accelerating it forces the copter to rotate on opposite direction. When it's decelerating it forces the copter to rotate on the same direction. Triflight estimates this added yaw error based on the virtual motor model (see tri_motor_acceleration) and a configurable gain.

Note! See the post about a known issue in this feature in the end of the release notes. Please be careful when using this. If you're not interested in rapidly cutting throttle, please set the related CLI parameter to 0.

Related CLI parameters:
tri_motor_acc_yaw_correction
Gain to correct the error in yaw generated by accelerating/decelerating motor. Default is 6. Value of 0 disables the motor acceleration correction.

Tuning tips:
Tail motor must turn CCW. If copter turns CCW when throttle is dropped, increase the value.

Changes

Thanks to @Bengt-M and @pqueiros for helping with these!

  • New default tune from Dawid Windestål. The default tune is for Mini tricopter with EMAX 2300KV setup.
  • Support for upcoming RCExplorer integrated F3 controller.
  • Tail tune thrust factor calculation simplified.
  • Unarmed servo setup automatically saves the values when speed calibration is done (pitch stick is pulled down). It saves even when there is no feedback signal.
  • Tail tune mode turns green in configurator when activated.
  • Virtual servo calculation fixed. Much better experience for users without servo feedback cable. Should solve the issue with strong tail oscillations (#17).
  • Default looptime to 1000
  • Support for CUSTOM_TRI mixer
  • Improved detection of in-air tail tune failure

Knows issue with the new yaw correction feature

Following is copied from a post a made to RCExplorer forums (http://rcexplorer.se/forums/topic/debugging-the-tricopter-mini-racer/page/58/#post-28743):

"
This brings us to the main issue why I have been holding on the release. Now that we have more yaw authority it brings out a new problem with tricopters. I think we have traded the yaw authority to even bigger problem :(. The yaw authority works perfectly when the copter is climbing straight up, the copter keeps the heading very well. But the problem arises when the throttle is cut in fast forward flight.
Here’s my interpretation of what happens and what causes it:

  1. The copter is tilted forward and has forward momentum, throttle is cut.
  2. When the tail motor starts decelerating the generated torque forces the copter to turn to the direction the motor is spinning.
  3. The new Triflight feature quickly detects (expects) this and starts correcting the yaw error by tilting the servo.
  4. When the servo is tilted the added torque force starts affect the pitch axis, forcing the copter to pitch forward.
  5. As the copter is moving forward fast in the air, the pitch PID fails to correct the error as the propellers would have to spin a lot faster to get a grip of the “moving” air. The normal PID gains are not enough to correct on this special case.
  6. As the tail propeller is tilting to the other side, the disc area is reduced, thus reducing the drag. This also increases the error caused for the pitch axis.
  7. Pitch PID controller is trying to correct the error by increasing the throttle for the front motors and reducing the tail motor throttle. This further reduces the yaw authority, making the copter drift on yaw axis aw well.

Because of above effect, I will put a lower yaw correction value as a default to the new firmware. It would be quite surprising for newer pilots and cause many crashes.

I personally think this makes the situation even worse, Further development is required to make this feature feasible for other scenarios than climbing straight up and cutting the throttle. One idea would be to increase the pitch PID gains when the tail motor is decelerating. I’m open to ideas. In any case it would require throttling the motors up until the copter is stabilized, giving a momentary floaty feeling when throttle is cut rapidly.

I’m starting to think that tricopters just weren’t made for this kind of acro flying. I might be wrong and time will tell. Personally I will use my mini Tricopter for racing where it works wonderfully.
"

Downloads