A method and terminal for ultrasonic counting of fuel dispenser pump pistons

By installing an ultrasonic sensor on the outer wall of the fuel pump, and using corrected sound velocity and continuous distance data to identify the piston movement state, the influence of temperature and fuel quality changes on counting is solved, thus achieving accuracy and stability of fuel pump piston counting and adapting to wide temperature and variable speed operating conditions.

CN123045477APending Publication Date: 2026-11-06FUZHOU DAYU ELECTRONIC TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611299757.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-26
Publication Date
2026-11-06

AI Technical Summary

Technical Problem

The existing ultrasonic counting method for fuel pump pistons in fuel dispensers is prone to missed counts, duplicate counts, or misjudgments of cycles due to temperature changes and differences in fuel medium, resulting in insufficient counting accuracy and stability.

Method used

By obtaining the oil type and temperature to determine the corrected sound velocity, and combining the ultrasonic echo signal to calculate the piston flight time, continuous distance data is obtained. Based on the sequence of multiple preset motion states, the piston reciprocating motion is identified, reducing the impact of environmental and medium changes.

Benefits of technology

It improves the accuracy and stability of the reciprocating counting of the fuel pump piston in the fuel dispenser, reduces the risk of missed counts, duplicate counts and incorrect counts, and adapts to the metering needs under wide temperature and variable speed operating conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123045477A_ABST
    Figure CN123045477A_ABST
Patent Text Reader

Abstract

This invention discloses an ultrasonic counting method and terminal for a fuel dispenser pump piston. The method includes: acquiring the fuel type and temperature within the fuel pump, and ultrasonic echo signals collected by an ultrasonic sensor mounted on the outer wall of the pump; determining a corrected sound velocity based on the fuel type and temperature, and determining the ultrasonic flight time corresponding to the piston based on the ultrasonic echo signals; determining the distance between the piston and the ultrasonic sensor based on the ultrasonic flight time and the corrected sound velocity, obtaining distance data that continuously changes with the piston's reciprocating motion; determining multiple preset motion states that the piston sequentially experiences based on the distance data, and determining that the piston has completed one reciprocating motion and updating the reciprocating count value when the multiple preset motion states are sequentially identified in a preset order. This invention can reduce the influence of fuel type and temperature changes on ultrasonic detection results, and improve the accuracy and stability of piston reciprocating counting.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of fuel dispenser metering and testing technology, and in particular to an ultrasonic counting method and terminal for fuel dispenser pump pistons. Background Technology

[0002] Fuel dispensers typically deliver fuel through the periodic reciprocating motion of a piston within a fuel pump. The number of piston movements corresponds to the pump's output. Therefore, by detecting the reciprocating motion of the pump piston, the pump's operation can be counted, and corresponding fuel metering information can be obtained.

[0003] To avoid modifying the original mechanical structure of the fuel pump, an ultrasonic sensor can be installed externally. This sensor transmits ultrasonic signals into the pump and receives the corresponding echo signals, thus detecting the movement of the piston inside. Ultrasonic testing is non-invasive and easy to install, making it suitable for external condition monitoring of existing fuel dispenser pumps.

[0004] In one detection method, the amplitude or energy of the ultrasonic echo signal can be sampled and accumulated, and the piston's motion period can be determined based on the periodic changes in the echo amplitude or energy caused by the reciprocating motion of the piston. However, in actual use, the amplitude of the ultrasonic echo is easily affected by factors such as ambient temperature, oil medium, and individual differences in sensors.

[0005] Especially when the ambient temperature of the refueling machine changes significantly, the transmission and reception characteristics of the ultrasonic transducer and the acoustic characteristics of the fuel may change, causing the amplitude baseline of the echo signal to drift. When the judgment threshold is set based on the echo amplitude, the above-mentioned drift can easily cause the judgment threshold of the piston movement cycle to no longer match the actual echo signal, resulting in missed counts, duplicate counts, or misjudgments of the cycle. Summary of the Invention

[0006] In view of the above problems, this application provides an ultrasonic counting method and terminal for fuel pump pistons in fuel dispensers, which improves the accuracy and stability of identifying and counting the reciprocating motion of fuel pump pistons.

[0007] To achieve the above objectives, the inventors provide an ultrasonic counting method for the piston of a fuel dispenser pump, comprising:

[0008] The type and temperature of the fuel in the fuel pump of the fuel dispenser are obtained, and the ultrasonic echo signal collected by the ultrasonic sensor installed on the outer wall of the fuel pump of the fuel dispenser is also obtained.

[0009] The corrected speed of sound is determined based on the type and temperature of the oil, and the ultrasonic flight time corresponding to the piston of the fuel pump is determined based on the ultrasonic echo signal.

[0010] The distance between the piston and the ultrasonic sensor is determined based on the ultrasonic flight time and the corrected sound velocity, thus obtaining distance data that changes continuously with the reciprocating motion of the piston;

[0011] Based on the distance data, a number of preset motion states that the piston experiences sequentially are determined. When the multiple preset motion states are identified sequentially in a preset order, it is determined that the piston has completed one reciprocating motion, and the reciprocating count value of the piston is updated.

[0012] The present invention also provides an ultrasonic counting terminal for a fuel dispenser pump piston, comprising a memory, a processor, and a computer program stored in the memory and running on the processor. When the processor executes the computer program, it implements the steps in the above-described ultrasonic counting method for a fuel dispenser pump piston.

