Problems with setting magnet strength in .lte file and correction to BPM Offsets

Moderators: cyao, michael_borland

Post Reply
richtmann
Posts: 9
Joined: 25 Jun 2019, 07:53

Problems with setting magnet strength in .lte file and correction to BPM Offsets

Post by richtmann » 15 Jul 2019, 14:27

Hello,

I'm trying to adjust the "bpmOffset1" example to our beamline. But I'm running into several problems:

1) Just in general I'm not able to change a trajectory by changing the magnet strengths (i.e. the kickers) in the .lte file. The output of the centroid file does not change at all no matter what strength is set in the .lte file. Why does that happen? However, if I load in the "injector_paramTest.sdds" file and change the strengths here it works.

2) If I try to create bpm offsets in run 1 and then adjust the beam to it in run 2 I always get 0 for all the centroids after the 20th element. Before the 20th element I get some sort of adjustment in one plane but in the other plane it is mostly not working. As I have to load in two files (the file with the bpm errors and the one with the beam parameters) I tried different options to use "load_parameters" to load these both files in because I was wondering if that was the problem. Still, I'm very confused why it does something until the 20th element and after that all the centroids are just zero. Could you tell my why that happens? And could you also tell me what is the correct way to load these two files in?

I'm using elegant 2019.1.1 and I include here all the files I'm using.

Thank you very much for your help!
Best,
Lea
Attachments
injector_paramTest.sdds
(2.7 KiB) Downloaded 132 times
INJECTOR.lte
(2.42 KiB) Downloaded 134 times
0160_mindE.sdds
(469.11 KiB) Downloaded 127 times

richtmann
Posts: 9
Joined: 25 Jun 2019, 07:53

Re: Problems with setting magnet strength in .lte file and correction to BPM Offsets

Post by richtmann » 15 Jul 2019, 14:28

Here are the other two files, I couldn't send all together.
Attachments
run2.ele
(735 Bytes) Downloaded 144 times
run1.ele
(1.11 KiB) Downloaded 142 times

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

Re: Problems with setting magnet strength in .lte file and correction to BPM Offsets

Post by michael_borland » 18 Jul 2019, 09:09

Lea,

Regarding run1.ele, I don't expect to see any centroid errors on the beam
  • [1] The kick values on the correction elements in the .lte file are all zero and there are no offsets of quadrupoles or other such elements.
    [2] The errors are assigned to the BPM offsets, which don't move the beam unless trajectory correction is applied, which it isn't in this run.
In run2.ele, there are no non-zero values for HKICK or VKICK in the file injector_paramTest.sdds or run1.erl, but there are BPM offsets in run1.erl. Since you use trajectory correction, the beam will be moved to follow the offsets to the extent possible. Another problem with this run is that you have several correctors in a row with no BPM in between, which makes the correction unstable. Although elegant by default tries to limit the number of singular values to prevent this, it doesn't always work. Try putting

Code: Select all

keep_largest_SVs[0] = 2*3
in the &correct command.

--Michael

richtmann
Posts: 9
Joined: 25 Jun 2019, 07:53

Re: Problems with setting magnet strength in .lte file and correction to BPM Offsets

Post by richtmann » 18 Jul 2019, 14:20

Hello Michael,

thank you very much for your answer. I have two follow up questions:

-) I also don't expect any centroid errors on the beam running run1.ele with the .lte file exactly how I sent it. My question was that even if I set non-zero kick values in this INJECTOR.lte file, all beam centroids still remain on zero. Whichever kick values I set in this file, the beam is not affected by it. The beam only gets affected by kick values that are set in the injector_paramTest.sdds file. So I'm wondering if there is something wrong with this .lte file.

-) Changing the number of singular values was very helpful! Thank you very much! However, I would like to understand, especially for future applications, how I can figure out what is a good value to set these to? Why did you chose 2*3?

Best,
Lea

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

Re: Problems with setting magnet strength in .lte file and correction to BPM Offsets

Post by michael_borland » 18 Jul 2019, 15:12

Lea,

The reason you don't see a non-zero trajectory is that the HKICK and VKICK values in the .lte file get overwritten by the values in injector_paramTest.sdds. If you remove those from the file, or use exclude_name_pattern to exclude them, you'll see a non-zero trajectory.

As for the setting of the number of singular values, I just started with 1 and increased it while watching the reported condition number (printed just after elegant reports the number of correctors and BPMs). If I set it to 3 in each plane, the condition number is 15.2, whereas for 4 SVs I get 1.6e34.

--Michael

richtmann
Posts: 9
Joined: 25 Jun 2019, 07:53

Re: Problems with setting magnet strength in .lte file and correction to BPM Offsets

Post by richtmann » 22 Jul 2019, 15:03

Hello Michael,

that was helpful, thank you!
I still have a follow up question:
If I want to do orbit correction with different beamlines, what is an efficient way to understand which singular value setting suits each situation? I tried the correction now with several other beamlines and keep running into the same problem, meaning that I don't find a singular value setting that makes the correction work for the whole trajectory.

Furthermore, I also checked the condition number. For a reason that I don't know it was printed in several runs before, but now it is not getting printed anymore. Is it possible that I accidentally disabled this output? What could I do to get it again?

Thank you for your help!
Best,
Lea

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

Re: Problems with setting magnet strength in .lte file and correction to BPM Offsets

Post by michael_borland » 07 Aug 2019, 08:24

Lea,

The condition number is the most reliable way to judge whether correction will be stable. The number of SVs should be less than or equal to the number of BPMs. Generally, elegant will figure out the correct number of singular values to use to avoid instability. However, having several correctors in a row or more correctors than BPMs can cause problems. If you have unstable correction, look for those situations and resolve them.

I'm not sure why you aren't seeing the condition number printed out. There's no switch that turns it on or off.

--Michael

Post Reply