Linear vs Non-linear PID I values

Yes, those observations match out experience as well. And in order not to complicate things we try to stick with PID+C controllers similar to what @Barin said.

The trick would be to come up with the good value for “C”, sometimes called constant or holding power.

Since the PID comes up a lot around this time in the season, I don’t want to repeat here everything that was written in the older threads:

The quick summary would be that if you use pure PID to control your system, then “I” needs to estimate or “learn” amount of the resistance or power losses in the system that motors need to overcome. Depending on what you are trying to control, learning from zero could take a long time and may not even work for the wide range of target values using a single set of coefficients.

For example, estimating holding power for the arm holding weight at various angles is quite different from estimating “I” for drivetrain, where friction losses depend on the weight of the game objects that the robot is carrying.

My approach would be to use some sort of the feedforward model for calculating value of “C” or approximation for the initial value for “I” first, even if it gets you 80-90% of the way, and then use PID feedback controller to take care of the remaining 10-20%.

This way, in vast majority of cases, feedforward model takes care of the non-linear portion of the curve, and PID controller only needs to handle a small span around the target, which we could assume to be linear given the large tolerances that are acceptable for what we are doing here.

You didn’t specify in the original post what you are applying PID to, but since you mentioning large errors, I would guess that you are likely dealing with some sort of a lift where holding force would be:

f = sin(theta) * someCoefficient


similar to this example: The fabled PID - UNOFFICIAL Tech Support - VEX Forum

The simplest way to reduce the large errors would be to add feedforward controller based on the above formula.

Another approach would be to make the hardware as linear as possible (DR4B) with uniformly tensioned rubber bands (calculator), and then still model some physics, before handing it over to the PID.