Difference between revisions of "Ambient vibration synthesizer"

From GeopsyWiki
Jump to navigation Jump to search
 
(5 intermediate revisions by the same user not shown)
Line 5: Line 5:
 
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.
 
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)
+
* 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
 
** 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)
 
*** For each of the three components (X, Y, Z)
Line 12: Line 12:
 
* For each of the three components (X, Y, Z)
 
* For each of the three components (X, Y, Z)
 
** Compute the Fourier spectrum of the global source function for the current component (FFTW)
 
** Compute the Fourier spectrum of the global source function for the current component (FFTW)
** Global source signals are saved in files SRCxxxx.sac
+
** Global source signal is saved in file SRCXXXX_C.sac
 
* For each receiver
 
* For each receiver
 
** Read the Green's function corresponding to the current pair source-receiver
 
** Read the Green's function corresponding to the current pair source-receiver
Line 23: Line 23:
 
* For each receiver
 
* For each receiver
 
** For each component
 
** 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
+
*** 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.
  
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 ==
 
== Parameters ==
  
Line 49: Line 49:
 
|File containing the source coordinates. Nothing else is read. The format is "source_name x y z" for each line.
 
|File containing the source coordinates. Nothing else is read. The format is "source_name x y z" for each line.
 
|-
 
|-
|DURATION
+
|PASSIVE_SIGNAL_DIRECTORY
|<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>
+
|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).
 
|}
 
|}
 
 
 
 
# 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
 

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)
    • 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
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).