I'm developing/tuning a software PID for a quadcopter. For now I'm only trying to stabilise the pitch angle using the front and back motors, and I'm only looking at Kp. The motors have a control resolution: input variations need to reach a threeshold to have any effect at all.
The process output does reach the setpoint, but not precisely enough for my requirements. There is no steady-state error (aka droop), the hunting range is centered on the setpoint, just too wide for my requirements. Also the instability is not an oscillation, but more of a random drift which needs to be large enough before the PID attempts to correct it.
- With a lower Kp the output needs to diverge from the setpoint significantly before the error is big enough for the PID to attempt to correct it.
- With a higher Kp the PID oscillates.
I could not find a reasonable compromise.
I'm thinking about applying the cuberoot function (or similar) to the error before feeding it to the PID: that way small errors should be significant enough for the PID to attempt to correct them, and large errors would be reduced and might not trigger oscillations. I suppose someone must have been through this before: is this a good solution? Are there any better alternatives?
This is not a steady-state error (aka droop) or oscillation issue as far as I can tell: please don't suggest using Ki or Kd
EDIT: I have clarified the problem description and suggested using cuberoot rather than logarithm which was a bad idea indeed.
Thanks, Marc.