Skip to content

Conversation

@veerwang
Copy link
Contributor

Increase the running efficiency of the filter wheel from two primary aspects: (1) optimization of control parameters, and (2) correction of the optimal path trajectory.

veerwang and others added 4 commits January 29, 2026 13:31
Optimize filter wheel movement performance for both W and W2 axes:
- Reduce position check interval: 10ms -> 5ms
- Increase max velocity: 3.19 -> 5.0 mm/s
- Increase max acceleration: 300 -> 500 mm/s²
- Reduce microstepping: 64 -> 16 (higher torque)
- Add trapezoidal ramp function (reserved for future use)

Test results:
- Baseline: 183.85 ms avg, 5.4 moves/s
- Optimized: 116.33 ms avg, 8.6 moves/s
- Improvement: 36.7% faster, 59% higher throughput

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add a test script to measure W axis movement performance:
- Measures move time, wait time, and total time per operation
- Supports configurable number of positions and test cycles
- Reports throughput statistics (moves/s)
- Optional variable distance test mode

Usage:
  cd software
  python tools/w_axis_timing.py --count 10 --verbose

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Hardware optimization:
- Reduce microstepping from 16 to 8 for additional 8% speed improvement
- Total hardware optimization: 44.4% faster (183.85ms -> 102.18ms)

Software optimization:
- Implement shortest path algorithm in SquidFilterWheel._move_to_position()
- Choose between clockwise and counter-clockwise based on fewer steps
- Test results:
  - Random access: 20.2% time saved, 35.7% steps saved
  - Worst case (0<->7): 44.9% time saved, 75.0% steps saved

New test tools:
- w_axis_timing.py: Add --shortest_path_test for comparison testing
- w_axis_precision.py: New precision/drift test script
- test_shortest_path.py: Algorithm verification without hardware

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Apply black formatting to test scripts
- Add w_axis_random_test.py for random position testing with comparison mode

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant