ROUNDING ERRORS IN BEAM-TRACKING CALCULATIONS

Similar documents
MODULE 1. e x + c. [You can t separate a demominator, but you can divide a single denominator into each numerator term] a + b a(a + b)+1 = a + b

Fall 2013 Physics 172 Recitation 3 Momentum and Springs

Sections 15.1 to 15.12, 16.1 and 16.2 of the textbook (Robbins-Miller) cover the materials required for this topic.

Kinetic Model Completeness

, which yields. where z1. and z2

Lab 1 The Scientific Method

Chapter 3 Kinematics in Two Dimensions; Vectors

Math Foundations 20 Work Plan

arxiv:hep-ph/ v1 2 Jun 1995

CS 477/677 Analysis of Algorithms Fall 2007 Dr. George Bebis Course Project Due Date: 11/29/2007

FIELD QUALITY IN ACCELERATOR MAGNETS

Bootstrap Method > # Purpose: understand how bootstrap method works > obs=c(11.96, 5.03, 67.40, 16.07, 31.50, 7.73, 11.10, 22.38) > n=length(obs) >

making triangle (ie same reference angle) ). This is a standard form that will allow us all to have the X= y=

Ray tracing equations in transversely isotropic media Cosmin Macesanu and Faruq Akbar, Seimax Technologies, Inc.

Physics 2B Chapter 23 Notes - Faraday s Law & Inductors Spring 2018

Physics 2010 Motion with Constant Acceleration Experiment 1

Building to Transformations on Coordinate Axis Grade 5: Geometry Graph points on the coordinate plane to solve real-world and mathematical problems.

SPH3U1 Lesson 06 Kinematics

A study on GPS PDOP and its impact on position error

AP Statistics Notes Unit Two: The Normal Distributions

[COLLEGE ALGEBRA EXAM I REVIEW TOPICS] ( u s e t h i s t o m a k e s u r e y o u a r e r e a d y )

LCAO APPROXIMATIONS OF ORGANIC Pi MO SYSTEMS The allyl system (cation, anion or radical).

POLARISATION VISUAL PHYSICS ONLINE. View video on polarisation of light

This section is primarily focused on tools to aid us in finding roots/zeros/ -intercepts of polynomials. Essentially, our focus turns to solving.

Interference is when two (or more) sets of waves meet and combine to produce a new pattern.

Lab #3: Pendulum Period and Proportionalities

Pattern Recognition 2014 Support Vector Machines

AP Physics Kinematic Wrap Up

Determining the Accuracy of Modal Parameter Estimation Methods

Flipping Physics Lecture Notes: Simple Harmonic Motion Introduction via a Horizontal Mass-Spring System

Medium Scale Integrated (MSI) devices [Sections 2.9 and 2.10]

Flipping Physics Lecture Notes: Simple Harmonic Motion Introduction via a Horizontal Mass-Spring System

Kinematic transformation of mechanical behavior Neville Hogan

How do scientists measure trees? What is DBH?

Modelling of Clock Behaviour. Don Percival. Applied Physics Laboratory University of Washington Seattle, Washington, USA

Figure 1a. A planar mechanism.

NUMBERS, MATHEMATICS AND EQUATIONS

MATHEMATICS SYLLABUS SECONDARY 5th YEAR

ENSC Discrete Time Systems. Project Outline. Semester

I. Analytical Potential and Field of a Uniform Rod. V E d. The definition of electric potential difference is

MODULE FOUR. This module addresses functions. SC Academic Elementary Algebra Standards:

ECEN 4872/5827 Lecture Notes

5 th grade Common Core Standards

Multiple Source Multiple. using Network Coding

Effect of Paramagnetic Ions in Aqueous Solution for Precision Measurement of Proton Gyromagnetic Ratio

Chemistry 20 Lesson 11 Electronegativity, Polarity and Shapes

^YawataR&D Laboratory, Nippon Steel Corporation, Tobata, Kitakyushu, Japan

ACOUSTIC LOGGING GUIDED WAVES IN TRANSVERSELY ISOTROPIC FORMATIONS

CHAPTER 4 DIAGNOSTICS FOR INFLUENTIAL OBSERVATIONS

o o IMPORTANT REMINDERS Reports will be graded largely on their ability to clearly communicate results and important conclusions.

CHAPTER 3 INEQUALITIES. Copyright -The Institute of Chartered Accountants of India

Cambridge Assessment International Education Cambridge Ordinary Level. Published

A Comparison of Methods for Computing the Eigenvalues and Eigenvectors of a Real Symmetric Matrix. By Paul A. White and Robert R.

Thermodynamics and Equilibrium

ANSWER KEY FOR MATH 10 SAMPLE EXAMINATION. Instructions: If asked to label the axes please use real world (contextual) labels

Sodium D-line doublet. Lectures 5-6: Magnetic dipole moments. Orbital magnetic dipole moments. Orbital magnetic dipole moments

Phys. 344 Ch 7 Lecture 8 Fri., April. 10 th,

Physical Layer: Outline

OTHER USES OF THE ICRH COUPL ING CO IL. November 1975

Finding the Earth s magnetic field

14. Which shows the direction of the centripetal force acting on a mass spun in a vertical circle?

Physics 212. Lecture 12. Today's Concept: Magnetic Force on moving charges. Physics 212 Lecture 12, Slide 1

14. Which shows the direction of the centripetal force acting on a mass spun in a vertical circle?

NUROP CONGRESS PAPER CHINESE PINYIN TO CHINESE CHARACTER CONVERSION

OF SIMPLY SUPPORTED PLYWOOD PLATES UNDER COMBINED EDGEWISE BENDING AND COMPRESSION

Here is instructions on how to use the simulation program.(the first simulation is used in question 5)

Revised 2/07. Projectile Motion

Computational modeling techniques

Module 4: General Formulation of Electric Circuit Theory

Thermodynamics Partial Outline of Topics

Differentiation Applications 1: Related Rates

and the Doppler frequency rate f R , can be related to the coefficients of this polynomial. The relationships are:

Aerodynamic Separability in Tip Speed Ratio and Separability in Wind Speed- a Comparison

**DO NOT ONLY RELY ON THIS STUDY GUIDE!!!**

SUPPLEMENTARY MATERIAL GaGa: a simple and flexible hierarchical model for microarray data analysis

Therefore the atomic diameter is 5 orders of magnitude ( times) greater than the m

COMP 551 Applied Machine Learning Lecture 9: Support Vector Machines (cont d)

February 28, 2013 COMMENTS ON DIFFUSION, DIFFUSIVITY AND DERIVATION OF HYPERBOLIC EQUATIONS DESCRIBING THE DIFFUSION PHENOMENA

Name AP CHEM / / Chapter 1 Chemical Foundations

Soliton-Effect Optical Pulse Compression in Bulk Media with χ (3) Nonlinearity. 1 Introduction

/ / Chemistry. Chapter 1 Chemical Foundations

A Simple Set of Test Matrices for Eigenvalue Programs*

Appendix I: Derivation of the Toy Model

UNIT 6 DETERMINATION OF FLASH AND FIRE POINT OF A LUBRICATING OIL BY OPEN CUP AND CLOSED CUP METHODS

EHed of Curvature on the Temperature Profiles

You need to be able to define the following terms and answer basic questions about them:

Verification of Quality Parameters of a Solar Panel and Modification in Formulae of its Series Resistance

Revision: August 19, E Main Suite D Pullman, WA (509) Voice and Fax

A Matrix Representation of Panel Data

LHS Mathematics Department Honors Pre-Calculus Final Exam 2002 Answers

Methods for Determination of Mean Speckle Size in Simulated Speckle Pattern

Materials o o o o o o o o o

The Electromagnetic Form of the Dirac Electron Theory

Phys101 Final Code: 1 Term: 132 Wednesday, May 21, 2014 Page: 1

Acids and Bases Lesson 3

The special theory of relativity

Study Group Report: Plate-fin Heat Exchangers: AEA Technology

ECE 5318/6352 Antenna Engineering. Spring 2006 Dr. Stuart Long. Chapter 6. Part 7 Schelkunoff s Polynomial

11. DUAL NATURE OF RADIATION AND MATTER

Transcription:

Particle Acceleratrs, 1986, Vl. 19, pp. 99-105 0031-2460/86/1904-0099/$15.00/0 1986 Grdn and Breach, Science Publishers, S.A. Printed in the United States f America ROUNDING ERRORS IN BEAM-TRACKING CALCULATIONS P. WILHELM and E. LOHRMANN II. Institut fur Experimentalphysik, Universitiit Hamburg, Hamburg, Germany (Received March 7, 1985) The cmputer simulatin f particle dynamics in acceleratrs and strage rings has becme an imprtant tl in acceleratr physics. In ne methd particles are tracked by explicitly cmputing their mtin thrugh the magnets and the drift spaces f the machine ("kick cdes"). The purpse f ur wrk is t investigate hw the results are affected by the finite numerical accuracy f the cmputatin. Our study reveals a strng influence f runding errrs n the results f tracking calculatins. They grw much mre rapidly with the number f turns than naively expected. Therefre they give a limit f meaningful calculatins. In ur example, this limit is reached fr a few 10 6 turns arund the strage ring, crrespnding t sme 10 secnds' real-strage time. I. INTRODUCTION At DESY an electrn-prtn cllider HERA (hadrn-electrn ring ~cceleratr) will be built. It will cnsist f tw separate strage rings fr the electrns and prtns. The prtn ring will have supercnducting magnets. The prtn strage ring was used as an example in the present investigatin. Particles were tracked by explicitly cmputing their mtin thrugh the magnets and drift spaces f the machine. The mtin f a particle in the magnetic field f a strage ring is described by the fllwing differential equatins: d 2 x e -d2+ Kx(S) x=- Bz(z,x,s), s P d 2 z e ds 2 + KAs) z = - P Bx(z, x, s), where x, z = hrizntal and vertical displacement f the particle frm the ideal rbit, s = lngitudinal crdinate, K x, K z = fcusing strengths (including weak and edge fcusing), B x, B z = transverse cmpnents f the additinal magnetic field (B s = 0), P = design mmentum f the particle. The actual cmputatin was dne using the prgram RACETRACK l. We investigated the rle f runding errrs using this prgram as applied t ne versin f the HERA prtn strage ring. In the RACETRACK cde linear magnetic 99 (1)

100 P. WILHELM AND E. LOHRMANN elements (drift spaces, diples, quadruples) are represented by their transfrmatin matrices. These elements are cmbined int blcks as far as pssible. Each blck is represented by ne matrix nly. The crdinates after the kth blck are calculated by the usual matrix frmalism fr linear ptics. Nnlinear elements are treated in the thin-magnet apprximatin. This means that nly the directin f the particle (x', z') is changed at ne pint in the middle f the magnet ("kick cde"): X~+l =x~+ ~x', ~,=i.±(bn+ian)(x+izt- 1 P n=l In the HERA structure, which we have used fr ur investigatins,2 we had 836 linear blcks, 208 pure sextuples, and 600 elements with multiples up t and including n = 9. The plynmials in Eq. (2) were develped by hand and explicitly written dwn as "Hrner Schema" in the cmputer cde. T calculate ne turn arund the strage ring, we had t carry ut 250 000 flating-pint peratins. Nrmally the calculatins are carried ut in duble precisin n an IBM 3081 cmputer. In this case, ne revlutin, which crrespnds t 20 J-tS strage time, takes 80 ms f CPU time. Much f this wrk was als dne n a 370 E (emulatr), develped by H. Brahman et ale (Weizmann Institute) and perated at DESY by D. Ntz. Its speed is abut 1/5 f an IBM 3081D fr ur cdes. On an IBM cmputer, single-precisin numbers are represented with 24-bit mantissa, duble precisin with 56, and furfld precisin with 120-bit mantissa. The errr in the representatin f a single number, the single rundff errr, is f the rder f 2- t fr a t-bit mantissa; fr IBM cmputers it may be up t a factr f 8 larger because f their hexadecimal nrmalizatin. S, single runding errrs are very small, but they prpagate and accumulate and therefre becme nn-negligible after sme time. (2) II. METHODS We have used three different methds t determine the size f runding errrs. The first methd can nly be applied fr the special case f linear ptics withut skew quadruples. Here the hrizntal crdinates x, x' and the vertical crdinates z, z' are independent f each ther. The emittance 1 {2 2 [' a(s) J2} ex =fj(s) x (s) + fj (s) x (s) + fj(s) xes) (and E z analgus) is a cnstant f mtin. /3 is the /3-functin and a = -! dd fj. The emittance can be calculated frm the starting crdinates and must 2 s remain cnstant as the particle is traced thrugh the lattice. Deviatins must be due t runding errrs. (3)

BEAM-TRACKING CALCULATIONS 101 In a secnd general methd the runding errr can be determined by cmparing the tracking results with thse f a much mre accurate reference calculatin. Cmparisn f single precisin with a duble-precisin reference des nt wrk, because single precisin is much t inaccurate t be f any practical value. S we emulated a 40-bit mantissa (by masking the last 16 bits f duble precisin with zers after each flating-pint peratin). The results f this calculatin were cmpared t a duble-precisin reference. We have checked by a calculatin with furfld precisin that this reference is gd enugh fr ur purpse. As a third methd we used backtracking. The particle is first tracked fr a number f turns N arund the ring. Then its directin is reversed, and it is traced back thrugh the same magnet structure. It shuld then g exactly the same way back and finally after N turns f backtracking be at the starting pint again. Failure t d s must be due t the influence f runding errrs during the calculatin f a ttal f 2N revlutins. We determined the runding errr fr smaller numbers f revlutins by lking at crrespnding pints alng the path f the particle: n its way back, the particle shuld g thrugh the same pints it went thrugh frward. The distance f these crrespnding pints is due t runding errrs. Fr the backtracking, the matrices f the linear ptics are inverted: M- 1 = ( d-b), -c a because det M = 1. The kick Ax' is calculated in the same way as fr the tracking, but it is subtracted, nt added. As a check, we cmpared the results f the three methds fr a linear machine (the HERA prtn ring withut sextuples and higher-rder multiples). We have chsen 10 particle trajectries with starting crdinates lying n a phase-space ellipse with a betatrn amplitude f 12 mm at the starting pint. After averaging ver the 10 particles, we fund the fllwing results: as expected, the errrs fr 40-bit accuracy are larger by a factr f 2 16 than the errrs fr 56-bit accuracy. The relative errrs f z and z' are rughly equal; therefre fr 40-bit accuracy we calculated a cmmn mean value. The relative errr f the emittance is abut a factr f tw greater than the ne f the crdinates. This fact is rughly expected frm Eq. (3). These results are shwn in Fig. 1. In summary, the three different methds give a cnsistent picture fr the linear machine. In the same sense, we cmpared in spt checks the tw applicable methds fr the nnlinear machine and gt cnsistent results. (4) III. RESULTS We used the prgram RACETRACK as described t test the effect f runding errrs n the result f tracking calculatins. We used the methd f backtracking and duble precisin (real *8, 56-bit mantissa).

102 P. WILHELM AND E. LOHRMANN relative runding errr [-] I(L\e/ )av 1.\ (L\Z/z)av \t I(L\Z'/Z')av I 1.10-0 5.10-6 v..."1 1.10-8 5.10-9.v.. 40: bit accuracy: ~ :emittance:.'.... ''\1'. ~:tra'c'king i ~ z I 1.10-9 5.10-10.. 0 t t;l 6 6... ~... ~. 0 6 6 56 :bit accurapy: " Q.. : ':'emittance~'....:... 6.: :backtra ek~ng 'I,~z/z ~. A : :backtrack~ng I:~z'/z' I 1 5 10 50 100 500 1000 number f turns N [-] 38847 FIGURE 1 Relative runding errrs fr tracking as functins f the number f turns (fr 40-bit and 56-bit accuracy).

BEAM-TRACKING CALCULATIONS 103 We first studied the linear machine (nly diples, quadruples, and drift spaces). We find that the relative errr increases rughly prprtinal t the number f revlutins N, see Fig. 1. We pltted the distributin f the relative runding errrs in Fig. 2. There are tw grups f : the errrs in the hriz0ntal (x, x') and vertical (z, z') crdinates, re~pectively. The average errr in each grup grws apprximately linear with N. This behavir can be understd frm the nature f the linear apprximatins. Cnsider the transfer matrix M fr ne cmplete revlutin arund the ring, btained by multiplying all individual transfer matrices tgether. We shuld have det M = 1, and this guarantees that the emittance e is a cnstant f mtin. Due t runding errrs, the matrix M' actually used in the calculatins des generally nt have det M' = 1. Depending n whether det M' ~ 1, the emittance will increase/decrease with each turn, leading in the average t a psitive/negative value f the errr. Since the same (wrng) matrix is used fr each turn, this effect accumulates with the same sign fr each turn, and the errr increases linearly with N. It therefre prevails ver the effect f randm runding errrs, which shuld grw like Nl/ 2 10 8 after N= 1 turn 6 4 2 15 10 5 after N= 10 turns -3.0-2.0-1.0 0.0 1.0 2.0 3.0 relative runding errr li.y/y [10-13 ] -3.0-2.0-1.0 0.0 1.0 2.0 3.0 relative runding err'r tj.y/y [10-12 J 15 15 after N=100 turns 10 10 5 5 a.fter N= 1000 turns,--: r a -3.0-2.0-1.0 0.0 1.0 2.0 3.0 relative runding errr ~yiy [10-11 ] -3.0-2.0-1.0 0.0 1.0 2.0 3.0 relative runding errr t",y/y [10-10 J 38849 FIGURE 2 Evaluatin f relative runding errr fr particles with X max = 1.2 cm in the linear machine. Nte change f scale. unshaded: y = x, x'; det M' -1 = 1.2.10-13 shaded: y = z, z'; det M' -1 = -0.8 10-13

104 P. WILHELM AND E. LOHRMANN This behavir is brne ut in Fig. 2. As a matter f fact, the tw crdinate grups x, X' and z, z', which are calculated independently f each ther, differ in the sign f (det M -1). It shuld be nted here that the determinatin f the sign f (det M - 1) requires a calculatin with furfld precisin (real *16). Fr the nnlinear machine we investigated the abslute errrs f the amplitudes and directins, nrmalized t their maximum value, determined in the linear machine. We lked at the distributins f the nrmalized errrs fr samples f particle trajectries; they were chsen with the starting crdinates lying n phase-space ellipses with different betatrn amplitudes. The distributins are centered arund zer and symmetric. The rms values /( L\y)2)112 \ - are pltted vs. the number N in Fig. 3. Fr large values f N the rms Ymax errrs grw like N 2. There is a strng dependence n the betatrn amplitude. This behavir can be understd frm the physics f a nnlinear strage ring, which determines the errr prpagatin. The betatrn phase f a particle trajectry grws by 21C Q every turn, with Q = betatrn tune. In the nnlinear machine, the tune Q depends n the betatrn amplitude X max accrding t 10-5 r:----,----r-r-t"""t""'t'tt".---,---.,.--,..-,-t--rrrr--,----r--'t'-rrrr---,-----r-'t'--rrrr--.---r-'t'-rrrr;r---r--.---r--r'~ "." a [-] ".,,~ 10-6. - - - - """II'" : Xmax= 6.10 mm,,#" :-xmax=-12;oomm,..... -..,. '.. : Xmax= 16.00 mm quadrat~~"," A.,;,.'- 10-9 ",'--linear 10 10 0 10 6 number f turns N [-] 38848 FIGURE 3 a f nrmalized runding errr ~Y/Ymax fr the nnlinear machine.

BEAM-TRACKING CALCULATIONS 105 in first apprximatin. (Qlin = Q-value f the linear machine, q = cnstant). Because f the determinant errr, the amplitude changes systematically by a X max, a ==: 10-13 every turn, s the cmputed value f X max is x~~~ =xmax(1 + an). Therefre Q changes systematically every turn, and the errr in tune will be Qcalc - Q = Qlin q x~ax(2an + a 2 N 2 ). Fr an«1 we can integrate this equatin t get the errr in betatrn phase: epcalc - ep = in2jrqlinqx~ax 2aNdN ==: 2Jl'Qlin q x~ax a N 2, which shws indeed the N 2 dependence and the strng dependence n x max Our data reveal in fact that the errr in phase is systematic in nature: errr distributins in are again nt centred arund zer, but the sign f the errr crrespnds t the sign f the determinant errr, indicating that the present interpretatin is basically crrect. The significance f these bservatins is the fllwing: Even thugh the magnitude f a single runding errr is very small, their accumulated effect grws with N 2 and will eventually vertake ther effects which grw mre slwly with N. Fr ur prblem runding errrs limit the pssibility f meaningful tracking t a few millin revlutins. Hwever, the systematics explained abve pen the pssbility t heuristically crrect fr thse effects. 3 REFERENCES 1. A. Wrulich, DESY Reprts 82-04, 82-07, 84-026. 2. F. Schmidt, Diplma thesis, Hamburg University, 1984. 3. F. Schmidt, private cmmunicatin, and ther papers in this cnference.