PID Tuning Principles: Step #2 - Tune the PID Controller (P/D Ratio)
Вставка
- Опубліковано 25 сер 2024
- A review of how to find YOUR quads P/D ratio in BF 4.0+ or any firmware that uses a PID Controller (all of them). We review what too little P gains looks like (a low ratio) and too MUCH P-gain looks like (a HIGH ratio). How it sounds, how it looks in FPV, and how it looks in Blackbox Logs.
Tuning guide at: tiny.cc/uavtech
Playlist of the series: • PID Tuning Principles
------------------------------
Want to support me? / uavtech
or buy a beer: paypal.me/pool...
NEED HELP?!?
UAV Tech Discord: discordapp.com...
Betaflight BlackBox Log Review Group: / 291745494678694
Facebook: UAVTech1
Boy am I so glad UA-cam recommended your channel to me. I can’t believe I haven’t come across your content before!!! Love your attention to detail and simplification at the same time. Can’t wait for the rest of this series!!! Excellent Work Man!!!!
Great job again, waiting for the next video !!!!
I have been waiting for you to give us this practical application! I know you had to build to it, but I'm so glad that it's actually here! I spent months trying to digest your other material, and after numerous watch thrus it started making sense. But to have you drive thru this is FANTASTIC! Thank you!
Appreciate the support! Thanks for the kind words!
You are really the best communicator of PID tuning principles - bar none. What you accomplish in one video seems to take others ten or more videos and I still don’t quite get it. Kudos to you, Mark.
Thanks buddy! Hope you have been well. Been a little. I need to get back into Slack more, but been trying to pause there to get folks caught up to the new stuff in 4.0
This really is an excellent series of videos. You have a great way of explaining the way things work and how to get to C via A and B. I have watched most of Bardwell's videos and he doesn't explain things straightforwardly. He spends most his time trying to be too clever without fully addressing the fundamentals or nailing down the specifics. You can't deny his knowledge or flying skills but as a teacher you smash him outta the park. Great job. After just a few videos my quad is flying better than ever. You have a new subscriber right here. I'm gonna lose days watching your library. 👍 Thanks a million.
Thanks for the gracious compliment!
Revolutionary!.. I had no idea the P and D's were directly related.... Thanks for such a great in-depth video.. !!
Saying guy with "FPV club" nickname xD Ofc nobodys perfect , but thats just grotesque.
@@Sickassmr 99% FPV guys have no idea what PID is.
@@Mateyhv1 :-)))))) Thats real !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
I think you have the best FPV videos out there. I’m currently binging all your videos right now as I learn to tune and look into blackbox data. Thanks for all these videos for real!!!
Thank you for the great PID tuning series using Blackbox. Until I found your series most PID tuning videos were about what you saw and felt and for someone new it is very difficult to understand. This takes any bias out of that process and there is no arguing data. I followed each step and video and I feel like I’m an expert in PID filtering and tuning after tuning my Flywoo Vampire 5 inch drone. It flies unbelievably well with no oscillations and literally zero propwash. You are the only one that talks to the P/D ratio as well as deactivating other features until that is established. The other error I see people making is making changes to D term with D-min activated but staying the same. The other tool I used was PID Toolbox which is very handy in comparing step responses from the Blackbox data between PID changes which also visually shows the impact due to the changes. I’d love to see a video of several guys tuning the same quad by sound and feel and then take their final PID Blackbox logs into PID Toolbox to see who did best in terms of the step response data tool.
Great video, thanks! So satisfying to watch it on a clean setup, I've been following the same steps for a "refurbished" quad with crappy-old sunnysky 2204 motors + dal 5040, and the step response is waay more interesting, bounceback everywhere. To note, in noisy/uneven motor setups the snap flips and rolls are very different when cutting throttle or keeping it at mid. Increasing min_throttle really helps, as for propwash. I also miss some TPA advice in your guide (it's in the BF4.0 guide though)
We will be getting to TPA with prop wash stuff and FF.
Awesome stuff - I still keep a couple of those around just to verify tuning process. MinThrottle on underpowered motors is very much helpful, and I've also found that the filtering phase delay is a lot less problematic that I'd have imagined, since those motors don't make as much instantaneous torque to do much about it. I've also found that vibration management on older frames is how to make those truly fly-able, there's quite a bit of 'old school' tech that actually flies great, but we were using terrible frames, really bad ESCs, electrically noisy setups, and mostly bad props. With newer firmware and at least BLHeli with DampedLight, most anything can fly really well.
Ok I’m starting to really understand this now. You have a new Patreon 😀🙏🙏
Mark you are building a new generation of drone enthusiasts
That is a hell of a complement. Thank you!!
Thanks Mark. If i didnt have your videos, i would have already given up this hobby
Fantastic video! Showing the slow and fast bounce back and P/D relationship is so enlightening!
Awesome job. Thanks a lot. And don‘t worry getting too deep in. The more specific info, the better for us „beginners“. Greetings from Germany.
Thank you so much, Mark. I appreciate the technical insigt and deeper context you give to your viewers. For me this was the best PID tuning video I ecer saw.
I hated BF4 because of "weird" feeling and somehow unpredictable rates during fast freestyle moves. Now I see why - low P term was not tracking the setpoint well and I tried to "fix" that by rising FF as everyone recomends. Now I love it, even without FF and Dmin. So crisp and locked in feeling gives me great confidence for my freestyle 👏
awesome!! Thanks for sharing!!
This video series is proving to be an excellent tuning tutorial. Can't wait to fly the finished tune 😎
Thanks Mark! Haven't got into blackbox yet, but just with the info from your last couple videos i have my new Marmotte flying the best of any quad I've had. Looking forward to your next videos!
I want to thank you. I’ve been flying less than a year and this is my first tuning attempt. I have a few 5” quads and I’m tuning a freestyle top mount and a racer bottom mount. Freestyle has bounce back and racer seems to fly real good. Racer has more power and more gyro noise pre filter (broad around motor frequency). I switched the gyro filters Off on both and D-term as in your previous video Off on the FS. I will try it with the Racer. Next step is the PID and after today’s video it’s obvious both have not enough P but the ratio is better on the racer (neither follow set point closely). It has smaller frame motor to motor so may be that’s why. Your guide is invaluable
Thanks. Glad it is of value.
Simply amazing! Waiting for the rest of it... Got massive problems with my P/D gains...
You are brilliant on this subject! You must be some robotics tech who loves quads. Really amazing training here. Gotta love UA-cam
Thanks for making these videos, I've learnt a lot and my quad is flying so much better already as a result.
Can’t wait for the next one! These are awesome! I have no clue how to tune and this is so much help!
just want to grab your face and give you a big ol kiss. really appreciate the effort your putting in to get this in video format but i want you to know it really helps get the information in. i have been tuning quads for a while now with the move 1 thing till it felt funny then back off for ages and it works fine. BUT now i understand why and in what order for what purpose and dont be afraid to boost them numbers up. cheers mark
I find that tuning this way is much easier if you increase rates, possibly higher than you'd normally want to fly. High rates lead to much clearer tuning differences when viewed in black box. Get that working, and when you wind the rates back down the tune will be spot on.
Good idea!!
I watched the series and decided to flush 4.2 and re-tune all my drones properly, using blackbox. I thought they were flying Ok. I found whole bunch of problems with existing setups, using blackbox. From wrong PD balance to very low FF, that was doing nothing. Also found that most XM+ recievers on my toothpicks have HORRIBLE frame drop, and I thought previously that this behavior was due to toothpick size and aerodynamics. Tried different XM+ firmware, different bind settings, channel numbers, with no results. Had to throw away two out of the three XM+ and replaced them with R-XSR, thanks for making me to spend more money :).
Now everything flies perfectly, rx inputs smooth, gyro is following setpoint with very little delay, I left in on purpose, no propwash. BUT!!! Now I realized that I have to re-learn how to fly, my muscle memory expects that delay in drone response. I did not change rates, but for example I do a split-s and find my 180 roll to be actually between 180 and 270. I already crushed few times because of that, but I am not going back.
Thank you!
I postponed my holidays to watch your third video Mark! Please, we need it!!! 🤣🤣🤣
The best intergalactic adjustment guide BF4 !!!
Hi, thx for the video. Here is my two cents...if you open the noise graph and move over it with mouse while holding shift - it shows the frequency your cursor is at :) so you dont have to guess the frequency by the bottom sections
I did not know that! Thank you !!!
looking forward for next vid mate! great job! I have learned so much so far... perfect!
Awesome video learn alooooooooot can’t wait till next video
It is a great tuning guide you have made. I don't think you should combine the 2 steps. But to make it even easier to find the right p/d ratio, I think you should add a pterm roll 60 and pitch 70.
Fantastic, dude! Thanks a lot!!! 😃
I just tried a high I on yaw of 100 on betaflight 3.5.5. My 420gram rooster. Running diatone f7, t motor f80 pro 1900kv powered by t motor f55 4-1 esc. T motor 5147 props, 6s set up. Finally feels great with very minimal bounce back only with really fast stick movements on roll with 1100°. Finally happy with tune. I settled on 80 on I, yaw. Really was a big difference on my tune with that 20 difference on yaw I setting. My PID are lower than stock in general. Really close to your betaflight 4 tune here. Much appreciated help explaining all this complex stuff
16:35 Perfect example of how-to flight for testing step resp. will use this to point folks to when tuning
sweet! Glad i got it right!! :-)
@@uavtech ya it's certainly a short cut to ensuring good sub500deg/s step resp as well. people sometimes forget that to get good sub500deg/s step resp also requires lots of input, which generally you get from just regular flying, but some people fly without using much yaw, and so yaw tends to always look noisy. your method ensures you get all around good inputs to work with.
Thanks, this one was very helpful!
thank you. great content. highly valuable info.
I will try this technik soon
I spent quite a bit of time figuring out if it would be possible to use an LQ-Quaternion replacement for a PID controller (would be closer to a P2D or PIR configuration with a lot of vector math shenanigans)... then realized that it wouldn't really provide that much of an improvement.
FL1 does impressive stuff, but the primary benefit of running that is that the setup process is a lot quicker, and that the hardware integration on full FL1 stacks is pretty impressive.
Quite informative! Keep it up!!
I'm really interested in what you have to say about FF... I've found myself liking as little as possible and sometimes even 0 on micros.... post the next vid already! :D
Some like so lag on Setpoint, but to track Setpoint, you need FF for an average 5" rig I would say. Depends on your power to weight ratio, etc.. A super lite 5' might not. Neither a toopick style or 3".
very good setting!!!!!!!!!
I have seen a number of tuning videos and the guy kept saying you can see the sharp bounce back. I rewinded and rewinded. I can not see it . May they can but not me. Have to go back to BBE. Like your honesty! I have never considered this p-d ratio, hmm interesting!
I would like to ask you a question that I don't think I've ever read in your comments.
Can the PID tuning of a drone be exasperated up to the maximum values allowed by Betaflight (I think the maximum for PIDs is 200)?
Once we have obtained a 1:1 setpoint tracking, do we have to stop or can we still squeeze out a few more results?
If a drone already set up for 1:1 tracking increases its PID, is there a risk that it will get worse instead of better?
How do I understand when I have to stop with tuning?
How do I understand that I have achieved perfect tracking together with the maximum efficiency and gain curve?
Do I have to explore the whole PID scale and keep statistical traces of my flight times and also of the power expressed by the engines?
Amusingly, all my race setups end up around the same P/D ratios, but I run predominately stock P values. I think this leaves me with a very I-Term dominated setup, and I can definitely feel that reticence on the sticks, but as a racer>freestyle type pilot, this works extremely well for me, and I just fiddle with FF until the quad feels adequately responsive, and go about troubleshooting the next quad in my beater fleet.
I think the overhead of comparatively low D-gains and keeping very conservative filtering present, I can come back with cool motors even on dumb setups (>2000KV on 6S with 5149's), although the cost quite clearly is phase delay which makes propwash very noticeable when it happens, but the best bandaid for that seems to be very overpowered and lightweight quads, which running high cell count mid-KV seems to excel at. I also think I'm pretty indifferent to propwash response, which probably just reflects on my piloting ability (i.e. lack thereof) as much as anything else.
thanks for sharing 🤘🤘🤘
i am currently flying 3", and only fly los because of eyesight. i really can telate to your p/d ratio because after watching the video i realized my setting ratio was about the sma but equally reduced because of my quads size. does this make sense. would if you have time do something on 3" quads. i am 60 years old and loving this stuff i am going to stay glued to your filtering videos. thanks for your time man
One of the best......
Where did those p-term ratios come from? Prior testing? And the ratios are different on pitch and roll because of weight distribution right? Thanks again for the great videos, they've been incredibly helpful.
The ratios come from tuning the kwad through the process outlined in the video. Weight distribution. More momentum on Pitch, so more D-term needed apparently to avoid overshoot.
That one was great but what happened to the next episode? Have been waiting for about 3 weeks now ☺
I'm a slacker. Busy summer. vaca, etc...
Thank you for these great videos! Should we be resetting pidsum_limit once we've finished the tune? Also abs_control_gain. (These are not from this video but from your PID Tuning Prinipals doc.) I believe the other CLI settings initially made were all touched throughout the process. Thanks again very much.
Really great format! Only thing I don't understand is why you have higher P on roll? I thought with more weight on the pitch axis that you need higher P?
Roll P could be a bit high. In the next we look at prop wash. Also the frame is squished X. IDK, letting pid priciples be the guide.
good day. please tell me how the coefficient "I" is adjusted. In your video, it is simply taken by default ... It also probably influences the P / D ratio. It just turns out that the P / D ratio equals 1 ... and then, of course, because of the small value of P, the FF is not adjusted
i-Term is explained in the guide. I need to make a video on that yet. I has an influence on the P&D strength, but not the P/D ratio. I just adds to the PID Sum, so the larger the i-term gain (or smaller) the more of the PID Sum it dominates.
I put in ur tune on github for 5 and 6inch and both fly so fn smooth I guess I have good setups with ur tune.
Great video!! But what are the benefits of using expo and smoothing when viewing blackbox logs? Are these just to help view smaller deviations?
Correct, just to help you consume the information easier. See things, etc.
I have changed both heating element on the extruder and the thermal sensor. When I turn the printer on and turn the temperature up to 210. The temperature does nothing and then I get the error saying E1 thermal runaway printer halted please rest. Should I do a PID to fix’s this issue or could be the
main board that has went bad? Any help would be appreciated.
Great video, thanks for making it. Not sure if thats what you based it on - if you want to throw the science at it: because of the parallel implementation of P and D in betaflight, the breaking point of “D” in the frequency domain stays the same if you keep the D/P ratio the same. Always wondered if you try to avoid frequency domain notation of PID on purpose - would be happy to make a video about it to explain further, let me know.
Yes please!
Your video are really great.
Just 1 point : I don't understand why your P/D ratio is higher on Roll than on Pitch.
In my mind, roll axe is align with battery, so it should be easier to move than pitch.
Am I correct ?
(And BF default PIDs seems to have P/D ratio higher on roll than on pitch)
This kwad is a squished X. I'm guessing that is why here.
Edit: Sorry. I hadn't seen Marks response.
Interesting, squishy x seems like you would have more leverage on the roll axis.
@@KelvinFPV , weight further out too.
Thank you for this. Is the method for finding P/D ratio for a rig on your tuning guide?
I don't understand the question? This video shows how to get for any quad. Any firmware.
I think these guide videos missed on I-Term tuning except for YAW...
I am trying to tune a 10" quad which has been a total nightmare and I am down to I-Term and Feedforward tuning... P and D seems solid now.
See tiny.cc/pidtuning for i-term content.
@@uavtech Got it! thanks! the issue I am having now is a very soft drift when going straight and pitch bouncebacks I do not know how to get rid of... If you have any time what so ever this is my latest BBL: drive.google.com/open?id=1CiqN42LHoiWAyuSCbITMZlOI3aYmMP9b
For drift, crank i-term.
For bounce.in yaw, get PD Balance right on Pitch (see guide) and then if still persists, crank PD gain on Pitch.
This is excellent stuff, really very helpful. I am building my first quad, a 15” endurance ship with 380kv motors with AUW currently about 1700g without FPV equipment. Would this technique also work well (to start least get me in the ballpark) for such a large quad?
Absolutely. Works for all classes and sizes.
Any idea why my feedforward is always 0 on PR and Y? I have all feedforward values set to 120 in BF 4.2.8 but blackbox logs have FF at 0 through the entire flight.
Cause we want FF out of the mix for tuning P and D balance.
What was the quad weight/frame setup? As my baseline for pid tuning has always been that pitch P will be higher than roll, as that axis has more weight due to normal battery mounting and gopro. Has betaflight done some magic around the pid controller that pitch would need less P term than roll ?
squished X frame. See intro video to the series for the quad details.
Do these tuning presets (disabling FeedForward,D Min, etc) apply to Betaflight 4.2? I applied them to my F7 FC and my motors were grinding, getting really hot. Any workarounds?
Reduce your D-gains after pasted. Sounds like they are too high for your rig.
What's the rule of thumb for P/D on a 6" light weight 4S build? Also does P/D change if you move from 4S to 6S?
1.25 to 1.5 PD Balance is a guess without knowing anything much about the quad.
Biggest thing for 6" is getting PD Gain right. Too many fly with PD Gain too low for larger prop quads where the thrust to weight is low.
Is it possible or have you seen a case where the D is higher than P gain on an axis. I have a macro quad that is 1.4kg with 9 inch props and 1100kv motors and it is flying better like that. Using logs is backing this
Yes. My brushless whoop is that way. 70P and 80D.
Thanks for all your efforts on this series. I'm following slavishly along and learning more after watching each video an average of 5x. Will the bounce back show as an oscillation in the actual setpoint that the PIDS are racing to correct? I think that's what I'm seeing in BBE but I don't see them in the video.
You will see the Gyro trace pass the Setpoint and bounce back or oscillate around the Setpoint trace.
@@uavtech I won't stir anything into your pot here. Maybe I'll post the log to the group. Mine has a sine wave in the setpoint after a roll! Maybe I'm whipping a dead Rooster? I am so glad you are running through the PDF with examples. Incredibly helpful. Thanks again man.
@@taterfpv , yes. If your Setpoint has sine waves, you have TX/RX issues. If Gyro is sine wave, move 60hz min. low cutoff on D-term to 80hz.
@@uavtech I checked my RC command and it was the same. It was me doing it! Letting the sticks twang back to center sometimes. I caught myself doing it again today. I probably never would have corrected that bad habit without realizing what i was seeing in blackbox. Lovin this stuff!
My micros have been flying like crap. Bardwell sent me here. Let me see what all this filter tuning is about. Will an on board data flash chip have enough memory to get good data for tuning?
Yes it will. Also see github.com/betaflight/betaflight/wiki/Community-Presets#2---3-quad---11xx-12xx-motors
You suggest those high PIDS even on 6s. Seems to be a better tune lowering PID in general on betaflight 3.5.5 with my 6s 5" rooster with really powerful t motor f80 pro 1900kv powered by t motor f55 4-1 esc
If you power to weigth is higher, lower PIDs are in order.
@@uavtech appreciate the time. I would pay to have a custom tune by you if you were ever interested. I'm certain your time is precious. Just throwing that out there
Hello I am starting to tune my 3inch with MatekF722Mini using your PID Tuning Principles. I completed Step#1 and going on to Step#2. And I am not sure whether this normal behavior or did I do something incorrectly.
- I paste the CLI in Step#2 to turn off BF advance PID controller features.
- I took the default 4.0.4 D-Term = 32(roll), 36(pitch) and P-Term = 42(Roll), 46(Pitch) and fly the quad, do flips and rolls but cannot really detect fast bounce back on my goggles.
- Next increase P-Term by 10, 52(roll), 56(Pitch) and go fly. First thing I notice is when I raised the throttle slowly the quad will jump up to about 3 ft and settle down, still cannot detect fast bounce back on my goggles.
- Next increase P-Term by 10, 62(roll), 66(Pitch) and go fly. This time the quad shoots up like a rocket to more than 10ft when I raised my throttle slowly. I had to bring down the quad and set P-Term back to 52(roll), 56(Pitch).
What do I do next? Do I carry on with Step#3? All the motors are not hot in Steps# 1 & 2.
Thanks
David
I'm assuming no logging?
@@uavtech , yes I do have the logs with P-term set at 60+ and 50+. Today I set D-term on both Roll & Pitch to 30 and P-term to 60. The quad is very jumpy and I notice it has the "trilling" noise you spoke about when P-term is too high. I then moved P-term to 50 before I feel I'm able to fly the quad and the "trilling" noise is no longer there. I hope you have some free time to analyze my blackbox logs. Thanks.
@@davidlhchong , so once you get to trolling, yoi know you have found the point where P/D ratio can no go higher. That is ok, that is the point. You back it down from there.
Where are logs?
@@uavtech I sent the BB logs to your Gmail account - 4 logs in total under email title, "3 inch Black Box logs.
From your PID Tuning Princples PDF:
"You can set your D-gains to the same
number for Pitch and Roll based on the noise floor after your filtering setup in Step #1. This is subjective based on how noisy you want your D-term signal to be to the PID Sum."
Can you explain what you mean by this? I just left my D at the Betaflight default value (35 Roll, 38 Pitch).
So the magnitude of your D-term gain is a balance between the signal noise on the gyro trace (because it amplifies it like crazy) and a high enough gain that it fully pushes the motors in prop wash (maximizing quad stability).
If you have a perfectly clean gyro signal (unrealistic), you simple push up the D-gain still you start to see motor saturation in prop wash. HOWEVER, since you have gyro noise to deal with, as you increase the D-term, the noise to signal ratio goes up in the PID Sum, which makes the commands to the motors more sporadic; decreasing performance and heating up motors.
Can you explain what debug is showing you in bbe. First I thought that was raw gyro data and I’ve seen you had it in your graph setup at certain points. I now know gyro scaled is raw and gyro is filtered so what is debug. I tried google but it’s more confusing. Thanks for the help and great videos!
Gyro_Raw debug is raw noise (unfiltered) but it is the raw signal from the gyro NOT scaled to deg/sec units.
Gyro_scaled debug is raw (unfiltered) but scaled to deg/sec units.
Ok got it. Thanks for answering the question so quick. For a novice tuner it’s probably better to just used the scaled gyro I suppose?
I only use Gyro_Scaled so it aligns with filtered gyro signal.
I'm trying to get my Gecko (4's split cam) tuned but, using Community Presets as a start for P and D( the difference is very small not even close to what ratio you recommended). It fly's with a little prop wash. On a 3inch using this formula how high can I go on P and D before it's an issue ona small lite quad?
it varies based on how well you are taking care of noise and filtering.
It's a clean build. I was able to get a much better feel with liter props
Hi! Thank you very much for this detailed manual and videos! One question: I tried to set up my 6s quad, and the result now is very well, but I have one issue: slow bounce back when I make sharp backward pitch flip . But I noticed that I don't have any bounce back when I do forward flip. Can you explain me what to do to reduce this thing?
If slow bounceback, increase P-Term. Aerodynamics must be different from forward to revers. Or motor offset, or maybe one motor on front or back is weak; causing the other to hold back.
tpa_mode is 'D' by default rather than 'PD' in BF4.x. Should we be using 'PD' to maintain the P/D ratio under all throttle conditions?
As the motors spin up above 50% throttle, the weight of the bell begins to act as a gyroscope which is like a mechanical D-term.
UAV Tech But doesn’t a mechanical gyro produce an output that’s perpendicular to the input axis, so roll would translate to a reaction on pitch and vv.? And with no yaw, and a balance of counter rotating props would that not cancel out?
Think of a bike or motorcycle. The wheels spinning helps to stabilize the machine. All the D-term does is opposes gyro movement. This said, i typically set TPA to cut starting at 1750 or 1800 and I cut by 80%. The lower default in BF is there to some extent to help with D-term noise dampening at hight throttle. If you can address with proper meechancics or filtering, then I would rais the TPA breakdpoint to be above where you see throttle in prop wash.
Hey, great video. Maybe you can help me to understand something.
I’m new the pid games and so. And i thought okey maybe flight one or FalcoX is simpler or easier to start with.
Most presets looks really close / the same
In the pid sections but I have a lot of propwash on default, high power tune, deekon race. On race my quad shoots to the moon after arming.
The blackbird low d tune stands out. 80p and 30 D and I have the little amount of propwash.
So on flightone high P is good?
Principles are the same regardless of firmware. It is all about the P/D ratio for a good tune; finding the right ratio. Blackbird is good for me too!
Thanks to you I started using Blackbox. I followed your videos but all I see are graphs at this point. Is there a place where I can see Blackbox logs and get an explanation whats going on in the logs. I so want to do this and cant get anoth info. Idea!!!!!!!!!!!! Have a UAV Tech tuning camp. I will pay to come.
Check out the end of this video: ua-cam.com/video/fCs51RQmxqU/v-deo.html
What exactly is the pidsum limit and why do you set it to 1000?
P.I.D values are added as percents to 100%. That is the PID Sum. Default limit is 40. We raise so the limit is not applied and messing us up when tuning.
Man crush lol 💥
Really enjoying your videos. I'm trying to tune 7" quads. Both X's and Deadcat frames. In general, which direction would you expect the PIDs to go on these bigger quads? Or is it not possible to generalize?
Doesn't matter as long as they are in the right spot and thats what tunning is for. However since the puloting wont be aggressive especialy with the cats, doesn't matter if PIDs are a bit more relaxed than on a 5".
Depends a lot on the S rating and motor power to weight for 7".
Bottom line: Pock D gains, then lower P to see i-term bounceback and then rise up to till she starts to trill. Then back of P and look at logs. Run prop wash turns to see what P value works best in wash. Move up and down by 10 to 20 points. Then hone in on best P value.
UAV Tech your vids are really helping me conceptualize the whole PID thing like never before. Great work thank you.
My main goal is smooth HD. Seems like I should just filter the s*%t out of it and not worry about latency or propwash. But this tuning stuff is really cool 😎
@@AlaskatrazFPV , clean mechanical will get you there in either case. It is key to have 20hz to 200hz clean for raw noise to have smooth flight (assuming 5" or smaller). For 6"+, that motor noise moves down to - as low as 100hz I have seen. In those cases, lower filters are key. The BIG point is you need to BlackBox it to see what you got.
On 7" quads, I've found there is pretty marginal difference overall, mostly just dropping some of the (dynamic) LPF frequencies in filters. Propwash is surprisingly hard to completely eradicate, (especially since a lot of the props have their primary resonant frequency in the 120-150Hz range), but it's always really manageable and looks good through HD footage with an ND filter. I've actually had some solid luck with fixed notch filters on 7" rigs, particularly if you're getting really big spikes on one frequency. For a lot of mine, it's 140-142Hz, which is exactly what a musical instrument tuning app tells me my beloved GF7042-F props resonate at, so there's a bit of old fashioned trickery that can pay dividends too.
I'm doing fairly 'dumb' setups, like 6S 7" on 2507/2508 motors, thoughI've also ran some fairly pedestrian 2306 cheap motors on 7" and also converged on pretty decent handling results. Mark's process is definitely sound - I just havnen't taken that to endpoint with any of my 7" quads, just gotten to the 'good enough' point and started having fun with them.
Hello Mark thats great in the new 4.0 dungle and i can not find the best tunning fot Eachine TS 215 V3 5S and Diatone Gt 548 MK3 4S version , ihope that now i will find the good way to get them in good function. Thanks and best regards from Alicante España :-)))))))
Hope you do!
For those of you that have gone through this process what did you come up with for you P:D ratio? I'm curious because I want to compared against my 5" quad with a GoPro. (Also I haven't done it yet otherwise I would be sharing it.)
There is a spreadsheet at tiny.cc/uavtech that has some ratios from this series and from the Race Flight Presets.
Does the tuning change with throttle_limit or does the PID Controller still have the same headroom then?
Not meaningfully, unlesss you're at that limit. Practically, I always run a throttle limit of 94% at the max, often limiting it a lot more. Practically, the controller just subtracts PWM from the other three until the net PID sum delta is right, which is pretty quick... but you're getting the same actual motor commands as if you were at a lower throttle level, therefore you might as well get the resolution.
does this video apply to 4.1 as well?
Applies to any firmware (BF, F1, KISS, etc...) and any version. PID tuning Principals are always the same. In KISS or F1 the only difference is turning off SimMode (FeedForward) and you would have to reduce I-gains down to 5 for do Step #2 since you don't have i-Term Relax to clamp I-term during sharp flips or rolls.
What about shutting TPA off
I have it turned way up so it only activates above 75% throttle.
When will we get the nexts steps ?
working on it now. Sorry for the delay. life stuff.
I can get unpossible high p terms quad motors are then burning hot. I am arround 25 and 20 D
If you look at your logs, it is oscillating if motors are getting hot. Showing Ps are too high.
@@uavtech my P is arround 23 and 25
23 and 25 is not high P-term.
I just had the strangest pid tuning sessions.
I've been running betaflight 3.5.5 on my 5" rooster. Using powerful t motor f80 pro 1900kv and t motor f55 4-1 esc.
All I did was switch to t motor new f55 4-1 esc that has the updated f3 mcu. Same exact esc just a faster chip set. The quad wasnt usable. The pid needed to go way higher. Like 20 points at least higher on P. Still tuning but the cold weather kept me inside. My very curious question to you UAV Tech is why with everything being the same on my quad besides the faster f3mcu. Why would the pid need to go higher? I'm at a loss. Doesn't make any sense to me at this point
that does seem very odd indeed. I would want to confirm. You raised all the PIDs 20 points? What was the trigger to make the raise? What is difficult is how do you know it wasn't needed on the old ESCs?
@@uavtech on the older version I was tuning out a really fast bounce back and lowering P and D proportional was the only way to achieve it. This updated esc would wobble all around and couldn't hold anything after a flip. P, D values back up to stock where it got better. Not great so going back out today to tune some more
Very strange. I was going to throw 4.1 on it but my crappy Mac won't accept 10.6 configurator? If it's not one thing it's another. Take care Mark
@@uavtech one more variable I checked was in blheli. Everything between both esc settings are the same. I only ever swap motor directions in there. I don't mess around with anything else
@@uavtech well since then I updated betaflight to 4.1 watched JB on bi directional D-shot and set everything up to a T as in his video. To make a long story short I had to reduce the PIDS around 20 from stock betaflight 4.1. It was fly able. Had the worst bounce backs I've ever seen before lowering PIDS. I guess my rooster, t motor f55 pro 2 f3 mcu version with t motor f80 pro 1900kv 6s set up is just way more powerful then betaflight stock 5" tune. The quad sounds better with bidirectional D-shot 300 running at 4k,4k. Appreciate your time Mark. Definitely have a great weekend
@@uavtech just wanted to let you know what ended up being the cause of that nasty bounce back. It was the pwm frequency in blheli. Stock is set to 24
When I changed it to 30 and up. Settled on 36 that bounce back at low throttle went away. No no matter where I put my pids I don't get anything like I was experiencing. That updated f3 mcu by t motor wasn't usable at the stock blheli settings. Surprised I didn't read more about it. I only found about this setting reading some random forum about mid throttle oscillations. The last few days had my pulling my hair out with frustration. The good news is I learned a ton watching so many of your and Bardwell videos. Again I appreciate your time. It's kind of like the average sport fan getting a response from Michael Jordan or whoever there favorite athlete is.
I have noticed that you didn't set FF to Yaw axis, is it the recommended way?
Zeroed FF on all axis for this step.
@@uavtech I mean when you have finally set FF to 250 near the end - you've did it only on Roll and Pitch, but left Yaw still on zero.
ahhh.. because Yaw for me tracks Setpoint well. I don't move yaw very fast.
Is the step response graph result still valid if we put feedforward into the tuned PIDs or does it mess up the result and feedforward should be added just by how it feels best while flying? Whats an acceptable number of pid errors in the PID error plot of pidtoolbox? Can't wait for the next video regarding FF! :-)
Keep FF out of it for PID tuning. Then add FF into the mix for Feel or Setpoint tracking.
Does rates have an effect on the PIDs
No. But higher rates demand more on the PID loop. So higher rates require a tighter tune.
UAV Tech thank you so much for your videos, your time and your reply. Very informative for those who doesn’t have a social network group in the fpv community, like myself.
You need a mic, and adjust your gains when transitioning between flight footage/monologue. Pretty sure it blew my speakers...
i have a mic now. i do look a the gains to make sure peaks are around the same. sorry.
Hey your like Jb but with useful info lol
I been wanting to ask you I built a few high kv quads first 4.0 worked ok after pretty much cutting pids in half an adjusting filters then I tried rpm- filter it really freaked wouldn’t rev out like it couldn’t handle it motors didn’t get hot or anything just like it was rev limited what’s the best way to set up a 2400 to 2500kv 5 or 6s quad
You have too much noise at 100% throttle which limits RPM.
So stick with dynamic notch an raise it or just cut it off sooner
What size? 5"
UAV Tech one is a alien with xnova 2207 v2 2500kv other is a FlossStyle with the xnova 2204 2350kv yes I know their tiny but it’s lite ak32 radix li nano receiver an vtx packs are 1050 6s with 1 cell removed their also tiny I need to weigh it also s3 ethix props it’s really prop sensitive
Sounds like you need to look at a blackbox and check out your raw noise and have more filtering.
On your final ratio you said you determined by "different things".. care to give a brief explanation on what a couple of these things are you're talking about? (I could buy you a beer.. lol)
Assuming you mean at 7:40. So I do LOS flips and rolls and look at blackbox personally. Some folks don't like blackbox. If that is the cause, you can just do flips and roll and look at the FPV feed to see where you get no bounceback. HOWEVER, like shown right before this part of the video, it is very hard to see the bounceback (even in HD | for me at least) when your P/D ratio is high so I prefer to look at blackbox to make sure you have a nice flip/roll that looks like this: www.screencast.com/t/mvrlGZSFAaVH
@@uavtech Hey Mark thanks a lot for your answer. I've watched all your vids on blackbox and tuning and have been messing with learning to analyze what I'm seeing. 3 kwads total, 2 with sd card slots.. trying to figure out how to get logs off the kwadbox transtec f7. Guess I need an outboard unit. Couldn't do it without people like you. So, I kept my word.. go buy you a beer. :) Thanks again Pal!!
if I try this approach on my 450g build (empty), it wiggles quickly towards the moon. be careful!
Thats because your quad is not filtered properly so the D-therm took its toll!
Out of all this, getting Step #1 right is the most critical! Anything fly to the moon means you have noise issues.
@@uavtech yeah the self resonance of the Chameleon plus my motors are not the freshest. two notches got rid of the worst.
And waiting and waiting in 1 Month we have Beta 4.1 ;.((((((((((
which will make FF tuning easier. :-P
FIRST!!!
That high of a p term even in a racing setup with bent props and old beat up motors? My testing has shown the answer is No to this question. Motors just get how. This is with D'angelo in the low/ mid 30's
I guess. But then everything is less sharp. Just how things work. Sure motor heat is not just from D-term? Typically that is your issue when it comes to vibrations, not P-term.
UAV Tech right I know D causes heat but I was getting hot motors even lowering the D term to 20 but prop wash was awful. I had to adjust accordingly so I didn't roast motors every time I hit a gate. This was with a High P in the 50-60 range. Then settled on p in upper-30 to low 40. D is at 32 and 35 now I think
@@beeradfpv , that is probably why BF defaults are so low. Safety. My focus is freestyle so not as much of a concern. Sure I bend props back all the time and with these settings all is well. But i can see in a race situation that your props may be totally F'ed and you want to finish regardless of condition. Not optimal for handling, but I can see why you are taking all things as a whole.
Motor power and props makes a big difference to heat obviously. I have one build with less power that doesn’t even get warm.
yeah my motors get a little warm, but nothing really. This 6S has hardly any temp unless doing throttle blips back-to-back-to-back
Principle v principal
I also didn't want to say anything, but these will be around a while and a few more to come. Principle.
LOL... engineer here. Thanks!
Appreciated. Am correcting.
I think I'm learning Japanese.
If Japanese is the language of peak performance, YES SR.!