Ultrasonic detection method and device, electronic equipment and storage medium
By performing transmission compensation and sensitivity compensation on ultrasonic signals and mapping them to the audible acoustic signal spectrum, the problem of ultrasonic features loss in the prior art is solved, and the accurate reflection of the acoustic signals on ultrasonic signal characteristics is achieved, effectively assisting detection.
Patent Information
- Application Number
- CN202510239423.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-28
- Publication Date
- 2025-05-30
AI Technical Summary
When the prior art converts ultrasonic signals into audible sound, ultrasonic features are lost, resulting in the audible sound that cannot reflect the characteristics of the ultrasonic signal and cannot effectively assist in detecting gas leakage or local discharge.
By converting the ultrasonic time domain signal into a frequency domain signal, transmission compensation and sensitivity compensation are performed, the target ultrasonic spectrum is obtained and mapped to the audible acoustic signal spectrum, so that the audible acoustic signal can accurately reflect the characteristics of the ultrasonic signal.
The audible acoustic signal can accurately reflect the characteristics of the ultrasonic signal, so that the audible acoustic signal is not distorted, and can effectively assist in the detection of gas leakage or local discharge.
Smart Images

Figure CN120063481A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of acoustic wave detection technology, and particularly relates to an ultrasonic detection method, device, electronic device, and storage medium. Background Art
[0002] In practical applications, an acoustic imaging device (such as an acoustic imager) converts the collected ultrasonic waves into a visual image to detect the gas leakage amount, leakage location, and leakage type of a pipeline gas, or to detect the partial discharge amount, discharge location, and discharge type of a wire.
[0003] Since the detection personnel may not be able to pay attention to the visual image in real time, or the detection accuracy of simply converting it into a visual image is not high, problems such as missed detection or misdetection are likely to occur. Therefore, it is crucial to convert ultrasonic waves into audible sounds and assist in detecting gas leakage or partial discharge by analyzing the audible sounds.
[0004] Currently, in related technologies, ultrasonic signals are usually modulated and down-converted to audible sounds. However, this method causes the loss of ultrasonic characteristics during conversion, resulting in the audible sound not being able to reflect the signal characteristics of the ultrasonic wave (that is, the audible sound is not distorted), and it is impossible to effectively assist detection by analyzing the audible sound. Summary of the Invention
[0005] In view of this, embodiments of this application provide an ultrasonic detection method, device, electronic device, and storage medium to enable the audible sound to accurately reflect the signal characteristics of the ultrasonic wave (that is, the audible sound is not distorted), and to effectively assist in detecting gas leakage or partial discharge, etc.
[0006] Embodiments of this application provide an ultrasonic detection method, which is applied to an acoustic imaging device, and the method includes:
[0007] Convert the ultrasonic time-domain signal collected in the current time window into an ultrasonic frequency-domain signal;
[0008] According to the amplitudes and frequencies corresponding to each spectral line in the first frequency band in the ultrasonic frequency-domain signal, perform transmission compensation on the ultrasonic frequency-domain signal to obtain a compensated ultrasonic frequency spectrum; the transmission compensation is used to compensate for the attenuation caused by transmission;
[0009] When it is determined to perform sensitivity compensation, based on the frequencies corresponding to each spectral line in the compensated ultrasonic frequency spectrum, perform sensitivity compensation on the compensated ultrasonic frequency spectrum to obtain a target ultrasonic frequency spectrum; the sensitivity compensation is used to compensate for the amplitude measurement error caused by frequency fluctuation;
[0010] Map the target ultrasonic frequency spectrum to an audible sound signal frequency spectrum, where a first frequency band corresponding to the target ultrasonic frequency spectrum is different from a second frequency band corresponding to the audible sound signal frequency spectrum;
[0011] Obtain an audible sound signal in the time domain based on the audible sound signal frequency spectrum.
[0012] An embodiment of the present application further provides an ultrasonic detection device, which is applied to an acoustic imaging device. The device includes:
[0013] A first conversion module, configured to convert an ultrasonic time-domain signal collected in a current time window into an ultrasonic frequency-domain signal;
[0014] A first compensation module, configured to perform transmission compensation on the ultrasonic frequency-domain signal according to the amplitudes and frequencies corresponding to each spectral line in a first frequency band in the ultrasonic frequency-domain signal, to obtain a compensated ultrasonic frequency spectrum; the transmission compensation is used to compensate for attenuation caused by transmission;
[0015] A second compensation module, configured to perform sensitivity compensation on the compensated ultrasonic frequency spectrum based on the frequencies corresponding to each spectral line in the compensated ultrasonic frequency spectrum when it is determined to perform sensitivity compensation, to obtain a target ultrasonic frequency spectrum; the sensitivity compensation is used to compensate for amplitude measurement errors caused by frequency fluctuations; the attenuation of the acquisition accuracy of the acoustic imaging device;
[0016] A second conversion module, configured to map the target ultrasonic frequency spectrum to an audible sound signal frequency spectrum, where a first frequency band corresponding to the target ultrasonic frequency spectrum is different from a second frequency band corresponding to the audible sound signal frequency spectrum;
[0017] An obtaining module, configured to obtain an audible sound signal in the time domain based on the audible sound signal frequency spectrum.
[0018] An embodiment of the present application further provides an electronic device, including: a processor and a memory for storing computer program instructions. When the computer program instructions are run by the processor, the processor is caused to execute the steps of the above method.
[0019] An embodiment of the present application further provides a machine-readable storage medium, which stores computer program instructions. When the computer program instructions are executed, the steps of the above method can be implemented.
[0020] As can be seen from the above technical solutions, in the embodiments of the present application, by converting the ultrasonic time-domain signal into an ultrasonic frequency-domain signal, and according to the amplitudes and frequencies corresponding to each spectral line in the first frequency band in the ultrasonic frequency-domain signal, transmission compensation and sensitivity compensation are performed on the ultrasonic frequency-domain signal to obtain a target ultrasonic spectrum representing the ultrasonic signal characteristics in the first frequency band. Then, through spectrum mapping, the target ultrasonic spectrum is converted into an audible sound signal spectrum in the second frequency band. This spectrum mapping method maps the ultrasonic signal characteristics onto the audible sound signal spectrum, so that the audible sound signal spectrum carries the ultrasonic signal characteristics of the target ultrasonic spectrum. After obtaining the audible sound signal in the time domain based on the audible sound signal spectrum, the audible sound signal can accurately reflect the signal characteristics of the ultrasonic time-domain signal. The audible sound is not distorted, so that the user can effectively assist detection based on the accurate audible sound signal.
[0021] Further, after obtaining the ultrasonic frequency-domain signal, according to the amplitudes and frequencies corresponding to each spectral line in the first frequency band in the ultrasonic frequency-domain signal, transmission compensation is performed on the ultrasonic frequency-domain signal to compensate for the attenuation caused by transmission. And when it is determined to perform sensitivity compensation, based on the frequencies corresponding to each spectral line in the compensated ultrasonic spectrum, sensitivity compensation is performed on the compensated ultrasonic spectrum. In this way, the measurement errors caused by transmission and the measurement environment are compensated, so that the obtained target ultrasonic spectrum can also more accurately reflect the ultrasonic signal characteristics of the ultrasonic frequency-domain signal in the first frequency band, so that the audible sound signal can accurately reflect the signal characteristics of the ultrasonic time-domain signal, and the finally obtained audible sound signal is more undistorted and can better assist detection.
[0022] Furthermore, since the first frequency band and the second frequency band can be set according to specific application scenarios, this enables the conversion of ultrasonic waves in any frequency band into audible sounds for the human ear according to requirements, improving the adaptability of this method. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] The accompanying drawings here are incorporated into the specification and form a part of the specification, showing embodiments consistent with the present application, and are used together with the specification to explain the principles of the present application.
[0024] Figure 1 It is a schematic flowchart of the ultrasonic detection method provided by the embodiments of the present application;
[0025] Figure 2 It is a schematic flowchart of mapping the target ultrasonic spectrum to the audible sound signal spectrum provided by the embodiments of the present application;
[0026] Figure 3 It is another schematic flowchart of the method provided by the embodiments of the present application;
[0027] Figure 4Schematic diagram of the device provided by the embodiment of the present application;
[0028] Figure 5 Schematic diagram of the hardware structure of the electronic device provided by the embodiment of the present application. Detailed implementation manners
[0029] In order to enable those skilled in the art to better understand the technical solutions provided by the embodiments of the present application and make the above-mentioned objects, features, and advantages of the embodiments of the present application more obvious and understandable, the technical solutions in the embodiments of the present application will be further described in detail below with reference to the accompanying drawings.
[0030] The technical solutions in the embodiments of the present application will be further described in detail below with reference to the accompanying drawings.
[0031] See Figure 1 , Figure 1 which is a schematic flowchart of the ultrasonic detection method provided by the embodiment of the present application. This method is applied to an acoustic imaging device. In this embodiment, the acoustic imaging device can be an acoustic imager, etc., and the present application does not limit this.
[0032] As Figure 1 shown, this process may include the following steps:
[0033] S101, convert the ultrasonic time-domain signal collected in the current time window into an ultrasonic frequency-domain signal.
[0034] In this embodiment, the duration of the current time window is determined by the sampling frequency and the number of sampling points of the acoustic imaging device. When specifically implemented, the duration of the current time window is calculated by the following formula:
[0035] t = N / fs
[0036] where N is the number of sampling points;
[0037] fs is the sampling frequency of the acoustic imaging device.
[0038] The specific implementation manner of converting the ultrasonic time-domain signal into the ultrasonic frequency-domain signal in the above step S101 may be: converting the ultrasonic time-domain signal into the ultrasonic frequency-domain signal through Fourier transform.
[0039] For example, if the ultrasonic time-domain signal is a time-domain discrete signal and is denoted as x(n), and the ultrasonic frequency-domain signal is denoted as X(k), the specific process of converting the ultrasonic time-domain signal into the ultrasonic frequency-domain signal can be expressed by the following formula:
[0040]
[0041] where N is the sampling point corresponding to the current time window;
[0042] k is any frequency point in the ultrasonic frequency-domain signal;
[0043] X(k) represents the amplitude at the frequency point k.
[0044] It should be noted that one frequency point represents a frequency f, and the conversion relationship between the frequency and the frequency point is f = k / N. The frequency point k also corresponds to the k-th spectral line of the ultrasonic frequency-domain signal.
[0045] S102, perform transmission compensation on the ultrasonic frequency-domain signal according to the amplitudes and frequencies corresponding to the spectral lines in the first frequency band of the ultrasonic frequency-domain signal, and obtain the compensated ultrasonic frequency spectrum.
[0046] In this embodiment, the first frequency band is a high-frequency band that meets the high-frequency requirements. For example, 25 kHz - 35 kHz, which can be determined according to the specific application scenario and is not specifically limited in this application. For the convenience of subsequent description, the first frequency band is denoted as f 11 to f 12 . f 11 , f 12 correspond to the frequency points k 11 , k 12 respectively.
[0047] In this embodiment, the spectrum of the ultrasonic frequency-domain signal in the first frequency band is X(k), k ∈ (k 11 , k 12 ). In subsequent descriptions, it can also be expressed by the following formula:
[0048] X 1 (k 1 ) = X(k), k = k 11 , k 11 +1, …, k 12
[0049] where k 1 = k - k 11 , that is, k 1 ∈ (0, k 12 - k 11 ).
[0050] In this embodiment, considering that the greater the gas leakage or the more serious the electric leakage, the more concentrated the frequency distribution, and the attenuation of signals with different frequencies during propagation in the medium is different, transmission compensation is required. Transmission compensation is used to compensate for the attenuation caused by transmission. The specific implementation method of transmission compensation will be described later and will not be elaborated here.
[0051] S103. When it is determined to perform sensitivity compensation, based on the frequencies corresponding to the spectral lines in the compensated ultrasonic frequency spectrum, perform sensitivity compensation on the compensated ultrasonic frequency spectrum to obtain the target ultrasonic frequency spectrum. The sensitivity compensation is used to compensate for the amplitude measurement error caused by frequency fluctuations.
[0052] In this embodiment, when it is determined not to perform sensitivity compensation, directly determine the compensated ultrasonic frequency spectrum as the target ultrasonic frequency spectrum.
[0053] As can be seen from the above description, before performing sensitivity compensation, it is necessary to determine whether to perform sensitivity compensation. As for the specific implementation method of determining whether to perform sensitivity compensation, it will be described later and will not be elaborated here.
[0054] In this embodiment, considering that the fluctuation of ultrasound will affect the acquisition accuracy and stability of the acoustic imaging device and cause amplitude measurement errors, sensitivity compensation is required. As for the specific implementation method of sensitivity compensation, it will be described later and will not be elaborated here.
[0055] S104. Map the target ultrasonic frequency spectrum to the audible sound signal frequency spectrum. The first frequency band corresponding to the target ultrasonic frequency spectrum is different from the second frequency band corresponding to the audible sound signal frequency spectrum.
[0056] In this embodiment, the second frequency band is a set frequency band of audible sound. For example, 5 kHz - 15 kHz, which can be determined according to the specific application scenario and is not specifically limited in this application. For the convenience of subsequent description, the second frequency band is denoted as f 21 to f 22 . f 21 、f 22 respectively correspond to the frequency points k 21 、k 22 .
[0057] In this embodiment, the specific implementation method of mapping the target ultrasonic frequency spectrum to the audible sound signal frequency spectrum will be described later and will not be elaborated here.
[0058] S105. Based on the audible sound signal frequency spectrum, obtain the audible sound signal in the time domain.
[0059] In this embodiment, the specific implementation method of obtaining the audible sound signal in the time domain based on the audible sound signal frequency spectrum will be described later and will not be elaborated here.
[0060] So far, the Figure 1 shown process is completed.
[0061] Through Figure 1The process shown converts the ultrasonic time-domain signal into an ultrasonic frequency-domain signal. According to the amplitudes and frequencies corresponding to each spectral line in the first frequency band of the ultrasonic frequency-domain signal, transmission compensation and sensitivity compensation are performed on the ultrasonic frequency-domain signal to obtain a target ultrasonic spectrum characterizing the ultrasonic signal features in the first frequency band. Then, through spectral mapping, the target ultrasonic spectrum is converted into an audible sound signal spectrum in the second frequency band. This spectral mapping method maps the ultrasonic signal features onto the audible sound signal spectrum, enabling the audible sound signal spectrum to carry the ultrasonic signal features of the target ultrasonic spectrum. After obtaining the audible sound signal in the time domain based on the audible sound signal spectrum, the audible sound signal can accurately reflect the signal features of the ultrasonic time-domain signal. The audible sound is not distorted, so that the user can effectively assist in detection based on the accurate audible sound signal.
[0062] Furthermore, after obtaining the ultrasonic frequency-domain signal, according to the amplitudes and frequencies corresponding to each spectral line in the first frequency band of the ultrasonic frequency-domain signal, transmission compensation is performed on the ultrasonic frequency-domain signal to compensate for the attenuation caused by transmission. And when determining to perform sensitivity compensation, based on the frequencies corresponding to each spectral line in the compensated ultrasonic spectrum, sensitivity compensation is performed on the compensated ultrasonic spectrum. In this way, the measurement errors caused by transmission and the measurement environment are compensated, enabling the obtained target ultrasonic spectrum to more accurately reflect the ultrasonic signal features of the ultrasonic frequency-domain signal in the first frequency band, enabling the audible sound signal to accurately reflect the signal features of the ultrasonic time-domain signal, making the finally obtained audible sound signal less distorted and better able to assist in detection.
[0063] Still further, since the first frequency band and the second frequency band can be set according to specific application scenarios, this enables the conversion of ultrasonic waves in any frequency band into audible sounds by the human ear, improving the adaptability of this method.
[0064] The following elaborates in detail on the specific implementation method of the above-mentioned transmission compensation:
[0065] When specifically implementing transmission compensation, the specific implementation method can be: for each spectral line in the first frequency band, adjust the amplitude corresponding to this spectral line based on the frequency corresponding to this spectral line, the obtained medium attenuation coefficient, and the obtained distance between the acoustic imaging device and the ultrasonic sound source. For example, perform a specified operation on the frequency corresponding to this spectral line, the medium attenuation coefficient, and the above distance to obtain the adjusted amplitude corresponding to this spectral line.
[0066] For example, the adjusted amplitude corresponding to the k-th spectral line is calculated through the following formula:
[0067]
[0068] where P kis the amplitude corresponding to the k-th spectral line in the ultrasonic frequency domain signal, and is obtained by calculating X(k);
[0069] f k is the frequency corresponding to the k-th spectral line in the ultrasonic frequency domain signal;
[0070] α is the medium attenuation coefficient of ultrasonic waves in the propagation medium;
[0071] d is the distance between the acoustic imaging device and the sound source;
[0072] P k ′ is the compensated amplitude corresponding to the k-th spectral line in the ultrasonic frequency domain signal.
[0073] After obtaining the amplitudes corresponding to each spectral line, based on the adjusted amplitudes corresponding to each spectral line, the compensated ultrasonic frequency spectrum can be obtained, which can be denoted as X 1 ′(k 1 ), k 1 ∈(0, k 12 -k 11 ).
[0074] By performing transmission compensation in the above manner, it provides a solid foundation for the subsequent target ultrasonic frequency spectrum to more accurately reflect the ultrasonic signal characteristics (such as frequency distribution) in the first frequency band of the ultrasonic frequency domain signal.
[0075] The above has elaborated in detail on the specific implementation method of the above transmission compensation.
[0076] Next, the specific implementation method of determining whether to perform sensitivity compensation and the sensitivity compensation will be elaborated in detail:
[0077] The specific implementation method of determining whether to perform sensitivity compensation can be: based on the amplitudes and frequencies corresponding to each spectral line in the first frequency band of the ultrasonic frequency domain signal, obtain the characteristic parameters corresponding to the current time window. Here, the characteristic parameters include: the first characteristic parameter used to characterize the energy concentration position of ultrasonic waves in the first frequency band, and / or, the second characteristic parameter used to characterize the energy distribution of ultrasonic waves in the first frequency band.
[0078] Then, if the characteristic parameters corresponding to the current time window satisfy the set sensitivity compensation requirements compared with the characteristic parameters corresponding to the previous time window of the current time window, it is determined to perform sensitivity compensation, otherwise, it is determined not to perform sensitivity compensation. Here, the set sensitivity compensation requirements can be: the difference between the characteristic parameters of the current time window and the previous time window is less than the difference threshold.
[0079] For example, the first characteristic parameter may be the center frequency, and the second characteristic parameter may be the standard deviation of frequency. Then, based on the amplitudes and frequencies corresponding to each spectral line in the first frequency band of the ultrasonic frequency-domain signal, the center frequency and the standard deviation of frequency corresponding to the current time window are obtained.
[0080] The center frequency can be obtained through the following formula:
[0081]
[0082] where \(k\in(K_{11}, K_{12})\).
[0083] The standard deviation of frequency can be obtained through the following formula:
[0084]
[0085] If the difference between the center frequency corresponding to the current time window and the center frequency of the ultrasonic segment spectrum corresponding to the specified historical time window is less than or equal to the first set value, and the difference between the standard deviation of frequency corresponding to the current time window and the standard deviation of frequency of the ultrasonic segment spectrum corresponding to the specified historical time window is less than or equal to the second set value, then it is determined to perform sensitivity compensation; otherwise, it is determined not to perform sensitivity compensation.
[0086] When it is determined to perform sensitivity compensation, the specific implementation method of sensitivity compensation can be: for each spectral line in the compensated ultrasonic spectrum, the sensitivity compensation coefficient corresponding to this spectral line is determined according to the frequency corresponding to this spectral line.
[0087] The sensitivity compensation coefficient \(C_s\) corresponding to the \(k\)-th spectral line can be obtained through the following formula:
[0088]
[0089] where \(\beta\) is a constant.
[0090] After obtaining the sensitivity compensation coefficient corresponding to this spectral line, the adjusted amplitude corresponding to this spectral line is readjusted according to the sensitivity compensation coefficient corresponding to this spectral line.
[0091] The readjusted amplitude corresponding to the \(k\)-th spectral line can be obtained through the following formula:
[0092]
[0093] where \(P\) k ″ is the re-compensated amplitude corresponding to the \(k\)-th spectral line in the ultrasonic frequency-domain signal.
[0094] After obtaining the readjusted amplitudes corresponding to each spectral line, based on the readjusted amplitudes corresponding to each spectral line, the target ultrasonic spectrum is obtained, which can be denoted as \(X\) 1 ″(\(k\)1 ) where \(k_1\in(0,k 12 -k 11 ).
[0095] In this embodiment, by the above method, different sensitivity compensation coefficients can be set according to the ultrasonic frequency fluctuation situation, so as to realize sensitivity compensation based on the sensitivity compensation coefficients, laying a solid foundation for the subsequent target ultrasonic frequency spectrum to more accurately reflect the ultrasonic signal characteristics of the ultrasonic frequency domain signal in the first frequency band.
[0096] The above has elaborated in detail on how to determine whether to perform sensitivity compensation and the specific implementation method of sensitivity compensation.
[0097] Next, the specific implementation method of mapping the target ultrasonic frequency spectrum to the audible sound signal frequency spectrum will be elaborated in detail:
[0098] Refer to Figure 2 , Figure 2 which is a schematic flowchart of mapping the target ultrasonic frequency spectrum to the audible sound signal frequency spectrum provided by the embodiment of the present application. As Figure 2 shown, this process includes the following steps:
[0099] S201: Map \(K_1\) spectral lines in the first frequency band to \(K_2\) specified frequency points to obtain \(K_2\) spectral lines; \(K_2\) is equal to the total number of spectral lines in the second frequency band.
[0100] As described in step S102 above, the first frequency band is denoted as \(f 11 to \(f 12 . The frequency points corresponding to \(f 11 and \(f 12 are \(k 11 and \(k 12 respectively. The \(K_1\) spectral lines in the first frequency band are \(K 2 = k 12 - k 11 + 1.
[0101] As described in step S104 above, the second frequency band is denoted as \(f 21 to \(f 22 . The frequency points corresponding to \(f 21 and \(f 22 are \(k 21 and \(k 22 respectively. The total number of spectral lines in the second frequency band is \(K 2 = k 22 - k 21 + 1.
[0102] In the specific implementation of this step S202, the K1 spectral lines can be mapped to the specified K2 frequency points through interpolation operations, such as linear interpolation difference, polynomial interpolation, or spline interpolation difference, etc., to obtain K2 spectral lines.
[0103] In this step, the re-compensated amplitudes corresponding to these K1 frequency points are obtained to obtain a fitting curve, through Q(X 1 ″). Select K2 frequency points on the fitting curve, and determine the amplitudes on the fitting curve at the selected K2 frequency points as the re-compensated amplitudes corresponding to the K2 frequency points, Y 1 (k 2 ′) = Q(X 1 ″), k 2 ′ = 0, 1, …, K 2 -1. In this way, K2 spectrograms are obtained.
[0104] S202. For each of the K2 spectral lines after mapping, map the amplitude of the spectral line to the spectral line corresponding to it in the first frequency band.
[0105] For example, if the K2 frequency points in the first frequency band are frequency points 30 - 40, and the frequency points in the second frequency band are 10 - 20, then map the re-compensated amplitude at frequency point 30 to frequency point 10, map the re-compensated amplitude at frequency point 31 to frequency point 11, and so on.
[0106] S203. Based on the amplitudes of the K2 spectral lines mapped in the first frequency band, obtain the audible sound signal spectrum.
[0107] Then the audible sound spectrum signal is represented by the following formula:
[0108]
[0109] In this embodiment, the high-frequency characteristics of the high-frequency target ultrasonic spectrum are mapped to the low-frequency audible sound signal spectrum in the above manner. Since the ultrasonic signal contains various characteristics, such as sound pressure magnitude, frequency distribution, harmonic composition, etc., these characteristics correspond to the characteristics of audible sound, such as the loudness, pitch, timbre, etc. of the sound. Mapping the high-frequency characteristics of the high-frequency target ultrasonic spectrum to the low-frequency audible sound signal spectrum enables the audible sound spectrum to carry ultrasonic characteristic information, enabling the subsequent obtained audible sound to accurately reflect the signal characteristics of the ultrasonic wave (that is, the audible sound is not distorted), thus effectively assisting in detection.
[0110] The above has elaborated in detail the specific implementation manner of mapping the target ultrasonic spectrum to the audible sound signal spectrum.
[0111] Next, a detailed elaboration is made on obtaining the audible sound signal in the time domain based on the audible sound signal spectrum:
[0112] After obtaining the audible sound signal spectrum, the audible sound signal spectrum that can be converted into an audible sound time-domain signal can be: converting the audible sound signal spectrum into an audible sound time-domain signal. Specifically, the audible sound signal spectrum can be converted into an audible sound time-domain signal through an inverse Fourier transform, and the obtained audible sound time-domain signal can be expressed by the following formula:
[0113]
[0114] After that, the gas leakage amount or partial discharge amount at the sound source is determined based on the collected ultrasonic time-domain signal. When the gas leakage amount is greater than or equal to the set leakage amount threshold, or the partial discharge amount is greater than or equal to the set discharge amount threshold, it is determined that sound pitch compensation is to be performed; otherwise, sound pitch compensation is not performed. If it is determined not to perform sound pitch compensation, the audible sound time-domain signal is the final audible sound signal. If it is determined to perform sound pitch compensation, the sound pitch interval coefficient is determined based on the leakage amount at the sound source of the obtained ultrasonic wave. There is a positive correlation between the sound pitch interval coefficient and the leakage amount. It should be noted that the leakage amount at the sound source can be obtained by an acoustic imaging device through processing the collected high-frequency ultrasonic time-domain signal, and the specific implementation method is not specifically limited in this application.
[0115] For example, the sound pitch interval coefficient is obtained through the following formula:
[0116]
[0117] where the sound pitch interval coefficient C m ;
[0118] t is the time of the current time window;
[0119] γ and k m are coefficients related to the leakage amount. The larger the leakage amount, the larger the values of γ and k m ; vice versa.
[0120] The signal after pitch adjustment and compensation is x 3 (n)=x 2 (n)C m . x 3 (n) is
[0121] After obtaining the sound pitch interval coefficient, based on this sound pitch interval coefficient, sound pitch interval compensation is performed on the audible sound time-domain signal to obtain the compensated audible sound time-domain signal. Specifically, for example, a specified operation is performed on the sound pitch interval coefficient and the audible sound time-domain signal to obtain the compensated audible sound time-domain signal.
[0122] For example, x 3(n) = x 2 (n)C m
[0123] where x 2 (n) is the audible sound time-domain signal;
[0124] x 3 (n) is the compensated audible sound time-domain signal, that is, the audible sound signal in the time domain.
[0125] The above has elaborated in detail on obtaining the audible sound signal in the time domain based on the audible sound signal spectrum.
[0126] To elaborate on this solution in more detail, the following combines Figure 3 to elaborate on the method of this application in more detail:
[0127] As Figure 3 shown, the process may include the following steps:
[0128] S301, Convert the ultrasonic time-domain signal x(n) collected in the current time window into an ultrasonic frequency-domain signal X(k).
[0129] S302, For each spectral line in the first frequency band, perform a specified operation (such as the following formula) on the frequency corresponding to this spectral line, the obtained medium attenuation coefficient, and the distance between the obtained acoustic imaging device and the ultrasonic sound source, and adjust the amplitude corresponding to this spectral line to perform transmission compensation on the ultrasonic frequency-domain signal, obtaining the compensated ultrasonic spectrum X 1 ′(k 1 ).
[0130]
[0131] S303, Obtain the center frequency and frequency standard deviation of the compensated ultrasonic spectrum (such as can be obtained through the following formula), and determine whether to perform sensitivity compensation based on the center frequency and frequency standard deviation.
[0132]
[0133] Specifically, if the difference between the center frequency corresponding to the current time window and the center frequency of the ultrasonic segment spectrum corresponding to the specified historical time window is less than or equal to the first set value, and, the difference between the frequency standard deviation corresponding to the current time window and the frequency standard deviation of the ultrasonic segment spectrum corresponding to the specified historical time window is less than or equal to the second set value, that is, the execution result of step S303 is yes, then execute the following step S304, otherwise, if the execution result of step S303 is yes, then execute the following step S305.
[0134] S304. For each spectral line in the compensated ultrasonic frequency spectrum, determine the sensitivity compensation coefficient corresponding to this spectral line according to the frequency corresponding to this spectral line (for example, it can be obtained through the following formula), and according to the sensitivity compensation coefficient corresponding to this spectral line, readjust the adjusted amplitude corresponding to this spectral line, perform sensitivity compensation on the compensated ultrasonic frequency spectrum to obtain the target ultrasonic frequency spectrum X 1 ″(k 1 )。
[0135]
[0136] S305. Directly determine the compensated ultrasonic frequency spectrum as the target ultrasonic frequency spectrum.
[0137] S306. Map K1 spectral lines in the first frequency band to K2 specified frequency points, map the amplitude of this spectral line to the spectral line corresponding to the first frequency band for this spectral line, and obtain the audible sound signal frequency spectrum X based on the amplitudes of the K2 spectral lines in the first frequency band after being mapped 2 (k 2 )。
[0138] S307. Convert the audible sound signal frequency spectrum into an audible sound time-domain signal x 2 (n)。
[0139] S308. Determine whether to perform sound pitch adjustment according to the characteristics of the audible sound time-domain signal.
[0140] If the execution result of S308 is yes, then execute the following step S309; if the execution result of S308 is no, then determine the audible sound time-domain signal as the final audible sound time-domain signal and execute the following step S3010.
[0141] S309. When it is determined to perform sound pitch adjustment, determine the sound pitch interval coefficient according to the leakage amount at the sound source of the obtained ultrasonic wave (such as the following formula), and according to this sound pitch interval coefficient, perform sound pitch interval compensation on the audible sound time-domain signal to obtain the compensated audible sound time-domain signal x 3 (n)。
[0142]
[0143] S3010. Output the finally obtained audible sound time-domain signal.
[0144] So far, the description of the method provided in this embodiment is completed. Next, the device provided in the embodiment of the present application will be described:
[0145] See Figure 4 , Figure 4 which is the structural schematic diagram of the device provided in the embodiment of the present application. As Figure 4As shown, the device is applied to an acoustic imaging device. The device 400 includes: a first conversion module 401, a first compensation module 402, a second compensation module 403, a second conversion module 404, and an acquisition module 405.
[0146] The first conversion module 401 is configured to convert the ultrasonic time-domain signal collected in the current time window into an ultrasonic frequency-domain signal.
[0147] The first compensation module 402 is configured to perform transmission compensation on the ultrasonic frequency-domain signal according to the amplitudes and frequencies corresponding to each spectral line in the first frequency band in the ultrasonic frequency-domain signal, so as to obtain a compensated ultrasonic frequency spectrum; the transmission compensation is used to compensate for the attenuation caused by transmission.
[0148] The second compensation module 403 is configured to perform sensitivity compensation on the compensated ultrasonic frequency spectrum based on the frequencies corresponding to each spectral line in the compensated ultrasonic frequency spectrum when it is determined to perform sensitivity compensation, so as to obtain a target ultrasonic frequency spectrum; the sensitivity compensation is used to compensate for the amplitude measurement error caused by frequency fluctuations; the attenuation of the acquisition accuracy of the acoustic imaging device.
[0149] The second conversion module 404 is configured to map the target ultrasonic frequency spectrum to an audible sound signal frequency spectrum, and the first frequency band corresponding to the target ultrasonic frequency spectrum is different from the second frequency band corresponding to the audible sound signal frequency spectrum.
[0150] The acquisition module 405 is configured to obtain an audible sound signal in the time domain based on the audible sound signal frequency spectrum.
[0151] As an embodiment, the first frequency band is a high-frequency band that meets the high-frequency requirements; the second frequency band is a frequency band of the set audible sound.
[0152] As an embodiment, performing transmission compensation on the ultrasonic frequency-domain signal according to the amplitudes and frequencies corresponding to each spectral line in the first frequency band in the ultrasonic frequency-domain signal, and obtaining a compensated ultrasonic frequency spectrum includes:
[0153] For each spectral line, adjust the amplitude corresponding to the spectral line according to the frequency corresponding to the spectral line, the obtained medium attenuation coefficient, and the obtained distance between the acoustic imaging device and the ultrasonic sound source.
[0154] According to the adjusted amplitudes corresponding to each spectral line, obtain a compensated ultrasonic frequency spectrum.
[0155] As an embodiment, performing sensitivity compensation on the compensated ultrasonic frequency spectrum based on the frequencies corresponding to each spectral line in the compensated ultrasonic frequency spectrum, and obtaining a target ultrasonic frequency spectrum includes:
[0156] For each spectral line, determine the sensitivity compensation coefficient corresponding to the spectral line according to the frequency corresponding to the spectral line.
[0157] According to the sensitivity compensation coefficient corresponding to the spectral line, readjust the adjusted amplitude corresponding to the spectral line;
[0158] According to the readjusted amplitudes corresponding to each spectral line, obtain the target ultrasonic frequency spectrum.
[0159] As an embodiment, determining to perform sensitivity compensation further includes:
[0160] Based on the amplitudes and frequencies corresponding to each spectral line in the first frequency band in the ultrasonic frequency domain signal, obtain the characteristic parameters corresponding to the current time window; wherein, the characteristic parameters include: a first characteristic parameter for characterizing the energy concentration position of the ultrasonic wave in the first frequency band, and / or, a second characteristic parameter for characterizing the energy distribution of the ultrasonic wave in the first frequency band;
[0161] If the characteristic parameters corresponding to the current time window satisfy the set sensitivity compensation requirements compared with the characteristic parameters corresponding to the previous time window of the current time window, determine to perform sensitivity compensation.
[0162] As an embodiment, mapping the target ultrasonic frequency spectrum to the audible sound signal frequency spectrum includes:
[0163] Map K1 spectral lines in the first frequency band to K2 specified frequency points to obtain K2 spectral lines; K2 is equal to the total number of spectral lines in the second frequency band;
[0164] For each of the K2 spectral lines after mapping, map the amplitude of the spectral line to the spectral line corresponding to it in the first frequency band;
[0165] Based on the amplitudes of the K2 spectral lines in the first frequency band after being mapped, obtain the audible sound signal frequency spectrum.
[0166] As an embodiment, obtaining the audible sound signal in the time domain based on the audible sound signal frequency spectrum includes:
[0167] Convert the audible sound signal frequency spectrum into an audible sound time domain signal;
[0168] According to the leakage amount at the sound source of the obtained ultrasonic wave, determine the sound pitch interval coefficient; the sound pitch interval coefficient has a positive correlation with the leakage amount;
[0169] According to the sound pitch interval coefficient, perform sound pitch interval compensation on the audible sound time domain signal to obtain the compensated audible sound time domain signal; the compensated audible sound time domain signal is the audible sound signal in the time domain.
[0170] Thus far, complete Figure 4 the structural description of the device shown.
[0171] Please refer toFigure 5 , Figure 5 is a structural diagram of an electronic device provided by an embodiment of the present application. As Figure 5 shown, the hardware structure may include: a processor and a machine-readable storage medium, and the machine-readable storage medium stores machine-executable instructions that can be executed by the processor; the processor is used to execute the machine-executable instructions to implement the method disclosed in the above example of the present application.
[0172] Based on the same application concept as the above method, an embodiment of the present application further provides a machine-readable storage medium, and a number of computer instructions are stored on the machine-readable storage medium. When the computer instructions are executed by a processor, the method disclosed in the above example of the present application can be implemented.
[0173] Exemplarily, the above machine-readable storage medium can be any electronic, magnetic, optical or other physical storage device that can contain or store information, such as executable instructions, data, and so on. For example, the machine-readable storage medium can be: RAM (Radom Access Memory, random access memory), volatile memory, non-volatile memory, flash memory, storage drive (such as a hard disk drive), solid state drive, any type of storage disk (such as an optical disc, DVD, etc.), or a similar storage medium, or a combination thereof.
[0174] The above are only the embodiments of the present application and are not used to limit the present application. For those skilled in the art, various changes and modifications can be made to the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included within the scope of the claims of the present application.
Claims
1. An ultrasonic detection method, characterized in that: The method is applied to an acoustic imaging device, and the method comprises: Convert the ultrasonic time domain signal collected in the current time window into an ultrasonic frequency domain signal; According to the amplitude and frequency corresponding to each spectral line in the first frequency band of the ultrasonic frequency domain signal, transmission compensation is performed on the ultrasonic frequency domain signal to obtain a compensated ultrasonic spectrum; the transmission compensation is used to compensate for the attenuation caused by transmission; When determining to perform sensitivity compensation, based on the frequencies corresponding to the respective spectral lines in the compensated ultrasonic spectrum, sensitivity compensation is performed on the compensated ultrasonic spectrum to obtain a target ultrasonic spectrum; the sensitivity compensation is used to compensate for the amplitude measurement error caused by frequency fluctuation; Mapping a target ultrasonic spectrum to an audible sound signal spectrum, wherein a first frequency band corresponding to the target ultrasonic spectrum is different from a second frequency band corresponding to the audible sound signal spectrum; Based on the audible sound signal spectrum, an audible sound signal in the time domain is obtained.
2. The method according to claim 1, characterized in that: The first frequency band is a high frequency band that meets high frequency requirements; the second frequency band is a set frequency band of audible sound.
3. The method according to claim 1, characterized in that: The ultrasonic frequency domain signal is subjected to transmission compensation according to the amplitude and frequency corresponding to each spectral line in the first frequency band in the ultrasonic frequency domain signal, and the compensated ultrasonic spectrum includes: For each spectral line, adjusting the amplitude corresponding to the spectral line according to the frequency corresponding to the spectral line, the obtained medium attenuation coefficient, and the obtained distance between the acoustic imaging device and the sound source of the ultrasonic wave; The compensated ultrasonic spectrum is obtained according to the adjusted amplitude corresponding to each spectral line.
4. The method according to claim 3, characterized in that The sensitivity compensation of the compensated ultrasonic spectrum is performed based on the frequency corresponding to each spectral line in the compensated ultrasonic spectrum to obtain the target ultrasonic spectrum, which includes: For each spectral line, a sensitivity compensation coefficient corresponding to the spectral line is determined according to the frequency corresponding to the spectral line; Re-adjusting the adjusted amplitude corresponding to the spectral line according to the sensitivity compensation coefficient corresponding to the spectral line; The target ultrasonic spectrum is obtained according to the readjusted amplitude corresponding to each spectral line.
5. The method according to claim 1, characterized in that The determining to perform sensitivity compensation further comprises: Based on the amplitude and frequency corresponding to each spectral line in the first frequency band in the ultrasonic frequency domain signal, characteristic parameters corresponding to the current time window are obtained; wherein the characteristic parameters include: a first characteristic parameter for characterizing the energy concentration position of the ultrasonic wave in the first frequency band, and / or a second characteristic parameter for characterizing the energy distribution of the ultrasonic wave in the first frequency band; If the characteristic parameter corresponding to the current time window and the characteristic parameter corresponding to the previous time window of the current time window meet the set sensitivity compensation requirement, it is determined to perform the sensitivity compensation.
6. The method according to claim 1, characterized in that Mapping the target ultrasonic spectrum to the audible sound signal spectrum includes: Mapping K1 spectral lines in the first frequency band to specified K2 frequency points to obtain K2 spectral lines; K2 is equal to the total number of spectral lines in the second frequency band; For each of the K2 mapped spectral lines, mapping the amplitude of the spectral line to a spectral line in the first frequency band corresponding to the spectral line; The audible sound signal spectrum is obtained based on the mapped amplitudes of K2 spectral lines in the first frequency band.
7. The method according to claim 1, characterized in that The obtaining of the audible sound signal in the time domain based on the audible sound signal spectrum comprises: Converting the audible sound signal spectrum into an audible sound time domain signal; Determine a sound rhythm interval coefficient according to the obtained leakage amount at the sound source of the ultrasonic wave; the sound rhythm interval coefficient is positively correlated with the leakage amount; According to the sound rhythm interval coefficient, the audible sound time domain signal is subjected to sound rhythm interval compensation to obtain a compensated audible sound time domain signal; the compensated audible sound time domain signal is the audible sound signal in the time domain.
8. An ultrasonic detection device, characterized in that: The device is applied to an acoustic imaging device, and the device comprises: A first conversion module, used to convert the ultrasonic time domain signal collected in the current time window into an ultrasonic frequency domain signal; A first compensation module is used to perform transmission compensation on the ultrasonic frequency domain signal according to the amplitude and frequency corresponding to each spectral line in the first frequency band in the ultrasonic frequency domain signal to obtain a compensated ultrasonic spectrum; the transmission compensation is used to compensate for the attenuation caused by transmission; A second compensation module is used to perform sensitivity compensation on the compensated ultrasonic spectrum based on the frequencies corresponding to each spectral line in the compensated ultrasonic spectrum to obtain a target ultrasonic spectrum when determining to perform sensitivity compensation; the sensitivity compensation is used to compensate for the amplitude measurement error caused by frequency fluctuation; the attenuation of the acquisition accuracy of the acoustic imaging device; A second conversion module is used to map a target ultrasonic spectrum to an audible sound signal spectrum, wherein a first frequency band corresponding to the target ultrasonic spectrum is different from a second frequency band corresponding to the audible sound signal spectrum; The obtaining module is used to obtain the audible sound signal in the time domain based on the audible sound signal spectrum.
9. The device according to claim 8, characterized in that The first frequency band is a high frequency band that meets the high frequency requirement; the second frequency band is a set frequency band of audible sound; and / or, The ultrasonic frequency domain signal is subjected to transmission compensation according to the amplitude and frequency corresponding to each spectral line in the first frequency band in the ultrasonic frequency domain signal, and the compensated ultrasonic spectrum includes: For each spectral line, adjusting the amplitude corresponding to the spectral line according to the frequency corresponding to the spectral line, the obtained medium attenuation coefficient, and the obtained distance between the acoustic imaging device and the sound source of the ultrasonic wave; Obtaining the compensated ultrasonic spectrum according to the adjusted amplitude corresponding to each spectral line; and / or, The sensitivity compensation of the compensated ultrasonic spectrum is performed based on the frequency corresponding to each spectral line in the compensated ultrasonic spectrum to obtain the target ultrasonic spectrum, which includes: For each spectral line, a sensitivity compensation coefficient corresponding to the spectral line is determined according to the frequency corresponding to the spectral line; Re-adjusting the adjusted amplitude corresponding to the spectral line according to the sensitivity compensation coefficient corresponding to the spectral line; The target ultrasonic spectrum is obtained according to the re-adjusted amplitude corresponding to each spectral line; and / or, The determining to perform sensitivity compensation further comprises: Based on the amplitude and frequency corresponding to each spectral line in the first frequency band in the ultrasonic frequency domain signal, characteristic parameters corresponding to the current time window are obtained; wherein the characteristic parameters include: a first characteristic parameter for characterizing the energy concentration position of the ultrasonic wave in the first frequency band, and / or a second characteristic parameter for characterizing the energy distribution of the ultrasonic wave in the first frequency band; If the characteristic parameter corresponding to the current time window and the characteristic parameter corresponding to the previous time window of the current time window meet the set sensitivity compensation requirement, determining to perform the sensitivity compensation; and / or, Mapping the target ultrasonic spectrum to the audible sound signal spectrum includes: Mapping K1 spectral lines in the first frequency band to specified K2 frequency points to obtain K2 spectral lines; K2 is equal to the total number of spectral lines in the second frequency band; For each of the K2 mapped spectral lines, mapping the amplitude of the spectral line to a spectral line in the first frequency band corresponding to the spectral line; Obtaining the audible sound signal spectrum based on the mapped amplitudes of K2 spectral lines in the first frequency band; and / or, The obtaining of the audible sound signal in the time domain based on the audible sound signal spectrum comprises: Converting the audible sound signal spectrum into an audible sound time domain signal; Determine a sound rhythm interval coefficient according to the obtained leakage amount at the sound source of the ultrasonic wave; the sound rhythm interval coefficient is positively correlated with the leakage amount; According to the sound rhythm interval coefficient, the audible sound time domain signal is subjected to sound rhythm interval compensation to obtain a compensated audible sound time domain signal; the compensated audible sound time domain signal is the audible sound signal in the time domain.
10. An electronic device, characterized in that: The electronic device includes: Processor; and A computer-readable storage medium, wherein computer program instructions are stored in the computer-readable storage medium, and when the computer program instructions are executed by the processor, the processor is caused to perform the steps of the method according to any one of claims 1 to 7.
11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer program instructions, which, when executed by a processor, enable the processor to perform the steps of any one of the methods of claims 1 to 7.