Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
mbtrack2
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
PA
Collective Effects
mbtrack2
Commits
cc3b3c36
Commit
cc3b3c36
authored
1 year ago
by
Alexis GAMELIN
Browse files
Options
Downloads
Patches
Plain Diff
Docstring improvements
Improve ProportionalIntegralLoop & DirectFeedback docstrings.
parent
99603eed
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
mbtrack2/tracking/rf.py
+21
-20
21 additions, 20 deletions
mbtrack2/tracking/rf.py
with
21 additions
and
20 deletions
mbtrack2/tracking/rf.py
+
21
−
20
View file @
cc3b3c36
...
...
@@ -1106,28 +1106,30 @@ class ProportionalIntegralLoop():
cav_res : CavityResonator object
CavityResonator in which the loop will be added.
gain : float list
Proportional gain (Pgain) and integral gain (Igain) of the feedback system.
Proportional gain (Pgain) and integral gain (Igain) of the feedback
system in the form of a list [Pgain, Igain].
For IQ feedback, same gain set is used for I and Q.
In case of normal conducting cavity (QL~1e4),
the Pgain of ~1.0 and
Igain of ~1e4(5) are usually used.
In case of super conducting cavity (QL > 1e6),
the Pgain of ~100
can be used.
In a
"
bad
"
parameter set, unstable oscillation of
Vc is caused.
So, parameter scan of
Vcloop
should be made.
In case of normal conducting cavity (QL~1e4),
the Pgain of ~1.0 and
Igain of ~1e4(5) are usually used.
In case of super conducting cavity (QL > 1e6),
the Pgain of ~100
can be used.
In a
"
bad
"
parameter set, unstable oscillation of
the cavity voltage
can be caused.
So,
a
parameter scan of
the gain
should be made.
sample_num : int
Sample number to monitor Vc
The averaged Vc value in sample_num is monitored.
Number of bunch over which the mean cavity voltage is computed.
Units are in bucket numbers.
every : int
I
nterval
to
monitor and
change Vc
Time i
nterval
between two cavity voltage
monitor
ing
and
feedback.
Units are in bucket numbers.
delay : int
Loop delay of the PI feedback system.
Units are in bucket numbers.
FF : bool, optional
Boolean switch to use feedforward constant.
True is recommended to prevent a Vc drop in the beginning of the tracking.
In case of small Pgain (QL ~ 1e4), Vc drop may cause beam loss due to static Robinson.
True is recommended to prevent a cavity voltage drop in the beginning
of the tracking.
In case of small Pgain (QL ~ 1e4), cavity voltage drop may cause
beam loss due to static Robinson.
Default is True.
Methods
...
...
@@ -1149,14 +1151,14 @@ class ProportionalIntegralLoop():
-----
Assumption : delay >> every ~ sample_num
Adjusting ig(Vg) parameter to keep the
V
c constant (to target
(Vref)
values).
Adjusting ig(Vg) parameter to keep the c
avity voltage
constant (to target values).
The
"
track
"
method is
1) Monitoring the
V
c phasor
Mean
V
c value between specified bunch number (sample_num) is monitored
1) Monitoring the c
avity voltage
phasor
Mean c
avity voltage
value between specified bunch number (sample_num) is monitored
with specified interval period (every).
2) Changing the ig phasor
The ig phasor is changed according the difference of the specified
reference values
(Vref)
with specified gain (gain).
reference values with specified gain (gain).
By using ig instead of Vg, the cavity response can be taken account.
3) ig changes are reflected to Vg after the specifed delay (delay) of the system
...
...
@@ -1196,7 +1198,7 @@ class ProportionalIntegralLoop():
self
.
every
=
1
record_size
=
int
(
np
.
ceil
(
self
.
delay
/
self
.
every
))
if
record_size
<
1
:
raise
ValueError
(
"
Bad parameter set : delay or
sample_
every
"
)
raise
ValueError
(
"
Bad parameter set : delay or every
"
)
self
.
sample_num
=
int
(
sample_num
)
# init lists for FB process
...
...
@@ -1385,7 +1387,7 @@ class DirectFeedback(ProportionalIntegralLoop):
record_size
=
int
(
np
.
ceil
(
self
.
DFB_delay
/
self
.
DFB_every
))
if
record_size
<
1
:
raise
ValueError
(
"
Bad parameter set : delay or
sample
_every
"
)
raise
ValueError
(
"
Bad parameter set :
DFB_
delay or
DFB
_every
"
)
self
.
DFB_parameter_set
(
DFB_gain
,
DFB_phase_shift
)
if
np
.
sum
(
np
.
abs
(
self
.
cav_res
.
beam_phasor
))
==
0
:
...
...
@@ -1478,8 +1480,7 @@ class DirectFeedback(ProportionalIntegralLoop):
self
.
DFB_ig_phasor
=
self
.
Vg2Ig
(
vg_drf
)
self
.
ig_phasor
=
self
.
ig_phasor_record
-
self
.
DFB_ig_phasor
if
self
.
FF
:
self
.
FFconst
=
np
.
mean
(
self
.
ig_phasor
)
self
.
init_FFconst
()
def
track
(
self
):
"""
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment