Ultrasonic partial discharge signal compression and reconstruction method, computer device and storage medium
Through technologies such as denoising, downsampling, frame-based, windowing and discrete cosine transformation, the problem of signal information loss and low efficiency of ultrasonic partial discharge signals in transmission in narrowband networks and low-power terminals is solved, achieving high efficiency and accuracy The signal compression and reconstruction ensure the reliability and real-timeness of monitoring results.
Patent Information
- Application Number
- CN202411384940.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-30
- Publication Date
- 2025-01-14
AI Technical Summary
The existing compression and reconstruction methods of ultrasonic partial discharge signals have signal information loss, low compression efficiency, complex decompression, narrowband communication network limitations and low-power hardware terminal performance limitations, resulting in monitoring results errors and communication instability.
Denoising, downsampling, frame-based and windowing processing, combined with discrete cosine transformation and quantization processing, generate compressed data sets and position arrays to achieve efficient compression and reconstruction of signals, ensuring that the signal is in narrowband networks and low-power terminals Efficient transmission between.
On the premise of ensuring high signal fidelity, the signal compression efficiency is improved, the bandwidth requirement for data transmission is reduced, the efficiency and accuracy of signal processing are enhanced, and the reliability and real-timeness of monitoring results are ensured.
Smart Images

Figure CN119315995A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of partial discharge monitoring, and in particular, to a method for compressing and reconstructing an ultrasonic partial discharge signal, a computer device applying the method for compressing and reconstructing an ultrasonic partial discharge signal, and a computer-readable storage medium applying the method for compressing and reconstructing an ultrasonic partial discharge signal. Background Art
[0002] When some major equipment in the power system, such as transformers, generators, motors, gas-insulated switchgear GIS, etc., are in operation, the insulation gaps in the insulation parts have capacitive voltages and there is a huge voltage stress difference between the gas in the gaps and the insulating materials, which causes local bridging under the action of a strong electric field, resulting in partial discharge. According to current statistics, 85% of insulation faults are caused by partial discharges. If these insulation faults caused by partial discharges are not prevented, detected and resolved in a timely manner, they will become safety hazards and even evolve into serious power accidents, which will not only cause economic losses, but also endanger personal safety.
[0003] The current partial discharge monitoring methods mainly include: pulse current monitoring method, gas monitoring method, ultrasonic monitoring method, ultra-high frequency monitoring method and infrared thermal imaging monitoring method. Among them, the ultrasonic sensor installed on the equipment casing has no effect on the operation of the transformer, and will not be affected by the complex electrical, magnetic, thermal and other interferences inside the transformer, which is convenient for accurate positioning of local defects. Therefore, the ultrasonic monitoring method is now widely used in partial discharge monitoring.
[0004] At present, the mainstream method of ultrasonic partial discharge monitoring is: using ultrasonic sensors to convert the collected ultrasonic signals into electrical signals; preprocessing the collected electrical signals through conditioning circuits; then sampling and digital-to-analog conversion processing of the signals output by the conditioning circuits; finally comparing the obtained signals with the set thresholds to determine whether partial discharge occurs and record the discharge information. However, this method has some defects. For example, for the online monitoring system and cloud processing of ultrasonic partial discharge of power equipment, the amount of ultrasonic partial discharge signal data obtained by continuous monitoring is large, which is difficult to store and manage and utilize for subsequent data. An effective signal compression and reconstruction method is required to process a large amount of original sampled data. However, the signal compression and reconstruction methods disclosed in the industry have various defects and insufficient performance, and cannot meet the functional requirements of online detection. In addition, if all signals are transmitted at a high bit rate, although the quality of the transmitted signal can be guaranteed, the transmission capacity of the monitoring center will be insufficient, and the bandwidth will be wasted. In addition, if all signals are transmitted at a low bit rate, a lot of information will be lost during the transmission process, resulting in errors in the monitoring results of the monitoring center and losses.
[0005] Before ultrasonic partial discharge digital signals are communicated through narrowband networks and low-power terminals, signal compression is required. The difficulties and limitations of existing technical methods are as follows:
[0006] Information loss in signal conversion: During the signal compression process, there will be a large amount of information loss. This is because the compression algorithm is based on specific algorithms and parameters and cannot completely retain the original signal.
[0007] Low compression efficiency: In order to achieve effective signal compression, an efficient compression algorithm needs to be adopted. However, the design and application of the compression algorithm will be limited by factors such as hardware performance and computing power, thus affecting the compression efficiency;
[0008] Complex decompression: The design of the compression algorithm also needs to consider the complexity of decompression. If the decompression algorithm is too complex, it will consume a lot of computing resources and time, which will affect the real-time transmission of the signal and the efficiency of decoding;
[0009] Limitations of narrowband communication networks: Narrowband communication networks usually have lower data transmission rates and bandwidths, which will limit the real-time and reliability of ultrasonic partial discharge signal transmission. When transmitting large amounts of data, longer transmission and waiting times may be required, which will also increase the risk of communication interruption or bit errors.
[0010] Limitations of low-power hardware terminals: Low-power hardware terminals are usually designed for energy-saving and portable applications, so they may be subject to performance limitations when processing complex and large amounts of data, which will affect the efficiency and accuracy of the acquisition, processing, encoding and transmission of ultrasonic partial discharge signals, thereby reducing the quality of communication.
[0011] Therefore, it is necessary to consider more optimized compression and reconstruction methods of ultrasonic partial discharge signals. Summary of the invention
[0012] The first object of the present invention is to provide a compression and reconstruction method that can improve the efficiency of signal compression while ensuring high signal fidelity, and ensure efficient transmission of ultrasonic partial discharge signals between narrowband networks and low-power consumption terminals.
[0013] The second object of the present invention is to provide a computer device that can improve the efficiency of signal compression while ensuring high signal fidelity, and ensure efficient transmission of ultrasonic partial discharge signals between narrowband networks and low-power consumption terminals.
[0014] The third object of the present invention is to provide a computer-readable storage medium that can improve the efficiency of signal compression while ensuring high signal fidelity, and ensure efficient transmission of ultrasonic partial discharge signals between narrowband networks and low-power consumption terminals.
[0015] In order to achieve the above-mentioned first purpose, the compression and reconstruction method of the ultrasonic partial discharge signal provided by the present invention includes: obtaining an original ultrasonic partial discharge signal; denoising the original ultrasonic partial discharge signal to obtain a denoised partial discharge signal; downsampling the denoised partial discharge signal to obtain a downsampled partial discharge signal; framing the downsampled partial discharge signal to obtain a framed signal of a preset length, windowing the framed signal to obtain a windowed signal array; performing discrete cosine transform on the windowed signal array to obtain a corresponding framed data array; quantizing the framed data array to obtain a compressed data set composed of data exceeding a preset threshold in each frame, and obtaining a position array of position numbers corresponding to the data in the compressed data set in the framed data array; compressing the compressed data set and the position array to obtain compressed data.
[0016] As can be seen from the above scheme, the compression and reconstruction method of the ultrasonic partial discharge signal of the present invention performs downsampling by denoising the partial discharge signal to reduce the amount of data. At the same time, framing and windowing convert the ultrasonic signal into a series of short-time stable signals, which is convenient for subsequent signal processing and improves the efficiency and accuracy of data processing. Next, the framed data array is quantized to obtain a compressed data set composed of data exceeding a preset threshold in each frame, and a position array of position numbers corresponding to the data in the compressed data set in the framed data array, and further obtain compressed data, thereby utilizing the high efficiency of discrete cosine transform and the characteristics of ultrasonic partial discharge signals, and under the premise of ensuring high fidelity of the signal, signal compression can achieve efficient compressed data, ensure efficient transmission of ultrasonic partial discharge signals between narrowband networks and low-power terminals, and ensure that the main features and detailed information of the signal will not be lost.
[0017] In a further solution, the step of denoising the original ultrasonic partial discharge signal includes: denoising the original ultrasonic partial discharge signal using a preset noise gate denoising algorithm.
[0018] It can be seen that the noise gate denoising algorithm is relatively simple and can effectively remove low-amplitude noise in ultrasonic signals. It is more suitable for use in low-power terminals or sensors to reduce the computing performance requirements of the terminals or sensors.
[0019] In a further solution, the threshold of the noise gate denoising algorithm is preset to be twice the effective value of the original ultrasonic partial discharge signal.
[0020] It can be seen that setting the threshold value to twice the effective value of the original ultrasonic partial discharge signal can effectively remove most of the noise data.
[0021] In a further solution, the step of performing windowing processing on the framed signal includes: performing windowing processing on the framed signal using a Hanning window.
[0022] It can be seen that using the Hanning window to perform windowing processing on the framed signal can reduce interference and leakage to the signal.
[0023] In a further solution, the frame data array is obtained by the following formula:
[0024]
[0025] Where x(n) is the windowed signal array; δ k1 is the Kronecker operator, which is specifically defined as: n is the data sequence number in the windowed signal array, n=1, 2, 3, ..., N_frame; k is the data sequence number in the framed data array, k=1, 2, 3, ..., n.
[0026] It can be seen that through discrete cosine transform, the energy of ultrasonic signals can be concentrated on a small number of spectral coefficients, thereby achieving efficient signal compression.
[0027] In a further scheme, the frame data array is quantized to obtain a compressed data set composed of data exceeding a preset threshold in each frame, and the step of obtaining a position array of position numbers corresponding to the data in the compressed data set in the frame data array includes: taking the absolute value of each value in the frame data array to obtain an absolute value frame data array; sorting the absolute value frame data array in descending order, and recording the position information of each value after descending sorting in the frame data array; taking the modulus of the data in the frame data array in turn according to the position information to obtain the energy proportion of each data in the frame data array; if the energy proportion is greater than the preset threshold, the data is stored in the compressed data set.
[0028] It can be seen that the sum of the energy of several large-value data in each sub-frame accounts for more than 85% of the total energy of the frame. The array composed of these data and the corresponding frequency point position information is used as effective compressed data for storage and transmission, which is sufficient to represent the original information of the partial discharge signal. For other frame data with no or very small energy, they are discarded, thereby realizing rapid data compression processing.
[0029] In a further scheme, after the step of obtaining compressed data, it also includes: reconstructing a discrete cosine transform array from the compressed data; performing an inverse discrete cosine transform on the discrete cosine transform array to obtain a time domain signal restoration array for each frame; connecting all time domain signal restoration arrays into a continuous time domain signal using a window function; upsampling the continuous time domain signal to obtain reconstructed original waveform data.
[0030] It can be seen that by reconstructing the compressed data, the original waveform data can be restored for subsequent analysis and processing.
[0031] In order to achieve the second objective of the present invention, the present invention provides a computer device including a processor and a memory, wherein the memory stores a computer program, and when the computer program is executed by the processor, the steps of the above-mentioned ultrasonic partial discharge signal compression and reconstruction method are implemented.
[0032] In order to achieve the third objective of the present invention, the present invention provides a computer-readable storage medium having a computer program stored thereon, which implements the steps of the above-mentioned method for compressing and reconstructing ultrasonic partial discharge signals when the computer program is executed by a controller. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] Figure 1 It is a flow chart of an embodiment of the method for compressing and reconstructing ultrasonic partial discharge signals of the present invention.
[0034] Figure 2 It is a schematic diagram of the implementation process of the noise gate denoising algorithm in the embodiment of the ultrasonic partial discharge signal compression and reconstruction method of the present invention.
[0035] Figure 3 It is a spectrum diagram of the original ultrasonic partial discharge signal in the embodiment of the method for compressing and reconstructing ultrasonic partial discharge signals of the present invention.
[0036] Figure 4 It is a flow chart for reconstructing compressed data in an embodiment of the method for compressing and reconstructing ultrasonic partial discharge signals of the present invention.
[0037] The present invention is further described below in conjunction with the accompanying drawings and embodiments. DETAILED DESCRIPTION
[0038] Compression and reconstruction method of ultrasonic partial discharge signal:
[0039] The method for compressing and reconstructing ultrasonic partial discharge signals of the present invention is a computer program applied to a computer device, and is used for compressing and reconstructing ultrasonic partial discharge signal data.
[0040] like Figure 1 As shown, in this embodiment, when the compression and reconstruction method of the ultrasonic partial discharge signal is working, step S1 is first performed to obtain the original ultrasonic partial discharge signal. When the ultrasonic partial discharge signal needs to be compressed, the ultrasonic partial discharge signal needs to be collected first, usually using a sensor for collection, which is a well-known technology for technicians and will not be repeated here. The collected signal usually contains environmental noise and other interference, so it is necessary to perform preprocessing, such as zeroing, noise reduction filtering and other operations to improve the quality of the signal.
[0041] In this embodiment, the step of obtaining the original ultrasonic partial discharge signal includes: performing zeroing processing on the original ultrasonic partial discharge signal. Since the original ultrasonic sampling data has a sampling circuit reference level, there is a DC component in the sampling data. In order to facilitate the subsequent processing of waveform data and the characteristics of partial discharge ultrasound, the data needs to be zeroed. The method of zeroing is to subtract the statistical mean from the original data. The data after zeroing eliminates the DC component and makes the signal waveform symmetrically distributed above and below with 0 as the center axis. The calculation formula is: Sample_Zeroing(n)=Sample(n)-mean(Sample(n)), n=1,2,...N, where: Sample(n) is the original ultrasonic partial discharge signal, Sample_Zeroing(n) is the data after the original ultrasonic partial discharge signal is zeroed, mean(Sample(n)) is the calculation function of the algebraic mean of the original ultrasonic partial discharge signal, and n is a positive integer.
[0042] After the original ultrasonic partial discharge signal is obtained, step S2 is executed to perform denoising processing on the original ultrasonic partial discharge signal to obtain a denoised partial discharge signal. In order to reduce signal interference, denoising processing is required.
[0043] In this embodiment, the step of denoising the original ultrasonic partial discharge signal includes: denoising the original ultrasonic partial discharge signal using a preset noise gate denoising algorithm. The noise gate denoising algorithm is relatively simple and can effectively remove low-amplitude noise in the ultrasonic signal. It is more suitable for use in low-power terminals or sensor terminals to reduce the computing performance requirements of the terminal or sensor terminal.
[0044] For details, see Figure 2 When the original ultrasonic partial discharge signal is denoised using the preset noise gate denoising algorithm, the following steps are performed:
[0045] Convert the input signal into an array of positive amplitude values, the calculation formula is: a [n]=|x[n]|, n is the number of signal points, x[n] is the input signal array, x a [n] is the converted positive amplitude array;
[0046] Calculate the static gain, the calculation formula is: T lin is the threshold value, g c [n] is the static gain;
[0047] Use the set attack time, release time and duration control parameters to smooth the static gain to get the dynamic gain. The calculation formula is:
[0048] , k Ais the attack time coefficient, which is related to T A Correspondingly, it is defined as: k R is the release time coefficient, which is related to T R Correspondingly, it is defined as: T A is the attack time, T R is the release time, Fs is the input sampling rate, C A is the attack duration, T H for duration;
[0049] Multiply the dynamic gain by the original signal. The dynamic gain obtained above is the noise gate. Multiply the noise gate by the original input signal to obtain the denoised partial discharge signal. The calculation formula is: y[n] = x[n] × g s [n].
[0050] When setting the threshold, preferably, the threshold is set to twice the effective value of the original signal. The principle is: in the partial discharge ultrasonic signal, the effective partial discharge signal is usually much larger than the basic noise signal amplitude, but the number of partial discharge pulses is very small. In a sampling signal, most of the data is noise data, and a small amount is partial discharge pulse data, and the calculated effective value is approximately equal to the effective value of the noise. Due to the randomness of the noise data, its energy distribution probability is approximately Gaussian distribution. Through the probability calculation of Gaussian distribution, it is obtained that: the probability of the amount of data greater than 1 times the effective value is 15.87%; the probability of the amount of data greater than 2 times the effective value is 2.28%. That is to say, when the threshold is set to 2 times the effective value, about (1-2.28% =) 97.72% of the noise data in the signal can be removed. Of course, adaptive adjustments can also be made according to the signal characteristics.
[0051] When setting the control time parameters, including the attack time, release time and duration parameters, the control time parameters are reasonably set according to the characteristics of the ultrasonic signal to ensure that no misjudgment occurs, useful signals are lost, and additional signals are generated. Preferably, the attack time is 0.002 seconds, the release time is 0.001 seconds, and the duration is 0.002 seconds. The process of gain changing from 0 to normal value is usually the process from basic noise signal to the appearance of partial discharge signal. In order to avoid misjudgment, a certain duration is required, and a longer smooth transition is used to fit the original appearance of the time domain waveform. In the process of gain decreasing from normal value to 0 value, it can usually be determined that it is the process of the end of the partial discharge signal. The process of large signal disappearing is relatively rapid, so a shorter smooth transition is used.
[0052] After obtaining the denoised partial discharge signal, step S3 is executed to downsample the denoised partial discharge signal to obtain a downsampled partial discharge signal. The main function of downsampling the ultrasonic signal is to reduce the amount of data, reduce the amount of calculation, and save resources during transmission and storage. Downsampling can achieve these goals by reducing the sampling rate of the ultrasonic signal, and the Nyquist sampling theorem needs to be met during the processing.
[0053] The application target of this embodiment is a low-power terminal or sensor terminal. The common characteristics of such devices are:
[0054] The sensor for ultrasonic signal sampling has a certain sampleable signal frequency range, that is, the bandwidth of the sampling signal. The center value of the bandwidth is the center frequency of the sensor. The frequency distribution range of the external ultrasonic signal may be different from the sampling bandwidth of the sensor, and the maximum response amplitude will be generated near the center frequency of the sensor.
[0055] The detection terminal samples the response of the sensor. The basic parameter is the sampling rate (Fs) of the sensor. The sampling rate of the general detection terminal is much larger than the maximum sampleable signal frequency of the sensor.
[0056] Among the original ultrasonic signals, only the ultrasonic signals within the frequency range of the signal that can be sampled by the sensor are real signals. Those outside this frequency range can be considered as noise and interference signals and can be removed.
[0057] Based on the above analysis, the denoised PD signal can be downsampled to reduce the amount of data, but it is necessary to ensure that the real ultrasonic signal data can be preserved. In order to determine a reasonable downsampling sampling rate, the downsampling sampling method and parameters, as well as the verification method and examples are given below.
[0058] In the example, the sampling rate Fs of the original ultrasonic signal is 614400 Hz, and the downsampling rate (resample_rate_n) is set to 6 (selected according to the analysis results of the example signal data), which is set as the default algorithm parameters for front-end (terminal and sensor) compression and back-end (background) reconstruction and saved in the algorithm model.
[0059] Draw the spectrum of the original partial discharge signal to analyze the relationship between the frequency distribution information of the partial discharge signal and the sampling rate, and determine the downsampling rate. Figure 3 It can be seen that the main frequency distribution of the signal is between 30 and 50kHz, and the center frequency is about 40kHz. According to the Nyquist sampling theorem, as long as the sampling rate reaches 100kHz, the frequency signal within 50KHz can be covered. The original signal sampling rate is 614400Hz, which is more than 6 times the required sampling rate of 100kHz, so the downsampling rate is selected as 6.
[0060] After obtaining the downsampled partial discharge signal, execute step S4, perform frame processing on the downsampled partial discharge signal to obtain a frame signal of a preset length, perform windowing processing on the frame signal, and obtain a windowed signal array. The frame processing makes the characteristics of the ultrasonic signal more obvious, which is convenient for subsequent feature extraction and signal processing. By dividing the ultrasonic signal into a series of overlapping short time periods (frames), the local changes of the ultrasonic signal can be more prominently displayed. Windowing processing can further improve the efficiency and accuracy of ultrasonic signal processing. Therefore, the ultrasonic signal is converted into a series of short-time stable signals by framing and windowing, which is convenient for subsequent signal processing and improves the efficiency and accuracy of data processing.
[0061] In this embodiment, when the down-sampled partial discharge signal is framed to obtain a framed signal of a preset length, the framing method is as follows: for an input signal array, specify the size of each frame as a certain short time period. For example, the length (data volume) of each frame is N_frame=256 points, and N_frame / 2 zeros are filled in front and behind the input signal array respectively. If the newly formed array cannot be divided by N_frame, additional zeros are filled in the back until the array can be divided by N_frame. After filling, each input signal is divided into a series of frames of the same length, and there is at least a partial overlap between two adjacent framed signals. Preferably, there is a 50% partial overlap between two adjacent frames.
[0062] In this embodiment, the step of windowing the framed signal includes: using a Hanning window to window the framed signal. The length of the Hanning window is N. The reasons and advantages of using the Hanning window are: the Hanning window function is a weighted function based on the cosine function, characterized by having smaller values at both ends of the sequence and larger values in the middle. This shape can reduce interference and leakage to the signal; the window function is smooth and can reduce the phenomenon of spectral line expansion. When processing partial discharge ultrasonic sampling signals, the effect of selecting the window function depends on many factors, including the characteristics of the signal, the required frequency resolution, the requirements for side lobes, and the tolerance for spectrum leakage. In the process of signal compression and reconstruction, it is important to consider that no additional signals can be generated after framing and reconnection of the frames.
[0063] The specific form of the Hanning window function is: W(n) = 0.5×(1-cos(2πn / (N-1))), where n represents the serial number of the window function and N represents the length of the window function. The time domain graph of the Hanning window function is divided into two parts, left and right, by the center line, and expressed in the form of a continuous function: W(x) left = 0.5×(1-cos(x)), x∈[0,π]; W(x) right = 0.5×(1-cos(x+π)), x∈[0,π]. The sum of the functions of the left and right parts of the Hanning window function remains 1. Because of this characteristic, in the process of data reconstruction, when the signal is reconnected in frames, the two frames of data overlap by 50%, and the addition result remains the same as the amplitude of the original signal, and no additional signal is produced. The sum of the 50% overlapping addition of the two frames before and after the Hanning window function satisfies: W(x) sum = W(x) left + W(x) right = 1, x∈[0,π].
[0064] After obtaining the windowed signal array, execute step S5, and perform discrete cosine transform on the windowed signal array to obtain the corresponding framed data array. Discrete cosine transform is performed on the windowed signal array to convert the signal from the time domain to the frequency domain. Discrete cosine transform is performed on each frame of data to obtain the corresponding spectrum coefficient. Through discrete cosine transform, the energy of the ultrasonic signal can be concentrated on a small number of spectrum coefficients, thereby achieving efficient compression of the signal. At the same time, discrete cosine transform has the advantages of rich signal spectral components and concentrated energy, and can achieve better signal enhancement effect at a lower computational complexity.
[0065] In this embodiment, a discrete cosine transform is performed using a windowed signal array in one of the variant forms of discrete cosine transform. Specifically, the frame data array is obtained by the following formula: Among them, x(n) is the windowed signal array; δ k1 is the Kronecker operator, which is specifically defined as: n is the data sequence number in the windowed signal array, n=1, 2, 3, ..., N_frame; k is the data sequence number in the framed data array, k=1, 2, 3, ..., n.
[0066] After obtaining the frame data array, step S6 is executed to quantize the frame data array to obtain a compressed data set consisting of data exceeding a preset threshold in each frame, and to obtain a position array of position numbers corresponding to the data in the compressed data set in the frame data array. The obtained frame data array is quantized and intercepted according to certain rules, thereby reducing the amount of data.
[0067] Since the sum of the energy of several large-value data in each sub-frame accounts for more than 85% of the total energy of the frame, the array composed of these data and the corresponding frequency point position information is used as effective compressed data for storage and transmission, which is sufficient to represent the original information of the partial discharge signal. For other frame data with no or very little energy, they can be discarded, thereby achieving rapid data compression.
[0068] In this embodiment, the steps of quantizing the frame data array to obtain a compressed data set composed of data exceeding a preset threshold in each frame, and obtaining a position array of position numbers corresponding to the data in the compressed data set in the frame data array include: taking the absolute value of each value in the frame data array to obtain an absolute value frame data array; sorting the absolute value frame data array in descending order, and recording the position information of each value in the frame data array after descending order; taking the modulus of the data in the frame data array in turn according to the position information to obtain the energy proportion of each data in the frame data array; if the energy proportion is greater than the preset threshold, the data is stored in the compressed data set. The preset threshold is a fixed parameter in the compression algorithm, and the recommended value range is 0.6 to 0.95. Preferably, the preset threshold is 0.85.
[0069] For example, suppose that after the above-mentioned frame data are subjected to DCT, the frame array formed is x_frame_DCT, and x_frame_DCT_i nd is the position information array of the array after the x_frame_DCT is sorted in descending order in the original array; then the frame data array is quantized to obtain a compressed data set composed of data exceeding a preset threshold in each frame, and the specific steps of obtaining the position array of the position numbers corresponding to the data in the compressed data set in the frame data array are as follows: take the absolute value of each value of the x_frame_DCT array, the expression is: abs(x_frame_DCT); sort the array obtained after taking the absolute value of each value of the x_frame_DCT array in descending order, and record the position information of the array after descending order in the original array, which is recorded as the x_frame_DCT_i nd array, the expression is: x_frame_DCT_i nd=sort(abs(x_frame_DCT),'descend'); according to x_frame_DCT_i nd nd array, from front to back, modulo the data in x_frame_DCT, the function expression is: norm(x_frame_DCT(i nd(1:n)), where n is the order number in the x_frame_DCT_i nd array; modulo all the data in x_frame_DCT, the function expression is: norm(x_frame_DCT); calculate the energy proportion successively, the ratio of norm(x_frame_DCT(ind(1:n)) to norm(x_frame_DCT) is the energy proportion. Compare the energy proportion calculated each time with the preset threshold, and stop the accumulation calculation when the result is no longer less than the preset threshold when accumulated to the n position, and the n at this moment is the obtained truncation point, so as to obtain the data with a larger energy proportion and store it in the compressed data set.
[0070] After the compressed data set and the position array are obtained, step S7 is executed to compress the compressed data set and the position array to obtain compressed data. After the compressed data is obtained, the data can be stored or transmitted to the receiving end.
[0071] When the compressed data needs to be restored, the compressed data needs to be reconstructed. In this embodiment, see Figure 4 When reconstructing the compressed data, first perform step S8 to reconstruct the discrete cosine transform array from the compressed data. First, construct an all-zero array with the same length as the original data, and then replace the data at the corresponding position in the all-zero array with the data in the compressed data set according to the position information in the position array, and keep the other positions as 0, and set the reconstructed discrete cosine transform array.
[0072] Then, step S9 is executed to perform an inverse discrete cosine transform on the discrete cosine transform array to obtain a time domain signal restoration array for each frame. A variant form in which the inverse discrete cosine transform (IDCT) and the discrete cosine transform (DCT) are inverse functions of each other is used to perform an inverse discrete cosine transform (IDCT) on the discrete cosine transform array to obtain a time domain signal restoration array. The algorithm expression is: Among them, y_DCT_reconstruct is the discrete cosine transform array, δ n1 is the Kronecker operator, which is specifically defined as: n is the data sequence number in the discrete cosine transform array, n=1, 2, 3, ..., N_frame; k is the data sequence number in the framed time domain signal restoration array y_decode_frame, k=1, 2, 3, ..., n.
[0073] After obtaining the time domain signal restoration array of each sub-frame, execute step S10 to connect all the time domain signal restoration arrays into a continuous time domain signal using a window function. Multiply each frame of the time domain signal restoration array by the window function, and add the 50% overlapping parts of each frame to construct a continuous time domain signal. Because the original input signal before the compression transformation is filled with N / 2 zeros in the front and back, the zero-valued data filled in the front and back are deleted after the reconstruction process.
[0074] After obtaining the continuous time domain signal, step S11 is executed to upsample the continuous time domain signal to obtain reconstructed original waveform data. The above-constructed continuous time domain signal is upsampled to obtain reconstructed original waveform data, and the upsampling rate is the same as the downsampling rate.
[0075] It should be noted that steps S1 to S7 in this embodiment are applied to a data sending end device, and steps S8 to S11 are applied to a data receiving end device.
[0076] As can be seen from the above, the compression and reconstruction method of the ultrasonic partial discharge signal of the present invention performs downsampling by denoising the partial discharge signal to reduce the amount of data. At the same time, framing and windowing convert the ultrasonic signal into a series of short-time stable signals, which is convenient for subsequent signal processing and improves the efficiency and accuracy of data processing. Next, the framed data array is quantized to obtain a compressed data set composed of data exceeding a preset threshold in each frame, and a position array of position numbers corresponding to the data in the compressed data set in the framed data array, and further obtain compressed data, thereby utilizing the high efficiency of discrete cosine transform and the characteristics of ultrasonic partial discharge signals, and under the premise of ensuring high fidelity of the signal, signal compression can achieve efficient compressed data, ensure efficient transmission of ultrasonic partial discharge signals between narrowband networks and low-power terminals, and ensure that the main features and detailed information of the signal will not be lost.
[0077] Computer device embodiment:
[0078] The computer device of this embodiment includes a controller, and when the controller executes a computer program, the steps in the above-mentioned ultrasonic partial discharge signal compression and reconstruction method embodiment are implemented.
[0079] For example, a computer program may be divided into one or more modules, one or more modules are stored in a memory and executed by a controller to implement the present invention. One or more modules may be a series of computer program instruction segments capable of implementing specific functions, and the instruction segments are used to describe the execution process of the computer program in a computer device.
[0080] The computer device may include, but is not limited to, a controller and a memory. Those skilled in the art will appreciate that the computer device may include more or fewer components, or a combination of certain components, or different components, for example, the computer device may also include input and output devices, network access devices, buses, etc.
[0081] For example, the controller may be a central processing unit (CPU), other general controllers, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general controller may be a microcontroller or any conventional controller, etc. The controller is the control center of the computer device, and uses various interfaces and lines to connect the various parts of the entire computer device.
[0082] The memory can be used to store computer programs and / or modules. The controller realizes various functions of the computer device by running or executing the computer programs and / or modules stored in the memory, and calling the data stored in the memory. For example, the memory may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as a sound receiving function, a sound conversion to text function, etc.), etc.; the data storage area may store data created according to the use of the mobile phone (such as audio data, text data, etc.), etc. In addition, the memory may include a high-speed random access memory, and may also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (FlashCard), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0083] Computer readable storage medium embodiment:
[0084] If the module integrated in the computer device of the above embodiment is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the implementation of all or part of the process in the above embodiment of the method for compressing and reconstructing ultrasonic partial discharge signals can also be completed by instructing related hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by the controller, the steps of the above embodiment of the method for compressing and reconstructing ultrasonic partial discharge signals can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in the form of source code, object code, executable file or some intermediate form. The storage medium can include: any entity or device that can carry computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media does not include electrical carrier signals and telecommunications signals.
[0085] It should be noted that the above are only preferred embodiments of the present invention, but the design concept of the invention is not limited thereto, and any non-substantial modifications made to the present invention using this concept also fall within the protection scope of the present invention.
Claims
1. A method for compressing and reconstructing ultrasonic partial discharge signals, characterized in that: include: Obtaining original ultrasonic partial discharge signal; Performing denoising processing on the original ultrasonic partial discharge signal to obtain a denoised partial discharge signal; Down-sampling the denoised partial discharge signal to obtain a down-sampled partial discharge signal; Performing frame processing on the down-sampled partial discharge signal to obtain a frame signal of a preset length, and performing windowing processing on the frame signal to obtain a windowed signal array; Performing discrete cosine transform on the windowed signal array to obtain a corresponding framed data array; Quantizing the frame data array to obtain a compressed data set consisting of data exceeding a preset threshold in each frame, and obtaining a position array of position numbers corresponding to the data in the compressed data set in the frame data array; The compressed data set and the position array are compressed to obtain compressed data.
2. The method for compressing and reconstructing ultrasonic partial discharge signals according to claim 1, characterized in that: The step of performing denoising processing on the original ultrasonic partial discharge signal comprises: The original ultrasonic partial discharge signal is denoised using a preset noise gate denoising algorithm.
3. The method for compressing and reconstructing ultrasonic partial discharge signals according to claim 2, characterized in that: The threshold of the preset noise gate denoising algorithm is twice the effective value of the original ultrasonic partial discharge signal.
4. The method for compressing and reconstructing ultrasonic partial discharge signals according to claim 1, characterized in that: The step of performing windowing processing on the framed signal comprises: A Hanning window is used to perform windowing processing on the frame signal.
5. The method for compressing and reconstructing ultrasonic partial discharge signals according to claim 1, characterized in that: The frame data array is obtained by the following formula: Wherein, x(n) is the windowed signal array; δ k1 is the Kronecker operator, which is specifically defined as: n is the data sequence number in the windowed signal array, n=1, 2, 3, ..., N_frame; k is the data sequence number in the framed data array, k=1, 2, 3, ..., n.
6. The method for compressing and reconstructing ultrasonic partial discharge signals according to any one of claims 1 to 5, characterized in that: The steps of quantizing the frame data array to obtain a compressed data set consisting of data exceeding a preset threshold in each frame, and obtaining a position array of position numbers corresponding to the data in the compressed data set in the frame data array include: Taking the absolute value of each value of the frame data array to obtain an absolute value frame data array; Sorting the absolute value frame data array in descending order, and recording the position information of each value in the frame data array after descending order; According to the position information, the data in the frame data array are processed modulo in sequence to obtain the energy proportion of each data in the frame data array; If the energy proportion is greater than the preset threshold, the data is stored in the compressed data set.
7. The method for compressing and reconstructing ultrasonic partial discharge signals according to any one of claims 1 to 5, characterized in that: After the step of obtaining compressed data, it also includes: reconstructing a discrete cosine transform array from the compressed data; Performing an inverse discrete cosine transform on the discrete cosine transform array to obtain a time domain signal restoration array for each frame. Connecting all the time domain signal restoration arrays into a continuous time domain signal using a window function; The continuous time domain signal is up-sampled to obtain reconstructed original waveform data.
8. A computer device comprising a processor and a memory, characterized in that: The memory stores a computer program, and when the computer program is executed by the processor, the steps of the method for compressing and reconstructing ultrasonic partial discharge signals according to any one of claims 1 to 7 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a controller, the steps of the method for compressing and reconstructing ultrasonic partial discharge signals according to any one of claims 1 to 7 are implemented.