[0013] Unlike existing technologies, the above-mentioned technical solution determines the corrected sound velocity by acquiring the oil type and oil temperature, and determines the ultrasonic flight time corresponding to the piston by combining the ultrasonic echo signal. This provides distance data that continuously changes with the piston's reciprocating motion. Compared to methods that rely on changes in ultrasonic echo amplitude or energy for periodic judgment, this reduces the impact of oil type, oil temperature, and individual sensor differences on the detection results, improving the stability of piston distance detection. Furthermore, by determining multiple preset motion states that the piston experiences sequentially based on continuous distance data, and confirming that the piston completes one reciprocating motion only after these preset motion states are identified in a preset order, the risk of missed, duplicate, and incorrect counts caused by instantaneous signal fluctuations or local anomalies is reduced, thereby improving the accuracy and reliability of the fuel dispenser's pump piston reciprocating count.

[0014] The above description of the invention is merely an overview of the technical solution of this application. In order to enable those skilled in the art to better understand the technical solution of this application and to implement it based on the description and drawings, and to make the above-mentioned objectives and other objectives, features and advantages of this application easier to understand, the following description is provided in conjunction with the specific embodiments and drawings of this application. Attached Figure Description

[0015] The accompanying drawings are only used to illustrate the principles, implementation methods, applications, features, and effects of specific embodiments of the present invention and other related contents, and should not be considered as limitations on this application.

[0016] In the accompanying drawings of the instruction manual:

[0017] Figure 1 This is a graph showing the cumulative value of the ultrasonic sensor as a function of temperature.

[0018] Figure 2 This is a flowchart of an ultrasonic counting method for a fuel dispenser pump piston in one of the embodiments;

[0019] Figure 3 The image shows the ultrasonic echo signal waveform when the piston is in the distal position in the embodiment.

[0020] Figure 4 The image shows the ultrasonic echo signal waveform when the piston is in the proximal position in the embodiment.

[0021] Figure 5 This is a waveform comparison diagram before and after distance data filtering in the embodiment;

[0022] Figure 6 This is a waveform diagram of piston distance data in the embodiment;

[0023] Figure 7 The image shows the waveform of the piston distance changing over time during the operation of the refueling machine in the embodiment. Detailed Implementation

[0024] To illustrate the possible application scenarios, technical principles, implementable specific solutions, and achievable objectives and effects of this application in detail, the following description, in conjunction with the listed specific embodiments and accompanying drawings, provides a detailed explanation. The embodiments described herein are merely illustrative of the technical solutions of this application and are therefore intended to limit the scope of protection of this application.

[0025] Please refer to Figure 1 In the process of developing the present invention, a method of counting the fuel pump piston of the refueling machine based on the change of ultrasonic echo energy was used.

[0026] Specifically, an ultrasonic sensor is attached to the outer wall of the fuel pump in the fuel dispenser. A drive circuit excites the ultrasonic transducer to emit ultrasonic signals. The ultrasonic signals enter the fuel medium through the pump wall and propagate inside the pump, forming reflected echoes at structures such as the piston and the inner wall of the pump body. The ultrasonic transducer receives the returned echo signals and converts them into analog electrical signals. These analog electrical signals are then amplified, filtered, and detected before being input into an analog-to-digital converter for sampling.

[0027] In one testing method, the microcontroller's built-in analog-to-digital converter module continuously acquires 1000 sampled values ​​at a sampling rate of 1MHz. These 1000 sampled values ​​are then window-filtered and accumulated. The accumulated result is divided by 4 to ensure the calculation result is within a preset data storage range. Finally, a Kalman filter is used to suppress abnormal values, resulting in the accumulated value M.

[0028] The accumulated value M can be expressed as:

[0029]

[0030] in, This represents the i-th sampled value after window filtering. This represents the accumulated ultrasonic echo value corresponding to the current sampling period.

[0031] As the piston continuously reciprocates during the operation of the oil pump, the relative position between the piston and the ultrasonic sensor changes periodically over time, causing the ultrasonic propagation path, echo attenuation, and echo amplitude to change accordingly, thus causing the accumulated value M to fluctuate periodically.

[0032] In the initial counting method, the accumulated value M is continuously acquired, and the waveform is divided into states based on the maximum, minimum, and intermediate values ​​of the accumulated value M over a period of time. By determining whether the accumulated value M sequentially experiences multiple states such as high, falling, low, and rising, it is determined whether the piston has completed one reciprocating motion. When all the corresponding states appear in the set order, the piston count value is accumulated once.

[0033] Under a constant temperature environment of 25℃, this method can achieve high periodicity recognition accuracy. For example, under test conditions with oil pump speeds of 30r / min, 60r / min, 90r / min and 120r / min, the recognition accuracy of a single piston reciprocation can reach approximately 99.9%, and the cumulative error of 1000 consecutive reciprocations can be controlled within 0.1%.

[0034] However, further wide-temperature testing revealed that the cumulative value M was not solely related to the piston position.

[0035] like Figure 1 As shown, within the temperature range of -20℃ to 60℃, the highest, lowest, and median values ​​of the accumulated value M corresponding to different sensors all change significantly with temperature. The temperature drift fitting relationship for sensor number one can be expressed as:

[0036]

[0037] Its goodness of fit This indicates a significant correlation between the accumulated value M and temperature.

[0038] During the experiment, for every 10°C change in ambient temperature, the overall offset of the cumulative value M can exceed 2000, and there is also a significant dispersion in the temperature drift amplitude between different sensors.

[0039] The reason for the above phenomenon is that the accumulated value M essentially reflects the amplitude or energy characteristics of the ultrasonic echo within a certain sampling window. The amplitude of the ultrasonic echo is affected not only by the piston position, but also by factors such as oil temperature, oil type, ultrasonic transducer emission efficiency, receiving sensitivity, and individual sensor differences.

[0040] Therefore, even if the piston remains in the same position after a temperature change, the corresponding accumulated value M may still deviate significantly. This causes the state judgment benchmark originally set based on the accumulated value M to deviate from the actual waveform, leading to missed counts, duplicate counts, or misjudgments of the cycle. During the wide-temperature test, the maximum cumulative measurement error exceeded 3.5%, which is insufficient to meet the long-term counting stability requirements of the fuel dispenser during actual operation.

[0041] Based on the above test results, this embodiment no longer uses the ultrasonic echo amplitude or echo energy as the main basis for judging the piston motion cycle. Instead, it obtains the piston distance by determining the flight time of the ultrasonic signal in the oil medium, and further compensates for the changes in sound velocity caused by oil type and oil temperature, thereby obtaining distance data that can more stably characterize the actual movement position of the piston.

[0042] like Figures 2 to 7 As shown, this embodiment provides an ultrasonic counting method for the piston of a fuel dispenser pump, including steps S100-S400.

[0043] S100: Acquires the type and temperature of the fuel in the fuel pump of the fuel dispenser, and acquires the ultrasonic echo signal collected by the ultrasonic sensor installed on the outer wall of the fuel pump of the fuel dispenser.

[0044] The oil type is used to characterize the oil medium delivered by the fuel pump of the current fuel dispenser, such as 92-octane gasoline, 95-octane gasoline, 98-octane gasoline, or diesel.

[0045] The fuel type can be pre-programmed into the control device during the installation, maintenance, or parameter configuration phase of the fuel dispenser, or it can be obtained from the data interface connected to the fuel dispenser control system.

[0046] Furthermore, the fuel type can be determined based on preset association information of the fuel dispenser's corresponding nozzle, fuel line, or fuel tank. For example, during the installation or maintenance phase of the fuel dispenser, a mapping relationship is established between the fuel type corresponding to each fuel line and the ultrasonic counting terminal. When the target fuel pump is put into operation, the corresponding fuel type is determined based on the currently operating fuel line. Therefore, it is unnecessary to re-identify the fuel type during each refueling process.

[0047] The oil temperature is used to characterize the real-time temperature inside the oil pump or at a location corresponding to the oil temperature inside the pump. The oil temperature can be acquired by a temperature sensor, and the acquired temperature data is provided to a processor for performing ultrasonic counting processing.

[0048] An ultrasonic sensor is installed on the outer wall of the oil pump to emit ultrasonic signals into the pump without damaging its original mechanical structure.

[0049] Furthermore, the acoustic working surface of the ultrasonic sensor is fitted to the outer wall of the oil pump, and an acoustic coupling layer can be placed between them to reduce interface reflection loss when the ultrasonic signal enters the pump wall from the sensor. The ultrasonic sensor can be installed on the outer wall of the oil pump using positioning fixtures, clamps, adhesives, or other fixed structures that can limit the installation position, so that the sensor position and sound propagation path remain consistent in different installation processes.

[0050] Furthermore, the installation position preferably corresponds to the piston's reciprocating motion path, so that the piston can form a recognizable target reflected echo during at least part of its reciprocating stroke.

[0051] The ultrasonic signal propagates sequentially through the pump wall and the oil medium to the piston, where it is reflected to form an ultrasonic echo signal. The returned ultrasonic echo signal is received by an ultrasonic sensor and, after signal conditioning processing such as amplification, filtering, and envelope detection, is converted from analog to digital to form echo sampling data that can be used for subsequent time-of-flight identification.

[0052] Therefore, there is no need to add a detection structure that is mechanically connected to the piston inside the oil pump, and ultrasonic detection signals related to the piston's movement position can be obtained from outside the oil pump.

[0053] S200: Determines the corrected sound velocity based on the oil type and temperature, and determines the ultrasonic flight time corresponding to the piston of the fuel pump based on the ultrasonic echo signal.

[0054] The speed of ultrasonic propagation in oil is not constant; different types of oil have different speeds of sound, and even for the same type of oil, the speed of sound changes with temperature. Therefore, this implementation method does not use a uniform, fixed speed of sound for distance calculation, but rather determines a corrected speed of sound under the current ranging conditions based on the current type of oil and the real-time oil temperature.

[0055] On the other hand, the target echo corresponding to the piston is identified from the acquired ultrasonic echo signals, and the ultrasonic flight time is determined based on the time interval between ultrasonic emission and target echo return.

[0056] By combining sound speed correction with time-of-flight detection, a foundation is laid for obtaining distance data that reflects the actual position of the piston.

[0057] S210: Establish the sound velocity-temperature relationship for different types of oil products, and determine the corrected sound velocity based on the current oil product type and temperature.

[0058] Specifically, the sound velocity detection device is placed in different types of oil, and the sound velocity corresponding to each type of oil is obtained under multiple temperature conditions. The sound velocity-temperature relationship corresponding to each type of oil is obtained by fitting the sound velocity-temperature relationship based on the temperature conditions and the corresponding sound velocity. The corresponding sound velocity-temperature relationship is called according to the type of oil, and the corrected sound velocity is determined based on the oil temperature and the sound velocity-temperature relationship.

[0059] For example, different types of oil can be placed in high and low temperature test environments, and after reaching full thermal equilibrium at different temperature points, the corresponding sound velocity can be measured. A fitting relationship can be established based on the corresponding data of temperature and sound velocity.

[0060] In one implementation, the sound velocity-temperature relationship for different oil types can be expressed as:

[0061] 98-octane gasoline:

[0062] 95-octane gasoline:

[0063] 92-octane gasoline:

[0064] diesel fuel:

[0065] in, Indicates the oil temperature. This represents the corrected velocity of sound for the corresponding oil at the current temperature.

[0066] The specific fitting relationship described above is one implementation method obtained under experimental conditions. In practical applications, corresponding sound velocity-temperature relationships can be established based on oil type, oil formulation, and calibration data.

[0067] By establishing sound velocity-temperature relationships for different types of oils and determining corrected sound velocities based on the current oil type and real-time oil temperature, it is possible to simultaneously compensate for the differences in media between different oils and the changes in sound velocity caused by temperature variations in the same type of oil. This avoids systematic distance measurement deviations caused by changes in oil or temperature when using a fixed sound velocity, thereby improving the consistency and accuracy of piston distance calculations under wide temperature conditions.

[0068] S220: Determine the ultrasonic flight time of the piston based on the ultrasonic echo signal.

[0069] Specifically, after enabling analog-to-digital sampling, the ultrasonic sensor is excited to emit ultrasonic signals and multiple echo sampling values ​​are continuously acquired. The multiple echo sampling values ​​are smoothed and the ranging blind zone corresponding to the ultrasonic emission is eliminated. From the ranging blind zone, the local minimum point and the local maximum point are searched sequentially. When the amplitude difference between the local minimum point and the local maximum point meets the preset echo threshold, the target echo is determined, and the ultrasonic flight time is determined according to the position of the target echo.

[0070] In one implementation, the processor first initiates the analog-to-digital conversion module to perform sampling, and then outputs excitation pulses to the ultrasonic transducer. The analog-to-digital conversion module can continuously acquire 1000 sample values ​​at a sampling rate of 1MHz, with a corresponding single sampling time window of approximately 1ms.

[0071] Because ultrasonic transducers generate strong emission waves and corresponding ringing signals after being excited, it is difficult to reliably identify the target reflection signal in the near-terminal time range after emission, thus forming a ranging blind zone in this time range.

[0072] The position of the transmitted wave and the corresponding blind zone on the time axis can be determined in advance through experiments, and this part of the sampled data can be excluded during the target echo search process.

[0073] like Figure 3 and Figure 4 As shown, after eliminating the ranging blind zone, the local minimum point is searched backward along the time axis from the corresponding position of the transmitted wave. After finding the local minimum point, the search continues backward to find the local maximum point, and the amplitude difference between the two is determined.

[0074]

[0075] in, This represents the sampling amplitude corresponding to the local maximum point. This represents the sampling amplitude corresponding to the local minimum point.

[0076] when When the preset echo threshold is reached or exceeded, the waveforms corresponding to the local lowest and highest points of the group are determined as the first target echo that meets the requirements.

[0077] Furthermore, to reduce the probability of isolated noise or stray reflections being misidentified as target echoes, a consistency judgment can be made on the positions of candidate target echoes obtained from multiple consecutive sampling periods. When the position change of the candidate target echo within adjacent sampling periods is within a preset range, the candidate target echo is confirmed as the target echo corresponding to the piston; when the position of the candidate target echo undergoes a sudden change exceeding a preset range relative to the previous sampling period, the current result can be marked as abnormal data, and the search for subsequent candidate echoes that meet the echo threshold can continue along the time axis.

[0078] In one implementation, the midpoint between the local lowest point and the local highest point can be selected as the location corresponding to the target echo, and the target echo time can be determined based on the time of this location on the sampling time axis. The corresponding ultrasonic flight time can then be obtained based on the time difference between the ultrasonic signal's emission time and the target echo time.

[0079] Furthermore, the position or flight time of the target echo can be linearly calibrated based on the actual standard distance to reduce the fixed measurement bias introduced by the signal processing method.

[0080] By first eliminating the ranging blind zone corresponding to the transmitted wave, and then using the local lowest point, the local highest point, and the difference between their amplitudes to identify the target echo, the interference of transmission ringing, random noise, and stray reflections with small amplitudes on target echo identification can be reduced, so that the flight time mainly corresponds to the effective reflection generated by the piston, thereby improving the reliability of subsequent piston distance calculation.

[0081] S300: The distance between the piston and the ultrasonic sensor is determined based on the ultrasonic flight time and the corrected sound velocity, and the distance data that changes continuously with the reciprocating motion of the piston is obtained.

[0082] After obtaining the ultrasonic flight time and the corrected velocity of sound corresponding to the current oil quality, the piston distance can be determined based on the relationship between the ultrasonic waves and the piston during their round-trip propagation.

[0083] Since the ultrasonic signal needs to enter the oil pump from the outer wall of the oil pump, the actual flight time may also include the propagation time of the ultrasonic signal in the pump wall and the response delay of the detection circuit itself. This embodiment further compensates for the corresponding fixed error.

[0084] As the piston reciprocates, the distance between the piston and the ultrasonic sensor changes continuously, thus generating distance data that varies over time. This continuous distance data reflects the periodic positional changes of the piston as it moves from the proximal end to the distal end and back again. Compared to the aforementioned accumulated value M, this distance data is primarily determined by the ultrasonic flight time and the temperature-corrected speed of sound in the medium, providing a more direct characterization of the piston's actual position.

[0085] S310: Compensate for the ranging results corresponding to the ultrasonic flight time based on a preset fixed error.

[0086] Specifically, the ranging results corresponding to the ultrasonic flight time are compensated according to a preset fixed error, wherein the preset fixed error includes at least one of the oil pump wall propagation time and circuit delay.

[0087] During the equipment calibration phase, the piston or standard reflective target can be set at a known distance position to obtain a fixed deviation between the distance measured by the system and the actual distance, and corresponding compensation parameters can be established based on the fixed deviation.

