CN107144316B - A kind of calculation method that automobile instrument oil mass is shown - Google Patents

A kind of calculation method that automobile instrument oil mass is shown Download PDF

Info

Publication number
CN107144316B
CN107144316B CN201710287298.2A CN201710287298A CN107144316B CN 107144316 B CN107144316 B CN 107144316B CN 201710287298 A CN201710287298 A CN 201710287298A CN 107144316 B CN107144316 B CN 107144316B
Authority
CN
China
Prior art keywords
state
oil mass
reference point
counter
statebuild
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710287298.2A
Other languages
Chinese (zh)
Other versions
CN107144316A (en
Inventor
王勇
朱新军
杨洪坪
徐乐民
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Yangzhou Hangsheng Technology Co Ltd
Original Assignee
Yangzhou Hangsheng Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Yangzhou Hangsheng Technology Co Ltd filed Critical Yangzhou Hangsheng Technology Co Ltd
Priority to CN201710287298.2A priority Critical patent/CN107144316B/en
Publication of CN107144316A publication Critical patent/CN107144316A/en
Application granted granted Critical
Publication of CN107144316B publication Critical patent/CN107144316B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01FMEASURING VOLUME, VOLUME FLOW, MASS FLOW OR LIQUID LEVEL; METERING BY VOLUME
    • G01F23/00Indicating or measuring liquid level or level of fluent solid material, e.g. indicating in terms of volume or indicating by means of an alarm

Landscapes

  • Physics & Mathematics (AREA)
  • Fluid Mechanics (AREA)
  • General Physics & Mathematics (AREA)
  • Measurement Of Levels Of Liquids Or Fluent Solid Materials (AREA)

Abstract

The invention discloses a kind of calculation methods that automobile instrument oil mass is shown in automobile instrument field, including following 1) acquisition AD signal;2) judge whether reference point is established, be, then enter in next step, it is no, then it establishes reference point and enters in next step;3) judge that vehicle is to forbid or move;3-1) static, judgement establishes whether reference point is established, and is then to enter in next step, otherwise establishes reference point and enter in next step;It establishes and refers to comparison point;Judge whether to refuel, if so, updating oil mass information, if it is not, then subtracting distributive value with current display oil mass, first-order linear damps algorithm process;It 3-2) moves, removes reference point;Whether oil amount determination is lower than " oil mass is low " threshold values, is, then uses current display oil mass to subtract atomizer distributive value as display oil mass, no, first-order linear damping algorithm process is shown as current oil mass;4) according to 1) -3) it recycles, strong antijamming capability of the present invention can accurately show oil mass, can be applied in automobile oil mass monitoring system.

Description

A kind of calculation method that automobile instrument oil mass is shown
Technical field
The present invention relates to a kind of automobile oil mass display system, in particular to a kind of automobile oil mass shows calculation method.
Background technique
Turn currently, automobile oil mass table only passes through after microprocessor carries out analog sampling to the resistance signal in fuel sensor Digital signal is turned to, then digital signal is converted into Fuel Oil Remaining and is shown, but in vehicle travel process, since road surface is run Winnow with a dustpan, the turn of vehicle and the factors such as bring to a halt can cause the pasta in fuel tank to shake, lead to the output oil mass on fuel sensor There are biggish deviations with practical fuel tank fuel quantity, or even display is caused to jump, and the judgement of mistake is brought to user.
Summary of the invention
The object of the present invention is to provide a kind of calculation methods that automobile instrument oil mass is shown, can not be put down by external interference Steady accurate display automobile fuel oil is remaining.
The object of the present invention is achieved like this: a kind of calculation method that automobile instrument oil mass is shown, which is characterized in that packet Include following steps:
Step 1) instrument powers on, and fuel level sensor acquires AD signal;
Step 2 judges whether reference point is established, if so, into next step, if it is not, then establishing reference point and entering Next step;
Step 3) judges that vehicle is illegal state or motion state;
Step 3-1) if stationary state:
Step 3-1-1) judge to establish whether reference point is established, if so, into next step, if it is not, then establishing reference It puts and enters next step;
Step 3-1-2) it establishes with reference to comparison point;
Step 3-1-3) judge whether to refuel, if the oil mass with reference to comparison point is greater than reference point, and it is greater than priming valve Value, then it is assumed that be oiling processing, update oil mass information immediately, if it is not, then distributive value is subtracted with current display oil mass, by single order Linear damping algorithm process is shown as current oil mass;
Step 3-2) if motion state;
Step 3-2-1) remove reference point;
Step 3-2-2) whether oil amount determination is lower than " oil mass is low " threshold values, if so, subtracting oil spout with current display oil mass Mouth distributive value is as display oil mass, if it is not, then showing by first-order linear damping algorithm process as current oil mass;
Step 4) is recycled according to step 1)-step 3).
Compared with prior art, the beneficial effects of the present invention are strong antijamming capability of the present invention can accurately show oil Amount, while without making change to hardware configuration, it may be directly applied in existing automobile oil mass monitoring system.
In order to further increase precision of the invention, step 3) first-order linear damps algorithm specifically:
Sensor acquisition oil mass SensorVol and current display oil mass FuelVol are compared;
If it is equal, and counter DampCnt is damped greater than 0, damping counter successively decreases, until being 0;
If sensor, which acquires oil mass SensorVol, is greater than current display oil mass FuelVol, and mark of refueling IncFlag is arranged to 1, then damps counter DampCnt and progressively increase, and when reaching IncLimited, display oil mass increases 1/512L, And counter DampCnt clear 0 is damped, it is equal to 0 if refueling and indicating other IncFlag, it is 1 that IncFlag, which is arranged, and under entrance One circulation;
If sensor, which acquires oil mass SensorVol, is less than current display oil mass FuelVol, and subtracts oil ga(u)ge knowledge DecFlag is arranged to 1, then damps counter DampCnt and progressively increase, and when reaching DecLimited, display oil mass reduces 1/512L, And counter DampCnt clear 0 is damped, if subtracting oil ga(u)ge shows that other DecFlag is equal to 0, it is 1 that DecFlag, which is arranged, and is entered Next circulation;
Wherein, damping counter DampCnt initial value be 0, IncLimited, DecLimited can according to actual needs into Row setting.
In order to further increase the stability of reference point foundation, the specific method that reference point is established in step 2 and step 3) Are as follows:
Detect whether current state is StateInit state;If so, initialization delay counter DelayCnt is 0, just Beginningization sample counter AveCnt is 0, and enters StateDelay state;If it is not, then detection is StateDelay State;If it is StateDelay state, then judge whether upper KL30 electricity for the first time, is if it is directly entered StateBuild State, if not first time upper KL30 electricity, delay counter DelayCnt cycle count, when DelayCnt reaches Limit, into Enter StateBuild state;If not StateDelay state, then detection is StateBuild state, if it is StateBuild state, and sensor acquisition signal is effective, then adds up sampled value summation, reach AveLimit times, calculating is adopted Sample average value, the average value are reference point, and setting reference point useful signal RefValid is 1, into StateReady state; If not in StateBuild state, then whether detection is in StateReady state, if it is in StateReady state, Indicate that reference point is successfully established, reference point foundation terminates;If not in StateReady state, then detection whether StateReset state then terminates to establish if it is in StateReset state, if not in StateReset state, then examines It whether surveys in StateErr state, no matter whether all terminates this reference point in StateErr state and establish;
StateInit state is init state.
In order to further increase the stability for referring to comparison point and establishing, the specific side for referring to comparison point is established in step 3) Method are as follows:
If being currently StateInit state, initialization delay counter DelayCnt is 0, initializes sample counter AveCnt is 0, into StateBuild state;If not in StateInit state, then whether detection is in StateBuild State, if in StateBuild state, and sensor acquisition signal is effective, then adds up sampled value summation, reach AveLimit times, sample mean is calculated, which is to refer to comparison point, into StateReady state;If not In StateBuild state, then whether in StateReady state, StateInit state is init state for detection.
Detailed description of the invention
Fig. 1 is work flow diagram of the present invention.
Fig. 2 is that first-order linear damps algorithm flow chart in the present invention.
Fig. 3 is reference point method for building up flow chart in the present invention.
Fig. 4 is that comparison point method for building up flow chart is referred in the present invention.
Specific embodiment
A kind of calculation method that automobile instrument oil mass is shown as shown in Figs 1-4, which comprises the following steps:
Step 1) instrument powers on, and fuel level sensor acquires AD signal;
Step 2 judges whether reference point is established, if so, into next step, if it is not, then establishing reference point and entering Next step, what reference point was established method particularly includes: whether detection current state is StateInit state;If so, initialization Delay counter DelayCnt is 0, and initialization sample counter AveCnt is 0, and enters StateDelay state;If no It is that then detection is StateDelay state;If it is StateDelay state, then judge whether upper KL30 electricity for the first time, If it is it is directly entered StateBuild state, if not first time upper KL30 electricity, delay counter DelayCnt circulation It counts, when DelayCnt reaches Limit, into StateBuild state;If not StateDelay state, then detection is not It is StateBuild state, if it is in StateBuild state, and sensor acquisition signal is effective, then adds up sampled value and ask With, reach AveLimit times, calculate sample mean, which is reference point, be arranged reference point useful signal RefValid is 1, into StateReady state;If not in StateBuild state, then detection whether StateReady state indicates that reference point is successfully established if it is in StateReady state, and reference point foundation terminates;If It is not in StateReady state, then whether detection if it is in StateReset state then ties in StateReset state Shu Jianli, if not in StateReset state, then whether detection is in StateErr state, no matter whether StateErr state all terminates the foundation of this reference point;StateInit state is init state;
Step 3) judges that vehicle is illegal state or motion state;
Step 3-1) if stationary state:
Step 3-1-1) judge to establish whether reference point is established, if so, into next step, if it is not, then establishing reference It puts and enters next step;
Step 3-1-2) it establishes with reference to comparison point, method particularly includes: if being currently StateInit state, initialization is prolonged Hour counter DelayCnt is 0, and initialization sample counter AveCnt is 0, into StateBuild state;If not Whether StateInit state then detects in StateBuild state, if in StateBuild state, and sensor is adopted Collect signal it is effective, then add up sampled value summation, reach AveLimit time, calculate sample mean, the average value be reference than Compared with point, into StateReady state;If not in StateBuild state, then whether detection is in StateReady shape State, StateInit state are init state;
Step 3-1-3) judge whether to refuel, if the oil mass with reference to comparison point is greater than reference point, and it is greater than priming valve Value, then it is assumed that be oiling processing, update oil mass information immediately, if it is not, then distributive value is subtracted with current display oil mass, by single order Linear damping algorithm process shows that first-order linear damps algorithm specifically: sensor is acquired oil mass as current oil mass SensorVol and current display oil mass FuelVol compare;If it is equal, and counter DampCnt is damped greater than 0, damping is counted Number device successively decreases, until being 0;If sensor, which acquires oil mass SensorVol, is greater than current display oil mass FuelVol, and refuels Mark IncFlag is arranged to 1, then damps counter DampCnt and progressively increase, and when reaching IncLimited, display oil mass increases by 1/ 512L, and counter DampCnt clear 0 is damped, it is equal to 0 if refueling and indicating other IncFlag, it is 1 that IncFlag, which is arranged, is gone forward side by side Enter next circulation;If sensor, which acquires oil mass SensorVol, is less than current display oil mass FuelVol, and subtracts oil ga(u)ge knowledge DecFlag is arranged to 1, then damps counter DampCnt and progressively increase, and when reaching DecLimited, display oil mass reduces 1/512L, And counter DampCnt clear 0 is damped, if subtracting oil ga(u)ge shows that other DecFlag is equal to 0, it is 1 that DecFlag, which is arranged, and is entered Next circulation;Wherein, damping counter DampCnt initial value is 0, and IncLimited, DecLimited can be according to practical need It is configured;
Step 3-2) if motion state;
Step 3-2-1) remove reference point;
Step 3-2-2) whether oil amount determination is lower than " oil mass is low " threshold values, if so, subtracting oil spout with current display oil mass Mouth distributive value is as display oil mass, if it is not, then showing by first-order linear damping algorithm process as current oil mass, first-order linear Damping algorithm is same as above;
Step 4) is recycled according to step 1)-step 3).
The present invention is not limited to the above embodiments, on the basis of technical solution disclosed by the invention, the skill of this field For art personnel according to disclosed technology contents, one can be made to some of which technical characteristic by not needing creative labor A little replacements and deformation, these replacements and deformation are within the scope of the invention.

Claims (3)

1. a kind of calculation method that automobile instrument oil mass is shown, which comprises the following steps:
Step 1) instrument powers on, and fuel level sensor acquires AD signal;
Step 2 judges whether reference point is established, if so, into next step, if it is not, then establishing reference point and entering next Step;
Step 3) judges that vehicle is stationary state or motion state;
Step 3-1) if stationary state:
Step 3-1-1) judge to establish whether reference point is established, if so, into next step, if it is not, then establishing reference point simultaneously Into next step;
Step 3-1-2) it establishes with reference to comparison point;
Step 3-1-3) judge whether to refuel, if the oil mass with reference to comparison point is greater than reference point, and it is greater than oiling threshold values, then It is considered that oiling is handled, updates oil mass information immediately, if it is not, then distributive value is subtracted with current display oil mass, by first-order linear Algorithm process is damped, is shown as current oil mass;The first-order linear damps algorithm specifically:
Sensor acquisition oil mass SensorVol and current display oil mass FuelVol are compared;
If it is equal, and counter DampCnt is damped greater than 0, damping counter successively decreases, until being 0;
If sensor, which acquires oil mass SensorVol, is greater than current display oil mass FuelVol, and refuels and identify IncFlag quilt It is set as 1, then damps counter DampCnt and progressively increases, when reaching IncLimited, display oil mass increases 1/512L, and damps meter Number device DampCnt clear 0, if the mark IncFlag that refuels is equal to 0, it is 1 that IncFlag, which is arranged, and enters next circulation;
If sensor, which acquires oil mass SensorVol, is less than current display oil mass FuelVol, and subtracts oil ga(u)ge and know DecFlag quilt It is set as 1, then damps counter DampCnt and progressively increases, when reaching DecLimited, display oil mass reduces 1/512L, and damps Counter DampCnt clear 0 is equal to 0 if subtracting oil ga(u)ge and knowing DecFlag, and it is 1 that DecFlag, which is arranged, and enters next circulation;
Wherein, damping counter DampCnt initial value is 0, and IncLimited, DecLimited can be set according to actual needs It sets
Step 3-2) if motion state;
Step 3-2-1) remove reference point;
Step 3-2-2) whether oil amount determination is lower than " oil mass is low " threshold values, if so, subtracting atomizer spray with current display oil mass Oil mass is as display oil mass, if it is not, then showing by first-order linear damping algorithm process as current oil mass;
Step 4) is recycled according to step 1)-step 3).
2. a kind of calculation method that automobile instrument oil mass is shown according to claim 1, which is characterized in that step 2 and step It is rapid 3) in reference point establish method particularly includes:
Detect whether current state is StateInit state;If so, initialization delay counter DelayCnt is 0, initialization Sample counter AveCnt is 0, and enters StateDelay state;If it is not, then detection is StateDelay state; If it is StateDelay state, then judge whether upper KL30 electricity for the first time, be if it is directly entered StateBuild state, If not first time upper KL30 electricity, delay counter DelayCnt cycle count enters when DelayCnt reaches Limit StateBuild state;If not StateDelay state, then detection is StateBuild state, if it is StateBuild state, and sensor acquisition signal is effective, then adds up sampled value summation, reach AveLimit times, calculating is adopted Sample average value, the average value are reference point, and setting reference point useful signal RefValid is 1, into StateReady state; If not in StateBuild state, then whether detection is in StateReady state, if it is in StateReady state, Indicate that reference point is successfully established, reference point foundation terminates;If not in StateReady state, then detection whether StateReset state then terminates to establish if it is in StateReset state, if not in StateReset state, then examines It whether surveys in StateErr state, no matter whether all terminates this reference point in StateErr state and establish;
StateInit state is init state.
3. a kind of calculation method that automobile instrument oil mass is shown according to claim 1, which is characterized in that built in step 3) It stands with reference to comparison point method particularly includes:
If being currently StateInit state, initialization delay counter DelayCnt is 0, initializes sample counter AveCnt is 0, into StateBuild state;If not in StateInit state, then whether detection is in StateBuild State, if in StateBuild state, and sensor acquisition signal is effective, then adds up sampled value summation, reach AveLimit times, sample mean is calculated, which is to refer to comparison point, into StateReady state;If not In StateBuild state, then whether in StateReady state, StateInit state is init state for detection.
CN201710287298.2A 2017-04-27 2017-04-27 A kind of calculation method that automobile instrument oil mass is shown Active CN107144316B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710287298.2A CN107144316B (en) 2017-04-27 2017-04-27 A kind of calculation method that automobile instrument oil mass is shown

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710287298.2A CN107144316B (en) 2017-04-27 2017-04-27 A kind of calculation method that automobile instrument oil mass is shown

