Skip to content

hwp-supervisor: Add max brake duration to mitigate active break failure#1073

Merged
BrianJKoopman merged 2 commits into
mainfrom
hwp_max_brake_duration
Jun 16, 2026
Merged

hwp-supervisor: Add max brake duration to mitigate active break failure#1073
BrianJKoopman merged 2 commits 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

@BrianJKoopman BrianJKoopman left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, just one small docstring related comment.

Comment thread socs/agents/hwp_supervisor/agent.py

@BrianJKoopman BrianJKoopman left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@BrianJKoopman BrianJKoopman merged commit cd25559 into main Jun 16, 2026
15 checks passed
@BrianJKoopman BrianJKoopman deleted the hwp_max_brake_duration branch June 16, 2026 14:58
@BrianJKoopman BrianJKoopman changed the title hwp_supervisor: Add max brake duration to mitigate active break failure hwp-supervisor: Add max brake duration to mitigate active break failure Jun 16, 2026
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.

3 participants