[FTC]: PID control questions

My team wants to implement either motor encoder control or PID control into our autonomous for more accurate maneuvering. With the encoders, we would set the number of degrees we want the wheel to turn. But, from what I have seen, PID control would be easier. So does PID just let you run the motors as you would normally, except with a more accurate speed? As in, PID control just adjusts the motor’s power to account for other variables that might be slowing it down/speeding it up, no?

This also begs another question. If we enable PID control, and set a motor to 100 power, then how is the PID controller going to give the motor extra power when it needs it? Wouldn’t it already be at maximum power? Because if this, it may be necessary to use, say, 95 as the max power of motors, so PID can increase the power.

If we get PID working in autonomous, we might as well enable it in teleop for more consistent control, correct?

Also, I have heard of problems where a robot’s motors can slow down to 65% speed in automomous, possibly due to PID control. Has anyone heard of this?

Finally, PID control is just added with the following line, correct?

nMotorPIDSpeedCtrl[motorX] = mtrSpeedReg;

When the above line is implemented, it should make the standard “turn on motor, wait 3 seconds, turn off motor”-type autonomous movements more accurate, right?

Thanks a lot, an answer to any of these questions will be very helpful.

We’re having a similar problem. We want to sync 4 TETRIX motors up exactly, and thought PID control was the best for it. All four motors have encoders on them.

So far we’ve tried:

  1. nMotorPIDSpeedCtrl[motorX] = mtrSpeedReg;
  2. nSyncedMotors = synch BC;

From what I’ve seen, the motors still turn at different rates. I suspect that these built-in RobotC functions only work with NXT motors; is this true?

And also, is the function “nMotorEncoderTarget]” only for NXT motors or TETRIX motors, too? (I tried it; TETRIX motor did not stop once it reached the target)