A fuel quantity correction method and device, a terminal device, and a storage medium
By generating initial sampling values when the vehicle starts, and combining data processing methods for high-speed and low-speed driving, the fuel level display is updated in real time using an oil float and a sliding rheostat, solving the problem of inaccurate fuel level display and improving the accuracy and stability of the display.
Patent Information
- Application Number
- CN202510094808.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-21
- Publication Date
- 2025-10-21
- Estimated Expiration
- 2045-01-21
AI Technical Summary
In existing technologies, fuel level displays are prone to inaccuracies under complex operating conditions, leading drivers to misjudge the remaining fuel level, which affects driving safety and user experience.
By generating the first sample value when the vehicle starts, the average value of the fuel signal is collected in real time when driving at high speed, and the average value is calculated after a delay when driving at low speed. Combined with the mechanical connection between the oil float and the sliding rheostat, the fuel quantity display is monitored and updated in real time.
It improves the accuracy and stability of the fuel level display, avoids display jumps caused by fuel level fluctuations, and enhances the user experience.
Smart Images

Figure CN119928565B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of electronic control technology, and in particular to a fuel quantity correction method, device, terminal equipment and storage medium. Background Art
[0002] A fuel level indicator is an in-vehicle system that displays the remaining fuel in the vehicle's tank. It's typically located on the vehicle's dashboard and displayed as a pointer, digital display, or bar graph. The primary function of a fuel level indicator is to help drivers understand the vehicle's fuel status, enabling them to plan routes and refueling times, and avoid stalling due to fuel exhaustion. The fuel level indicator provides more than just a simple readout; it serves as a crucial tool for drivers to assess vehicle range, plan routes, and ensure driving safety. An accurate and stable fuel level indicator significantly enhances the driving experience and reduces the risks associated with low fuel levels.
[0003] In existing technologies, most sensors detect changes in the fuel tank's fluid level. The vehicle's electronic control unit then calculates the specific fuel level based on a linear relationship (according to the design concept, the fuel level change should be uniform and linear as the vehicle travels). However, during driving, various complex operating conditions can affect the accuracy of the fuel level display. For example, on complex road conditions such as ramps, single-sided bridges, and roundabouts, the vehicle is not level. The fuel in the tank tilts to one side due to gravity, causing the fuel level to fluctuate. This in turn changes the data collected by the sensor, resulting in a jump in the fuel level display. When the vehicle accelerates or decelerates rapidly, the fuel in the tank sloshes violently, causing the fuel level measured by the sensor to fluctuate significantly within a short period of time, resulting in inaccurate fuel level display. Furthermore, vehicles alternate between level roads, slopes, and sharp turns. The instability of the fuel level and the sensor's response lag make it difficult for the fuel level display to accurately reflect the actual situation in real time. If the fuel level display is inaccurate, the driver may misjudge the vehicle's remaining fuel level, mistakenly believing that the fuel is sufficient, and fail to refuel in time, ultimately causing the vehicle to run out of fuel and break down. Frequent fuel level display errors can reduce user trust in a vehicle brand, impacting brand reputation and market competitiveness. Improving the accuracy of fuel level display is a pressing technical issue. Summary of the Invention
[0004] The present invention aims to provide a fuel quantity correction method, apparatus, terminal device and storage medium to solve the above technical problems and improve the accuracy of fuel quantity display.
[0005] In order to solve the above technical problems, the present invention provides a fuel quantity correction method, comprising:
[0006] When it is detected that the electrical system of the target vehicle is powered on, generating a first sampling value based on a first sampling logic;
[0007] collecting the target vehicle's speed in real time, and when the target vehicle's speed exceeds a first preset speed threshold, continuously collecting a fuel signal for a first preset time period, and using an average value of the fuel signal as a second sampling value;
[0008] obtaining a current fuel level displayed on the instrument panel, comparing the current fuel level with a first fuel level corresponding to the second sampling value, and updating the fuel level displayed on the instrument panel according to the comparison result;
[0009] When the target vehicle's speed is less than the first preset speed threshold, a first memory value is generated based on a second sampling logic; wherein the second sampling logic collects the fuel signal for the first preset time period after a first preset time interval, and uses an average value of the fuel signal as the first memory value;
[0010] A real-time sampling value at the current moment is obtained, and when a difference between the real-time sampling value and the first memory value exceeds a first preset difference, the fuel amount displayed on the instrument panel is updated to the fuel amount corresponding to the first sampling value.
[0011] In the above solution, a first sampled value is generated immediately upon vehicle startup, providing an initial baseline for subsequent fuel level calculations and avoiding delays in the fuel level display due to system delays. Continuous sampling and averaging when the speed exceeds a preset threshold effectively filters out short-term fluctuations, improving data stability and addressing the dramatic fuel level fluctuations seen during high-speed driving or sudden acceleration or deceleration. Comparing the current displayed value with the second sampled value allows for timely detection and correction of fuel level display deviations, avoiding sudden changes in the fuel level display due to fuel level fluctuations and improving the user experience. When the vehicle's speed drops below the first preset speed threshold, a second sampling logic is used to regenerate the sampled value. This takes into account the smaller fuel level fluctuations at low speeds. Delayed sampling and averaging provide a more accurate reflection of fuel level changes. Furthermore, comparing the real-time sampled value with the first stored value allows for rapid detection of abnormal fuel level changes. When significant fuel level changes occur, the display can be quickly updated to respond, avoiding misjudgments caused by display lag.
[0012] In one implementation, when detecting that the electrical system of the target vehicle is powered on, generating the first sampling value based on the first sampling logic specifically includes:
[0013] When it is detected that the electrical system of the target vehicle is powered on, a fuel signal of a second preset time length is continuously collected based on an average filtering method after a second preset time interval, an average value of the fuel signal is used as the first sampling value, and the fuel amount corresponding to the first sampling value is used as the current fuel amount displayed on the instrument panel.
[0014] In this solution, delaying fuel signal acquisition until the second preset time interval prevents errors caused by sensor response lag or fuel level fluctuations at the moment of vehicle startup. Continuously acquiring the fuel signal and calculating its average value using an averaging filter effectively filters out short-term fluctuations and noise, improving the stability and reliability of the fuel signal.
[0015] In one implementation, obtaining the current fuel level displayed on the instrument panel specifically includes:
[0016] An oil float is provided in the fuel tank of the target vehicle; wherein the oil float is configured to move with the rise and fall of the fuel liquid level;
[0017] Mechanically connecting the oil float to a sliding rheostat so that the oil float drives the slider of the sliding rheostat to move as the fuel level changes, thereby changing the resistance value of the sliding rheostat;
[0018] Obtaining a current resistance value of the sliding rheostat, searching a conversion table of resistance values and fuel capacity percentages, and obtaining a fuel capacity percentage corresponding to the current resistance value;
[0019] A current fuel level is generated based on the total capacity of the fuel tank and the fuel level percentage and the current fuel level is sent to the instrument cluster.
[0020] In the above solution, the mechanical connection between the oil float and the sliding rheostat is simple, easy to implement, and maintain. As a mature electronic component, the rheostat offers high durability and stability. This mechanical connection, combined with a conversion table between resistance and fuel capacity percentage, enables real-time and accurate fuel level monitoring and display. This simple and reliable structure, strong real-time performance, high accuracy, adaptability, and low cost effectively improve fuel level display accuracy and user experience.
[0021] In one implementation, comparing the current fuel level with a first fuel level corresponding to the second sampling value, and updating the fuel level displayed on the instrument panel according to the comparison result, specifically includes:
[0022] When the first fuel amount is greater than the current fuel amount, updating the fuel value displayed on the instrument panel according to the cumulative fuel injection amount decrease value from the last fuel display value update time to the current time;
[0023] When the first fuel amount is less than the current fuel amount, the fuel value displayed on the instrument panel is updated along the first fuel amount.
[0024] In this solution, the current fuel level is compared with the first fuel level, and the fuel value displayed on the instrument panel is updated based on the actual fuel trend. This avoids sudden changes in the instrument panel display caused by sudden changes in the fuel signal, improving the user's visual experience. In particular, when the first fuel level is greater than the current fuel level, the cumulative fuel injection amount is used to update the display, avoiding sudden jumps in the fuel level display and ensuring a smoother fuel level display.
[0025] In one implementation, the fuel quantity correction method further includes:
[0026] When it is detected that the electrical system of the target vehicle is powered off, after a delay of the first preset time interval, the fuel signal of the first preset time length is continuously collected based on a recursive average filtering algorithm, and the average value of the fuel signal is used as a second memory value;
[0027] When the difference between the first sampling value and the second memory value exceeds a second preset difference, the fuel amount displayed on the instrument panel is updated to the fuel amount corresponding to the first sampling value.
[0028] In this solution, by comparing the difference between the first sampled value and the second stored value, we can avoid erroneous updates caused by fuel level fluctuations after a power outage, ensuring update accuracy. By only updating when the difference exceeds a preset value, we effectively reduce errors caused by fuel level fluctuations after a power outage and improve system reliability.
[0029] In a second aspect, the present application further provides a fuel quantity correction device, comprising: a first sampling value generation module, a second sampling value generation module, a first fuel quantity update module, a first memory value generation module, and a second fuel quantity update module;
[0030] The first sampling value generating module is configured to generate a first sampling value based on a first sampling logic when detecting that the electrical system of the target vehicle is powered on;
[0031] The second sampling value generating module is used to collect the driving speed of the target vehicle in real time. When the driving speed of the target vehicle exceeds a first preset speed threshold, the fuel signal is continuously collected for a first preset time length, and the average value of the fuel signal is used as the second sampling value;
[0032] The first fuel level updating module is configured to obtain a current fuel level displayed on the instrument panel, compare the current fuel level with a first fuel level corresponding to the second sampling value, and update the fuel level displayed on the instrument panel according to the comparison result;
[0033] The first memory value generating module is configured to generate a first memory value based on a second sampling logic when the target vehicle's travel speed is less than the first preset speed threshold; wherein the second sampling logic is configured to collect the fuel signal for the first preset time length after a first preset time interval, and use the average value of the fuel signal as the first memory value;
[0034] The second fuel quantity updating module is used to obtain the real-time sampling value at the current moment. When the difference between the real-time sampling value and the first memory value exceeds a first preset difference, the fuel quantity displayed on the instrument panel is updated to the fuel quantity corresponding to the first sampling value.
[0035] In the above solution, a first sampled value is generated immediately upon vehicle startup, providing an initial baseline for subsequent fuel level calculations and avoiding delays in the fuel level display due to system delays. Continuous sampling and averaging when the speed exceeds a preset threshold effectively filters out short-term fluctuations, improving data stability and addressing the dramatic fuel level fluctuations seen during high-speed driving or sudden acceleration or deceleration. Comparing the current displayed value with the second sampled value allows for timely detection and correction of fuel level display deviations, avoiding sudden changes in the fuel level display due to fuel level fluctuations and improving the user experience. When the vehicle's speed drops below the first preset speed threshold, a second sampling logic is used to regenerate the sampled value. This takes into account the smaller fuel level fluctuations at low speeds. Delayed sampling and averaging provide a more accurate reflection of fuel level changes. Furthermore, comparing the real-time sampled value with the first stored value allows for rapid detection of abnormal fuel level changes. When significant fuel level changes occur, the display can be quickly updated to respond, avoiding misjudgments caused by display lag.
[0036] In one implementation, the first sampling value generating module is configured to generate a first sampling value based on a first sampling logic when detecting that the electrical system of the target vehicle is powered on, specifically including:
[0037] When it is detected that the electrical system of the target vehicle is powered on, a fuel signal of a second preset time length is continuously collected based on an average filtering method after a second preset time interval, an average value of the fuel signal is used as the first sampling value, and the fuel amount corresponding to the first sampling value is used as the current fuel amount displayed on the instrument panel.
[0038] In one implementation, the first fuel level update module is configured to obtain the current fuel level displayed on the instrument panel, specifically including:
[0039] An oil float is provided in the fuel tank of the target vehicle; wherein the oil float is configured to move with the rise and fall of the fuel liquid level;
[0040] Mechanically connecting the oil float to a sliding rheostat so that the oil float drives the slider of the sliding rheostat to move as the fuel level changes, thereby changing the resistance value of the sliding rheostat;
[0041] Obtaining a current resistance value of the sliding rheostat, searching a conversion table of resistance values and fuel capacity percentages, and obtaining a fuel capacity percentage corresponding to the current resistance value;
[0042] A current fuel level is generated based on the total capacity of the fuel tank and the fuel level percentage and the current fuel level is sent to the instrument cluster.
[0043] In one implementation, comparing the current fuel level with a first fuel level corresponding to the second sampling value, and updating the fuel level displayed on the instrument panel according to the comparison result, specifically includes:
[0044] When the first fuel amount is greater than the current fuel amount, updating the fuel value displayed on the instrument panel according to the cumulative fuel injection amount decrease value from the last fuel display value update time to the current time;
[0045] When the first fuel amount is less than the current fuel amount, the fuel value displayed on the instrument panel is updated along the first fuel amount.
[0046] In one implementation, the fuel quantity correction device further includes:
[0047] When it is detected that the electrical system of the target vehicle is powered off, after a delay of the first preset time interval, the fuel signal of the first preset time length is continuously collected based on a recursive average filtering algorithm, and the average value of the fuel signal is used as a second memory value;
[0048] When the difference between the first sampling value and the second memory value exceeds a second preset difference, the fuel amount displayed on the instrument panel is updated to the fuel amount corresponding to the first sampling value.
[0049] In a third aspect, the present application also provides a terminal device, comprising a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor implements the fuel quantity correction method as described above when executing the computer program.
[0050] In a fourth aspect, the present application further provides a computer-readable storage medium, which includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute the fuel quantity correction method as described above. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] Figure 1 A schematic flow chart of a fuel quantity correction method provided in one embodiment of the present invention;
[0052] Figure 2 Schematic diagram of a module of a fuel quantity correction device provided in one embodiment of the present invention. DETAILED DESCRIPTION
[0053] The following embodiments of the present invention are described in further detail with reference to the accompanying drawings and examples. The following examples are used to illustrate the present invention but are not intended to limit the scope of the present invention.
[0054] The terms "first," "second," and the like in the specification, claims, and drawings of this application are used to distinguish between different objects, not to describe a particular order. Furthermore, the terms "including," "having," and any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or apparatus comprising a series of steps or elements is not limited to the listed steps or elements, but may optionally include steps or elements not listed, or may optionally include other steps or elements inherent to the process, method, product, or apparatus.
[0055] References herein to "embodiments" mean that a particular feature, structure, or characteristic described in connection with the embodiments may be included in at least one embodiment of the present application. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor does it constitute an independent or alternative embodiment that is mutually exclusive of other embodiments. It is understood, both explicitly and implicitly, by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0056] Example 1
[0057] See also Figure 1 , Figure 1 The flowchart of a fuel quantity correction method provided in one embodiment of the present invention is as follows. The embodiment of the present invention provides, including steps 101 to 105, each of which is specifically as follows:
[0058] Step 101 : When it is detected that the electrical system of the target vehicle is powered on, a first sampling value is generated based on a first sampling logic.
[0059] In one embodiment, when it is detected that the electrical system of the target vehicle is powered on, a first sampling value is generated based on a first sampling logic, specifically including: when it is detected that the electrical system of the target vehicle is powered on, after a second preset time interval, continuously collecting a fuel signal for a second preset time length based on an average filtering method, taking the average value of the fuel signal as the first sampling value, and taking the fuel amount corresponding to the first sampling value as the current fuel amount displayed on the instrument panel.
[0060] In an embodiment of the present invention, when the vehicle's electrical system (such as a battery, ignition switch, or other power supply system) is powered on, the fuel system will start the initialization process. Transient power fluctuations may occur after the electrical system is powered on. To ensure stable operation of the electrical and fuel systems, the system will delay for a period of time after the electrical system is powered on before starting to collect fuel signals. The continuously collected signals are accumulated and then averaged within a certain time window. This method ensures that the collected signal can fully reflect the current fuel level, avoids errors caused by transient fluctuations or noise, and provides a more stable signal. In the subsequent fuel display logic, the first sampled value can be used as a reference value and compared with the real-time collected fuel signal to determine changes in the fuel level. For example, after a 1.5-second delay after KL15 is turned on, the fuel signal is continuously collected for 1 second, and the average value of the fuel signal is taken as the first sampled value A, which is then used as the fuel level displayed on the instrument panel. KL15 is the number of a relay signal line, indicating the state when the vehicle's ignition switch is in a specific position. KL ON is the abbreviation of Klrappe ON, which is a power state in the vehicle's electrical system. It means that the vehicle's electrical system is powered on, but the engine has not yet started.
[0061] Step 102: The target vehicle's driving speed is collected in real time. When the target vehicle's driving speed exceeds a first preset speed threshold, the fuel signal is continuously collected for a first preset time period, and an average value of the fuel signal is used as a second sampling value.
[0062] During vehicle operation, the fuel system's status is affected by various factors, such as driving speed, fuel consumption rate, and dynamic changes in the fuel level. To ensure the accuracy and reliability of the fuel display, the fuel signal acquisition logic needs to be dynamically adjusted based on changes in driving speed. In an embodiment of the present invention, a speed sensor is installed on the vehicle's transmission system or wheels. The speed sensor outputs an electrical signal proportional to the vehicle speed. Based on the signal received from the speed sensor, an electronic control unit calculates and outputs the current vehicle speed. The system continuously acquires the speed signal at a high frequency (e.g., multiple times per second) to ensure the real-time and accurate speed data. The acquired speed signal is used to determine the vehicle's current driving status. When the driving speed exceeds a first preset speed threshold, continuous fuel signal acquisition is initiated for a preset duration. This extended acquisition period ensures that the acquired data reflects the current fuel level and avoids errors caused by transient fluctuations. During the acquisition process, a recursive averaging filter or other filtering algorithm is used to accumulate all acquired fuel signal values and then divide them by the number of acquisitions to obtain an average value. Assuming that the system collects 30 fuel signal values within 3 seconds (at a frequency of 10 times per second), the sum of these 30 values is divided by 30 to obtain an average value, which is used as the second sampling value. For example, in an embodiment of the present invention, when the vehicle speed is greater than 1.5 km / h, the refueling judgment is exited, and the recursive average filtering method is used to continuously collect fuel signals for 5 seconds, and the average value of the collected fuel signals is taken as the second sampling value B. It should be noted that if the sampling time is less than the first preset time length, the fuel signal within the deadline is used as the valid data for calculation. Preferably, the selection of the first preset speed threshold can also be optimized according to the design of the vehicle and the actual driving scenario. For example, for urban vehicles, the speed threshold may be lower (for example, 40-50 km / h); for high-speed vehicles, the speed threshold may be higher (for example, 80-100 km / h).
[0063] Step 103: Acquire the current fuel level displayed on the instrument panel, compare the current fuel level with the first fuel level corresponding to the second sampling value, and update the fuel level displayed on the instrument panel according to the comparison result.
[0064] In one embodiment, obtaining the current fuel amount displayed on the instrument panel specifically includes: setting an oil float in the fuel tank of the target vehicle; wherein the oil float is used to move with the rise and fall of the fuel liquid level; mechanically connecting the oil float to a sliding rheostat so that the oil float drives the slider of the sliding rheostat to move as the fuel page changes, thereby changing the resistance value of the sliding rheostat; obtaining the current resistance value of the sliding rheostat, traversing and querying in a conversion table of resistance value and fuel capacity percentage, and obtaining the fuel capacity percentage corresponding to the current resistance value; generating the current fuel amount according to the total capacity of the fuel tank and the fuel capacity percentage, and sending the current fuel amount to the instrument panel.
[0065] The oil float is a core component of fuel level detection and is typically installed inside the fuel tank. Its primary function is to move up and down with the rise and fall of the fuel level, reflecting the fuel level. The oil float is connected to the slider of a rheostat via a mechanical lever. As the oil float rises and falls with the fuel level, the lever drives the slider of the rheostat. The slider's range of movement corresponds to the oil float's height, covering the entire range of fuel tank levels, from empty to full. As the oil float rises (the fuel level rises), the slider moves in a direction that increases resistance; as the oil float falls (the fuel level falls), the slider moves in a direction that decreases resistance. The rheostat converts the oil float's displacement into an electrical signal, thereby reflecting the fuel level. In this embodiment of the present invention, after obtaining the current resistance value of the rheostat, a conversion table is searched. The conversion table is a predefined mapping relationship that converts the resistance value of the rheostat into a percentage of fuel capacity. If the resistance value accurately corresponds to a value in the conversion table, the corresponding fuel capacity percentage is directly returned. If the resistance value does not have a corresponding accurate value in the conversion table, the interpolation method (such as linear interpolation) is used to calculate the corresponding fuel capacity percentage. The total capacity of the fuel tank is a known fixed value, which is usually determined by the vehicle manufacturer during the design and manufacturing stage. For example, the total fuel tank capacity of a compact car may be 50 liters, while the total fuel tank capacity of an SUV may be 70 liters. According to the fuel capacity percentage obtained from the conversion table, combined with the total capacity of the fuel tank, the current fuel amount is calculated. Current fuel amount = total fuel tank capacity × fuel capacity percentage. The calculated current fuel amount will be transmitted to the vehicle's dashboard. It should be noted that the fuel signal in the embodiment of the present invention is the fuel capacity percentage.
[0066] In one embodiment, the current fuel amount is compared with the first fuel amount corresponding to the second sampling value, and the fuel amount displayed on the instrument panel is updated according to the comparison result, specifically including: when the first fuel amount is greater than the current fuel amount, updating the fuel value displayed on the instrument panel according to the cumulative decrease value of the fuel injection amount from the last fuel display value update time to the current time; when the first fuel amount is less than the current fuel amount, updating the fuel value displayed on the instrument panel along the first fuel amount.
[0067] In an embodiment of the present invention, the first fuel quantity is the historical fuel quantity corresponding to the average value of the fuel signal (i.e., the second sampling value) collected when the speed of the target vehicle exceeds the first preset speed threshold. If the first fuel quantity is greater than the current fuel quantity, it means that the vehicle consumes fuel faster during high-speed driving, resulting in a decrease in the current fuel quantity. The time difference from the last time the fuel display value was updated to the current time is calculated, and the engine injection rate is obtained through the engine control unit. The injection quantity is integrated based on the time difference to obtain the cumulative decrease in the injection quantity. The first fuel quantity is subtracted from the cumulative decrease in the injection quantity to obtain the fuel value that should be displayed on the instrument panel. If the first fuel quantity is less than the current fuel quantity, it means that a refueling operation may have occurred, or there is an error in the fuel quantity detection system. If there is an error, the fuel value displayed on the instrument panel is updated along the value of the first fuel quantity, that is, the current fuel quantity is set to the first fuel quantity.
[0068] Step 104: When the target vehicle's speed is less than the first preset speed threshold, a first memory value is generated based on a second sampling logic; wherein the second sampling logic collects the fuel signal for the first preset time length after a first preset time interval, and uses the average value of the fuel signal as the first memory value.
[0069] At low speeds, fuel consumption is relatively stable, but there may be fluctuations. By delaying the collection of fuel signals after the first preset time interval, the influence of instantaneous fluctuations on the sampling results can be avoided. In an embodiment of the present invention, when the vehicle is in a deceleration state and the driving speed is less than the first preset speed threshold, sampling is performed after a delay of the first preset time interval. At low speeds, there may be instantaneous fluctuations in fuel consumption (such as changes in fuel consumption at idle speed). Delayed sampling can avoid these instantaneous fluctuations and ensure the stability of the sampled data. The average value of the sampled fuel signal is then used as the first memory value. Exemplarily, in an embodiment of the present invention, when the vehicle speed drops from >1.5km / h to <1.5km / h, the fuel signal is continuously collected for 5 seconds after a delay of 10 seconds, and the average value of the fuel signal is used as the first memory value B. ′ , and continuously collect fuel signals.
[0070] Step 105: Obtain the real-time sampling value at the current moment. When the difference between the real-time sampling value and the first memory value exceeds a first preset difference, update the fuel amount displayed on the instrument panel to the fuel amount corresponding to the first sampling value.
[0071] The real-time sampling value can reflect the fuel consumption at the current moment. In the embodiment of the present invention, the real-time sampling value is compared with the first memory value to determine whether the fuel value has changed significantly. ′ If the difference exceeds the first preset difference, the fuel amount displayed on the instrument panel is updated to the fuel amount corresponding to the first sampling value. If the difference is greater than the first preset difference, it may indicate a significant increase in fuel amount (such as refueling). If the difference is less than the negative first preset difference, it may indicate a significant decrease in fuel amount (such as abnormal fuel consumption). If the difference is greater than the first preset difference, the fuel amount displayed on the instrument panel is updated to the fuel amount corresponding to the first sampling value; if the difference is less than the first preset difference, an alarm is triggered or an abnormality is recorded, and the staff further diagnoses the fuel system. Exemplarily, when | real-time sampling value - first memory value B ′ |≥10% (can be calibrated according to actual application requirements), the fuel display value on the instrument panel is updated to the fuel amount corresponding to the first sampling value A, and then when the vehicle is powered on again, a new first sampling value is generated based on the first sampling logic.
[0072] In one embodiment, the fuel quantity correction method further includes: when it is detected that the electrical system of the target vehicle is powered off, after delaying the first preset time interval, continuously collecting the fuel signal of the first preset time length based on a recursive average filtering algorithm, and taking the average value of the fuel signal as the second memory value; when the difference between the first sampling value and the second memory value exceeds the second preset difference, updating the fuel quantity displayed on the instrument panel to the fuel quantity corresponding to the first sampling value.
[0073] In the event of a power outage in the vehicle's electrical system, the fuel level signal may be lost or distorted. Therefore, a mechanism is needed to restore and update the fuel level display to ensure the accuracy of the displayed data. In the embodiment of the present invention, after detecting that the target vehicle's electrical system has been powered off, a first preset time interval is delayed, and the fuel signal of the first preset time length is continuously collected based on a recursive average filtering algorithm. The average value of these fuel signals is used as the second memory value A. ′. Delaying the first preset time interval can ensure the stability of the fuel system and avoid the influence of capacitor discharge or other transient phenomena on the signal. After the delay, the fuel signal of the first preset time length is continuously collected based on the recursive average filtering algorithm. The algorithm accumulates the value of the input signal one by one and takes the average value to filter out random noise and maintain the stability and smoothness of the signal. By comparing the first sampling value before power failure with the second memory value after power failure, the change in fuel quantity is judged and the fuel quantity displayed on the instrument panel is updated. If the difference exceeds the second preset difference, it means that the fuel quantity has changed significantly during the power failure. If the difference does not exceed the second preset difference, it means that the fuel quantity has not changed much, and the second memory value can continue to be used as the fuel quantity display. If the difference exceeds the second preset difference, the fuel quantity displayed on the instrument panel is updated to the fuel quantity corresponding to the first sampling value. For example, KL15 OFF delays 10 seconds and continuously collects 5 seconds of fuel signals. The average value of the fuel signal is taken as the second memory value A based on the recursive average filtering algorithm. ′ When | first sampling value A - second memory value A ′ |≥10% (can be calibrated according to actual application requirements), the fuel amount displayed on the instrument panel is updated to the fuel amount corresponding to the first sampling value A, otherwise the fuel amount displayed on the instrument panel before KL15OFF in the previous cycle is maintained.
[0074] For example, if it is the OFF gear refueling situation: KL15 is ON for a period of time and the fuel signal is continuously collected for a few seconds. The first sampling value A is 50%. In the previous cycle, after KL15 is OFF for a period of time, the fuel signal is continuously collected for a few seconds and the average value is taken. At this time, the second memory value A ′ =30%, |first sampling value A-second memory value A ′ |=20%≥10%, then the fuel level displayed on the instrument panel rises to 50%; if it is the ON gear refueling situation: when the vehicle speed drops from >1.5km / h to <1.5km / h, after a delay, continuously collect the fuel signal for several seconds and take the average value. At this time, the first memory value B ′ The fuel signal is continuously sampled based on the recursive average filtering algorithm and its average value is taken as the real-time sampling value. At this time, the real-time sampling value is 80%. | Real-time sampling value - first memory value B ′ |=30%≥10%, the fuel level displayed on the instrument panel rises to 80%.
[0075] In an embodiment of the present invention, a fuel quantity correction device is further provided, comprising a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, the above-mentioned fuel quantity correction method is implemented.
[0076] In an embodiment of the present invention, a computer-readable storage medium is further provided. The computer-readable storage medium includes a stored computer program. When the computer program is executed, the device where the computer-readable storage medium is located is controlled to execute the above-mentioned fuel quantity correction method.
[0077] For example, a computer program can be divided into one or more modules, one or more of which are stored in a memory and executed by a processor to implement the present invention. One or more modules can be a series of computer program instruction segments capable of performing specific functions, and these instruction segments are used to describe the execution process of the computer program in the fuel quantity correction device.
[0078] The fuel quantity correction device can be a computing device such as a desktop computer, laptop, PDA, or cloud server. The fuel quantity correction device may include, but is not limited to, a processor, memory, and a display. Those skilled in the art will appreciate that the aforementioned components are merely examples of fuel quantity correction devices and do not constitute a limitation on fuel quantity correction processing equipment. The device may include more or fewer components, a combination of certain components, or different components. For example, the fuel quantity correction device may also include input / output devices, network access devices, buses, and the like.
[0079] The processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor. The processor is the control center of the fuel quantity correction device and connects the various components of the fuel quantity correction device using various interfaces and circuits.
[0080] The memory can be used to store computer programs and / or modules. The processor implements various functions of the fuel level correction device by running or executing the computer programs and / or modules stored in the memory and accessing data stored in the memory. The memory can primarily include a program storage area and a data storage area. The program storage area can store an operating system and at least one application required for a function (such as a sound playback function or a text conversion function); the data storage area can store data generated based on the use of the mobile phone (such as audio data and text message data). Furthermore, the memory can include high-speed random access memory and non-volatile memory, such as a hard disk, internal memory, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, at least one disk storage device, a flash memory device, or other volatile solid-state storage device.
[0081] If the fuel quantity correction module is implemented as a software functional unit and sold or used as a standalone product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention can implement all or part of the process steps in the above-mentioned method embodiments by using a computer program to instruct the relevant hardware. The computer program can be stored in a computer-readable storage medium. When executed by a processor, the computer program can implement the steps of each of the above-mentioned method embodiments. The computer program includes computer program code, which can be in source code form, object code form, executable file, or some intermediate form. Computer-readable media can include any entity or device capable of carrying computer program code, recording media, USB flash drives, removable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunications signals, and software distribution media. Persons of ordinary skill in the art can understand and implement the present invention without inventive effort.
[0082] Embodiments of the present invention provide a fuel level correction method that immediately generates a first sampled value upon vehicle startup, providing an initial baseline for subsequent fuel level calculations and avoiding fuel level display lags caused by system delays. Continuously sampling and averaging data when the speed exceeds a preset threshold effectively filters out short-term fluctuations, improving data stability and addressing the dramatic fuel level fluctuations experienced during high-speed driving or sudden acceleration or deceleration. By comparing the current displayed value with a second sampled value, deviations in the fuel level display can be promptly detected and corrected, avoiding sudden changes in the fuel level display due to fuel level fluctuations and improving the user experience. When the vehicle's speed drops below a first preset speed threshold, a second sampling logic is used to regenerate a sampled value. This takes into account the smaller fuel level fluctuations at low speeds. Delayed sampling and averaging more accurately reflect fuel level changes. Furthermore, by comparing the real-time sampled value with the first stored value, abnormal fuel level changes can be quickly detected. When significant fuel level changes occur, the display can be quickly updated to respond, avoiding misjudgments caused by display lags.
[0083] Example 2
[0084] See also Figure 2 , Figure 2 Schematic diagram of a fuel quantity correction device according to an embodiment of the present invention. The present invention provides a fuel quantity correction device comprising: a first sampling value generating module 201, a second sampling value generating module 202, a first fuel quantity updating module 203, a first memory value generating module 204, and a second fuel quantity updating module 205;
[0085] The first sampling value generating module 201 is configured to generate a first sampling value based on a first sampling logic when detecting that the electrical system of the target vehicle is powered on;
[0086] The second sampling value generating module 202 is used to collect the target vehicle's driving speed in real time. When the target vehicle's driving speed exceeds a first preset speed threshold, the fuel signal is continuously collected for a first preset time period, and the average value of the fuel signal is used as the second sampling value.
[0087] The first fuel level updating module 203 is configured to obtain a current fuel level displayed on the instrument panel, compare the current fuel level with a first fuel level corresponding to the second sampling value, and update the fuel level displayed on the instrument panel according to the comparison result;
[0088] The first memory value generating module 204 is configured to generate a first memory value based on a second sampling logic when the target vehicle's speed is less than the first preset speed threshold; wherein the second sampling logic is configured to collect the fuel signal for the first preset time length after a first preset time interval, and use the average value of the fuel signal as the first memory value;
[0089] The second fuel quantity updating module 205 is used to obtain the real-time sampling value at the current moment, and when the difference between the real-time sampling value and the first memory value exceeds a first preset difference, the fuel quantity displayed on the instrument panel is updated to the fuel quantity corresponding to the first sampling value.
[0090] In one embodiment, the first sampling value generating module 201 is used to generate a first sampling value based on a first sampling logic when it is detected that the electrical system of the target vehicle is powered on. Specifically, the module 201 generates a first sampling value based on a first sampling logic, which includes: when it is detected that the electrical system of the target vehicle is powered on, continuously collecting a fuel signal for a second preset time length based on an average filtering method after a second preset time interval, taking the average value of the fuel signal as the first sampling value, and taking the fuel amount corresponding to the first sampling value as the current fuel amount displayed on the instrument panel.
[0091] In one embodiment, the first fuel quantity update module 203 is used to obtain the current fuel quantity displayed on the instrument panel, specifically including: setting an oil float in the fuel tank of the target vehicle; wherein the oil float is used to move with the rise and fall of the fuel liquid level; mechanically connecting the oil float to a sliding rheostat so that the oil float drives the slider of the sliding rheostat to move as the fuel page changes, thereby changing the resistance value of the sliding rheostat; obtaining the current resistance value of the sliding rheostat, traversing and querying in a conversion table of resistance value and fuel capacity percentage, and obtaining the fuel capacity percentage corresponding to the current resistance value; generating the current fuel quantity based on the total capacity of the fuel tank and the fuel capacity percentage, and sending the current fuel quantity to the instrument panel.
[0092] In one embodiment, the current fuel amount is compared with the first fuel amount corresponding to the second sampling value, and the fuel amount displayed on the instrument panel is updated according to the comparison result, specifically including: when the first fuel amount is greater than the current fuel amount, updating the fuel value displayed on the instrument panel according to the cumulative decrease value of the fuel injection amount from the last fuel display value update time to the current time; when the first fuel amount is less than the current fuel amount, updating the fuel value displayed on the instrument panel along the first fuel amount.
[0093] In one embodiment, the fuel quantity correction device further includes: when it is detected that the electrical system of the target vehicle is powered off, after delaying the first preset time interval, continuously collecting the fuel signal of the first preset time length based on a recursive average filtering algorithm, and using the average value of the fuel signal as a second memory value. When the difference between the first sampling value and the second memory value exceeds the second preset difference, the fuel quantity displayed on the instrument panel is updated to the fuel quantity corresponding to the first sampling value.
[0094] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working process of the device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0095] An embodiment of the present invention provides a fuel level correction device that immediately generates a first sampled value upon vehicle startup, providing an initial baseline for subsequent fuel level calculations and avoiding fuel level display lags caused by system delays. Continuously sampling and averaging data when the speed exceeds a preset threshold effectively filters out short-term fluctuations, improving data stability and addressing the dramatic fuel level fluctuations seen during high-speed driving or sudden acceleration or deceleration. By comparing the current displayed value with a second sampled value, deviations in the fuel level display can be promptly detected and corrected, avoiding sudden changes in the fuel level display due to fuel level fluctuations and improving the user experience. When the vehicle's speed drops below a first preset speed threshold, a second sampling logic is used to regenerate a sampled value. This takes into account the smaller fuel level fluctuations at low speeds. Delayed sampling and averaging more accurately reflect fuel level changes. Furthermore, by comparing the real-time sampled value with the first stored value, abnormal fuel level changes can be quickly detected. When significant fuel level changes occur, the display can be quickly updated to respond, avoiding misjudgments caused by display lags.
[0096] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and substitutions can be made without departing from the technical principles of the present invention. These improvements and substitutions should also be regarded as the scope of protection of the present invention.
Claims
1. A fuel quantity correction method, characterized in that: include: When it is detected that the electrical system of the target vehicle is powered on, generating a first sampling value based on a first sampling logic; collecting the target vehicle's speed in real time, and when the target vehicle's speed exceeds a first preset speed threshold, continuously collecting a fuel signal for a first preset time period, and using an average value of the fuel signal as a second sampling value; obtaining a current fuel level displayed on the instrument panel, comparing the current fuel level with a first fuel level corresponding to the second sampling value, and updating the fuel level displayed on the instrument panel according to the comparison result; When the target vehicle's speed is less than the first preset speed threshold, a first memory value is generated based on a second sampling logic; wherein the second sampling logic collects the fuel signal for the first preset time period after a first preset time interval, and uses an average value of the fuel signal as the first memory value; A real-time sampling value at the current moment is obtained, and when a difference between the real-time sampling value and the first memory value exceeds a first preset difference, the fuel amount displayed on the instrument panel is updated to the fuel amount corresponding to the first sampling value.
2. A fuel quantity correction method according to claim 1, characterized in that: When detecting that the electrical system of the target vehicle is powered on, generating a first sampling value based on a first sampling logic specifically includes: When it is detected that the electrical system of the target vehicle is powered on, a fuel signal of a second preset time length is continuously collected based on an average filtering method after a second preset time interval, an average value of the fuel signal is used as the first sampling value, and the fuel amount corresponding to the first sampling value is used as the current fuel amount displayed on the instrument panel.
3. A fuel quantity correction method according to claim 1, characterized in that: The method of obtaining the current fuel quantity displayed on the instrument panel specifically includes: An oil float is provided in the fuel tank of the target vehicle; wherein the oil float is configured to move with the rise and fall of the fuel liquid level; Mechanically connecting the oil float to a sliding rheostat so that the oil float drives the slider of the sliding rheostat to move as the fuel level changes, thereby changing the resistance value of the sliding rheostat; Obtaining a current resistance value of the sliding rheostat, searching a conversion table of resistance values and fuel capacity percentages, and obtaining a fuel capacity percentage corresponding to the current resistance value; A current fuel level is generated based on the total capacity of the fuel tank and the fuel level percentage and the current fuel level is sent to the instrument cluster.
4. A fuel quantity correction method according to claim 1, characterized in that: The comparing the current fuel level with the first fuel level corresponding to the second sampling value, and updating the fuel level displayed on the instrument panel according to the comparison result, specifically includes: When the first fuel amount is greater than the current fuel amount, updating the fuel value displayed on the instrument panel according to the cumulative fuel injection amount decrease value from the last fuel display value update time to the current time; When the first fuel amount is less than the current fuel amount, the fuel value displayed on the instrument panel is updated along the first fuel amount.
5. A fuel quantity correction method according to claim 1, characterized in that: The fuel quantity correction method further includes: When it is detected that the electrical system of the target vehicle is powered off, after a delay of the first preset time interval, the fuel signal of the first preset time length is continuously collected based on a recursive average filtering algorithm, and the average value of the fuel signal is used as a second memory value; When the difference between the first sampling value and the second memory value exceeds a second preset difference, the fuel amount displayed on the instrument panel is updated to the fuel amount corresponding to the first sampling value.
6. A fuel quantity correction device, characterized in that: include: a first sampling value generating module, a second sampling value generating module, a first fuel quantity updating module, a first memory value generating module, and a second fuel quantity updating module; The first sampling value generating module is configured to generate a first sampling value based on a first sampling logic when detecting that the electrical system of the target vehicle is powered on; The second sampling value generating module is used to collect the driving speed of the target vehicle in real time. When the driving speed of the target vehicle exceeds a first preset speed threshold, the fuel signal is continuously collected for a first preset time length, and the average value of the fuel signal is used as the second sampling value; The first fuel level updating module is configured to obtain a current fuel level displayed on the instrument panel, compare the current fuel level with a first fuel level corresponding to the second sampling value, and update the fuel level displayed on the instrument panel according to the comparison result; The first memory value generating module is configured to generate a first memory value based on a second sampling logic when the target vehicle's travel speed is less than the first preset speed threshold; wherein the second sampling logic is configured to collect the fuel signal for the first preset time length after a first preset time interval, and use the average value of the fuel signal as the first memory value; The second fuel quantity updating module is used to obtain the real-time sampling value at the current moment. When the difference between the real-time sampling value and the first memory value exceeds a first preset difference, the fuel quantity displayed on the instrument panel is updated to the fuel quantity corresponding to the first sampling value.
7. A fuel quantity correction device according to claim 6, characterized in that: The first sampling value generating module is configured to generate a first sampling value based on a first sampling logic when detecting that the electrical system of the target vehicle is powered on, specifically comprising: When it is detected that the electrical system of the target vehicle is powered on, a fuel signal of a second preset time length is continuously collected based on an average filtering method after a second preset time interval, an average value of the fuel signal is used as the first sampling value, and the fuel amount corresponding to the first sampling value is used as the current fuel amount displayed on the instrument panel.
8. A fuel quantity correction device according to claim 6, characterized in that: The first fuel level update module is used to obtain the current fuel level displayed on the instrument panel, specifically including: An oil float is provided in the fuel tank of the target vehicle; wherein the oil float is configured to move with the rise and fall of the fuel liquid level; Mechanically connecting the oil float to a sliding rheostat so that the oil float drives the slider of the sliding rheostat to move as the fuel level changes, thereby changing the resistance value of the sliding rheostat; Obtaining a current resistance value of the sliding rheostat, searching a conversion table of resistance values and fuel capacity percentages, and obtaining a fuel capacity percentage corresponding to the current resistance value; A current fuel level is generated based on the total capacity of the fuel tank and the fuel level percentage and the current fuel level is sent to the instrument cluster.
9. A terminal device, characterized in that: The fuel quantity correction method according to any one of claims 1 to 5 is implemented when the processor executes the computer program.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium includes a stored computer program, wherein when the computer program is executed, the device where the computer-readable storage medium is located is controlled to execute the fuel quantity correction method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Fuel quantity display method and device and vehicle
CN108120486A
Vehicle fuel quantity display method, device and equipment and readable storage medium
CN116674378A