Linear matrix not the same for ILmatrix and full lattice

Moderators: cyao, michael_borland

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

Linear matrix not the same for ILmatrix and full lattice

Post by Teresia » 10 Oct 2019, 08:04

Hi,

I compared the linear matrix I get from matrix_output for the full lattice and for the lattice using ILMatrix, but the 51 and 52 terms are not the same. Is this to be expected or have I done something wrong? To me this feels like using the ILMatrix means the tracking isn't completely symplectic?

This is what I get:

Full lattice:

C: 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 5.615710000000033e+02 0.000000000000000e+00
R1: 3.149344407357801e-01 9.006841945558126e+00 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 4.542307047850802e-02
R2: -9.720471500322525e-02 3.952965427091881e-01 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 9.546326232720805e-03
R3: 0.000000000000000e+00 0.000000000000000e+00 -1.909825787043899e-01 5.847853032138548e+00 0.000000000000000e+00 0.000000000000000e+00
R4: 0.000000000000000e+00 0.000000000000000e+00 -1.649396382041729e-01 -1.856569161881898e-01 0.000000000000000e+00 0.000000000000000e+00
R5: 7.421803533618314e-03 6.802666881946720e-02 0.000000000000000e+00 0.000000000000000e+00 1.000000000000000e+00 8.698502277821445e-02
R6: 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 1.000000000000000e+00


ILMatrix:

C: 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 5.615710000000033e+02 0.000000000000000e+00
R1: 3.149344407361952e-01 9.006841945556630e+00 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 4.542307047847398e-02
R2: -9.720471500321157e-02 3.952965427095899e-01 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 9.546326232718939e-03
R3: 0.000000000000000e+00 0.000000000000000e+00 -1.909825787045091e-01 5.847853032138412e+00 0.000000000000000e+00 0.000000000000000e+00
R4: 0.000000000000000e+00 0.000000000000000e+00 -1.649396382041634e-01 -1.856569161883091e-01 0.000000000000000e+00 0.000000000000000e+00
R5: 9.546326232718939e-03 4.542307047847398e-02 0.000000000000000e+00 0.000000000000000e+00 1.000000000000000e+00 8.683537994596204e-02
R6: 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 1.000000000000000e+00


Best regards,

Teresia

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

Re: Linear matrix not the same for ILmatrix and full lattice

Post by michael_borland » 10 Oct 2019, 14:34

Teresia,

The ILMATRIX matrix you show looks symplectic to me, whereas the other one doesn't. Can you post the input files so I can understand how you got this?

--Michael

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

Re: Linear matrix not the same for ILmatrix and full lattice

Post by Teresia » 11 Oct 2019, 10:49

Hi Michael,

I think it's the other way around. For a symplectic matrix I expect to have:

M16 = dx
M26 = d'x
M51 = M11*d'x - M21*dx
M52 = M12*d'x - M22*dx

This I have for the full lattice matrix, but not for the ILMatrix matrix. I'm wondering if it might have to do with that the lattice I'm using doesn't have zero twiss alpha and dispersion at the observation point? I noticed that the example file for creating the ILMatrix seems to assume zero alpha when calculating the amplitude dependent tune and path shifts. I modified that, but even manually changing the amplitude dependent path shifts in the ILMatrix doesn't seem to have any effect on the linear matrix. It seems to me like my ILMatrix is missing some part of the linear dependence on the path length on x and x' and that's why the M15 and M52 terms aren't the same as what I get for the full lattice.

I have attached my input files.

Best regards,

Teresia
Attachments
comparison-full-tracking-vs-ILMatrix.zip
(11.16 KiB) Downloaded 215 times

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

Re: Linear matrix not the same for ILmatrix and full lattice

Post by michael_borland » 11 Oct 2019, 14:21

Teresia,

You are correct: the path-length terms were derived for the case of alphax=alphay=0. I'll correct this for the next release.

Thanks for reporting the bug.

--Michael

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

Re: Linear matrix not the same for ILmatrix and full lattice

Post by Teresia » 14 Oct 2019, 05:47

Hi Michael,

Okay, good. Thank you. Then I understand where the difference comes from. For the terms including non-zero alpha I use the reference "J. Bengtsson, “A Hamiltonian Approach to Collective Phenomena”, to be. publ."

Best regards,

Teresia

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

Re: Linear matrix not the same for ILmatrix and full lattice

Post by michael_borland » 14 Oct 2019, 08:12

Teresia,

Thinking about this more, I realized that the reason I neglected those terms is that they are oscillatory and in the end I didn't think they would matter in the dynamics. However, it is better to be complete, so I added them.

They'll appear in the next release. In case you build from source code, I've posted the modified files here.

--Michael
Attachments
modifications.zip
(65.47 KiB) Downloaded 186 times

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

Re: Linear matrix not the same for ILmatrix and full lattice

Post by Teresia » 21 Oct 2019, 08:40

Thank you, Michael. I also expect that these terms can be neglected in the end. I tried to compare the map from ILMatrix to what has been implemented in mbtrack and there these terms seem to have been neglected completely. I am still working on checking so that's a valid thing to do for my lattice, but so far I expect it to be.

Anyway, in either case I think the modification is useful for being able to compare the linear matrix from ILMatrix to the one from the full lattice to check that you have constructed the ILMatrix correctly. It's confusing if not all terms agree.

Best regards,

Teresia

Post Reply