Ultrasonic echo signal processing method and device, flowmeter and storage medium

文档序号:1140177 发布日期:2020-09-11 浏览:14次 中文

阅读说明:本技术 超声波回波信号的处理方法、装置、流量计及存储介质 (Ultrasonic echo signal processing method and device, flowmeter and storage medium ) 是由 郭宇 黄希 李磊 赵冬泉 李萌 裘建 罗睿 唐兰贵 于 2020-04-02 设计创作,主要内容包括:本申请提供一种超声波回波信号的处理方法、装置、流量计及存储介质,涉及信号处理技术领域。该方法包括:判断每次从超声波回波数字信号中采样的多个数据在预设约定区间内的个数是否大于预设的最小允许数量;若每次从超声波回波数字信号中采样的多个数据在预设约定区间内的个数小于或等于最小允许数量,则采用预设参数对该超声波回波数字信号对应的超声波回波模拟信号进行增益调节,使得从增益调节后的超声回波数字信号中采样的多个数据在预设约定区间内的个数大于所述最小允许数量;利用采样的多个数据在预设约定区间内的个数大于最小允许数量的超声波回波数字信号进行计算,得到流速数据。该方式可以使计算出的液体流速准确度得到提高。(The application provides a method and a device for processing ultrasonic echo signals, a flowmeter and a storage medium, and relates to the technical field of signal processing. The method comprises the following steps: judging whether the number of a plurality of data sampled from the ultrasonic echo digital signal in a preset appointed interval is larger than a preset minimum allowable number or not; if the number of the plurality of data sampled from the ultrasonic echo digital signals in the preset appointed interval is less than or equal to the minimum allowable number, performing gain adjustment on the ultrasonic echo analog signals corresponding to the ultrasonic echo digital signals by adopting preset parameters, so that the number of the plurality of data sampled from the ultrasonic echo digital signals after gain adjustment in the preset appointed interval is greater than the minimum allowable number; and calculating by using the ultrasonic echo digital signals of which the number of the sampled data in the preset appointed interval is larger than the minimum allowable number to obtain flow speed data. This approach may result in an improved accuracy of the calculated liquid flow rate.)

1. A method for processing an ultrasonic echo signal, the method comprising:

judging whether the number of a plurality of data sampled from the ultrasonic echo digital signal in a preset appointed interval is larger than a preset minimum allowable number or not;

if the number of the plurality of data sampled from the ultrasonic echo digital signals in the preset appointed interval is smaller than or equal to the minimum allowable number, performing gain adjustment on the ultrasonic echo analog signals corresponding to the ultrasonic echo digital signals by adopting preset parameters, so that the number of the plurality of data sampled from the ultrasonic echo digital signals after gain adjustment in the preset appointed interval is larger than the minimum allowable number;

and calculating by using the ultrasonic echo digital signals of which the number of the sampled data in the preset appointed interval is larger than the minimum allowable number to obtain flow speed data.

2. The processing method according to claim 1, wherein the performing gain adjustment on the ultrasonic echo analog signal corresponding to the ultrasonic echo digital signal by using the preset parameter comprises:

and according to the number of the ultrasonic echo digital signals exceeding the preset appointed interval, performing gain adjustment on the ultrasonic echo analog signals corresponding to the ultrasonic echo digital signals by adopting the preset parameters.

3. The processing method according to claim 2, wherein the performing gain adjustment on the ultrasonic echo analog signal corresponding to the ultrasonic echo digital signal by using the preset parameter according to the number of the ultrasonic echo digital signal exceeding the preset agreed interval comprises:

comparing the number of first data in the ultrasonic echo digital signals, which are smaller than the minimum value of the preset appointed interval, with the number of second data in the ultrasonic echo digital signals, which are larger than the maximum value of the preset appointed interval;

and according to the comparison result, performing gain adjustment on the ultrasonic echo analog signal corresponding to the ultrasonic echo digital signal by adopting the preset parameters.

4. The processing method according to claim 3, characterized in that said preset parameters comprise: a first preset parameter; and according to the comparison result, performing gain adjustment on the ultrasonic echo analog signal corresponding to the ultrasonic echo digital signal by adopting the preset parameters, wherein the gain adjustment comprises the following steps:

and if the number of the first data is larger than that of the second data, performing gain amplification adjustment on the ultrasonic echo analog signal corresponding to the ultrasonic echo digital signal by using the first preset parameter.

5. The processing method according to claim 3, characterized in that said preset parameters comprise: a second preset parameter; and according to the comparison result, performing gain adjustment on the ultrasonic echo analog signal corresponding to the ultrasonic echo digital signal by adopting the preset parameters, wherein the gain adjustment comprises the following steps:

and if the number of the first data is smaller than that of the second data, performing gain reduction adjustment on the ultrasonic echo analog signal corresponding to the ultrasonic echo digital signal by adopting the second preset parameter.

6. The processing method according to any one of claims 1 to 5, wherein the calculating by using the ultrasonic echo digital signals of which the number of the sampled data in the preset appointed interval is greater than the minimum allowable number to obtain the flow velocity data comprises:

determining the number of preset appointed intervals according to a preset sampling depth and a preset sampling frequency, wherein the value of the sampling depth is an integer greater than 1;

according to the number of the preset appointed intervals, performing super-frequency sampling filtering processing on the ultrasonic echo digital signals;

and calculating the flow speed data according to the data obtained by the ultra-frequency sampling and filtering processing.

7. The process of claim 6, wherein said calculating said flow rate data from data resulting from said filtering with supersampling comprises:

modulating the data obtained by the super-frequency sampling filtering processing by adopting an orthogonal homologous double-path modulation mode;

calculating the flow rate data from the modulated data.

8. An apparatus for processing ultrasonic echo signals, the apparatus comprising:

the judging module is used for judging whether the number of the plurality of data sampled from the ultrasonic echo digital signals in each time in a preset appointed interval is larger than a preset minimum allowable number or not;

the adjusting module is configured to perform gain adjustment on the ultrasonic echo analog signal corresponding to the ultrasonic echo digital signal by using a preset parameter if the number of the plurality of data sampled from the ultrasonic echo digital signal in the preset appointed interval is smaller than or equal to the minimum allowable number each time, so that the number of the plurality of data sampled from the gain-adjusted ultrasonic echo digital signal in the preset appointed interval is greater than the minimum allowable number;

and the calculation module is used for calculating by using the ultrasonic echo digital signals of which the number of the sampled data in the preset appointed interval is greater than the minimum allowable number to obtain flow speed data.

9. A flow meter, comprising: a processor, a storage medium and a bus, the storage medium storing machine-readable instructions executable by the processor, the processor and the storage medium communicating via the bus when the flow meter is running, the processor executing the machine-readable instructions to perform the steps of the method for processing ultrasonic echo signals according to any one of claims 1 to 7.

10. A storage medium, characterized in that the storage medium has stored thereon a computer program which, when being executed by a processor, performs the steps of the method of processing ultrasonic echo signals according to any one of claims 1 to 7.

Technical Field

The present disclosure relates to the field of signal processing technologies, and in particular, to a method and an apparatus for processing an ultrasonic echo signal, a flow meter, and a storage medium.

Background

With the development of science and technology, people have more and more requirements on monitoring the flow velocity of fluids in municipal and water conservancy fields such as rainwater, sewage, reclaimed water, riverways, lakes and roads. According to the acoustic Doppler effect, the frequency difference between the ultrasonic echo signal and the ultrasonic wave sending signal is calculated, namely the Doppler frequency shift is utilized to calculate the flow velocity of the measured liquid.

At present, before the flow velocity of the measured liquid is calculated, gain amplification processing needs to be carried out on a received ultrasonic echo analog signal. However, when the prior art performs gain amplification on the ultrasonic echo analog signal, the amplitude of the amplified ultrasonic echo analog signal is too small or the amplitude exceeds the range. These phenomena all result in inaccurate ultrasonic echo digital signals, and thus the accuracy of the flow velocity of the liquid calculated from the ultrasonic echo digital signals is not high.

Disclosure of Invention

An object of the present application is to provide a method, an apparatus, a flowmeter, and a storage medium for processing an ultrasonic echo signal, which can improve the accuracy of an ultrasonic echo digital signal, and further improve the accuracy of the calculated flow velocity of the liquid.

In order to achieve the above purpose, the technical solutions adopted in the embodiments of the present application are as follows:

in a first aspect, an embodiment of the present application provides a method for processing an ultrasonic echo signal, where the method includes:

judging whether the number of a plurality of data sampled from the ultrasonic echo digital signal in a preset appointed interval is larger than a preset minimum allowable number or not;

if the number of the plurality of data sampled from the ultrasonic echo digital signals in the preset appointed interval is smaller than or equal to the minimum allowable number, performing gain adjustment on the ultrasonic echo analog signals corresponding to the ultrasonic echo digital signals by adopting preset parameters, so that the number of the plurality of data sampled from the ultrasonic echo digital signals after gain adjustment in the preset appointed interval is larger than the minimum allowable number;

and calculating by using the ultrasonic echo digital signals of which the number of the sampled data in the preset appointed interval is larger than the minimum allowable number to obtain flow speed data.

Optionally, the performing gain adjustment on the ultrasonic echo analog signal corresponding to the ultrasonic echo digital signal by using preset parameters includes:

and according to the number of the ultrasonic echo digital signals exceeding the preset appointed interval, performing gain adjustment on the ultrasonic echo analog signals corresponding to the ultrasonic echo digital signals by adopting the preset parameters.

Optionally, the performing gain adjustment on the ultrasonic echo analog signal corresponding to the ultrasonic echo digital signal by using the preset parameter according to the number of the ultrasonic echo digital signal exceeding the preset agreed interval includes:

comparing the number of first data in the ultrasonic echo digital signals, which are smaller than the minimum value of the preset appointed interval, with the number of second data in the ultrasonic echo digital signals, which are larger than the maximum value of the preset appointed interval;

and according to the comparison result, performing gain adjustment on the ultrasonic echo analog signal corresponding to the ultrasonic echo digital signal by adopting the preset parameters.

Optionally, the preset parameters include: a first preset parameter; and according to the comparison result, performing gain adjustment on the ultrasonic echo analog signal corresponding to the ultrasonic echo digital signal by adopting the preset parameters, wherein the gain adjustment comprises the following steps:

and if the number of the first data is larger than that of the second data, performing gain amplification adjustment on the ultrasonic echo analog signal corresponding to the ultrasonic echo digital signal by using the first preset parameter.

Optionally, the preset parameters include: a second preset parameter; and according to the comparison result, performing gain adjustment on the ultrasonic echo analog signal corresponding to the ultrasonic echo digital signal by adopting the preset parameters, wherein the gain adjustment comprises the following steps:

and if the number of the first data is smaller than that of the second data, performing gain reduction adjustment on the ultrasonic echo analog signal corresponding to the ultrasonic echo digital signal by adopting the second preset parameter.

