To collide an arbitrary fill pattern in PEP, we need to be able to inject an electron or a positron bunch into any one of the 3492 PEP RF buckets, each spaced by 2.1 ns (360 degrees of 476 MHz RF). This is accomplished by adjusting the time that individual Linac beam pulses arrive at PEP and consequently which bucket they are injected into.
There are two methods used to adjust the time that a Linac beam pulse reaches PEP. The first method is to increase the damping ring (DR) store time by an integer number of damping ring turns. The bunch stored in the damping ring is then extracted at a later time. After traversing the Linac and PEP injection line, it is injected into PEP the same amount of time later. The PEP bucket that the bunch is injected into can be changed by adjusting the number of DR turns to delay extraction by. By adjusting this parameter, it is possible to inject into every fourth bucket. This injection spacing is a result of the relationship between the lengths of the PEP and damping ring revolution periods. This is shown more explicitly at the end of this section.
Note: The damping ring revolution frequency is 8.5 MHz, which corresponds to a revolution period of ~118 ns. The PEP revolution frequency is ~136 kHz and the revolution period is ~7 µs. For discussion of injection timing, these numbers are usually expressed in PDU ticks (1 Linac PDU tick = 8.4 ns). One DR period is 14 PDU ticks. One PEP period is 873 PDU ticks. 873 DR turns = 14 PEP turns.
Revolution Frequency | Revolution Period (units of time) |
Revolution Period (units of PDU ticks) |
Revolution Period (units of PEP buckets) |
|
---|---|---|---|---|
Damping Ring | 8.5 MHz | ~118 ns | 14 | 56 |
PEP | ~136 kHz | ~7.33 µs | 873 | 3492 |
The second method used to adjust the time that Linac beam pulses reach PEP involves shifting the phase of the main drive line (MDL) RF while the bunch is stored in the damping ring. This makes very small changes to the time that the bunch is extracted from the damping ring and consequently the time it is injected into PEP. The MDL RF phase can be adjusted up to ± 2 PEP buckets, in increments of 1 PEP bucket. This provides the finer resolution required to inject within that spacing of 4 PEP buckets. By using these two methods, we can inject into any PEP bucket.
Here's an example to illustrate how this works:
Assume that injection into PEP bucket 0 corresponds to no damping ring turn
delay and no MDL phase shift.
If damping ring extraction is delayed by 1 turn, we will inject into PEP bucket 56. If extraction
is delayed by 2 turns, we will inject into bucket 112. And so on.
damping ring MDL phase shift injected PEP number of PEP
turn delay (units of PEP buckets) bucket number revolutions that
have passed
0 0 0 0
1 0 56 0
2 0 112 0
3 0 168 0
4 0 224 0
5 0 280 0
6 0 336 0
. . . .
. . . .
. . . .
60 0 3360 0
61 0 3416 0
62 0 3472 0
If damping ring extraction is delayed by 63 DR turns, a little more than one full PEP revolution will have passed and we
will inject into PEP bucket 36.
63 0 36 1
64 0 92 1
. . . .
. . . .
. . . .
124 0 3452 1
After 125 DR turns, more than two PEP revolutions will have passed and we will inject into bucket 16.
125 0 16 2
126 0 72 2
. . . .
. . . .
. . . .
188 0 3488 2
After 873 damping ring turns, exactly 14 PEP turns will have passed and we will inject into bucket
0 again.
873 0 0 14
Using this method of delaying DR extraction from 0 up to 873 DR turns makes it possible to inject into every fourth PEP bucket. In this
example, this allows injection into buckets 0, 4, 8,...,3484, 3488.
By adjusting the MDL phase in units
of ±1 or 2 PEP buckets,
we can inject into the other buckets. For example,
1 0 56 0
1 +1 57 0
1 +2 58 0
1 -1 55 0
And so on.
(This explanation is oversimplified; in reality bucket 0 does not necessarily correspond to no
DR turn delay and no MDL phase shift.)
To extend the damping ring store time, the time of the fiducial used at damping ring extraction is adjusted. Delaying this fiducial delays the time that the extraction kicker will trigger, causing the bunch to be extracted from the ring later. It is the actual fiducial time that is delayed, which means that all pulsed devices using that fiducial will be triggered the same delay later. This includes the PEP injection kicker, tune-up dump kicker, BPMs, modulators, etc.
Fiducial timing is determined by the SLC Master Trigger Generator (MTG) CAMAC module in LI00 Crate 2. In the MTG, 3-phase 60 Hz AC from PG&E is synchronized with an 8.5 MHz signal from the SLC Countdown Chassis. The MTG then outputs 360 Hz triggers to the fiducial generator. Fiducials are synchronized with the damping ring revolution frequency so that DR injection and extraction triggers will always have a fixed relationship with respect to the bunch circulating in the damping ring. This prevents, for example, the DR extraction kicker from firing when the bunch is mid-turn.
This scheme is modified in order to generate the fiducials used at damping ring extraction for PEP beams. In this case, the PEP-II Trigger Generator (PTG) CAMAC module is used to delay the fiducial trigger by an integer number of damping ring turns. The length of this delay is determined by the MPG and depends on which PEP bucket is requested. The delay information is sent to the PTG over PNET. This delay can be up to several hundred DR turns (up to about 100 µs).
For these PEP fiducials (throughout this document, "PEP fiducials" will refer to Linac fiducials used for PEP beams), the MTG outputs a 150 µs gate to the PTG module. The gate begins at the time of the unshifted fiducial. The PTG maintains an internal clock. The clock cycle is 873 DR turns (14 PEP turns) and is synchronized with both the DR and PEP revolution frequencies. After receiving the requested turn delay from the MPG, the PTG shifts its internal clock by this amount. The first shifted clock pulse to fall within the window of the 150 µs MTG gate generates the PEP fiducial. See PTG diagram below.
The MDL phase shift is used to adjust the timing of the Linac beam with respect to the PEP ring.
The PEP Master Oscillator RF is phase-locked to the Linac Master Oscillator at 120 Hz. The PEP RF phase is sampled and this value is held for three fiducials. The phase is sampled again and then adjusted to match the Linac phase if the relationship between the two has changed. This phase-locking occurs only on time slots 3 and 6, so the phase of the Linac RF can be changed on PEP fiducials (which use time slot 1) . This does not affect the stored PEP beam because the phase is shifted back before the next phase sample.
This phase shift is implemented using PAU 15 in LI00 Crate 3 to drive a phase shift of the 476 MHz RF from the Master Oscillator. This shifts all RF and timing, including gun timing, the main drive line RF, and the damping ring RF. Fiducial timing is also shifted because the 8.5 MHz signal used to synchronize fiducial timing has been shifted. This MDL phase shift is used to adjust PEP injection by ± 1 or 2 PEP buckets. This translates to as much as ± 720 degrees in 476 MHz, or 4.2 ns. This phase shift is initiated on the fiducial immediately preceding the PEP fiducial, causing the MDL RF phase to be shifted while the bunch is stored in the damping ring. The damping ring S-band feedback maintains the phase relationship between the stored bunch and the changing Sector 2 phase reference. The phase shift occurs slowly enough that the bunch stored in the damping ring remains stable. The MDL phase is ramped back to its original value after the bunch is injected into PEP.
This next picture shows the time scale of the PAU pulse, the actual phase shift, and the fiducials. It shows that the phase ramps to its shifted value before the beam is extracted from the damping ring. The phase remains shifted until after the beam is injected into PEP and then ramps back to its original value.
(a) Fiducial and beam timeline. Preceding B is the fiducial associated with DR extraction/PEP injection (BC 6 for LER, BC 8 for HER).
(b) Gate in phase shifter chassis. (c) Voltage sent from PAU 15 to phase shifter chassis. (The four voltage levels correspond to the four
possible phase shifts.) (d) Voltage in phase shifter chassis after gating.
(e) Implemented phase change.
Whenever there are entries in the MPG queues for PEP injection (from the BIC or diaglist), the BGRP schedules the modifiers GUNA_HER and GUNB_LER to be broadcast with beam codes on which PEP beams are created at the gun. It is these modifiers that cause the MPG to process the next request in the injection queue.
In addition, the modifiers INJT_HER and INJT_LER are scheduled on beam codes destined for PEP. When these modifiers are scheduled, the MPG determines the DR turn delay and the MDL phase shift required to inject into the requested PEP bucket and encodes this information onto PNET. For each fiducial, the MPG broadcasts a 128-bit word that describes all beam codes and modifiers that occur on that fiducial. Each modifier occupies one bit of this word and has a digital value of 0 or 1. This is called the PNET broadcast and is sent from the MPG to all micros. Included in this broadcast are:
FIDSH_HLR0 } These two are used together to determine FIDSH_HLR1 } which MDL phase shift to use. FIDSH_HLR2 } This designates HER or LER. FIDSH_HLR3 } This enables both the MDL phase shift and the fiducial timing delay.
These FIDSH_HLR* modifier bits are used in conditional expressions for both PAU 15 in LI00, which drives the MDL phase shift, and LI00 TRIG 209, which enables the fiducial trigger shift.
Here's an example of a conditional expression from the Device All Beam Display for LI00 PAU 15:
PAU LI00 15 BEAM 8 BGRP PEP2 --------------------------------------------------------------------- 1. Condition: ~fidsh_hlr0&~fidsh_hlr1&~fidsh_hlr2&fidsh_hlr3 Timing Expr: 1 Subst PPs: 123, 124, 125, 126, 127, 128. Channel: 1 Assoc Unit: PHAS LI00 151This condition reads: "fidsh_hlr0 NOT TRUE and fidsh_hlr1 NOT TRUE and fidsh_hlr2 NOT TRUE and fidsh_hlr3 TRUE" and will cause channel 1 to fire.
The conditinal expressions for LI00 PAU 15 have been translated into the table below to show how the modifier bits determine which PAU 15 channel will be used. Using the same language as above, a value of 1 means TRUE, a value of 0 means NOT TRUE. You can see that in this table, the FIDSH_HLR3 is always 1. If it has a value of 0, there is no phase shift and the PAU uses its default, channel 9.
FIDSH_HLR* PNET bit values | beam code |
PAU 15 channel |
|||
---|---|---|---|---|---|
together: which MDL phase shift | HER or LER |
shift enable |
|||
0 | 1 | 2 | 3 | ||
0 | 0 | 0 | 1 | 8 | 1 |
1 | 0 | 0 | 1 | 8 | 2 |
0 | 1 | 0 | 1 | 8 | 3 |
1 | 1 | 0 | 1 | 8 | 4 |
0 | 0 | 1 | 1 | 6 | 5 |
1 | 0 | 1 | 1 | 6 | 6 |
0 | 1 | 1 | 1 | 6 | 7 |
1 | 1 | 1 | 1 | 6 | 8 |
From Display All Units:
LI00 PHAS UNIT VCON VDES VACT PEP2.PHAS1 151 0.0 -602.75 -601.31 PEP2.PHAS2 152 0.0 -242.81 -243.77 HER PEP2.PHAS3 153 0.0 117.19 117.45 PEP2.PHAS4 154 0.0 477.19 476.22 PEP2.PHAS5 155 0.0 -411.01 -412.24 PEP2.PHAS6 156 0.0 -50.978 -53.596 LER PEP2.PHAS7 157 0.0 309.12 308.75 PEP2.PHAS8 158 0.0 669.02 668.33 PEP2.PHAS9 159 0.0 0.0 -4.3491 DefaultThe PAU 15 PHAS VACT and VDES values are in degrees of 476 MHz. There is a delta of 360, 1 PEP RF bucket, between adjacent channels. All pulses for PEP injection have some MDL phase shift. Only channel 9 has a VDES of 0 and this channel is only used for non-PEP pulses.
LI00 TRIG 214 is used to enable the MDL phase shift. The phase shifter chassis does not implement the phase change if this TRIG is not active. The Device All Beam Display shows that this TRIG is always active on beam codes 6 and 8.
TRIG LI00 214 BEAM 6 BGRP PEP2 ------------------------------------------------------------------------ Timing Delay 750000. nS w.r.t. TREF+TNOM 0.0 nS w.r.t. TREF+TNOM+PDUT BEAM 8 BGRP PEP2 ------------------------------------------------------------------------ Timing Delay 750000. nS w.r.t. TREF+TNOM 0.0 nS w.r.t. TREF+TNOM+PDUT
LI00 TRIG 209 is the trigger that drives the gate sent from the MTG to the PTG. If the phase shift enable modifier bit, FIDSH_HLR3, is 0 (or not true), LI00 TRIG 209 does not fire and the fiducial shift is not initiated. This is shown in the conditional expressions for TRIG 209.
TRIG LI00 209 BEAM 6 BGRP PEP2 ----------------------------------------------------------------------- 1. Condition: ~FIDSH_HLR3 Timing Expr: deact Subst PPs: 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 81, 82, 83, 84, 85, 86, 93, 94, 95, 96, 97, 98, 105, 106, 107, 108, 109, 110. Timing Delay DEACT Default: Timing Delay 0.1500e+07 nS w.r.t. TREF+TNOM 244622. nS w.r.t. TREF+TNOM+PDUT BEAM 8 BGRP PEP2 ----------------------------------------------------------------------- 1. Condition: ~FIDSH_HLR3 Timing Expr: deact Subst PPs: 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128. Timing Delay DEACT Default: Timing Delay 0.1500e+07 nS w.r.t. TREF+TNOM 244622. nS w.r.t. TREF+TNOM+PDUT
In summary, the following devices need to be active to enable the MDL phase shift and the fiducial timing shift:
MDL phase shift: | LI00 PAU 15 (channel 1-8), LI00 TRIG 214 |
Fiducial timing shift: | LI00 TRIG 209 |
The MPG maintains a table of PEP bucket numbers with the MDL phase shift and damping ring delay count needed to inject into each bucket. When injection into a particular PEP bucket is requested, these values are read and broadcast over PNET.
In order to be sure that we are always injecting into the right PEP buckets, there is a synchronization routine that runs in the MPG. This "Injection Timing Synchronization Feedback" maintains the timing relationship between Linac beam pulses destined for PEP and the PEP revolution frequency.
A PTG module in MP00 Crate 1 measures the time difference between a PEP injection fiducial (from a Linac PDU also in Crate 1) and a PEP "bucket 0" go-around reference (from a PEP PDU in MC00 Crate 6). After taking into account the requested bucket number, this measured difference should always be a constant for each ring. (See diagram below.) If for some reason the timing relationship between the Linac and PEP changes and we are injecting into the wrong PEP buckets, the PTG measures a different delta between these two timing signals. If the PTG measures a difference from the correct delta of one PEP bucket or more, the MPG table of injection parameters is rearranged so that we will continue to inject into the right PEP buckets.
MP00 Crate 1 |
Here is the Resynchronization Display from the PEP-II Injection Timing Diagnostics panel:
PEP2 Inj Fiducial Timing Feedback Resynchronizations Inj tmng feedback is now turned off. HER Bucket DR turns, MPG PTG Timing old new time (-) LER ph shift raw TDC error offs offs 01:09:13.60 L D 2460 685,0 14057 -1389 20099 ( 18710) 01:09:13.65 H D 2583 74,0 8425 -1386 15455 ( 14069) 01:09:13.70 L D 2337 371,1 15049 -1397 20099 ( 18702) 01:09:13.75 H D 2460 633,1 9417 -1394 15455 ( 14061) 01:09:13.80 L D 2214 57,2 16041 -1405 20099 ( 18694)Each row in this display presents information about one beam pulse destined for PEP (even if that pulse was dumped before being injected into PEP). The time indicates how long ago the measurement was made. For example, the first entry refers to an injection request that happened 01:09:13.60 hours ago. The other information given for each beam pulse is:
Sometimes this synchronization routine misses a timing shift and we end up injecting into the wrong PEP buckets (usually offset by one bucket). This is currently dealt with by changing the cable length between the Linac PDU and the PTG module. This introduces a delay in the time the Linac fiducial arrives at the PTG, thereby changing the time that the synchronization routine "thinks" that the injection fiducial occurred. If we find we are injecting one bucket late, and we increase the length of this cable by 2.1 nsec, the MPG will correct for this new timing shift and we will return to injecting into the right buckets. The injection timing feedback must be on for this to work.
If the synchronization routine is ON, it does not allow pulses to be injected into PEP while there is a timing error of 8 or more. These pulses are dumped on the tune-up dump until this error is corrected. However, if the routine is OFF, we can continue to inject with any measured timing error but there is no guarantee that we will be injecting into the correct PEP buckets.