Guidance for PID Tuning (Ziegler–Nichols method leading to EXTREAMLY High P value)

I am the programming mentor for our team 3814. We have decided to finally evolve our autonomous programming capabilities this year by diving int the use of encoders and PID feedback control. This is starting to get into the real that I would not consider myself competent any more since it is outside of my field of study and profession. Our team is attempting to use the Ziegler–Nichols tuning method for finding the Kp, Ki, and Kd values. we are attempting to raise the Kp value until we get into a steady state error zone. the issue we are having is that our Kp value for steady state error seems to change, one week we thought w had it but the next that value no longer worked to coninously have a steady error.

Main Questions i have are:

  1. when tuning the PID do we want the motors to be under load? (ie: do we need to do the tuning on the ground actually driving (motor under load) or are we supposed to tune with just the motor without the loading items?)
    We are currently tuning our drive motors to correct for straight driving using the talon SRX to handle the feedback controls. We are trying to tune with teh robot on block of wood so we aren’t running people over. is this teh proper thing to do for tuning?

  2. When we find the steady state error point by raising the Kp value as the Ziegler–Nichols tuning method suigests we end up with what i would consider an extremely large Kp value. the value we are getting is greater than 15. Is this normal or should we be getting a much lower number?

  3. when we do find a Kp value that gets the motors running in that steady state error oscillation it appears to only be that value for that day. the next day that value no longer gets the motors hitting that steady oscillation and we generally have to re find another Kp value that works (usually way higher)

  4. another issue we are having is that eh talon SRX’s attached to the encoders seem to randomly get a sticky fault for no see-able reason the fault is either in the encoder or the breakout board, but we cant actually get teh fault to consistently show up. It seems that it only shows up after the robot has run for quite a while. Once teh fault show up the robot is basically unusable without unplugging the breakout board from the Talon. if left unplugged for a day and it gets re plugged back in the robot works fine again for 20 hours until the fault comes back again. has anybody ran into this issue? i see no visible issues with our connection the only thing i can think is that eventually we are somehow arc flashing the contacts on the breakout board, but at the low voltage levels from the encoder is that even possible?

First of all, what are you specifically trying to do. Are you trying to PID each side of your drivetrain to drive a certain distance? Are you trying to use a Speed PID to make both sides of your robot go at the same speed, or are you doing something with a gyro?

But trying to a dress some of your questions:

  1. Your motors absolutely need to be under load if the load is significant. Depending on what you are doing, this may or may not be true. If you are just trying to command seperate distances to each side of the drivetrain, the load should be negligible. If you are doing something with a gyro, you need to be on the gound. Just try to find an open space, and make sure someone is always hovering over the disable button.

  2. I wouldnt worry about. It is completely reason able to have a kp of .0001 or 100. It just depends on what you are doing.

  3. That is concerning. There may be something wrong with your sensors. I’m not sure what else to suggest.

  4. Once again, this seems to point to a problem with your sensor. Could the sensor itself be bad? Maybe you didn’t solder the breakout board properly?

  1. Yes, absolutely tune under load

  2. Remember that your constants are ratios of output over input. In the case of the talon SRX, your output is a value from 0 to 1023 (full throttle at 1023). This can result in much higher P constants than you’re used to (usually your output is 0 to battery voltage or 0 to 1).

  3. Is our load close to the max torque of the motor? If so, your control is probably at its ceiling for most of the time before it reaches the setpoint. In ideal situations, the output is unlimited, so the motor will perform consistently. However, if your output is limited for a significant period, then your results will vary with your battery voltage.

  4. I have no guidance on that one.

I’m not totally clear if you are using the PID features of the SRX, but in the event that you are using LabVIEW PID function: be aware that the default option uses “academic” PID parameters which differ from those that the Ziegler Nichols approach describes.