Optionally, the calculating, by using the ultrasonic echo digital signals of which the number of the sampled data in the preset agreed interval is greater than the minimum allowable number, to obtain flow speed data includes:

determining the number of preset appointed intervals according to a preset sampling depth and a preset sampling frequency, wherein the value of the sampling depth is an integer greater than 1;

according to the number of the preset appointed intervals, performing super-frequency sampling filtering processing on the ultrasonic echo digital signals;

and calculating the flow speed data according to the data obtained by the ultra-frequency sampling and filtering processing.

Optionally, the calculating the flow rate data according to the data obtained by the filtering processing of the super-frequency sampling includes:

modulating the data obtained by the super-frequency sampling filtering processing by adopting an orthogonal homologous double-path modulation mode;

calculating the flow rate data from the modulated data.

In a second aspect, an embodiment of the present application further provides an apparatus for processing an ultrasonic echo signal, where the apparatus includes:

the judging module is used for judging whether the number of the plurality of data sampled from the ultrasonic echo digital signals in each time in a preset appointed interval is larger than a preset minimum allowable number or not;

the adjusting module is configured to perform gain adjustment on the ultrasonic echo analog signal corresponding to the ultrasonic echo digital signal by using a preset parameter if the number of the plurality of data sampled from the ultrasonic echo digital signal in the preset appointed interval is smaller than or equal to the minimum allowable number each time, so that the number of the plurality of data sampled from the gain-adjusted ultrasonic echo digital signal in the preset appointed interval is greater than the minimum allowable number;

and the calculation module is used for calculating by using the ultrasonic echo digital signals of which the number of the sampled data in the preset appointed interval is greater than the minimum allowable number to obtain flow speed data.

Optionally, the adjusting module is specifically configured to:

and according to the number of the ultrasonic echo digital signals exceeding the preset appointed interval, performing gain adjustment on the ultrasonic echo analog signals corresponding to the ultrasonic echo digital signals by adopting the preset parameters.

Optionally, the adjusting module is further specifically configured to:

comparing the number of first data in the ultrasonic echo digital signals, which are smaller than the minimum value of the preset appointed interval, with the number of second data in the ultrasonic echo digital signals, which are larger than the maximum value of the preset appointed interval;

and according to the comparison result, performing gain adjustment on the ultrasonic echo analog signal corresponding to the ultrasonic echo digital signal by adopting the preset parameters.

Optionally, the preset parameters include: a first preset parameter; the adjusting module is further specifically configured to:

and if the number of the first data is larger than that of the second data, performing gain amplification adjustment on the ultrasonic echo analog signal corresponding to the ultrasonic echo digital signal by using the first preset parameter.

Optionally, the preset parameters include: a second preset parameter; the adjusting module is further specifically configured to:

and if the number of the first data is smaller than that of the second data, performing gain reduction adjustment on the ultrasonic echo analog signal corresponding to the ultrasonic echo digital signal by adopting the second preset parameter.

Optionally, the calculation module is specifically configured to:

determining the number of preset appointed intervals according to a preset sampling depth and a preset sampling frequency, wherein the value of the sampling depth is an integer greater than 1;

according to the number of the preset appointed intervals, performing super-frequency sampling filtering processing on the ultrasonic echo digital signals;

and calculating the flow speed data according to the data obtained by the ultra-frequency sampling and filtering processing.

Optionally, the computing module is further specifically configured to:

modulating the data obtained by the super-frequency sampling filtering processing by adopting an orthogonal homologous double-path modulation mode;

calculating the flow rate data from the modulated data.

In a third aspect, an embodiment of the present application provides a flow meter, including: a processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, when the flow meter is running, the processor and the storage medium communicate through the bus, and the processor executes the machine-readable instructions to execute the steps of the method for processing the ultrasonic echo signal according to the first aspect.

In a fourth aspect, the present application provides a storage medium, and the computer program is executed by a processor to execute the steps of the processing method of the ultrasonic echo signal according to the first aspect.

The invention has the beneficial effects that:

the method, the device, the flowmeter and the storage medium for processing the ultrasonic echo signals provided by the embodiment of the invention judge whether the number of a plurality of data sampled from the ultrasonic echo digital signals in a preset appointed interval is larger than a preset minimum allowable number or not; if the number of the plurality of data sampled from the ultrasonic echo digital signals in a preset appointed interval is smaller than or equal to the minimum allowable number, performing gain adjustment on the ultrasonic echo analog signals corresponding to the ultrasonic echo digital signals by adopting preset parameters, so that the number of the plurality of data sampled from the ultrasonic echo digital signals after gain adjustment in the preset appointed interval is larger than the minimum allowable number; and calculating by using the ultrasonic echo digital signals of which the number of the sampled data in the preset appointed interval is larger than the minimum allowable number to obtain flow speed data. By adopting the processing method of the ultrasonic echo signal provided by the embodiment of the application, when the number of the plurality of data sampled from the ultrasonic echo digital signal in the preset appointed interval is less than or equal to the preset minimum allowable number, the gain multiple in the gain adjuster can be adjusted by adopting the preset parameters, so that the ultrasonic echo analog signal corresponding to the ultrasonic echo digital signal passes through the adjusted gain adjuster, the number of the plurality of data sampled from the ultrasonic echo digital signal in the preset appointed interval is greater than the preset minimum allowable number, the accuracy of the ultrasonic echo digital signal is improved, and the accuracy of the calculated flow speed of the liquid is improved.

Drawings

In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained from the drawings without inventive effort.

Fig. 1 is a schematic structural diagram of a hardware architecture of a flow meter according to an embodiment of the present disclosure;

fig. 2 is a schematic flowchart of a method for processing an ultrasonic echo signal according to an embodiment of the present disclosure;

fig. 3 is a schematic flowchart of another method for processing an ultrasonic echo signal according to an embodiment of the present disclosure;

fig. 4 is a schematic flowchart of another method for processing an ultrasonic echo signal according to an embodiment of the present application;

fig. 5 is a signal diagram of a modulated signal at a positive direction velocity according to an embodiment of the present application;

FIG. 6 is a signal diagram of a modulated signal at negative direction velocity according to an embodiment of the present application;

fig. 7 is a schematic structural diagram of an apparatus for processing an ultrasonic echo signal according to an embodiment of the present disclosure;

fig. 8 is a schematic structural diagram of another ultrasonic echo signal processing apparatus according to an embodiment of the present application;

fig. 9 is a schematic structural diagram of another ultrasonic echo signal processing apparatus according to an embodiment of the present application;

fig. 10 is a schematic structural diagram of a flowmeter according to an embodiment of the present application.

Detailed Description

In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments.

Thus, the following detailed description of the embodiments of the present application, presented in the accompanying drawings, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.

It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.

For a clear explanation of the processing method of the ultrasonic echo signal provided in the present application, first, a hardware architecture of a flow meter that executes the processing method of the ultrasonic echo signal is explained.

Fig. 1 is a schematic structural diagram of a hardware architecture of a flow meter according to an embodiment of the present application, in which a processing method of an ultrasonic echo signal in the following embodiments is applied, which can be implemented by a processor 10 in the flow meter, and the flow meter may specifically be a doppler flow meter. As shown in fig. 1, the flow meter includes: a processor 10, a pressure sensor 20, a first digital-to-analog converter 30, a power amplifier 40, an ultrasonic wave emitting sensor 50, an ultrasonic wave receiving sensor 60, a gain adjuster 70, an analog-to-digital converter 80, and a second digital-to-analog converter 90, wherein, the processor 10 is respectively connected with the pressure sensor 20, the first digital-to-analog converter 30, the analog-to-digital converter 80 and the second digital-to-analog converter 90, for controlling the pressure sensor 20 to collect the liquid level data of the measured fluid, controlling the first digital-to-analog converter 30 to convert the digital signal into an analog signal (a sine wave signal with a certain period), controlling the analog-to-digital converter 80 to convert the amplified ultrasonic echo analog signal into an amplified ultrasonic echo digital signal, and controlling the second digital-to-analog converter 90 to convert the digital voltage value into an analog voltage value.

The first digital-to-analog converter 30 is connected with the ultrasonic wave emitting sensor 50 through the power amplifier 40, wherein the power amplifier 40 is used for amplifying the analog signal output by the first digital-to-analog converter 30, and the ultrasonic wave emitting sensor 50 converts the amplified analog signal into an ultrasonic wave emitting analog signal and emits the ultrasonic wave emitting analog signal; the ultrasonic receiving sensor 60 is connected to the analog-to-digital converter 80 through the gain adjuster 70, wherein the ultrasonic receiving sensor 60 is configured to receive an ultrasonic echo analog signal, and the gain adjuster 70 is configured to gain-amplify the ultrasonic echo analog signal and transmit the amplified ultrasonic echo analog signal to the analog-to-digital converter 80; the gain adjuster 70 is also connected to the second digital-to-analog converter 90, and is configured to adjust a gain multiple thereof according to an output analog voltage value of the second digital-to-analog converter 90.

The method for processing the ultrasonic echo signal provided in the present application is explained below by taking a plurality of examples in conjunction with the hardware structure of the flow meter, and specifically, refer to the following.

Fig. 2 is a schematic flowchart of a method for processing an ultrasonic echo signal according to an embodiment of the present application, and as shown in fig. 2, the method may include:

s201, judging whether the number of the plurality of data sampled from the ultrasonic echo digital signals in each time in a preset appointed interval is larger than a preset minimum allowable number.

Specifically, the predetermined convention interval is related to the number of bits of the adc 80, and the specific convention interval range may be limited according to the actual situation, in the embodiment of the present application, the 12-bit adc 80 is taken as an example for explanation, the sampling data interval of the 12-bit adc 80 is (0-4095), and the convention interval of the ultrasonic echo digital signal is assumed to be one quarter to three quarters of the full range of the adc 80, and is (1023 + 3071).

After the predetermined interval is set, the ultrasonic echo digital signal output from the analog-to-digital converter 80 may be sampled, the number of sampling points may be 1024, or may be other multiple ones, which is not limited herein, and the data corresponding to the 1024 sampling points may be represented in the following form: bdata0, Bdata1, Bdata2, Bdata3, Bdata4 and Bdata5 … … Bdata 1023. According to the data corresponding to each sampling point, the number of sampling points in a preset appointed interval can be determined, and then the ultrasonic echo digital signal is judged according to the relation between the liquid level deviation (MaxPoffset) and the minimum allowable number (AppDataNum) of the interval in which the liquid level deviation (MaxPoffset) is located and the number of the sampling points of the ultrasonic echo digital signal in the appointed interval, as shown in table 1.

TABLE 1

Wherein the above-mentioned liquid level deviation can be obtained by the following stepsThe step of obtaining can be according to the multiunit liquid level data that pressure sensor 20 gathered when sampling to ultrasonic wave echo digital signal, determine the liquid level deviation. Wherein, pressure sensor 20 can gather 1024 group liquid level data, also can gather other a plurality of liquid level data, does not restrict the number of liquid level data here, and 1024 group liquid level data can be represented with following form: the liquid level data standard deviation (SUMPdata) is obtained by performing square summation on 1024 liquid level data, namely Pdata0, Pdata1, Pdata2, Pdata3, Pdata4 and Pdata5 … … Pdata 1023:

