During prop wash (when throttling up to change direction), the quad experiences oscillations in the gyro signal. Unlike stick moves where P and D fight each other, during prop wash both terms work together to fight the oscillation. This demonstrates why having strong P and D terms is beneficial—they can provide double the corrective signal when needed.
PD Balance & Gain Strength: Quadcopter Tuning Dynamics
Added:all right in quad flight performance we focus a lot on pd balance and pd gain strength these two sliders right here this is pd balance this is pd gain strength but why is that what aerodynamic properties of the quad and the pid loop and how it's reacting to things have these two things as being the core of what you need to have right for your quad to fly well well let's check it out okay i was just finishing up a 10-inch tune and i was scrubbing through the logs i was looking at a couple of these things and i thought this would be a really good way to kind of bring it together on why those two things are so critical so in this section of the log we're just doing a simple pitch forward move just on the pitch access so i slow this down 25 speed so you can see the move itself you can see it's just a nice smooth pitch forward so to darken up these traces what do we have here is we have the green is the stick so that's the step point right here the blue here is the gyro so that's the actual quad motion so as we move the sticks forward the set point moves up from a zero degree rotational speed you can see here here it's at 17. so here it's at one degree all the way up to around 800 degrees rotational speed you can see the gyro is actually 803 right at this exact spot so that's just the degrees per second rotation rate you know if we're at zero degrees per second it will hold that one that you move your stick forward saying hey to start to rotate forward at 800 degrees per second if you'd hold the stick forward obviously it would just keep rotating 800 degrees per second but we're telling it to start to rotate forward 800 degrees per second the pid loop reacts to tell it to do that the first thing we see here is we have the p term kicking in because we have a gap between the difference between where the sticks are and where the gyro is actually at that's proportionally so whatever that pit error is that's multiplied by the pit the p gain and it tells it to push it forward we also have some feed forward here as well you know telling it to go the same direction so if it's in the same direction as the set point that's pushing the quad into the move now you can see this d term right here is fighting that movement the entire time so it's the dampening force now if we go into here and add our motor traces you can see that when we go ahead and kick that into the move that the two motors in the back spin up so you can see there's they're not spun up here and there they start to spin up and go up to around 80 some percent and right at this spot you can see that the pit error is starting to close the gap so the p term starts to come down in strength but the d term is still strong well it's literally the pit sum right so it's the p this is a positive since the it's above the line here the the zero axis this is positive i terms a little bit positive here feed forward at this specific spot zero but it was positive when we were right back here right at this spot right here you can see that d term of the entire time is negative so as the p term comes down the d term is the most prevalent term and since your positive terms are going down like this is now 75 and b term's still 100 that it's actually the pit sum the motors the commands for the motors are actually instead of being a positive to roll forward it's actually telling it to be a negative to roll backwards and that kicks up the front motors so there's that balance that p to d balance is beginning the yang it's a very precise dance between those two gain values to have the appropriate response and it's this precise balance between the two that as the pit error starts to close as the gyro starts to come up and actually starts to reach what the set point you know the degrees rotation that your sticks are commanding that the d term is strong enough yet to then kick the other direction to dampen the move so it doesn't overshoot it so if we look at the pit sum which is this trace right here for the pitch axis you can see that spot where it's mostly positive commands you know the sum of the pid and feed forward are all positive so move the quad to go forward at this point right here precisely p term is still saying to move forward but d term is stronger there's more d term here so this is a negative 102 this is only 91.
so the pit sum actually starts to invert and it's now the total sum of of the pids you know you're just adding them together is now a negative number so that's going to say hey start to put on the brakes and then you obviously can see here that the motors are still spun up as it's starting to go into the put on the brakes mode then the front motor the back motors spin down the front motors spin up and it puts on the brakes so you can see is if we had too little d term this point this zero crossing point would slide this way so it would be more where my red marker is and if that's too far forward like that you're going to get that the gyro is going to overshoot the target and then have to oscillate and settle back on it that would be too little d term if you had too much d term then it would just slide this zero crossing point back further this way and it would actually put on the brakes sooner so you kind of slowly roll in to the set point to the target rotational rate now this quad is a 10 inch this is actually a little bit over dampened right in this spot this you can see it is kind of slowly rolling into it at this location but you know it's a 10 inches of the factors of play here with motor saturation so maybe this is the perfect example but hopefully you can get the gist of this zero crossing and how that pd balance is a ratio that's kind of quad specific can be access specific it's not an arbitrary number it is you know where your quad has enough push but also has enough dampening strength that it's not going to do its overshooting and that has to do with inertia moment of inertia the weight of the motor versus the center there's a lot of aerodynamic properties going into that but you can find that number and again that comes back to this pd balance slider right here now what we want to do is i've talked about tuning my tuning videos two pack tuning videos i'll make a link to that in the upper right is you want to have this slid down as low as you can so you want to have as much p term as you can but not overshooting and the reason for that is this next part so this next section here is going to be a prop wash turn so we're going to do the 180 degree turn and kind of sit back into it you can see the quad is going backwards and right here is where the prop wash is when i'm throttling up to then start going the other direction that's where you're going to get the prop wash not as you're just drifting back it's when you actually start to throttle up to arrest the move and go the other direction that's when you're going to get the prop wash to occur and let's look at that now in the previous example we showed how the d term is always fighting the p term right so as i entered that stick move they were always opposing each other i'll throw that graphic up there just so you can remind yourself and see that but let's look at the prop wash here so in this prop wash we have this oscillation this is the gyro signal right here so this is where it's starting to go off the set point you can see that the green line's the set point so i'm just you know this is just the roll axis just to simplify stuff but i'm not moving the sticks you know on the roll axis it's just sitting there but my gyro is starting to kind of it's kind of starting to roll and oscillate back and forth that's the watch now you can the hd you can't see anything because it's tuned but here you can see this little bit of oscillation start and notice the difference that the p term and the d term are pushing in the same direction so those two terms are working together to fight the oscillation in the prop wash that same thing happens for wind and that's why you want to have your p term as strong as it can be without having overshoot in those scenarios where they're opposing each other you don't want to have too much p term because then it would overshoot but you don't want to you don't want to be over dampened as well because then your p term could be a little higher you got to remember those two things are going to work together in prop wash moves they're also going to work together to mitigate any wind vibration on the quad so the p term and the d term when you're doing stick moves they fight each other but when there's outside influences on the quad like wind throttles prop wash whatever else they work together so you want them to both be as strong as they can be together but again when they're you don't want to have it overshooting oscillation so that that balance between the two as before that's called critically dampened that's what you want it to be in this scenario they're working together as the gyro is going down the d term is the first one on the scene to tell the motors to spin up to go the opposite direction to fight this coming down they want to push it to come back up and then the p terms coming along behind it to say yeah let's let's do that so it's giving double the signal you know these are both positive numbers here in this scenario so they are both pushing so 1.4 and the d term you can see is doing most of the work 18.6 so your d term is really the prop wash fighter they're both pushing in the same direction to get this gyro to come back up now as the gyro starts to approach the set point you can see now the d term flips over inside it actually tells it to start to slow down and break so now the p term and the determiner not fighting in the right direction the d terms the p term saying hey keep keep coming up keep moving this gyro signal up with the d sure saying no no slow down so as the gyro starts to go off track the p and d term work together to say don't know don't go off track but as the gyro starts to come back to where your sticks are at or the set point then the d term kind of keeps track and say okay well you're coming back to set point that's good oh you're going a little too quick now and it's going to reverse its sign so that it doesn't overshoot and kind of just comes right up onto the setpoint now here it does do a little oh shoot overshoot because there's aerodynamic stuff going on you know we're in the midst of the prop wash um but then it you know it does its thing to dampen that out and kind of quill that oscillation and again you can see that it's working well you can see the motors are you know oscillating you can hear the fluttering but you don't see it in the hd so that's all it really matters actually i don't see i don't see any prop wash there yeah so it's working pretty well so coming back to these sliders to wrap this up we have this balance between the two terms you want to have as much p term as you can so the slider would actually be moving down as low as it can be that you don't have overshoot when you're doing stick inputs then once you have that balance set then you want to be looking at your pd gain strength so that if you want to come back prop wash or have a little bit more control to increase your control you can move both those gains up together the p and the d since they work together to fight throbble to fight the outside influence of wind to fight crop watch they work the p and d work together so we can use this slider to basically increase control make the quad feel more locked in to that set point by bringing the strength of those two gains up together so as you're in some sort of scenario where the gyro is going to start to go off track of your sticks those two terms together as we you know we can increase their strengths here will push so that the gyro doesn't go off track and then as it's starting to come back on to the set point then that balance between the p and d term come back into play this pd panel slider here okay well that is it i was hoping this would be short and simple and to just underline the importance of these two key concepts and pit tuning and flight dynamics with quadcopters it's all about the pd balance and having that critically damped balance between the two and then this pd gain strength you know if you want to have more control if you if it's feeling sloshy and not locked in you just move this slider up and that's what it's there for and the sliders are there to make it simple that you know as whatever this pd balance is as you move this slider you don't have to worry about throwing this balance off that's that's locked in all by itself and then it just adjusts these numbers based on the math and just simple multiplication and ratios and it just slides these gains up you can see both at the same time of course sometimes people ask about the master multiplier slider it's basically the same thing as the pd gain strength one it just moves the i term with it and feed forward so this moves everything all at the same time whereas the pd gain it just moves the p into d and you can see it doesn't mess with the feed forward or the i terms so i don't use the masters much personally i generally leave these i terms here unless i have a really off balance quad where you know like that one i tuned the nine inch with the big huge rock on the front then you needed more gain strength so i move the master up but if your quad's fairly well balanced you don't need a ton of eye term so i usually just leave that one alone unless i need some more feet forward or something like that with that if you still do have any questions about this topic drop them down in the comments below thanks everybody and i hope this helped you
Up Next

Arduino-Based Quadcopter Flight Controller: 170-Line Code Explained
@carbonaeronautics
39.3K views•2022-10-05

RatSLAM: Biologically Inspired Robot Mapping and Navigation
@milfordrobotics
20.9K views•2012-08-03

How to Build a Self-Balancing Robot: Arduino Nano & MPU6050
@easytechzones
16.8K views•2022-03-09

Introduction to Robotics | Stanford CS223A Lecture 1
@stanford
744.4K views•2008-07-22
Related Study Plans & Knowledge Roadmaps
Structured learning paths in Robotics












![[세뇌탈출 3425탄] KF-21의 궁극적 파워|센서기반 비행제어|지구 최강의 변주·진화 기체|프랑스 군사매체 “F-16V와 F-15EX로 더 이상 사기치지 못 해~” - 1부](https://i.ytimg.com/vi/eyfVLsZSFbw/maxresdefault.jpg)























