Difference between revisions of "Ambient vibration synthesizer"
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), implemented in ''gpconvolution''. | 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 output 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 signals are saved in files SRCxxxx.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 (to all tasks) receiver signals | ||
+ | |||
+ | At the end of all tasks, the receiver signals are saved as HISxxxx.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. | ||
+ | |- | ||
+ | |DURATION | ||
+ | |<span id="Field:AmplitudeUnit">The type of unit to display amplitudes (linked to the type of sensor: accelerometer, velocimeter,...). The physical unit display is active only for signal with a [[#Field:CountPerUnit|CountPerUnit]] different from 1.0. See also [[#Field:VoltPerUnit|VoltPerUnit]], [[#Field:CountPerUnit|CountPerUnit]]</span> | ||
+ | |} | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | # Only source coordinates are used, not amplitudes | ||
+ | PASSIVE_SOURCE_FILE= | ||
+ | # If specified, the passive signals are loaded from the files 'HISXXXX_C.sac' in the given directory, passive convolution is skipped. | ||
+ | PASSIVE_SIGNAL_DIRECTORY= | ||
+ | # If PASSIVE_ONLY is set to 'y', active sources are ignored. | ||
+ | PASSIVE_ONLY(y/n)=n | ||
+ | # 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 | ||
+ | ACTIVE_SOURCE_FILE= | ||
+ | RECEIVER_FILE=receiv.pos | ||
+ | SOURCE_FUNCTION_FILE=SRADELI.DAT | ||
+ | GREEN_FUNCTION_FILE_100=grpoint.dxyz.100.0.5000000 | ||
+ | GREEN_FUNCTION_FILE_010=grpoint.dxyz.010.0.5000000 | ||
+ | GREEN_FUNCTION_FILE_001=grpoint.dxyz.001.0.5000000 | ||
+ | OUTPUT_BASE_NAME= | ||
+ | # 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 | ||
+ | DIST_IND_FILE= | ||
+ | # Process only a restricted number of sources, list separated by space. | ||
+ | # Passive source are indexed first, then active sources. | ||
+ | PROCESS_SOURCE_INDEXES= | ||
+ | # First receiver index can be usefull to combine several runs with various subset of receivers | ||
+ | FIRST_RECEIVER_INDEX=0 | ||
+ | # Effective duration of source function (controls Green function taper length) | ||
+ | EFFECTIVE_SOURCE_DURATION=10.000000s |
Revision as of 17:31, 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 output 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 signals are saved in files SRCxxxx.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 (to all tasks) receiver signals
- For each component
At the end of all tasks, the receiver signals are saved as HISxxxx.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. |
DURATION | The type of unit to display amplitudes (linked to the type of sensor: accelerometer, velocimeter,...). The physical unit display is active only for signal with a CountPerUnit different from 1.0. See also VoltPerUnit, CountPerUnit |
- Only source coordinates are used, not amplitudes
PASSIVE_SOURCE_FILE=
- If specified, the passive signals are loaded from the files 'HISXXXX_C.sac' in the given directory, passive convolution is skipped.
PASSIVE_SIGNAL_DIRECTORY=
- If PASSIVE_ONLY is set to 'y', active sources are ignored.
PASSIVE_ONLY(y/n)=n
- 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
ACTIVE_SOURCE_FILE= RECEIVER_FILE=receiv.pos SOURCE_FUNCTION_FILE=SRADELI.DAT GREEN_FUNCTION_FILE_100=grpoint.dxyz.100.0.5000000 GREEN_FUNCTION_FILE_010=grpoint.dxyz.010.0.5000000 GREEN_FUNCTION_FILE_001=grpoint.dxyz.001.0.5000000 OUTPUT_BASE_NAME=
- 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
DIST_IND_FILE=
- Process only a restricted number of sources, list separated by space.
- Passive source are indexed first, then active sources.
PROCESS_SOURCE_INDEXES=
- First receiver index can be usefull to combine several runs with various subset of receivers
FIRST_RECEIVER_INDEX=0
- Effective duration of source function (controls Green function taper length)
EFFECTIVE_SOURCE_DURATION=10.000000s