BPM signal simulation routines


Files

file  add_amplnoise.c
file  add_excitation.c
file  add_mode_response.c
file  bpm_simulation.h
 libbpm waveform simulation routines
file  digitise.c
file  generate_bpmsignal.c
file  generate_diode.c
file  generate_dipole.c
file  generate_monopole.c
file  get_dipole_amp.c
file  get_dipole_response.c
file  get_mode_amplitude.c
file  get_mode_response.c
file  get_monopole_amp.c

Functions

EXTERN int generate_bpmsignal (bpmconf_t *bpm, beamconf_t *beam, doublewf_t *RF)
EXTERN int add_mode_response (complexwf_t *RF, bpmconf_t *bpm, bpmmode_t *mode, beamconf_t *beam)
EXTERN complex_t get_mode_amplitude (bpmconf_t *bpm, bpmmode_t *mode, beamconf_t *beam)
EXTERN int get_dipole_amp (double bunchcharge, double bunchlength, double pos, double possens, double slope, double slopesens, double tilt, double tiltsens, complex_t *Amp)
EXTERN int get_monopole_amp (double bunchcharge, double bunchlength, double chargesens, complex_t *Amp)
EXTERN int add_excitation (double ttrig, doublewf_t *RF)
EXTERN int get_mode_response (doublewf_t *excitation, double freq, double Qvalue, complexwf_t *response)
EXTERN int add_waveforms (complexwf_t *RF, complexwf_t *TEMP, complex_t f)
EXTERN int add_amplnoise (double amplnoise, complexwf_t *IF)
EXTERN int digitise (doublewf_t *IF, int nbits, double range_min, double range_max, double clock_jitter, double digi_noise, unsigned int ipmode, intwf_t *wf)


Function Documentation

EXTERN int get_dipole_amp ( double  bunchcharge,
double  bunchlength,
double  pos,
double  possens,
double  slope,
double  slopesens,
double  tilt,
double  tiltsens,
complex_t Amp 
)

Calculate the response of a dipole signal given an incoming bunch

Parameters:
bunchcharge The charge of the bunch (in nC)
bunchlength The length of the bunch (in mm)
pos The position of the beam (in mm)
possens The position sensitivty of the BPM (in V/nC/mm)
slope The slope of the beam (in rad)
slopesens The slope sensitivity of the BPM (in V/nC/urad)
tilt The tilt of the bunch (in urad)
tiltsens The tilt sensitivty of the BPM (V/nC/urad)
Amp the complex amplitude of the waveform at the arrival time

Definition at line 23 of file get_dipole_amp.c.

References complex_t::im, and complex_t::re.

EXTERN int get_monopole_amp ( double  bunchcharge,
double  bunchlength,
double  chargesens,
complex_t Amp 
)

Calculate the response of a dipole signal given an incoming bunch

Parameters:
bunchcharge The charge of the bunch (in nC)
bunchlength The length of the bunch (in mm)
chargesens The charge sensitivty of the BPM (V/nC)
Amp the complex amplitude of the waveform at the arrival time

Definition at line 17 of file get_monopole_amp.c.

References complex_t::im, and complex_t::re.

EXTERN int add_excitation ( double  ttrig,
doublewf_t RF 
)

Generates a one sample impulse to excite the resonator

Parameters:
ttrig the trigger time
RF waveform containing the impulse
Returns:
BPM_SUCCES upon succes, BPM_FAILURE upon failure

Definition at line 18 of file add_excitation.c.

References bpm_error(), doublewf_t::fs, and doublewf_t::wf.

Referenced by add_mode_response().

EXTERN int get_mode_response ( doublewf_t excitation,
double  freq,
double  Qvalue,
complexwf_t response 
)

Calculate the normalized complex dipole response

Parameters:
excitation array containing the excitation profile
freq mode resonant frequency
Qvalue mode quality factor
response complex mode response normalised to amp(t0) = 1
Returns:
BPM_SUCCESS upon success or BPM_FAILURE upon failure

Definition at line 18 of file get_mode_response.c.

References apply_filter(), BANDPASS, bpm_error(), complexwf_setimag(), complexwf_setreal(), create_filter(), delete_filter(), doublewf_copy_new(), doublewf_delete(), doublewf_integrate(), doublewf_scale(), doublewf_t::fs, doublewf_t::ns, RESONATOR, and doublewf_t::wf.

EXTERN int add_waveforms ( complexwf_t RF,
complexwf_t TEMP,
complex_t  f 
)

Adds a template waveform to the signal with a given scale and rotation

Parameters:
RF the signal
TEMP template waveform to add
f complex number encoding the amplitude and phase
Returns:
BPM_SUCCESS upon success, BPM_ERROR upon error

Definition at line 17 of file add_waveforms.c.

References bpm_error(), complexwf_add(), complexwf_copy_new(), complexwf_delete(), and complexwf_scale().

EXTERN int add_amplnoise ( double  amplnoise,
complexwf_t IF 
)

Add the given amount of amplitude noise to a complex array

Parameters:
amplnoise The amplitude noise to add to the waveform (in Volts)
IF Complex waveform containing the signal
Returns:
BPM_SUCCESS upon succes, BPM_FAILURE upon failure

Definition at line 18 of file add_amplnoise.c.

References bpm_error(), c_sum(), complexwf(), complexwf_delete(), complexwf_t::fs, complex_t::im, nr_rangauss(), nr_ranuniform(), complexwf_t::ns, complex_t::re, and complexwf_t::wf.

EXTERN int digitise ( doublewf_t IF,
int  nbits,
double  range_min,
double  range_max,
double  clock_jitter,
double  digi_noise,
unsigned int  ipmode,
intwf_t wf 
)

Digitises the waveform using the sampling frequency and the number of samples set in the resulting waveform

Parameters:
IF input waveform to digitse
nbits bit resolution of the ADC
range_min the minimum voltage and
range_max the maximum voltage the ADC can process
clock_jitter ADC clock jitter
digi_noise rms digitiser noise in ADC channels
ipmode interpolation mode for doublewf_getvalue()
wf sampled waveform
Returns:
BPM_SUCCESS upon success, BPM_FAILURE upon failure

Definition at line 11 of file digitise.c.

References bpm_error(), doublewf_getvalue(), intwf_t::fs, doublewf_t::fs, nr_rangauss(), intwf_t::ns, doublewf_t::ns, and intwf_t::wf.


Generated on Thu Jan 10 10:18:34 2008 for libbpm by  doxygen 1.5.1