Compensation failures proceed

https://www.dacm-logiciels.fr/tracewin
JapanBruce Yee
Competent
Competent
Posts: 83
Joined: Tue 22 Dec 2020 03:47
Country:
Japan (jp)
Japan

Re: Compensation failures proceed

Post by JapanBruce Yee »

Dear Didier,

Thank you very much for your advice. I made the setup that you suggested (See the next fig
Fig1.png
Fig1.png (232.28 KiB) Viewed 2773 times
)

Those set up (# of interactions) depends on the length of the linac and the numbers of particles. I mean, if the length increased 10 times more, we can use the same number of interactions?. or About the numbers of particles?

Then, I reproduced your results (See the
Fig2.png
Fig2.png (294.75 KiB) Viewed 2773 times
Fig3.png
Fig3.png (531.4 KiB) Viewed 2773 times
).

About the reproducibility between the so-called Steady-state and transient-state, I would like to discuss more. I will continue working and I will bother you a little more about it.

Thanks again for your time and help,

Bruce
User avatar
FranceDidier
Administrator
Administrator
Posts: 852
Joined: Wed 26 Aug 2020 14:40
Country:
France (fr)
France

Re: Compensation failures proceed

Post by FranceDidier »

Dear Bruce,

No, the number of iteration mandatory depends of the alogrithm convergence. In this case, you can see in the following figure that for exemple at step=110, penalies function is not good (delta phase and energy not close to 0), so, some more iterations are needed.
convergence..png
convergence..png (22.02 KiB) Viewed 2773 times
When these optimisations are made during the transient calculations, it is probably not necessary to reach the required setpoints, but just to give the right directions to the field and phase, because anyway the cavities cannot change abruptly because of the filling time. However, I don't understand why it's a problem to have a number of step too big, normally it's just more accurate.

Regards,

Didier
JapanBruce Yee
Competent
Competent
Posts: 83
Joined: Tue 22 Dec 2020 03:47
Country:
Japan (jp)
Japan

Re: Compensation failures proceed

Post by JapanBruce Yee »

Dear Didier,

Thanks again for the help and support. Does TraceWin, save the values of the optimization as shown in the figure. I see when the program is running. However, after it finished t. I can not see where I can check.

Best regards,

Bruce
User avatar
FranceDidier
Administrator
Administrator
Posts: 852
Joined: Wed 26 Aug 2020 14:40
Country:
France (fr)
France

Re: Compensation failures proceed

Post by FranceDidier »

Dear Bruce,

Matching results with errors are not saved in the usual "*.cal" file. Simply because each run could provide different results according to random errors. yes, it's not your case becasue ypur phase error is constant. Anyway, you can always find your final tuning in the file "Adjusted_Values.txt"

Regards,

Didier
JapanBruce Yee
Competent
Competent
Posts: 83
Joined: Tue 22 Dec 2020 03:47
Country:
Japan (jp)
Japan

Re: Compensation failures proceed

Post by JapanBruce Yee »

Dear Didier,

Thanks for the help.

Bruce
JapanBruce Yee
Competent
Competent
Posts: 83
Joined: Tue 22 Dec 2020 03:47
Country:
Japan (jp)
Japan

Re: Compensation failures proceed

Post by JapanBruce Yee »

Dear Didier,

Good morning,
I have some questions, about the diagnostic element adjustments.
For the steady-state case

For the field factor for a CAV
ADJUST N v n min max first_step
ADJUST 20 -6 0 0 3.5 0.1


For this example, ke is adjusted by multiplying it, by the factor. I mean, for this example the ke is multiplied by 0 (min) to 3.5 (max) in steps
of 0.1.

For the phase adjustment
ADJUST 20 -3 0 -10 10 1

Is the phase adjusted by adding the phase from -10 to 10 in steps of 1?

It same is that the case for the Steady-State.

For the Transient time, How did you adjust the synchronous phase?

Thanks for your time.

Bruce
User avatar
FranceDidier
Administrator
Administrator
Posts: 852
Joined: Wed 26 Aug 2020 14:40
Country:
France (fr)
France

Re: Compensation failures proceed

Post by FranceDidier »

Dear Bruce,

Yes, your understanding of the ADJUST command applied to the field and phase is good.
This behavior is normally the same transient mode or no.
And for in both case, the synchronous phase is never adjsuted only the input phase. That means that SET_SYNCH_PHASE command is not compatible with ADJSUT command.

Regards,

Didier
JapanBruce Yee
Competent
Competent
Posts: 83
Joined: Tue 22 Dec 2020 03:47
Country:
Japan (jp)
Japan

Re: Compensation failures proceed

Post by JapanBruce Yee »

Dear Didier,

Thank you for the answer.

For the transient case,

The "ADJUST" commands are required to implement the corrections. However, the adjusted does not follow the parameter's command (I mean the step and the maximum and minimum of change).
The field factor is in some way control by the "Marge_field" in the cavity parameter's file. However, I don't understand if the value is scanned from 1 to the Marge_field value or is just used that value without scanning. Can you comment about it?

Nevertheless, my main question is how the phase is adjusted?
Is there any parameter such as "Marge_field" for the phase?
How can impose some restriction on it?

Thanks so much for your time and help,

Bruce
User avatar
FranceDidier
Administrator
Administrator
Posts: 852
Joined: Wed 26 Aug 2020 14:40
Country:
France (fr)
France

Re: Compensation failures proceed

Post by FranceDidier »

Dear Bruce,

I spent quite a bit of time trying to understand what was happening with the phase and my conclusion is that clearly it is its adjustment that can quickly make the system a bit chaotic. So yes, you're right, a limit on the phase is missing.
So I added in the *.cav file a variable "phase margin" (see manual in the updated version) which allows to control the maximum allowed RF shift.

As far as the field is concerned, the maximum variation allowed is E = Eo (1 + marginField).

Regards,

Didier
JapanBruce Yee
Competent
Competent
Posts: 83
Joined: Tue 22 Dec 2020 03:47
Country:
Japan (jp)
Japan

Re: Compensation failures proceed

Post by JapanBruce Yee »

Dear Didier,

Thank you very much for your help and support. Sorry for abusing your kindness. Unfortunately, I still have some doubts about how the compensation is done in the transient-state.

I testing the update code by using the following procedure.

1) I verify if the correction scheme works in the steady-state. For this, I simulate the worst-case scenario based on the
transient behavior of the faulty-cavity (phi change to -140 deg and accelerating gradient the same as nominal). The input files that I used are in this folder(
TEST000_Steady-State.zip
(6.08 KiB) Downloaded 99 times
).
Good compensation is achieved by using 500 interactions.

2) Based on the Steady-state folder, I simulated the transient-state using the attached example.
TEST000_Transient-State.zip
(6.13 KiB) Downloaded 91 times
. The limit values for the adjustment (MargeField and MargePhase) are consistent with the Steady-state case.
In the attached folder, the phase and field are under the limits; however, the change in phase for the rest of the compensate cavities is beyond that limit.

I could not achieve a good compensation in terms of energy. As you suggested in the previous ones, I changed the numbers of interactions (I made a scan from 5 to 100, then, I tested 200, 500 and 1000).

My understanding is that the steady-state could be considered the same as the transient-time for a specific time. For example, if the transient time simulation takes 10 ms and the beam dynamics steps are 1 ms. This is equivalent to make 10 simulations in the steady-state, in which we should provide the value of the phase and accelerating field of the faulty cavity at each step time, right?

My doubts are:
1) How the correction is done in transient-time? Is it the same as the steady-state?
2) For the steady-state, there is a convergency as a function of the number of interactions. However, the transient time showed that the value of 6 interactions provides better results than 50, 100, 200, etc. but 5 interactions provide similar values than 50, 100, 200, etc. Why?
3) Can we compare the steady-state and the transient?

Apologies for the long email, thanks again for the help and support.

Bruce
Post Reply