set_sync_phase  [SOLVED]

https://www.dacm-logiciels.fr/tracewin
Post Reply
United States of Americawtam
Skilled
Skilled
Posts: 104
Joined: Mon 7 Dec 2020 06:17
Location: Boston
Country:
United States of America (us)
United States of America

set_sync_phase

Post by United States of Americawtam »

Dear Didier,

When using SET_SYNC_PHASE for a field map, I often run into an error:
SET_SYNC_PHASE command failed
Synchronous phase out of reach
Cavity field probably too high

Sometimes I can avoid the error by changing the sync phase by 1 or 2 degrees. The field map is designed for drift tube length for the correct ion energy. Do you have any idea why the error and how to avoid it?

Best regards,
Wai-Ming
User avatar
FranceDidier
Administrator
Administrator
Posts: 858
Joined: Wed 26 Aug 2020 14:40
Country:
France (fr)
France

Re: set_sync_phase

Post by FranceDidier »

Dear Wai-Ming,

I know that this error can happen sometimes. If you could send me a very simplified example generating this error, I could look more specifically at why your case is problematic and how to fix it.

Regards,

Didier
United States of Americawtam
Skilled
Skilled
Posts: 104
Joined: Mon 7 Dec 2020 06:17
Location: Boston
Country:
United States of America (us)
United States of America

Re: set_sync_phase

Post by United States of Americawtam »

Dear Didier,

Please see attachment. The attached project demonstrated the problem. This project is almost identical to the example project that I used for another post (Phase Offset). The only difference is that the strength of the field map is 10x stronger here. My experience is that the problem occurs more often when the accelerating voltage is high relative to the beam voltage.

Best regards,
Wai-Ming
Attachments
phase_offset.ini
(43.77 KiB) Downloaded 568 times
phase_offset.dat
(279 Bytes) Downloaded 577 times
A2_131_187.edz
(2.92 KiB) Downloaded 570 times
A1_94_150.edz
(2.77 KiB) Downloaded 554 times
User avatar
FranceDidier
Administrator
Administrator
Posts: 858
Joined: Wed 26 Aug 2020 14:40
Country:
France (fr)
France

Re: set_sync_phase

Post by FranceDidier »

Dear Wai-Ming,

When the fields are very strong, the synchronous phase can quickly become complicated to calculate. It should be kept in mind that the synchronous phase is not a physical quantity but a value derived from a definition (see the manual chapter on this definition). This also means that not all synchronous phases are necessarily attainable.
You are typically in these somewhat complex cases. You have two solutions, either increase the calculation step, which solves the problem in your case, or change the definition, which I suggest considering your Example (Page "Main" -> button: "Simulation options" -> Option:" Use new synchonous phase definition"), which also solves your case. Or do both.

Regards,

Didier
United States of Americawtam
Skilled
Skilled
Posts: 104
Joined: Mon 7 Dec 2020 06:17
Location: Boston
Country:
United States of America (us)
United States of America

Re: set_sync_phase

Post by United States of Americawtam »

Dear Didier,

Thank you.
"Use new synchronous phase definition" works. How do I change the calculation step?

It triggers another question: how can I control the "lattice" command, such as calculation step?
To my understanding, both "set_sync_phase" and "lattice" are optimization. However, unlike "match_fem_xxx" and "adjust", I do not have to check any boxes on the Matching tab for them to run.

Best regards,
Wai-Ming
User avatar
FranceDidier
Administrator
Administrator
Posts: 858
Joined: Wed 26 Aug 2020 14:40
Country:
France (fr)
France

Re: set_sync_phase

Post by FranceDidier »

Dear Wai-Ming,

Calculation step -> Page "Main" -> Entry "No. of calculation steps per".
You have a similar step to set in the multi-particle page for the traking mode.
Yes, lattice and set_sync_phase are based on a specific optimisation algorithm, but the user does not need to activate or set parameters for these commands.

Regards,

Didier
United States of Americawtam
Skilled
Skilled
Posts: 104
Joined: Mon 7 Dec 2020 06:17
Location: Boston
Country:
United States of America (us)
United States of America

Re: set_sync_phase

Post by United States of Americawtam »

Dear Didier,

Thank you.
I would like to make a request to make SET_SYNC_PHASE and ADJUST work together. In my application, I want to optimize the phase for other beam optics. But the initial phase value that makes physics sense to me is the synchronous phase. If I start with an arbitrary absolute phase, the optimization usually cannot find the desired solution because the initial value is too far. Or other work around?

Best regards,
Wai-Ming
User avatar
FranceDidier
Administrator
Administrator
Posts: 858
Joined: Wed 26 Aug 2020 14:40
Country:
France (fr)
France

Re: set_sync_phase  [SOLVED]

Post by FranceDidier »

Dear Wai-Ming,

I don't quite agree with this approach, for me the only relevant and physical value is the RF phase, so the input phase (TraceWin). This is the only value that is controllable via command-control. The synchronous phase is obviously relevant for machine physicists but it depends on its definition and can vary from one code to another.
It is extremely complex to make SET_SYNC_PHASE and ADJUST work together because SET_SYNC_PHASE is really a patch. For this reason I took a more machine-realistic approach by developing the TUNE_CAVITY command which allows you to set a cavity as it would be done in the control application.

Regards,

Didier
United States of Americawtam
Skilled
Skilled
Posts: 104
Joined: Mon 7 Dec 2020 06:17
Location: Boston
Country:
United States of America (us)
United States of America

Re: set_sync_phase

Post by United States of Americawtam »

Dear Didier, and other colleagues,

Can you command on the difficulty with set_sync_phase when the voltage is too high relative to the input beam energy? Is it a pure mathematical and optimization difficulty? Or is it physical so that one should avoid when it happens in the model?

Best regards,
Wai-Ming
User avatar
FranceDidier
Administrator
Administrator
Posts: 858
Joined: Wed 26 Aug 2020 14:40
Country:
France (fr)
France

Re: set_sync_phase

Post by FranceDidier »

Dear Wai-Ming,

With the usual definition, it is a mathematical problem preventing to reach some synchronous phase values which are just impossible to obtain with this synchonous phase model. With the new definition it's more of an optimization algorithm problem. That said, if the field is really to exesive, it just becomes physically impossible whatever the definition.

Regards,

Didier
Post Reply