Publications (2)

Publication Number Publication Date
CN107144316A CN107144316A (en) 2017-09-08
CN107144316B true CN107144316B (en) 2019-10-18

Family

ID=59774620

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710287298.2A Active CN107144316B (en) 2017-04-27 2017-04-27 A kind of calculation method that automobile instrument oil mass is shown

Country Status (1)

Country Link
CN (1) CN107144316B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110411527A (en) * 2019-07-11 2019-11-05 北京汽车股份有限公司 Oil consumption display methods, vehicle, cloud server, oil mass display system
CN112161663B (en) * 2020-09-29 2024-04-26 北京车和家信息技术有限公司 Vehicle residual oil amount determining method, device, equipment and vehicle
CN114739485B (en) * 2022-03-24 2022-12-13 润芯微科技(江苏)有限公司 Automobile fuel calibration method and system

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101660923A (en) * 2009-09-08 2010-03-03 重庆长安汽车股份有限公司 Remaining driving mileage processing method of automobile combination meter
CN102452319A (en) * 2010-10-20 2012-05-16 芜湖华泰汽车仪表有限公司 Control method for automobile fuel gauge
CN103644951A (en) * 2013-12-19 2014-03-19 埃泰克汽车电子(芜湖)有限公司 Processing method for fuel gauge of automobile combination meter
CN104048733A (en) * 2014-05-23 2014-09-17 苏州佳世达光电有限公司 Oil mass measuring method and oil mass measuring system
CN105021250A (en) * 2015-06-19 2015-11-04 江苏新通达电子科技股份有限公司 Display system of fuel instrument and working method thereof
CN105270177A (en) * 2014-07-24 2016-01-27 成都天兴仪表(集团)有限公司 Oiling judgment strategy for automotive fuel gauge

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101660923A (en) * 2009-09-08 2010-03-03 重庆长安汽车股份有限公司 Remaining driving mileage processing method of automobile combination meter
CN102452319A (en) * 2010-10-20 2012-05-16 芜湖华泰汽车仪表有限公司 Control method for automobile fuel gauge
CN103644951A (en) * 2013-12-19 2014-03-19 埃泰克汽车电子(芜湖)有限公司 Processing method for fuel gauge of automobile combination meter
CN104048733A (en) * 2014-05-23 2014-09-17 苏州佳世达光电有限公司 Oil mass measuring method and oil mass measuring system
CN105270177A (en) * 2014-07-24 2016-01-27 成都天兴仪表(集团)有限公司 Oiling judgment strategy for automotive fuel gauge
CN105021250A (en) * 2015-06-19 2015-11-04 江苏新通达电子科技股份有限公司 Display system of fuel instrument and working method thereof

