-
Notifications
You must be signed in to change notification settings - Fork 19
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
control_panel - Fix rounding error that caused voltage drifts #211
Conversation
Hi @matpompili, |
Hi @matpompili Your fix, while worked in this case, might produce drift in other cases. Can you please test it as well? |
Thanks @yomach it works! I made a couple of small edits:
Tested on setup, good to merge from our end! |
* Fix voltage booking error introduced in the previous fix. * Change variables to be explicit * remove special 0 case for ramp_to_zero --------- Co-authored-by: Yoav Romach <[email protected]> Co-authored-by: Yoav Romach <[email protected]>
A rounding error in the voltage book-keeping causes voltage drifts when switching in between two voltages. An example program switches between -0.05V and 0.05V (factor of two in the scope is because of missing 50Ω termination).
Essentially, every
qua.play
instruction is missing one unit of DAC voltage (2^-16), so on repeated calls the voltage drifts.This PR fixes the error. It also replaces
np.round
withround
as it is a factor of ~30 faster.Before the fix:
After the fix:
Remember to: