Skip to content

hwp_supervisor: Add max brake duration to mitigate active break failure#1073

Open
ykyohei wants to merge 1 commit into
mainfrom
hwp_max_brake_duration
Open

hwp_supervisor: Add max brake duration to mitigate active break failure#1073
ykyohei wants to merge 1 commit into
mainfrom
hwp_max_brake_duration

Conversation

@ykyohei

@ykyohei ykyohei commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Description

Add max_brake_duration to hwp-supervisor agent to mitigate failure of active brake

Motivation and Context

hwp active brake occasionally fails when pid controller has timeout when reading current frequency. This leads to brake to crash and hwp system keeps applying brake and hwp spins up backwards.

Modified this WaitForBreak not to crash by the KeyError.
Also added max_brake_duration to hwp-supervisor to ensure the spin down even when the hwp-pid controller has timeout. hwp-pid timeout is usually temporary.

2026-06-08T19:16:47+0000 Setting state: ControlState.Error(traceback='Traceback (most recent call last):\n  File "/opt/venv/lib/python3.10/site-packages/socs/agents/hwp_supervisor/agent.py", line 1357, in update\n    f0 = query_pid_state()[\'current_freq\']\nKeyError: \'current_freq\'\n', start_time=1780946207.859749)
KeyError: 'current_freq'
    f0 = query_pid_state()['current_freq']
  File "/opt/venv/lib/python3.10/site-packages/socs/agents/hwp_supervisor/agent.py", line 1357, in update
Traceback (most recent call last):
image

How Has This Been Tested?

Tested at satp3 on June 9th 2026

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

@ykyohei ykyohei requested a review from bbixler500 June 9, 2026 23:40
@ykyohei ykyohei requested a review from BrianJKoopman June 10, 2026 20:40
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.

2 participants