0
$\begingroup$

As already mentioned the PID output values that correspond to the error from the desirable error and current error has no units. Let's say we are using only the proportional part of the PID. Is it better to map the output of the PID values to the corresponding thrust values on each motor, or is it better to increase the Proportional coefficient Kp until the output values correspond to the proper thrust value to the motors?

For example if my desired angle is 0 and the angle that the sensor is reading is 40 degrees the difference is multiplied by Kp and the output is added or subtracted from the current thrust depending on the motor.

If I increase Kp too much, then the quadcopter is oscillating and not listening to the controller command that I am sending for the desired degrees from the joystick. If I map the values then it is listening to the joystick commands and not oscillating so much. Why is this happening? Isn't mapping the PID output values to bigger values the same as increasing Kp?

$\endgroup$
6
  • $\begingroup$ Let's say we are using only the proportional part of the PID, is the quadcopter actually using only the proportional part of the PID? $\endgroup$
    – Shahbaz
    Dec 10, 2014 at 11:33
  • $\begingroup$ Yes it does i checked it.. $\endgroup$ Dec 10, 2014 at 13:03
  • $\begingroup$ What do you mean by mapping "the output of the PID values to the corresponding thrust values" ? $\endgroup$
    – Eugene Sh.
    Dec 10, 2014 at 15:34
  • 1
    $\begingroup$ @EugeneSh., I think he means multiplying the output of the controller by some value. @monakons, it may not be bad to tell us "how" you checked it. If you multiply the output of a P controller, or multiply it's Kp both by the same value, nothing should change. So either it's not a P controller, or you are not transforming the values in the same way. $\endgroup$
    – Shahbaz
    Dec 10, 2014 at 16:42
  • 1
    $\begingroup$ What do you mean by "the output is added or subtracted from the current thrust depending on the motor"? That seems suspect. $\endgroup$
    – Ian
    Dec 11, 2014 at 20:08

1 Answer 1

1
$\begingroup$

I think you have inadvertently created a controller using a Ki only term. It appears that your Kp term is used by summing it onto the current (last cycles) output. This is effectively creating an integral output. You need to directly output the Kp term and sum it with a separate Ki term if needed.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.