Figure BDA0002437135400000112

then, the standard deviation of the liquid level data (SUMPdata) is averaged to obtain the average value (AVGPdata) of the standard deviation of the liquid level data:respectively solving a maximum value MaxData and a minimum value MinPdata in 1024 liquid level data:

MaxPdata=MAX(Pdata0,Pdata1,Pdata2,Pdata3……Pdata1023)

MinPdata=MIN(Pdata0,Pdata1,Pdata2,Pdata3……Pdata1023)

and finally, calculating the liquid level deviation (MaxPoffset):

MaxPoffset=MAX((MaxPdata-AVGPdata),(AVGPdata-MinPdata))

s202, if the number of the plurality of data sampled from the ultrasonic echo digital signals in the preset appointed interval is smaller than or equal to the minimum allowable number, performing gain adjustment on the ultrasonic echo analog signals corresponding to the ultrasonic echo digital signals by adopting preset parameters, so that the number of the plurality of data sampled from the gain-adjusted ultrasonic echo digital signals in the preset appointed interval is larger than the minimum allowable number.

Specifically, if the number of the plurality of data obtained by sampling the ultrasonic echo digital signal output by the analog-to-digital converter 80 in the preset agreed interval is greater than the preset minimum allowable number, the flow speed data of the liquid is directly calculated according to the ultrasonic echo digital signal; if the number of the plurality of data obtained by sampling the ultrasonic echo digital signals output by the analog-to-digital converter 80 in the preset appointed interval is smaller than or equal to the preset minimum allowable number, the gain multiple of the gain adjuster 70 can be adjusted by adjusting the output analog voltage value of the second digital-to-analog converter 90. And performing gain adjustment on the ultrasonic echo analog signal corresponding to the ultrasonic echo digital signal again by using the adjusted gain adjuster 70, performing judgment on the ultrasonic echo analog signal obtained after the gain adjustment again, and so on, and finally enabling the number of the plurality of data sampled in the ultrasonic echo digital signal after the gain adjustment in the preset appointed interval to be larger than the preset minimum allowable number.

Wherein the Gain (Gain) of the Gain adjuster 70 and the output analog voltage value (V) of the second DAC 90DAC2) The relationship between them is as follows:

Gain=VDAC2*KGAIN

in the formula, KGAINFor gain amplification factor, it is usually 80 DB/V.

And S203, calculating by using the ultrasonic echo digital signals of which the number of the sampled data in the preset appointed interval is larger than the minimum allowable number to obtain flow speed data.

Specifically, when the number of the plurality of data sampled from the ultrasonic echo digital signals in the preset appointed interval is greater than the minimum allowable number, the gain factor equivalent to performing gain adjustment on the ultrasonic echo analog signal corresponding to the ultrasonic echo digital signal is in accordance with the requirement, and the ultrasonic echo digital signal amplified by the gain factor is used for calculation to obtain the flow rate data of the liquid. If the sampling frequency reaches the preset maximum sampling frequency, the ultrasonic echo digital signal obtained by the last gain adjustment can be used for calculation, the sampling frequency can be preset in advance, the sampling frequency in the embodiment of the application is described by taking 10 times as an example, the ultrasonic echo digital signal obtained after the gain adjustment is performed for X times is sampled, before judging whether the number of a plurality of data sampled from the ultrasonic echo digital signal in a preset appointed interval is larger than the preset minimum allowable number, the X is required to be compared with the 10, and if the X is smaller than 10, whether the number of the plurality of data sampled from the ultrasonic echo digital signal in the preset appointed interval is larger than the preset minimum allowable number is continuously judged; if X is larger than or equal to 10, directly calculating according to the ultrasonic echo digital signal to obtain the flow speed data of the liquid.

In summary, in the processing method of the ultrasonic echo signal provided by the present application, it is determined whether the number of the plurality of data sampled from the ultrasonic echo digital signal in each time in the preset appointed interval is greater than the preset minimum allowable number; if the number of the plurality of data sampled from the ultrasonic echo digital signals in a preset appointed interval is smaller than or equal to the minimum allowable number, performing gain adjustment on the ultrasonic echo analog signals corresponding to the ultrasonic echo digital signals by adopting preset parameters, so that the number of the plurality of data sampled from the ultrasonic echo digital signals after gain adjustment in the preset appointed interval is larger than the minimum allowable number; and calculating by using the ultrasonic echo digital signals of which the number of the sampled data in the preset appointed interval is larger than the minimum allowable number to obtain flow speed data. By adopting the processing method of the ultrasonic echo signal provided by the embodiment of the application, when the number of the plurality of data sampled from the ultrasonic echo digital signal in the preset appointed interval is less than or equal to the preset minimum allowable number, the gain multiple in the gain adjuster can be adjusted by adopting the preset parameters, so that the ultrasonic echo analog signal corresponding to the ultrasonic echo digital signal passes through the adjusted gain adjuster, the number of the plurality of data sampled from the ultrasonic echo digital signal in the preset appointed interval is greater than the preset minimum allowable number, the accuracy of the ultrasonic echo digital signal is improved, and the accuracy of the calculated flow speed of the liquid is improved.

Optionally, the performing gain adjustment on the ultrasonic echo analog signal corresponding to the ultrasonic echo digital signal by using the preset parameter includes: and according to the number of the ultrasonic echo digital signals exceeding the preset appointed interval, performing gain adjustment on the ultrasonic echo analog signals corresponding to the ultrasonic echo digital signals by adopting preset parameters.

