Add ProportionalIntegral Loop and reorg for cavity feedbacks#1100
Open
lcarver wants to merge 5 commits into
Open
Add ProportionalIntegral Loop and reorg for cavity feedbacks#1100lcarver wants to merge 5 commits into
lcarver wants to merge 5 commits into
Conversation
added 5 commits
July 2, 2026 16:23
…the fact that I rerun the inits each time so it never really updates
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Until now, only a proportional loop was possible for the RF feedbacks. This was fine in the single harmonic case, but for harmonic cavities where the beam is sensitive to the harmonic voltage, it was not possible to avoid driving large voltage oscillations.
This PR performs a direct implementation from the nice work done by Naoto Yamamoto, where he derives a ProportionalIntegral loop, with the basis of generator current. By using generator current, he also considers the cavity response in the feedback. His work was implemented into Mbtrack2 ( https://gitlab.synchrotron-soleil.fr/PA/collective-effects/mbtrack2/-/blob/develop/mbtrack2/tracking/rf.py?ref_type=heads )
I have done a complete integration of his MBTRACK2 implementation into AT. This version is now working with an example script shown at the end of this post.
Some things still to do:
For now it is a WIP, I am fully open to any suggestions. I worked hard to try to be efficient from a memory point of view. There are many buffers that needed to be initialised in the beginning. If you think some are unneeded, I am happy to hear suggestions.