-
Notifications
You must be signed in to change notification settings - Fork 15
hwp-supervisor: Add estimate of rotation direction to HWPState #863
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
8c696fe to
d1c4bf3
Compare
|
Okay I was able to run some tests and confirmed this works nothing crashes, but I couldn't confirm the behavior when we run brake command. I needed to run some hwp agents in daq-dev to test and I got many timeous from pid controller at daq-dev. When we run brake, ControlState transition to Brake, WaitForBrake and finally WaitForTragetFreq when rotation frequency is below 0.5 Hz. At the last state, the direction estimate can flip but I think this is fine. |
Glad you got the tests working! Maybe there's a network configuration issue on the pid controller?
Yeah, it sounds like this is ready for review. Testing on |
|
I made this ready to review. Is it possible for me to run test on daq-satp3? I do not know how to do that. |
This is possible, I'll describe the process once I complete the review. |
BrianJKoopman
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me. I'll reach out on Slack to talk about testing on site. (The process will be pretty similar to the one I recently described here.)
|
I did additional test at daq-satp3 and I think this is working for Brake too. As mentioned before, direction estimate flip when control state transition to 'WaitForTargetFreq' at low frequency but I think this is fine, |
Is this a problem? I don't really think it is, since the time constant function proposed in sorunlib checks the HWP direction while it's rotating before commanding it stop and spin up in the opposite direction. That said, it does seem like we should be able to accurately determine the direction even while braking if those occasional 0's are solved. For instance: It's clear that in the third data point it's still spinning ccw. Anyway, if you're happy with the performance now, I'm happy. And that'll enable the time constant PR to move forward. Shall we (squash and) merge? |
|
Actually, I think this is same issue as this. #803 |
BrianJKoopman
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright, I think this is good to go now. When deploying on site we should make sure the forward direction configuration change happens at the same time.
Add estimate of rotation direction to HWPSupervisor.HWPState
Description
Estimate the absolute rotation direction from pid_state and control_state and add estimated direction to HWPSupervisor.HWPState
Need to merge https://github.com/simonsobs/ocs-deployment-configs/pull/436 to have correct rotation direction estimate.
Motivation and Context
The real time absolute rotation direction estimate is necessary for wiregrid time constant measurement simonsobs/sorunlib#179
How Has This Been Tested?
Need to test
Types of changes
Checklist: