System and method for determining the state of charge of a battery

By combining the weighted calculation of Coulomb counting, constant charge state and open circuit voltage charge state at different time intervals, the problem of accurate detection of battery charge state in non-equilibrium state is solved, and high-precision estimation of battery charge state is achieved, which is suitable for various operating conditions.

CN108431617BActive Publication Date: 2024-10-25CTEK SWEDEN
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN201680064520.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2015-11-05
Filing Date
2016-11-04
Publication Date
2024-10-25
Estimated Expiration
2036-11-04

AI Technical Summary

Technical Problem

The existing technology has difficulty in accurately and robustly determining the state of charge of the battery under a wide range of operating conditions, especially in non-equilibrium conditions, and it is inconvenient to detect the voltage drop of small currents when using a current shunt to detect current.

Method used

By using a combination of calculation methods at different time intervals, including Coulomb counting charge state, constant charge state and open circuit voltage charge state, combined with time weighting factors to calculate the total charge state, using voltage measurements across the battery electrodes, avoiding current shunting Device dependencies.

Benefits of technology

Accurate estimation of battery state of charge is achieved, applicable to all operating conditions, especially during battery charging and discharging, improving detection robustness and accuracy and reducing the need for high-cost current shunts.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN108431617B_ABST
    Figure CN108431617B_ABST
Patent Text Reader

Abstract

The present invention relates to a method and system for calculating the total charge state of a battery, wherein the method includes calculating the total charge state as a coulomb count charge state when it is determined that the battery is being charged. When it is determined that the battery is no longer being charged, a disconnection period is determined, and the disconnection period is a period during which the battery does not receive a charge. When it is determined that the disconnection period is shorter than a first time interval, the total charge state is calculated as a constant charge state equal to the coulomb count charge state. When it is determined that the disconnection period is shorter than the second time interval and the disconnection period is longer than the first time interval, the charge state is calculated as a function of an open circuit voltage charge state determined by means of a voltage across electrodes of the battery and a constant charge state. The method further includes calculating the total charge state by means of the open circuit voltage charge state when it is determined that the disconnection period is longer than the second time interval.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of determining the state of charge of a battery. Further, the present invention particularly relates to a method and a system for determining the state of charge of a battery. Background Art

[0002] The state of charge of a battery refers to a percentage measure of how much charge is stored in the battery. A simple analogy is a fuel gauge showing the available amount of fuel in the tank. However, determining the state of charge for a battery in use is very complex. This is partly explained by the non-equilibrium state of the battery. In the art, several attempts have been made to measure the state of charge (SOC) of a battery, see for example the article "Prediction of battery behavior subject to high-rate partial state of charge", Patrick J. van Bree et al., IEEE transactions of vehicular technology, Vol. 58 No. 2 February 2009. The solution involves a fairly complex model using seven parameters, four of which are tunable. Other methods are discussed in the review article “The State of Charge Estimating Methods for Battery: A Review”, Wen-Yeau Chang, ISRN Applied Mathematics Volume 2013, Article ID 953792, 7 pages http: / / dx.doi.org / 10.1155 / 2013 / 953792.

[0003] There are several different devices for determining SOC by means of accurate current and voltage measurement, see for example the reference design by AMS in the integrated circuit AS8510, http: / / www.ams.com. / eng / Products / Sensor-Interfaces / Data-Acquisition-Front-End / AS8501. This solution requires a shunt resistor for measuring the current from / to the battery.

[0004] The current state of the art therefore indicates a need for a simple and robust method for determining the state of charge of a battery over a wide range of operating conditions.

[0005] There are problems with determining the state of charge of a battery in a non-equilibrium state, such as a battery that is heated or a battery that is undergoing charging.

[0006] Furthermore, there are problems in determining the current flowing into / out of the battery, since this determination involves the use of a current shunt, i.e. a resistor with a low resistance and a voltage detector for detecting the voltage drop across the resistor. For small currents, the voltage drop across the shunt resistor may not be convenient to detect.

[0007] Purpose of the Invention

