Orbit correction with impedance

Moderators: cyao, michael_borland

Post Reply
Teresia
Posts: 30
Joined: 04 Oct 2018, 08:42

Orbit correction with impedance

Post by Teresia » 15 Jul 2021, 11:44

Hi,

We are trying to simulate the effect of wakefields including errors in the lattice, but we don't get the orbit correction to work when having a transverse impedance in the lattice. The code doesn't give an error, but just stops the execution and returns MPI errors.

Is it not possible to do orbit correction when having an impedance in the lattice?

Best regards,

Teresia

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

Re: Orbit correction with impedance

Post by michael_borland » 20 Jul 2021, 14:03

Teresia,

That should not be a problem, but I'll look into it.

Meanwhile, you can use the &transmute_elements command to effectively disable the impedances while you correct the orbit, to avoid having to maintain separate lattice files. E.g.,

Code: Select all

&transmute_elements name=*, type=ZLONGIT, new_type=MARK &end
&transmute_elements name=*, type=ZTRANSVERSE, new_type=MARK &end
-Michael

Teresia
Posts: 30
Joined: 04 Oct 2018, 08:42

Re: Orbit correction with impedance

Post by Teresia » 21 Jul 2021, 13:18

Hi Michael,

Thank you for looking into it. Interestingly we have now discovered that the orbit correction works if we put start_on_pass = 1 on the impedance so we exclude the impedance for the first turn. It also works if we exclude the RF cavity from the lattice.

We want to include both alignment errors and multipole errors in the simulation. For the alignment errors we do a separate run first without the impedance in the lattice and we then load the errors and correction settings in the following runs, but if I have understood correctly there is no way to load the multipole errors between runs? So for the last run we need to add multipole errors, correct the orbit, tune and chromaticity and then track the lattice including impedance and RF for a multiparticle beam. The multiparticle beam we import with sdds_beam. That's the point where the simulation breaks so maybe it could just be a fiducialization problem which causes the orbit correction to fail? We also tried the closed_orbit command and it has the same problem so it seems like no closed orbit can be calculated unless we exclude either the impedance or the cavity.

Best regards,

Teresia

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

Re: Orbit correction with impedance

Post by michael_borland » 21 Jul 2021, 14:25

Teresia,

We handle this using a four-stage process.
  1. Using a lattice without impedances or RFMODE elements, errors are added and correction is simulated for many cases. We save a parameter file for each error/correction set. Multipoles may be included at this point. If so and if self-consistency is required, the random number seed (random_number_seed in &run_setup) needs to be known for each case and used for subsequent runs with the corresponding parameter file. (A good way to do this is use a sequence of values for the seeds, incrementing by 10, say, for each case.)
  2. Add insertion devices (using a different beamline definition in the same lattice file). This requires correcting the tunes and chromaticities, which we do with global offset knobs. In our case, the tune knob uses the four quadrupoles bracketing the IDs, adjusted as families; we don't need to perform lattice correction for ID effects, since the ring is high energy. We also find it sufficient to correct small errors in the chromaticities using global offset knobs.
  3. Perform tracking for DA/LMA/injection efficiency etc. with RFCA elements, for each parameter set, including multipoles.
  4. Perform collective effects tracking with RFMODE elements for selected parameter sets. We don't include higher multipole errors here, since that shouldn't impact instabilities; however, it can be done using the same procedures as DA/LMA tracking. The best way to put in the impedances along the beamline is using insert_elements; it allows defining, say, the impedance of a single BPM and then inserting it after every BPM element.
In truth, we don't bother to synchronize the seeds between the first step and the others. The reason is that we touch up the chromaticity correction after including multipoles in step 2, and that's sufficient to restore performance. The commissioning algorithm doesn't do anything to address higher multipoles, so I think this is reasonable.

--Michael

Teresia
Posts: 30
Joined: 04 Oct 2018, 08:42

Re: Orbit correction with impedance

Post by Teresia » 22 Jul 2021, 08:07

Hi,

Okay, thank you. That makes sense. We have a similar process, but we attempted to include the multipole errors and orbit correction also in step 4 which cased the error. The reason for that is because we between step 2 and step 3 move between running Elegant on a local machine to running Pelegant on a cluster, which seems to give us different multipole errors despite the same random number seed. That might not be a good way to do it if we want to be self-consistent with the seeds so we should try to move all the steps to the cluster. Then we could probably also avoid having to do orbit correction with impedance in the lattice.

Best regards,

Teresia

Post Reply