It has a number of areas that correspond to the PIDSubsystem. This is the test mode picture of a wrist subsystem that has a potentiometer as the sensor (pot) and a motor controller connected to the motor.
![frc driver station dashboard unable to open error frc driver station dashboard unable to open error](https://www.chiefdelphi.com/uploads/default/original/3X/5/a/5a8ed2b96ba3eaa14e53ad6b55816124549ade65.png)
This is displayed while the robot is operating in test mode (done by setting "Test" in the driver station). Shuffleboard helps this process by displaying the details of a PID subsystem with a user interface for setting constant values and testing how well it operates. Tuning the PID controller consists of picking constants that will give good performance. It is also multiplied by a constant (kd) to scale it to match the rest of the system. It's computed by taking the difference between the current error value and the previous error value. It is used to slow down the motor speed if it's moving too fast. D (differential) - this value is the rate of change of the errors.The sum of the errors is multiplied by a constant (Ki) to scale the integral term for the system. If the wrist isn't quite getting to the setpoint because of a large load it is trying to move, the integral term will continue to increase (sum of the errors) until it contributes enough to the motor speed to get it to move to the setpoint. It is simply a sum of all the errors over time. The longer the error exists the larger the integral contribution will be. I (integral) - this term is the sum of successive errors.P (proportional) - this is a term that when multiplied by a constant (Kp) will generate a motor speed that will help move the motor in the correct direction and speed.The PID algorithm has three components that contribute to computing the motor speed from the error. WPILib has a PIDController class that implements the PID algorithm and accepts constants that correspond to the Kp, Ki, and Kd values. The resultant motor speed is them used to drive the motor in the correct direction and a speed that hopefully will reach the setpoint as quickly as possible without overshooting (moving past the setpoint).The error can be used as an input to the PID algorithm to compute a motor speed. If the error is zero, then the measured angle exactly matches the desired angle.
![frc driver station dashboard unable to open error frc driver station dashboard unable to open error](https://www.frclabviewtutorials.com/tutorials/sensors/dashboard/gyro/images/gyroLoop.png)
The magnitude of the error is how far the measured wrist angle is from the actual wrist angle. For example negative values might indicate that the measured wrist angle is larger than the desired wrist angle. The sign of the error value indicates which side of the setpoint the wrist is on. Compute an error (the difference between the sensor value and the desired value).By connecting it to an analog input, the program can get a voltage measurement that is directly proportional to the angle. A potentiometer is a sensor that can measure.
![frc driver station dashboard unable to open error frc driver station dashboard unable to open error](https://s1.manualzz.com/store/data/007427990_1-b6e29d4d4553127518f8af769647069a.png)
For example, a robot arm with a wrist joint should be able to move to a specified angle very quickly and stop at that angle as indicated by a sensor. The setpoint is the sensor value that corresponds to the expected goal. Reading sensor values to determine how far the robot or mechanism from the desired setpoint.There is a good set of videos (look for the robot controls playlist) that explain the control algorithms described here The PID algorithm converts sensor values into motor speeds by:
![frc driver station dashboard unable to open error frc driver station dashboard unable to open error](https://media.team254.com/2013/01/25cb0687-D7K_3517.jpg)
The most commonly used control algorithm is called PID control. One challenge in using sensors to control mechanisms is to have a good algorithm to drive the motors to the proper position or speed.