Thread Tools
Apr 01, 2020, 01:05 PM
Registered User
Thread OP
Discussion

Yaw tuning (How-To)


Here are a few bits that could help those new to Tricopters tune their Servos....

- The default Betaflight PID’s do NOT work on a Tricopter as its primarily written for Quads. Most attempts to use the default PID’s results in the Tricopter auto-launching or oscillating uncontrollably. That being said, a good starting point for most Tricopters is Pitch / Roll P20, I10, D10 and Yaw P20, I10, D0. The larger the Tricopter and lower the KV of the motors, may require a higher starting PTerm. While smaller Tricopters with higher KV motors will need less. Keep in mind that these are basic PID’s to get you airborne and start tuning.

– Filtering can make or break a Tricopters tune. Too much filtering adds delay that can further compound any Yaw issues you may already be experiencing. Ideally, you’ll want as little filtering as possible, which is why data-logging is so helpful to figure out what is really needed. (Less is More) Then again, if all else fails, switch to Betaflight 4.1 (or higher) as the motor filtering is really quite good!

– During tuning it is advisable to disable all functions that can automatically retard or amplify your PID’s in flight. These functions / algorithms can make the Tricopters behavior seam erratic and thus make it very hard to tune properly. Stuff like Anti-Gravity, TPA, Feed-Forward and the like should all be disabled until your happy with the tune.

– Servos response time can be drastically improved by increasing the input Voltage. While most Tricopters use 6 V, I suggest using 7 V if your external BEC and Servo can manage it. (Within MFR recommendations) Case in point, I run 7.4 V on my Whirlygig 3” Tricopters and its incredible just how much better they fly. A word of warning, never, never and i mean never, power a Servo from the Flight-Controllers on-board 5 V BEC. Not unless you enjoy replacing the Flight Controller and Servo often.

- Motor scaling during tuning is extremely helpful. Not only does it limit the maximum throttle range, making the RC throttle more controllable. Scaling can help in situations where the Tricopter accidentally enters a run-away state by preventing the motors from reaching 100% throttle. I suggest that during Yaw tuning using 30% throttle scaling. Keep in mind that If your copter can’t hover at 20-25% throttle, that it maybe under powered or over weight. (Just something to think about)

- Increasing the Motor Idle Throttle Value can help the Tricopter maintain its orientation when the RC throttle input drops to Zero. If you think about it, the only way the Tricopter has to maintain its orientation is if the propellers are spinning. This setting is something that is unique to each Tricopter and needs to be played with to find a point that works best for you.

- The center of gravity while important isn’t as critical on a rotor craft with more than 2 motors. Sure, it’s nice to have it exactly centered but even better to have it slight forward to make it easier to manage forward flight. Part of the advantage here is that less of the copters mass is being supported by the Tail. Thus, allowing the tail to do more of what it’s there for, manage Yaw.

- The Servo endpoints (Min, Mid and Max) need to be set manually before any tuning or flight is possible. That is unless you want your Tricopter to spin controllably causing an unplanned disassembly. Now the best way to go about setting the endpoints is by first checking within Betaflights Servo-Tab (expert mode enabled) that the Servo Min, Mid and Max Ranges are all set to defaults. Be aware that some Servos (such as Bluebird) have their mid-points set to 1520 (PWM) instead of 1500 (PWM). Obviously, you should have already read the documentation provided with the Servo to verify this beforehand. Now the tricky thing is that within Betaflight there are 6 or 7 Servos listed within the Servo-Tab. Usually for me the correct Servo ends up being #5 but its possible that this could be different from one Flight-Controller to the next. (Or pads used) What you may not also realize is that you should keep the Tricopter attached to your USB / Betaflight during this whole process. This will keep the Flight-Controller in a passive state but still allows the Servo to rotate. (Wont try to fly off in your face) Anyways, next remove the Propellers / Tail-Mech assembly and place it level on the bench. Then using the flight battery (plus smoke stopper) power up the Tricopter and after the Servo has rotated to its Zero point, reattach the Tail-Mech. This sets the electrical mid-point as the Tail-Mechs physical mid-point. Thus 1500 or 1520 PWM will always center the tail. (please click "enable live mode") Once that’s done alter the mid-point within Betaflight till the Tail-Mech turns 45 degrees from its center point, write this figure down. Change the Tail-Mechs direction to get the other needed value. Finally enter the values measured into Betaflights the Min, Mid (1500 or 1520) and Max boxes, then click save. At this point if your RC controller is active and properly setup you should be able to control the full range of your Servo via the Yaw stick. Now while this will make the Servo work, you still need to enter Betaflights CLI for one more step. Remember those documents that came with your Servo? Well assuming that you haven’t thrown it away already, there should be a little tech note stating what the Servos maximum Hz rate is. Take this value and enter it into “servo_pwm_rate” then save.

