Latency Fundamentals
Latency is the elapsed time from a stimulus to the completed response, and in control it must be measured end to end, not stage by stage.
Defining Latency
Latency is the delay between an event and the system's response to it. In a control system the relevant figure is end-to-end latency: the total time from a physical change at a sensor to the corresponding change at an actuator. Optimizing one stage while ignoring the chain gives a misleading picture.
The End-to-End Chain
A typical control path accumulates delay at each stage. A realistic budget adds them:
- Sensor response and analog conditioning
- Sample-and-hold plus ADC conversion
- Data transfer over a bus or network
- Computation of the control law
- Digital-to-analog conversion or PWM update
- Actuator response and mechanical settling
Latency Versus Throughput
Latency and throughput are distinct and often traded against each other. Batching or pipelining raises throughput but adds latency, because work waits to be grouped. A control loop cares about latency: each sample must be acted on promptly. A logging system cares about throughput: it can buffer and write in bulk. Confusing the two leads to designs that move a lot of data yet respond sluggishly.
Why Latency Bounds Control
Feedback delay directly limits how aggressively a loop can act. Delay adds phase lag, which erodes stability margin and caps the achievable bandwidth. A rough rule is that the loop delay should be a small fraction of the fastest time constant you intend to control. If the plant changes faster than the loop can observe and respond, no control gain can compensate.
For fast physical processes, minimizing and bounding latency is more important than minimizing its average. A predictable 200-microsecond path is preferable to one that is usually 50 microseconds but sometimes stalls, because the controller must be tuned for the worst case it can encounter.