190 likes | 376 Views
MatLab Analysis of RHIC PLL/TF System. Carl Schultheiss, Nickolay Malitsky Cern PLL Workshop June 10-11, 2002. MatLab Analysis of RHIC PLL/TF System. Beam Simulation Requirements
E N D
MatLab Analysis of RHIC PLL/TF System Carl Schultheiss, Nickolay Malitsky Cern PLL Workshop June 10-11, 2002
MatLab 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.
MatLab 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.
MatLab 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.
MatLab 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.
MatLab 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.
MatLab 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.
MatLab 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
MatLab 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
MatLab Analysis of RHIC PLL/TF System S-Function Interface
MatLab 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)
MatLab 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)
MatLab 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)
MatLab 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.
MatLab Analysis of RHIC PLL/TF System MatLab Model
MatLab Analysis of RHIC PLL/TF System Beam Simulation Block px py x y Voltage Voltage Kicker UAL PU ct
MatLab Analysis of RHIC PLL/TF System Beam Simulation Block, Kicker • Calculate px from: Where K is the transverse kicker constant Vk is the kicker input voltage
MatLab 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