1 / 22

XAL at J-PARC Hiroyuki Sako, G. Shen, JAEA C. K. Allen, ORNL

XAL at J-PARC Hiroyuki Sako, G. Shen, JAEA C. K. Allen, ORNL. Contents Why did we introduce XAL? Installing XAL Developing XAL Achievements with XAL Summary. Why did we introduce XAL to J-PARC?. All functions necessary for commissioning apps are there

dane-hodges
Download Presentation

XAL at J-PARC Hiroyuki Sako, G. Shen, JAEA C. K. Allen, ORNL

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. XAL at J-PARCHiroyuki Sako, G. Shen, JAEAC. K. Allen, ORNL Contents • Why did we introduce XAL? • Installing XAL • Developing XAL • Achievements with XAL • Summary

  2. Why did we introduce XAL to J-PARC? • All functions necessaryfor commissioning apps are there • EPICS CA(with a wrapper “Channel” class) • GUI (a template for GUI application) • Online model • RDB interface • Implemented in Java • Easy development/maintenance in OO language with IDE • Code organization seemed clear and good. Each code is understandable. • Close relation between model and device control • Read a channel and set the value to the model • Read data from the model and set it to a channel • “Virtual Accelerator” seemed attractive • Testing apps with simulation in CA without beam • There are many apps which may be used in J-PARC.

  3. Installing XAL • Building XAL (Linux, Windows) • Installation of java SDK, ant, JCA/CAJ, (EPICS, PCAS) • Building XAL had no problem. Successful in the first attempt. • Setup • JCA/CAJ configuration • PCAS (for virtual accelerator) • Development of XAL input files • Base for all XAL tools • Developed a RDB and an automatic generation tool input files • XAL lattice data structure is easy to map to RDB • Each element is located at a z-position. No need to fill drift between elements.

  4. PostgreSQL 8.1 Beam table Twiss/emittance/energy Generation of Probe file Lattice data Geometry table (static) Device parameter table (many sets of data with tags) Different tables for each device type Dipole magnet Quad magnet RF monitor ER diagram of Commissioning DB (for lattice info)

  5. Lattice Data Manager • GUI tool for lattice related tables • Save a lattice data set with a tag and comments • Generation of XAL and Trace3D lattice files • Both calculated sets and corrected sets with beam are stored with different tags

  6. Developing XAL • Extension and test of the online model • Detailed comparison of the online model with TRACE3D • Because we use also TRACE3D • As a result, we have fixed XAL bugs • Space charge calculations • RF gap transfer matrix • Finally difference from Trace3D becomes less than 1% (Thanks Chris) • PMQ (QM with fringe field) element added • Emittance growth effect at RF gap • Interface for PostgreSQL • PostgreSQL I/O class (PgsqlDatabaseAdaptor) implemented • DB tables created with same definitions from ORACLE ones. • It took only a few days. • PVlogger and SCORE work

  7. Version control • Short history May 04 First installation of XAL (got tar file from XAL web page) Updates of XAL were done by downloading tar file Dec 04 J-PARC version control started with CVS Jun 05 Updated (merged) with newest SNS code Aug 06 Moved to SVN (then we updated again with newest SNS version from SourceForge) • Found SVN is much nicer than CVS • Version control as a whole set of codes • Problem: hard to synchronize our version with SNS version • We customize our codes very much for J-PARC. • To update our version from SNS, we compared and merged every code manually. • Takes a week. • Any better way?

  8. Issues • No official document. Only Javadoc. • There is no tutorial how to write a XAL application • Merging version of each institute may be necessary in near future • JCA or CAJ? (not XAL problem) • JCA is stable but slow when treating many channels (more than a few hundreds) • CAJ1.1.3 is fast, but has problems in disconnection and “caput” • We identified bugs and fixed with Matej. • We still use JCA but could move to the next CAJ version.

  9. PVlogger or SCORE? • SCORE • Convenient for comparison and restoring functions • But heavy • In J-PARC LINAC (RF/magnets/monitors), we save ~ 9K channels • There is no periodic logging function • In J-PARC, some groups want to take a snapshot periodically • PVlogger • Can take a snapshot periodically • Also has a function to take a snapshot with comments • Parameters can be read from applications (such as MPX) • Connection with the model is there! • But restore function is not there • We added corresponding set point record entry in the DB table • Save and Restore application (like SCORE) must be implemented Can we use PVloggger instead of SCORE? • We’d like to have your suggestions

  10. Our achievements with XAL • XAL applications for LINAC beam commissioning • iTuning (RF tuning) • BBC (Beam Based Calibration) • Orbitcorrect (orbit correction) • EnergyMaster (beam energy analyzer) • SCORE (Save and Restore DB) • PVlogger Reference: ICALEPCS2007, Oct 18(Th) 17:40 H. Sako, et al, Beam commissioning software and database for J-PARC LINAC

  11. RF Tuning (iTuning) • Tune RF amplitude and phase to get a designed energy gain by measuring time-of-flight with Fast Current Transformers c2 of fit to a model (Parmila) as a function of RF amplitude Energy vs RF phase And fit to a model

  12. Beam Based Alignment (BBC) MEBT1 BPM05 • Change QM and steering field and measure beam positions with BPM • Find center of QM Steering field BPM Slope (Q vs BPM) QM field Center BPM positions as a function of the slopes (left plot) Downstream BPM positions vs QM field at each steerer field

  13. Orbit Correction (orbitcorrect) Before correction (SDTL) Measured BPM positions (horizontal) Prediction by online simulator After correction • After correction, Measured positions agrees well with prediction

  14. H0 dump (4kW) BLM×4 MWPM4 MWPM7 MWPM6 MWPM3 MWPM5 I-BPM(324) B 2nd & 3rd foils “IN” QL3BT Dump Q MWPM2 Dump STR (V & H) ISEP1 DSEP2 DSEP1 ISEP2 ± 磁 ± 磁 場 SB2 SB4 K-BPM(324) SB1 SB3 PB2 PB1 QDX QFL PB3 PB4 QDL QFM Big-BPM1 Big-BPM2 1st foil “OUT” First Injection to RCS (H0 dump) 5 Oct 2007 Carbon plate (thermometer) CM % 1 Beam profiles measured by MWPMs

  15. Summary • XAL was developed in J-PARC and successfully applied as LINAC commissioning tools • More active collaboration sharing information is useful for development of XAL

  16. Acknowledgements • We thank collaborators for successful beam commissioning of J-PARC LINAC with XAL • Especially • John Galambos, Chris Allen, Tom Pelaia, Paul Chu, and Andrej Shishlo

  17. Save and Restore DB (SCORE) • SCORE application with PostgreSQL • Save, Compare and Restore a set of channels • RF, magnets, monitors (~9k channels in total).

  18. EnergyMaster Energy measurement status • Collection of information • Beam destination • Beam current • RF timing • RF on/off • Choose a proper FCT pair and calculate energy depending on RF acceleration Energy evolution during RF tuning (PVlogger)

  19. First acceleration to 181 MeV24 Jan 2007 Measured Energy 181MeV Design Energy

  20. Applications We thought we can use XAL apps but actually developed most of them by ourselves-different hardware and tuning algorithms

  21. Some functions which may be useful (we could contribute) • Back propagation tracker • Starting with Twiss/emittance at downstream, calculate those at an upstream position • Newton-Raphson method with Response matrix • Much faster optimizing method than Simplex • A few 10 iterations converge instead of ~ 100 with Simplex • Proved to work in the transverse matching • Calculate Response matrix with online model • Applications

  22. Newton-Raphson method

More Related