Micro-defect ultrasonic detection signal processing method, electronic device and readable storage medium
Through the combination of relative entropy optimization variational mode decomposition and improved wavelet algorithm, the micro-defect ultrasonic signal was successfully extracted and denoised from the noise, solving the problem of low signal-to-noise ratio and significantly improving the accuracy of defect recognition.
Patent Information
- Application Number
- CN202211163336.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-23
- Publication Date
- 2024-11-19
- Estimated Expiration
- 2042-09-23
AI Technical Summary
The prior art is difficult to effectively extract the micro-defect ultrasonic detection signal from the noise signal and improve the signal-to-noise ratio, resulting in the problem of lowering the defect echo amplitude and increasing the noise.
The micro-defect ultrasonic detection signal is decomposed by the relative entropy optimization variational mode decomposition algorithm. Combined with the improved lifting wavelet algorithm and a new threshold function, the signal is denoised, and the signal is improved through superposition and wavelet inverse transformation. Compare.
The signal-to-noise ratio of micro-defect ultrasonic signals is significantly improved, the noise component is suppressed, and the accuracy of identification of defect location and size is improved. The noise reduction effect is better than that of traditional soft threshold and hard threshold functions.
Smart Images

Figure CN115656317B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of nondestructive testing, and in particular to a method for processing micro-defect ultrasonic detection signals. Background Art
[0002] Ultrasonic testing refers to a non-destructive flaw detection method that uses ultrasonic waves to inspect internal defects of metal components. Ultrasonic waves are emitted to the surface of the component through a coupling agent using a transmitting probe. When the ultrasonic wave propagates inside the component, it will produce different reflection signals when it encounters different interfaces. The time difference between the different reflection signals transmitted to the probe can be used to detect the defects inside the component.
[0003] After workpiece processing, the surface will have unevenness with small spacing and tiny peaks and valleys, which is called surface roughness. The ultrasonic detection signal of micro-defects is generated by the superposition of the background noise signal caused by the surface roughness of the workpiece and the micro-defect signal. The existence of the surface roughness of the workpiece will reduce the amplitude of the defect echo and enhance the noise signal. How to effectively extract and identify the micro-defect signal from the noise signal and improve the signal-to-noise ratio has always been an urgent problem to be solved. Summary of the invention
[0004] In order to avoid and overcome the technical problems existing in the prior art, the present invention provides a method for processing micro-defect ultrasonic detection signals, which can effectively extract and identify micro-defect signals from noise signals and improve the signal-to-noise ratio.
[0005] To achieve the above object, the present invention provides the following technical solutions:
[0006] The method for processing micro-defect ultrasonic detection signals comprises the following steps:
[0007] S1. Build a testing platform and detect and obtain ultrasonic testing signals for micro-defects;
[0008] S2, using relative entropy to optimize the variational mode decomposition algorithm;
[0009] S3, using the variational mode decomposition algorithm optimized in step S2 to decompose the micro-defect ultrasonic detection signal to obtain K-layer eigenmode components;
[0010] S4. Superimpose the effective eigenmode components and process the superimposed signal using an improved threshold function.
[0011] As a further solution of the present invention: in step S4, the superimposed modal component is decomposed by M-layer lifting wavelet using the lifting wavelet mother function to obtain the M-th layer approximate component of the lifting wavelet coefficient and the first to M-th layers of detail components, and the detail components are processed by the improved threshold function and reconstructed to obtain the denoised micro-defect ultrasonic signal;
[0012] Among them, the improved threshold function is:
[0013]
[0014] wherein
[0015] β is the wavelet transform operator;
[0016] H is the length of the detail component vector of the wavelet coefficients at the m-th layer;
[0017] j is the number of wavelet decomposition layers;
[0018] σ is the noise variance;
[0019] G is the threshold.
[0020] As a further solution of the present invention: S21, the relative entropy calculation formula is as follows:
[0021]
[0022] where p(x i ) is the probability distribution of the real data, and q(x i ) is the theoretical probability distribution;
[0023] S22, the implementation process of the variational mode decomposition algorithm is as follows:
[0024] S221, initialization λ 1 and the value of n are set to 0;
[0025] where:
[0026] is the first mode function obtained by decomposing the original signal by empirical mode decomposition;
[0027] is the central frequency of the first mode function;
[0028] λ 1 is the Lagrange multiplier;
[0029] n represents a constant;
[0030] S222, let n = n + 1, and execute the entire loop;
[0031] S223, let k = 0, k = k + 1, when k < K, execute the inner loop 1, and update u k as:
[0032]
[0033] where: k is the number of decomposed mode functions;
[0034] S224. Let \(k = 0\), \(k=k + 1\). When \(k < K\), execute the inner loop 2 to update \(\omega\). k It is:
[0035]
[0036] S225. Update \(\lambda\) to be:
[0037]
[0038] S226. Repeat steps S222 - S225 until the iteration stop condition is met:
[0039] The loop ends, and output each obtained IMF component;
[0040] S23. Optimize the variational mode decomposition algorithm;
[0041] S231. Fix the penalty factor \(\alpha\), set the initial value and value range of \(K\), perform variational mode decomposition on the original signal, calculate the relative entropy of the finite - width intrinsic mode components after decomposition, and take the \(K\) value corresponding to the minimum relative entropy;
[0042] S232. Set the value range of the penalty factor \(\alpha\), calculate the minimum relative entropy of the finite - width intrinsic mode components again, determine the optimal penalty factor \(\alpha\), and complete the parameter setting of the relative - entropy - optimized variational mode decomposition algorithm.
[0043] As a further solution of the present invention: In step S4, the first - layer and third - layer intrinsic mode components are superimposed, and the calculation formula of the superimposed signal is: \(x=\text{imf}1+\text{imf}3\);
[0044] where \(\text{imf}1\) represents the first - layer intrinsic mode component;
[0045] \(\text{imf}3\) represents the third - layer intrinsic mode component.
[0046] An electronic device, characterized in that it includes a processor, an input device, an output device, and a memory. The processor, input device, output device, and memory are connected in sequence. The memory is used to store a computer program, and the computer program includes program instructions. The processor is configured to call the program instructions to execute the micro - defect ultrasonic detection signal processing method.
[0047] A readable storage medium, characterized in that the storage medium stores a computer program, and the computer program includes program instructions. When the program instructions are executed by a processor, the processor is caused to execute the micro - defect ultrasonic detection signal processing method.
[0048] Compared with the prior art, the beneficial effects of the present invention are:
[0049] 1. The present invention combines relative entropy optimized variational modal decomposition with an improved lifting wavelet algorithm. First, the micro-defect ultrasonic signal is decomposed into several modal components by using the relative entropy optimized variational modal decomposition algorithm, and the first and third layers of modal components are superimposed. The superimposed signal is denoised using the lifting wavelet algorithm after the improved threshold, which greatly improves the signal-to-noise ratio of the micro-defect ultrasonic signal, suppresses the noise component, and improves the accuracy of identifying the defect position and size.
[0050] 2. Due to the discontinuity of the hard threshold function and the constant deviation of the soft threshold function, the reconstructed signal after denoising has a low precision. The present invention constructs a new threshold function. After simulation and actual test comparison, it not only retains the advantage of good continuity of the soft threshold function, but also overcomes the disadvantage of its constant deviation. The lifting wavelet algorithm of the improved threshold function is used to perform superimposed signal denoising, and then the inverse wavelet transform is performed to obtain a reconstructed signal with a high signal-to-noise ratio and obvious defect echo. The denoising effect is significantly better than the denoising effect of the soft threshold function and the hard threshold function. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] Figure 1 It is a structural schematic diagram of the present invention.
[0052] Figure 2 It is a schematic diagram comparing the simulation effects of the hard threshold function, the soft threshold function and the improved threshold function in the present invention.
[0053] Figure 3 The figure is a comparison diagram of the signal processing effects of the present invention and the existing solution.
[0054] In the figure: 1. Host computer; 2. Ultrasonic controller; 3. Ultrasonic probe; 4. Workpiece to be tested; 5. Defect; DETAILED DESCRIPTION
[0055] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0056] See also Figures 1 to 3 In an embodiment of the present invention, a method for processing micro-defect ultrasonic detection signals comprises the following steps:
[0057] S1. Build a testing platform and detect and obtain ultrasonic testing signals for micro-defects;
[0058] The detection platform includes a workpiece 4 to be measured and an ultrasonic probe 3 arranged on the workpiece 4 to be measured, wherein a coupling agent is pre-coated on the contact surface between the ultrasonic probe 3 and the workpiece 4 to be measured. The ultrasonic probe 3, the ultrasonic controller 2 and the upper computer 1 are connected in sequence through connecting wires, and ultrasonic signal processing software is pre-installed in the upper computer 1, so as to obtain ultrasonic detection signals in real time during detection.
[0059] S2. Optimize the variational mode decomposition algorithm using relative entropy;
[0060] S21. The relative entropy calculation formula is as follows:
[0061]
[0062] where p(x i ) is the probability distribution of the real data, and q(x i ) is the theoretical probability distribution;
[0063] The closer the two sets of data are, the smaller the relative entropy; the greater the difference in the distribution of the two sets of data, the greater the relative entropy.
[0064] S22. The implementation process of the variational mode decomposition algorithm is as follows:
[0065] S221. Initialization λ 1 and the value of n, and set them to 0;
[0066] where:
[0067] is the first mode function obtained by empirical mode decomposition of the original signal;
[0068] is the central frequency of the first mode function;
[0069] λ 1 is the Lagrange multiplier;
[0070] n represents a constant;
[0071] S222. Let n = n + 1 and execute the entire loop;
[0072] S223. Let k = 0, k = k + 1. When k < K, execute the inner loop 1 and update u k as:
[0073]
[0074] where: k is the number of decompositions of the mode function;
[0075] S224. Let k = 0, k = k + 1. When k < K, execute the inner loop 2 and update ω k as:
[0076]
[0077] S225, update λ to:
[0078]
[0079] S226, repeat steps S222 to S225 until the iteration stop condition is met:
[0080] At the end of the loop, the obtained IMF components are output;
[0081] S23, when optimizing the variational mode decomposition algorithm;
[0082] S231, fix the penalty factor α, set the initial value and value range of K, perform variational mode decomposition on the original signal, calculate the relative entropy of the finite width intrinsic mode component after decomposition, and take the K value corresponding to the minimum relative entropy;
[0083] S232, setting the value range of the penalty factor α, calculating again to obtain the minimum relative entropy of the finite width intrinsic mode component, determining the optimal penalty factor α, and completing the relative entropy optimization variational mode decomposition algorithm parameters.
[0084] Among them, the preferred values are K=3, α=150.
[0085] S3, using the variational mode decomposition algorithm optimized in step 2 to decompose the micro-defect ultrasonic detection signal to obtain K-layer eigenmode components;
[0086] S4. Superimpose the effective eigenmode components and process the superimposed signal using an improved threshold function.
[0087] The first and third layers of eigenmode components are superimposed.
[0088] The calculation formula of the superposition signal is: x = imf1 + imf3;
[0089] Where imf1 represents the first layer eigenmode component;
[0090] imf3 represents the third layer intrinsic mode component.
[0091] This scheme preferably adopts the lifting wavelet mother function, performs M-layer lifting wavelet decomposition on the superimposed modal components, obtains the M-th layer approximate components of the lifting wavelet coefficients and the first to M-th layers of detail components, processes the detail components with an improved threshold function and reconstructs the denoised micro-defect ultrasonic signal.
[0092] according to Figure 3It can be seen that, compared with the original signal, the signal noise reduction effect of the present invention is obvious.
[0093] The lifting wavelet mother function is the db5 wavelet mother function in the Daubechies series of wavelets, and the number of decomposition levels is 4.
[0094] The improved threshold function is:
[0095]
[0096] in
[0097] β is the wavelet transform operator;
[0098] H is the length of the detail component vector of the wavelet coefficients at the mth layer;
[0099] j is the number of wavelet decomposition levels;
[0100] σ is the noise variance;
[0101] G is the threshold.
[0102] The size of the defect is determined based on the amplitude of the micro-defect ultrasonic detection signal obtained after denoising, and the location of the defect is determined based on the flight time of the micro-defect ultrasonic detection signal relative to the interface wave obtained after denoising.
[0103] Depend on Figure 2 It can be seen that the new threshold function of the present invention not only retains the advantage of good continuity of the soft threshold function, but also overcomes the disadvantage of its constant deviation. The denoising effect is significantly better than that of the soft threshold function and the hard threshold function.
[0104] Another embodiment of the present application is an electronic device.
[0105] The electronic device may be the mobile device itself, or a stand-alone device independent of the mobile device, which may communicate with the mobile device to receive the collected input signals from the mobile device and send the selected target decision behavior to the mobile device.
[0106] An electronic device includes one or more processors and memory.
[0107] The processor may be a central processing unit (CPU) or other forms of processing units having data processing capabilities and / or instruction execution capabilities, and may control other components in the electronic device to perform desired functions.
[0108] The memory may include one or more computer program products, and the computer program product may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, a random access memory (RAM) and / or a cache memory (cache), etc. The non-volatile memory may include, for example, a read-only memory (ROM), a hard disk, a flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor may execute the program instructions to implement the signal processing method of each embodiment of the present application described above.
[0109] In one example, the electronic device may further include: an input device and an output device, and these components are interconnected through a bus system and / or other forms of connection mechanisms. For example, the input device may include various devices such as an on-board diagnostic system (OBD), a camera, an industrial camera, etc. The input device may also include, for example, a keyboard, a mouse, etc. The output device may include, for example, a display, a speaker, a printer, and a communication network and a remote output device connected thereto, etc.
[0110] In addition, the electronic device may further include any other appropriate components according to specific application scenarios.
[0111] Another embodiment of the present application may also be a computer program product, which includes computer program instructions, and when the computer program instructions are executed by a processor, the processor executes the signal processing method steps according to various embodiments of the present application described in the above signal processing method part of this specification.
[0112] The computer program product may be written in any combination of one or more programming languages to write program codes for performing the operations of the embodiments of the present application, including object-oriented programming languages, such as Java, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as an independent software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server.
[0113] In addition, an embodiment of the present application may also be a computer-readable storage medium on which computer program instructions are stored. When the computer program instructions are executed by a processor, the processor executes the signal processing method in this specification.
[0114] The computer readable storage medium can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can include, for example, but is not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0115] The basic principles of the present application are described above in conjunction with specific embodiments. However, it should be noted that the advantages, strengths, effects, etc. mentioned in the present application are only examples and not limitations, and it cannot be considered that these advantages, strengths, effects, etc. are required by each embodiment of the present application. In addition, the specific details disclosed above are only for the purpose of illustration and ease of understanding, not for limitation, and the above details do not limit the present application to being implemented by adopting the above specific details.
[0116] The block diagrams of the devices, apparatuses, equipment, and systems involved in this application are only illustrative examples and are not intended to require or imply that they must be connected, arranged, and configured in the manner shown in the block diagram. As will be appreciated by those skilled in the art, these devices, apparatuses, equipment, and systems can be connected, arranged, and configured in any manner. Words such as "including", "comprising", "having", etc. are open words, referring to "including but not limited to", and can be used interchangeably with them. The words "or" and "and" used here refer to the words "and / or" and can be used interchangeably with them, unless the context clearly indicates otherwise. The words "such as" used here refer to the phrase "such as but not limited to", and can be used interchangeably with them.
[0117] It should also be noted that in the apparatus, device and method of the present application, each component or each step can be decomposed and / or recombined. Such decomposition and / or recombination should be regarded as equivalent solutions of the present application.
[0118] The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use the present application. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein may be applied to other aspects without departing from the scope of the present application. Therefore, the present application is not intended to be limited to the aspects shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
[0119] The above description has been given for the purpose of illustration and description. In addition, this description is not intended to limit the embodiments of the present application to the forms disclosed herein. Although multiple example aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, changes, additions and sub-combinations thereof.
Claims
1. A method for processing micro-defect ultrasonic detection signals, characterized in that: The steps include: S1. Build a testing platform and detect and obtain ultrasonic testing signals for micro-defects; S2, using relative entropy to optimize the variational mode decomposition algorithm; S21. The relative entropy calculation formula is as follows: Among them, p(x i ) is the probability distribution of the real data, q(x i ) is the theoretical probability distribution; S22. The implementation process of the variational mode decomposition algorithm is as follows: S221, Initialization λ 1 and the value of n, set it to 0; in: is the first mode function obtained by empirical mode decomposition of the original signal; is the center frequency of the first mode function; λ 1 is the Lagrange multiplier; n represents a constant; S222, let n=n+1, execute the whole loop; S223. Let \(k = 0\), \(k=k + 1\). When \(k < K\), execute the inner loop 1 to update \(u\). k It is as follows: Where: k is the number of decompositions of the modal function; S224. Let \(k = 0\), \(k=k + 1\). When \(k < K\), execute the inner loop 2 to update \(\omega\). k It is: S225, update λ to: S226, repeat steps S222 to S225 until the iteration stop condition is met: At the end of the loop, the obtained IMF components are output; Among them, u k represents the mode function obtained by empirical mode decomposition of the original signal; L represents the optimization objective function including the relative entropy term; ω k Represents the center frequency of the mode function obtained by empirical mode decomposition of the original signal; λ represents the updated Lagrange multiplier; ε represents the set iteration stop threshold; S23, optimizing the variational mode decomposition algorithm; S231, fix the penalty factor α, set the initial value and value range of K, perform variational mode decomposition on the original signal, calculate the relative entropy of the finite width intrinsic mode component after decomposition, and take the K value corresponding to the minimum relative entropy; S232, setting the value range of the penalty factor α, calculating again to obtain the minimum relative entropy of the finite width intrinsic mode component, determining the optimal penalty factor α, and completing the relative entropy optimization variational mode decomposition algorithm parameters; S3, using the variational mode decomposition algorithm optimized in step S2 to decompose the micro-defect ultrasonic detection signal to obtain K-layer eigenmode components; S4, superimposing the effective eigenmode components, and processing the superimposed signal using an improved threshold function; In step S4, the lifting wavelet mother function is used to perform M-layer lifting wavelet decomposition on the superimposed modal component to obtain the M-th layer approximate component of the lifting wavelet coefficient and the first to M-th layer detail components, and the detail components are processed by the improved threshold function and reconstructed to obtain the denoised micro-defect ultrasonic signal; Among them, the improved threshold function is: in β is the wavelet transform operator; H is the length of the detail component vector of the wavelet coefficients at the mth layer; j is the number of wavelet decomposition levels; σ is the noise variance; G is the threshold.
2. The method for processing micro-defect ultrasonic detection signals according to claim 1, characterized in that: In step S4, the first layer and the third layer eigenmode components are superimposed, and the calculation formula of the superimposed signal is: x=imf1+imf3; Where imf1 represents the first layer eigenmode component; imf3 represents the third layer intrinsic mode component.
3. An electronic device, characterized in that: The method comprises a processor, an input device, an output device and a memory, wherein the processor, the input device, the output device and the memory are connected in sequence, the memory is used to store a computer program, the computer program comprises program instructions, and the processor is configured to call the program instructions to execute the method for processing micro-defect ultrasonic detection signals as claimed in claim 1.
4. A readable storage medium, characterized in that: The storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a processor, the processor executes the micro-defect ultrasonic detection signal processing method according to claim 1.
