Processing method of echo signal, integrated circuit chip and ultrasonic flowmeter
By using an integrated circuit chip with a built-in analog-to-digital converter to control the acquisition cycle and storage rules, the high cost and signal interference problems of external analog-to-digital converters in ultrasonic flow meters are solved, achieving efficient and low-cost echo signal processing.
Patent Information
- Application Number
- CN202511207900.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-27
- Publication Date
- 2025-12-16
- Estimated Expiration
- 2045-08-27
AI Technical Summary
Existing ultrasonic flow meters require the use of an external high-speed analog-to-digital converter, which results in high circuit design requirements and costs, and is 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 start time of each acquisition cycle by a first preset duration, echo signal data is acquired and stored. The acquired data is then arranged sequentially using a predetermined storage rule to obtain the restored waveform.
This technology enables data acquisition using a built-in analog-to-digital converter, avoiding the high cost and signal interference issues associated with external high-speed analog-to-digital converters, and reducing circuit design requirements.
Smart Images

Figure CN120742287B_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
[0002] With the promotion of Industry 4.0, as a core process monitoring instrument, the ultrasonic flowmeter has gradually replaced the traditional mechanical flowmeter and become a key infrastructure in the fields of water treatment, petrochemical industry, etc.
[0003] The ultrasonic flowmeter generally uses a phase method or a Fourier transform processing to calculate a time difference so as to obtain a flow rate. Before data processing, an echo signal is collected and processed, a restored waveform is obtained by restoring the echo signal, and then a feature point is extracted or calculation is performed.
[0004] However, the existing ultrasonic flowmeter needs to use an external high-speed ADC (analog to digital converter), the external high-speed ADC has a high requirement on circuit design, has a high cost, and is prone to signal interference in high-speed transmission. SUMMARY
[0005] Therefore, the present application provides an echo signal processing method, an integrated circuit chip and an ultrasonic flowmeter to solve the problems of high requirement on circuit design and high cost of the external high-speed ADC or signal interference in high-speed transmission in the prior art.
[0006] A first aspect of the present application provides an echo signal processing method applied to an ultrasonic flowmeter, the ultrasonic flowmeter comprising an integrated circuit chip with an analog-to-digital converter, and the method comprising:
[0007] acquiring an echo signal, controlling the analog-to-digital converter to collect the echo signal based on a collection start time of each collection period and a preset collection time interval, and obtaining N collection data; wherein a collection start time of a next collection period is delayed from a collection start time of a previous collection period by a first preset time length;
[0008] storing the collection data of each collection period based on a predetermined storage rule until the collection data of M collection periods are stored in corresponding positions of a cache area; wherein the predetermined storage rule comprises that the N collection data of each collection period are sequentially spaced apart by at least M positions, and each collection data of a next collection period is stored behind the corresponding collection data of a previous collection period;
[0009] sequentially arranging the collection data based on the positions of the collection data of the M collection periods in the cache area to obtain a restored waveform.
[0010] In a possible implementation, the echo signal is acquired, and based on the acquisition start time of each acquisition period and the preset acquisition time interval, the analog-to-digital converter is controlled to acquire the echo signal to obtain N acquisition data, and before this, the method further includes:
[0011] The echo signal is acquired, and based on the echo signal, a waveform finding operation is performed.
[0012] The waveform finding operation includes:
[0013] Based on the finding start time of each finding period 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 finding start time of the first finding period is the preset start time, and the acquisition start time of a subsequent finding period is delayed from the acquisition start time of a previous finding period by a first preset time length.
[0014] Based on a predetermined storage rule, the acquisition data of each finding period is stored until the acquisition data of M finding periods is stored in the corresponding positions of the cache area.
[0015] Based on the acquisition data of each finding period and the position of the acquisition data in the cache area, a waveform acquisition interval is determined; wherein the waveform acquisition interval includes the acquisition start time of the first acquisition period and the value of N.
[0016] In a possible implementation, based on the acquisition data of each finding period and the position of the acquisition data in the cache area, the waveform acquisition interval is determined, including:
[0017] In each finding period, from the first acquisition data, each acquisition data is determined whether to exceed the baseline range in turn, based on the position of the first acquisition data exceeding the baseline range, the start point of the finding period and the label value of the start point are determined; wherein the label value corresponds to the position of the cache area.
[0018] From the last acquisition data, each acquisition data is determined whether to exceed the baseline range in turn, based on the position of the first acquisition data exceeding the baseline range, the end point of the finding period and the label value of the end point are determined.
[0019] Based on the average value of the label values of the start points of the M finding periods and the average value of the label values of the end points, the start point average label value of the start point and the end point average label value of the end point are determined respectively.
[0020] If the start point average label value is not in the preset value range, the finding start time of the first finding period is taken as the acquisition start time of the first acquisition period, and based on the start point average label value and the end point average label value, the value of N is determined.
[0021] In a possible implementation, after determining the start point average label value of the start point and the end point average label value of the end point based on the average value of the label value of the start point and the average value of the label value of the end point of the M search periods, the method further includes:
[0022] If the start point average label value is within the preset numerical range, the start time of the first search period is moved based on the start point average label value, and the search waveform operation is continuously performed until the waveform acquisition interval is determined.
[0023] In a possible implementation, after determining the waveform acquisition interval based on the acquisition data of each search period and the position of the acquisition data in the cache area, the method further includes:
[0024] When the total time length of the echo signal collected by the analog-to-digital converter reaches a preset time length threshold, or when the number of restored waveforms reaches a first preset number, the search waveform operation is re-executed to determine the waveform acquisition interval.
[0025] In a possible implementation, the integrated circuit chip further includes a timer.
[0026] The analog-to-digital converter is controlled to collect the echo signal based on the acquisition start time of each acquisition period and a preset acquisition time interval to obtain N acquisition data, including:
[0027] At the acquisition start time of each acquisition period, the acquisition of the echo signal by the analog-to-digital converter is started by outputting a trigger signal by the timer;
[0028] The analog-to-digital converter is controlled to collect the echo signal according to the preset acquisition time interval to obtain N acquisition data.
[0029] In a possible implementation, based on a predetermined storage rule, the acquisition data of each acquisition period is stored until the acquisition data of the M acquisition periods is stored in the corresponding positions of the cache area, including:
[0030] Based on the predetermined storage rule, the N acquisition data of the current acquisition period is stored;
[0031] Based on the acquisition start time of the current acquisition period and a first preset time length, the acquisition start time of the next acquisition period is determined;
[0032] Based on the acquisition start time of the first acquisition period and the acquisition start time of the next acquisition period, the acquisition delay offset number is determined.
[0033] If the number of collection delay offsets is less than M, the collection data of the next collection period is stored based on a predetermined storage rule until the collection data of M collection periods is stored in the corresponding positions of the cache area.
[0034] The second aspect of the embodiment of the application provides an integrated circuit chip, which comprises an analog-to-digital converter, a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the steps of the method of the first aspect when executing the computer program.
[0035] The third aspect of the embodiment of the application provides an ultrasonic flowmeter, which comprises the integrated circuit chip of the second aspect.
[0036] The fourth aspect of the embodiment of the application provides a computer-readable storage medium, which stores a computer program, and the computer program implements the steps of the method of the first aspect when executed by a processor.
[0037] Compared with the prior art, the embodiment of the application has the following beneficial effects:
[0038] The echo signal processing method of the first aspect of the embodiment of the application can be applied to an ultrasonic flowmeter, and the ultrasonic flowmeter comprises an integrated circuit chip with an analog-to-digital converter, so that the ultrasonic flowmeter can realize processing of echo signals by using the built-in analog-to-digital converter. The embodiment of the application can acquire echo signals, control the analog-to-digital converter to collect the echo signals based on the collection start time of each collection period and a preset collection time interval, and obtain N collection data; and the collection data of each collection period is stored based on a predetermined storage rule until the collection data of M collection periods is stored in the corresponding positions of the cache area. That is, the embodiment of the application collects part of the data of one echo signal in each collection period, delays the collection start time by a first preset time length after each collection period, and realizes collection of M echo signals in turn.
[0039] Data collection is performed to obtain collection data of a complete waveform, and all the collection data is stored in the corresponding positions of the cache area according to the predetermined storage rule.
[0040] The predetermined storage rule of the embodiment of the application comprises that the N collection data of each collection period is sequentially spaced by at least M positions, and each collection data of the next collection period is stored behind the corresponding collection data of the previous collection period. Such a storage manner enables the embodiment of the application to arrange the collection data in the positions of the cache area based on the collection data of M collection periods, and obtain a restored waveform.
[0041] Since the distance between the two acquisition points directly using the built-in analog-to-digital converter of the integrated circuit chip for acquisition is large, the data cannot be directly processed to obtain the restored waveform. However, the echo signal processing method of the embodiment of the present application can be applied to the data acquisition of the built-in analog-to-digital converter, avoiding the problems of high requirement of external high-speed analog-to-digital converter on circuit design, high cost, and signal interference in high-speed transmission.
[0042] It can be understood that the beneficial effects of the above-mentioned second aspect to the fourth aspect can be referred to the related description in the above-mentioned first aspect, which will not be repeated here. BRIEF DESCRIPTION OF DRAWINGS
[0043] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments or prior art description will be briefly introduced as follows. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can also be obtained by those skilled in the art without creative labor.
[0044] Figure 1 is a flowchart of the echo signal processing method provided by the embodiment of the present application;
[0045] Figure 2 is a flowchart of a waveform searching operation provided by the embodiment of the present application;
[0046] Figure 3 is a flowchart of another waveform searching operation provided by the embodiment of the present application;
[0047] Figure 4 is a flowchart of a waveform searching and formal acquisition provided by the embodiment of the present application;
[0048] Figure 5 is a schematic diagram of the echo signal processing device provided by the embodiment of the present application;
[0049] Figure 6 is a schematic diagram of the integrated circuit chip provided by the embodiment of the present application. DETAILED DESCRIPTION
[0050] In the following description, specific details such as specific system structures, techniques, etc. are presented in order to thoroughly understand the embodiments of the present application. However, it should be clear to those skilled in the art that the present application can also 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 unnecessary details that hinder the description of the present application.
[0051] It should be understood that the word “comprise” or variations such as “comprises” or “comprising”, when used in this specification and in the accompanying claims, specify the presence of stated features, integers, steps, operations, elements, components and / or groups of features, integers, steps, operations, elements, components but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof.
[0052] It should also be understood that the term “and / or” when used in this specification and in the following claims is to be interpreted as open language, not as limiting, such that at least one of either the items can be present, and, additionally, some or all of those items might be present in combination with each other.
[0053] As used in this specification and claims, the terms “if’ and “when” can be interpreted to mean “upon determination” or “in response to a determination” or “upon detection” or “in response to a detection” depending on the context. Similarly, the phrase “if determined” or “if detected” can be interpreted to mean “upon determination” or “in response to a determination” or “upon detection” or “in response to a detection” depending on the context.
[0054] In addition, the terms “first”, “second”, “third”, etc. as used in the description of the application and the appended claims are used only to differentiate descriptions, and cannot be understood as indicating or implying relative importance.
[0055] Reference in the specification to “one embodiment” or “some embodiments” means that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment of the application. The appearances of the phrase “in one embodiment” or “in some embodiments” in various places in the specification are not necessarily all referring to the same embodiment, although it can. The terms “including,” “comprising,” “having” and variations thereof are meant to encompass the items listed thereafter and equivalents thereof as well as additional items.
[0056] It is found through research that the existing ultrasonic flowmeter generally uses an external high-speed ADC + FPGA (Field Programmable Gate Array) + DSP (Digital Signal Process) acquisition scheme, which has high cost and high power consumption, and clock jitter has a great influence.
[0057] Further research found that if the single-chip microcomputer with ADC is used for data acquisition, there are some problems in practice. First, to restore the entire waveform and be able to extract features subsequently, direct use of the ADC acquisition of the single-chip microcomputer is far from enough, because the distance between two points of the ADC acquisition is very large (5Msps of ADC conversion rate, the distance between two points is 200ns); the distance between two points is preferably less than 15ns, so that the restored waveform can be processed. Therefore, the prior art generally uses a high-speed external ADC to collect the entire waveform at a time, but the external ADC has a high requirement for circuit design, is easily disturbed in high-speed transmission, and has a high cost.
[0058] The echo signal processing method, integrated circuit chip and ultrasonic flowmeter provided by the embodiments of the present application aim to solve the above technical problems of the prior art.
[0059] The technical solutions of the present application and how the technical solutions of the present application solve the above technical problems will be described in detail below with specific embodiments. It should be pointed out that the following embodiments can be mutually referenced, borrowed or combined, and the same terms, similar features and similar implementation steps in different embodiments will not be described repeatedly.
[0060] Referring to FIG. 1, Figure 1 The echo signal processing method provided by the embodiments of the present application is applied to an ultrasonic flowmeter, and the ultrasonic flowmeter includes an integrated circuit chip with an analog-to-digital converter. As shown in FIG. 2, Figure 1 The echo signal processing method includes steps S101 to S103.
[0061] S101, an echo signal is acquired, and the analog-to-digital converter is controlled to collect the echo signal based on a collection start time of each collection period and a preset collection time interval, to obtain N collection data; wherein the collection start time of a next collection period is delayed from the collection start time of a previous collection period by a first preset time length.
[0062] Optionally, the collection time interval and the first preset time length are both preset according to the ultrasonic flowmeter and the analog-to-digital converter.
[0063] The collection start time of the first collection period is known, which can be a preset collection start time or a collection start time obtained by waveform collection test, for example, obtained by the execution of the waveform finding operation of the embodiments of the present application to determine the waveform interval. The collection start time of other collection periods is obtained by shifting the first preset time length from the collection start time of the previous collection period.
[0064] In some embodiments, the integrated circuit chip further comprises a timer; based on the 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, which comprises:
[0065] At the start time of each acquisition cycle, the timer outputs a trigger signal to start the acquisition of the echo signal by the analog-to-digital converter;
[0066] The analog-to-digital converter is controlled to acquire the echo signal according to the preset acquisition time interval to obtain N acquisition data.
[0067] The embodiments of the present application use a timer to output a trigger signal to trigger the analog-to-digital converter to start acquisition, combine the timer and the analog-to-digital converter, and realize data acquisition.
[0068] The integrated circuit chip can be a single-chip microcomputer with an analog-to-digital converter and a timer.
[0069] S102, based on a predetermined storage rule, the acquisition data of each acquisition cycle is stored until the acquisition data of M acquisition cycles is stored in the corresponding position of the cache area; wherein the predetermined storage rule comprises: N acquisition data of each acquisition cycle is sequentially spaced at least M positions, and each acquisition data of the next acquisition cycle is stored after the corresponding acquisition data of the previous acquisition cycle.
[0070] Optionally, M acquisition cycles as a round of acquisition cycles can obtain complete waveform data. M and N are positive integers, M is a preset value, and N can be a preset value or obtained by waveform acquisition test, for example: the execution of the waveform finding operation of the embodiments of the present application to determine the waveform interval.
[0071] Optionally, the predetermined storage rule comprises: N acquisition data of each acquisition cycle is sequentially spaced at least M positions, and each acquisition data of the next acquisition cycle is stored at the next position of the corresponding acquisition data of the previous acquisition cycle.
[0072] The embodiments of the present application can store data after obtaining acquisition data in each acquisition cycle, and then acquire and store in the next acquisition cycle. The embodiments of the present application can also store data after completing the acquisition data of M acquisition cycles.
[0073] In some embodiments, based on the predetermined storage rule, the acquisition data of each acquisition cycle is stored until the acquisition data of M acquisition cycles is stored in the corresponding position of the cache area, which comprises:
[0074] Based on the predetermined storage rule, N acquisition data of the current acquisition cycle is stored;
[0075] determine the collection start time of the next collection period based on the collection start time of the current collection period and the first preset time length;
[0076] determine the collection delay offset number based on the collection start time of the first collection period and the collection start time of the next collection period;
[0077] If the collection delay offset number is less than M, store the collection data of the next collection period based on the predetermined storage rule until the collection data of M collection periods is stored in the corresponding positions of the cache area.
[0078] Optionally, if the collection delay offset number is less than M, store the collection data of the next collection period based on the predetermined storage rule until the collection data of M collection periods is stored in the corresponding positions of the cache area, including:
[0079] If the collection delay offset number is less than M, control the analog-to-digital converter to collect the echo signal based on the collection start time of the next collection period and the preset collection time interval to obtain N collection data, and store the collection data of each collection period based on the predetermined storage rule until the collection data of M collection periods is stored in the corresponding positions of the cache area.
[0080] In combination with the characteristics of the slow change of the liquid in the measurement of the liquid flow by the ultrasonic flowmeter, the entire waveform is split into multiple parts, and only a part is collected in each collection period. A trigger signal is generated by a timer to trigger the analog-to-digital converter to collect, after the completion of the collection in each collection period, the trigger signal is offset backward, the offset time is determined by the timer, and the analog-to-digital converter is triggered to continue collecting after the offset until the entire waveform is collected.
[0081] S103, arrange the collection data in sequence based on the positions of the collection data of M collection periods in the cache area to obtain a restored waveform.
[0082] The echo signal processing method of the embodiments 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 by using the built-in analog-to-digital converter. The embodiments of the present application can obtain the echo signal, control the analog-to-digital converter to collect the echo signal based on the collection start time of each collection period and the preset collection time interval to obtain N collection data, and store the collection data of each collection period based on the predetermined storage rule until the collection data of M collection periods is stored in the corresponding positions of the cache area. That is, the embodiments of the present application collect part of the data of an echo signal in each collection period, delay the collection start time by a first preset time length after each collection period, and realize the processing of M echo signals in sequence.
[0083] Data acquisition, complete waveform acquisition data, all acquisition data are stored in the corresponding position of the cache area according to the predetermined storage rule.
[0084] The predetermined storage rule of the embodiment of the application includes that N acquisition data of each acquisition period are sequentially spaced by at least M positions, and each acquisition data of a subsequent acquisition period is stored behind the corresponding acquisition data of a previous acquisition period. Such a storage manner enables the embodiment of the application to sequentially arrange the acquisition data based on the positions of the acquisition data of M acquisition periods in the cache area, and obtain the restored waveform.
[0085] Since the distance between the two acquisition points directly using the built-in analog-to-digital converter of the integrated circuit chip for acquisition is large, the restored waveform cannot be directly obtained by data processing. However, the echo signal processing method of the embodiment of the application can be applied to data acquisition by the built-in analog-to-digital converter, avoiding the problems of high requirement and high cost of the external high-speed analog-to-digital converter on circuit design, and signal interference in high-speed transmission.
[0086] In some embodiments, the echo signal is acquired, and the analog-to-digital converter is controlled to acquire the echo signal based on the acquisition start time of each acquisition period and the preset acquisition time interval, to obtain N acquisition data, and the method further comprises: acquiring the echo signal, and performing a waveform finding operation based on the echo signal.
[0087] Referring to Figure 2 As shown in the figure, the embodiment of the application provides a flowchart of a waveform finding operation. As Figure 2 As shown in the figure, the waveform finding operation comprises steps S201 to S203.
[0088] S201, based on the finding start time of each finding period 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 finding start time of the first finding period is the preset start time, and the acquisition start time of a subsequent finding period is delayed from the acquisition start time of a previous finding period by a first preset time length.
[0089] S202, based on the predetermined storage rule, the acquisition data of each finding period is stored until the acquisition data of M finding periods are stored in the corresponding position of the cache area.
[0090] S203, based on the acquisition data of each finding period and the position of the acquisition data in the cache area, the waveform acquisition interval is determined; wherein the waveform acquisition interval comprises the acquisition start time of the first acquisition period and the value of N.
[0091] The embodiment of the present application can first perform the steps of finding a waveform and determining a waveform interval before performing data collection and processing. The waveform interval is determined by performing a waveform finding operation on the echo signal, and the collection start time of the first collection period and the value of N are determined, thereby facilitating the formal collection of the waveform.
[0092] In the embodiment of the present application, the waveform finding operation is performed in the same way as the processing principles of steps S101 and S102 of the embodiment of the present application.
[0093] In some embodiments, based on the collection data of each finding period and the position of the collection data in the cache area, the waveform collection interval is determined, including:
[0094] In each finding period, starting from the first collection data and sequentially moving backward, it is determined whether each collection data exceeds the reference line range. Based on the position of the first collection data exceeding the reference line range, the start point of the finding period and the label value of the start point are determined. The label value corresponds to the position of the cache area.
[0095] Starting from the last collection data and sequentially moving forward, it is determined whether each collection data exceeds the reference line range. Based on the position of the first collection data exceeding the reference line range, the end point of the finding period and the label value of the end point are determined.
[0096] Based on the average value of the label values of the start points of the M finding periods and the average value of the label values of the end points, the start point average label value of the start point and the end point average label value of the end point are determined, respectively.
[0097] If the start point average label value is not in the preset value range, the finding start time of the first finding period is taken as the collection start time of the first collection period, and the value of N is determined based on the start point average label value and the end point average label value.
[0098] Optionally, the positions of the cache area can be labeled as 1, 2, 3, 4, …, etc. The label value of the start point is the label of the position of the corresponding collection data. Based on the start point average label value and the end point average label value, the number of collection points between the start point average label value and the end point average label value can be taken as the value of N.
[0099] The embodiment of the present application can determine the start point average label value of the start point and the end point average label value of the end point of the M finding periods, and determine whether it meets the waveform specification, for example, whether the start point is at the front of the waveform, if the start point is in the middle of the waveform, the entire interval is moved forward, and the like. After the sampling interval contains a complete waveform, the position of the waveform and the true start point and end point of the waveform can be determined.
[0100] As an example, the start point average label value is not in the preset value range, for example, the preset value range is 1-2 (including the end value), if the start point average label value is not in the range of 1-2, the start point is not at the front of the waveform, the finding start time of the first finding period in this round M periods can be taken as the collection start time of the first collection period.
[0101] In some embodiments, after determining the start point average label value of the start point and the end point average label value of the end point based on the average of the label values of the start points of the M finding periods and the average of the label values of the end points, further comprising:
[0102] If the start point average label value is in the preset value range, the start time of the first finding period is moved based on the start point average label value, and the finding waveform operation is continued to be performed until the waveform collection interval is determined.
[0103] As an example, the start point average label value is not in the preset value range, for example, the preset value range is 1-2, if the start point average label value is in the range of 1-2, the start point is at the front of the waveform, the start time of the first finding period needs to be moved forward, and the finding waveform operation is continued to be performed until the start point average label value is not in the preset value range, and the waveform collection interval is determined.
[0104] The preset value range can include multiple sub-ranges, for example: the preset value range can also be 100-120.
[0105] In the finding waveform stage, if the obtained start point average label value is greater than 100 (for example, a total of 120 points), it means that the start point of the complete waveform is behind the current sampling interval, and the current sampling interval cannot collect the complete waveform, so the start time of the first finding period needs to be moved backward to move the trigger point backward in the next finding period.
[0106] The embodiments of the present application can move the start time of the first finding period forward or backward by a second preset time based on the start point average label value, and continue to perform the finding waveform operation.
[0107] It is conceivable that the embodiments of the present application can also set the value range in which the start point average label value needs to be as the preset value range, and the start point average label value in this preset value range means that the current sampling interval can collect the complete waveform, and the finding start time of the first finding period can be taken as the collection start time of the first collection period.
[0108] In some embodiments, after determining the waveform collection interval based on the collection data of each finding period and the position of the collection data in the cache area, further comprising:
[0109] When the total time length of the echo signal collected by the control analog-to-digital converter reaches a preset time length threshold, or when the number of restored waveforms reaches a first preset number, the operation of finding the waveform is re-executed to determine the waveform collection interval.
[0110] After a period of time of waveforms is acquired, for example, after the total time length of collection reaches a preset time length threshold of 5 seconds, or after 1000 restored waveforms are obtained, the waveform interval needs to be reconfirmed, so as to prevent the position of the waveform from changing after the flow rate is changed, thereby realizing real-time acquisition of the waveform interval and ensuring complete waveforms.
[0111] As an example, the specific parameters are calculated first, for example, the timer frequency of the single-chip microcomputer is 100 MHz (megahertz), and the sampling conversion speed of the ADC is 5 Msps, so that the distance between two points is 10 ns, and 20 collection cycles are required for collection. According to the length of the waveform, it can be confirmed how many points need to be collected for one ADC collection, for example, the length of the ultrasonic echo signal is generally 24 us, so 120 points are collected for one ADC collection. Assuming that the period of transmitting the ultrasonic wave is 250 us, after these data are written into the program, the collection can be started.
[0112] The processing procedure of the echo signal of the embodiment of the present application includes a waveform finding stage and a formal collection stage. In order to reduce the data processing time, the same logic processing is used, and 120 points are collected each time, and the timer trigger signal is used to trigger the ADC collection.
[0113] Referring to FIG. 6, the embodiment of the present application provides another flowchart of the operation of finding the waveform. The waveform finding stage is the operation of finding the waveform according to the embodiment of the present application. Referring to FIG. 7, the embodiment of the present application provides a flowchart of finding the waveform and formal collection. In the flowchart, the start point and the end point correspond to the start time and the end time of data collection, respectively. Figure 3 Figure 4 Referring to FIG. 6, the embodiment of the present application provides another flowchart of the operation of finding the waveform. The waveform finding stage is the operation of finding the waveform according to the embodiment of the present application. Referring to FIG. 7, the embodiment of the present application provides a flowchart of finding the waveform and formal collection. In the flowchart, the start point and the end point correspond to the start time and the end time of data collection, respectively. Figure 4
[0114] Referring to FIG. 6, the embodiment of the present application provides another flowchart of the operation of finding the waveform. The waveform finding stage is the operation of finding the waveform according to the embodiment of the present application. Referring to FIG. 7, the embodiment of the present application provides a flowchart of finding the waveform and formal collection. In the flowchart, the start point and the end point correspond to the start time and the end time of data collection, respectively. Figure 3
[0115] (1) Waveform finding stage
[0116] The trigger signal is sent at the start time of the finding period to trigger the ADC collection, and 120 points are collected at one time. The distance between two points is 200 ns. The collected data are put into the cache area, and the data are traversed from the beginning to compare with the known reference line to check whether the value exceeds the reference line range. If the first point exceeds the reference line range, the value of the start point is recorded as 1. If the first point does not exceed the reference line range, the second point is compared. The process is repeated until a point exceeds the reference line range.
[0117] After finding the starting point, data is traversed from the tail to the front, the action of finding the starting point is repeated until the end record END1=A (i.e. the label value of the end point) is found; after finding the two points of the first group, a signal is triggered to offset 10 ns backward, and then it is judged whether the offset times are greater than the specified number of times (i.e. 20 finding periods in the example), and if not, the ADC acquisition is continued, the previous sampling step is repeated, until the values of START2, END2, START3, END3,..., START20, END20 are all obtained. Then, the values are averaged to obtain the label value of the unique starting point START and the label value of the end point END.
[0118] After obtaining the starting point average label value of the starting point and the end point average label value of the end point, it is judged whether the two points meet the waveform specification, such as 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, and the like, until the sampling interval contains a complete waveform, and then the position of the waveform and the true starting point and the end point of the waveform are determined.
[0119] Based on the above test, the starting point average label value obtained in the first finding period of the first round of finding periods of the embodiment of the application is not in the preset value range, and the finding starting time of the first finding period can be used as the acquisition starting time of the first acquisition period, and the value of N can be the same as T, both being 120 points.
[0120] In combination with FIGS. 1, 2, and 3, Figure 3 and Figure 4 the embodiment of the application further includes:
[0121] (2) formal acquisition phase
[0122] After the waveform interval is determined, the formal acquisition of the waveform is started. First, a trigger signal is sent at the waveform starting point (i.e. the acquisition starting time of the first acquisition period) to trigger the ADC acquisition, and after the acquisition is completed, the acquired ADC data is regularly placed in the cache area, such as the 120 data acquired for the first time, which are placed in positions 1, 21, 41,..., 101, and 121 of the cache area.
[0123] The data acquired for the second time is placed in positions 2, 22, 42,..., 102, and 122 of the cache area, and the like; after the acquired data is placed in the cache area, the trigger signal is offset, and then it is judged whether the offset times of the trigger signal reach the specified number of times 20 periods, and if not, the ADC acquisition is continued, and if the data in this group is acquired, the acquisition is completed.
[0124] The data in the buffer area is printed in order to obtain a complete waveform, and through comparison, the restored waveform obtained by the embodiment of the application is basically consistent with the waveform signal measured by the real oscilloscope.
[0125] After obtaining the complete waveform, the subsequent complete waveform is obtained according to step (2), and one waveform needs about 5 ms according to the above data, which is completely less than the time of liquid state transformation, and can be applied to an ultrasonic flowmeter. The above steps (1) and (2) are the entire description of the method, and after obtaining the complete waveform, a series of data processing can be performed on the waveform, so as to obtain the phase or time-frequency characteristics to be calculated.
[0126] It should be understood that the size of the serial number of each step in the above embodiment does not mean the order of execution, and the execution order of each process should be determined according to its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the application.
[0127] Referring to Figure 5 As shown in the figure, the embodiment of the application provides a structural schematic diagram of an echo signal processing device 50. The echo signal processing device 50 is applied to an ultrasonic flowmeter, and the ultrasonic flowmeter includes an integrated circuit chip with an analog-to-digital converter, such as Figure 5 As shown in the figure, the echo signal processing device 50 includes an acquisition module 501, a storage module 502, and a processing module 503.
[0128] The acquisition module 501 is configured to acquire an echo signal, control the analog-to-digital converter to acquire the echo signal based on an acquisition start time of each acquisition period and a preset acquisition time interval, and obtain N acquisition data; wherein the acquisition start time of a next acquisition period is delayed from the acquisition start time of a previous acquisition period by a first preset time length.
[0129] The storage module 502 is configured to store the acquisition data of each acquisition period based on a predetermined storage rule, until the acquisition data of M acquisition periods are stored in the corresponding positions of the buffer area; wherein the predetermined storage rule includes that the N acquisition data of each acquisition period are sequentially spaced by at least M positions, and each acquisition data of a next acquisition period is stored behind the corresponding acquisition data of a previous acquisition period.
[0130] The processing module 503 is configured to sequentially arrange the acquisition data based on the positions of the acquisition data of the M acquisition periods in the buffer area, and obtain a restored waveform.
[0131] Optionally, the acquisition module 501 is configured to acquire the echo signal, and perform the following operation of the waveform searching operation based on the echo signal: based on a searching starting time of each searching period and a preset acquisition time interval, control the analog-to-digital converter to acquire the echo signal to obtain T acquisition data; wherein T≥N, the searching starting time of the first searching period is a preset starting time, and the acquisition starting time of a subsequent searching period is delayed from the acquisition starting time of a previous searching period by a first preset time length.
[0132] The storage module 502 is configured to store the acquisition data of each searching period based on a predetermined storage rule, until the acquisition data of M searching periods are stored in the corresponding positions of the cache area.
[0133] The processing module 503 is configured to determine a waveform acquisition interval based on the acquisition data of each searching period and the position of the acquisition data in the cache area; wherein the waveform acquisition interval comprises the acquisition starting time of the first acquisition period and the value of N.
[0134] Optionally, the processing module 503 is configured to, in each searching period, determine whether each acquisition data exceeds the baseline range from the first acquisition data to the last acquisition data in turn, determine the starting point of the searching period and the label value of the starting point based on the position of the first acquisition data exceeding the baseline range; wherein the label value corresponds to the position of the cache area; determine whether each acquisition data exceeds the baseline range from the last acquisition data to the first acquisition data in turn, determine the end point of the searching period and the label value of the end point based on the position of the first acquisition data exceeding the baseline range; determine the starting point average label value of the starting point and the end point average label value of the end point based on the average value of the label values of the starting points of the M searching periods and the average value of the label values of the end points; if the starting point average label value is not in a preset value range, take the searching starting time of the first searching period as the acquisition starting time of the first acquisition period, and determine the value of N based on the starting point average label value and the end point average label value.
[0135] Optionally, the processing module 503 is configured to, if the starting point average label value is in the preset value range, move the starting time of the first searching period based on the starting point average label value, and continue to perform the waveform searching operation until the waveform acquisition interval is determined.
[0136] Optionally, the processing module 503 is configured to, when the total length of the acquisition of the echo signal by the analog-to-digital converter reaches a preset time length threshold, or when the number of restored waveforms reaches a first preset number, re-perform the waveform searching operation to determine the waveform acquisition interval.
[0137] Optionally, the integrated circuit chip further comprises a timer; the acquisition module 501 is configured to output a trigger signal at the start of each acquisition cycle by the timer to start the acquisition of the echo signal by the analog-to-digital converter; and control the analog-to-digital converter to acquire the echo signal according to a preset acquisition time interval to obtain N acquisition data.
[0138] Optionally, the storage module 502 is configured to store the N acquisition data of the current acquisition cycle based on a predetermined storage rule; determine the start of the next acquisition cycle based on the start of the current acquisition cycle and a first preset time length; determine the acquisition delay offset number based on the start of the first acquisition cycle and the start of the next acquisition cycle; and if the acquisition delay offset number is less than M, store the acquisition data of the next acquisition cycle based on the predetermined storage rule until the acquisition data of M acquisition cycles are stored in the corresponding positions of the cache area.
[0139] In applications, each module in the echo signal processing apparatus 50 can be a software program module, can be implemented by different logic circuits integrated in a processor, or can be implemented by multiple distributed processors.
[0140] The echo signal processing apparatus 50 provided in the embodiments of the present application can execute the method provided in the embodiments of the present application, and the implementation principles are similar. The actions performed by each module in the apparatus of the embodiments of the present application correspond to the steps in the method of the embodiments of the present application. For the detailed functions of each module of the apparatus, refer to the description of the corresponding method in the foregoing description, which will not be repeated here.
[0141] Referring to Figure 6 As shown in the figure, the embodiments of the present application provide a structural diagram of an integrated circuit chip 6. As shown in the figure, Figure 6 The integrated circuit chip 6 of the embodiments of the present application comprises 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 the embodiments of the present application are implemented.
[0142] The integrated circuit chip 6 can include, but is not limited to, the processor 60 and the memory 61. Those skilled in the art can understand that Figure 6 The integrated circuit chip 6 is only an example and does not constitute a limitation on the integrated circuit chip 6. It can include more or fewer components than shown in the figure, or combine certain components, or different components, for example, it can also include input / output devices, network access devices, etc.
[0143] The processor 60 can be a central processing unit (CPU), and can also be 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 device, discrete gate or transistor logic, discrete hardware components, or the like. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor.
[0144] The memory 61 can be an internal storage unit, such as a hard disk or a memory, in some embodiments. The memory 61 can be a removable / non-removable, volatile / non-volatile computer system storage medium, such as a non-volatile memory, for reading and writing non-volatile magnetic media. The memory 61 can also be an external storage device in other embodiments, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, and the like. The memory 61 is used to store an operating system, an application program, a boot loader, data, and other programs, such as program codes of computer programs. The memory 61 can also be used to temporarily store data that has been output or will be output.
[0145] The embodiment of the present application provides an ultrasonic flowmeter, comprising an integrated circuit chip 6.
[0146] It should be noted that the information interaction, execution process and the like between the above devices / units, since based on the same concept as the method embodiments of the present application, the specific functions and the technical effects brought by them can be referred to the method embodiment part, and will not be repeated here.
[0147] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the division of the above functional units and modules is exemplified, and in actual application, the above functions can be completed by different functional units and modules according to needs, that is, the internal structure of the device is divided into different functional units or modules to complete all or part of the above described functions. Each functional unit and module in the embodiment can be integrated in one processing unit, or each unit can exist physically, or two or more units can be integrated in one unit, and the integrated unit can be realized in the form of hardware or software. In addition, the specific name of each functional unit and module is only for easy distinction, and does not limit the protection scope of the application. The specific working process of the unit and module in the system can refer to the corresponding process in the foregoing method embodiment, which will not be repeated here.
[0148] The embodiment of the application further provides a computer readable storage medium, which stores a computer program. The computer program is executed by a processor to implement the steps in each method embodiment.
[0149] The integrated unit, if realized in the form of a software functional unit and sold or used as an independent product, can be stored in a computer readable storage medium. Based on this understanding, all or part of the processes in the above embodiment methods can be completed by a computer program to instruct related hardware. The computer program can be stored in a computer readable storage medium. When the processor executes the computer program, the steps of each method embodiment can be implemented. The computer program includes computer program code, which can be in the form of source code, object code, executable file or some intermediate form. The computer readable medium at least includes any entity or device capable of carrying the computer program code to the device / terminal equipment, recording medium, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal and software distribution medium. For example, U disk, mobile hard disk, magnetic disk or optical disk, etc.
[0150] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program. The program can be stored in a computer readable storage medium. The program can include the processes of the above-mentioned embodiment methods when executed. The storage medium can be a magnetic disc, an optical disc, a Read-Only Memory (ROM), a Random Access Memory (RAM), a Flash Memory, a Hard Dish Drive (HDD) or a Solid-State Drive (SSD), etc. The storage medium can also include a combination of the above-mentioned storage devices.
[0151] The embodiments of the present application provide a computer program product, when the computer program product is executed on a processor, the processor is caused to implement the steps in the above-mentioned various method embodiments.
[0152] In the above-mentioned embodiments, the description of each embodiment has its own focus. The parts not described or recorded in detail in a certain embodiment can be referred to the related description of other embodiments.
[0153] Those skilled in the art can realize that the units and algorithm steps of the examples described in combination with the embodiments disclosed herein can be realized by electronic hardware or a combination of computer software and electronic hardware. Whether the functions are realized in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.
[0154] In the embodiments provided in the present application, it should be understood that the disclosed apparatus / network device and method can be implemented in other ways. For example, the above-mentioned apparatus / network device embodiments are only schematic. For example, the division of the above-mentioned modules or units is only a logical function division. In actual implementation, another division can be used. For example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the displayed or discussed mutual coupling or direct coupling or communication connection can be indirect coupling or communication connection through some interfaces, devices or units, and can be electrical, mechanical or in other forms.
[0155] The units described as separate parts above can or can not be physically separate, and the parts shown as units can or can not be physical units, that is, can be located in one place, or can be distributed to multiple network units. Part or all of the units can be selected to achieve the purpose of the embodiment scheme according to actual needs.
[0156] The above embodiments are only used to illustrate the technical solutions of the present application, but not limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that the technical solutions recorded in the foregoing embodiments can still be modified, or some technical features can be replaced by equivalents; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in the protection scope of the present application.
Claims
1. A method for processing echo signals, characterized in that, Applied to an ultrasonic flow meter, the ultrasonic flow meter including an integrated circuit chip with an analog-to-digital converter, the method includes: The echo signal is acquired, and the analog-to-digital converter is controlled 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; wherein the acquisition start time of the later acquisition cycle is delayed by a first preset time compared with the acquisition start time of the previous acquisition cycle. Based on predetermined storage rules, the collected data of each collection cycle is stored until the collected data of M collection cycles is stored in the corresponding position of the buffer; wherein, the predetermined storage rules include: the N collected data of each collection cycle are spaced at least M positions apart, and each collected data of the subsequent collection cycle is stored after the collected data of the previous collection cycle. Based on the positions of the collected data from the M collection cycles in the buffer, the collected data are arranged sequentially to obtain the restored waveform; The step of acquiring the echo signal, based on the start time of each acquisition cycle and a preset acquisition time interval, and controlling the analog-to-digital converter to acquire the echo signal to obtain N acquisition data, further includes: Acquire the echo signal, and perform a waveform search operation based on the echo signal; The waveform finding 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; where 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 compared with the acquisition start time of the previous search cycle. Based on the predetermined storage rules, the collected data for each search cycle is stored until the collected data for M search cycles is stored in the corresponding location of the cache. Based on the acquired data of each search cycle and the position of the acquired data in the buffer, a waveform acquisition interval is determined; wherein, the waveform acquisition interval includes the acquisition start time of the first acquisition cycle and the value of N.
2. The method for processing echo signals according to claim 1, characterized in that, The determination of the waveform acquisition interval based on the acquired data for each search cycle and the position of the acquired data in the buffer includes: In each search cycle, starting from the first collected data and proceeding sequentially, it is determined whether each collected data exceeds the baseline range. Based on the location 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 proceeding sequentially backward, determine whether each collected data exceeds the baseline range. Based on the location of the first collected data that exceeds the baseline range, determine the end point of the search cycle and the label value of the end point. Based on the average value of the label of the starting point and the average value of the label of the ending point over M search cycles, the average starting point label of the starting point and the average ending point label of the ending point are determined respectively. If the average starting point label value is not within the preset range, the search start time of the first search cycle is taken as the collection start time of the first collection cycle, and the value of N is determined based on the average starting point label value and the average ending point label value.
3. The method for processing echo signals according to claim 2, characterized in that, After determining the average starting point label value and the average ending point label value based on the average of the starting point label values and the average ending point label values of the M search cycles, the method further includes: If the average starting point label value is within a preset range, then based on the average starting point label value, the start time of the first search cycle is moved, and the waveform search operation continues until the waveform acquisition interval is determined.
4. The method for processing echo signals according to claim 1, 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, the method further includes: When the total duration for the analog-to-digital converter to acquire the echo signal reaches a preset duration threshold, or when the number of restored waveforms reaches a first preset number, the waveform acquisition operation is re-executed to determine the waveform acquisition range.
5. The method for processing echo signals according to any one of claims 1-4, characterized in that, The integrated circuit chip also includes a timer; The analog-to-digital converter is controlled to acquire the echo signal based on the acquisition start time of each acquisition cycle and a preset acquisition time interval, resulting in N acquisition data points, including: At the start of each acquisition cycle, a trigger signal is output through the timer to start the analog-to-digital converter to acquire the echo signal; The analog-to-digital converter is controlled to acquire the echo signal according to the preset acquisition time interval, so as to obtain N acquisition data.
6. The method for processing echo signals according to any one of claims 1-4, characterized in that, The process of storing the collected data for each collection cycle based on predetermined storage rules, up to M collection cycles, and storing the collected data in the corresponding location of the cache includes: Based on predetermined storage rules, N data points collected in the current collection period will be stored. Based on the start time of the current acquisition cycle and the first preset duration, determine the start time of the next acquisition cycle. Based on the start time of the first acquisition cycle and the start time of the next acquisition cycle, determine the number of acquisition delay offsets. If the number of acquisition delay offsets is less than M, then based on the predetermined storage rules, the acquisition data of the next acquisition cycle will be stored until the acquisition data of M acquisition cycles is stored in the corresponding position of the buffer.
7. An integrated circuit chip, characterized in that, It includes 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, when executing the computer program, implements the steps of the method as claimed in any one of claims 1 to 6.
8. An ultrasonic flow meter, characterized in that, include: The integrated circuit chip as described in claim 7.
9. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method as described in any one of claims 1 to 6.
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