A controller has a clock
A digital controller observes and updates at intervals while the physical plant keeps moving.
First, picture it
Imagine steering a cart after seeing a picture only every few moments. Between pictures you must keep the previous command. Longer gaps can make a once-gentle correction arrive too late.
What the model says
With zero-order hold, the motor receives one constant voltage over each controller period Ts. Its continuous electrical and mechanical states still evolve. The digital PID integrates error by e[k]Ts and differentiates measured change over Ts. The discrete loop is evaluated on z=e^(jωTs), only to the Nyquist frequency π/Ts. A larger Ts changes the sampled plant and controller together; it is not just slower animation. This lab changes motor controller period only; output plotting stays every 20 ms and the continuous plant integration stays at 5 ms. Cart LQR and observer remain at their fixed 20 ms design period.
u[k] held on [kTs,(k+1)Ts); ω_N=π/TsKeep units explicit: Ts is seconds and ωN is radians per second.
Make it concrete
Pin a 20 ms motor run. Change only the controller period to 80 ms and then 10 ms; compare response, requested voltage and the discrete Bode curve.
Test the controller periodFaster sampling cannot remove actuator limits or sensor noise. A chosen sample rate must also fit computation and the plant bandwidth.
Check your understanding+
What changes when only Ts changes in this motor lab?
Controller update and hold times, discrete PID terms and frequency analysis change; the continuous motor equations do not.