Echo signal processing method, integrated circuit chip and ultrasonic flowmeter
By using the built-in analog-to-digital converter in the integrated circuit chip to control the starting time and storage rules of the acquisition cycle, the problems of high circuit design cost and signal interference in the ultrasonic flowmeter are solved, and effective echo signal processing is achieved.
Patent Information
- Application Number
- CN202511207900.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-27
- Publication Date
- 2025-10-03
- Estimated Expiration
- 2045-08-27
AI Technical Summary
Existing ultrasonic flowmeters require the use of external high-speed analog-to-digital converters, which leads to high circuit design requirements and high costs, and are prone to signal interference during high-speed transmission.
An integrated circuit chip with a built-in analog-to-digital converter is used. By controlling the analog-to-digital converter to delay the first preset time at the start of each acquisition cycle, the echo signal is obtained and the acquired data is stored according to a predetermined storage rule until the data of M acquisition cycles are stored in the cache area, thereby realizing the arrangement of the restored waveform.
The high requirements and cost of circuit design for an external high-speed analog-to-digital converter are avoided, signal interference is reduced, and effective processing of echo signals is achieved.
Smart Images

Figure CN120742287A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of echo signal processing, and in particular to an echo signal processing method, an integrated circuit chip, and an ultrasonic flowmeter. Background Art
[0002] With the advancement of Industry 4.0, ultrasonic flowmeters, as core process monitoring instruments, have gradually replaced traditional mechanical flowmeters and become key infrastructure in water treatment, petrochemical and other fields.
[0003] Ultrasonic flow meters generally use phase methods or Fourier transform processing to calculate the time difference to obtain the flow rate. Before data processing, the echo signal will be collected and processed, and the echo signal will be restored to obtain a restored waveform, and then feature points will be extracted or calculations will be performed.
[0004] However, existing ultrasonic flow meters require the use of an external high-speed analog to digital converter (ADC). This external high-speed ADC has high requirements for circuit design, is costly, and is prone to signal interference during high-speed transmission. Summary of the Invention
[0005] In view of this, the embodiments of the present application provide an echo signal processing method, an integrated circuit chip and an ultrasonic flow meter to solve the problem in the prior art that the external high-speed analog-to-digital converter has high requirements for circuit design and high cost, or there is signal interference in high-speed transmission.
[0006] A first aspect of an embodiment of the present application provides an echo signal processing method, which is applied to an ultrasonic flowmeter. The ultrasonic flowmeter includes an integrated circuit chip with an analog-to-digital converter. The method includes: Acquire the echo signal, and control the analog-to-digital converter to acquire the echo signal based on the acquisition start time of each acquisition cycle and a preset acquisition time interval to obtain N acquisition data; wherein the acquisition start time of the subsequent acquisition cycle is delayed by a first preset time length compared to the acquisition start time of the previous acquisition cycle; Based on a predetermined storage rule, the collected data of each collection cycle is stored until the collected data of M collection cycles are stored in corresponding positions of the buffer area; wherein the predetermined storage rule includes: the N collected data of each collection cycle are sequentially spaced at least M positions apart, and each collected data of a subsequent collection cycle is stored after the collected data corresponding to the previous collection cycle; Based on the positions of the collected data of the M collection cycles in the buffer area, the collected data are arranged in sequence to obtain a restored waveform.
[0007] In one possible implementation, before acquiring the echo signal and controlling the analog-to-digital converter to acquire the echo signal based on the acquisition start time of each acquisition cycle and the preset acquisition time interval to obtain N acquired data, the method further includes: Acquire the echo signal, and perform a waveform search operation based on the echo signal; Among them, the waveform search operation includes: Based on the search start time of each search cycle and the preset acquisition time interval, the analog-to-digital converter is controlled to acquire the echo signal to obtain T acquisition data; wherein T ≥ N, the search start time of the first search cycle is the preset start time, and the acquisition start time of the subsequent search cycle is delayed by a first preset time length from the acquisition start time of the previous search cycle; Based on a predetermined storage rule, the collected data of each search cycle is stored until the collected data of M search cycles are stored in the corresponding position of the buffer area; Based on the collected data of each search cycle and the position of the collected data in the buffer area, the waveform collection interval is determined; wherein the waveform collection interval includes the collection start time of the first collection cycle and the value of N.
[0008] In one possible implementation, determining a waveform acquisition interval based on the acquired data of each search cycle and the location of the acquired data in the buffer includes: In each search cycle, starting from the first collected data and working backwards, each collected data is determined to determine whether it exceeds the baseline range. Based on the position of the first collected data that exceeds the baseline range, the starting point of the search cycle and the label value of the starting point are determined; wherein the label value corresponds to the position of the buffer area; Starting from the last collected data and moving forward in sequence, determine whether each collected data exceeds the baseline range, and determine the end point of the search cycle and the label value of the end point based on the position of the first collected data that exceeds the baseline range; Determine the starting point average label value and the ending point average label value of the starting point based on the average label values of the starting points and the average label values of the ending points of the M search cycles respectively; If the starting point average label value is not within the preset value range, the search start time of the first search cycle is used as the collection start time of the first collection cycle, and the value of N is determined based on the starting point average label value and the end point average label value.
[0009] In one possible implementation, after determining the average starting point label value and the average ending point label value of the starting point based on the average label values of the starting points and the average label values of the ending points of the M search cycles, the method further includes: If the starting point average label value is within the preset value range, the starting time of the first search cycle is moved based on the starting point average label value, and the waveform search operation is continued until the waveform acquisition interval is determined.
[0010] In one possible implementation, after determining the waveform acquisition interval based on the acquired data of each search cycle and the location of the acquired data in the buffer area, the method further includes: When the total time duration of controlling the analog-to-digital converter to collect the echo signal reaches a preset time duration threshold, or when the number of restored waveforms reaches a first preset number, the waveform search operation is re-executed to determine the waveform collection interval.
[0011] In one possible implementation, the integrated circuit chip further includes a timer; Based on the acquisition start time of each acquisition cycle and the preset acquisition time interval, the analog-to-digital converter is controlled to acquire the echo signal to obtain N acquisition data including: At the start of each acquisition cycle, the timer outputs a trigger signal to start the acquisition of the echo signal by the analog-to-digital converter; According to the preset collection time interval, the analog-to-digital converter is controlled to collect the echo signal to obtain N collection data.
[0012] In one possible implementation, based on a predetermined storage rule, the collected data of each collection period is stored until the collected data of M collection periods are stored in corresponding locations of the buffer area, including: Based on a predetermined storage rule, N collected data of the current collection cycle are stored; Determining the collection start time of a subsequent collection cycle based on the collection start time of the current collection cycle and the first preset duration; Determining the number of acquisition delay offsets based on the acquisition start time of the first acquisition cycle and the acquisition start time of the next acquisition cycle; If the number of acquisition delay offsets is less than M, the acquisition data of the next acquisition cycle is stored based on a predetermined storage rule until the acquisition data of M acquisition cycles are stored in the corresponding position of the buffer area.
[0013] A second aspect of an embodiment of the present application provides an integrated circuit chip, comprising an analog-to-digital converter, a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the method of the first aspect are implemented.
[0014] A third aspect of the embodiments of the present application provides an ultrasonic flow meter, including: the integrated circuit chip of the second aspect.
[0015] A fourth aspect of an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the steps of the method of the first aspect are implemented.
[0016] Compared with the prior art, the embodiments of the present application have the following beneficial effects: The echo signal processing method of the first aspect of the embodiment of the present application can be applied to an ultrasonic flowmeter, which includes an integrated circuit chip with an analog-to-digital converter, so that the ultrasonic flowmeter can realize the processing of the echo signal using the built-in analog-to-digital converter. The embodiment of the present application can obtain the echo signal, and based on the acquisition start time of each acquisition cycle and the preset acquisition time interval, control the analog-to-digital converter to acquire the echo signal to obtain N acquisition data; based on the predetermined storage rules, the acquisition data of each acquisition cycle is stored until the acquisition data of M acquisition cycles are stored in the corresponding position of the cache area. That is, the embodiment of the present application acquires part of the data of an echo signal in each acquisition cycle, and after each acquisition cycle, the acquisition start time is delayed by the first preset time length to realize the sequential processing of M echo signals. Data acquisition, to obtain the collected data of the complete waveform, all collected data are stored in the corresponding position of the buffer area according to the predetermined storage rules.
[0017] The predetermined storage rule in this embodiment of the present application includes: N collected data in each acquisition cycle are sequentially spaced at least M positions apart, and each collected data in a subsequent acquisition cycle is stored after the collected data corresponding to the previous acquisition cycle. This storage method allows this embodiment of the present application to sequentially arrange the collected data based on their positions in the buffer area of the M acquisition cycles to obtain a restored waveform.
[0018] Because the distance between two acquisition points is large when using the integrated circuit chip's built-in analog-to-digital converter for data acquisition, direct data processing to restore the waveform is not possible. However, the echo signal processing method of the present embodiment can be applied to the built-in analog-to-digital converter for data acquisition, avoiding the high circuit design requirements and high cost of an external high-speed analog-to-digital converter, as well as the signal interference problems that may occur during high-speed transmission.
[0019] It can be understood that the beneficial effects of the second to fourth aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the embodiments or descriptions of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0021] Figure 1 is a flowchart of a method for processing an echo signal provided in an embodiment of the present application; Figure 2 This is a flowchart of a waveform search operation provided by an embodiment of the present application; Figure 3 This is a flowchart of another waveform search operation provided by an embodiment of the present application; Figure 4 This is a flowchart of searching for waveforms and formally collecting waveforms provided by an embodiment of the present application; Figure 5 is a schematic diagram of an echo signal processing device provided in an embodiment of the present application; Figure 6 Schematic diagram of an integrated circuit chip provided in an embodiment of the present application. DETAILED DESCRIPTION
[0022] In the following description, specific details such as specific system structures and techniques are provided for purposes of illustration rather than limitation to facilitate a thorough understanding of the embodiments of the present application. However, it will be apparent to those skilled in the art that the present application may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid obscuring the description of the present application with unnecessary detail.
[0023] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and / or components, but does not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or collections thereof.
[0024] It will also be understood that the term "and / or" used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
[0025] As used in this specification and the appended claims, the term "if" can be interpreted as "when" or "upon" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "upon determination" or "in response to determining" or "upon detection of [described condition or event]" or "in response to detecting [described condition or event]," depending on the context.
[0026] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.
[0027] References to "one embodiment" or "some embodiments" in this specification mean that a particular feature, structure, or characteristic described in conjunction with that embodiment is included in one or more embodiments of the present application. Thus, phrases such as "in one embodiment," "in some embodiments," "in other embodiments," and "in other embodiments" appearing in various places in this specification do not necessarily refer to the same embodiment, but rather mean "one or more but not all embodiments," unless otherwise specifically emphasized. The terms "including," "comprising," "having," and variations thereof all mean "including but not limited to," unless otherwise specifically emphasized.
[0028] Research has found that existing ultrasonic flow meters generally use an external high-speed ADC + FPGA (Field Programmable Gate Array) + DSP (Digital Signal Processing) acquisition solution, which is high in cost, power consumption, and has a significant impact from clock jitter.
[0029] Further research revealed that using a microcontroller with an ADC for data acquisition also presents practical challenges. First, directly using the microcontroller's ADC is insufficient to recover the entire waveform and subsequently extract features. This is because the distance between two points captured by the ADC is very large (at a 5Msps ADC conversion rate, the distance between two points is 200ns); ideally, the distance between two points is less than 15ns to ensure that the recovered waveform can be processed. Therefore, existing technologies generally use high-speed external ADCs to capture the entire waveform in one go. However, external ADCs require very high circuit design requirements, are easily interfered with during high-speed transmission, and are costly.
[0030] The echo signal processing method, integrated circuit chip and ultrasonic flowmeter provided in the embodiments of the present application are intended to solve the above technical problems in the prior art.
[0031] The following is a detailed description of the technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems with specific embodiments. It should be noted that the following embodiments can refer to, draw on, or combine with each other, and the same terms, similar features, and similar implementation steps in different embodiments will not be repeated.
[0032] See also Figure 1 As shown, the embodiment of the present application provides a flow chart of a method for processing an echo signal. The method for processing an echo signal in the embodiment of the present application is applied to an ultrasonic flow meter, which includes an integrated circuit chip with an analog-to-digital converter. Figure 1 As shown, the method for processing the echo signal includes: steps S101 to S103.
[0033] S101. Acquire an echo signal, and based on the acquisition start time of each acquisition cycle and a preset acquisition time interval, control an analog-to-digital converter to acquire the echo signal to obtain N acquisition data; wherein the acquisition start time of the subsequent acquisition cycle is delayed by a first preset time length compared to the acquisition start time of the previous acquisition cycle.
[0034] Optionally, the collection time interval and the first preset duration are both preset according to the ultrasonic flow meter and the analog-to-digital converter.
[0035] The acquisition start time of the first acquisition cycle is known and can be pre-set or obtained through a waveform acquisition test, for example, by performing a waveform search operation to determine a waveform interval in the embodiment of the present application. The acquisition start time of each of the other acquisition cycles is obtained by offsetting the acquisition start time of the previous acquisition cycle by the first preset time duration.
[0036] In some embodiments, the integrated circuit chip further includes a timer; based on the acquisition start time of each acquisition cycle and a preset acquisition time interval, the timer controls the analog-to-digital converter to acquire the echo signal, and obtains N acquired data including: At the start of each acquisition cycle, the timer outputs a trigger signal to start the acquisition of the echo signal by the analog-to-digital converter; According to the preset collection time interval, the analog-to-digital converter is controlled to collect the echo signal to obtain N collection data.
[0037] The embodiment of the present application adopts a method of using a timer to output a trigger signal to trigger an analog-to-digital converter to start acquisition, combining the timer and the analog-to-digital converter to achieve data acquisition.
[0038] The integrated circuit chip may be a single chip microcomputer with an analog-to-digital converter and a timer.
[0039] S102. Based on a predetermined storage rule, the collected data of each collection cycle is stored until the collected data of M collection cycles are stored in corresponding positions in the cache area; wherein the predetermined storage rule includes: the N collected data of each collection cycle are sequentially spaced at least M positions apart, and each collected data of the subsequent collection cycle is stored after the collected data corresponding to the previous collection cycle.
[0040] Optionally, M acquisition cycles are used as one acquisition cycle to obtain complete waveform data. M and N are both positive integers, where M is a preset value and N can be a preset value or obtained by performing a waveform acquisition test, for example, by performing a waveform search operation to determine a waveform interval in the embodiment of the present application.
[0041] Optionally, the predetermined storage rule includes: N collected data of each collection period are sequentially spaced apart by M positions, and each collected data of a subsequent collection period is stored in a position subsequent to the collected data corresponding to a previous collection period.
[0042] In the embodiment of the present application, data can be stored after the data is collected in each collection cycle, and then the data is collected and stored in the next collection cycle. In the embodiment of the present application, data can also be stored after completing M collection cycles of data collection.
[0043] In some embodiments, based on a predetermined storage rule, the collected data of each collection period is stored until the collected data of M collection periods are stored in a corresponding position of the buffer area, including: Based on a predetermined storage rule, N collected data of the current collection cycle are stored; Determining the collection start time of a subsequent collection cycle based on the collection start time of the current collection cycle and the first preset duration; Determining the number of acquisition delay offsets based on the acquisition start time of the first acquisition cycle and the acquisition start time of the next acquisition cycle; If the number of acquisition delay offsets is less than M, the acquisition data of the next acquisition cycle is stored based on a predetermined storage rule until the acquisition data of M acquisition cycles are stored in the corresponding position of the buffer area.
[0044] Optionally, if the number of acquisition delay offsets is less than M, the acquisition data of the next acquisition cycle is stored based on a predetermined storage rule until the acquisition data of M acquisition cycles are stored in a corresponding position in the buffer area, including: If the number of acquisition delay offsets is less than M, the analog-to-digital converter is controlled to acquire the echo signal based on the acquisition start time of the next acquisition cycle and the preset acquisition time interval to obtain N acquisition data. Based on the predetermined storage rules, the acquisition data of each acquisition cycle is stored until the acquisition data of M acquisition cycles are stored in the corresponding position of the cache area.
[0045] Taking into account the slow liquid transformation characteristics of ultrasonic flowmeters when measuring liquid flow, the embodiment of the present application splits the entire waveform into multiple parts, and only collects a portion in each acquisition cycle. A timer generates a trigger signal to trigger the analog-to-digital converter to collect data. After each acquisition cycle is completed, the trigger signal is offset backward for a period of time determined by the timer. After the offset, the analog-to-digital converter continues to trigger acquisition until the entire waveform is collected.
[0046] S103 , based on the positions of the collected data of the M collection cycles in the buffer area, arranging the collected data in sequence to obtain a restored waveform.
[0047] The method for processing echo signals in the embodiment of the present application can be applied to ultrasonic flow meters. The ultrasonic flow meter includes an integrated circuit chip with an analog-to-digital converter, so that the ultrasonic flow meter can process echo signals using a built-in analog-to-digital converter. The embodiment of the present application can obtain echo signals, and based on the acquisition start time of each acquisition cycle and the preset acquisition time interval, control the analog-to-digital converter to acquire echo signals to obtain N acquisition data; based on predetermined storage rules, the acquisition data of each acquisition cycle is stored until the acquisition data of M acquisition cycles are stored in the corresponding position of the cache area. That is, the embodiment of the present application acquires partial data for an echo signal in each acquisition cycle, and after each acquisition cycle, the acquisition start time is delayed by a first preset time length to realize sequential processing of M echo signals. Data acquisition, to obtain the collected data of the complete waveform, all collected data are stored in the corresponding position of the buffer area according to the predetermined storage rules.
[0048] The predetermined storage rule in this embodiment of the present application includes: N collected data in each acquisition cycle are sequentially spaced at least M positions apart, and each collected data in a subsequent acquisition cycle is stored after the collected data corresponding to the previous acquisition cycle. This storage method allows this embodiment of the present application to sequentially arrange the collected data based on their positions in the buffer area of the M acquisition cycles to obtain a restored waveform.
[0049] Because the distance between two acquisition points is large when using the integrated circuit chip's built-in analog-to-digital converter for data acquisition, direct data processing to restore the waveform is not possible. However, the echo signal processing method of the present embodiment can be applied to the built-in analog-to-digital converter for data acquisition, avoiding the high circuit design requirements and high cost of an external high-speed analog-to-digital converter, as well as the signal interference problems that may occur during high-speed transmission.
[0050] In some embodiments, the echo signal is acquired, and based on the acquisition start time of each acquisition cycle and the preset acquisition time interval, the analog-to-digital converter is controlled to acquire the echo signal. Before obtaining N acquisition data, it also includes: acquiring the echo signal, and performing a waveform search operation based on the echo signal.
[0051] See also Figure 2 As shown, the embodiment of the present application provides a flowchart of a waveform search operation. Figure 2 As shown, the waveform search operation includes: steps S201 to S203.
[0052] S201. Based on the search start time of each search cycle and the preset acquisition time interval, control the analog-to-digital converter to acquire the echo signal to obtain T acquisition data; wherein, T ≥ N, the search start time of the first search cycle is the preset start time, and the acquisition start time of the subsequent search cycle is delayed by the first preset time length than the acquisition start time of the previous search cycle.
[0053] S202 : Based on a predetermined storage rule, the collected data of each search cycle is stored until the collected data of M search cycles are stored in corresponding positions of the buffer area.
[0054] S203 , determining a waveform acquisition interval based on the acquired data of each search cycle and the location of the acquired data in the buffer area; wherein the waveform acquisition interval includes the acquisition start time of the first acquisition cycle and the value of N.
[0055] In the embodiment of the present application, the steps of searching for waveforms and determining waveform intervals can be performed before data acquisition and processing. By performing the waveform search operation on the echo signal to determine the waveform interval, and determining the acquisition start time and the value of N for the first acquisition cycle, it is convenient to start formal waveform acquisition.
[0056] The waveform search operation performed in the embodiment of the present application is consistent with the processing principles of step S101 and step S102 in the embodiment of the present application.
[0057] In some embodiments, determining the waveform acquisition interval based on the acquired data of each search cycle and the location of the acquired data in the buffer area includes: In each search cycle, starting from the first collected data and working backwards, each collected data is determined to determine whether it exceeds the baseline range. Based on the position of the first collected data that exceeds the baseline range, the starting point of the search cycle and the label value of the starting point are determined; wherein the label value corresponds to the position of the buffer area; Starting from the last collected data and moving forward in sequence, determine whether each collected data exceeds the baseline range, and determine the end point of the search cycle and the label value of the end point based on the position of the first collected data that exceeds the baseline range; Based on the average of the label values of the starting points and the average of the label values of the end points of the M search cycles, determine the starting point average label value and the end point average label value of the starting point respectively; If the starting point average label value is not within the preset value range, the search start time of the first search cycle is used as the collection start time of the first collection cycle, and the value of N is determined based on the starting point average label value and the end point average label value.
[0058] Optionally, the locations in the buffer area can be numbered 1, 2, 3, 4, ... The starting point's number is the number of the location where the corresponding collected data is located. The value of N is determined based on the average number of the starting point and the average number of the ending point. The number of collection points between the average number of the starting point and the average number of the ending point can be used as the value of N.
[0059] The embodiment of the present application can determine the starting point average label value of the starting point and the end point average label value of the end point of M search cycles to determine whether they meet the waveform specifications, for example: whether the starting point is at the front of the waveform. If the starting point is in the middle of the waveform, the entire interval is moved forward, etc., until the sampling interval contains the complete waveform, the position of the waveform and the true starting point and end point of the waveform can be determined.
[0060] As an example, the average label value of the starting point is not within the preset numerical range, for example, the preset numerical range is 1-2 (including the endpoint value). If the average label value of the starting point is not within the range of 1-2, the starting point is not at the front of the waveform, and the search start time of the first search cycle in each cycle of this round of M can be used as the acquisition start time of the first acquisition cycle.
[0061] In some embodiments, after determining the average starting point label value and the average ending point label value of the starting point based on the average label values of the starting points and the average label values of the ending points of the M search cycles, the method further includes: If the starting point average label value is within the preset value range, the starting time of the first search cycle is moved based on the starting point average label value, and the waveform search operation is continued until the waveform acquisition interval is determined.
[0062] As an example, the starting point average label value is not within the preset numerical range, for example, the preset numerical range is 1-2. If the starting point average label value is within the range of 1-2, the starting point is at the front of the waveform, and the starting time of the first search cycle needs to be moved forward, and the waveform search operation continues until the starting point average label value is no longer within the preset numerical range, and the waveform acquisition interval is determined.
[0063] The preset numerical range may include multiple sub-ranges, for example, the preset numerical range may also be 100-120.
[0064] During the waveform search phase, if the average starting point index value is greater than 100 (for example, there are 120 points in total), it means that the starting point of the complete waveform is after the current sampling interval. The current sampling interval cannot capture the complete waveform. In this case, the start time of the first search cycle needs to be moved back so that the trigger point can be moved back when the next search cycle is collected.
[0065] In the embodiment of the present application, the starting time of the first search cycle can be moved forward or backward by a second preset time length based on the average label value of the starting point to continue the waveform search operation.
[0066] It can be imagined that the embodiment of the present application can also adopt the numerical range in which the starting point average label value is required to be set as the preset numerical range. The starting point average label value is within this preset numerical range, indicating that the current sampling interval can collect the complete waveform, and the search start time of the first search cycle can be used as the collection start time of the first collection cycle.
[0067] In some embodiments, after determining the waveform acquisition interval based on the acquired data of each search cycle and the location of the acquired data in the buffer area, the method further includes: When the total time duration of controlling the analog-to-digital converter to collect the echo signal reaches a preset time duration threshold, or when the number of restored waveforms reaches a first preset number, the waveform search operation is re-executed to determine the waveform collection interval.
[0068] In the embodiment of the present application, after acquiring waveforms for a period of time, for example, after the total acquisition time reaches the preset time threshold of 5S, or after 1000 restored waveforms are obtained, it is necessary to reconfirm the waveform interval to prevent the position of the waveform from changing after the flow rate changes. In this way, the waveform interval can be acquired in real time to ensure a complete waveform.
[0069] As an example, the embodiment of the present application first calculates specific parameters. For example, if the timer frequency of the microcontroller is 100 MHz (megahertz) and the sampling conversion speed of the ADC is 5 Msps, then it can be concluded that the distance between the two points is 10 ns, and 20 acquisition cycles are required for one acquisition. Based on the length of the waveform, it can be determined how many points need to be collected for one ADC acquisition. For example, the ultrasonic echo signal is generally 24 us long, so the ADC collects 120 points at a time. Assuming that the period of transmitting ultrasonic waves is 250 us, after writing these data into the program, the acquisition can be started.
[0070] The echo signal processing process of the embodiment of the present application includes a waveform search stage and a formal acquisition stage. In order to reduce the data processing time, the same logical processing is used, 120 points are collected each time, and a timer trigger signal is sent to trigger ADC acquisition.
[0071] See also Figure 3 As shown, the embodiment of the present application provides a flowchart of another waveform search operation. The waveform search stage is to use the waveform search operation of the embodiment of the present application. Figure 4 As shown, the embodiment of the present application provides a flowchart for searching for waveforms and formally collecting waveforms. Figure 4 The starting point and end point in correspond to the starting time and ending time of data collection respectively.
[0072] See also Figure 3 As shown, the waveform search operation includes: (1) Waveform search stage At the start of the search cycle, a trigger signal is sent to trigger the ADC acquisition. 120 points are collected at a time, with a distance of 200ns between each two points. The collected data is placed in the buffer area, and the data is traversed from the beginning. It is compared with the known baseline to see if the value exceeds the baseline range. If the first point exceeds the range, then record START1=1 (that is, the label value of the starting point). If it does not exceed the range, continue to compare the second point, and so on, until a point exceeds the baseline range.
[0073] After finding the starting point, the data is traversed from the end, repeating the search for the starting point until the end point is found and recorded as END1 = A (the end point's label value). After finding the first two points, the trigger signal is offset backward by 10ns. The ADC is then checked to see if the offset exceeds the specified number of times (in this example, 20 search cycles). If not, the ADC is sampled again, repeating the previous sampling steps until all values of START2, END2, START3, END3, ..., START20, and END20 are processed. These values are then averaged to obtain the unique label values for the starting point START and the end point END.
[0074] After obtaining the starting point average label value and the end point average label value, determine whether these two points meet the waveform specifications, for example, whether the starting point is at the front of the waveform. If the starting point is in the middle of the waveform, move the entire interval forward, etc., until the sampling interval contains the complete waveform, then you can determine the position of the waveform and the true starting point and end point of the waveform.
[0075] Based on the above test, the average starting point label value obtained in the first round of search cycle of the embodiment of the present application is not within the preset numerical range. The search start time of the first search cycle can be used as the collection start time of the first collection cycle, and the value of N can be the same as T, both of which are 120 points.
[0076] Combine Figure 3 and Figure 4 As shown, the embodiment of the present application also includes: (2) Formal collection stage After the waveform interval is determined, waveform acquisition officially begins. First, a trigger signal is sent at the waveform's starting point (i.e., the start of the first acquisition cycle) to trigger ADC acquisition. After acquisition is complete, the collected ADC data is placed into the buffer in a regular pattern. For example, the first data point of 120 is placed into the buffer at positions 1, 21, 41, ..., 101, and 121.
[0077] The data collected for the second time is placed in the buffer area at positions 2, 22, 42...102, 122, and so on. After the collected data is placed in the buffer area, the trigger signal is offset and then compared to see if the offset times of the trigger signal reach the prescribed number of 20 cycles. If not, ADC acquisition is continued. If this set of data is reached, the acquisition is completed.
[0078] By printing out the data in the buffer area in sequence, a complete waveform can be obtained. By comparison, the restored waveform obtained by the embodiment of the present application is basically consistent with the waveform signal measured using an actual oscilloscope.
[0079] After obtaining the complete waveform, continue to follow step (2) to obtain the subsequent complete waveform. According to the above data, one waveform takes about 5ms, which is much shorter than the time it takes for the liquid to change state, and can be applied to ultrasonic flow meters. The above steps (1) and (2) are the entire description of this method. After obtaining the complete waveform, a series of data processing can be performed on this waveform to obtain the desired phase or time-frequency characteristics.
[0080] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0081] See also Figure 5 As shown in FIG, an embodiment of the present application provides a schematic structural diagram of an echo signal processing device 50. The echo signal processing device 50 is applied to an ultrasonic flow meter, which includes an integrated circuit chip with an analog-to-digital converter, such as Figure 5 As shown, the echo signal processing device 50 includes: an acquisition module 501 , a storage module 502 and a processing module 503 .
[0082] The acquisition module 501 is used to acquire echo signals and control the analog-to-digital converter to acquire the echo signals based on the acquisition start time of each acquisition cycle and a preset acquisition time interval to obtain N acquisition data; wherein the acquisition start time of the subsequent acquisition cycle is delayed by a first preset time length compared to the acquisition start time of the previous acquisition cycle; The storage module 502 is configured to store the collected data of each collection cycle based on a predetermined storage rule until the collected data of M collection cycles are stored in corresponding locations in the buffer area; wherein the predetermined storage rule includes: the N collected data of each collection cycle are sequentially spaced at least M locations apart, and each collected data of a subsequent collection cycle is stored after the collected data corresponding to the previous collection cycle; The processing module 503 is used to arrange the collected data in sequence based on the positions of the collected data of the M collection cycles in the buffer area to obtain a restored waveform.
[0083] Optionally, the acquisition module 501 is used to acquire the echo signal and, based on the echo signal, perform the following waveform search operation: based on the search start time of each search cycle and the preset acquisition time interval, control the analog-to-digital converter to acquire the echo signal to obtain T acquisition data; wherein, T≥N, the search start time of the first search cycle is the preset start time, and the acquisition start time of the subsequent search cycle is delayed by the first preset time length than the acquisition start time of the previous search cycle.
[0084] The storage module 502 is configured to store the collected data of each search cycle based on a predetermined storage rule until the collected data of M search cycles are stored in corresponding locations in the buffer area.
[0085] The processing module 503 is used to determine the waveform acquisition interval based on the acquisition data of each search cycle and the location of the acquisition data in the buffer area; wherein the waveform acquisition interval includes the acquisition start time of the first acquisition cycle and the value of N.
[0086] Optionally, the processing module 503 is used to determine whether each acquired data exceeds the baseline range in each search cycle, starting from the first acquired data and working backward, and determine the starting point of the search cycle and the label value of the starting point based on the position of the first acquired data that exceeds the baseline range; wherein the label value corresponds to the position of the buffer area; starting from the last acquired data and working forward, determine whether each acquired data exceeds the baseline range, and determine the end point of the search cycle and the label value of the end point based on the position of the first acquired data that exceeds the baseline range; based on the average value of the label value of the starting point and the average value of the label value of the end point of M search cycles, determine the starting point average label value of the starting point and the end point average label value of the end point respectively; if the starting point average label value is not within the preset value range, the search start time of the first search cycle is used as the acquisition start time of the first acquisition cycle, and the value of N is determined based on the starting point average label value and the end point average label value.
[0087] Optionally, the processing module 503 is configured to move the start time of the first search cycle based on the starting point average label value if the starting point average label value is within a preset value range, and continue to perform the waveform search operation until the waveform acquisition interval is determined.
[0088] Optionally, the processing module 503 is used to re-execute the waveform search operation and determine the waveform acquisition interval when the total time length of controlling the analog-to-digital converter to acquire the echo signal reaches a preset time length threshold, or when the number of restored waveforms reaches a first preset number.
[0089] Optionally, the integrated circuit chip also includes a timer; the acquisition module 501 is used to output a trigger signal through the timer at the start of each acquisition cycle to start the acquisition of the echo signal by the analog-to-digital converter; according to the preset acquisition time interval, the analog-to-digital converter is controlled to acquire the echo signal to obtain N acquisition data.
[0090] Optionally, the storage module 502 is used to store N acquisition data of the current acquisition cycle based on predetermined storage rules; determine the acquisition start time of the next acquisition cycle based on the acquisition start time of the current acquisition cycle and the first preset duration; determine the number of acquisition delay offsets based on the acquisition start time of the first acquisition cycle and the acquisition start time of the next acquisition cycle; if the number of acquisition delay offsets is less than M, store the acquisition data of the next acquisition cycle based on the predetermined storage rules, until the acquisition data of M acquisition cycles are stored in the corresponding position of the cache area.
[0091] In application, each module in the echo signal processing device 50 may be a software program module, or may be implemented by different logic circuits integrated in a processor, or may be implemented by multiple distributed processors.
[0092] The echo signal processing device 50 of the embodiment of the present application can execute the method provided by the embodiment of the present application, and its implementation principle is similar. The actions performed by each module in the device of each embodiment of the present application correspond to the steps in the method of each embodiment of the present application. For the detailed functional description of each module of the device, please refer to the description in the corresponding method shown in the previous text, and will not be repeated here.
[0093] See also Figure 6 As shown, the embodiment of the present application provides a schematic structural diagram of an integrated circuit chip 6. Figure 6 As shown, the integrated circuit chip 6 of the embodiment of the present application includes: an analog-to-digital converter 63, a memory 61, a processor 60, and a computer program 62 stored in the memory 61 and executable on the processor 60. When the processor 60 executes the computer program, the steps of the method of each embodiment of the present application are implemented.
[0094] The integrated circuit chip 6 may include, but is not limited to, a processor 60 and a memory 61. Those skilled in the art will appreciate that Figure 6 This is only an example of the integrated circuit chip 6 and does not constitute a limitation on the integrated circuit chip 6. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, it may also include input and output devices, network access devices, etc.
[0095] The processor 60 may be a central processing unit (CPU), or other general-purpose processors, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. A general-purpose processor may be a microprocessor or any conventional processor.
[0096] In some embodiments, memory 61 may be an internal storage unit, such as a hard drive or memory. Memory 61 may be removable or non-removable, volatile or non-volatile computer system storage media. For example, memory 61 may be non-volatile memory for reading and writing non-volatile magnetic media. In other embodiments, memory 61 may also be an external storage device, such as a plug-in hard drive on the integrated circuit chip 6, a Smart Media Card (SMC), a Secure Digital (SD) card, a flash memory card, etc. Memory 61 is used to store the operating system, application programs, a boot loader, data, and other programs, such as computer program code. Memory 61 may also be used to temporarily store data that has been output or is about to be output.
[0097] An embodiment of the present application provides an ultrasonic flow meter, including: an integrated circuit chip 6.
[0098] It should be noted that the information interaction, execution process, etc. between the above-mentioned devices / units are based on the same concept as the method embodiment of this application. Their specific functions and technical effects can be found in the method embodiment section and will not be repeated here.
[0099] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0100] An embodiment of the present application further provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0101] If the above-mentioned integrated unit is implemented as a software functional unit and sold or used as a standalone product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application can implement all or part of the process steps in the above-mentioned method embodiments by using a computer program to instruct the relevant hardware. The above-mentioned computer program can be stored in a computer-readable storage medium. When executed by a processor, the computer program can implement the steps of each of the above-mentioned method embodiments. The above-mentioned computer program includes computer program code, which can be in source code form, object code form, executable file, or some intermediate form. The above-mentioned computer-readable medium can include at least: any entity or device capable of carrying computer program code to a device / terminal device, recording medium, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal, and software distribution medium. Examples include a USB flash drive, a removable hard drive, a magnetic disk, or an optical disk.
[0102] Those skilled in the art will understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing relevant hardware through a computer program. The program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a magnetic disk, an optical disk, a read-only memory (ROM), a random access memory (RAM), a flash memory, a hard disk (HDD) or a solid-state drive (SSD), etc. The storage medium can also include a combination of the above-mentioned types of memory.
[0103] An embodiment of the present application provides a computer program product. When the computer program product runs on a processor, the processor can implement the steps in the above-mentioned method embodiments when executing the computer program product.
[0104] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant description of other embodiments.
[0105] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0106] In the embodiments provided in this application, it should be understood that the disclosed devices / network equipment and methods can be implemented in other ways. For example, the device / network equipment embodiments described above are merely illustrative. For example, the division of the above modules or units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0107] The units described above as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0108] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the scope of protection of the present application.
Claims
1. A method for processing an echo signal, characterized in that: Applied to an ultrasonic flow meter, the ultrasonic flow meter includes an integrated circuit chip with an analog-to-digital converter, and the method includes: Acquire the echo signal, and control the analog-to-digital converter to acquire the echo signal based on the acquisition start time of each acquisition cycle and a preset acquisition time interval to obtain N acquisition data; wherein the acquisition start time of the subsequent acquisition cycle is delayed by a first preset time length compared to the acquisition start time of the previous acquisition cycle; Based on a predetermined storage rule, the collected data of each collection cycle is stored until the collected data of M collection cycles are stored in corresponding positions of the buffer area; wherein the predetermined storage rule includes: the N collected data of each collection cycle are sequentially spaced at least M positions apart, and each collected data of a subsequent collection cycle is stored after the collected data corresponding to the previous collection cycle; Based on the positions of the collected data of the M collection cycles in the buffer area, the collected data are arranged in sequence to obtain a restored waveform.
2. The echo signal processing method according to claim 1, characterized in that: The acquiring of the echo signal, based on the acquisition start time of each acquisition cycle and the preset acquisition time interval, controls the analog-to-digital converter to acquire the echo signal to obtain N acquisition data, and further includes: Acquire an echo signal, and perform a waveform search operation based on the echo signal; The waveform search operation includes: Based on the search start time of each search cycle and the preset acquisition time interval, controlling the analog-to-digital converter to acquire the echo signal to obtain T acquisition data; wherein T ≥ N, the search start time of the first search cycle is the preset start time, and the acquisition start time of the subsequent search cycle is delayed by a first preset time length from the acquisition start time of the previous search cycle; Based on the predetermined storage rule, the collected data of each search cycle is stored until the collected data of M search cycles are stored in the corresponding position of the buffer area; Based on the collected data of each search cycle and the position of the collected data in the buffer area, a waveform collection interval is determined; wherein the waveform collection interval includes the collection start time of the first collection cycle and the value of N.
3. The echo signal processing method according to claim 2, characterized in that: The determining of the waveform acquisition interval based on the acquired data of each search cycle and the position of the acquired data in the buffer area includes: In each search cycle, starting from the first collected data and working backwards, it is determined whether each collected data exceeds the baseline range, and based on the position of the first collected data that exceeds the baseline range, the starting point of the search cycle and the label value of the starting point are determined; wherein the label value corresponds to the position of the buffer area; Starting from the last collected data and moving forward in sequence, determining whether each collected data exceeds the baseline range, and determining the end point of the search cycle and the label value of the end point based on the position of the first collected data exceeding the baseline range; Determine a starting point average label value of the starting point and an ending point average label value of the ending point based on an average value of the label value of the starting point and an average value of the label value of the ending point in M search cycles respectively; If the starting point average label value is not within the preset value range, the search start time of the first search cycle is used as the collection start time of the first collection cycle, and the value of N is determined based on the starting point average label value and the end point average label value.
4. The echo signal processing method according to claim 3, characterized in that: After determining the starting point average label value of the starting point and the ending point average label value of the ending point based on the average label values of the starting point and the average label values of the ending point in the M search cycles, the method further includes: If the starting point average label value is within a preset value range, the starting time of the first search cycle is moved based on the starting point average label value, and the waveform search operation is continued until the waveform acquisition interval is determined.
5. The echo signal processing method according to claim 2, characterized in that: After determining the waveform acquisition interval based on the acquired data of each search cycle and the position of the acquired data in the buffer area, the method further includes: When the total time duration of controlling the analog-to-digital converter to collect the echo signal reaches a preset time duration threshold, or when the number of restored waveforms reaches a first preset number, the waveform search operation is re-executed to determine the waveform collection interval.
6. The echo signal processing method according to any one of claims 1 to 5, characterized in that: The integrated circuit chip also includes a timer; The step of controlling the analog-to-digital converter to acquire the echo signal based on the acquisition start time of each acquisition cycle and the preset acquisition time interval to obtain N acquisition data includes: At the start of each acquisition cycle, the timer outputs a trigger signal to start the acquisition of the echo signal by the analog-to-digital converter; According to a preset collection time interval, the analog-to-digital converter is controlled to collect the echo signal to obtain N collection data.
7. The echo signal processing method according to any one of claims 1 to 5, characterized in that: The storing of the collected data of each collection period based on a predetermined storage rule until the collected data of M collection periods are stored in corresponding positions of the buffer area includes: Based on a predetermined storage rule, N collected data of the current collection cycle are stored; Determining a collection start time of a subsequent collection cycle based on the collection start time of the current collection cycle and the first preset duration; Determining the number of acquisition delay offsets based on the acquisition start time of the first acquisition cycle and the acquisition start time of the next acquisition cycle; If the number of acquisition delay offsets is less than M, the acquisition data of the next acquisition cycle is stored based on a predetermined storage rule until the acquisition data of M acquisition cycles are stored in corresponding positions in the buffer area.
8. An integrated circuit chip, characterized in that: The method comprises an analog-to-digital converter, a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method according to any one of claims 1 to 7 when executing the computer program.
9. An ultrasonic flow meter, characterized in that: include: The integrated circuit chip as claimed in claim 8.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Ultrasonic flowmeter and flue gas flow measuring method thereof
CN118960882A
Adaptive filtering method based on ultrasonic metering and ultrasonic metering equipment
CN120489271A
Ultrasonic detector
US5157639A