[0088] During subsequent normal operation, the initial distance calculated based on the flight time is corrected according to the compensation parameters.

[0089] For fixed deviations caused by sensor installation position, the position of ultrasonic sensor relative to oil pump can be limited by installation fixtures with a defined installation position, so that the ultrasonic propagation path has better consistency in different equipment or different installation processes.

[0090] By compensating for fixed system errors such as pump wall propagation time and circuit delay, the propagation time not caused by the actual distance between the piston and the sensor can be eliminated or reduced from the ranging results, thereby reducing fixed system deviations and improving the consistency of ranging results after different sensors are installed.

[0091] S320: Performs composite filtering on distance data.

[0092] Specifically, after obtaining the distance data, the distance data is subjected to composite filtering, which includes at least one of median filtering and mean filtering.

[0093] In one implementation, the continuous distance data can first be subjected to median filtering to remove isolated spikes caused by occasional echo identification anomalies, and then the median-filtered distance data can be subjected to mean filtering to reduce random fluctuations that exist during continuous sampling.

[0094] For example, when only one or a few sampling points in a set of continuous distance data deviate significantly from their adjacent distance data, median filtering can reduce the impact of the isolated outlier on the distance waveform; for random noise with small amplitude and continuous distribution, mean filtering can be used for further smoothing.

[0095] Figure 5 The waveform changes of the distance data before and after filtering are shown. The filtered distance waveform exhibits less random jitter and abrupt changes compared to the unfiltered waveform.

[0096] In the corresponding tests, periodic trends can be fitted to the distance waveforms before and after filtering, and the fitted piston periodic trend can be subtracted from the original waveform to represent the noise as a residual sequence. The noise power can be determined based on the mean square of the residual sequence.

[0097] For example, when the signal power Noise power before filtering hour:

[0098]

[0099] Filtered noise power hour:

[0100]

[0101] The relative improvement in the linear signal-to-noise ratio is approximately:

[0102]

[0103] Furthermore, median filtering and mean filtering can be performed in series in a preset order. For example, isolated outliers can be removed first by median filtering, and then continuous random fluctuations can be reduced by mean filtering. The median filtering window and mean filtering window can be set according to the sampling frequency, the maximum piston speed, and the allowable processing delay, so that the filtering window covers multiple consecutive distance sampling values ​​but does not span a complete piston movement cycle.

[0104] Furthermore, in other embodiments, distance data can be processed by combining Kalman filtering, low-pass filtering, or other filtering methods that can maintain the piston cycle variation trend.

[0105] By applying median filtering, mean filtering, or a combination of both to the distance data, isolated outliers and continuous random noise can be suppressed simultaneously, making the periodic distance changes caused by piston movement smoother. This reduces the probability of misidentification of the state due to instantaneous distance jumps, providing a more stable data foundation for subsequent complete cycle judgment based on distance state.

[0106] S400: Based on distance data, determine multiple preset motion states that the piston will experience in sequence. When multiple preset motion states are identified in sequence according to a preset order, determine that the piston has completed one reciprocating motion and update the piston's reciprocating count value.

[0107] This implementation does not directly count when the distance waveform shows a single peak, valley, or threshold crossing, but instead establishes multiple preset motion states based on the multiple position intervals experienced by the piston in one complete reciprocating process.

[0108] The processor continuously acquires piston distance data and determines the current stage of piston motion based on the current distance and previously identified motion states. Only after multiple motion states appear in a predetermined sequence is the piston confirmed to have completed one full reciprocating motion.

[0109] Therefore, even if individual distance data cross the judgment boundary due to noise, echo recognition error, or instantaneous fluctuations, a new repetitive count will not be triggered as long as a complete state change sequence is not formed.

[0110] S410: Establish motion state determination conditions based on the nearest measurable distance, the farthest distance, and the near-end ranging blind zone.

[0111] Specifically, the nearest and farthest measurable distances corresponding to the piston are obtained, a distance judgment interval is determined based on the nearest and farthest measurable distances, and a preset distance threshold is set within the distance judgment interval; based on the relationship between the distance data and the preset distance thresholds and whether the piston enters the near-end ranging blind zone, multiple preset motion states corresponding to the piston are determined.

[0112] After the equipment is installed and running, the shortest measurable distance that the piston can be stably detected by the ultrasonic sensor and the farthest distance corresponding to the piston moving to the far end position can be determined by continuously observing the distance data returned during the piston movement.

[0113] A distance determination interval is formed based on the nearest measurable distance and the farthest distance, and a preset distance threshold is set within this interval.

[0114] In one implementation, a preset distance threshold can be set at a position approximately one-third of the distance from the nearest measurable distance, based on the distance span between the nearest measurable distance and the farthest distance.

[0115] The above one-third is only one implementation method determined by experiments. In actual use, the corresponding threshold can be set according to the oil pump structure, piston stroke, size of the near-end blind zone of the ultrasonic sensor, and distance waveform distribution.

[0116] Furthermore, the preset distance threshold can also be dynamically determined based on the distance data collected during the initial stage of piston operation. For example, within a preset calibration period, the maximum distance and the nearest effective distance corresponding to multiple complete reciprocating cycles can be obtained, and the maximum distance and the nearest effective distance of multiple cycles can be statistically analyzed. Based on the statistical results, the distance judgment interval and the corresponding preset distance threshold can be determined.

[0117] When a change in the oil pump model, reinstallation of the ultrasonic sensor, or a continuous change in the overall position of the distance waveform is detected, the distance threshold calibration process can be re-executed.

