machine correction, optimization and statistics

Moderators: cyao, michael_borland

simone.dimitri
Posts: 46
Joined: 09 Jun 2008, 01:19

machine correction, optimization and statistics

Post by simone.dimitri » 10 Nov 2014, 04:22

Hello everybody,
I have a ring (Elettra) including errors. I am able to correct trajectory, tunes and chromaticities. I am also able to optimize some coupling parameters (e.g., emittanceRatio). And I do this for a given set of error seeds (one random generator and, say, 100 runs).

In order to make statistical analysis of the runs output, I am doing all these actions in sequence.
But: when I also optimize, the orbit correction, tunes correction and chromaticity correction interleave with the optimization action. This is neither requested nor efficient in terms of CPU time.

Instead, I would like to perform machine corrections first, then optimize, then start again with a new error set.
Is there any option in the *.ele file that permit this? I mean, that makes the optimization not interfering with the previous corrections?

Hope I was clear enough, although not completely sure.
Thank you in advance. Simone.

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

Re: machine correction, optimization and statistics

Post by michael_borland » 10 Nov 2014, 14:30

Simone,

Could you upload your .ele file (or mail it to me)? I'm not 100% sure I understand the problem.

--Michael

simone.dimitri
Posts: 46
Joined: 09 Jun 2008, 01:19

Re: machine correction, optimization and statistics

Post by simone.dimitri » 11 Nov 2014, 09:00

elettra_run1.ele
(9.72 KiB) Downloaded 371 times
Dear Michael,
maybe I found the problem. Anyway, please find files in attachment. First I run elettra_run0.ele, then elettra_run1.ele.
To my understanding, I am producing N-perturbed lattices (run0). Then I upload each of them in sequence and correct tunes, chromaticity, orbit. Finally, I optimize some coupling-related parameters (run1). I also re-run the optimized lattices.

Could you please check that all options in the tune, chromaticity and orbit correction are OK? And also that I am correctly loading the perturbed lattices (I mean, including both errors and corrections) in sequence?
Thank you again. S.
Attachments
settings.sdds
(323 Bytes) Downloaded 357 times
elettra_run0.ele
(18.24 KiB) Downloaded 370 times

simone.dimitri
Posts: 46
Joined: 09 Jun 2008, 01:19

Re: machine correction, optimization and statistics

Post by simone.dimitri » 11 Nov 2014, 09:01

And this is the lattice.
Attachments
elettra_20140526.lte
(64.96 KiB) Downloaded 414 times

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

Re: machine correction, optimization and statistics

Post by michael_borland » 11 Nov 2014, 16:06

Simone,

Overall, this looks fine, but I spotted a few things:
  • * You list three quadrupoles in the tune-correction command. Only two are used. The next release will have some improvements in this regard for both tune and chromaticity correction.
    * The chromaticity correction was not working very well. The correction fraction was too large and the number of iterations too small.
I made changes to address these issues and attach the file here.

--Michael
Attachments
elettra_run0.ele
(18.24 KiB) Downloaded 388 times

simone.dimitri
Posts: 46
Joined: 09 Jun 2008, 01:19

Re: machine correction, optimization and statistics

Post by simone.dimitri » 11 Nov 2014, 16:16

Many thanks Michael. Cheers,
S.

simone.dimitri
Posts: 46
Joined: 09 Jun 2008, 01:19

Re: machine correction, optimization and statistics

Post by simone.dimitri » 12 Jan 2016, 04:49

Hi Michael and everybody,

I am simulating orbit correction in a new lattice with strong quad and dipole gradients. I find that the orbit correction does not converge at all already for minuscule errors (5-10 micron rms). I have one BPM in each quad, and steerers in each sextupole. The set of elements looks to me super-abundant. Of course, I tried different sets of elements with no success. So, I suspect my setting of the &correct module in the .ele file is not correct :?

Could someone have a look to that, and tell me what is wrong? Or provide suggestions?

I am attaching all the files needed (*.ele, *.lte, settings.sdds) in a zipped folder. For simplicity, just run "analysis.txt", which sets input parameters, reads lattice, run command file and plot orbit.
Thank you in advance. I wish you all a Happy New Year.
Attachments
orbit_correction.zip
(922.28 KiB) Downloaded 396 times

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

Re: machine correction, optimization and statistics

Post by michael_borland » 12 Jan 2016, 13:29

Simone,

I don't see any one thing that explains the problem, but here are some things to try
  • * Set the N_KICKS parameter on the CSBEND elements to 30-40 for the long bends. Otherwise, the integrator is not that accurate.
    * Set the N_KICKS parameter on the quads and sextupoles as well. I'd suggest values of 20-30 and 10 respectively.
    * Fix the closure of the ring. I find the floor coordinates (X, Z, and theta) don't close on themselves, which I've seen in the past can cause problems with orbit determination (although I don't claim to understand why).
    * Set the sextupoles strengths to zero for the first correction attempts.
If none of these works, post again and I'll have another look.

--Michael

simone.dimitri
Posts: 46
Joined: 09 Jun 2008, 01:19

Re: machine correction, optimization and statistics

Post by simone.dimitri » 18 Jan 2016, 04:20

Thank you a lot, Michael, it worked.
Both the higher number of kicks in the magnets and the closure of the floor coordinates helped. I am now able to steer the orbit and close it down to (at least) 1e-8 accuracy, and with sextupoles at nominal setting.
Cheers,
S.

marlibgin
Posts: 54
Joined: 15 Mar 2011, 12:43

Re: machine correction, optimization and statistics

Post by marlibgin » 18 Aug 2021, 03:47

Hi all
I am working on an elegant version of the MAXIV 3GeV lattice and I am trying to do orbit corrections after distorting the orbit by magnet errors. The robit indeed squeezes from about 1mm to 10um, however the residuals at BPMs do not make me completely happy. In the horizontal plane I can reach a nm scale, whereas in the vertical BPMs I cannot do better than 2um RMS, which means that in some VCMs I am left with more than 5um offset.
It is also evident from the correction process that the vertical plane cannot reach convergence, and these 2um RMS are a sort of wall.

I have been reading the advice given to Simone, and tried to rule out trivial causes, so now my N_KICKS should all be 30, I checked also the closure of the ring that I had to correct (dZ was longer by 350um and is now 24um, dX is not less than a nm, dTHETA was 4.2urad and now 0.3urad). I have attached another picture illustrating the present status on the floor, in the vicinity of the ring closure.

Silencing the sextupoles does not seem to make any difference.

If a look can be given I would be extremely grateful, since now I am really short of ideas:
So I also attach ERRORS_MISALIGNMENTS3.tar.gz, where one can run an example
In it:
- clean.sh removes useless files
- run_ele.sh, runs the run0_errors.ele file with the requested input macros, after running clean.sh

Thanks
Marco
Attachments
LatticeClosure_XZfloor.png
LatticeClosure_XZfloor.png (9.68 KiB) Viewed 4253 times
orbit_uncorrected_vs_corrected.png
HCM_VCM.png

Post Reply