– Pterm directly sets how aggressive the Servo response will be. Ideally, you want the Servo to “Snap” into position as soon as the RC input is given. Hopefully without undershooting (slow-wag) or overshooting (fast-wag). Best way to observe this is the set your Yaw Pterm to 10-20, Iterm to 5-10 and Dterm to 0. (dependent on copters size and motor KV) Then hover over one spot, 2 meters off the ground, while quickly flicking the Yaw Left or Right and release. During testing you should be observing the tail directly in flight, preferably with the tail mechanism facing you. (2-3 meters away for safety) Now while the starting Pterm is held low, the Servo response will feel weak yet awkwardly flyable. Slowly increase the P-term until it starts to rotate into position faster. Again, what you should look for during tuning is the Servo "Snap". Now if the rotation feels / looks too slow or wanders around endlessly (slow wag) then continue to add Pterm. If your Servo suddenly flies slightly past the desired point and then "Snaps-Back" (Fast Wag), your Pterm is too high. Just to be clear, Snap-back is when the Servo overshoots the desired position and attempts to make a correction. If the Pterm is too high this could lead into a short duration fast-wag. Thus, increasing the Pterm any further can result in a 100% wag condition.

– Iterm is meant to keep the Tricopters Yaw orientation locked until an RC input is given. Thus, in a windy situation, the Tricopter may float away some but still face the same direction. Ideally, you’ll want to increase Iterm a few points at a time until you achieved this “Locked” state. Then go flying fast / strait lines to see if it still holds orientation. Here again, slowly add Iterm until you can throttle up hard with minimal Yaw deviation. Be aware that as you increase Iterm that you may need to reduce Pterm to prevent wag.

– Dterm is designed to detect and help prevent P overshoot while allowing P to be raised higher. Unfortunately, this requires significant filtering / processing to achieve, which is why the response delay (lag) can be so detrimental to Servo Yaw. Please keep in mind that the worst ESC on the market is still 100 times faster than the best Servo. Case-in-point, most Servos run @ 300-400 Hz (PWM), while ESC's can easily run @ 30 to 60khz! This is why Dterm is great for quads but not so much for a Tricopters Yaw.

– Too high of a Yaw P or Iterm can result in Servo overshoot. In a sense the Servo will rotate farther than needed, resulting in the Flight-Controller making a correction, then another and another etc. This can be seen as fast tail wag (oscillation) and can occur both in flight and on the bench.

– Too low of a Yaw P or Iterm often results in the copter not Yawing enough. Thus, the Flight Controller may need to Yaw again and again to get close to its desired position. (Think slow wag) Obviously, this takes time and will cause the Yaw response to feel both weak and mushy. This can also cause the Tricopter to quickly lose its orientation lock on its facing while performing basic maneuvers. (Added an example of a Tricopters Step Response Tune)