[0118] Furthermore, when the piston continues to approach the ultrasonic sensor and enters the near-end ranging blind zone, since the effective target echo is difficult to distinguish from the transmitted wave or ringing signal, the system can set the distance data corresponding to this state to zero or to a preset value used to indicate that there is no effective ranging result.

[0119] Therefore, the near-end ranging blind zone itself can also serve as a basis for determining the state of the piston near its near-end limit position.

[0120] By simultaneously utilizing the nearest measurable distance, the farthest distance, the distance threshold, and the near-end ranging blind zone for state division, a complete piston stroke can be divided into multiple stages with clear spatial meaning. The ranging blind zone, which was originally unfavorable for near-distance measurement, is transformed into a basis for piston state determination, which helps to improve the reliability of determining the boundary of the complete reciprocating cycle.

[0121] S420: Determine the first motion state, the second motion state, the third motion state, and the fourth motion state.

[0122] Specifically, the multiple preset motion states include a first motion state, a second motion state, a third motion state, and a fourth motion state.

[0123] When the distance data is greater than zero and less than the preset distance threshold, the piston is determined to be in the first or third motion state; when the distance data is greater than the preset distance threshold, the piston is determined to be in the second motion state; when the piston enters the near-end ranging blind zone, the piston is determined to be in the fourth motion state.

[0124] Although the first and third motion states correspond to the same or similar distance ranges, they are at different stages of the piston's complete reciprocating motion. Therefore, they can be distinguished by combining the previously identified states.

[0125] For example, when a new cycle of recognition begins, if the distance data is detected to be greater than zero and less than a preset distance threshold, it can be identified as the first motion state.

[0126] As the piston moves away from the ultrasonic sensor, when the distance data crosses a preset distance threshold and exceeds that threshold, it is identified as the second motion state.

[0127] Having already identified the first and second motion states, when the piston returns from the far end and re-enters the interval where the distance data is greater than zero and less than the preset distance threshold, the current state is identified as the third motion state.

[0128] Subsequently, as the piston continues to approach the ultrasonic sensor and enters the proximal ranging blind zone, it is identified as the fourth motion state.

[0129] Therefore, the first and third motion states are not distinguished by a single instantaneous distance value, but are determined by the current distance conditions and the states that have been experienced previously.

[0130] By combining the distance range with the state history, it is possible to distinguish when the piston passes through the same distance range during the outward and return strokes, avoiding the problem that the piston's motion stage cannot be determined based solely on instantaneous distance. This allows each preset motion state to correspond one-to-one with the different stages of a complete reciprocating process of the piston.

[0131] S430: Determine whether the piston has completed one reciprocating motion according to the preset sequence.

[0132] Specifically, when the first motion state, the second motion state, the third motion state, and the fourth motion state are identified in sequence, it is determined that the piston has completed one reciprocating motion.

[0133] The processor can set the status flag bits corresponding to the first motion state, the second motion state, the third motion state, and the fourth motion state respectively.

[0134] When the first motion state is detected, it is recorded that the first motion state has occurred; only when the first motion state has been recorded will the second motion state be further determined.

[0135] After the first and second motion states have been identified, the third motion state is then identified; after the first three motion states are satisfied in sequence, it is then determined whether the piston has entered the fourth motion state.

[0136] When the four motion states are as follows:

[0137] First motion state → Second motion state → Third motion state → Fourth motion state

[0138] When all the sequences appear in sequence, it is determined that the piston has completed one full reciprocating motion, and the current reciprocating count value is incremented by one.

[0139] After completing one count, the corresponding status flag can be cleared, and the identification process for the next piston reciprocating cycle can begin.

[0140] Therefore, even if a single abnormal distance value briefly meets the distance condition of a certain motion state, it will not directly generate a valid count in the absence of a preceding state.

[0141] By requiring multiple motion states to appear sequentially according to a preset time sequence before confirming a complete reciprocating motion, the piston's spatial position change and motion time sequence relationship can be combined for counting and judgment. This effectively reduces repeated counting and erroneous counting caused by random noise, instantaneous distance jumps, and single threshold crossings, thereby improving the robustness of reciprocating cycle recognition.

[0142] S500: Determine the corresponding oil metering value based on the piston reciprocating count value and the preset displacement of the fuel dispenser pump in one reciprocating motion.

[0143] Furthermore, the corresponding oil metering value is determined based on the piston's reciprocating count and the preset displacement of the fuel dispenser's pump in a single reciprocating motion.

[0144] For fuel dispenser pumps with a fixed mechanical structure and single-cycle displacement, the amount of oil discharged corresponding to each complete reciprocating motion of the piston can be pre-calibrated and stored in the processor or memory as a preset displacement for a single reciprocating motion.

[0145] In one implementation, the piston completes one reciprocating motion when the fuel pump of the fuel dispenser completes one revolution, and the fuel dispensing volume corresponding to each complete reciprocating motion is approximately 0.5L. Therefore, the fuel metering value Q can be expressed as:

[0146]

[0147] Where N represents the number of complete piston reciprocations that have been identified, and Q represents the oil metering value determined based on the number of piston reciprocations.

[0148] For other oil pumps with different single-reciprocating displacements, 0.5L can be replaced with the preset single-reciprocating displacement obtained from the actual calibration of the corresponding oil pump.

[0149] By establishing a correspondence between the piston reciprocating count and the single reciprocating displacement of the oil pump, the corresponding oil metering value can be obtained based on the number of piston mechanical movements without directly detecting the instantaneous flow rate of the oil. This allows the ultrasonic piston detection results to be further converted into fuel dispenser operation metering information.

