Matlab software for the analysis of seismic waves recorded by threeelement arrays* A. Pignatelli¹, A. Giuntini2 and R.Console3 1 Istituto Nazionale di Geofisica e Vulcanologia, via di Vigna Murata 605, 00143 Roma, Italy (email: pignatelli@ingv.it, tel: +39 06 36915605, fax: +39 06 36915617). 2 Istituto Nazionale di Geofisica e Vulcanologia, via di Vigna Murata 605, 00143 Roma, Italy (email: giuntini@ingv.it, tel: +39 06 36915628, fax: +39 06 36915617). 3 Italian National Data Center viale Pinturicchio 23/E 00196 Roma, Italy.(e- mail: console@ingv.it, tel: +39 06 36915657, fax: +39 06 36915617). * Code available from server at http://www.iamg.org/CGEditor/index.htm Abstract We develop and implement an algorithm for inverting three-element array data on a Matlab platform. The algorithm allows reliable estimation of back-azimuth and apparent velocity from seismic records under low signal-to-noise conditions. We start with a cubic-spline interpolation of the waveforms and determine the differences between arrival times at pairs of array elements. The time differences are directly computed from cross-correlation functions. The advantages of this technique are: (a) manual picking of the onset of each arrival is not necessary at each array element; (b) interpolation makes it possible to estimate time differences at a higher resolution than the sampling rate of the digital waveforms; (c) consistency among three independent determinations provides a reliability check; and (d) the value of apparent velocity indicates the nature of the recorded wavelet and physically checks the results. The algorithm was tested on data collected by a tri-partite array (with an aperture of ~250 m) deployed in 1998 by the National Data Center of Israel, during a field experiment in southern Israel, 20 km southwest of the Dead Sea. The data include shallow explosions and natural earthquakes under both high and low signal-to-noise conditions. The procedure developed in this study is considered suitable for searching of small aftershocks subsequent to an underground explosion, in the context of On-Site Inspections according to the Comprehensive Nuclear-Test-Ban Treaty (CTBT). 1 Keywords: cross-correlation, location, automation, array processing, CTBT 1. Introduction Seismic event location is crucial for studying seismogenic processes, but it is also very useful for verifying a nuclear test ban treaty. The CTBT, opened for signature in 1996, contains provisions for the use of passive seismic techniques in carrying out On-Site Inspections in areas of suspected clandestine underground nuclear tests. Seismological surveys are thought to be capable of detecting and locating very weak aftershocks triggered by nuclear explosions (Richards and Ekstrom, 1995; Adushkin and Spivak, 1995). Small aperture tri-partite arrays are proposed as flexible and convenient tools for this purpose. The goal of this work is to develop and test an algorithm to obtain reliable back azimuth and apparent velocity estimates from the seismic waveforms of very low magnitude events recorded by a tri-partite array. The algorithm is entirely original computer code on a Matlab platform, and has a very simple Graphical User Interface (GUI) intended to facilitate analysis. The interactive Matlab GUI allows results to be rapidly processed and immediately visualized. In order to run the program, a version of Matlab 6.5 or higher with the mapping toolbox is required. So far the program is designed only for Windows, but because it is written in an interpreter (Matlab) rather than a compiler, it is portable to other platforms. 2. Methodology The algorithm has three basic tools: a) Waveform interpolation Seismic data collected from the field is typically digitized at discrete intervals. The user may wish to interpolate the seismograms to form a function that fits the raw data with shorter sampling intervals than the original. This improves the precision of the time intervals, assuming that the dominant frequency of signal is significantly lower than the sampling frequency. Many interpolation algorithms can be applied (e.g.: power, rational, Gaussian, Weibull, Fourier, and so on; see Matlab user manual); this work uses a cubic spline interpolation that fits the discrete points 2 with a 3rd degree polynomial. The user can choose a different method by changing just two lines of code, but other interpolation techniques do not change the results significantly. The algorithm also allows the choice of the outcome sampling rate. b) Time difference estimation As stated earlier, location accuracy can be improved by estimating the difference between arrival times at two array elements more precisely. In order to accomplish this, we use crosscorrelation. Cross-correlation relies on the similarity of seismograms at spatially close sensors for a given event; in fact, we expect waveforms to be similar because the source-receiver paths cross the same heterogeneities. This assumption is valid up to some frequency threshold. The time difference between the two arrivals is taken to be the time shift of one record with respect to the other that yields the maximum of the correlation function in the time domain. Correlation between two digital waveform segments ({ X 1 , X 2 ,...., X N },{ Y1 , Y2 ,...., YN }) is defined as (Taylor, 1982): N R N N i 1 i 1 N X iYi X i Yi i 1 2 N 2 N N 2 N N X i X i * N Yi Yi i 1 i 1 i 1 i 1 (1) 2 Where N is the number of samples of the correlation window. When the two seismograms are identical, R assumes the maximum value of 1 at zero time shift, while two different waveforms yield low cross-correlation values. The correlation function is obtained by shifting one segment with respect to the other by different delays. c) Azimuth and apparent velocity If analyzed events are local we can neglect the curvature of the Earth. Furthermore, if the elements of a tri-partite array are very close to each other with respect to the distance from the events, we can consider the wave fronts to be planar. Under this hypothesis, consider an event E recorded by three different sensors S1 , S 2 and S 3 of the tri-partite array (Fig. 1). 3 Consider, for the moment, the case where sensor S1 is the reference sensor of the tri-partite array, so there are two possible pairs: ( S1 , S 2 ) and ( S1 , S 3 ). The same reasoning applies to any other reference sensor. The time difference between the arrival times of the pair of sensors yields two equations with two unknowns: azimuth and apparent velocity. Assuming an homogeneous elastic medium, the wave front takes the same time to cover the distance between S1 and S 2 as between the projection of the two sensors on the ray: S 1' and S 2' . So the time difference time between the arrivals can be calculated by: T12 T2 T1 S1' S2' va , (2) where va is the apparent velocity of the wave front. By simple plane geometry, equation (2) can be written as a function of the sensor coordinates and the event’s azimuth: ( y 2 y1 ) cos ( x2 x1 ) sin va T12 (3) T13 can be expressed in the same way. T12 and T13 are observed quantities, so the ratio between the two equations defines the azimuth of the event: tan T12 ( y 3 y1 ) T13 ( y 2 y1 ) T12 ( x3 x1 ) T13 ( x2 x1 ) (4) Once the azimuth has been calculated, it is possible to define the apparent velocity of the wave through equation(3): va ( y 2 y1 ) cos ( x2 x1 ) sin T12 (5) Similar equations can be written for each reference sensor. For tri-partite arrays there will be three azimuths and apparent velocity estimates. These three pairs of values are independent, and if time differences are estimated accurately, these values must be more or less similar. By simple synthetic tests we have proved that the planar wave front model provides an acceptable approximation even if the distance between the center of the array and the seismic source is only few times larger than the distance between the sensors. For instance, with an array 4 250 m wide and the seismic source at 0.5 km distance, the maximum difference between the true azimuth and that computed by the planar wave front approximation is smaller than 6°. A more sophisticated geometry would be necessary if the distance between the elements of the array were comparable to the distance between the source and the array elements (Almendros et al., 1999). In this case a standard location algorithm based on absolute arrival times at single sensors could be used instead of the tri-partite array algorithm. 3. Program operation To start the program, all the provided files must be placed in a folder, Matlab must be started, and the file WaveAnalyzer.m run. The Matlab GUI is organized into ten menus, which appear at the top of the window when the program is launched. The first seven menus are standard, so only the last three menus (Load, Execute, Save) are detailed below. The program needs two input files: (I) an ASCII file containing the digital waveforms as a four column matrix (the first column contains the sample time and the three others contain the amplitudes of each station) and (II) an ASCII file containing the geographical coordinates of the stations. File (I) can be loaded using the command button Load Wave forms, and file (II) by means of the submenu Station Coordinates in menu Load. In order to test the functionality of the program, example files Waves.txt and Stations.txt are supplied. The time difference between waveforms must be calculated with respect to a reference station. After loading the waveforms, the user can visualize them in the GUI. The reference wave can be chosen using the combo box Station of reference (Fig. 2). The Matlab standard submenu zoom in in menu View can be used to analyze the reference wave in detail. When the correct level of zoom is chosen, the user can refresh all the other plots with the button Update seismograms. Note that the plot coordinates of the reference field shown on the first axis are not updated in real time when zoom in is selected. For this reason we suggest selecting this menu only when the user does not have to click on the reference wave plot. Next, the processing interval needs to be chosen. This interval can be selected by simply moving the pointer onto the reference wave plot and pressing spacebar. The limits are indicated by vertical straight lines on the plot (see Fig. 3). The (x,y) values of the pointer position (time, amplitude) are indicated to facilitate the clicking procedure. 5 If the reference sensor is changed, the window limits disappear but the chosen values are not deleted. The user can choose to use the stored parameters in three different ways using the following three buttons: (I) Reload previous window. The previous window is loaded and the straight lines automatically appear on the axis. (II) Reload previous origin time. The previous lower limit is loaded and the user only needs to click on the higher limit. (III) Reload previous window size. The previous window size is loaded and the user must click on the lower limit. The upper limit will be automatically selected. The last two inputs required to perform the correlation calculation are: (I) Step of correlations. This indicates the interpolation step and can be inserted by the corresponding text input. (II) Time shift. This will be requested after clicking on the button Correlation. It is very important to click on Data Confirmation before computing the correlation. After calculating the correlation function, the software automatically computes its maximum. The user can decide if this value is acceptable or if manual picking is preferred (Fig. 4). In this case, the user can simply set the differences by clicking on the output plots. Finally, the user can calculate the azimuth and the wave speed with the "Execute" menu; the results are shown in a dialog box (Fig. 5). Upon starting the program, an archive session is opened, and every time the "Execute" menu is chosen, all the parameters and results are stored in this archive. This archive can be deleted or exported as an ASCII file at any time using the menu Save, as in the example shown in Table I. 4. Application and results We were able to check the algorithm efficiency and the program functionality using a set of data collected by the National Data Center of Israel during an experiment from July 1998 to February 1999 with a tri-partite array. Each element of the array was equipped with a three component short period (1 Hz) seismometer system with a sampling rate of 62.5 Hz. The array was installed in southern Israel, near the Dead Sea; the three elements formed a triangle with an aperture of ~250 m. If the seismic waves travel with an apparent velocity greater than 1 km/s, they must cross the array in less than 0.25 s (~15 samples). So if the arrival times were correctly calculated, the time difference should not be larger than this quantity. We considered 11 chemical explosions 6 and 4 earthquakes with local magnitudes ranging from 1.6 to 2.7 (see Table II). Fig. 6 shows their spatial distribution (from Bartal et al., 2000). Most of the events were close to the array, with distances from the sensors ranging from 6 km to 37 km (130 times the aperture of the array). There were only two distant events, ID 7 and 11 (80 km and 100 km away, respectively). The following criteria were used in our analysis: - window length one and half times the dominant period of the signal, - identical window beginnings for the three reference sensors, - interpolation sampling of 0.002 s, - application to P, S and Rg phases according to their clarity, and - use of the maximum amplitude wavelet of each phase; when convenient, the results are reported in Table III. For it was possible to analyze the S phase for nine events, and for two of them the Rg phase as well; the results obtained are not always consistent with those of the P phase, with azimuth differences from 15° to 30°. Fig. 7 shows the comparison between the azimuths obtained in this study and those computed by the Israel national seismic network (Bartal et al., 2000). These azimuths are assumed to be accurate enough to be taken as reference. The square symbols are the results obtained using S phases, while the triangles are those obtained with surface phases (Rg), generally recorded as the maximum amplitude of the seismogram. The straight line shows the theoretical one–to-one ratio between the two solutions. There are only few observations that fall nearly exactly on this line, but most of the others are fairly close. Fig. 8 reports the velocity values determined for phases P, S and Rg versus the epicentral distance. The conventions of Fig. 7 are used for the symbols. The solutions exhibit an average velocity of 5.7 km/s for the P waves and 3.0 km/s for the S waves. For events closer than 40 km to the array site, the P average velocity is smaller than 7 km/s except for event 13, which is characterized by an anomalous velocity of 9 km/s. This value has proved stable even when changing some of the free parameters in the algorithm. This could be because this high apparent velocity is related to the arrival of a P wave reflected by the interface between two crustal layers. The P arrivals of the two more distant events (7 and 11) exhibit velocities close to or higher than 7 km/s, indicating a refraction under the crustal interface. Last, the smallest apparent velocities, under 2 km/s, belong to the two surface wave arrivals (Rg). 7 6. Discussion and conclusions The technique described in this paper and implemented in the software could be easily applied to a seismological survey of aftershocks triggered by an underground explosion, in an On-Site Inspection, or in any other situation in which we have a tri-partite array and low signal-to-noise. This situation makes it difficult to pick up the exact arrival times of the seismic waves, especially P waves, when using traditional single-station location techniques. In this context our technique may be useful because it does not need to estimate the exact arrival time, but can instead compare the corresponding waveform segments at different elements. Furthermore, our tests prove that small variations of the initial instant of the time windows used for cross-correlation do not significantly affect the obtained values of azimuth and apparent velocity. Using cross-correlation between the waveforms provides a higher resolution than the sampling rate in estimating time difference. In spite of this time resolution, the precision allowed by a very small aperture tri-partite array in determining event azimuths of the order of 15°-30° is not very high because of a number of reasons, including systematic bias in wave propagation. Nevertheless, this precision is high enough when the network of arrays is spaced by few km, because the plane wave approximation is valid also at these short distances. Moreover, developing an interactive Matlab GUI allows very fast analysis and estimation of the speed and back-azimuth. The software is designed to make it easy to change the parameters, the time-window analysis, the reference wave, the step of the interpolation, and all the other parameters necessary to perform the computation. Every parameter can be changed independently without stopping the program execution. Every test and computation is automatically recorded in an ASCII file containing the numeric parameters and results in order to allow a complete analysis of all the tests performed. Finally, the use of a high level interpreter like Matlab allows the use of optimized algorithms to perform the interpolation and cross-correlation, and makes it easy to set the reference wave and time windows by a simple click of the mouse. Acknowledgements We are grateful to the Italian and Israeli National Data Centers for the support to this study. We wish in particular to acknowledge the contributions of Massimo Chiappini and Yochai Ben Horin. Special acknowledgement is due to David Jepsen for his scientific and linguistic suggestions. 8 We also thank the two anonymous reviewers for their useful comments and suggestions. 9 References Adushkin, V., Spivak, A., 1995. Aftershocks of underground nuclear explosions, In: Console R. and Nikolaev A. (Ed.) Earthquakes Induced by Underground Nuclear explosions, NATO ASI Series, Partnership Sub-Series, 2. Environment, Springer-Verlag Berlin Heidelberg, Vol.4, pp. 21-34. Almendros, J., Ibanez, J. M., Alguacil, G., Del Pezzo, E., 1999. Array analysis using circular-wavefront geometry: an application to locate the nearby seismo-volcanic source. Geophysical Journal. International, 136, 159-170. Bartal, Y. ,Villagran, M., Ben Horin, Y., Leonard, G., Joswig, M., 2000. Definition of exclusive zones using seismic data. Pure and Applied Geophysics 158, 397-419. Richards, P.G., and Ekstrom, G, 1995. Earthquake activity associated with underground nuclear explosions, In: Console R. and Nikolaev A. (Ed.) Earthquakes Induced by Underground Nuclear explosions, NATO ASI Series, Partnership Sub-Series, 2. Environment, Springer-Verlag Berlin Heidelberg, Vol.4, pp. 35-49. Taylor, J. R., 1982. An Introduction to Error Analysis, the Study of Uncertainties in Physical Measurements. University Science Books, Sausalito, CA, 327 pp.. 10 Figure captions Fig. 1 – Sketch of a tri-partite array. S1 , S 2 and S3 are three elements, dashed line shows direction of wave propagation, and 1 , 2 , 3 and are azimuths of the three elements and azimuth of event with respect to the origin of rectangular coordinates. Fig. 2 Main frame of program for event 980730. First element, called Dim1, has been chosen as reference. Fig. 3 Frame of program. Reference window has been chosen and is shown with thin lines. Fig. 4 Frame of program. At this point, the user can choose to manually select maximum of correlation functions or to accept absolute maximum values automatically computed by program. Fig. 5 Frame of program. At this point the user can calculate azimuth and apparent velocity of waves with “Execute” menu. Results are shown by means of a message box and are automatically recorded in the session archive. Fig. 6 Spatial distribution of events analysed in this study. After Y. Bartal et al., 2000. Fig. 7 Comparison between azimuth obtained in this study and azimuth of national network, considered as reference. Open circles refer to results obtained by P phases. Squares indicate azimuths obtained with S phases, and triangles those obtained with Rg phases. Numbers correspond to events listed in Table I. M symbol accompanying event number indicates that maximum amplitude wavelet has been used. Fig. 8 Apparent velocity found with phases P and when possible with later phases. See Fig. 7 for symbols meanings. 11 Table I An example (event 980730) of obtained results Reference_ Advance Step Number_ Sensor (s) (s) of_Steps 1 2 3 0.317 0.317 0.317 0.002 0.002 0.002 317 317 317 Window_ Window_ Time_ Time_ Azimuth Velocity Start Lenght Correlation_1 Shift_1 Correlation_2 Shift_2 (°) (km/s) (s) (s) (s) (s) 54.675 0.317 0.979 0.024 0.989 0.052 25.820 4.896 54.675 0.317 0.977 -0.025 0.979 0.026 26.49 4.988 54.675 0.317 0.986 -0.053 0.987 -0.029 24.604 4.882 For each sensor of reference: - Window_Start is the instant at which reference window starts; - Advance is the instant at which calculation of cross-correlation begins; - Step is interpolated sampling interval; - Correlation_1 and Time_Shift_1 are first maximum of cross-correlation and corresponding time difference found, respectively; (Correlation_2 and Time_Shift_2 are the second values found) -Azimuth and Velocity are solutions obtained. 12 Table II Event Locations from Y. Bartal et al., 2000 ID 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Name of Event 980724 980726 980730 980803_0 980803_1 980814 980817 980824 980901 980904 980906_0 980906_1 980907 980908 981009 Lat N (deg) 31.143 30.858 31.094 31.034 31.293 30.724 31.909 30.723 30.869 31.106 31.689 31.077 30.783 31.013 30.876 Long E (deg) 34.973 34.999 35.169 35.235 35.064 35.329 35.482 35.308 35.109 34.996 35.507 35.198 35.040 35.248 35.107 Dep (km) 0.0F 0.0F 0.0F 0.0F 0.0F 11.8 14.3 7.2 0.0F 0.0F 16.0 0.0F 0.0F 0.0F 0.0F Azimuth (deg) 305.95.8 221.15.5 2.013.8 79.215.6 342.05.9 154.77.4 16.82.2 157.77.4 197.69.3 299.65.6 23.53.1 26.930.9 204.37.2 98.716.3 199.019.7 Dist (km) 22.72 24.25 7.90 6.71 31.48 36.60 102.72 35.90 18.01 18.60 80.54 6.63 29.18 7.91 17.22 Apparent Velocity (km/s) 4.361.33 6.452.64 5.312.42 4.131.06 2.310.47 4.571.96 7.815.74 3.250.96 4.131.48 4.371.58 7.815.74 4.621.98 2.250.39 3.610.93 7.043.61 Ml Ev 2.0 1.7 2.1 2.2 2.0 1.6 2.6 2.0 2.7 2.3 2.1 2.2 1.6 2.1 2.6 E E E E E Q Q Q E E Q E E E E Each row corresponds to one event, and describes: identified number, name, latitude, longitude, depth, azimuth, distance from site of the array, apparent velocity, and local magnitude. In last column, E or Q identifies the nature of the event: E is explosion and Q earthquake. 13 Table III Results obtained 1 Name of Event 980724 X 2 980726 X 3 980730 X 4 980803_0 X 5 6 7 8 980803_1 980814 980817 980824 X X X 9 980901 X 10 980904 X 11 980906_0 X XM 12 13 14 980906_1 980907 980908 X X X 15 981009 X ID P S R XM XM X X X X X X X X X Width of Window (s) 0.255 0.290 0.298 0.297 0.301 0.305 0.265 0.265 1.34 0.291 0.22 0.278 0.400 0.308 1.056 0.312 0.525 0.225 0.225 0.225 0.296 0.291 0.264 0.364 0.344 0.47 Azimuth Average (deg) 311.23 324.65 207.67 176.72 25.19 12.89 91.95 82.93 345.71 147.58 44.20 136.06 139.06 169.93 200.33 298.96 332.69 50.40 52.90 34.38 29.38 193.28 97.83 80.61 186.16 171.49 Error () (deg) 1.917 14.93 2.3 12.13 0 0.338 0.511 0.794 2.884 1.31 0.286 2.116 0.478 0.174 1.608 3.065 14.84 1.947 1.681 0.355 0.598 3.115 2.152 3.52 2.78 8.3 Apparent Velocity Average (km/s) 6.35 3.41 6.14 4.43 4.98 4.10 3.80 2.72 1.58 3.79 7.36 5.02 2.39 4.79 1.34 6.69 4.03 6.62 7.52 3.65 5.12 9.00 4.22 2.85 6.05 2.87 Error () (km/s) 0.424 0.826 0.055 0.793 0 0.09 0.052 0.082 0.089 0.057 0.058 0.081 0.03 0.099 0.051 0.376 0.529 0.006 0.25 0.053 0.101 0.371 0.40 0.13 0.07 0.35 Each row includes the identified number of the event, its name and signal phase used, the length of the reference window, and the parameters desired: the azimuth average and relative error and the apparent velocity and relative error. When M accompanies the phase, the maximum amplitude wavelet was used. 14 Fig 1 15 Fig. 2 16 Fig. 3 17 Fig. 4 18 Fig. 5 19 Fig. 6 20 Fig. 7 21 Fig. 8 22