Determination of the distortions introduced by the compression algorithm in the results of the measurement of the local impact control device “Prognoz-L”.

. The article discusses the application of the u-law algorithm from the G.711 standard, which performs lossy compression. A theoretical error introduced by this algorithm into discrete samples of digitized acoustic emission signals is determined. The effect of compression on signal parameters was also determined. During the analysis, the data from the local “Prognoz-L” device were used. “Prognoz-L” performs rockburst hazard assessment. The data were processed in an automatic mode to isolate pulsed signals containing acoustic emission. The processing of the obtained sample of pulse signals made it possible to determine the basic statistical characteristics of the errors introduced by the compression algorithm into the values of the signal parameters. The possibility of using this algorithm for preliminary processing of acoustic emission signals is established with the aim of keeping rock pressure monitoring in low-power acoustic-emission devices.


Introduction
An effective method for predicting dangerous dynamic manifestations of rock pressure in a mining facility is the geoacoustic method. This method has a high resolution (in comparison with the microseismic method) and allows to observe the evolution of the destruction points formation process directly from the initial stages [1]. The method consists in recording with piezo accelerometers (sensors) acoustic emission signals in a rock mass in the frequency range 1-20 kHz and a dynamic range of more than 80 dB. This frequency range of signals has a large attenuation coefficient, so that to monitor the entire volume of mining requires either a large number of sensors spaced a distance of several kilometers or sequential monitoring by one sensor in the most dangerous places. In this case, the amount of data received from one sensor at a sampling frequency of 40 kHz (twice the maximum signal frequency) and the resolution of the ADC of 16 bits to provide a dynamic range of more than 80 dB will be 78 kb/s or more than 6.4 GB/day. To store such large amount of data on local low-consumption devices for continuous monitoring of E3S Web of Conferences 56, 02016 (2018) https://doi.org/10.1051/e3sconf/20185602016 VII International Scientific Conference "Problems of Complex Development of Georesources" rockburst hazard is a big problem. To reduce the amount of data, there are various methods, for example, saving data containing only acoustic emission or preserving only the parameters of signals without saving the waveform itself [2]. However, these methods exclude careful processing of the entire volume of received data using new algorithms for the isolation of acoustic emission signals. One way to solve this problem is to compress the data stream before saving. In this paper, we consider the method of data companding by the G.711 u-law algorithm and its effect on the parameters of acoustic emission signals.