[0008] The present invention aims to avoid the aforementioned disadvantages and weaknesses in previously known methods and systems for determining the state of charge and aims to provide an improved method for determining the state of charge of a battery. The main object of the invention is to provide an improved method of the type that allows an initial definition of the state of charge to be estimated under all conditions. Another object of the invention is to provide a method for determining the state of charge based on voltage measurements across the electrodes of a battery. Yet another object of the invention is to provide a system with a voltage recorder and a user device for determining the state of charge. Summary of the invention

[0009] According to the present invention, at least the primary object is achieved by means of the method initially defined and further defined in preferred embodiments of the invention.

[0010] According to a first aspect of the present invention, there is provided a method for calculating the total state of charge of a battery, wherein the method comprises calculating the total state of charge as a coulomb count state of charge when it is determined that the battery is being charged. When it is determined that the battery is no longer being charged, a disconnection period is determined, the disconnection period being a period during which the battery does not receive a charge. When it is determined that the disconnection period is shorter than a first time interval, a total state of charge equal to the coulomb count state of charge is calculated. When it is determined that the disconnection period is shorter than the second time interval and the disconnection period is longer than the first time interval, the charge state is calculated as a function of an open circuit voltage state of charge determined by means of a voltage across the electrodes of the battery and a constant state of charge. The method further comprises calculating the total state of charge by means of the open circuit voltage state of charge when it is determined that the disconnection period is greater than the second time interval.

[0011] The present invention is therefore based on the insight that the total state of charge of a battery can be calculated using several different calculations for the state of charge, namely: a coulomb count charge state when the battery receives a charge; a constant charge state equal to the coulomb count charge state during a first time interval after charging; and when it is determined that the battery has not been charged during a second time interval, the charge state is calculated as a function of an open circuit voltage charge state determined by the voltage across the battery's electrodes and the constant charge state, the second time interval including the first time interval.

[0012] According to a second aspect of the present invention, there is provided a system for determining a constant state of charge of a battery, the system comprising:

[0013] • a data logger configured to measure voltages across electrodes of the battery at intervals predetermined in time, wherein the data logger comprises a memory for storing the measured voltages, the data logger further comprising a communication link for transmitting data, wherein the data comprises the voltages; and

[0014] • A user device configured to receive data generated by a data logger from a data logger or a cloud service, wherein the user device comprises a memory and a processor, wherein the memory contains instructions for controlling the processor to perform a method for calculating a total state of charge of a battery.

[0015] The invention is therefore based on the insight that by combining several different methods of determining the state of charge of a battery during different time intervals, it is possible to reach a very accurate estimate of the overall state of charge.

[0016] In a preferred embodiment of the present invention, the method includes calculating the total charge state as a function of a constant charge state and an open circuit voltage charge state, based on the sum of a first function multiplied by the constant charge state and a second function multiplied by the open circuit voltage charge state, wherein the first function is a function of time and the second function is a function of time.

[0017] This means that the total state of charge is calculated as the sum of the constant state of charge and the open circuit voltage state of charge, where each contribution is multiplied by a weighting factor that is a function of time.

[0018] According to a preferred embodiment, the first function is equal to one at the end of the first time interval and equal to zero at the end of the second time interval, and wherein the second function is equal to zero at the end of the first time interval and equal to one at the end of the second time interval, whereby the total charge state at the end of the first time interval is determined by the constant charge state, and the total charge state at the end of the second time interval is determined by the open circuit charge state.

[0019] According to a preferred embodiment, the coulomb counting state of charge is calculated by means of the battery voltage, wherein the battery voltage is used to calculate the charging current delivered to the battery. In this way, it is not necessary for the current shunt to determine the current to the battery. In a preferred embodiment this is achieved by determining whether the battery voltage is above a predetermined threshold, and if it is determined that the battery voltage is greater than the charging threshold voltage, a linear charging current is assumed. The linear charging current may be a function of the state of charge as determined in a previous evaluation of the state of charge.

[0020] Further advantages and features of the invention will become apparent from the following detailed description of preferred embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] A more complete understanding of the above-mentioned and other features and advantages of the present invention will be apparent from the following detailed description of the preferred embodiments taken in conjunction with the accompanying drawings, in which:

[0022] Figure 1 is a perspective view of a system illustrating an embodiment of the present invention;

[0023] Figure 2 is a flow chart illustrating an embodiment of a method;

[0024] Figure 3 is a timeline illustrating an embodiment of a method;

[0025] Figure 4 is a state diagram illustrating an embodiment of a method;

[0026] Figure 5 is a diagram from an experiment illustrating a fit between a reference sensor and an embodiment of the method;

[0027] Figure 6 ac is from Figure 5 a magnified view of the interval; and

[0028] Figure 7 ac is a diagram illustrating an embodiment of the method having Figure 5 A further enlarged view of the interval. DETAILED DESCRIPTION

[0029] The following description is merely illustrative and exemplary of the invention and is not intended to limit the invention to the particular embodiments described.

[0030] All references cited herein, including patents and patent applications, are hereby incorporated by reference in their entirety.

[0031] Unless defined otherwise, technical and scientific terms have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.

[0032] As used herein, the terms state of charge and battery voltage mean as follows.

[0033] The state of charge is defined as the amount of charge remaining in the battery, the state of charge is given as a percentage (%), where 100% corresponds to a fully charged battery.

[0034] Cell voltage is the voltage measured across the electrodes of a battery.

[0035] The open circuit voltage OCV is the voltage measured across the electrodes of a battery, wherein the battery is unloaded, i.e. no load or a very small load is connected to the battery. Within the present application, the open circuit voltage may be the idle voltage on the battery when the battery is in an idle condition. For example, when a vehicle is not in use during the night, in which state a small current is supplied to the vehicle's onboard computer, the battery voltage is nevertheless assumed to be the open circuit voltage.

[0036] Initial reference Figure 1 , Figure 1 1 is a schematic diagram of a vehicle generally designated as 100. The vehicle 100 is equipped with a battery 101, which may be provided for starting a main internal combustion engine or for driving the vehicle. The vehicle also includes a charging device 102, which may be a generator if the main engine is an internal combustion engine. If the main engine is an electric motor, the charging device may be a charging circuit configured to be connected to an electric power network for charging the battery 101. A data recording device 103 is connected across the electrodes of the battery 101 so as to measure the battery voltage. The data recording device 103 includes a processor 105, a memory 104 and an associated circuit 106 for measuring the battery voltage, such as an A / D converter. The data recording device 103 is configured to measure the battery voltage at a defined time or at regular intervals or during certain states. The measured battery voltage is stored in a memory 104, preferably, if the measurement interval is irregular, the memory is large enough to accommodate at least 30,000 battery voltage measurements with associated time stamps. If the measurement interval is regular, it may not be necessary to store timing information.

[0037] The data logger 103 further comprises a communication circuit 107 configured to transmit the measured battery voltage in the memory 104 to an external user equipment 108 (UE) by means of a radio communication such as Bluetooth, Z-wave or ZigBee, for example. However, the data transmission may also be performed by means of a serial communication such as USB, for example between the data logger 103 and the UE 108. The UE 108 further comprises a processor and a memory, and preferably, the UE 108 may be, for example, a smart phone or a tablet computer.

[0038] The memory of the UE 108 contains instructions for the method of determining the charge state of the battery 101 which will be described below.

[0039] Now the main reference Figure 2 , which shows a flow chart for a method, generally designated 200 , for determining the total charge state of the battery 101 by means of the battery voltage measured by the data logger 103 and the measured voltage transmitted from the data logger 103 to the UE 108 .

[0040] The method 200 may include a step 201 of calculating a total state of charge as a coulomb count state of charge, which is performed upon determining 202 that the battery is being charged. Methods of determining the state of charge by coulomb counting are well known in the art and involve keeping track of the amount of charge delivered to the battery and the amount of charge discharged from the battery.

[0041] In one example, calculating the total state of charge as a coulomb count state of charge involves taking 50% of a previously calculated total state of charge and the maximum capacity of the battery, e.g., 80 amp hours, thus giving a present charge level of the battery of 40 amp hours. The current and / or subsequent total state of charge calculation 201 as a coulomb count state of charge SoC (CC) may then be calculated by adding the product of the 50% total state of charge or coulomb count state of charge SoC (CC) previously calculated and the estimated charging current multiplied by a predetermined time period, e.g., a sampling interval of the battery voltage, divided by the maximum capacity of the battery, 80 amp hours.

[0042] The step 203 of determining a disconnection period is performed upon determining 202 that the battery is no longer charging. The disconnection period is defined as a measure of time between the actual time and the time when charging was interrupted.

[0043] The step 205 of determining whether the off period (dtoff) is greater than the first time interval (dt1) is performed after the step 203 .

[0044] If it is determined in step 205 that the disconnection period is less than the first time interval ( dt1 ), step 204 is performed.

[0045] Step 204 includes calculating the total state of charge as a constant state of charge equal to the state of charge as determined in step 201. In this way, the total state of charge will be equal to the state of charge as determined by coulomb counting in step 201, which means that the total state of charge will be constant during the first time interval and equal to the last state of charge as determined by coulomb counting. In this way, the non-equilibrium state during the first time interval will not affect the total state of charge.

[0046] After the first time interval, the battery is assumed to be gradually more and more in a state of equilibrium, and when it is determined 207 that the off period is greater than the first time interval and the off period is shorter than the second time interval, a step of calculating the state of charge as a function of the open circuit voltage state of charge determined by means of the voltage across the electrodes of the battery and the constant state of charge is performed 206. As time progresses from the end of the first time interval, the overall state of charge increasingly depends on the calculation of the state of charge by means of the open circuit voltage measurement.

[0047] In a preferred embodiment, the step 206 of calculating the total state of charge as a function of the constant state of charge and the open circuit state of charge may be based on the sum of:

[0048] • a first function multiplied by the constant state of charge, the first function being a function of time; and

[0049] • A second function that is multiplied by the open circuit voltage state of charge, which is a function of time.

[0050] In a preferred embodiment, the above is implemented as:

[0051]

[0052] Where SoC is the state of charge and W is a parameter from 0 to 1 from the end of the first time interval to the end of the second time interval. SoC(CC) is the state of charge determined by coulomb counting and SoC(OCV) is the state of charge determined by open circuit voltage.

[0053] In a preferred embodiment, parameter W is equal to 0 at the end of the first time interval and equal to 1 at the end of the second time interval, with W in between being linearly dependent on time.

[0054] In one example, the first function is defined as 1-W(d toff ), and the second function is defined as W(d toff ). W(d toff ) are parameters and / or parametric functions defined as follows:

[0055] For 0 <d toff <dt1,W(d toff )=0

[0056] W(d toff ) Strictly from when dt off = dt1 when 0 increases to when d toff =1 at dt2

[0057] For dt2 <d toff ,W(d toff )=1

[0058] W(d toff ) can be based on the disconnection period (d toff ) increases strictly from 0 to 1 using a linear, exponential, or any other suitable strictly increasing function.

[0059] In a preferred embodiment, the first time interval is in the interval from 3 hours to 7 hours, most preferably in the interval from 4 hours to 6 hours. It has been found experimentally that this length of the first time interval is sufficient to ensure that the battery is in a balanced state.

[0060] In a preferred embodiment, the second time interval is in the interval from 8 hours to 12 hours, most preferably in the interval from 9 hours to 11 hours.After this second time interval, experiments have shown that the total state of charge determined by means of the open circuit voltage is stable and robust.

[0061] Finally, after the second time interval, when it is determined 207 that the off period is longer than the second time interval, a step 208 of calculating the total state of charge by means of the open circuit voltage state of charge is performed. From here on, the state of charge is determined solely by the open circuit voltage.

[0062] If it is determined (209) to do so, then method 200 may be iterated. If monitoring of the state of charge is desired, then successive iterations may be preferred. Otherwise, method 200 may be performed when measurement of the state of charge is desired.

[0063] The method provides an efficient way to accurately determine the state of charge of a battery based on historical battery voltage measurements. This will be further elucidated with reference to experiments performed.

[0064] Now the main reference Figure 3 , which shows a timeline for a preferred embodiment of the method 200. At the disconnection time (toff) the charging of the battery is interrupted. Disconnection period at the first time t':

[0065] dtoff1=t'-toff

[0066] This off period dtoff1 is shorter than the first time interval (dt1), which gives that the total charge state should be calculated as the charge state as determined by means of the coulomb count (SoC(CC)) in the previous calculation result.

[0067] At the second time t″, the total state of charge is calculated as the above mentioned function of the state of charge as determined by coulomb counting and the state of charge as determined by open circuit voltage. Because the off period dtoff2 is shorter than the second time interval (dt2) and longer than the first time interval (dt1).

[0068] At the third time t''', the off period dtoff3 is longer than the second time interval dt2, which means that the total state of charge should be calculated by means of the open circuit voltage.

[0069] As in Figure 3 As shown in , the second time interval dt2 is longer than the first time interval dt1.

[0070] Now the main reference Figure 4 , which shows a state diagram generally designated as 400. State diagram 400 provides a state diagram as shown in FIG. Figure 2 Another perspective on the method described.

[0071] State diagram 400 includes four different states:

[0072] S1: The state where the charge state is determined by coulomb counting.

[0073] S2: A state in which the charge state is equal to the charge state as determined in state S1 (ie by means of coulomb counting). When entering state S2, the off period begins.

[0074] S3: wherein the state of charge is a state determined by the sum of a first function of the state of charge determined by coulomb counting multiplied by time and a second function of the state of charge determined by the open circuit voltage of the battery multiplied by time.

[0075] S4: A state in which the state of charge is determined by the open circuit voltage of the battery.

[0076] When it is detected that the battery is not charging, a transition from state S1 to state S2 occurs.

[0077] When it is detected that the disconnection period is equal to or longer than the first time interval dt1 , a transition from state S2 to state S3 occurs.

[0078] When it is detected that the disconnection period is equal to or longer than the second time interval dt2, a transition from state S3 to state S4 occurs.

[0079] When any of the states S2 to S4 is active and charging of the battery is detected, the state S1 becomes active and the charge state is determined by means of coulomb counting. In addition, the measurement of the off period is stopped.

[0080] In a preferred embodiment, the detection of whether the battery is being charged is performed by measuring the battery voltage, and if the battery voltage is above a predetermined voltage, it is assumed that the battery is being charged. Furthermore, when the battery is detected to be above a predetermined voltage, a linear charging current is assumed. This rough estimate of the charging current gives surprisingly good results, which will be shown below with reference to experiments performed. In this way, it is not necessary to connect a current shunt in series with the electrodes of the battery, i.e. a low-side current shunt or a high-side current shunt. This is extremely useful because current shunts that can withstand the high currents from the main battery in the vehicle are expensive and cumbersome to install.

[0081] Now the main reference Figure 5, which is a graph illustrating the overall state of charge determined using an embodiment of the present method compared to a prior art state of charge sensor using a current shunt. The graph contains recorded data from 1000 hours of use of a battery (i.e., a 12V lead-acid battery) in a conventional automobile with an internal combustion engine. The solid line 501 illustrates the estimated state of charge by means of the method disclosed above, while the dashed line 502 illustrates the state of charge as determined using a reference sensor using a current shunt. Overall the estimated state of charge is surprisingly equal to the state of charge as estimated using the reference sensor.

[0082] In this preferred embodiment of the method, the first time interval is equal to 5 hours and the second time interval is equal to 10 hours.

[0083] For further description of the method, reference is now made to Figure 6 , which shows that from Figure 5 The enlargement interval is 160 hours to 280 hours. Figure 6 In a, the estimated state of charge is shown as a dashed curve 601, while the reference state of charge is shown as a solid curve 502. Figure 6 a illustrates advantageous features of the method according to a preferred embodiment.

[0084] exist Figure 6 The battery voltage 603 is shown in b and Figure 6 c shows the estimated charging current 604. In this example, the battery voltage is sampled every 5 minutes. The charging current is estimated in the following manner. If the measured battery voltage is above a charging voltage threshold, the charging current is calculated as a function of the state of charge, such as a linear function. In this example, the charging voltage threshold is equal to 13.2 volts. This is Figure 5 As shown in b, when the battery voltage is below the charging voltage threshold, Figure 5 The corresponding estimated charging current in c is equal to zero. As long as the battery voltage is above the charging voltage threshold, the estimation of the charging current utilizes the previous calculation of the state of charge as a linear function.

[0085] In one example, reference Figure 2 as well as Figure 6, the battery voltage is measured, for example in the form of an open circuit voltage OCV. It is then determined 202 that the battery is being charged. Determining 202 that the battery is being charged may be performed by detecting or determining that the battery voltage or the open circuit voltage OCV is equal to or above a charging voltage threshold, for example 13.2V. The charging current may then be calculated using a function based on a previous calculation of the coulomb counting state of charge SoC (CC) or the total state of charge, for example based on a previous measurement of the battery voltage. The function may be based on an empirically based relationship, for example in the form of a lookup table LUT based on measurements of the state of charge and the charging current for the battery being charged. The total state of charge may then be calculated 201 as a coulomb counting state of charge SoC (CC) by adding the previous calculation of the total state of charge or the coulomb counting state of charge SoC (CC) to the product of the charging current multiplied by a predetermined time period (e.g., a sampling interval of the battery voltage) divided by the capacity of the battery. Furthermore, when it is detected that the battery is below the charging voltage threshold, it is determined 202 that the battery is not being charged and the charging current may then be calculated as zero ampere (0A).

[0086] exist Figure 7 In , a further zoomed-in interval between 190 and 225 hours of the experiment is shown. Figure 7 At the first point 701 in a, charging of the battery begins and this is detected by monitoring the battery voltage rising above a charging voltage threshold, which in this embodiment is equal to 13.2V. Figure 7 b midpoint 701' is illustrated. Figure 7 c midpoint 701″ illustrates the corresponding charging current, which is calculated by means of the state of charge in the aforementioned sampling and the slope and intercept of the linear relationship between the charging current and the state of charge. Charging continues until 207.5 hours when the vehicle's engine is stopped and charging is interrupted 702″, which is detected by measuring the battery voltage below the charging voltage threshold.

[0087] After the interruption of charging, the state of charge is constant between point 702 and point 703, the time elapsed between which is equal to the first time interval, which in this embodiment is equal to 5 hours. After point 703, the state of charge is determined by means of the method disclosed above, which weights the state of charge determined by coulomb counting during charging and the state of charge as determined by means of the open circuit voltage. At point 704, the battery is subjected to charging and the total state of charge is determined by means of coulomb counting. When using Figure 1In the system shown in , the user device 108 is configured to receive the recorded battery voltage from the data recording device 103, which in a preferred embodiment may be based on Bluetooth communication, but of course, other communication means such as USB (wired) and WiFi (wireless) are also possible.

[0088] Alternatively, the system may be integrated into a device within the vehicle so that the driver can continuously receive information about the battery charge state.

[0089] The present invention is not limited to the preferred embodiments described above. Various substitutions, modifications and equivalents may be used. Therefore, the above embodiments should not be understood as limiting the scope of the present invention.

[0090] Possible modifications of the invention

[0091] The present invention is not limited to the embodiments described above and shown in the drawings, which have primarily illustrative and exemplary purposes. This patent application is intended to cover all adaptations and variations of the preferred embodiments described herein.

[0092] For example, it should be noted that the user device 108 and the data logging device 103 may be integrated in an apparatus configured to provide information about the charge state of a battery to a user.

[0093] It should also be noted that the invention is not limited to vehicles and the associated method, and the method may also be useful in applications such as uninterruptible power supplies that may use a diesel engine to drive a generator. The method may also prove useful for determining the state of charge for any battery that is subject to charging.

[0094] It should also be noted that all information on / related to terms such as above, below, over, below, etc. should be interpreted / understood to orient the device according to the respective drawings, which are oriented so that the references can be correctly read. Therefore, such terms only indicate the mutual relationship in the illustrated embodiment, and the relationship may be changed if the inventive device is equipped with another structure / design.

[0095] It should also be pointed out that although it is not explicitly stated that features from a specific embodiment can be combined with features from another embodiment, the combination should be considered obvious if the combination is possible.

[0096] Unless the context requires otherwise, throughout this specification the word "comprise" and variations such as "comprises" or "comprising", will be understood to imply the inclusion of stated integers or steps, or groups of integers or steps, but not the exclusion of any other integers or steps, or groups of integers or steps.

Claims

1. A method (200) for calculating a total state of charge of a battery, wherein the method comprises: - when it is determined (202) that the battery is being charged, calculating the total state of charge as a coulomb count state of charge (SoC(CC)); - when it is determined (202) that the battery is no longer being charged, determining (203) a disconnection period (dtoff), the disconnection period (dtoff) being a period during which the battery does not receive a charge, - when it is determined (205) that the off period (dtoff) is shorter than the first time interval (dt1), calculating (204) the total state of charge as a last constant state of charge value (SoC') by means of coulomb counting; - when it is determined (207) that the off period (dtoff) is shorter than the second time interval (dt2) and the off period (dtoff) is longer than said first time interval (dt1), calculating (206) a total state of charge as a function of an open circuit voltage state of charge value (SoC(OCV)) determined by means of an open circuit voltage (OCV) across electrodes of the battery (101) and a constant state of charge value (SoC'), - when it is determined (207) that the off period (dtoff) is longer than said second time interval (dt2), calculating (208) a total state of charge by means of an open circuit voltage state of charge value (SoC(OCV)); as well as - based on the calculation of the total state of charge, generating an output representing the amount of charge remaining in the battery; wherein the total state of charge is calculated as a function of the constant state of charge value (SoC') and the open circuit voltage state of charge value (SoC(OCV)) based on the sum of: - multiplying the constant state of charge by a first function, the first function being a function of the period; as well as - a second function multiplied by the open circuit voltage state of charge, the second function being a function of the time period.

2. A method according to claim 1, wherein the first function is equal to one at the end of the first time interval (dt1) and equal to zero at the end of the second time interval (dt2), and wherein the second function is equal to zero at the end of the first time interval (dt1) and equal to one at the end of the second time interval (dt2).

3. The method according to claim 1 or 2, wherein the constant state of charge value (SoC') is calculated with the aid of a coulomb counting state of charge value (SoC(CC)) calculated in a previous calculation.

4. The method of claim 3, wherein the coulomb counting state of charge value (SoC(CC)) is calculated with the aid of an open circuit voltage (OCV), wherein the open circuit voltage (OCV) is further used to calculate a charging current (I) delivered to the battery.

5. The method of claim 4 , wherein the charging current (I) is calculated as a function of the coulomb count state of charge value (SoC(CC)) calculated in the previous calculation if the open circuit voltage (OCV) is determined to be equal to or greater than the charging threshold voltage, or the charging current (I) is calculated to be equal to zero if the open circuit voltage (OCV) is determined to be lower than the charging threshold voltage.

6. The method according to claim 1 or 2, wherein the length of the first time interval (dt1) is in the interval from 3 hours to 7 hours.

7. The method according to claim 1 or 2, wherein the length of the second time interval (dt2) is in the interval from 8 hours to 12 hours.

8. The method according to claim 6, wherein the length of the first time interval (dt1) is in the interval from 4 hours to 6 hours.

9. The method according to claim 7, wherein the length of the second time interval (dt2) is in the interval from 9 hours to 11 hours.

10. A system for determining a state of charge of a battery, comprising: - a data logger (103) configured to measure the open circuit voltage (OCV) across electrodes of the battery (101) at intervals predetermined in time, wherein the data logger comprises a memory (104) for storing the measured voltages, the data logger further comprising a communication link (107) for transmitting data, wherein the data comprises the voltages; and - A user device (108) configured to receive data generated by the data logger (103) from the data logger or a cloud service, wherein the user device comprises a memory and a processor, wherein the memory contains instructions for controlling the processor to perform the method according to any one of claims 1 to 9.