Title: MatLab Analysis of RHIC PLL/TF System
1MatLab Analysis of RHIC PLL/TF System
- Carl Schultheiss, Nickolay Malitsky
- Cern PLL Workshop
- June 10-11, 2002
2MatLab Analysis of RHIC PLL/TF System
- Beam Simulation Requirements
- Beam Simulation Block (BSB) should recreate the
beam spectrum including the dynamics. How fast
does the tune frequency change when excited by a
step change in the quad current? - BSB should include chromaticity, both the signal
strength reduction due to tune spread, and the
interference due to tune frequencies from the
other plane.
3MatLab Analysis of RHIC PLL/TF System
- Beam Simulation Requirements (continued)
- BSB should include coupling, again modeling
interference from frequencies due to the other
plane. -
- The BSB should be able to simulate the beam at
requested reference energies. -
4MatLab Analysis of RHIC PLL/TF System
- Beam Simulation Requirements (continued)
- BSB should be compatible with Simulink. Written
as an S-function. Block transfer function should
have the voltage to the kicker as input and the
voltage from PU as output. This is a time-domain
representation. - What type of BSB will meet these requirements?
A simple frequency representation will not
properly represent all the requirements,
therefore tracking programs will be probably be
required.
5MatLab Analysis of RHIC PLL/TF System
- Beam Simulation Requirements (continued)
- Which tracking program?
- UAL
- Kraken
- Accelerator Toolbox for MatLab written by A.
Terebilo from SLAC.
6MatLab Analysis of RHIC PLL/TF System
- Beam Simulation Block Description
- Run Time Inputs
- Voltage signal to kicker.
- Delta strengths (currents) to main vertical and
horizontal quad magnets. - Delta strengths (currents) to vertical and
horizontal sextupole magnets.
7MatLab Analysis of RHIC PLL/TF System
- Beam Simulation Block Description (continued)
- Run Time Outputs
- Voltage signal from resonant BPM. Signal is
representation of beam spectrum.
8MatLab Analysis of RHIC PLL/TF System
- Beam Simulation Block Description (continued)
- Initial Input Parameters
- Bunch Description
- Reference Beam Energy
- Particle Mass and Charge
- Number of particles in bunch
- Number of bunches
- Bunch Length
- Energy Spread within the bunch
9MatLab Analysis of RHIC PLL/TF System
- Beam Simulation Block Description (continued)
- Initial Input Parameters (continued)
- Accelerator Description
- Name of SXF RHIC file
- Names of selected elements
10MatLab Analysis of RHIC PLL/TF System
S-Function Interface
11MatLab Analysis of RHIC PLL/TF System
UAL-based Beam Simulation Block (BSB)
Simulink PLL Model
Discrete State S-Function
Beam Simulation Block
BPM data
number of turns
kicker
Quad and sextupole strengths
Simulator Model
Combination of sector maps and element trackers
UAL
Collection of C accelerator libraries
RHIC Data Source (SXF File)
12MatLab Analysis of RHIC PLL/TF System
Simulink SimStruct-based Data Exchange Approach
- Access to local C objects
- ssGetPWork access a pointer to the C/C object
(e.g. accelerator, - simulator, etc.) used locally in the S-Function
methods - (straightforward and perfect)
- Importing data via Input Port
- ssGetInputPortRealSignal access an array of
double elements - connected to an input port
- (straightforward, but primitive)
- ssGetInputPortSignal get address to input
signals of type other - that double
- (perfect, but needs to be studied)
13MatLab Analysis of RHIC PLL/TF System
Simulink SimStruct-based Data Exchange Approach
(continued)
- Exporting data via Output Port
- ssGetOutputPortRealSignal access an array of
double elements - connected to an output port
- (straightforward, but primitive)
- ssGetOutputPortSignal get address to output
signals of type other - that double
- (perfect, but needs to be studied)
14MatLab Analysis of RHIC PLL/TF System
Platform
- The UAL library compiles on the Linux g
compiler version 2.95.2. - MatLab versions 6.1 and 6.0 are compatible with
this compiler. - Simulation time is a concern. Linux will allow
the simulation to run - on a multiprocessor cluster.
- Selection of the tracking engine will be driven
by accuracy, and the - time a turn takes to compute.
15MatLab Analysis of RHIC PLL/TF System
MatLab Model
16MatLab Analysis of RHIC PLL/TF System
Beam Simulation Block
?px ?py
x y
Voltage
Voltage
Kicker
UAL
PU
ct
17MatLab Analysis of RHIC PLL/TF System
Beam Simulation Block, Kicker
Where K is the transverse kicker constant Vk is
the kicker input voltage
18MatLab Analysis of RHIC PLL/TF System
Beam Simulation Block, PU
- Bin the bunch according to ct perhaps 10 bins
per bunch - Count the number of particles in a bin and use
to compute - the charge in the bin Nb(t). Where t is the
time of arrival - of the center of the bin.
- Find the average position of the particles in
the bin and use - as xb(t).
- Calculate Vp(t) Zp (Ib(t) xb(t)) where Ib(t)
Nb(t)e