Higher PID values make it *less* responsive?

Post Reply
User avatar
phenolic
Posts: 81
Joined: Fri Sep 21, 2012 10:31 pm

Higher PID values make it *less* responsive?

Post by phenolic »

I'm a n00b and tweaking my first quad. I'm running MultiWii_shared (latest as of today). I can crank the P way up to 10 or 11, maybe higher before I get oscillations but the higher I make P the slower the quad responds. At a P of 2.5 it's very agile, stable and has quick response. With a P of 9 it's like flying in molasses, very slow response even with full stick movement.

I find the yaw PID also has to be lowered to give me a quicker yaw rate.

Is this the way it's suppose to be? I can't figure why it would be recommended to have higher P for acrobatic flight when it's actually less responsive.

vpb
Posts: 231
Joined: Mon Jul 23, 2012 4:09 pm

Re: Higher PID values make it *less* responsive?

Post by vpb »


copterrichie
Posts: 2261
Joined: Sat Feb 19, 2011 8:30 pm

Re: Higher PID values make it *less* responsive?

Post by copterrichie »




This is very extremely good. Thanks for sharing.

User avatar
phenolic
Posts: 81
Joined: Fri Sep 21, 2012 10:31 pm

Re: Higher PID values make it *less* responsive?

Post by phenolic »

That is a useful video but I fail to see how that answers my question. In fact it's showing the opposite of what I'm seeing which is why I asked the question in the first place. It specifically states that too low P gain is slow response yet I see a faster response at lower P gain.

doughboy
Posts: 252
Joined: Tue Sep 04, 2012 7:20 am

Re: Higher PID values make it *less* responsive?

Post by doughboy »

if this is for acro mode, the PTerm is just the rc value

PTermGYRO = rcCommand[axis];
PTerm = PTermGYRO;

The P value is used to reduce the effect of I

and D value is negative in multiwii


this is all different from the conventional definition of PID, say from wikipedia

Code: Select all

previous_error = setpoint - process_feedback
integral = 0
start:
  wait(dt)
  error = setpoint - process_feedback
  integral = integral + (error*dt)
  derivative = (error - previous_error)/dt
  output = (Kp*error) + (Ki*integral) + (Kd*derivative)
  previous_error = error
  goto start


P value is used as denominator, hence the larger it is, the smaller its effect, hence less responsive
error = rcCommand[axis]*10*8/conf.P8[axis] ;

crashlander
Posts: 506
Joined: Thu May 05, 2011 8:13 am
Location: Slovenia

Re: Higher PID values make it *less* responsive?

Post by crashlander »

Hello,
higher P will increase stability and that is good for all flying types, but higher P will normally also fight against your stick inputs, so ti will look like less responsive.
And that is the main reason that you have RATE setting for roll, pitch and yaw and also T.P.A. for throttle, those values (when increased) will lower P influence when sticks are not centered and will make multi more responsive.
You also have RC Rate that can be as high as 2.5 and that will also increase multi responsiveness.

So for hard-core acro (with flashed ESC) you can have P as high as 8 or 10, and than set roll, pitch rate at 0.9 (or higher), RC rate at 2.5 and you probably will not miss responsiveness, but still have crisp response (immediate stop of rotation when sticks centered). :)

Regards
Andrej

User avatar
phenolic
Posts: 81
Joined: Fri Sep 21, 2012 10:31 pm

Re: Higher PID values make it *less* responsive?

Post by phenolic »

doughboy wrote:P value is used as denominator, hence the larger it is, the smaller its effect, hence less responsive
error = rcCommand[axis]*10*8/conf.P8[axis] ;


Ah, thanks for the technical explanation. I suppose I need to look at the code to figure out what exactly it's doing with all those values. As if the topic wasn't hard enough as it is, a bunch of the documentation, wiki, howto's, and forum posts offer conflicting explanations, wording, and descriptions. It's very annoying and confusing. I don't even know if I can trust the main MultiWii page documentation as it seems to be out of date compared to the current code.

crashlander wrote:So for hard-core acro (with flashed ESC) you can have P as high as 8 or 10, and than set roll, pitch rate at 0.9 (or higher), RC rate at 2.5 and you probably will not miss responsiveness, but still have crisp response (immediate stop of rotation when sticks centered). :)


And thanks for the practical explanation. I think this is part of the information I was missing. Although it seems that with P higher than 2.5 my quad has a tendency to fly upwards as it moves in one direction and it shoots upwards fast whenever I come to a stop/reverse direction.

Another thing I need to look in to is if my MPU-6050 is having any effect. Supposedly it has a much faster sampling rate than the older gyros and accelerometers. I don't know if MultiWii is actually using the higher rate though. I'm wonder if this changes what I need to use for the "I" term.

chris ables
Posts: 317
Joined: Wed Feb 08, 2012 8:42 pm
Location: United states

Re: Higher PID values make it *less* responsive?

Post by chris ables »

your mistaken on what it say's about p value response ! A lower P makes the gyro's response slower and not aircraft ! A slower responding gyro will cause a faster response aircraft ! I like to think of it as tighter or looser ! A lower P makes aircraft looser and in return it's faster on response ! A higher P value makes gyro tighter and in return makes aircraft response slower ! Hope this helps you !! :D

User avatar
phenolic
Posts: 81
Joined: Fri Sep 21, 2012 10:31 pm

Re: Higher PID values make it *less* responsive?

Post by phenolic »

chris ables wrote:your mistaken on what it say's about p value response ! A lower P makes the gyro's response slower and not aircraft ! A slower responding gyro will cause a faster response aircraft ! I like to think of it as tighter or looser ! A lower P makes aircraft looser and in return it's faster on response ! A higher P value makes gyro tighter and in return makes aircraft response slower ! Hope this helps you !! :D


Thanks. Yes, I'm finding that out. Most descriptions are not clear enough and use confusing and/or vague wording. But I'm learning. :)

doughboy
Posts: 252
Joined: Tue Sep 04, 2012 7:20 am

Re: Higher PID values make it *less* responsive?

Post by doughboy »

phenolic wrote:
Ah, thanks for the technical explanation. I suppose I need to look at the code to figure out what exactly it's doing with all those values. As if the topic wasn't hard enough as it is, a bunch of the documentation, wiki, howto's, and forum posts offer conflicting explanations, wording, and descriptions. It's very annoying and confusing. I don't even know if I can trust the main MultiWii page documentation as it seems to be out of date compared to the current code.


I learned quick enough to only rely on the source code as the most definitive and authoritative documentation.
the code can be updated many times a day, but documentation almost never get updated.
but even reading source code is not enough, as I find many of the developers never add any comment.
for general logic, that is not a problem. but not for equations where you don't know why they divide by 8 or why they divide by 4096.
I'm guessing the code probably was just copied from somewhere and the person who made the change did not know why either. if they do, it won't hurt to go back and add comments.

------------
Go Giants!

Post Reply