Specifically, according to a preset appointed interval, a plurality of data sampled from the ultrasonic echo digital signal can be known, several data are in the preset appointed interval, and according to the total number of sampling points in the ultrasonic echo digital signal, the number of data corresponding to the sampling points can be calculated and calculated out. For example, 1024 points are sampled from the ultrasonic echo digital signal, where 500 points correspond to data within a preset convention interval, and 524 points correspond to data beyond the preset convention interval. Finally, the digital voltage value (preset parameter) input by the second digital-to-analog converter 90 is adjusted to be equivalent to the analog voltage value (V) output by the second digital-to-analog converter 90DAC2) And performing gain adjustment on the ultrasonic echo analog signal corresponding to the ultrasonic echo digital signal.

Fig. 3 is a schematic flowchart of another method for processing an ultrasonic echo signal according to an embodiment of the present application, and as shown in fig. 3, the method may include:

s301, comparing the number of first data in the ultrasonic echo digital signal, which is smaller than the minimum value of a preset appointed interval, with the number of second data in the ultrasonic echo digital signal, which is larger than the maximum value of the preset appointed interval.

Specifically, when the number of the data sampled from the ultrasonic echo digital signal exceeds the preset default interval is known, the number of the first data smaller than the minimum value of the preset default interval and the number of the second data larger than the maximum value of the preset default interval can be obtained from the number of the data exceeding the preset default interval.

For example, given a predetermined appointment interval (1023-3071), the number of the plurality of data sampled from the ultrasonic echo digital signal exceeding the predetermined appointment interval is 524, wherein, of the 524 sampling points, the number of the sampling points smaller than the minimum value (1023) in the predetermined appointment interval is taken as the first data number, and the number of the sampling points larger than the maximum value (3071) in the predetermined appointment interval is taken as the second data number.

And S302, if the number of the first data is larger than that of the second data, performing gain amplification adjustment on the ultrasonic echo analog signal corresponding to the ultrasonic echo digital signal by adopting a first preset parameter.

Specifically, when the number (first data number) of the sampling points smaller than the minimum value (1023) in the preset agreed interval is greater than the number (second data number) of the sampling points of the maximum value (3071) in the preset agreed interval, it is described that the gain multiple of the gain adjuster 70 at this time is too small, and the gain multiple of the gain adjuster 70 needs to be amplified, the digital voltage value input by the second digital-to-analog converter 90 is increased, so as to amplify the gain multiple of the gain adjuster 70, and the gain adjuster 70 performs gain amplification adjustment on the ultrasonic echo analog signal corresponding to the ultrasonic echo digital signal again by using the amplified gain multiple.

And S303, if the number of the first data is smaller than that of the second data, performing gain reduction adjustment on the ultrasonic echo analog signal corresponding to the ultrasonic echo digital signal by adopting a second preset parameter.

Specifically, when the number (first data number) of the sampling points smaller than the minimum value (1023) in the preset agreed interval is smaller than the number (second data number) of the sampling points of the maximum value (3071) in the preset agreed interval, it is described that the gain multiple of the gain adjuster 70 at this time is too large, and the gain multiple of the gain adjuster 70 needs to be reduced, the digital voltage value input by the second digital-to-analog converter 90 is reduced, so that the gain multiple of the gain adjuster 70 is reduced, and the gain adjuster 70 performs gain reduction adjustment on the ultrasonic echo analog signal corresponding to the ultrasonic echo digital signal again by using the reduced gain multiple.

It can be seen that, by adjusting the gain multiple in the gain adjuster 70, the number of the plurality of data sampled by the ultrasonic echo digital signal in the preset appointed interval is greater than the preset minimum allowable number, so that the accuracy of the ultrasonic echo digital signal is improved, and the calculated liquid flow rate is more accurate.

Fig. 4 is a schematic flow chart of another method for processing ultrasonic echo signals according to an embodiment of the present application, where in step S203, the calculating is performed by using the ultrasonic echo digital signals of which the number of the sampled data in the preset appointed interval is greater than the minimum allowable number, so as to obtain flow rate data, and the method includes:

s401, determining the number of preset appointed intervals according to a preset sampling depth and a preset sampling frequency, wherein the value of the sampling depth is an integer larger than 1.

Specifically, the processor 10 may sample the ultrasound echo digital signal output by the analog-to-digital converter 80 in a preset appointed interval according to a preset sampling depth n, and may sample data of n points in total, where the value of the sampling depth n is an integer greater than 1 and may be 4096. Then, according to the multiple (for example, 32 times) of increasing the preset sampling frequency, the sampling depth can be increased to 32n, that is, data of 32n points of sampling the ultrasonic echo digital signal in the preset appointed interval can be determined.

S402, according to the number of the preset appointed intervals, performing super-frequency sampling filtering processing on the ultrasonic echo digital signals.

Specifically, after determining that the number of sampling points of the ultrasonic echo digital signal obtained by performing multiple sampling after gain adjustment in the preset appointed interval is 32n, data at the sampling points of the ultrasonic echo digital signal can be represented in the following form: sdata0, Sdata1, Sdata2, Sdata3, Sdata4, Sdata5 … … Sdata32 n-1. The data at the acquired sampling point can be subjected to super-frequency sampling filtering: firstly, the 32n acquired data are grouped, and can be divided into n groups, and the 32 data in each group are expressed as follows: the group 1 data are: sdata0, Sdata1, Sdata2, … … Sdata 31; the group 2 data are: sdata32, Sdata33, Sdata34 … … Sdata 63; … …, respectively; the nth data set is: sdata31n, Sdata31n +1, Sdata31n +2 … … Sdata31n + 31. And then sorting the data in each group in a sequence from small to large or from large to small, wherein the sorted data is represented as follows: the group 1 data are: ldata0, Ldata1, Ldata2 … … Ldata 31; the group 2 data are: ldata32, Ldata33, Ldata34 … … Ldata 63; … …, respectively; the nth data set is: ldata31n, Ldata31n +1, Ldata31n +2 … … Ldata31n + 31. Finally, performing in-group screening on the n groups of reordered data, namely performing filtering, and calculating the sum of a plurality of intermediate data in each group, for example, calculating the sum of 16 intermediate data in each group of data to obtain n data (Cdatan-1), that is: cdata0, Cdata1, Cdata2, Cdata3, Cdata4, Cdata5, … … Cdata-1.

Wherein: cdata0 ═ Ldata8+ Ldata9+ Ldata10+ … … Ldata23

Cdata1=Ldata40+Ldata41+Ldata42+……Ldata55

……

Cdatan-1=Ldata31n+8+Ldata31n+9+……Ldata31n+23

The obtained n data (Cdatan-1) are averaged to obtain n averaged data (Zdatan-1), which can be expressed as follows: zdata0, Zdata1, Zdata2, Zdata3, Zdata4, Zdata5 … … Zdatan-1. Corresponding to a four-bit right shift of the n data (Cdaan-1) obtained, namely: zdata0 is Cdata0 right shifted by 4 bits; zdata1 is Cdata1 right shifted by 4 bits; … …, respectively; zdatan-1 ═ Ccatan-1 was right-shifted by 4. By adopting the ultra-frequency sampling filtering technology, the sampling depth can be improved, the noise of the ultrasonic echo digital signal is reduced, the precision of the ultrasonic echo digital signal is improved, and the calculated liquid flow rate is more accurate.

And S403, calculating flow rate data according to the data obtained by the super-frequency sampling filtering processing.

Specifically, after the super-frequency sampling filtering processing, a new ultrasonic echo digital signal can be obtained, and the new ultrasonic echo digital signal can be modulated by adopting an orthogonal homologous dual-path modulation technology, that is, the new ultrasonic echo digital signal is divided into two paths to be subjected to IQ modulation, so that an I-path modulated signal and a Q-path modulated signal are formed. The carrier frequency in the I path is the same as the frequency of the ultrasonic wave transmission signal transmitted from the ultrasonic wave transmission sensor 50, and the carrier frequency in the Q path is the same as the carrier frequency in the I path, and the phase difference is 90 degrees. Fig. 5 is a signal diagram of a modulated signal at a positive direction speed according to an embodiment of the present application, where, as shown in fig. 5, an I-path modulated signal 501 precedes a Q-path modulated signal 502. Fig. 6 is a signal diagram of a modulated signal at a negative directional velocity according to an embodiment of the present application, where, as shown in fig. 6, an I-path modulated signal 601 follows a Q-path modulated signal 602.

After the I and Q modulated signals are obtained, the two modulated signals may be sampled respectively, where the number of samples is n, where n is 4096 as an example, then the data sampled in the I may be represented in the following form: IFdata0, IFdata1, IFdata2, IFdata3, IFdata4 and IFdata5 … … IFdata4095, and performing Fast Fourier Transform (FFT) on the I-path modulated signal to obtain the amplitude of the corresponding data: IAdata0, IAdata1, IAdata2, IAdata3, IAdata4 and IAdata5 … … IAdata 4095. Similarly, the data sampled in the Q-path can be represented in the following form: QFDdata 0, QFDdata 1, QFDdata 2, QFDdata 3, QFDdata 4 and QFDdata 5 … … QFDdata 4095, and performing Fast Fourier Transform (FFT) on the Q-path modulated signal to obtain the amplitude of corresponding data: QATA 0, QATA 1, QATA 2, QATA 3, QATA 4 and QATA 5 … … QATA 4095. After the amplitudes of the IQ path 4096 data are obtained, the processor performs an averaging operation on the amplitudes of the IQ path data at the corresponding position, that is:

IQAdata0=(IAdata0+QAdata0)/2

IQAdata1=(IAdata1+QAdata1)/2

IQAdata2=(IAdata2+QAdata2)/2

……

IQAdata4095=(IAdata4095+QAdata4095)/2

when all data in IQAdata0, IQAdata1, IQAdata2, IQAdata3, IQAdata4 and IQAdata5 … … IQAdata4095 are less than IQAgate (IQAgate is a constant and equal to 36000000), the current liquid flow rate can be considered to be 0, and when the data are greater than or equal to IQAgate, the maximum data (MSdata) and the position (PSdata) corresponding to the data are found, that is: MSdata MAX (IQAdata)0,IQAdata1,IQAdata2,IQAdata3……IQAdata4095)

From the position (PSdata) corresponding to the maximum data (MSdata), the corresponding maximum flow rate can be calculated by:

Figure BDA0002437135400000201

where MAXSpeed is the maximum flow rate of the liquid, fsFor the sampling rate, C is the speed of the ultrasonic wave in water (1500m/s), f is the ultrasonic wave sending signal frequency (e.g. 1MHZ), n is the number of points sampled by the fast Fourier algorithm (e.g. 4096), and cosA is the angle correction coefficient.

From the maximum flow rate of the liquid (MAXSpeed), the average flow rate of the liquid can be calculated by:

AVGSpeed=MAXSpeed*Q

