## Support » Pololu Jrk USB Motor Controller User's Guide » 1. Overview »## 1.c. PID Calculation OverviewThe jrk is designed to be part of a control system in which the
In this diagram, each arrow represents a specific number measured or computed by the jrk, and the blue boxes represent the internal computations that each occur once per - The
*input*is measured as a value from 0 to 4095. In analog voltage input mode, this represents a voltage level of 0 to 5 V. In RC mode, the number is a pulse width in units of 2/3 μs. The input is adjusted according to input scaling parameters to determine the*target*, also a value from 0 to 4095 (see Section 3.b). - The
*feedback*is measured as a value from 0 to 4095. In analog voltage feedback mode, this represents a voltage level of 0 to 5 V. In digital frequency mode, it is a representation of the output speed (see Section 3.c.) The jrk uses this value to compute the*scaled feedback*, which is a representation of the output of the entire control system. A scaled feedback of 0 should represent the minimum position of the system, and 4095 should represent the maximum position. - The
*current*through the motor is measured as a number from 0 to 255. A calibration value relates this to an actual current in amps.
Every PID cycle, the jrk performs the following computations to determine the behavior of the motor (see Section 3.d for more information): - The
*error*is computed as the difference of scaled feedback and target (error = scaled feedback − target). - An implementation of the PID algorithm is applied to the error. PID stands for the three terms that are added together:
*proportional*(proportional to the error),*integral*(proportional to the accumulated sum of the error over time), and*derivative*(proportional to the difference of the error relative to the previous PID period.) The three constants of proportionality are the most important parameters determining the behavior of the control system. The result of the PID algorithm is a number from -600 to +600 called the*duty cycle target*. - The duty cycle target is reduced according to various configurable limits, including acceleration, current, and maximum duty cycle limits (Section 3.e). The limits are intended to prevent the system from causing damage to itself under most circumstances.
The resulting value becomes the Various parameters and commands have an effect on the steps described above. For example, feedback may be turned off so that the jrk can become a simple speed controller; in this case the PID calculation is bypassed and the duty cycle target is just equal to the target minus 2048. In this mode, limits applied to the duty cycle continue to provide a useful way of preventing damage to the system. As another example, a command to turn the system off prevents the motors from being driven, but all measurements and calculations continue to occur normally. |

Log In | Wish Lists | BIG Order Form | Shopping Cart
US toll free: 1-877-7-POLOLU ~
(702) 262-6648 |
||||||||||||||||

Catalog | Forum | Blog | Support | Ordering | Distributors | About | Contact |
---|