Also Published As

Publication number Publication date
CN107144316A (en) 2017-09-08

Similar Documents

Publication Publication Date Title
CN107144316B (en) A kind of calculation method that automobile instrument oil mass is shown
CN102880287B (en) Gesture identification method and gesture identification device
CN103216172B (en) Self-learning method of anti-pinch parameters of electric car window
CN107817534B (en) Data acquisition method and device of intelligent wearable device and intelligent wearable device
CA3075555C (en) Method for the detection of charging current curves
CN110057380B (en) Step counting method, step counting device, terminal and storage medium
CN105806359A (en) Step counting method and pedometer
CN105241472B (en) Vehicle driving mileage statistical method and device based on OBD vehicle speed
CN105021250B (en) A kind of fuel oil instrument display system and its working method
CN109883394B (en) Real-time road gradient estimation method for automobile
CN107657810B (en) Method and device for recognizing actions of upper viaduct and lower viaduct
CN106500830A (en) A kind of switch gate method for detecting vibration
CN104182037A (en) Gesture recognition method based on coordinate conversion
CN104660976A (en) Slow change detection system
CN104459736A (en) GPS device based on gravity sensor and drifting processing method thereof
CN102716527B (en) Detection method for liquid drops of transfusion pump
CN107368768A (en) Suitable for the user identification method and scale of scale
CN105865566B (en) Method and device for displaying automobile fuel
CN104991191B (en) The system and method for dynamic detection battery capacity of mobile terminal
CN104163185B (en) Locomotive wheel-rail lubricating control device and method
CN105338541B (en) A kind of abnormal track-detecting method and device based on mobile wireless network data
CN106485070B (en) A kind of adaptive thresholding value adjustment method
CN109613442A (en) Internal resistance of cell Dynamic calculation method and battery management system
CN104376232A (en) Method for judging gross error of proximity measurement data of non-contact top plate, bottom plate and roadway side
CN108408523A (en) Lift sensor self-calibration system and method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant