Sonic logging

Sonic logging is a well logging tool that provides a formation’s interval transit time, designated as formula_1, which is a measure of a how fast elastic seismic compressional and shear waves travel through the formations. Geologically, this capacity varies with many things including lithology and rock textures, most notably decreasing with an increasing effective porosity and increasing with an increasing effective confining stress. This means that a sonic log can be used to calculate the porosity, confining stress, or pore pressure of a formation if the seismic velocity of the rock matrix, formula_2, and pore fluid, formula_3, are known, which is very useful for hydrocarbon exploration.
Process of sonic logging.
The velocity is calculated by measuring the travel time from the piezoelectric transmitter to the receiver, normally with the units microsecond per foot (a measure of slowness). To compensate for the variations in the drilling mud thickness, there are actually two receivers, one near and one far. This is because the travel time within the drilling mud will be common for both, so the travel time within the formation is given by:
where formula_5 = travel time to far receiver; formula_6 = travel time to near receiver.
If it is necessary to compensate for tool tilt and variations in the borehole width then both up-down and down-up arrays can be used and an average can be calculated. Overall this gives a sonic log that can be made up of 1 or 2 pulse generators and 2 or 4 detectors, all located in single unit called a “sonde”, which is lowered down the well. 
An additional way in which the sonic log tool can be altered is increasing or decreasing the separation between the source and receivers. This gives deeper penetration and overcomes the problem of low velocity zones posed by borehole wall damage.
Cycle skipping.
The returning signal is a wavetrain and not a sharp pulse, so the detectors are only activated at a certain signal threshold. Sometimes, both detectors won’t be activated by the same peak (or trough) and the next peak (or trough) wave will activate one of them instead. This type of error is called cycle skipping and is easily identified because the time difference is equal to the time interval between successive pulse cycles.
Calculating porosity.
Many relationships between travel time and porosity have been proposed, the most commonly accepted is the Wyllie time-average equation. The equation basically holds that the total travel time recorded on the log is the sum of the time the sonic wave spends travelling the solid part of the rock, called the rock matrix and the time spent travelling through the fluids in the pores. This equation is empirical and makes no allowance for the structure of the rock matrix or the connectivity of the pore spaces so extra corrections can often be added to it. The Wyllie time-average equation is:
where formula_8 = seismic velocity of the formation; formula_9 = seismic velocity of the pore fluid; formula_2 = seismic velocity of the rock matrix; formula_11 = porosity.
Accuracy.
The accuracy of modern compressional and shear sonic logs obtained with wireline logging tools is well known now to be within 2% for boreholes that are less than 14 inches in diameter and within 5% for larger boreholes. Some suggest that the fact that regular- and long-spaced log measurements often conflict means these logs are not accurate. That is actually not true. Quite often there is drilling induced damage or chemical alteration around the borehole that causes the near-borehole formation to be up to 15% slower than the deeper formation. This "gradient" in slowness can be as large as 2-3 feet. The long-spaced measurements (7.5-13.5 ft) always measures the deeper, unaltered formation velocity and should always be used instead of the shorter offset logs. Discrepancies between seismic data and sonic log data are due to upscaling and anisotropy considerations, which can be handled by using Backus Averaging on sonic log data. 
Some suggest that to investigate how the varying size of a borehole has affected a sonic log, the results can be plotted against those of a caliper log. However, this is usually prone to leading one to the wrong conclusions because the more compliant formations that are prone to washouts or diameter enlargements also inherently have "slower" velocities.
Calibrated sonic log.
To improve the tie between well data and seismic data a "check-shot" survey is often used to generate a calibrated sonic log. A geophone, or array of geophones is lowered down the borehole, with a seismic source located at the surface. The seismic source is fired with the geophone(s) at a series of different depths, with the interval transit times being recorded. This is often done during the acquisition of a vertical seismic profile.
Use in mineral exploration.
Sonic logs are also used in mineral exploration, especially exploration for iron and potassium.