SandGrid Module Real-Time Evaluation

1. Description

This report evaluates the real-time performance of the SandGrid module, responsible for simulating the behavior of sand particles in the LED matrix display. This simulation is central to delivering the hourglass visual effect of the FluxSand system.

The unit test includes both functional validation (e.g., adding, moving, and clearing particles) and a performance stress test for the core update method StepOnce().

2. Functional Test Results

  • AddNewSand → ✅ Success
  • StepOnce → ✅ Particle update verified
  • MoveSand(→down) → ✅ Success
  • Clear → ✅ Sand cleared successfully

3. Performance Test Result

The method StepOnce() was executed 100 times in succession to assess per-frame update latency:

Metric Time (µs)
Minimum Time 1.98
Maximum Time 21.54
Average Time 2.22

4. Analysis

  • The average execution time per StepOnce() call is only 2.22 μs, which demonstrates an extremely lightweight simulation routine.
  • The worst-case observed latency is 21.54 μs, well within the typical refresh period of an LED matrix (commonly ≥ 1 ms).
  • These performance results suggest that the SandGrid module can easily scale to real-time frame updates, supporting refresh rates over 40,000 Hz in isolation.
  • The particle simulation is thus not a bottleneck and can support complex flow behavior under tight real-time constraints.

5. Conclusion

The SandGrid module exhibits outstanding real-time execution speed. Its sub-25 μs response time ensures smooth and continuous animation even under frequent update conditions. The implementation is highly efficient and well-optimized for embedded graphics simulations.