Skip to content
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

RF cavity tuning: introduce fundamental frequency #334

Merged
merged 2 commits into from
Dec 28, 2021
Merged

Conversation

swhite2401
Copy link
Contributor

@swhite2401 swhite2401 commented Nov 29, 2021

cavity_access.py is modified to give more flexibility, 3 modes are introduced:
-RFMode.UNIQUE
present implementation

-RFMode.ALL
returns array of all cavities

-RFMode.FUNDAMENTAL (proposed new default)
uses the lowest frequency cavities as reference, the getters returns attributes of the fundamental cavities. The setters affect all cavities maintaining the following relations between the fundamental and harmonics.
-frequency: keep constant ratio
-voltage: keep constant ratio (apply scale factor based on variation of total voltage)
-timelag: keep constant offset

This provides a a realistic and flexible way of tuning cavities and is fully compatible with complex systems involving multiple (accelerating) RF systems and solves some of the issues of the present implementation that was allowing to tune only one harmonic at the time. cavpts can still be used to exclude bunch lengthening cavities.

revolution.py is improved to allow to set the rf frequency based on orbit6 search: the rf frequency can be set to cancel the average orbit as is generally done in the control room

@lfarv
Copy link
Contributor

lfarv commented Nov 30, 2021

Hi @swhite2401 . I'll be back home and have more time to look at that next week, but I have a first comment on revolution.py:

For a ring where the energy varies along the circumference, the definition of the machine energy, and consequently of the nominal frequency is somewhat arbitrary: is the machine energy (dp/p = 0) the average one, the minimum or the maximum one ? the nominal frequency will be different…

At the moment, I see 2 options:

  • the AT definition: the nominal frequency corresponds to the nominal circumference of the ring: the energy deviation is equally distributed between positive and negative values, the nominal machine energy is the average along the ring.
  • the "control room" definition: the average horizontal closed orbit is zero. For a perfect machine, it is very similar to the AT definition, you can say that the energy deviation as seen by the BPMs is equally distributed between positive and negative values.So it depends a bit on the location of the BPMs and probably on the error distribution.

Here you are proposing a 3rd definition: the machine energy (dp/p = 0) is the energy at the 1st point of the lattice. This definition as a drawback that makes it unacceptable: the nominal frequency depends on the choice of the starting point of the lattice ! That cannot be, the nominal frequency must be independent of the choice of the starting point. We could accept any other definition satisfying this requirement, but not the one you propose…

Note that the AT definition also ensures that the nominal frequency in independent of the location of the cavities: practically, the "nominal" machine energy (not the local one) does not change if you change to voltage distribution between cavities along the ring.

@swhite2401
Copy link
Contributor Author

Ah right, thanks @lfarv. In fact I don't really care about the notion of nominal frequency, for me it is defined as the corresponding to the nominal circumference but does not mean much in realistic simulations with errors etc.... This is why it can be useful for some application where the path length does not match the circumference to adjust the RF frequency. I agree this one is not good, I'll propose something else soon.

@swhite2401
Copy link
Contributor Author

Late night post-shift thinking: I did have this in my scripts to cancel initial offset for impedance simulations and generate a beam at dp,ct=0,0. Clearly not appropriated here, I will remove this from this branch, the most important part is all the rest in any case.

@lfarv
Copy link
Contributor

lfarv commented Dec 1, 2021

Ok, perfect. Give me some time to look at that, not before next week…

@swhite2401
Copy link
Contributor Author

Sure no rush. I will implemented the average orbit cancellation that could be of some interest to simulate control room conditions

@swhite2401 swhite2401 changed the title RF cavity tuning: introduce fundamental frequency, set frequency with tracking (avoid ct drift) RF cavity tuning: introduce fundamental frequency, set frequency with tracking Dec 1, 2021
@github-pages github-pages bot temporarily deployed to github-pages December 17, 2021 08:48 Inactive
@github-pages github-pages bot temporarily deployed to github-pages December 19, 2021 17:54 Inactive
@lfarv
Copy link
Contributor

lfarv commented Dec 19, 2021

New version with a single mode of operation (always "fundamental mode").

@github-pages github-pages bot temporarily deployed to github-pages December 21, 2021 14:24 Inactive
@github-pages github-pages bot temporarily deployed to github-pages December 21, 2021 14:45 Inactive
@github-pages github-pages bot temporarily deployed to github-pages December 21, 2021 17:30 Inactive
@lfarv lfarv changed the title RF cavity tuning: introduce fundamental frequency, set frequency with tracking RF cavity tuning: introduce fundamental frequency Dec 28, 2021
@lfarv lfarv merged commit 54b3574 into master Dec 28, 2021
@lfarv lfarv deleted the fundamental_rf branch December 28, 2021 15:54
lfarv added a commit that referenced this pull request Dec 28, 2021
* New cavity control

* Small change in html doc

Co-authored-by: Laurent Farvacque <laurent.farvacque@esrf.fr>
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.

None yet

2 participants