Discrete-Time Control and Loop Rate
A digital controller only reads the sensor and updates the motor command at fixed ticks, and in between it holds the last command. If the loop runs too slowly compared with how fast the system moves, the controller acts on stale data and the system begins to oscillate.
Sampling and hold
Every \(T_s\) seconds the controller samples, computes, and holds the output until the next tick, called a zero-order hold:
The hold acts like a delay of about \(T_s/2\). A common rule is to sample 10 to 20 times faster than the closed-loop bandwidth.
What to notice
At 500 Hz the response looks just like a continuous controller. Lower the rate and the command turns into visible steps, the response starts to overshoot, and below some rate it oscillates or goes unstable, even though the gains have not changed. Extra computation delay makes it worse. That is why motor current loops run at tens of kilohertz, joint loops at around 1 kHz, and planning at only a few hertz.