Page 1 of 1
How to add a error to bumper's waveform?
Posted: 24 Sep 2008, 20:02
by shancai
Is it possible to add a error to bumper's waveform? Thanks.
Re: How to add a error to bumper's waveform?
Posted: 25 Sep 2008, 08:20
by michael_borland
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
Re: How to add a error to bumper's waveform?
Posted: 14 Mar 2014, 04:21
by marlibgin
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
Re: How to add a error to bumper's waveform?
Posted: 21 Mar 2014, 12:21
by michael_borland
Marco,
Here's an example. It is also in the elegant examples file under PAR/ejectionOptimization.
--Michael