Ziegler-Nichols with a high robot

Hello,
At the Programming subteam, we tried to use the Ziegler-Nichols method to tune the gains of a PID controller of the drivetrain of our 2018 robot. With this method, you need first to increase kP until stable oscillations occur.
However, our 2018 bot is pretty high like others. When we increase kP, we do not get stable oscillation, but a robot that almost falls.
Are we doing something wrong, or is it just that the Ziegler-Nichols method doesn’t fit with high robots? Thanks!

Anecdotally the Ziegler-Nichols method doesn’t have much of a place in FRC. It’s a fairly limited in scope law that doesn’t usually produce results that we’re looking for on FRC robots. The goal of Z-N is to get good disturbance rejection if you don’t care about overshoot or oscillation, whereas in FRC (especially on drivetrain) we care a good bit more about controlling overshoot and a low settling time.

Instead I’ll give you alternate advice: Use feedforward first, and tune second.

Ziegler-Nichols (and PID loops in general) assumes a very linear, first-order system. Drivetrains are not linear or strictly first-order. They have non-negligible static friction nonlinearity and significant kinetic friction losses. It’s possible to account (which results in a much better linear and first order approximation) for these using a 3 term feedforward (kS, kV, kA.) But if you try to tune drivetrain PID, or most PID loops, without a feedforward, you’ll have a very frustrating time.

Once your feed forward is set up, most of what you need is probably a small amount of kP and kD, which can be hand-tuned.

I agree with Nick. Feedforward terms play a very important role in the controllability of a system. After experimentally determining our feedforward gains (kV, kA, kS), all of the kP and kD gains on our systems this year were “calculated” using some simple math to get a ballpark estimate:

Let’s say we want to respond with an additional 10% of output when the error is 2 ft.

error * kP = output
2 * kP = 0.1
kP = 0.05

Then, these ballpark estimates were tweaked by hand to achieve desirable performance.