where AVGSpeed is the average flow rate of the liquid and Q is the conversion factor (0.75).

As can be seen from the above, by modulating the ultrasonic echo number by the orthonormal two-way modulation method, not only the flow velocity of the liquid can be calculated, but also the direction of the flow velocity can be determined, and the calculated flow velocity of the liquid has high accuracy, and the flow data calculated by using the flow velocity is more accurate and has better stability.

Fig. 7 is a schematic structural diagram of an apparatus for processing an ultrasonic echo signal according to an embodiment of the present application, and as shown in fig. 7, the apparatus may include:

a judging module 701, configured to judge whether the number of the plurality of data sampled from the ultrasonic echo digital signal in each time in a preset appointed interval is greater than a preset minimum allowable number;

an adjusting module 702, configured to, if the number of the plurality of data sampled from the ultrasonic echo digital signal in the preset agreed interval is smaller than or equal to the minimum allowable number at each time, perform gain adjustment on the ultrasonic echo analog signal corresponding to the ultrasonic echo digital signal by using a preset parameter, so that the number of the plurality of data sampled from the gain-adjusted ultrasonic echo digital signal in the preset agreed interval is greater than the minimum allowable number;

the calculating module 703 is configured to calculate, by using the ultrasonic echo digital signals of which the number of the sampled data in the preset appointed interval is greater than the minimum allowable number, the flow rate data is obtained.

Optionally, the adjusting module 702 is specifically configured to:

and according to the number of the ultrasonic echo digital signals exceeding the preset appointed interval, performing gain adjustment on the ultrasonic echo analog signals corresponding to the ultrasonic echo digital signals by adopting preset parameters.

Fig. 8 is a schematic structural diagram of another ultrasonic echo signal processing apparatus according to an embodiment of the present application, and as shown in fig. 8, the adjusting module 702 includes: a comparison module 801, a first adjustment module 802, and a second adjustment module 803, wherein:

the comparing module 801 is configured to compare the number of first data in the ultrasonic echo digital signal, where the first data is smaller than the minimum value of a preset agreed interval, with the number of second data in the ultrasonic echo digital signal, where the second data is larger than the maximum value of the preset agreed interval.

The first adjusting module 802 is configured to perform gain amplification adjustment on the ultrasonic echo analog signal corresponding to the ultrasonic echo digital signal by using a first preset parameter if the number of the first data is greater than the number of the second data.

The second adjusting module 803 is configured to perform gain reduction adjustment on the ultrasonic echo analog signal corresponding to the ultrasonic echo digital signal by using a second preset parameter if the number of the first data is smaller than the number of the second data.

Fig. 9 is a schematic structural diagram of another apparatus for processing an ultrasonic echo signal according to an embodiment of the present application, and as shown in fig. 9, the calculating module 603 includes: a determining module 901, a processing module 902, and a first calculating module 903, wherein:

a determining module 901, configured to determine the number of preset appointed intervals according to a preset sampling depth and a preset sampling frequency, where the value of the sampling depth is an integer greater than 1;

the processing module 902 is configured to perform super-frequency sampling filtering processing on the ultrasonic echo digital signal according to the number of preset appointed intervals;

a first calculating module 903, configured to calculate the flow rate data according to data obtained through filtering processing of the super-frequency samples.

Optionally, the calculating module 603 is further specifically configured to:

modulating data obtained by filtering processing of the super-frequency sampling by adopting an orthogonal homologous double-path modulation mode;

flow rate data is calculated from the modulated data.

The above-mentioned apparatus is used for executing the method provided by the foregoing embodiment, and the implementation principle and technical effect are similar, which are not described herein again.

These above modules may be one or more integrated circuits configured to implement the above methods, such as: one or more Application Specific Integrated Circuits (ASICs), or one or more microprocessors (DSPs), or one or more Field Programmable Gate Arrays (FPGAs), among others. For another example, when one of the above modules is implemented in the form of a processing element scheduler code, the processing element may be a general-purpose processor, such as a Central Processing Unit (CPU) or other processor capable of calling program code. For another example, these modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).

Fig. 10 is a schematic structural diagram of a flow meter according to an embodiment of the present application, where as shown in fig. 10, the flow meter may include: the ultrasonic echo signal processing method comprises a processor 1001, a storage medium 1002 and a bus 1003, wherein the storage medium 1002 stores machine readable instructions executable by the processor 1001, when the flow meter runs, the processor 1001 is communicated with the storage medium 1002 through the bus 1003, and the processor 1001 executes the machine readable instructions to execute the steps of the ultrasonic echo signal processing method. The specific implementation and technical effects are similar, and are not described herein again.

It should be noted that both the processor 1001 and the storage medium 1002 may be integrated in the processor 10 of the flow meter in fig. 1, and the storage medium 1002 may also be a separate external memory, that is, connected to the processor 1001 and disposed in the flow meter.

Optionally, the present application further provides a storage medium, in which a computer program is stored, and when the computer program is executed by a processor, the steps of the processing method for the ultrasonic echo signal are executed.

In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.

The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.

In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.

The integrated unit implemented in the form of a software functional unit may be stored in a computer readable storage medium. The software functional unit is stored in a storage medium and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device) or a processor (processor) to perform some steps of the methods according to the embodiments of the present application. And the aforementioned storage medium includes: a U disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.

It is noted that, in this document, relational terms such as "first" and "second," and the like, may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.

The above description is only a preferred embodiment of the present application and is not intended to limit the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application. It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures. The above description is only a preferred embodiment of the present application and is not intended to limit the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application.

20页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:LDV测量圆管内部二维流场的装置

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!