Multiple error of dipole, Quadrupole, and sextupole in ELEGANT

Moderators: cyao, michael_borland

gwei
Posts: 33
Joined: 17 Jul 2015, 07:16

Multiple error of dipole, Quadrupole, and sextupole in ELEGANT

Post by gwei » 14 Sep 2015, 09:01

According to multiple error of PEP II,
Multipole error of PEP II magnets.jpg
Multipole error of PEP II magnets
and definition in ELEGANT, I made ELEGANT input as follow for Quadrupole and Sextupole
QSPDS02: KQUAD, L=0.8, K1=-0.0696970675375, TILT=0, N_KICKS=20,&
systematic_multipoles="quadSysMult.sdds",&
random_multipoles="quadRanMult.sdds"
SXT02: KSEXT, L=0.5, K2=-1.1938196234, TILT=0, N_KICKS=10,&
systematic_multipoles="sextSysMult.sdds",&
random_multipoles="sextRanMult.sdds"

quadSysMult.sdds:
SDDS1
&parameter name=referenceRadius, units=m, type=double, &end
&column name=LEGOorder, type=long, &end
&column name=an, type=double, &end
&column name=bn, type=double, &end
&column name=order, type=long, &end
&data mode=ascii, &end
! page number 1
4.490000000000000e-02
12
3 1.030000000000000e-03 0.000000000000000e+00 2
4 5.600000000000000e-04 0.000000000000000e+00 3
5 4.800000000000000e-04 0.000000000000000e+00 4
6 2.370000000000000e-03 0.000000000000000e+00 5
7 0.000000000000000e-06 0.000000000000000e+00 6
8 0.000000000000000e-06 0.000000000000000e+00 7
9 0.000000000000000e+00 0.000000000000000e+00 8
10 -3.10000000000000e-03 0.000000000000000e+00 9
11 0.000000000000000e+00 0.000000000000000e+00 10
12 0.000000000000000e+00 0.000000000000000e+00 11
13 0.000000000000000e+00 0.000000000000000e+00 12
14 -2.63000000000000e-03 0.000000000000000e+00 13

Here I list only systematic error for Quadrupole, it may be the similar case for others
Question 1: Am I right in this sdds file? it has two columns for order, and two columns for data
I am worry about the order may be wrong. And are the last two column for skew error?

For Dipole, it seems a little complicated, I calculated bn in ELEGANT
bn=n!*X^(-n)*(∆B)/B
Multipole error of PEP II dipole to ELEGANT.jpg
Multipole error of PEP II dipole to ELEGANT
Then for dipole of CSBEND
BXAF: CSBEND, L=8, ANGLE=0.07333499518, TILT=0, &
E1=0.0, E2=0.0, K1=0.0, B2=0.000667, N_KICKS=20
&error_element name=B*, element_type=*BEN*, item=B2, amplitude=2.13e-3, type="gaussian", cutoff=3.0, after=MERRORSTART, before=MERRORSTOP,
bind=0, fractional=0, additive=1 &end
&error_element name=B*, element_type=*BEN*, item=B3, amplitude=2.13e-1, type="gaussian", cutoff=3.0, after=MERRORSTART, before=MERRORSTOP,
bind=0, fractional=0, additive=1 &end
&error_element name=B*, element_type=*BEN*, item=B4, amplitude=5.69e+1, type="gaussian", cutoff=3.0, after=MERRORSTART, before=MERRORSTOP,
bind=0, fractional=0, additive=1 &end
&error_element name=B*, element_type=*BEN*, item=B5, amplitude=1.21e+4, type="gaussian", cutoff=3.0, after=MERRORSTART, before=MERRORSTOP,
bind=0, fractional=0, additive=1 &end
Question 2: Am I right for those systematic and random error for CSBEND?

Question 3: When we do tracking for 1000 turns, are those random errors changed in different turns or not?
Last edited by gwei on 14 Sep 2015, 10:41, edited 9 times in total.

michael_borland
Posts: 1795
Joined: 19 May 2008, 09:33
Location: Argonne National Laboratory
Contact:

Re: Multiple error of dipole, Quadrupole, and sextupole in ELEGANT

Post by michael_borland » 14 Sep 2015, 09:37

Not sure what the question is here...

--Michael

gwei
Posts: 33
Joined: 17 Jul 2015, 07:16

Re: Multiple error of dipole, Quadrupole, and sextupole in ELEGANT

Post by gwei » 14 Sep 2015, 10:29

michael_borland wrote:Not sure what the question is here...

--Michael
I finished the questions. I met some problem of upload pictures that moment

michael_borland
Posts: 1795
Joined: 19 May 2008, 09:33
Location: Argonne National Laboratory
Contact:

Re: Multiple error of dipole, Quadrupole, and sextupole in ELEGANT

Post by michael_borland » 14 Sep 2015, 11:18

The SDDS file for the quadrupole multipoles looks fine, except the entry for LEGOOrder=4 is incorrect (seems you copied the random rather than the systematic value). If is not a problem to have the extra order column (LEGOOrder); elegant will only look at the order, an (upright multiple), and bn (skew multipole) columns. To see better what is what, try sddsprintout

Code: Select all

% sddsprintout quadSysMult.sdds -column=*
Also, since conventions for "an" and "bn" differ, I recommend using the column names "normal" and "skew" instead of "an" and "bn", in order to avoid confusion. (This is available in elegant 27 and later.)

The dipole setup looks correct. At least the equation is correct. I didn't check the actual values. You may also use "f2", "f3", "f4", ... instead of "b2", "b3", ..., provided you give a value for the XREFERENCE parameter. This avoids the need to translate the values.

--Michael

michael_borland
Posts: 1795
Joined: 19 May 2008, 09:33
Location: Argonne National Laboratory
Contact:

Re: Multiple error of dipole, Quadrupole, and sextupole in ELEGANT

Post by michael_borland » 14 Sep 2015, 11:20

In answer to your question, the random multipole values vary from step to step, but are fixed from turn to turn. If you run several error seeds (&run_setup n_steps parameter), you'll get different values for the random multipole contributions.

If you do only a single run, then you can change the random_number_seed in &run_setup to get different random values. By default, the seed is fixed for all runs (so things reproduce).

--Michael

gwei
Posts: 33
Joined: 17 Jul 2015, 07:16

Re: Multiple error of dipole, Quadrupole, and sextupole in ELEGANT

Post by gwei » 14 Sep 2015, 11:37

michael_borland wrote:The SDDS file for the quadrupole multipoles looks fine, except the entry for LEGOOrder=4 is incorrect (seems you copied the random rather than the systematic value). If is not a problem to have the extra order column (LEGOOrder); elegant will only look at the order, an (upright multiple), and bn (skew multipole) columns. To see better what is what, try sddsprintout

Code: Select all

% sddsprintout quadSysMult.sdds -column=*
Also, since conventions for "an" and "bn" differ, I recommend using the column names "normal" and "skew" instead of "an" and "bn", in order to avoid confusion. (This is available in elegant 27 and later.)

The dipole setup looks correct. At least the equation is correct. I didn't check the actual values. You may also use "f2", "f3", "f4", ... instead of "b2", "b3", ..., provided you give a value for the XREFERENCE parameter. This avoids the need to translate the values.

--Michael
Thank you very much for your kindly quick answer.
And by the way, what are meanings of LEGOorder and order?
It seems for a sextupole field, LEGOorder is 3, but order is 2.
Is it right?
Last edited by gwei on 14 Sep 2015, 11:41, edited 1 time in total.

michael_borland
Posts: 1795
Joined: 19 May 2008, 09:33
Location: Argonne National Laboratory
Contact:

Re: Multiple error of dipole, Quadrupole, and sextupole in ELEGANT

Post by michael_borland » 14 Sep 2015, 11:40

LEGO and elegant use different conventions for the order of multipoles. E.g., LEGO uses order=1 for dipoles, while elegant uses order=0, etc. The SDDS file has a column for each convention.

You can learn more about the convention in elegant from the manual, particularly section 9.1 and the manual entry for KQUAD.

--Michael

gwei
Posts: 33
Joined: 17 Jul 2015, 07:16

Re: Multiple error of dipole, Quadrupole, and sextupole in ELEGANT

Post by gwei » 14 Sep 2015, 11:45

michael_borland wrote:LEGO and elegant use different conventions for the order of multipoles. E.g., LEGO uses order=1 for dipoles, while elegant uses order=0, etc. The SDDS file has a column for each convention.

You can learn more about the convention in elegant from the manual, particularly section 9.1 and the manual entry for KQUAD.

--Michael
Thank you very much!

Cai_Meng
Posts: 17
Joined: 19 Jun 2017, 08:01

Re: Multiple error of dipole, Quadrupole, and sextupole in ELEGANT

Post by Cai_Meng » 21 Mar 2018, 04:41

Dear Michael,

To understand the random mulitploe and systematic mulipole, for one step, the systematic mulipole value is same for one type magnet and the random multipole value is different for each magnet even same type; for different step, the systematic multipole value is different for one type magnet. Is the understanding right or not?
Another question, in the manual the random multipole value is rms, how about the distribution and the cutoff?

Thank you very much!
Best regards,
Cai

michael_borland
Posts: 1795
Joined: 19 May 2008, 09:33
Location: Argonne National Laboratory
Contact:

Re: Multiple error of dipole, Quadrupole, and sextupole in ELEGANT

Post by michael_borland » 21 Mar 2018, 08:08

Cai,

The systematic multipoles are fixed values. They represent the multipole errors that are part of the magnet design and will be present even if the magnet is built exactly as designed. So, for example, in a quadrupole we'll have 12-pole, 20-pole, 28-pole, etc., which is unavoidable because the hyperbolic pole profile must be truncated to build a physical magnet. As you stated, these should be the same for magnets of the same family, though elegant gives you the freedom to define these however you like.

The random multipoles represent the effects of construction errors: inaccurate machining, variations in magnetic material, inaccurate assembly, etc. These are generated with a gaussian distribution and a 2-sigma cutoff. The rms levels can be obtained from measurements on a large set of magnets, or using the program sddsrandmult to estimate the effect of anticipated construction errors.

--Michael

Post Reply