- In my experience, its best to fully tune the Tricopter’s Yaw by using Step-Response mapping in conjunction with field testing. Once done, then add in a little Dterm (if any) to help flatten out the Yaw response to "1". Obviously, the newer Betaflight firmware handles filtering much better and thus experiences much less delay as a result. Once the Yaw is good, tune your Roll and Pitch just like you would a Quad.
Last edited by 1Smug_Bastard; Apr 05, 2020 at 07:29 AM. Reason: Updated 4-5-2020 with additional material
Sign up now
to remove ads between posts
Apr 01, 2020, 01:32 PM
Registered User
Nice work as usual Kevin.
Apr 02, 2020, 09:48 AM
InvalidFlaw
Very nice work, quick question. during a throttle punch, I have been seeing the tri yaw hard and oscillate back, is my P gain low, or should I look at something other than the PIDs?
Apr 02, 2020, 12:06 PM
Registered User
Thread OP
Quote:
Originally Posted by InvalidFlaw
Very nice work, quick question. during a throttle punch, I have been seeing the tri yaw hard and oscillate back, is my P gain low, or should I look at something other than the PIDs?
Well to be honest, your request lacks any significant details needed to really help you. Its like calling your Doctor and saying you have a cough. Not much to go on there. Beyond all that, I'm guesstimating that your Yaw Pterm could be high or your Iterm too low. Remember that P drives the Servo, while I holds its orientation. Tuning is about finding the balance between P and I while avoiding oscillation. Also, try increasing your minimum motor idle %. Reason being, if your motors are not moving fast enough during zero RC throttle, your Tricopter will have a really difficult time maintaining its orientation. (Example: When you reach the top of a Loop or Roll)

Anyways...

Whats needed is a 2k rate Data-log thats maybe 1 minute in length. However in the meantime, try chopping your P-terms (one at a time) by 20-40% till you see which one improves your situation. Be aware that your Dterms shouldn't be significantly higher than your Pterm and that your Iterms should only be high enough to keep your flight orientation locked. Too much of any PID on the Pitch / Roll Axis can act to drive Yaw into oscillation. (especially at higher throttle settings) This is something that most folks don't get, thats it's not just the Yaw terms that can drive Servo oscillations. Case in point, the Tail motor not only manages counter-torque but Pitch control as well. Knowing this, its easy to see the interaction going on between Pitch and Yaw. Furthermore, as crazy as it sounds, the same is true between Yaw and Roll. Example, you Yaw left causing the tail-motors mass to swing right and thus induce right Roll. (copters CG changes) The flight controller does its best to counter this induced Roll by adding a small amount of counter Roll and so on and so on. The further out your PID's are the more wonky this interaction becomes.

Side Note: Inverting a Tricopter causes the Yaw induced Roll (as mentioned above) to Roll in the direction of Yaw. This can improve a Tricopters flight performance as well as its flight duration.

Other thoughts... Try looking at your Betaflight settings and disable: Throttle PID Attenuation (TPA), Feed Forward (FF), I-Term Relax, I-Term Rotation, Integrated Yaw, D-Min, Anti-Gravity (AG). Most of these features alter your copters PID's in ways that were intended for Quads. Thus they may not work so well on a Tricopter thats still being tuned up.

I've attached a tuning guide i wrote a few months back. Some of whats there may help but keep in mind that this document is still a WIP. Especially considering that I tend to drink whiskey when writing or using 3D Fusion.

Cheers!

1SB
Last edited by 1Smug_Bastard; Apr 06, 2020 at 05:36 PM. Reason: clarification
Apr 05, 2020, 06:13 AM
Registered User
Thread OP
4-5-2020 Updated some of the posts I previously made for clarification. You know how it is, you re-read something and then want to make all sorts of changes.
Apr 06, 2020, 01:23 PM
Registered User

Tuning with a GoPro Tri LR


I hope you guys are staying healthy,
I'm putting this here as it seems like the best place for it and I didn't want to start a new thread. I have a very nice problem which is I have two Tricopters LR which both are tuned well for my flying style on 7" two bladed props (which sound so cool). They both have the fairly heavy DJI FPV systems but I am happy with the performance until I put a GoPro 6 Black on top. I have them mounted right over the stacks which I assume is near the center of force or whatever. When the GoPro is there the flight characteristics suck. Lots of tail wag in particular with the other expected results to the control functions when you add a heavy camera in the mix. I know I could probably try to setup a separate PID profile for with or without camera but it wouldn't be my first choice. Was wondering what you guys think about my GoPro problem. If I tried to tune it out with the camera where should I start from my baseline tune without camera? I know with the added weight they won't fly the same with the camera based on the same config. The DJI air units gets nice video but the GoPro is special.