Determination of theoretical error
G.711 is the standard containing algorithms for companding audio data, mainly used in telephony. The compression ratio can vary depending on the problem being solved. However, the compression ratio 2 described in the standard is most often used, as it has the most optimal relationship between the compression ratio and the insertion distortions. There are two main algorithms u-law and a-law in the standard. Both algorithms are logarithmic, but u-law is optimized for hardware implementation. Data compression using the u-law algorithm is performed according to the following equation [3]: (1) where x -the initial (input) value of the sample signal; y -the corresponding μ-type sample.
The formula (1) is not directly applied because of the high resource intensity of calculating the logarithm. To reduce the resource intensity in the standard, a special approximation is presented, which can be easily calculated by hardware [4].
This approximation ensures the calculation of the μ-type sample using only 128 bytes of RAM, 7 logical operations, 2 addition operations and 1 conditional operator. Such a low resource capacity allows applying the algorithm in energy-efficient devices based on 8-bit microcontrollers without digital signal processing modules with battery power supply or with limited power supply through long communication lines. For example, using the lowconsumption STMicroelectronics processor STM32F051 [5] and the clock frequency of 2 MHz, the algorithm allows processing up to 55 thousand samples per second, which corresponds to the input bandwidth of 22 kHz, while the power consumption is only 4 mW.
The drawbacks of this method of compression include the loss of data, which causes distortion of the reconstructed waveform. Figure 2 shows a theoretical error over the entire range of input linear samples.
Fige 1 shows that the algorithm error for most initial sample values does not exceed 5%, but in the region of small values it can reach 100%. Such a high error value is not something that is not acceptable since its contribution to the total error budget is much less than the contribution of noise introduced by the ADC (for example) in this range of values.
As an example, we take the popular low-power ADC, designed for battery-powered devices AD7988-5BRMZ from Analog Devices [6]. This ADC has a bit capacity of 16 bits and at a reference voltage of 5 V provides a minimum noise. The maximum deviation of the measurement result is 4 least significant bits (LSB). Substituting this value in the formula 2 where (x-x') = 4 for the whole range of values, we get an estimate of the maximum noise effect of the ADC on the error of the measurement result. The combination of the error graphs introduced by the ADC and the companding algorithm, Fig. 2, shows that the contribution of the companding algorithm in the region of small values is less by a factor of 4. Error introduced by the algorithm is calculated using the formula: (2) where x -the initial (input) value of the sample signal; err -error of the value obtained after sequential applying of the forward and reverse companding algorithm; x' -value of the sample signal after sequential applying of the forward and reverse companding algorithm.

Algorithm influence on the macro parameters of acoustic emission
As was shown above, the u-law algorithm influences the shape of the acoustic emission signal. However, only the signal waveform in practice is not used when evaluating the impact parameters. The shape of the original wave changes significantly both during propagation through the material and during transformation by the sensor, so the signal coming from the sensor is very remotely similar to the original signal [7]. The shape changes lead to the fact that the correlation parameters of the received signal with certain fracture characteristics are used to estimate the fracture parameters. These parameters of the final acoustic emission signal are called macro parameters. The most widespread macro parameters are [8]: the time of the first crossing of the threshold level, the count of threshold crossings, the time to the amplitude peak, peak amplitude, signal energy, signal duration, signal strength (area under the MARSE envelope), average signal frequency, signal peak frequency, the frequency centroid of the pulse, the RMS value, the average signal level. In the presented work, the following set of macro parameters was chosen: maximum amplitude, signal energy, signal strength (MARSE), RMS amplitude value, fundamental frequency and frequency centroid signal. The choice of these macro parameters was based on how often they are used in various acoustic-emission monitoring systems of rock mass, as well as the maximum influence on them of the distortions introduced into the waveform by the companding algorithm. To determine the effect of waveform distortion on the macro parameters, statistical methods were used over a large sample of signals recorded at various mines in the Russian Federation. The registration was carried out with the help of the local rockburst monitoring device "Prognoz-L" [9].
As a result of field experiments using this device, more than 2.2 GB (6 hours) of data were obtained. The data is recorded in files in the "wav" format with a duration of 10 minutes, the recording was made at various mines with different intensity of acoustic emission pulses. Later on, only data related to acoustic emission signals were extracted from the array of files with measurement results. To isolate these signals, the automatic processing algorithm STA / LTA was used [10]. As a result, 5338 fragments containing acoustic emission signals and a small number of drill noise signals were isolated.
In the future, for each signal from the 5338 samples, the value of the maximum amplitude was calculated. In general, the sample has the following parameters: the maximum amplitude of the weakest signal was 22 units of the least significant digit of the input ADC (LSB), the maximum value of the amplitude of the strongest signal was 32767 LSB. The largest number of signals (3976) has a maximum amplitude of less than 327 LSB. That also indicates that all samples of these signals also have an amplitude not exceeding 327 LSB. This range in accordance with Figure 2 is one of the cases in which the u-law algorithm introduces the maximum distortion. Thus, by calculating the error introduced into the macro parameters by the companding algorithm on the signals from this range of amplitudes, we obtain its maximum estimate. The method used to determine the statistical characteristics of errors introduced by the algorithm into macro parameters consisted in the following. The initial values of macro parameters were calculated for the acoustic emission signals extracted from the total volume of data. The calculation of macro parameters was performed according to the following formulas [11]: (3) where, A-maximum amplitude; W-signal energy; S-signal strength (MARSE); RMS-RMS amplitude value; -frequency centroid signal; x -is the discrete value of the signal amplitude; n -is the number of signal points; f -is the discrete value of the harmonic amplitude of the signal; k -is the number of harmonics of the signal in the frequency domain, ω -is the discrete value of the harmonic frequency of the signal. The forward and backward companding algorithm was applied to the original signals successively. For the signals processed in this way, the macro parameters were recomputed. Formula 2 uses the values of the macro parameters before and after applying the algorithm and calculates the errors introduced. Based on the error values of each macro parameter, their probability density function, mathematical expectation, minimum, maximum value and mean square value, as well as the interval in which most of its values are located, were calculated.
As a result of calculation according to the algorithm proposed above, statistical error estimates for each macro parameter were obtained for all 5338 signals. The graphs of the probability density function are shown in Figure 3. From the graphs obtained, only the error distribution of the frequency of the fundamental harmonic has the normal distribution form. Therefore, it is not permissible to apply the rule of three sigma to estimate the interval in which in which most of values are located. In order to simplify the calculations, the calculation of the boundaries of these intervals was made numerically based on the probability density graphs. An interval was chosen in which the error values are located with a probability of 0.993. This probability is based on an analysis of the average number of signals in one "wav" file and the assumption that in an average file, no more than one signal should have an error beyond the computed interval. Statistical estimates of errors in the calculation of macro parameters are presented in Table 1. Thus, to reduce the error in calculating the integral macro parameters using data processed by the u-law algorithm, it is necessary to add an offset of -1.55% for the RMS amplitude value, -3.1% for the signal energy, -1.75% for MARSE function.

The contribution of the u-law algorithm distortions to the total error budget
The distribution characteristics of the maximum amplitude error generally agree with the analytical calculations shown in section 2. The distribution has zero expectation and the interval of the most probable error value from -5.7 to 6.9 percent. This interval has the maximum spread among the errors introduced by the algorithm into macro parameters. If we take the maximum error introduced by the algorithm in 6.9%, then before the amplitude value of the 58 LSB signal is reached, errors introduced by the noise of the ADC will prevail in the error budget. However, after overcoming the amplitude of the signal of this magnitude, the main contribution to the distortion of the parameters will be due to errors in the u-law algorithm. To determine the criticality of the error introduced by the companding algorithm in signals with an amplitude of more than 58 LSB, it is necessary to estimate the practical limits of the error in determining the macro parameters in problems of controlling rock pressure by the acoustic-emission method. Consideration of this issue is beyond the scope of this article and requires a separate study. However, if we consider such a parameter of polycrystalline rocks as the absorption of acoustic vibrations with a wavelength much greater than the average crystal size, it can be noted that even for different types of granites this value can differ by 15%. [12]. At the same time, in the conditions of a mining enterprise, the acoustic emission signal can pass from the source to the recorder through a variety of rocks with an even wider spread of the values of this coefficient. Therefore, depending on the location of the receiving sensor, even if the constant distance from the source (the point of destruction) is maintained, the amplitude of the received signals can differ by tens of percent, which is much larger than the error introduced by the companding algorithm.

Conclusions
The results of the research allow us to conclude that the application of the u-law algorithm for preliminary processing of geoacoustic data is justified. At a compression ratio of 2 and a low resource intensity, it contributes only a small contribution to the overall budget of errors in determining the parameters of the initial pulses of acoustic emission. The companding algorithm described above could be used to upgrade the "Prognoz-L" local control device in order to increase the autonomy of its operation and increase the number of stored measurement results.