[0150] To verify the stability of the above method for ranging under wide temperature conditions, the oil can be set as different media such as gasoline and diesel, and multiple temperature test points can be set in the range of -20℃ to 60℃.

[0151] After real-time correction of the ultrasonic velocity using the sound velocity-temperature relationship corresponding to different oil types, the standard distance position was measured. In the experiment, the absolute error of a single distance measurement could be controlled within approximately ±0.05 mm, and the peak, trough, and baseline of the distance waveform did not show a significant overall drift similar to the previous accumulated value M.

[0152] Furthermore, dynamic operation tests were conducted within the oil pump speed range of 0–120 r / min, with each test increment at 20 r / min. The results of standard mechanical measurement and ultrasonic counting were compared at different temperatures and speeds. By correcting for sound velocity, distance filtering, and sequential identification of multiple motion states, the piston reciprocating cycle could be continuously obtained.

[0153] In field testing, ultrasonic sensors were installed on the outer wall of the fuel pump of a commercial fuel dispenser and operated continuously under actual start-stop, flow rate changes, and diurnal temperature variations. The cumulative value of standard mechanical measurement was 537.5, corresponding to a cumulative value of 537.16 for ultrasonic testing. The difference between the two was -0.34, and the relative error was approximately -0.063%.

[0154] As can be seen from the above tests, compared with the method of using the aforementioned cumulative value M as the main basis for determining the cycle, by correcting the ultrasonic velocity according to the oil type and real-time temperature, obtaining the piston distance based on the ultrasonic flight time, and then combining the distance threshold, the near-end ranging blind zone, and the time-series changes of multiple preset motion states for reciprocating counting, the influence of temperature changes and differences in oil medium on the detection results can be reduced, and the counting stability of the fuel pump piston of the refueling machine under wide temperature, variable speed, and long-term operating conditions can be improved.

[0155] This embodiment also provides an ultrasonic counting terminal for the fuel pump piston of a fuel dispenser, including a memory, a processor, and a computer program stored in the memory and capable of running on the processor.

[0156] The memory can be used to store data such as the sound velocity-temperature relationship for different oil types, preset echo threshold, nearest measurable distance, farthest distance, preset distance threshold, fixed error compensation parameters, reciprocating count value, and preset displacement for a single reciprocating cycle.

[0157] Furthermore, the ultrasonic counting terminal may also include a communication interface, which is used to communicate with the fuel dispenser controller, host computer, or external data acquisition device to output at least one of piston distance data, fuel temperature, piston reciprocating count value, fuel metering value, and operating status data.

[0158] During the debugging or calibration phase, the communication interface can also be used to output raw echo data, distance data before and after filtering, sound velocity correction parameters, and status flags corresponding to each motion state, so as to facilitate monitoring and parameter adjustment of the ultrasonic counting process.

[0159] The processor is communicatively connected to the ultrasonic sensor, the temperature detection device, and the memory to acquire the oil temperature and ultrasonic echo signal, and to execute the corresponding processing procedures in steps S100-S500 above.

[0160] When the processor executes the computer program, it determines the corrected sound velocity based on the oil type and oil temperature, determines the ultrasonic flight time corresponding to the piston based on the ultrasonic echo signal, obtains continuous distance data based on the corrected sound velocity and ultrasonic flight time, and determines whether the piston has completed one reciprocating motion based on multiple preset motion states corresponding to the distance data and the sequence of state changes.

[0161] By integrating sound velocity correction, target echo recognition, distance calculation, distance filtering, and motion state recognition into the ultrasonic counting terminal, the processor can automatically complete the continuous processing from the original ultrasonic echo signal to the piston reciprocating counting result, making it easy to apply the counting method to existing refueling equipment.

[0162] The processor described in the embodiments of this application can be implemented by hardware, firmware, software, or a combination thereof. It can be a circuit, one or more of an application-specific integrated circuit (ASIC), a digital signal processor (DSP), a digital signal processing device (DSPD), a programmable logic device (PLD), a field-programmable gate array (FPGA), a central processing unit (CPU), a controller, a microcontroller, or a microprocessor. It also includes other physical, biological, or chemical structures that can implement the same or equivalent functions as the processors listed above, such as biological neurons, quantum computing units, DNA computing units, etc., so that the processor can execute some or all of the steps in the computer program or method involved in the various embodiments of this application, or any combination of the steps mentioned therein.

[0163] In summary, this invention, by installing an ultrasonic sensor on the outer wall of the fuel pump, utilizes the ultrasonic echo flight time to obtain the piston distance and determines the corresponding corrected sound velocity based on the fuel type and real-time fuel temperature. This transforms piston position detection from echo amplitude detection, which is easily affected by temperature, fuel medium, and individual sensor differences, into ultrasonic ranging based on sound velocity compensation. This reduces the impact of changes in ultrasonic propagation characteristics under wide temperature environments and different fuel conditions on the ranging results, improving the accuracy and stability of piston position detection. Furthermore, by eliminating the ranging blind zone corresponding to the emission and determining the target echo based on the local peak and valley characteristics of the echo, combined with fixed error compensation such as pump wall propagation time and circuit delay, and filtering the distance data, interference from emission ringing, stray reflections, random noise, and system fixed deviations on the distance data can be reduced, allowing the obtained piston distance waveform to more stably reflect the actual reciprocating motion of the piston.