This is not Tricopter footage but I'm trying to learn to color correct my footage. As you can see I have much more to learn.
Color correction test (9 min 7 sec)
Apr 06, 2020, 01:28 PM
Registered User

Tuning with a GoPro Tri LR


Duplicate
Last edited by adamcooney1; Apr 06, 2020 at 01:31 PM. Reason: Duplicate
Apr 06, 2020, 05:05 PM
Registered User
Thread OP
Adam, i have a few thoughts about the GoPro...

-Are you using the tune from the RCExplorer forums? Tunes often are not a one size fits all deal.

-Is the Camera Secure? I realize that the GoPro has digital image stabilization so it may be hard to see it shaking from the footage. Well anyways, if the camera isn't stable, it could oscillate and feed that back to the Flight-Controller. Filtering wise, this could be a low frequency event below 100 Hz and thus difficult to filter out effectively using Notch filters.

-The GoPros position above the FC may of shifted the copters CG upwards if GoPros added mass is really significant.

-Do you have Betaflights (4.1 or >) motor filtering active? If your never tried it, its well worth the time investment to re-flash your ESC’s. All my copters use now, including the Nano-Whirlygig.

-If you fly with the GoPro often, then you should tune the Tricopter for it exclusively. (To get the best video) Later when the GoPro is removed, you could simulate its mass so the copters feel would remain consistent. Otherwise you’ll be forced to lower your PID’s as the copter may require less P & D to drive an orientation change. Keep in mind that adding extra mass often isn't such a big deal but removing too much mass can cause the vectors to overshoot.

- Have you performed a Step-Response from your Data-Logs? (Assuming your still using Betaflight) Send me a copy please.
Last edited by 1Smug_Bastard; Apr 06, 2020 at 05:40 PM.
Apr 06, 2020, 06:08 PM
Registered User
Thanks Kevin, I thought of e-mailing you directly but that isn't in the whole forum sharing of info edict. So, to add some clarity. Tune is not based on any stock PIDs or other dump/diff. If anything it is based on your tuning guide. One is running BF 4.2 and the other is running INav 2.4 and has external GPS/Mag. That is why I was so happy to get them tuned on different platforms then the sloppy behavior with the GP. The camera is well mounted in improved TPU printed mounts. All the ESC's have current FW but I am probably running D Shot filtering so that needs to be looked at. Of course you are right in saying I should tune it for the GP and shut up but I still have that hope of having it all. That's what attracted me to the whole tricopter rabbit hole in the first place. That and obvious self abuse.
Are you suggesting that over the FC isn't the best spot for balance? The LR top frame allows for some re-positioning backward shifting the CG or COF, etc. The first install had the camera even further forward which was worse than where I'm at now. I'll extract a log file and let you tear me apart and my " Comfortable Tune"..

Thanks
Apr 07, 2020, 04:46 AM
Registered User
Thread OP
@Adam

iNav really isn’t my thing but it does share some branch similarities to an earlier version of Betaflight. That being said, what I’ll need is a 2kHz Betaflight data-log, both with and without the GoPro mounted. By comparing both logs i can see which Axis is causing the most overshoot and advise you from there.

ESC’s should be running dShot 300 with a Flight-Controller loop rate of 4/4. Along with this, enable motor filtering (configuration tab) and set your poles to 14. Far as i know of a 22xx motors have 14 while my 11xx motors have 12. Anyways, this will enable motor RPM based filtering, that allows you to lower your Gyro setting and improve the copters performance. Joshua-Bardwell has a rather nice video on how this system works and believe me it works great.

