How to add a error to bumper's waveform?

Moderators: cyao, michael_borland

Post Reply
shancai
Posts: 25
Joined: 07 Jul 2008, 20:12

How to add a error to bumper's waveform?

Post by shancai » 24 Sep 2008, 20:02

Is it possible to add a error to bumper's waveform? Thanks.

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

Re: How to add a error to bumper's waveform?

Post by michael_borland » 25 Sep 2008, 08:20

You can try various things depending on just what kind of error you want to include. If you want simple timing and amplitude errors, use the "error_control" and "error_element" commands. E.g.,

&run_control
...
&end

! Tell elegant that we'll be adding random errors and define log file for error values
&error_control error_log="%s.erl" &end
! Set 0.1% rms errors for the K1 angle
&error_element name=K1, item=ANGLE, amplitude=0.001, fractional=1 &end
! Set 10 ns rms errors for the K1 timing
&error_element name=K1, item=TIME_OFFSET, amplitude=10e-9 &end

! Do 10 random error ensembles
&run_setup n_steps=10 &end
...

If you want to literally modify the waveform, you need to be more sophisticated. Suppose that your ideal waveform is idealWf.sdds, with columns t and A for the time and amplitude. Suppose further that you want to add a sinusoidal modulation to the waveform with period 100 ns and 10% amplitude.

In your lattice file, define the bumper as
K1: BUMPER,WAVEFORM="nonIdealWf.sdds=t+AMod",...

Then, at the top of the command file do this
&subprocess command = "
sddsprocess idealWf.sdds nonIdealWf.sdds \"-define=column,AMod,t 100e-9 / 2 * pi * sin 0.1 * 1 + A *\"
" &end

Now, when you run the command file, it will generate a new nonIdealWf.sdds file that will then be loaded by elegant for that run. With a little more work, you can add random errors or make other variations. The -macro commandline argument can be helpful here, as can some shell scripting.

Hope this answers your question.

--Michael

marlibgin
Posts: 54
Joined: 15 Mar 2011, 12:43

Re: How to add a error to bumper's waveform?

Post by marlibgin » 14 Mar 2014, 04:21

Dear all
I step in this conversation with a request, rather than an answer.
Would it be possible to have a working example of a bumper inserted in a ring with its waveform file?
I am trying to reproduce the effect of 4 kickers at injection and I am not sure how to do it.

Thanks for any help
Marco

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

Re: How to add a error to bumper's waveform?

Post by michael_borland » 21 Mar 2014, 12:21

Marco,

Here's an example. It is also in the elegant examples file under PAR/ejectionOptimization.

--Michael
Attachments
ejectionOptimization.tar
(20 KiB) Downloaded 157 times

Post Reply