FAF Description
Overview:
This document summarizes and describe how FAF (RF frequency operation (loading and ramping) for ion runs) works.
See also the DAFLoader documentation for information of user operation.
Contents:
Other links:
- Consys home page
- ConSys User Manuals
- DAF block diagram (PDF format)
- DAF hardware description.
- FAF hardware description.
- FAF block diagram (PDF format).
Introduction:
The FAF (Fast Autonomous Function generator) card is responsible for changing the ion RF frequency simultaneously with ramping of the dipole magnet current (ramping of the beam energy). The principle of the FAF is that it is a counter, which counts up or down every time the dipole field has changed a given amount. The value of the counter (together with the present loaded values) then determines the output which in term determines the ion RF frequency.
In one of the dipole magnets is installed a small current loop, which after some electronic manipulation gives a pulse every time the dipole field has changed by ~1.525E-6 Tesla. This pulse train (max rate ~250 kHz) is together with a field change polarity send to the FAF module where it is used as input for internal counter. (There is also possibility for another counter input, which could be used to correct for a beam position error, but this option is presently not used). Each clock input causes the FAF output to change by a given amount (up or down depending on the polarity). The amount in each step is determined by a slope coefficient multiplied by a Programmable Constant. A counter (0 to 2047) determines the slope coefficient used at a specific time. This counter counts the number of input triggers. To allow a larger dynamic range there is first a prescaler. Both the counter and the prescaler can count up and down. In the DAFLoader the intial values (on load (ie. a new injection)) is calculated based on the Start Energy, the Low Energy, and the High Energy. Notice that the slope coefficients are only calculated for values between the Low Energy and the High Energy. If the magnet field exceeds these limits the counter will go outside its permitted values.
There exist 4 sets of tables (slope coefficients, prescaler value, multiplication value, and start values. This is so that the harmonic can be changed during ramping to allow for a larger dynamic range. The switching between these tables can be performed during ramping by setting the appropriate DAF-values for the associated DAF.
At ASTRID today there is only one FAF. The parameter associated with this FAF is:
CRI31SEL.X: (where X is the surnames listed below)
ExtMod: Determines whether inputs (B-field, PosInput) are modified by DAF
Control: Whether the FAF is static (direct frequency output) or dynamic (normal operation with counting triggers)
PosInput: Whether the Position dependend input is used or not.
BField: Whether the B-field input is used or not. (controlling whether triggers from dipole magnet is getting through or not)
VecTable: Which table presently in used .
LoadTable: Which table presently is connected to the control parameters of CRI31SL1, CRI31SL2, CRI31SL3. If more than one table is to be used then this value has to be changed to input the default (load) values for the different tables.
CRI31SL1.X: (where X is the surnames listed below)
Mult_const: The multiplication constant (calculated by the DAFLoader)
PreScale_Max: The prescaler value (ie. how many triggers to count one in the counter. (calculated by the DAFLoader)
CRI31SL2.X: (where X is the surnames listed below)
PreScale_Set: The initial value for the prescaler (calculated by the DAFLoader to match E_Start, E_low, and E_high)
Count_Set: The initial value for the counter (calculated by the DAFLoader to match E_Start, E_low, and E_high)
CRI31SL3.X: (where X is the surnames listed below)
Start_freq: The load frequency (the frequency at injection)
In the corresponding status parameters is the operating values (ie. the running values of the frequency, the counter and prescaler)
CRI31SELVD.X
Parameters calculated/stored in virtual device for the FAF system.
src_freq: Start frequency source calculated and set from the DAF loader. Corrected by
freq_corr: Correction applied to src_freq (+-10 promille) and set to CRI31SL3.start_freq and
dest_freq: copy of corrected frequency.
src_mult: Start multiplication calculated and set from the DAF loader. Corrected by
mult_corr: Correction applied to src_mult (+-10 promille) and set to CRI31SL1.mult_low, CRI31SEL.mult_high and
dest_mult: copy of corrected multiplication.
mass,charge,harm_no,E_start,E_low,E_high: Copy of values from the Excel DAF/FAF file, set by the DAFLoader
E_beam: Calculated beam energy, based on the values above and the read back frequency, CRI31SL3.freq
The allowed DAF values are (ASTRID DAF: CRI31DAF.bte)
128: Lock the frequency (disable the Bfield and PosInput inputs)
130: Unlock the frequency. (Enable the Bfield)
132: Load of table 0 (does at the same time a frequency lock (disable the Bfield))
133: Load of table 1
134: Load of table 2
135: Load of table 3
A Typical entrance in the Excel DAF file is as follows:
T |
Abs. Vector Time [s] |
0.000 |
0.050 |
4.100 |
4.400 |
8.400 |
||
B |
CRI31DAF |
bte |
132 |
130 |
128 |
130 |
132 |
This will choose table 0 at start, then at 50ms unlock the frequency to allow ramping, at 4.1s the ramp is over and the frequency is again locked, then at 4.4s ramping down is started.
For a complete description of the bits see the FAF hardware description.
The formulas used in the DAFLoader are as follows.
Variables/Constants:
outputHzPerBit = 2.384197
setLatchHzPerBit = outputHzPerBit / 220
latchHzPerBit = outputHzPerBit / 224
TeslaPerClock = 1.525*10-6
energySafetyMargin = 0.1
c = 2.99792*108
L = 40 ; Ring circumference
rho = 1.2 ; Bending radius
Bstar = mass /(0.32185*Q*rho)
BfromE(E) = Bstar*Sqrt((E/(mass*931.495)+1)2-1)
Bstart = BfromE(Estart)
Blow = BfromE(Elow*(1-energySafetyMargin))
if (Blow < 0) Blow = 0
Bhigh = BfromE(Ehigh)
prescalerMax = ceil( (Bhigh - Blow) / (TeslaPerClock*2048) )
counter_set = floor( (Bstart - Blow) / (TeslaPerClock*prescalerMax) )
preScaler_Set = floor( (Bstart - Blow) / TeslaPerClock - counter_set*prescalerMax )
slopeB(i) = Blow + i*prescalerMax*TeslaPerClock
dfdB(i) = harmonic*c/(L*Bstar) / (1+(slopeB(i+0.5) / Bstar)2 )3/2
incValue(i) = TeslaPerClock*dfdB(i)/latchHzPerBit * (1+fiddle/1000)
Mult = ceil( max(incValue) / (65535*2) ) (loaded in mult_low, mult_high)
slopeCoef(i) = round ( incValue(i) / (Mult*2) )
StartFreq = harmonic*1E-6*(c/L) * (Bstart/Bstar) * 1/sqrt(1+(Bstart/Bstar) 2)
In CalculationMethod 1 fiddle is given as the first entry in the Adjust line for the table.
Below is some related and useful formulas related to beam energy and storage.
(1) E = 1/2 p2 / M
(2) E = 0.2998 B[T] r [m] GeV/c
(3) E = 1/2 M v2 = 1/2 M (L f)2 = 8.2915 MeV A (f[MHz])2
In the above formulas the symbols are:
E: beam energy
p: beam momentum
M: particle mass
A: particle mass number (M / 1AMU)
B: Dipole magnetic field
r : Dipole bending radius
v: particle speed
L: Ring circumference (40.00 m)
f: Particle revolution frequency
Last Modified 04 February 2019