Fuel quantity correction method and device, terminal equipment and storage medium
By generating initial sampling values when the vehicle is started, collecting the driving speed in real time and continuously collecting fuel signals when the speed exceeds the threshold. Combined with the delay sampling logic during low-speed driving, it quickly responds to changes in fuel quantity, and solves the problem of inaccurate fuel quantity display in complex road conditions and high-speed driving, achieving higher display accuracy and user experience.
Patent Information
- Application Number
- CN202510094808.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-21
- Publication Date
- 2025-05-06
- Estimated Expiration
- 2045-01-21
AI Technical Summary
In the prior art, fuel quantity display is prone to inaccurate problems during complex road conditions and high-speed driving, which leads to the driver to misjudgment of the remaining fuel quantity and increase the impact of safety risks and brand trust.
By generating the initial sampling value when the vehicle is started, the driving speed is collected in real time and the fuel signal is continuously collected when the speed exceeds the threshold, taking the average value as the sampling value; when driving at low speed, delay sampling logic is used, combined with the comparison of real-time sampling value and memory value, quickly responding to changes in fuel volume and updating the instrument panel display.
It effectively improves the accuracy of fuel quantity display, reduces display jumps caused by fluctuations in fuel surface, and improves user experience and safety.
Smart Images

Figure CN119928565A_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] The fuel level indicator is an on-board system that shows the driver how much fuel is left in the vehicle's tank. It is usually located on the vehicle's dashboard and is displayed in the form of a pointer, number, or bar graph. The main function of the fuel level indicator is to help the driver understand the vehicle's fuel status so that they can plan their driving route and refueling time reasonably to avoid running out of fuel and breaking down. The role of the fuel level indicator is not just to provide a simple reading, it is also an important tool for the driver to judge the vehicle's endurance, plan driving routes, and ensure driving safety. An accurate and stable fuel level display can significantly improve the driving experience and reduce the risks caused by insufficient fuel.
[0003] In the prior art, most of the liquid level changes in the fuel tank are collected by sensor equipment, and then the specific value of the fuel amount is calculated by the electronic control unit of the vehicle according to the linear relationship (according to the design idea, the process of fuel amount change should change evenly as the vehicle travels, which is a linear relationship). However, during the driving process of the vehicle, the accuracy of the fuel amount display will be affected under various complex working conditions. For example: under complex road conditions such as ramps, single-sided bridges, and roundabouts, the vehicle is in a non-horizontal state, and the fuel in the fuel tank will tilt to one side due to gravity, causing the fuel level to fluctuate, and the data collected by the sensor will change accordingly, causing the fuel amount display to jump; when the vehicle is in a state of rapid acceleration or deceleration, the fuel shakes violently in the fuel tank, and the fuel level height measured by the sensor fluctuates greatly in a short period of time, resulting in inaccurate fuel amount display; the vehicle will alternately experience horizontal roads, slopes, sharp turns and other road conditions. The instability of the fuel level and the response lag of the sensor make it difficult for the fuel amount display to accurately reflect the actual situation in real time. If the fuel amount display is inaccurate, the driver may misjudge the remaining fuel amount of the vehicle, for example, mistakenly believe that the fuel is sufficient, resulting in failure to refuel in time, and eventually the vehicle will break down due to fuel exhaustion. Frequent fuel level display errors will reduce users' trust in the vehicle brand, affecting brand reputation and market competitiveness. How to improve the accuracy of fuel level display is a technical problem that needs to be solved urgently. Summary of the invention
[0004] The present invention aims to provide a fuel quantity correction method, device, terminal equipment 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, a first sampling value is generated based on a first sampling logic;
[0007] The driving speed of the target vehicle is collected 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 an average value of the fuel signal is used as a second sampling value;
[0008] Acquire a current fuel quantity displayed on the instrument panel, compare the current fuel quantity with a first fuel quantity corresponding to the second sampling value, and update the fuel quantity displayed on the instrument panel according to the comparison result;
[0009] When the driving speed of the target vehicle 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 is to collect the fuel signal of the first preset time length after a delay of a first preset time interval, and take the 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 the 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 scheme, the first sampling value is generated immediately when the vehicle is started, providing an initial benchmark for the subsequent fuel quantity calculation, avoiding the lag in the fuel quantity display due to system delay. When the speed exceeds the preset threshold, by continuously collecting and averaging, short-term fluctuations can be effectively filtered out, the stability of the data can be improved, and the situation of violent fluctuations in the fuel level can be dealt with during high-speed driving or sudden acceleration or deceleration. By comparing the current display value with the second sampling value, the deviation of the fuel quantity display can be discovered and corrected in time, avoiding the jump of the fuel quantity display caused by the fluctuation of the fuel level, and improving the user experience. When the driving speed of the vehicle drops below the first preset speed threshold, the second sampling logic is used to regenerate the sampling value, taking into account the situation that the fuel level fluctuation is small when the vehicle is driving at a low speed. By delaying sampling and averaging calculation, the change of the fuel quantity can be more accurately reflected. Furthermore, by comparing the real-time sampling value with the first memory value, the abnormal change of the fuel quantity can be quickly detected. When the fuel quantity changes significantly, the display can be quickly responded and updated to avoid misjudgment caused by display lag.
[0012] In one implementation, 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 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 delay of a second preset time interval, the 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 the above scheme, the fuel signal is collected after the second preset time interval is delayed, which can avoid the error caused by the sensor response lag or the fuel level fluctuation at the moment of vehicle startup. The fuel signal is continuously collected based on the average filtering method and its average value is calculated, which can effectively filter out short-term fluctuations and noise, and improve the stability and reliability of the fuel signal.
[0015] In one implementation, obtaining the current fuel quantity displayed on the instrument panel specifically includes:
[0016] An oil float is arranged 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;
[0017] Mechanically connecting the oil float to the sliding rheostat so that the oil float drives the sliding piece of the sliding rheostat to move as the fuel level changes, thereby changing the resistance value of the sliding rheostat;
[0018] Obtaining the current resistance value of the sliding rheostat, searching through the conversion table of resistance value and fuel capacity percentage, and obtaining the 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 capacity percentage and the current fuel level is sent to the instrument cluster.
[0020] In the above scheme, the mechanical connection structure between the oil float and the sliding rheostat is simple, easy to implement and maintain. As a mature electronic component, the sliding rheostat has high durability and stability. Through the mechanical connection between the oil float and the sliding rheostat, combined with the conversion table between the resistance value and the percentage of fuel capacity, the fuel quantity can be monitored and displayed in real time and accurately. It has a simple and reliable structure, strong real-time performance, high accuracy, strong adaptability, and low cost, which can effectively improve the accuracy of the fuel quantity display and user experience.
[0021] In one implementation, comparing the current fuel quantity with the first fuel quantity corresponding to the second sampling value, and updating the fuel quantity 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, the fuel value displayed on the instrument panel is updated 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 the above scheme, by comparing the current fuel amount with the first fuel amount, the fuel value displayed on the instrument panel is updated according to the actual trend of fuel change, avoiding sudden changes in the instrument panel display caused by sudden changes in the fuel signal, and improving the user's visual experience. In particular, when the first fuel amount is greater than the current fuel amount, the cumulative fuel injection amount is updated by decreasing the value, avoiding sudden jumps in the fuel amount display, and making the fuel amount display smoother.
[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 the first preset time interval is delayed, 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 the above scheme, by comparing the difference between the first sampling value and the second memory value, it is possible to avoid misjudgment updates caused by fuel level fluctuations after power failure, thereby ensuring the accuracy of updates. Updates are made only when the difference exceeds a preset value, effectively reducing errors caused by fuel level fluctuations after power failure and improving 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 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;
[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 quantity updating module is used to obtain the current fuel quantity displayed on the instrument panel, compare the current fuel quantity with the first fuel quantity corresponding to the second sampling value, and update the fuel quantity displayed on the instrument panel according to the comparison result;
[0033] The first memory value generating module is used to generate a first memory value based on a second sampling logic when the driving speed of the target vehicle is less than the first preset speed threshold; wherein the second sampling logic is to collect the fuel signal of the first preset time length after a delay of 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 scheme, the first sampling value is generated immediately when the vehicle is started, providing an initial benchmark for the subsequent fuel quantity calculation, avoiding the lag in the fuel quantity display due to system delay. When the speed exceeds the preset threshold, by continuously collecting and averaging, short-term fluctuations can be effectively filtered out, the stability of the data can be improved, and the situation of drastic fluctuations in the fuel level can be dealt with during high-speed driving or sudden acceleration or deceleration. By comparing the current display value with the second sampling value, the deviation of the fuel quantity display can be discovered and corrected in time, avoiding the jump of the fuel quantity display caused by the fluctuation of the fuel level, and improving the user experience. When the driving speed of the vehicle drops below the first preset speed threshold, the second sampling logic is used to regenerate the sampling value, taking into account the situation that the fuel level fluctuates less when the vehicle is driving at a low speed. By delaying sampling and calculating the average value, the change in the fuel quantity can be more accurately reflected. Furthermore, by comparing the real-time sampling value with the first memory value, the abnormal change of the fuel quantity can be quickly detected. When the fuel quantity changes significantly, the display can be quickly responded and updated to avoid misjudgment caused by display lag.
[0036] In one implementation, the first sampling value generating module is used 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 delay of a second preset time interval, the 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 quantity updating module is used to obtain the current fuel quantity displayed on the instrument panel, specifically including:
[0039] An oil float is arranged 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;
[0040] Mechanically connecting the oil float to the sliding rheostat so that the oil float drives the sliding piece of the sliding rheostat to move as the fuel level changes, thereby changing the resistance value of the sliding rheostat;
[0041] Obtaining the current resistance value of the sliding rheostat, searching through the conversion table of resistance value and fuel capacity percentage, and obtaining the 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 capacity percentage and the current fuel level is sent to the instrument cluster.
[0043] In one implementation, comparing the current fuel quantity with the first fuel quantity corresponding to the second sampling value, and updating the fuel quantity 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, the fuel value displayed on the instrument panel is updated 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 the first preset time interval is delayed, 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, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, and when the processor executes the computer program, the fuel quantity correction method as described above is implemented.
[0050] In a fourth aspect, the present application further provides a computer-readable storage medium, the computer-readable storage medium including 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 The figure is a schematic diagram of a module of a fuel quantity correction device provided in one embodiment of the present invention. DETAILED DESCRIPTION
[0053] The specific implementation of the present invention is further described in detail below in conjunction with 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" and "second" and the like in the specification, claims and drawings of this application are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device comprising a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products or devices.
[0055] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood 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 shown in FIG. The present invention includes steps 101 to 105, and each step 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, a fuel signal of a second preset time length is continuously collected based on an average filtering method after a second preset time interval, the 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.
[0060] In an embodiment of the present invention, when the electrical system of the vehicle (such as a battery, an ignition switch or other power supply system) is powered on, the fuel system will start the initialization process. There may be transient power fluctuations after the electrical system is powered on. In order to ensure the stable operation of the electrical system and the fuel system, the system will delay for a period of time after the electrical system is powered on before starting to collect the fuel signal. The continuously collected signals are accumulated and then averaged within a certain time window. This method ensures that the collected signals can fully reflect the current fuel level, avoid errors caused by transient fluctuations or noise, and provide 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 the change in the fuel level. Exemplarily, after KL15 ON is delayed for 1.5 seconds, the fuel signal is continuously collected for 1 second, the average value of the fuel signal is taken as the first sampled value A, and the first sampled value is used as the fuel display amount on the instrument panel. KL15 is the number of a relay signal line, indicating the state when the vehicle ignition switch is in a specific position. KL ON is the abbreviation of Klrappe ON, which is a power state in the vehicle electrical system, indicating that the vehicle's electrical system is powered on but the engine has not yet started.
[0061] Step 102: The driving speed of the target vehicle is collected 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 a second sampling value.
[0062] During the driving process of the vehicle, the state of the fuel system will be affected by many factors, such as driving speed, fuel consumption rate and dynamic changes of the fuel level. In order to ensure the accuracy and reliability of the fuel display, it is necessary to dynamically adjust the acquisition logic of the fuel signal according to the change of the driving speed. In the embodiment of the present invention, a vehicle speed sensor is installed on the transmission system or wheel of the vehicle, and the vehicle speed sensor outputs an electrical signal proportional to the vehicle speed. The electronic control unit calculates and outputs the current vehicle speed value according to the signal received from the vehicle speed sensor. The system will continuously collect the vehicle speed signal at a higher frequency (for example, multiple times per second) to ensure the real-time and accuracy of the speed data. The collected vehicle speed signal will be used to determine the current driving state of the vehicle. When the driving speed exceeds the first preset speed threshold, the continuous collection of the fuel signal is started, and the fuel signal is continuously collected for a preset time length. By collecting the signal for a longer period of time, it is ensured that the collected data can reflect the current fuel level state and avoid errors caused by transient fluctuations. In the collection process, a recursive average filtering method or other filtering algorithms are used to accumulate all the collected fuel signal values, and then divide them by the number of collection times to obtain an average value. Assuming that the system collects 30 fuel signal values within 3 seconds (the frequency is 10 times per second), the sum of these 30 values is divided by 30 to obtain the average value, and the average value is used as the second sampling value. Exemplarily, in an embodiment of the present invention, when the vehicle speed is greater than 1.5km / h, the refueling judgment is exited, and the recursive average filtering method is used to continuously collect the fuel signal for 5 seconds, and the average value of the collected fuel signal 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 calculated as valid data. 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-50km / h); for high-speed vehicles, the speed threshold may be higher (for example, 80-100km / h).
[0063] Step 103: Acquire the current fuel quantity displayed on the instrument panel, compare the current fuel quantity with the first fuel quantity corresponding to the second sampling value, and update the fuel quantity displayed on the instrument panel according to the comparison result.
[0064] In one embodiment, obtaining the current fuel amount displayed on the dashboard 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 dashboard.
[0065] The oil float is one of the core components of fuel quantity detection and is usually installed inside the fuel tank. Its main function is to move up and down with the rise and fall of the fuel level to reflect the height of the fuel level. The oil float is connected to the slider of the sliding rheostat through a mechanical rod. When the oil float rises and falls with the fuel level, the mechanical rod will drive the slider of the sliding rheostat to move. The moving range of the slider corresponds to the lifting height of the oil float, covering all the liquid level heights of the fuel tank from empty to full. When the oil float rises (the fuel level rises), the slider moves in the direction of increasing resistance; when the oil float falls (the fuel level drops), the slider moves in the direction of decreasing resistance. The sliding rheostat is used to convert the displacement of the oil float into an electrical signal to reflect the height of the fuel level. In the embodiment of the present invention, after obtaining the current resistance value of the sliding rheostat, it will be traversed and queried in the conversion table. The conversion table is a predefined mapping relationship used to convert the resistance value of the sliding rheostat into a percentage of fuel capacity. If the resistance value has a corresponding accurate value in the conversion table, the corresponding percentage of fuel capacity is directly returned. If the resistor 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 stages. 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, the fuel value displayed on the instrument panel is updated according to the cumulative decrease value of the 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, the fuel value displayed on the instrument panel is updated 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 collected (i.e., the second sampling value) 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 value of the injection quantity. The first fuel quantity is subtracted from the cumulative decrease value of the injection quantity to obtain the current fuel value to 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 driving speed of the target vehicle 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 of the first preset time length after a delay of a first preset time interval, and uses the average value of the fuel signal as the first memory value.
[0069] When driving at a low speed, fuel consumption is relatively stable, but there may be fluctuations. By delaying the collection of the fuel signal 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 delaying the first preset time interval. When driving at a low speed, fuel consumption may have instantaneous fluctuations (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, and when the difference between the real-time sampling value and the first memory value exceeds a first preset difference, update the fuel quantity displayed on the instrument panel to the fuel quantity 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 the fuel amount (such as refueling). If the difference is less than the negative first preset difference, it may indicate a significant decrease in the 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 of 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 also 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 case of a power outage in the vehicle electrical system, the fuel quantity signal may be lost or distorted, so a mechanism is needed to restore and update the fuel quantity display to ensure the accuracy of the displayed data. In the embodiment of the present invention, after detecting that the electrical system of the target vehicle is 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, and 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 the power failure with the second memory value after the power failure, the change in the fuel amount is judged and the fuel amount displayed on the instrument panel is updated. If the difference exceeds the second preset difference, it means that the fuel amount has changed significantly during the power failure. If the difference does not exceed the second preset difference, it means that the fuel amount has not changed much, and the second memory value can continue to be used as the fuel amount display. If the difference exceeds the second preset difference, the fuel amount displayed on the instrument panel is updated to the fuel amount corresponding to the first sampling value. Exemplarily, KL15 OFF delays 10 seconds and then 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 the fuel is in the OFF gear, the fuel signal is continuously collected for a few seconds after KL15 is turned on for a period of time, and the first sampling value A is 50%. In the previous cycle, the fuel signal is continuously collected for a period of time after KL15 is turned off, and the average value is taken. At this time, the second memory value A ′ is 30%, | first sampling value A - second memory value A ′ |=20%≥10%,then the fuel level displayed on the instrument panel rises to 50%; if the fuel is refueled in the ON gear: when the vehicle speed drops from >1.5km / h to <1.5km / h, the fuel signal is continuously collected for several seconds after a delay and the average value is taken. At this time, the first memory value B ′ is 50%, based on the recursive average filtering algorithm, the fuel signal is continuously sampled 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 will increase to 80%.
[0075] In an embodiment of the present invention, a fuel quantity correction device is also provided, including 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] Exemplarily, the computer program may be divided into one or more modules, one or more modules are stored in a memory and executed by a processor to implement the present invention. One or more modules may be a series of computer program instruction segments capable of implementing specific functions, and the 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 may be a computing device such as a desktop computer, a notebook, a PDA, and a cloud server. The fuel quantity correction device may include, but is not limited to, a processor, a memory, and a display. Those skilled in the art may understand that the above components are merely examples of the fuel quantity correction device and do not constitute a limitation on the fuel quantity correction processing device. The fuel quantity correction device may include more or fewer components than the components, or a combination of certain components, or different components. For example, the fuel quantity correction device may also include input and output devices, network access devices, buses, etc.
[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) or 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, etc. The processor is the control center of the fuel quantity correction device, and uses various interfaces and lines to connect various parts of the entire fuel quantity correction device.
[0080] The memory can be used to store computer programs and / or modules. The processor realizes various functions of the fuel quantity correction device by running or executing the computer programs and / or modules stored in the memory and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, a text conversion function, etc.), etc.; the data storage area can store data created according to the use of the mobile phone (such as audio data, text message data, etc.), etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0081] Wherein, if the module based on the correction of the fuel quantity is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor, the steps of the above-mentioned various method embodiments can be implemented. Wherein, the computer program includes computer program code, and the computer program code can be in the form of source code, object code, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0082] The embodiment of the present invention provides a fuel quantity correction method, which generates a first sampling value immediately when the vehicle is started, provides an initial reference for the subsequent fuel quantity calculation, and avoids the lag of the fuel quantity display due to system delay. When the speed exceeds the preset threshold, by continuously collecting and averaging, short-term fluctuations can be effectively filtered out, the stability of the data can be improved, and the situation of violent fluctuations in the fuel level during high-speed driving or rapid acceleration or deceleration can be dealt with. By comparing the current display value with the second sampling value, the deviation of the fuel quantity display can be timely discovered and corrected, and the fuel quantity display jump caused by the fluctuation of the fuel level can be avoided, thereby improving the user experience. When the driving speed of the vehicle is reduced to below the first preset speed threshold, the second sampling logic is used to regenerate the sampling value, taking into account the situation that the fuel level fluctuation is small when the vehicle is driving at a low speed. By delaying sampling and calculating the average value, the change of the fuel quantity can be more accurately reflected. Further, by comparing the real-time sampling value with the first memory value, the abnormal change of the fuel quantity can be quickly detected. When the fuel quantity changes significantly, the display can be quickly responded and updated to avoid misjudgment caused by display lag.
[0083] Example 2
[0084] See also Figure 2 , Figure 2 The module diagram of a fuel quantity correction device provided in one embodiment of the present invention. The present invention provides a fuel quantity correction device, including: 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 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;
[0086] The second sampling value generating module 202 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 of a first preset time length is continuously collected, and the average value of the fuel signal is used as the second sampling value;
[0087] The first fuel quantity updating module 203 is used to obtain the current fuel quantity displayed on the instrument panel, compare the current fuel quantity with the first fuel quantity corresponding to the second sampling value, and update the fuel quantity displayed on the instrument panel according to the comparison result;
[0088] The first memory value generating module 204 is used to generate a first memory value based on a second sampling logic when the driving speed of the target vehicle is less than the first preset speed threshold; wherein the second sampling logic is to collect the fuel signal of the first preset time length after a delay of 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 including: when it is detected that the electrical system of the target vehicle is powered on, after a delay of 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.
[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 according to 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, the fuel value displayed on the instrument panel is updated according to the cumulative decrease value of the 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, the fuel value displayed on the instrument panel is updated along the first fuel amount.
[0093] In one embodiment, the fuel quantity correction device also 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, 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 can 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] The embodiment of the present invention provides a fuel quantity correction device, which generates a first sampling value immediately when the vehicle is started, provides an initial reference for the subsequent fuel quantity calculation, and avoids the lag of the fuel quantity display due to system delay. When the speed exceeds the preset threshold, by continuously collecting and averaging, short-term fluctuations can be effectively filtered out, the stability of the data can be improved, and the situation of violent fluctuations in the fuel level during high-speed driving or sudden acceleration or deceleration can be dealt with. By comparing the current display value with the second sampling value, the deviation of the fuel quantity display can be timely discovered and corrected, and the fuel quantity display jump caused by the fluctuation of the fuel level can be avoided, thereby improving the user experience. When the driving speed of the vehicle is reduced to below the first preset speed threshold, the second sampling logic is used to regenerate the sampling value, taking into account the situation that the fuel level fluctuation is small when the vehicle is driving at a low speed. By delaying sampling and calculating the average value, the change of the fuel quantity can be more accurately reflected. Further, by comparing the real-time sampling value with the first memory value, the abnormal change of the fuel quantity can be quickly detected. When the fuel quantity changes significantly, the display can be quickly responded and updated to avoid misjudgment caused by display lag.
[0096] The above are only preferred embodiments 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, a first sampling value is generated based on a first sampling logic; The driving speed of the target vehicle is collected 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 an average value of the fuel signal is used as a second sampling value; Acquire a current fuel quantity displayed on the instrument panel, compare the current fuel quantity with a first fuel quantity corresponding to the second sampling value, and update the fuel quantity displayed on the instrument panel according to the comparison result; When the driving speed of the target vehicle 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 is to collect the fuel signal of the first preset time length after a delay of a first preset time interval, and take the average value of the fuel signal as the first memory value; A real-time sampling value at the current moment is obtained, and when the 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 as claimed in claim 1, characterized in that: 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 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 delay of a second preset time interval, the 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 as claimed in claim 1, characterized in that: The obtaining of the current fuel quantity displayed on the instrument panel specifically includes: An oil float is arranged 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 the sliding rheostat so that the oil float drives the sliding piece of the sliding rheostat to move as the fuel level changes, thereby changing the resistance value of the sliding rheostat; Obtaining the current resistance value of the sliding rheostat, searching through the conversion table of resistance value and fuel capacity percentage, and obtaining the 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 capacity percentage and the current fuel level is sent to the instrument cluster.
4. A fuel quantity correction method as claimed in claim 1, characterized in that: The comparing the current fuel quantity with the first fuel quantity corresponding to the second sampling value, and updating the fuel quantity displayed on the instrument panel according to the comparison result, specifically includes: When the first fuel amount is greater than the current fuel amount, the fuel value displayed on the instrument panel is updated 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 as claimed in 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 the first preset time interval is delayed, 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 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; 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 quantity updating module is used to obtain the current fuel quantity displayed on the instrument panel, compare the current fuel quantity with the first fuel quantity corresponding to the second sampling value, and update the fuel quantity displayed on the instrument panel according to the comparison result; The first memory value generating module is used to generate a first memory value based on a second sampling logic when the driving speed of the target vehicle is less than the first preset speed threshold; wherein the second sampling logic is to collect the fuel signal of the first preset time length after a delay of 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 as claimed in claim 6, characterized in that: The first sampling value generating module is used 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: 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 delay of a second preset time interval, the 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 as claimed in claim 6, characterized in that: The first fuel quantity updating module is used to obtain the current fuel quantity displayed on the instrument panel, specifically including: An oil float is arranged 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 the sliding rheostat so that the oil float drives the sliding piece of the sliding rheostat to move as the fuel level changes, thereby changing the resistance value of the sliding rheostat; Obtaining the current resistance value of the sliding rheostat, searching through the conversion table of resistance value and fuel capacity percentage, and obtaining the 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 capacity percentage and the current fuel level is sent to the instrument cluster.
9. A terminal device, characterized in that: The invention comprises a processor, a memory and a computer program stored in the memory and configured to be executed by the processor, and 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