Electric vehicle electric quantity display method, electric vehicle instrument and computer storage medium
1. An electric vehicle electric quantity display method is characterized by comprising the following steps: acquiring electric quantity display voltage value USA step (2); obtaining the electric quantity display voltage value U from a voltage-electric quantity comparison tableSA step of corresponding electric quantity value; a step of displaying the electric quantity value; and repeatedly executing the steps;
wherein, the acquired electric quantity display voltage value USComprises the following steps: calculating the battery real time acquired in a sampling periodAverage value of voltageAnd when said average value isLess than current electric quantity display voltage value USThen, the electric quantity estimated drop voltage value U is calculated by the following algorithmDescendDisplaying the current electric quantity to a voltage value USAnd said estimated value of electric power droop UDescendThe difference value is used as the current electric quantity display voltage value US;
The algorithm comprises the following steps: calculating the average consumed current estimated in the voltage sampling duration of the sampling period according to the following formula IIAnd calculating the electric quantity estimated drop voltage value U according to the following formulaDescend;
In the formula II, lambda is an estimation coefficient, and lambda is not less than 1, PForehead (forehead)Is the rated output power, U, of a certain electrical appliance1The voltage drop of the battery when the electric appliance works normally;
formula III, UDecrease maxAfter the battery is completely discharged once and is not connected with a load, the total reduced voltage value is obtained, T is the sampling duration of the voltage value, and A is the rated capacity of the battery.
2. The method for displaying electric quantity of electric vehicle as claimed in claim 1, wherein said obtaining electric quantity display voltage value USFurther comprising the steps of: when the average value isNot less than the current electric quantity display voltage value USTime, electric quantity display voltage value USRemain unchanged.
3. The electric vehicle electric quantity display method according to claim 1, further comprising a time delay step, wherein the time delay step comprises: the electric quantity display method is started after the vehicle is started for a set time.
4. The electric vehicle electric quantity display method according to claim 3, further comprising an initial electric quantity display step after the time delay step, wherein the initial electric quantity display step comprises:
judging electric quantity display voltage value USWhether or not there is an assignment;
when no assignment exists, extracting the maximum value of the real-time voltage of the battery acquired in a sampling period, comparing the maximum value with a calibrated maximum value U, and taking a smaller value as an electric quantity display voltage value US(ii) a And
obtaining the electric quantity display voltage value U from a voltage-electric quantity comparison tableSAnd displaying the acquired electric quantity value according to the corresponding electric quantity value.
5. The electric vehicle electric quantity display method according to claim 1, further comprising a power-off processing step, wherein the power-off processing step comprises: when the power-off duration is within the set duration, the electric quantity displays the voltage value USKeeping the same; and when the power-off duration exceeds the set duration, displaying the electric quantity to a voltage value USAnd (6) clearing.
6. The method for displaying electric quantity of electric vehicle as claimed in claim 1, wherein the voltage value U is displayed when the electric quantity is obtainedSIn the step (2), the real-time voltage of the battery is obtained by a voltage adoption circuit connected with the battery.
7. The method for displaying electric quantity of electric vehicle as claimed in claim 1, wherein the voltage value U is displayed when the electric quantity is obtainedSThe real-time battery voltage is obtained through voltage data provided by the vehicle communication network.
8. The method for displaying electric quantity of an electric vehicle according to claim 1, wherein the battery is a lead-acid battery.
9. An electric vehicle meter, comprising:
a processor;
a memory;
and a computer program stored in the memory that is executable by the processor;
the processor, when executing the computer program, executes the steps of the method of displaying an amount of power according to any one of claims 1 to 8.
10. A computer-readable storage medium, wherein a computer program in the computer-readable storage medium, when executed by a processor of an electric vehicle meter, performs the steps of the electricity amount display method according to any one of claims 1 to 8.
Background
Compared with the conventional tricycle, the light cars have better comfort because of being provided with carriages and other devices, and are particularly suitable for being popularized and used in rural areas or underdeveloped areas. For cost reasons, the meter of the light electric vehicle simply determines the remaining capacity only according to the running time, and has the problem of inaccurate capacity indication, and when the light electric vehicle runs on an uphill road section for a long time or an air conditioner is turned on for a long time, the actual remaining capacity is far smaller than the indicated remaining capacity.
Disclosure of Invention
The invention aims to provide a method for displaying electric quantity of an electric vehicle, which aims to improve the accuracy of electric quantity indication and does not need to increase a large number of inductors and detection circuits.
The invention also provides an electric vehicle instrument and a computer storage medium.
In order to achieve the purpose, the technical scheme adopted by the invention is as follows:
an electric vehicle electric quantity display method comprises the following steps: acquiring electric quantity display voltage value USA step (2); obtaining the electric quantity display voltage value U from a voltage-electric quantity comparison tableSA step of corresponding electric quantity value; a step of displaying the electric quantity value; and repeatedly executing the steps;
wherein, the acquired electric quantity display voltage value USComprises the following steps: calculating the average value of the real-time voltage of the battery acquired in a sampling periodAnd when said average value isLess than current electric quantity display voltage value USThen, the electric quantity estimated drop voltage value U is calculated by the following algorithmDescendDisplaying the current electric quantity to a voltage value USAnd said estimated value of electric power droop UDescendThe difference value is used as the current electric quantity display voltage value US;
The algorithm comprises the following steps: calculating the average consumed current estimated in the voltage sampling duration of the sampling period according to the following formula IIAnd calculating electricity according to the following formulaQuantity-estimated drop voltage value UDescend;
In the formula II, lambda is an estimation coefficient, and lambda is not less than 1, PForehead (forehead)Is the rated output power, U, of a certain electrical appliance1The voltage drop of the battery when the electric appliance works normally;
formula III, UDecrease maxAfter the battery is completely discharged once and is not connected with a load, the total reduced voltage value is obtained, T is the sampling duration of the voltage value, and A is the rated capacity of the battery.
In the above electric vehicle electric quantity display method, preferably, the acquired electric quantity display voltage value USFurther comprising the steps of: when the average value isNot less than the current electric quantity display voltage value USTime, electric quantity display voltage value USRemain unchanged.
In the above electric vehicle electric quantity display method, preferably, the electric quantity display method further includes a time delay step, and the time delay step includes: the electric quantity display method is started after the vehicle is started for a set time.
In the above electric vehicle electric quantity display method, preferably, after the time delay step, an initial electric quantity display step is further included, and the initial electric quantity display step includes:
judging electric quantity display voltage value USWhether or not there is an assignment;
when no assignment exists, extracting the maximum value of the real-time voltage of the battery acquired in a sampling period, comparing the maximum value with a calibrated maximum value U, and taking a smaller value as an electric quantity display voltage value US(ii) a And
obtaining the electric quantity display voltage value U from a voltage-electric quantity comparison tableSAnd displaying the acquired electric quantity value according to the corresponding electric quantity value.
In the above electric vehicle power amount display method, preferably, the power amount display method further includes a power-off processing step, and the power-off processing step includes: when the power-off duration is within the set duration, the electric quantity displays the voltage value USKeeping the same; and when the power-off duration exceeds the set duration, displaying the electric quantity to a voltage value USAnd (6) clearing.
In the above electric vehicle electric quantity display method, preferably, the acquired electric quantity display voltage value USIn the step (2), the real-time voltage of the battery is obtained by a voltage adoption circuit connected with the battery.
In the above electric vehicle electric quantity display method, preferably, the acquired electric quantity display voltage value USThe real-time battery voltage is obtained through voltage data provided by the vehicle communication network.
In the above electric vehicle power display method, preferably, the battery is a lead-acid battery.
An electric vehicle meter, comprising:
a processor;
a memory;
and a computer program stored in the memory that is executable by the processor;
when the processor executes the computer program, the meter performs the steps of the electricity quantity display method according to any one of the above.
A computer-readable storage medium, in which a computer program is executed by a processor of an electric vehicle meter, the electric vehicle meter performing the steps of the electricity amount display method according to any one of the above.
Compared with the prior art, the invention has at least the following beneficial effects:
the invention not only has accurate electric quantity indication, but also does not need to sample other parameters except the real-time voltage value of the battery, does not need more inductors and detection circuits, thereby having the advantage of low hardware cost and being widely applied to light cars.
Drawings
FIG. 1 is a block diagram of a method for displaying electric quantity of an electric vehicle;
FIG. 2 is a diagram showing a voltage value U for acquiring electric quantitySA flow diagram of (a);
FIG. 3 is a block diagram of a meter.
Detailed Description
The invention is further illustrated with reference to the following figures and examples.
Referring to fig. 1, the electric quantity display method for the electric vehicle includes the following steps:
s100, acquiring electric quantity display voltage value US;
S200, obtaining the electric quantity display voltage value U from a voltage-electric quantity comparison tableSA corresponding electric quantity value;
s300, displaying the electric quantity value; and
the above steps S100 to S300 are repeatedly performed.
Wherein the voltage-to-charge mapping table is a pre-established mapping standard, wherein the charge is preferably expressed in percentage, such as the voltage-to-charge mapping table described below
Referring to fig. 2, the obtaining of the electric quantity display voltage value USStep S100 of (a) includes the steps of:
step S101, calculating the average value of the real-time voltage of the battery acquired in one sampling periodSpecifically, the voltage data provided by a voltage sampling circuit or a vehicle communication network is used for acquiring the real-time voltage value of the battery with a sampling period T1, the duration of the real-time voltage value is T, and the average voltage value in the period is calculated
Wherein, USUMIs the sum of the effective voltage values obtained in the T time, the unit: and V. N is a radical ofQuietThe number of the effective voltage values obtained in the T time.
Step S102, average value comparisonAnd the electric quantity display voltage value USThe size of (d);
step S103, when the average value isNot less than the current electric quantity display voltage value USTime, electric quantity display voltage value USKeeping the same;
step S104, when the average value isLess than current electric quantity display voltage value USThen, calculating the estimated drop voltage value U of the electric quantityDescendSpecifically: calculating the average consumed current estimated in the voltage sampling duration of the sampling period according to the following formula IIThe unit of current is ampere, and the estimated reduced voltage value U of the electric quantity is calculated according to the following formulaDescendVoltage in volts;
in the formula II, λ is an estimation coefficient, λ is between 1 and 2.5, and PForehead (forehead)For a given rated output power of an appliance, the appliance may be selected from appliances operating at any constant power, e.g. front-end appliancesHeadlights, air conditioners under heating, etc., U1The voltage drop of the battery when the electric appliance works normally;
formula III, UDecrease maxAfter the battery is completely discharged once and is not connected with a load, the total reduced voltage value is in volt, T is the sampling duration of the voltage value in seconds, A is the rated capacity of the battery and is in ampere-hour (namely Ah);
step S105, displaying the current electric quantity to a voltage value USAnd said estimated value of electric power droop UDescendThe difference value is used as the current electric quantity display voltage value USI.e. according to the following formula four
US=US-UDescendFormula four
To U againSAssigning value to obtain electric quantity display voltage USThe value is obtained.
In the above method, the average consumption current is estimated by a specific algorithmFurther using the average consumption currentThe voltage drop value is estimated through a specific algorithm, so that the problem of inaccurate battery power indication caused by load change can be effectively solved, and the power indication is more accurate. Besides, other parameters except the battery voltage do not need to be sampled, so that other inductors and detection circuits do not need to be added, and the method has the advantage of low cost.
When the voltage is abnormal, the corresponding obtained electric quantity value is also abnormal, so that the displayed electric quantity value is inaccurate. In order to solve the problem, the method for displaying the electric quantity further includes a delaying step, where the delaying step includes: the electric quantity display method is started after the vehicle is started for a set time.
After the vehicle is started, the electric quantity displays a voltage value USThere may be assigned values or may have been cleared, which if cleared would affect the normal operation of the subsequent algorithm. To solve the problem, this embodiment further includes, after the delaying step, an initial electric quantity displaying step, where the initial electric quantity displaying step includes:
judging electric quantity display voltage value USWhether or not there is an assignment;
if U isSIf assignment exists, the value is kept unchanged;
when U is turnedSWhen no assignment exists, extracting the maximum value of the real-time voltage of the battery acquired in a sampling period, comparing the maximum value with a calibrated maximum value U, and taking a smaller value as an electric quantity display voltage value US. Specifically, the real-time voltage value of the battery is acquired by a sampling period T2 through voltage data provided by a voltage sampling circuit or a vehicle communication network, the one-time sampling duration is T3, and T is more than or equal to 50ms2Less than or equal to 500ms, and the T1, the T2 and the T3 are determined according to actual conditions. The obtained maximum voltage value is used as an initial electric quantity display voltage value USTaking the actual voltage of the fully charged battery after standing for 1 to 2 hours as a calibration maximum value U, and taking U and USThe smaller value of the voltage values is taken as the electric quantity display voltage value USThereby reducing the influence of the virtual voltage of the battery;
the voltage value U is displayed after the electric quantity is obtainedSThen, obtaining the electric quantity display voltage value U from a voltage-electric quantity comparison tableSAnd displaying the acquired electric quantity value according to the corresponding electric quantity value.
When the vehicle instrument is powered off, if the power off time is long, the battery level may have changed after the vehicle instrument is powered on again. In order to solve the influence of power failure on the power display, the power display method of this embodiment further includes a power failure processing step, where the power failure processing step includes: when the power-off duration is within the set duration, the set duration is 2 minutes, and the electric quantity display voltage value U is obtainedSThe battery voltage is kept unchanged, and the battery voltage can be ensured to return to a relatively stable state; and when disconnectedWhen the electricity duration exceeds the set duration, the voltage value U is displayed by the electricity quantitySAnd (6) clearing.
The battery of the present embodiment is a lead-acid battery.
Referring to fig. 3, the electric vehicle meter provided in the present embodiment includes: a display 1; a processor 2; a memory 3; and a computer program stored in the memory 3 that is executable by the processor 2; the processor 2 that can be used includes but is not limited to a single chip microcomputer, an MCU, a DSP, a CPU, etc., and the memory 3 that can be used includes a ROM, a RAM, an EPROM, an EEPROM, a FlashROM, wherein when the processor 2 executes the computer program, the meter performs the steps of the power display method of the above embodiment.
A computer-readable storage medium, in which a computer program is executed by a processor of an electric vehicle meter, the electric vehicle meter performing the steps of the electricity amount display method as in the above embodiment.
The display method, the meter and the computer readable storage medium have the advantages of accurate electric quantity indication and low cost, and are particularly suitable for light cars such as electric tricycles, electric quadricycles and the like.
The present invention has been described in detail with reference to the specific embodiments, and the detailed description is only for the purpose of helping those skilled in the art understand the present invention, and is not to be construed as limiting the scope of the present invention. Various modifications, equivalent changes, etc. made by those skilled in the art under the spirit of the present invention shall be included in the protection scope of the present invention.