Out of the Box Innovations
  • Contact

PID TUNING

2/14/2017

0 Comments

 
Tuning PID's image

Tuning, a simple
​theory Guide

Tuning, the bane of most peoples adventures in quad-copters. But, from what I can see, it doesn’t have to be. There are many places to go for videos on the subject and I’ll include some of those toward the end of this post. But, I’m hoping to give a straight forward simple guide to tuning. The video version of this will be coming out sometime in the next couple of months.
I, myself am new to it, and so I’m speaking as a beginner, but as I see it, we all have to start from somewhere and some might appreciate some simple concepts to understanding what seems like a huge issue. I had the large fortune of talking to some very knowledgeable people and one Zack Schiffelbein‎ took some of his valuable race prep time between heats to go over some basics with me that I’ll be putting into practice with a few of my rigs.

ASSUMPTIONS: 
I’m writing this article based on a couple assumptions.  One, that you’ve had some kind of flying experience either on a FPV simulator, or actually flying a quad copter so you can at least hover and do some basic line of sight flying. Two, that you have researched the basic set up for your hardware and have a flying platform to start from. Three, this assumes you’re applying this theory to ACRO mode. Any other mode you’ll be fighting the want for the computer to continue to control the horizon, so we just aren’t going there this time around. Fourth and last, that you don’t take this as the Bible of tuning, but simply just here to get a simple understanding of what you’re going to do and why.
NOTE:
I can’t tell you specifically on your particular equipment so I’m not going to try. This is really all about theory and what I’ve seen for myself. This is just a basic overview of the theory behind PID tuning. You’ll still have to research how to approach your particular set up.
PID mathematical formula
P : Proportional : Wikipedia defines this as the following ; In the proportional control algorithm, the controller output is proportional to the error signal, which is the difference between the setpoint and the process variable. In other words, the output of a proportional controller is the multiplication product of the error signal and the proportional gain.
Translation: Snappy rotation. Simply put, this gets the bird to the desired angle as quickly as possible.
I : Integral : Wikipedia defines this as the following ; is defined informally as the signed area of the region in the xy-plane that is bounded by the graph of f, the x-axis and the vertical lines x = a and x = b. The area above the x-axis adds to the total and that below the x-axis subtracts from the total.
Translation :
 Keeping your desired rotational angle.  In other words, as you fly you want to keep your heading and angle without interference from prop-wash, wind, etc, so this is how you correct that.
D: Derivative : Wikipedia defines this as the following ; The derivative of a function of a real variable measures the sensitivity to change of a quantity (a function value or dependent variable) which is determined by another quantity (the independent variable). Derivatives are a fundamental tool of calculus. For example, the derivative of the position of a moving object with respect to time is the object’s velocity: this measures how quickly the position of the object changes when time is advanced.
​Translation :
 Minimizing the bounce back from putting your bird in a particular angle. So, as you flip or do a sharp turn, the D will minimize the amount of bounce you see in your goggles.  However, you really want this to be minimal!! More on that in a moment.
Illustration showing axis on quad
A little understanding before we begin
To know where to start, we need to understand some basic terminology to be sure we are all on the same page. Particularly the rotations. In the diagram above we see the VLX230 listed with the different rotations it’ll have in flight.
Yaw, is left to right rotation without tilting. Just nose left or right.
Roll, is when you tilt the quad left or right to move left, right or to roll.
Pitch, moves you forward or backward by titling forward and backward respectively.
Cool, now that we have that understanding let’s start!
 Where do I start?
