Implementing implicit finite-difference in the time-space domain using spectral factorization and helical deconvolution |
To achieve double precision, both the spectral factorization algorithm and the helical deconvolution module had to be rewritten to include double precision variables. The wavefield itself was also composed of double precision variables. Furthermore, I used a 4th order in space, 2nd order in time approximation for this test. Figures 7(a)-7(d) show the comparison between propagation with single precision (left) and double precision (right). For the top Figures I used , and for the bottom ones . The time step was for all Figures. The results for single and double precision are identical for this time step, and from other tests with many different time step sizes I can say that the behaviour is always identical, and so is the response to varying value of . The similarity in the wavefield values extends to the statistics of the wavefields - the mean, average, RMS and min/max values are nearly identical as well. In summary - I could not find a set of parameters for which propagation with double precision variables is better (or at all different) than propagation with single precision.
The next step was to attempt to reduce the precision of the spectrally factorized coefficients one decimal point at a time, and see when propagation with a certain set of parameters is destroyed as a result of this loss of precision. This should give an indication as to how important the floating point precision actually is for stable propagation. The precision reduction was done by running the regular wilson spectral factorization subroutine, and then reducing precision by the following two lines of code:
noindent IntFilter = CutFactor * FloatFilter
FloatFilter = IntFilter / CutFactor
CutFactor is a power of 10. Multiplying by this factor and then casting to integer effectiveley removes decimal precision from the filter coefficients. Example:
10000 * 1.23456 = 12345
12345 / 10000 = 1.2345
The purpose of this test was to see how many decimal precision digits can be removed from the filter coefficients before wavefield propagation using those coefficients is altered, in comparison to propagation with standard floating point precision. Results can be seen in Figures 8(a)-8(c). On the left is the result of propagation with single precision coefficients, with parameters which have shown stability (
). The center Figure shows propagation with coefficients which have had their precision truncated to 3 decimal points only. The wavefield exhibits a phase shift in comparison to the single precision wavefield, and yet it remains stable. Only when precision is truncated to 2 decimal points (right) is propagation severely affected.
The wavefields in Figures 7(a)-7(d) and 8(a)-8(c) were generated using factorization of the finite-difference weights of the 4th spatial order approximation (A-1). The values of these weights when using the specific set of propagation parameters were:
.
Since
, the weights are identical for both dimensions. These weights are fed to the spectral factorization routine, which is supposed to produce a causal set of filter coefficients, such that their cross-correlation will reproduce the finite-difference weights (Claerbout, 1997). This suggests that one way of testing the sensitivity of propagation to the floating point precision of the filter coefficients is to correlate the filter coefficients and compare the result to the finite-difference weights.
I used 21 filter coefficients to produce Figures 8(a)-8(c). For single precision propagation, the values of the correlation of the filter coefficients were (Only the first four values of the correlation are displayed. The rest are in A-2 to A-4):
For the propagation where precision was reduced to 3 decimal points only, the correlation was:
For the propagation where precision was reduced to 2 decimal points only, the correlation was:
Note that the correlation products are arranged in order of lags, so that the first coefficient corresponds to the central finite-difference weight , the second to , and the third to . Note also that only after reducing precision to the 2nd decimal point, the weight is effectively erased, and the weight is considerably altered.
This comparison proves that the wavefield divergence shown in the previous sections is not the result of inadequate representation of the filter coefficient's floating point values when using single precision. If it were, then propagation with reduced precision would not have been possible. However, this result raises another question: If propagation is stable with so little precision, how come a small value of added to the central finite-difference weight (and by that also to the zero-lag filter coefficient) causes the wavefield to stabilize, when the effect that this slight addition has on the filter's correlation is so much less pronounced than the precision reduction?
double-vs-single1-a,double-vs-single1-b,double-vs-single1-c,double-vs-single1-d
Figure 7. 2D helical implicit finite-difference using single (left) and double (right) precision. Velocity = . Wavefields are after 2 seconds of propagation. Source is a Ricker wavelet with central frequency = . The time step size is . for the top Figures, and for the bottom Figures. .[ER] |
---|
single-vs-half-a,single-vs-half-b,single-vs-half-c
Figure 8. 2D helical implicit finite-difference using single precision (left), precision reduced to 3 decimal points (center), and precision reduced to 2 decimal points (right). Velocity = , , , .[ER] |
---|
Implementing implicit finite-difference in the time-space domain using spectral factorization and helical deconvolution |