The CG is being moved upwards by the additional mass being placed directly above it. Considering that the LR weighs 500-600 grams, the 40-50 gram GoPro isnt bad so long as your absolutely sure its mounted properly. What is an issue is that you most likely tuned without copter with the GoPro attached. Later when you remove that mass, the copters change in CG could be causing problems on one or more Axis.
Last edited by 1Smug_Bastard; Apr 10, 2020 at 04:10 AM.
Apr 09, 2020, 01:42 PM
Registered User
Thread OP
@Adam

I've finished the .BFL evaluation and sent it back to you. Please consider posting it here so that others can see and participate.
Apr 09, 2020, 02:11 PM
Registered User
Quote:
Originally Posted by 1Smug_Bastard
@Adam

I've finished the .BFL evaluation and sent it back to you. Please consider posting it here so that others can see and participate.

As requested, step response analysis by 1Smug_Bastard attached below:

Two flights combined video, recorded with the DJI AU DVR and not from the Go Pro:
Tri LR Tuning with GP (8 min 34 sec)


Part of the same flight but recorded from the Go Pro Hero 6 Black smoothed with Reel Steady Go

Tricopter LR raw footage (4 min 10 sec)
May 18, 2020, 07:08 PM
Gravity is patient............
I have a tricopter LR that I've had to switch from 8x5 props to 9x4.5 props because I can't get any 8x5's. I am flying INAV with triflight and servo feedback. I am using RPM filtering using esc telemetry.

In general terms what causes a tricopter that is well tuned in all other respects to oscillate at about 2-3 hz in hard banked turns (in pitch)? After alot of experimentation I do believe the oscillation is coming from the tail but not 100% certain. I know logically you'd say it's the pitch but pitch in a straight line is solid in all respects, as is roll. The oscillation only occurs when doing a coordinated turn (pitch, roll and yaw applied) and moving in fast forward flight.

It's incredibly annoying because I had it flying great on the 8x5's and broke a prop and don't have any more. Even HQprop themselves is out of them and they are the manufacturer! (the CCW's).

I am wondering if the props are too large and spinning at too low of an RPM to be stable in all flight positions.

Complicating the tune is I changed to a much faster and more powerful tail servo. So my tune is not remotely like the 8x5 tune in terms of the PIDs.
May 18, 2020, 08:11 PM
Registered User
It could be an issue with the yaw pitch compensation. As the servo tilts for yaw control, the vertical component of thrust from the tail motor is reduced. Triflight has compensation for this. I’d need to review the code to see which/if any parameter adjusts this as I don’t recall off the top of my head.
May 18, 2020, 08:54 PM
Gravity is patient............
Quote:
Originally Posted by jihlein
It could be an issue with the yaw pitch compensation. As the servo tilts for yaw control, the vertical component of thrust from the tail motor is reduced. Triflight has compensation for this. I’d need to review the code to see which/if any parameter adjusts this as I don’t recall off the top of my head.
Great thanks. Also I want to reset the variables that get changed in airborne tailtune to their default settings, and run airborne tailtune again. What are they?


Quick Reply
Message:

Thread Tools

Similar Threads
Category Thread Thread Starter Forum Replies Last Post
Discussion Help tuning weird oscillations/yaw jerks on custom build Whoop Lite/615 brushed/E010s Tokyo_Dom Scratchbuilt Multirotor Drones 11 Feb 12, 2020 12:16 AM
Discussion Yaw Pid tuning.... Empwrd Beginner Multirotor Drones 9 Jul 07, 2019 05:01 PM
Help! Pid Tuning w/ Blackbox and Video Overlay - Sudden Yaw Twitches TwiztSoDak Beginner Multirotor Drones 17 Jun 30, 2019 09:41 AM
Discussion White sheep with cleanflight, problems tuning! (throttle punches when I yaw) rotor0n Beginner Multirotor Drones 6 Jan 08, 2016 09:54 PM
Discussion White sheep with flip32, problems tuning! (throttle punches when I yaw) rotor0n Beginner Multirotor Drones 0 Dec 08, 2015 05:31 AM