Depending on the equipment you have at hand you might approach this differently.
Transmitter
Transmitter: Zack spent a little time and set up some switches on my Taranis so that the left side handled my Pitch PID, and the right switches handled the Roll PID. He also set up another toggle next to those to move them up or down respectively. So, as he would tune the P of the roll, the switch would be set to P position and then move the value up or down as needed until it was set. He then would position the sticks so that the value was saved before powering down the Taranis or it would lose the value that was set. Then he’d move on to the D and then finally I values until it was all finished.
Laptop
Laptops: A simple laptop and a little patience. Another approach would be to move your values up a small bit at a time through a lap top in the field and then test fly your bird. This is a little slower, but still reasonable way of doing it.
Tablet
Wireless devices : Some software can be done the same way as a computer but done on a cell phone or tablet. It just depends on your software and hardware.
Blackbox
Blackbox : Some FC’s will have an option of a “black box” which records the flight characteristics and details of the flight that are not visible to the human eye. Being able to look at actual data from the quad itself can provide invaluable feedback and get that level of tuning that you just can’t get from visual line of sight flying. For simplicity sake, we won’t be going into it in this article.
Have another way of doing it? Please tell me so I can add it to the list!
Okay, so I have the hardware and software ready to go,
what’s next?
Betaflight page
Basic numbers
Well, for the most part, it seems that MOST software like Betaflight, Cleanflight, etc.. already have stable numbers to start with. This, of course, will also be dependent on your particular frame / motor / ESC / and Flight controller hardware. But again, for the most part, you should be able to flash your FC and then hover your bird. Beyond that, we’ll need to tune. So, that’s where we start.
Look at the numbers. Record them. I’m going to approach this as those I’m doing this all on the computer. Try to get a sense of what 20-30% of the values would look like. Again, make note of those numbers. As you tune more and more rigs you’ll find that your sense of where the different rigs needs will become more second nature to you.
FPV Pilots
Ready for that first hover and observation 
​
Hover, adjust, repeat.
Test hover your bird. I’m doing this via Line of Sight (LOS).  What I’m looking for is how “snappy” the feel is. Does it move quickly into position? Does it seem to want to take forever? You test this with small flicks of the controls. Don’t just crank it over and hope for good results. I promise you won’t be happy. Just look at how the bird moves and go from there with small flicks left and right.
If it’s just wobbling all over the place, then a good place to start would be to lower the P gains. If it’s snappy, or lagging, take P up until it starts to wobble. Taking the notes of the 20-30% adjust your numbers accordingly up or down. Gross adjustments at first, and then get gradually smaller in % until you’re satisfied.  You want a tiny bit of wobble but not a ton. You’ll tune out some of that with D later.
Test hover your bird. Does it seem better or worse? Does it wobble more? Does it seem more “snappy”? Keep doing this just on the Roll until you are happy that it’s where it should be. If you’re operating a true X frame, then your Pitch value should be pretty close. If it’s a stretch, your pitch will be greater than your roll because of the distance between the motors in the pitch and roll axis.
Continue this process until you’re happy. Next, let’s move on the Pitch. Now the flicks should be forward and back and you’ll repeat the same process that you did for the roll until it’s about right.
Yaw, we really don’t need to mess with this. Most stock settings are fine, so for now ignore it for now.
Skip the I move on to D
Okay, so now you have a bird that is nice and snappy, but still wobbles a little on the ends. So, now it’s time for D.
Just like you did with the Pitch and Roll, you’ll adjust your D gain until the bird stops MOST of the wobbling at the ends of the turns. You just want a TINY bit to where it’s still snappy. Do note that you want the LEAST amount for D gain as possible. The lower the value, the better. But you don’t want to sacrifice P if you can help it, so it’s a balance. One thing to note is how warm your motors get when you’re tuning. If they are starting to get hot or really warm to the touch, you’re D is probably too high. Lower it immediately! If your bird is still wobbling too much for your taste, then back off the P of the axis in question by about 5-10% and then go back to tuning D. Again, lower is better.
Now your bird should be snappy and hitting the mark where you want it to be when you flick the controls.
Now it’s time for the I!
Pitch your quad forward and start throttling using pulses. Watch the quad. Does it start lifting the nose? Bring it back. If it does, then raise your I gain. You’ll repeat this process until the bird flies forward without changing it’s pitch value. Then, move on to the Roll by doing the same thing to the side. When you’re done, you can do a test hover and pulse your bird up and down and watch for it to drift one side to another. Continue to raise your values in 1-5% increments until you’re satisfied that it’s pretty well dialed in. NOTE: these quads aren’t GPS held, so I doubt anyone will ever get 0% travel unless you’re flying in a vacuum.
FPV Pilot
FPV Flying!Now that you have a pretty close dial feeling, it’s time for some FPV testing!
Fly, adjust, repeat.
Just like you started out with in LOS, you’ll start flying your quad and getting a feel for what those PID values look like when you’re flying FPV. Watch your screen as you fly and look for those wobbles. Again, if they are small, then increase or decrease your P until you are happy and then smooth it out with D to finish off the feeling.  When you’re happy with that, move on to the I and be sure that you’re not dropping or rising in either roll or pitch when you punch the throttle, when you’re satisfied that your tuning looks good, go fly! Tuning is such a personal feeling. If you want more control and are happy with it, then fly it!
Others might say that it’s too soft for them or that it’s too snappy. If you’re comfortable with it, then fly it. If you think it could use some tuning based on feedback from others, tune it until you learn a new level of flying or go back to what you were comfortable with. In the end, it’s all about what you can make your rig perform with to a level that you’re happy with.  Each rig will be unique and will require different tuning, so never take someone else’s numbers and think it’ll be the same with yours! Take the time to tun your rigs and you’ll be more experienced, have a better feeling for tuning in the long run, and be a better pilot for it! If you have questions, find people at your flight club that are experienced in tuning and ask their input and advice on how to continue forward. As I mentioned earlier, this is not a definitive article on how to tune so there is a lot of room for new ideas and processes!
Mind you, there are MANY approaches to this topic, so I hope you can keep that in mind and know that if you have a better way or some other input that would be helpful, then I’d love to hear from you and help share the information within the fpv community.


LINKS!Links to decent tuning videos. Be sure to watch for our tuning series coming out in the next couple of months!
0 Comments

    Categories

    All
    Education
    News
    Reviews
    Tips And Tricks

    Archives

    September 2017
    August 2017
    July 2017
    June 2017
    May 2017
    April 2017
    February 2017
    January 2017
    August 2016
    June 2016

Powered by Create your own unique website with customizable templates.
  • Contact