Difference between revisions of "Ambient vibration synthesizer"
(7 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | Synthetic ambient vibrations can be generated by summing the contribution of random sources. From a collection of Green's functions between sources and receivers, signals of unlimited lengths can be obtained at the receivers by any kind of stochastic distribution of sources in space and time. The tutorial presents a solution developed for Green's function calculated with Hisada code (refs to be added). | + | Synthetic ambient vibrations can be generated by summing the contribution of random sources. From a collection of Green's functions between sources and receivers, signals of unlimited lengths can be obtained at the receivers by any kind of stochastic distribution of sources in space and time. The tutorial presents a solution developed for Green's function calculated with Hisada code (refs to be added), implemented in ''gpconvolution''. |
+ | |||
+ | == Algorithm == | ||
+ | |||
+ | The global process is divided in parallel tasks. Each task calculates the convolution of one source position. Before starting the convolution itself, a three-component global source signal of length DURATION seconds is calculated with the steps detailed hereinafter. | ||
+ | |||
+ | * For each time sample of the global source signal (length=DURATION) | ||
+ | ** A uniform random value between 0 and 1 is calculated, if it is greater than 1-PASSIVE_FIRE_PROBABILITY then | ||
+ | *** For each of the three components (X, Y, Z) | ||
+ | **** The source function (length of few seconds) is multiplied by a uniform random number between 0 and 1 (random force orientation) | ||
+ | **** The multiplied source function is added to the global source function for the current component (length=DURATION), starting at the current sample. | ||
+ | * For each of the three components (X, Y, Z) | ||
+ | ** Compute the Fourier spectrum of the global source function for the current component (FFTW) | ||
+ | ** Global source signal is saved in file SRCXXXX_C.sac | ||
+ | * For each receiver | ||
+ | ** Read the Green's function corresponding to the current pair source-receiver | ||
+ | ** Multiply Green's function by a taper (heuristics from source-receiver distance and minimum and maximum velocities) | ||
+ | ** Resample Green's function to fit the output signal length and sampling | ||
+ | ** Multiply again by the same taper to mute artifacts generated by resampling | ||
+ | ** For each of the three components (X, Y, Z) | ||
+ | *** Calculate the convolution between the global signal of the current source and the Green's function, for the current component | ||
+ | *** Add the resulting signal to the global signal of the current receiver for the current component | ||
+ | * For each receiver | ||
+ | ** For each component | ||
+ | *** Thread safely add the global signal of the current receiver and the current component to the common (shared with other tasks) receiver signals | ||
+ | |||
+ | At the end of all tasks, the receiver signals are saved as HISXXXX_C.sac files. The first receiver loop is run independently of the other tasks without any locked resource. The second one required interactions between parallel tasks. | ||
+ | |||
+ | == Parameters == | ||
+ | |||
+ | Default parameter values can generated with | ||
+ | gpconvolution -param-example | ||
+ | |||
+ | {| border="1" cellpadding="5" cellspacing="0" | ||
+ | |+ align="bottom" style="color:#e76700;" |''Information fields of a signal'' | ||
+ | ! Parameter name | ||
+ | ! Description | ||
+ | |- | ||
+ | |DURATION | ||
+ | |Number of seconds of the generated signals | ||
+ | |- | ||
+ | |RANDOM_SEED | ||
+ | |Integer seed to initialize the random number generation (default=0: use current time) | ||
+ | |- | ||
+ | |PASSIVE_FIRE_PROBABILITY | ||
+ | |Probability of firing a passive source (default=0.001) | ||
+ | |- | ||
+ | |PASSIVE_SOURCE_FILE | ||
+ | |File containing the source coordinates. Nothing else is read. The format is "source_name x y z" for each line. | ||
+ | |- | ||
+ | |PASSIVE_SIGNAL_DIRECTORY | ||
+ | |If specified, the passive signals are loaded from the files 'HISXXXX_C.sac' in the given directory, passive convolution is skipped. | ||
+ | |- | ||
+ | |PASSIVE_ONLY | ||
+ | |If PASSIVE_ONLY is set to 'y', active sources are ignored. | ||
+ | |- | ||
+ | |ACTIVE_SOURCE_FILE | ||
+ | |Amplitudes and schedule are defined with source coordinates, for each source: | ||
+ | Line 1: Xpos Ypos Z pos | ||
+ | Line 2: Xamp Yamp Zamp | ||
+ | Line 3: Start_time Repeat_count Delay | ||
+ | |- | ||
+ | |RECEIVER_FILE | ||
+ | |Positions of receivers. | ||
+ | |- | ||
+ | |SOURCE_FUNCTION_FILE | ||
+ | |Format to be described | ||
+ | |- | ||
+ | |GREEN_FUNCTION_FILE_100 | ||
+ | |grpoint.dxyz.100.0.5000000, Hisada file (to expand) | ||
+ | |- | ||
+ | |GREEN_FUNCTION_FILE_010 | ||
+ | |grpoint.dxyz.010.0.5000000, Hisada file (to expand) | ||
+ | |- | ||
+ | |GREEN_FUNCTION_FILE_001 | ||
+ | |grpoint.dxyz.001.0.5000000, Hisada file (to expand) | ||
+ | |- | ||
+ | |OUTPUT_BASE_NAME | ||
+ | |Directory or the output files. | ||
+ | |- | ||
+ | |DIST_IND_FILE | ||
+ | |Not mandatory, it allows checking that the src and rec in Green functions are properly ordered. The output file must match exactly the 'dist.ind.DEPTH' file provided as input to Hisada code. | ||
+ | |- | ||
+ | |PROCESS_SOURCE_INDEXES | ||
+ | |Process only a restricted number of sources, list separated by space. Passive source are indexed first, then active sources. | ||
+ | |- | ||
+ | |FIRST_RECEIVER_INDEX | ||
+ | |First receiver index can be useful to combine several runs with various subset of receivers. | ||
+ | |- | ||
+ | |EFFECTIVE_SOURCE_DURATION | ||
+ | |Effective duration of source function which controls Green function taper length (default=10 s). | ||
+ | |} |
Latest revision as of 19:38, 2 May 2023
Synthetic ambient vibrations can be generated by summing the contribution of random sources. From a collection of Green's functions between sources and receivers, signals of unlimited lengths can be obtained at the receivers by any kind of stochastic distribution of sources in space and time. The tutorial presents a solution developed for Green's function calculated with Hisada code (refs to be added), implemented in gpconvolution.
Algorithm
The global process is divided in parallel tasks. Each task calculates the convolution of one source position. Before starting the convolution itself, a three-component global source signal of length DURATION seconds is calculated with the steps detailed hereinafter.
- For each time sample of the global source signal (length=DURATION)
- A uniform random value between 0 and 1 is calculated, if it is greater than 1-PASSIVE_FIRE_PROBABILITY then
- For each of the three components (X, Y, Z)
- The source function (length of few seconds) is multiplied by a uniform random number between 0 and 1 (random force orientation)
- The multiplied source function is added to the global source function for the current component (length=DURATION), starting at the current sample.
- For each of the three components (X, Y, Z)
- A uniform random value between 0 and 1 is calculated, if it is greater than 1-PASSIVE_FIRE_PROBABILITY then
- For each of the three components (X, Y, Z)
- Compute the Fourier spectrum of the global source function for the current component (FFTW)
- Global source signal is saved in file SRCXXXX_C.sac
- For each receiver
- Read the Green's function corresponding to the current pair source-receiver
- Multiply Green's function by a taper (heuristics from source-receiver distance and minimum and maximum velocities)
- Resample Green's function to fit the output signal length and sampling
- Multiply again by the same taper to mute artifacts generated by resampling
- For each of the three components (X, Y, Z)
- Calculate the convolution between the global signal of the current source and the Green's function, for the current component
- Add the resulting signal to the global signal of the current receiver for the current component
- For each receiver
- For each component
- Thread safely add the global signal of the current receiver and the current component to the common (shared with other tasks) receiver signals
- For each component
At the end of all tasks, the receiver signals are saved as HISXXXX_C.sac files. The first receiver loop is run independently of the other tasks without any locked resource. The second one required interactions between parallel tasks.
Parameters
Default parameter values can generated with
gpconvolution -param-example
Parameter name | Description |
---|---|
DURATION | Number of seconds of the generated signals |
RANDOM_SEED | Integer seed to initialize the random number generation (default=0: use current time) |
PASSIVE_FIRE_PROBABILITY | Probability of firing a passive source (default=0.001) |
PASSIVE_SOURCE_FILE | File containing the source coordinates. Nothing else is read. The format is "source_name x y z" for each line. |
PASSIVE_SIGNAL_DIRECTORY | If specified, the passive signals are loaded from the files 'HISXXXX_C.sac' in the given directory, passive convolution is skipped. |
PASSIVE_ONLY | If PASSIVE_ONLY is set to 'y', active sources are ignored. |
ACTIVE_SOURCE_FILE | Amplitudes and schedule are defined with source coordinates, for each source:
Line 1: Xpos Ypos Z pos Line 2: Xamp Yamp Zamp Line 3: Start_time Repeat_count Delay |
RECEIVER_FILE | Positions of receivers. |
SOURCE_FUNCTION_FILE | Format to be described |
GREEN_FUNCTION_FILE_100 | grpoint.dxyz.100.0.5000000, Hisada file (to expand) |
GREEN_FUNCTION_FILE_010 | grpoint.dxyz.010.0.5000000, Hisada file (to expand) |
GREEN_FUNCTION_FILE_001 | grpoint.dxyz.001.0.5000000, Hisada file (to expand) |
OUTPUT_BASE_NAME | Directory or the output files. |
DIST_IND_FILE | Not mandatory, it allows checking that the src and rec in Green functions are properly ordered. The output file must match exactly the 'dist.ind.DEPTH' file provided as input to Hisada code. |
PROCESS_SOURCE_INDEXES | Process only a restricted number of sources, list separated by space. Passive source are indexed first, then active sources. |
FIRST_RECEIVER_INDEX | First receiver index can be useful to combine several runs with various subset of receivers. |
EFFECTIVE_SOURCE_DURATION | Effective duration of source function which controls Green function taper length (default=10 s). |