This is part 2 of my series on control loop delays. All examples come from real projects I've worked on.
Last time we learned a sobering truth: max bandwidth β 1 / (10 Γ delay).
In digital control, you always have at least one sample of delayβso faster sampling helps. But there's more you can do.
1οΈβ£ The Simple Wins: Reduce Delay Directly
Start with the obvious:
- β‘ Faster communication bus β CAN-FD, EtherCAT, or direct SPI instead of slow serial
- π₯οΈ Faster processor β less computation time = less delay
- π§ Optimize your code β sometimes a few microseconds matter
These are low-hanging fruit. Grab them first.
2οΈβ£ Loop Cascading: The Secret Weapon
When your sensor is slow, don't fight itβwork around it.
Real example: An air pressure controller with a sluggish pressure sensor.
The solution: 1. Inner loop β controls torque and speed of the fan (fast!) 2. Outer loop β controls pressure (slow sensor is fine here)
But here's where it gets clever: add feed-forward.
Based on operating conditions and desired pressure, a lookup table calculates the required torque directly. The response becomes nearly instantaneous. The slow pressure sensor? It only needs to clean up the residual error.
π‘ Key insight: Cascading lets you hide slow sensors behind fast inner loops.
3οΈβ£ Better Sensors (Or Smarter Sensor Fusion)
Sometimes you need a faster sensor. But what if faster sensors don't existβor cost too much?
Combine sensors.
Real example: Indoor drone tracking using optical image recognition.
The problem:
- β Optical tracking was slow
- β Sometimes produced outliers (lost track, wrong detection)
The solution: Fuse optical data with a fast IMU using a Kalman filter.
Results:
- β Much lower effective delay
- β Built-in outlier rejection using Mahalanobis distance
- β Smooth tracking even when optical updates are sparse
π‘ Bonus: Sensor fusion often improves accuracy and speed simultaneously.
π― The Takeaway
When you hit the bandwidth wall, you have options:
| Strategy | When to use |
|---|---|
| Reduce delay | Always try this first |
| Loop cascading | Slow outer sensor, fast inner dynamics available |
| Sensor fusion | Fast sensor exists, but lacks accuracy alone |
Which of these have you tried? What worked (or didn't) in your systems?
Next up in this series: Reduce delay with a lead-lag filter.
#ControlSystems #Embedded #Engineering #DSP #RealTimeControl #Kalman