[0164] Meanwhile, this invention divides a single reciprocating motion into multiple preset motion states based on the relationship between continuous piston distance data and a preset distance threshold, as well as whether the piston enters the near-end ranging blind zone. It determines whether the piston has completed a full reciprocating motion based on the sequence of these motion states, rather than relying solely on a single peak, valley, or threshold crossing for counting. This reduces the risk of missed, duplicate, and incorrect counts caused by instantaneous distance jumps, local abnormal data, and fluctuations near the threshold, thus improving the reliability of piston reciprocating cycle identification. Based on the obtained piston reciprocating count values, the corresponding fuel metering value can also be determined by combining the preset displacement of the fuel pump in a single reciprocating motion. Without altering the original mechanical structure of the fuel pump, this invention achieves non-invasive continuous detection and metering of the fuel pump's operating status, providing a stable and reliable piston counting method for fuel dispensers under wide temperature, variable speed, and long-term operating conditions.

[0165] Finally, it should be noted that although the above embodiments have been described in the text and drawings of this application, this should not limit the scope of patent protection of this application. Any technical solutions that are based on the essential concept of this application and utilize the content described in the text and drawings of this application, resulting in equivalent structural or procedural substitutions or modifications, as well as the direct or indirect application of the technical solutions of the above embodiments to other related technical fields, are all included within the scope of patent protection of this application.

Claims

1. A method for ultrasonic counting of fuel pump pistons in a fuel dispenser, characterized in that, include: The type and temperature of the fuel in the fuel pump of the fuel dispenser are obtained, and the ultrasonic echo signal collected by the ultrasonic sensor installed on the outer wall of the fuel pump of the fuel dispenser is also obtained. The corrected speed of sound is determined based on the type and temperature of the oil, and the ultrasonic flight time corresponding to the piston of the fuel pump is determined based on the ultrasonic echo signal. The distance between the piston and the ultrasonic sensor is determined based on the ultrasonic flight time and the corrected sound velocity, thus obtaining distance data that changes continuously with the reciprocating motion of the piston; Based on the distance data, a number of preset motion states that the piston experiences sequentially are determined. When the multiple preset motion states are identified sequentially in a preset order, it is determined that the piston has completed one reciprocating motion, and the reciprocating count value of the piston is updated.

2. The ultrasonic counting method for the oil pump piston of a fuel dispenser according to claim 1, characterized in that, The determination of the multiple preset motion states that the piston sequentially experiences based on the distance data includes: Obtain the nearest measurable distance and the farthest distance corresponding to the piston, determine the distance judgment interval based on the nearest measurable distance and the farthest distance, and set a preset distance threshold within the distance judgment interval; Based on the relationship between the distance data and the preset distance threshold, and whether the piston enters the near-end ranging blind zone, multiple preset motion states corresponding to the piston are determined.

3. The ultrasonic counting method for the oil pump piston of a fuel dispenser according to claim 2, characterized in that, The plurality of preset motion states include a first motion state, a second motion state, a third motion state, and a fourth motion state; When the distance data is greater than zero and less than the preset distance threshold, it is determined that the piston is in the first motion state or the third motion state; When the distance data is greater than the preset distance threshold, it is determined that the piston is in the second motion state; When the piston enters the proximal ranging blind zone, it is determined that the piston is in the fourth motion state.

4. The ultrasonic counting method for the oil pump piston of a fuel dispenser according to claim 3, characterized in that, The step of determining that the piston has completed one reciprocating motion when the plurality of preset motion states are identified sequentially in a preset order includes: When the first motion state, the second motion state, the third motion state, and the fourth motion state are identified in sequence, it is determined that the piston has completed one reciprocating motion.

5. The ultrasonic counting method for the oil pump piston of a fuel dispenser according to claim 1, characterized in that, The step of determining the corrected velocity of sound based on the oil type and oil temperature includes: The sound velocity detection device was placed in different types of oil and the sound velocity corresponding to each type of oil was obtained under multiple temperature conditions. The sound velocity-temperature relationship corresponding to each type of oil was obtained by fitting the sound velocity corresponding to each temperature condition and its corresponding sound velocity. The corresponding sound velocity-temperature relationship is invoked according to the oil type, and the corrected sound velocity is determined based on the oil temperature and the sound velocity-temperature relationship.

6. The ultrasonic counting method for the oil pump piston of a fuel dispenser according to claim 1, characterized in that, Determining the ultrasonic flight time corresponding to the piston based on the ultrasonic echo signal includes: After enabling analog-to-digital sampling, the ultrasonic sensor is excited to emit ultrasonic signals and continuously acquires multiple echo sample values; The multiple echo sample values ​​are smoothed, and the ranging blind zone corresponding to the ultrasonic emission is eliminated; After the ranging blind zone, the local lowest point and the local highest point are searched sequentially. When the amplitude difference between the local lowest point and the local highest point meets the preset echo threshold, the target echo is determined, and the ultrasonic flight time is determined according to the position of the target echo.

7. The ultrasonic counting method for the oil pump piston of a fuel dispenser according to claim 1, characterized in that, Determining the distance between the piston and the ultrasonic sensor based on the ultrasonic flight time and the corrected sound velocity includes: The ranging result corresponding to the ultrasonic flight time is compensated according to a preset fixed error, wherein the preset fixed error includes at least one of the oil pump wall propagation time and circuit delay.

8. The ultrasonic counting method for the oil pump piston of a fuel dispenser according to claim 1, characterized in that, After obtaining the distance data, the distance data is subjected to composite filtering, which includes at least one of median filtering and mean filtering.

9. The ultrasonic counting method for the oil pump piston of a fuel dispenser according to claim 1, characterized in that, Also includes: The corresponding oil metering value is determined based on the reciprocating count of the piston and the preset displacement of the single reciprocating pump of the fuel dispenser.

10. An ultrasonic counting terminal for a fuel dispenser pump piston, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the steps in the ultrasonic counting method for the fuel pump piston of any one of claims 1-9.