PID Tuning Principles: Step #4 - Tuning FeedForward and D_min to Track Setpoint

Поділитися
Вставка
  • Опубліковано 28 жов 2024

КОМЕНТАРІ • 119

  • @Fleche_FPV
    @Fleche_FPV 5 років тому +17

    This is the new and best PID Masterclass for me !

  • @tonyhoff86
    @tonyhoff86 3 роки тому

    Jeezus man. My brain is just like unfolding around this scary blackbox thing and it's great.

  • @hillbillyfpv1
    @hillbillyfpv1 4 роки тому

    Just finished all PID tuning vids in this series.. sure helped to have a better understanding of what the PIDs actually do.. better than before for sure. Thank you for that!! I've always depended on default because of not having enough time to learn tuning. It's past time.. game on.

  • @r0ck3t81
    @r0ck3t81 5 років тому

    Great, this is exactly what I wanted to see... you explained why motor saturation actually needs to be considered when adding FF. Excellent! That answered my last questions, thank you for this great series.

  • @patrixfpv
    @patrixfpv 5 років тому

    No doubt this is really useful video and easy to comprehend. But what amazes me is that nobody has disliked this video 🤩! This is the first time for me seeing any video on youtube with 490+ views and zero dislikes! Really great job! 🔥

    • @uavtech
      @uavtech  5 років тому

      Maybe i will dislike to not break YT.

  • @dukedblu
    @dukedblu 5 років тому

    I used to switch off FF and increaded D Term to much because my quads where a little unstable. With the help of this vid I optimized one of my quads, and it flies just fantastic. Thanks for all your afford.

  • @zachspross1084
    @zachspross1084 4 роки тому

    First of all, gotta say you are the best bro! I’m finally starting to understand the PID loop now that I’ve rewatched all these videos so many times. Secondly, at 12:46 when you realize that you weren’t logging it was priceless! Soooo funny because I would do the exact same thing 😂 seriously thanks so much for taking the time to make these videos. They are soooo helpful. I had started to give up on tuning then I just doubled down and sucked it up. Man has it been a pay off!!

  • @butcher
    @butcher 5 років тому +2

    The best pid tuning series, thank you very much :)

  • @MCsCreations
    @MCsCreations 5 років тому +5

    Fantastic job, dude!!! Thanks a lot for all the tips! 😃

  • @jessefpv9217
    @jessefpv9217 5 років тому

    So putting FF to 0 turns FF off completely. Also just found your channel. From what I've seen man your blowing JB out of the water. Great work man

    • @uavtech
      @uavtech  5 років тому

      Welcome! Yes, FF=0 gains turns it off.

  • @wilderg88able
    @wilderg88able 5 років тому +3

    Ive been waiting for this one! :)

  • @flyingant4170
    @flyingant4170 5 років тому +1

    Thank you this series has been incredibly helpful, cant believe you have < 50 patreons. Cmon everyone not even 2 bucks a month for all he does?

  • @DMARZFPV
    @DMARZFPV 5 років тому

    Tried this on my 7" and flies like a pist off bat out of hell. Love it. Thanks bruh!

  • @beautoxfpv663
    @beautoxfpv663 5 років тому

    Thank you so much for this pid masterclass. Great timing as I was doing this FF/D-min tuning the past couple days and been getting great setpoint following. Can't believe how well my quad flies now, it's a whole different animal. Keep it up!

    • @uavtech
      @uavtech  5 років тому +1

      Yes, folks say "defaults fly so well now". I don't sign on to that. Each quad is different.

  • @Joe_137
    @Joe_137 5 років тому

    You have a way of explaining how this works like no other! Thanks for taking the time putting this together.

  • @Mateyhv1
    @Mateyhv1 5 років тому +1

    Great didactic material! I am always learning something new from you. One big thanks for all the effort involved!

  • @lennson
    @lennson 5 років тому +3

    Thx so much for explaining different PID n Filter stuff! Love your channel!
    This solves some Betaflight mysteries for me (and my FPV crew :-)
    THX A LOT! Greetings from Germany

    • @fastfrank61
      @fastfrank61 5 років тому +1

      Und viele Gruesse aus Spanien :-))))))))))))))))

  • @andreasthilander3592
    @andreasthilander3592 5 років тому

    Thank you for theese videos!
    They really helped me tune my quad (default was fine until I switched to 4in1 esc, FC and new props. then it went bananas and oscillated like crazy).
    Can't believe how much difference boosting feedforward to 250 from the default value made too, the quad feels so much more locked in to me.

  • @paulmakesthings
    @paulmakesthings 4 роки тому

    Thank you so much! Really appreciate your videos

  • @laminairfpv5243
    @laminairfpv5243 5 років тому

    I can't wait to try out all this new stuff thanks man.

  • @KamilK3
    @KamilK3 5 років тому

    Interpolated Feedforward is one feature i literally can't wait to try :D It looks sweeeeet

  • @KamilK3
    @KamilK3 5 років тому +2

    And i ALSO want to say for all of you to watch out and be carefull when increasing PID Sum Limit, because i had motor desync on my 5-inch quad yesterday during second pack after increasing PID Sum Limit from 500 to 750, when from whole one year (since i changed motors to BH R3) i didn't had NOT EVEN ONE desync. Blackbox confirmed that one motor command maxed out, and quad fell of the sky rolling. That was during snap roll. And yesterday my PIDs were not even that high, for sure much lower than PIDs of Mark from UAV Tech. But i change my PIDs all the time and never such thing happened, PID Sum Limit was only other thing i changed that day, so yes, be carefull when tinkering with that. I lowered mine to 600 and it seems OK after 10 packs, but i may lower it down further to default today, just for peace of mind

  • @edouardmalot51
    @edouardmalot51 5 років тому

    one more super great video, thanks so much for sharing your knowledge

  • @steveallam
    @steveallam 5 років тому

    Mark you rock keep it coming when I get back home I’m got to send a little something😎 I’ll let you know on my next reply!

  • @Washtechna
    @Washtechna 5 років тому +1

    Thank you so much! This helps a lot. Please consider doing the same thing with 6S.

    • @uavtech
      @uavtech  5 років тому +1

      it is all the same.

    • @tehllama42
      @tehllama42 5 років тому +1

      The difference tends to be that with good motors, your motor saturation can have a bit more headroom, but it's the same overall concept and the process is very much the same. With big stators and big batteries, it's usually possible to have less bounceback out of the box, and the optimum tuning window should be slightly wider. Downside is that you go from warm-ish motors to blazing hot motors much more quickly in my experience, so iterative steps are a must.

  • @BrandonBeans
    @BrandonBeans 4 роки тому

    On betaflight 4.2.3, I notice that the Feed Forward trace seems to stay active even after setpoint returns to zero, sometimes causing overshoots. I've been lowering the stick response slider and turning up ff_boost or even turning down ff_smoothness to get a little tighter response. Is this the correct way to avoid FF related overshoots?

  • @David__
    @David__ 5 років тому

    Great explaination! Thanks for sharing :)

  • @theronin48
    @theronin48 4 роки тому

    Been going through all of the PID Tuning videos and it's been great! Much is predicated on your starting D of 45-ish and D Min gain of 15. I think you suggested these were good starting points for a typical 6S 5" quad. What would you recommend for a typical 6S 7" long range (900g) and for a typical 3S 4" toothpick (250g)? Is it generally linear? Thanks again.

  • @tehllama42
    @tehllama42 5 років тому

    This is such a comprehensively different tuning regime than I'm used to. I really feel like I'm flying the laziest most inaccurate quads ever after seeing this, but it obviously works for me. This clearly works for making really smooth footage, but that's pretty rad overall.
    I do know that a big contributor is that I'm mostly flying terribly overpowered setups (2208 motors on 5" props with racing frames), this has me wondering how much low-hanging fruit improvements are possible, especially since I really only care about the

  • @bigrussfpvhell0
    @bigrussfpvhell0 5 років тому

    Great vid bud.

  • @Squirrelses
    @Squirrelses 5 років тому

    Are there any differences or additional considerations when tuning a low KV, larger prop rig (e.g 4S or 5S, 1600-1750KV with 6 or 7" props)? For instance, I have to watch motor temp closely with raised D-term. Or is this a mechanical mismatch and the motors can't deliver the torque to track set-point? Great series!

    • @uavtech
      @uavtech  5 років тому

      The principles are the same regardless of rates, size, motors, etc..
      At what point your motors hit saturation you will have to see. Always watch motor temps in stepped response tuning. They get hot quick due to load placed on them repeatedly to blip and flip.

  • @FPVQuadModz
    @FPVQuadModz 3 роки тому

    @Uavtech, It seems to me like this is the step in the tuning proccess where you really start to pay the price for a heavy quad. A heavy quad will hit motor saturation faster as it takes a larger and faster response from the motors to follow right on setpoint.

  • @parallaxxparallaxx8278
    @parallaxxparallaxx8278 5 років тому

    Thanks for your amazing PID tuning videos! Where can I find the latest version of LUA script you're talking about?

    • @uavtech
      @uavtech  5 років тому

      github.com/betaflight/betaflight-tx-lua-scripts/releases

  • @Mateyhv1
    @Mateyhv1 5 років тому

    Hi Mark, I found an interesting trouble in my tune. After setting everything, Pids, FF, D boost, D gain and having a nice set, I found a big gap between setpoint and gyro (roll & pitch) on return to 0% caused by the couple of active motors maxing out consistently on 50% even with as high pid sum as 250. After some tests appeared that culprit might be having Airmode off. Once activated everything changed drastically to worse. Although motors now crossed the 50%, pitch and roll graphs are a big mess with lot of spikes on rise and fall and even bouncing on almost every stop. Since fast roll and pitch are always on zero throttle airmode is quite aggressive there... What do you think about it? Thanks

  • @Politicallyhomeless957
    @Politicallyhomeless957 4 роки тому

    How relevant is this with the changes in 4.1? Thanks brother! Oh, BTW I know you never answered my trouble shooting question but I got it all sorted out 👍 Have you heard about this glitch in BL_Heli32 where some ESC’s after you flash get temp control turned on? That’s what ended up being the issue with the CLracing F7 I was struggling with

    • @uavtech
      @uavtech  4 роки тому

      Temp control in the FC? Or you mean ESC I'm guessing?
      Using D_min to help control overshoot is still relevant. Just less needed in 4.1 with FF 2.0 changes. You can see Dmax is built into the 4.1 sliders similarly.

  • @SteveCEvans
    @SteveCEvans 5 років тому +3

    Second question: On my 6" quad I got awful bounce back on yaw even though roll and pitch are tracking beautifully. Is it safe to add D on yaw as by default its zero? Once roll and pitch are sorted should we follow the same process for yaw?

    • @Mateyhv1
      @Mateyhv1 5 років тому +3

      Yaw works different from pitch and roll wich are driven by props thrust. Yaw is driven just by motors torque. The mechanical system is different thus rendering D useless. For yaw I is pushing the quad in fact acting like P and P on yaw acts like D. You can safely rise I to 100 and P to whatever value between 50 and 100 and watch blackbox for sharp stops. Yaw has much less authority over the quad than pitch and roll but again the limit is the mechanical capacity of the motors and hitting 100% motor on a yaw movement is that limit.

    • @uavtech
      @uavtech  5 років тому +1

      AGREED!
      Look at your I term on Yaw. Maybe it is dragging your quad to overshoot on yaw. If that is the case, add more P to Yaw

    • @SteveCEvans
      @SteveCEvans 5 років тому +1

      @@uavtech Here's an image of the overshoot on yaw. How would you interpret this? photos.app.goo.gl/9zJsL4CHDuQhQsLP6 Thanks.

    • @uavtech
      @uavtech  5 років тому +3

      Yep, you need to increase P to stop overshoot: See www.screencast.com/t/OwqmGKuVt
      once you close the gap on Yaw Setpoint, I don't accumulate so much and cause Yaw to overshoot.

    • @SteveCEvans
      @SteveCEvans 5 років тому +1

      UAV Tech Cool, thanks very much 👍🏻

  • @SteveCEvans
    @SteveCEvans 5 років тому +1

    Once the previous steps are complete raising FF until the delay is eliminated and then raising D (I was cautious and raised it gradually!) to kill overshoot really gets the tracking spot on. :) What I'm left with now is very well behaved R&P axis on both a 3" and 6" quad. The latter (a retro Blackout 330) is clearly underpowered as the motors hit their limits. The 3" (Diatone R349) only hits 80% power. Should I be aiming to push P&D up, in proportion, until I'm hitting the limit?

    • @Mateyhv1
      @Mateyhv1 5 років тому

      Thats a good idea, but watch your motors temp, raising Dterm will overall make it more nervous in all flying situations and your motors will run hotter. The problem is if your mechanical get worse (eg. after a crash, damaged props, etc) Dterm might get the motors really hot to the point of burning them, so be careful.

    • @uavtech
      @uavtech  5 років тому

      Agreed. D-term over 50 is a pretty high gain for constant.

  • @DerImmo
    @DerImmo 5 років тому

    Mark, best PID videos on the whole i-net. I'm missing principal video #3? Has it been blocked for us Germans or am I missing something?

    • @uavtech
      @uavtech  5 років тому

      I kind of skipped it since i started with my D-gains of 45 for my P-gains tuning. Let me go back and cover something there just to clear up.

  • @rudged
    @rudged 5 років тому

    Hi Do you recommend setting the Anti-gravity to 10 000 ?

  • @tehllama42
    @tehllama42 5 років тому

    This makes me wonder if using the FeedForward value to be an additional scalar modifier on the D_Min calculation would actually have value - basically telling D gains to bias towards D-Min depending on how active the feedforward is, with a threshold and weight factor, since I can't think of an instance where we really want those both high at the same time.

  • @kevinc4524
    @kevinc4524 4 роки тому

    As always great video! But how do you get the "actual D" component in BBE?

    • @uavtech
      @uavtech  4 роки тому

      Pre-filtered?
      You cannot. But can see in pid toolbox

    • @kevinc4524
      @kevinc4524 4 роки тому

      Just curious as to what my d-gain is doing, like what is it maxing out at? Propwash is mostly gone, but still, just curious more than anything.

  • @heggy_fpv
    @heggy_fpv 4 роки тому

    thank you. how important it is for tuning to set custom mixer for not true-X frames - deadcat for e.x.?

    • @uavtech
      @uavtech  4 роки тому +1

      No if you tube per tiny.cc/pidtuning (per axis).

  • @STEDDiEFPV
    @STEDDiEFPV 3 роки тому

    I know you now prefer to have d_min off on 5" quads, what's your reason behind it? I have a well tuned quad that follows setpoint very well, except at the end of flips and rolls (mostly rolls, it's a stretched X miniquad) and I am wondering if playing with d_min and d_max would help the bounce back at the end of flips and rolls. As you can tell, I am going through this playlist again :)

    • @uavtech
      @uavtech  3 роки тому

      If on 4.2, you shout jot need D_min to help with overshoot control and higher FF amounts. I don't use D_min personally anymore as it is just another layer to deal with. I just get D-gains as high as they can be and that seems to produce the best results.

    • @STEDDiEFPV
      @STEDDiEFPV 3 роки тому

      @@uavtech I prefer to run as little filtering as possible, on both gyro and d terms and therefore I’m limited by how much I can raise d before getting into trouble. I think the overshoot I’m getting at the end of flips and rolls is a mechanical limitation of the setup, I see some motor saturation, then a spike on P term which causes the overshoot. I’m running fairly low D on both pitch and roll, I’m currently at 35 so not a whole lot of dampening. I could play with lowering the rates a tiny bit, or being smoother when returning to center stick. I have a very similar setup (only difference is ESC and motors) and that one tracks the set point much closer at the end of flips and rolls. I think it’s definitely mechanical.

  • @choppergirl
    @choppergirl 4 роки тому

    Maybe we need some feedback sensors on quads, so they can do this all automatically via software over time. This method is like trying to get the front end alignment toe in / toe out on a car just right and all the squirreliness out by driving it a lot, stopping, tweaking back and forth forever, trying to gauge the wear on your tire tread, instead of using a tape measure, or better, a front end alignment machine down at the tire place. Someone could probably build a machine to tune quads, that you just put it in a thing like they dyno cars, connect it to a computer and vibration sensors, and run the automated program.

    • @uavtech
      @uavtech  4 роки тому

      May have tried, many have failed. Folks are looking at Ai now for this, but ...
      See the 2-Pack tune video. A little simpler with the Sliders, but still trial and error.

  • @aquiles037
    @aquiles037 4 роки тому

    I have the same motor saturation causing gyro lag behind the setpoint. Would props make a difference or help with this? I'm using the Azure Power Johny fpv props and its obvious these don't create as much power as other props.

    • @uavtech
      @uavtech  4 роки тому +1

      Props make a difference. Lower pitch props are better for prop wash performance, but do then require higher PID gains for controll authority. That should equal out for gyro lag. So in the case of motor saturation, that comes down to quad weight and raw motor power (stator volume, magnet strength, magnet gap, etc.)

  • @RahmatHidayat09
    @RahmatHidayat09 5 років тому

    can't find the pid tuning step number 3. Or am I missing something?

  • @pippifpv
    @pippifpv 5 років тому

    Why doesn't bb-log explorer come with any presets when downloaded and installed? Instead of having to download yours or some one else's trace templates?

    • @uavtech
      @uavtech  5 років тому +1

      Unknown. Maybe because i need to submit as PR? Lol

    • @pippifpv
      @pippifpv 5 років тому

      @@uavtech that would be great. Even a basic setup would be better than nothing

  • @STEDDiEFPV
    @STEDDiEFPV 3 роки тому

    What is reduction factor? I have not come across that in BF yet

    • @uavtech
      @uavtech  3 роки тому

      Hummm... what minute count?

    • @STEDDiEFPV
      @STEDDiEFPV 3 роки тому

      @@uavtech 2:06 and then again you reference that on a screenshot towards the end.

  • @kampkrieger
    @kampkrieger 4 роки тому

    Is the D-term really fighting any motion? Or is it fighting motion change relative to how far it is off?

    • @uavtech
      @uavtech  4 роки тому

      Nope. All motion. It is the dampening force.

    • @kampkrieger
      @kampkrieger 4 роки тому

      @@uavtech u say that if my sticks say 500deg/sec and the gyro says 500deg/sec that the D-term is fighting it. or do you say that any change in motion(rotation speed) if fought by D-term. The latter is what i think it is

    • @uavtech
      @uavtech  4 роки тому

      Maybe best way to say is any Acceleration is fought by the D-term (change in motion).
      Exactly like a shock absorber on your car. Sorry for the confusion.

  • @pippifpv
    @pippifpv 5 років тому

    Yes... Part 4 is here....

    • @uavtech
      @uavtech  5 років тому +3

      Finally, right. Been a busy month. Always is: anniversary; vaca; 4th; two birthdays; other kids birthdays; mother-in-law ran over her leg; works is slamming with deadlines; summer fun at the pool; summer events; etc...
      love it. but busy. Sorry for the delay.

    • @pippifpv
      @pippifpv 5 років тому

      @@uavtech don't be sorry. I know the run. With just one kid, and working overtime, trying to get ahead before vacations begin. It's a struggle

  • @trinitylynn4689
    @trinitylynn4689 5 років тому

    I did everything and got my p and d ratio and as soon as I use any feed foward it does the terrible trilling noise and flys off and also if I start to land and bump the ground same thing and tries to fly off

    • @uavtech
      @uavtech  5 років тому +1

      sound like a TX jitter issue. Increase deadband.

    • @trinitylynn4689
      @trinitylynn4689 5 років тому

      @@uavtech I am using frsky but in not sure about how to do the rx deabband so go up or down with it to get it where it work best

  • @upplsuckimcool16
    @upplsuckimcool16 4 роки тому

    I remember you saying in a video that iTerm in Betaflight is actually 3x what the value you set it to is......... My friend swears to me that you actually said it's FF that is tripled NOT iTerm... so I been scouring your videos trying to figure out where you said it.......
    I'm proly not gonna be able to find it. Can you just tell me ;>
    Is iTerm triple what you set it or is FF? Or am I just bugging and you've never said anything like this?

    • @uavtech
      @uavtech  4 роки тому

      i-Term now has a 2.5x multiplier ON YAW (ONLY) as of BF 4.0 in the background. It was recognized how fundamental i-Term is at playing a roll to get Yaw moves to kick in and sustain and that previous i-Gains were just way to weak to make it track the sticks accurately. Hence the change. You can really notice the betterment when going back to and older version, yaw moves lose all there kick and are very sluggish unless you max out the i-Gain to 255.

  • @antdx316
    @antdx316 4 роки тому

    so max out feed forward and turn off i term relax??

    • @uavtech
      @uavtech  4 роки тому

      If you have good tracking of Setpoint with good pid tune and use of FF, then i-Term Relax should not really activate.

    • @antdx316
      @antdx316 4 роки тому

      @@uavtech I tried with maxing out the feed forward but it felt dangerous.

    • @uavtech
      @uavtech  4 роки тому

      @@antdx316 , FF goes up to 2000. What do you mean by maxing out?
      You need a decent RX signal smoothing with higher FF values too. What TX are you using (what Protocol)?

    • @antdx316
      @antdx316 4 роки тому

      @@uavtech DX8 SRXL2 11ms

  • @trinitylynn4689
    @trinitylynn4689 5 років тому

    Please help me and I also have another quad on my pitch I have my p at 100 and still have bounceback with 55on d

    • @uavtech
      @uavtech  5 років тому +1

      make sure I-term Relax is enabled.

    • @trinitylynn4689
      @trinitylynn4689 5 років тому

      @@uavtech I have it enabled followed everything you have in your video also what would you suggest the cutoff to be on it at 11 now

  • @reptethetetlen
    @reptethetetlen 5 років тому

    Obviously, there are two FC's installed

  • @Ger.FPV2023
    @Ger.FPV2023 5 років тому +1

    Lol, Could you do this same tutorial but for noobs like me?😁

    • @uavtech
      @uavtech  5 років тому +1

      Check out: ua-cam.com/play/PLcYNkvInloJGMXvYQOaTO2Wtqqx06FEX5.html
      And make sure to start from part 1 on the series as well.

    • @Ger.FPV2023
      @Ger.FPV2023 5 років тому

      @@uavtech You are the best!😁 Thanks very much for those links🍻🍻

  • @Sugar_K
    @Sugar_K 5 років тому

    this will be totally redundant in 2 months ;D

    • @uavtech
      @uavtech  5 років тому +1

      Yeah, Yeah. Interpolated FF STILL no merged.

    • @Sugar_K
      @Sugar_K 5 років тому

      UAV Tech interp FF isn’t the answers on it’s own.. you should drop into the ‘werks and get a hex to fly

    • @uavtech
      @uavtech  5 років тому +1

      @@Sugar_K , i know it. need to find more time. it will slow down soon i hope. With this, folks should hopefully be caught up (enough) on tunning and FF/D_min use so we can move on.

    • @bigrussfpvhell0
      @bigrussfpvhell0 5 років тому

      @@Sugar_K what's werks?

    • @Sugar_K
      @Sugar_K 5 років тому +1

      Big RussFpv it’s where the magic happens 😉

  • @skyweaver3199
    @skyweaver3199 3 роки тому

    4 gyros lol!

  • @Denis_3301
    @Denis_3301 5 років тому

    Betaflight geek tuning is hard as fu+$!!! Cant stand no more T_T

    • @uavtech
      @uavtech  5 років тому

      Fly defaults bro! Or presets: github.com/betaflight/betaflight/wiki/Community-Presets
      . You don't need to insult others because of your hangups.

    • @Denis_3301
      @Denis_3301 5 років тому

      @@uavtech sO-orry

    • @Denis_3301
      @Denis_3301 5 років тому

      @@uavtech am i insulting anyone?

    • @uavtech
      @uavtech  5 років тому

      Yes, I kind of think so. The comment implies to me that anyone that is willing to spend some time knowing how things work and taking the time to get peak performance is a geek. Calling someone a geek is generally not a compliment.
      I'm guessing you were watching and it was over the head, you got frustrated and lashed out with a comment? Why do that?

    • @uavtech
      @uavtech  5 років тому

      Yes, I kind of think so. The comment implies to me that anyone that is willing to spend some time knowing how things work and taking the time to get peak performance is a geek. Calling someone a geek is generally not a compliment.
      I'm guessing you were watching and it was over your head, you got frustrated and lashed out with a comment? Why do that? If you have a question ask. Don't try to put others down to pick yourself up. Obviously, this channel is "how things work" content and how to get the best out of your rig. So if not interested, that's cool, but just leave it at that.