The present application claims priority to Chinese patent application No. 202211302960.4, filed on Oct. 24, 2022, entitled “BATTERY CURRENT MONITORING METHOD, CONTROLLER AND CIRCUIT”, the entire content of which is incorporated herein by reference.
The present disclosure relates to the field of current monitoring technology, and in particular, to a battery current monitoring method, a controller and a circuit.
With the development of the electronics field, a battery management system is used more and more widely, so a method to measure a battery current in the battery management system is needed.
At present, hall sensors are usually used to directly measure the battery current in the battery management system. However, due to an instability of a power supply voltage of the hall sensor, an instability of the power supply of the measuring system itself, a zero deviation of the hall sensor itself and other problems, the current measured by the above current measurement method has a large error.
In a first aspect, the present disclosure provides a battery current monitoring method, applied to a controller in a current monitoring circuit, the current monitoring circuit further includes a hall sensor and a constant voltage source, an output terminal of the constant voltage source is connected to a first input terminal of the controller, an output terminal of the hall sensor is connected to a second input terminal of the controller, a power supply terminal of the hall sensor is connected to a third input terminal of the controller, and the hall sensor is arranged within a power bus of the battery, the current monitoring method includes:
In an embodiment, the determining the battery current based on the analog-to-digital conversion correction coefficient, the second analog-to-digital conversion value, and the third analog-to-digital conversion value includes:
In an embodiment, the determining the output voltage of the hall sensor based on the second analog-to-digital conversion value and the analog-to-digital conversion correction coefficient includes:
In an embodiment, the acquiring the zero-point deviation value of the hall sensor includes:
In an embodiment, the acquiring the output voltage and the supply voltage of the hall sensor in the absence of current passing through the power bus of the battery includes:
In an embodiment, the current monitoring circuit further includes a first voltage dividing circuit having an input terminal connected to the output terminal of the hall sensor, and an output terminal connected to the second input terminal of the controller, the determining the output voltage of the hall sensor based on the second analog-to-digital conversion value and the analog-to-digital conversion correction coefficient includes:
In an embodiment, the current monitoring circuit further includes a second voltage dividing circuit having an input terminal connected to the power supply terminal of the hall sensor, and an output terminal connected to the third input terminal of the controller, the determining the supply voltage of the hall sensor based on the third analog-to-digital conversion value and the analog-to-digital conversion correction coefficient includes:
In a second aspect, the present disclosure also provides a controller, including a memory and a processor, the memory stores a computer program, wherein the computer program when executed by the processor causes the processor to:
In a third aspect, the present disclosure also provides a current monitoring circuit, including a controller, a constant voltage source having an output terminal connected to a first input terminal of the controller, and a hall sensor having an output terminal connected to a second input terminal of the controller, and a power supply terminal connected to a third input terminal of the controller, the hall sensor being arranged within a power bus of a battery, wherein the controller is configured to:
One or more embodiments of the present disclosure will be described in detail in the following figures and description. Other features, objects and advantages of this application will become more apparent from the description, drawings, and claims.
In order to facilitate understanding of the present disclosure, the present disclosure will be described more fully below with reference to the relevant accompanying drawings. Embodiments of the present disclosure are presented in the accompanying drawings. However, the present disclosure may be implemented in many different forms and is not limited to the embodiments described herein. Rather, these embodiments are provided for the purpose of making the present disclosure more thorough and comprehensive.
Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the technical field to which the present disclosure belongs. The terms used herein in the specification of the disclosure are for the purpose of describing specific embodiments only, and are not intended to limit the disclosure.
It will be understood that the terms “first”, “second”, etc. used in this disclosure may be used herein to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish the first element from another element.
It should be noted that when an element is referred to as being “connected to” another element, it can be directly connected to another element or connected to another element through a intervening element. In addition, the “connected” in the following embodiments should be understood as “electrically connected”, “connected by communication”, etc. if there is transmission of electrical signals or data between the objects to be connected.
As used herein, the singular forms “a”, “an” and “the” may also include the plural forms, unless the context clearly indicates otherwise. It should also be understood that the terms “includes/comprises” or “has” etc. designate the presence of stated features, integers, steps, operations, components, parts or combinations thereof, but do not preclude the possibility of the presence or addition of one or more other features, integers, steps, operations, components, parts or combinations thereof.
In an embodiment, as shown in
At step S202, an output voltage of the constant voltage source is acquired and a first analog-to-digital conversion value of the output voltage of the constant voltage source is acquired.
The constant voltage source is a high precision reference voltage source, which has high precision, low noise, and small error range of voltage jump. The output voltage of the constant voltage source matches a supply voltage of the controller, that is, it cannot exceed the supply voltage of the controller and is not zero. The specific value of the output voltage of the constant voltage source can be selected by a person in the field according to the actual needs, and is not limited in the present disclosure. Exemplarily, when the supply voltage of the controller is 3.3V, the output voltage of the constant voltage source should be greater than OV and less than 3.3V. The hall sensor can be an open-loop hall sensor or a closed-loop hall sensor. In a specific embodiment, the hall sensor is the open-loop hall sensor, which makes the current monitoring circuit simple in structure and small in size, and enables a high reliability and a strong overload capacity of the current monitoring circuit. The controller can include but is not limited to MCU (Microcontroller Unit), FPGA (Field Programmable Gate Array) and other types of processing chips, without limitation here. Further, the controller is embedded with an analog-to-digital converter (not shown in the figure). In a specific embodiment, a sampling resolution of the analog-to-digital converter is 12 bits, that is, when the analog-to-digital converter converts an input analog signal to a digital signal, the maximum value of the digital signal that can be represented is 4096. In order to achieve higher sampling accuracy, a person skilled in the art can choose an analog-to-digital converter with a higher sampling resolution, or choose an analog-to-digital converter with a lower sampling resolution in order to save cost, which is not limited in the embodiment. Secondly, the supply voltage of the controller can be 3.3V, that is, the supply voltage of the analog-to-digital converter is also 3.3V, thus making it more versatile. The first input terminal of the controller refers to an analog signal input detection terminal for receiving a constant voltage analog signal output from the output terminal of the constant voltage source. The second input terminal of the controller refers to another analog signal input detection terminal for receiving a voltage analog signal output from the hall sensor after detecting the battery current. The third input terminal of the controller refers to another analog signal receiving terminal for receiving a supply voltage analog signal of the hall sensor. The hall sensor can be powered by a power supply as shown in
Specifically, the output voltage of the constant voltage source can be acquired directly from a constant voltage source device with a known output voltage, or acquired by connecting an external device with an unknown output voltage to the controller which acquires the output voltage by itself after measurement. The first analog-to-digital conversion value of the output voltage of the constant voltage source can be acquired by inputting the output voltage of the constant voltage source to the first input terminal of the controller, after the controller performs analog-to-digital conversion. Exemplarily, if the voltage output from the constant voltage source is Verve, verve is then input to the controller, and the first analog-to-digital conversion value corresponding to Vref is ADref after conversion by the controller. More specifically, for example, when Vref is 2.5V, the corresponding analog-to-digital conversion value ADref is 3100 after the analog-to-digital conversion of the controller, that is, the 3100 corresponding to ADref is the first analog-to-digital conversion value when Vref is 2.5V.
At step S204, an analog-to-digital conversion correction coefficient is determined by the controller based on the output voltage of the constant voltage source and the first analog-to-digital conversion value. The analog-to-digital conversion correction coefficient represents a voltage value corresponding to a unit analog-to-digital conversion value at the time of sampling of the controller.
Specifically, in the case where the output voltage of the constant voltage source and the first analog-to-digital conversion value are determined, the analog-to-digital conversion correction coefficient can be calculated by a mapping model between the output voltage of the constant voltage source and the first analog-to-digital conversion value. Exemplarily, in the case where the output voltage of the constant voltage source is Vref and the first analog-to-digital conversion value is ADref, the above mapping model is denoted by Up=Vref/ADref, where Up is the analog-to-digital conversion correction coefficient. In a specific embodiment, when Vref is 2.5V and the corresponding analog-to-digital conversion value ADref is 3100 after the analog-to-digital conversion of the controller, then the analog-to-digital conversion correction coefficient Up is 2500/3100=0.9064 in this case. In this embodiment, the output voltage Vref of the constant voltage source can be adaptively configured according to the needs of the actual disclosure, and is limited here.
At step S206, a second analog-to-digital conversion value of an output voltage of the hall sensor and a third analog-to-digital conversion value of a supply voltage of the hall sensor are acquired by the controller.
The second analog-to-digital conversion value represents a similar meaning as the first analog-to-digital conversion value mentioned in the above embodiment, and will not be repeated here.
Specifically, the second analog-to-digital conversion value of the output voltage of the hall sensor and the third analog-to-digital conversion value of the supply voltage of the hall sensor can be directly acquired and used by the controller by directly inputting a known analog-to-digital conversion value corresponding to an external voltage into the controller, or acquired by the controller by inputting the output voltage of the hall sensor and the supply voltage of the hall sensor with an unknown specific corresponding analog-to-digital conversion value into the controller and performing analog-to-digital conversion to the same by the controller. It should be noted that for the acquisition of the above analog-to-digital conversion values, whether directly or indirectly, the analog-to-digital conversion values are acquired based on a same analog-to-digital conversion standard.
At step S208, the battery current is determined by the controller based on the analog-to-digital conversion correction coefficient, the second analog-to-digital conversion value of the output voltage of the hall sensor, and the third analog-to-digital conversion value of the supply voltage of the hall sensor.
In a specific embodiment, when the analog-to-digital conversion correction coefficient is Up and the second analog-to-digital conversion value and the third analog-to-digital conversion value are ADUO and ADUV+ respectively, then the battery current I can be acquired by the following formula:
I=(Up*ADUO−Up*ADUV+/2)*G
In the above method embodiment, a high precision constant voltage source is connected to the first input terminal of the controller in the current monitoring circuit and used as a reference source for subsequent current value calculation. Further, the controller acquires the output voltage of the constant voltage source and the analog-to-digital conversion value of the output voltage of the constant voltage source, based on which, the controller determines the analog-to-digital conversion correction coefficient represented the voltage value corresponding to the unit analog-to-digital conversion value when the controller is sampled. Further, the second analog-to-digital conversion value of the output voltage of the hall sensor and the third analog-to-digital conversion value of the supply voltage of the hall sensor are acquired, and the battery current is finally determined based on the analog-to-digital conversion correction coefficient, thereby realizing a high precision measurement of the battery current.
In an embodiment, as shown in
At step S302, the output voltage of the hall sensor is determined based on the second analog-to-digital conversion value and the analog-to-digital conversion correction coefficient.
At Step S304, the supply voltage of the hall sensor is determined based on the third analog-to-digital conversion value and the analog-to-digital conversion correction coefficient.
At step S306, the battery current is determined based on the output voltage of the hall sensor and the supply voltage of the hall sensor.
The output voltage of the hall sensor is a voltage output after measurement based on the operating principle of the hall sensor when the hall sensor is arranged within the power bus of the battery.
In a specific embodiment, the second analog-to-digital conversion value and the third analog-to-digital conversion value are ADUO and ADUV+ respectively, and the analog-to-digital conversion correction coefficient is Up, then the output voltage UO of the hall sensor can be acquired by the following formula:
U
O
−U
p
*AD
UO
The supply voltage UV+ of the hall sensor can be acquired by the following formula:
U
V+
−U
p
*AD
UV+
Further, based on the output voltage UO of the hall sensor and the supply voltage UV+ of the hall sensor acquired from the above calculation, the battery current I is determined by the following formula:
I=(UO−UV+/2)*G
In the above embodiment, the output voltage of the hall sensor is determined based on the second analog-to-digital conversion value and the analog-to-digital conversion correction coefficient. The supply voltage of the hall sensor is determined based on the third analog-to-digital conversion value and the analog-to-digital conversion correction coefficient, and the battery current is then determined, which provides another calculation method for determining the battery current.
In an embodiment, as shown in
At step S402, an intermediate value of the output voltage of the hall sensor is determined based on the second analog-to-digital conversion value and the analog-to-digital conversion correction coefficient.
The intermediate value of the output voltage of the hall sensor represents a calculated value of the output voltage determined by the second analog-to-digital conversion value and the analog-to-digital conversion correction coefficient.
In a specific embodiment, when the second analog-to-digital conversion value and the analog-to-digital conversion correction coefficient are ADUO and Up respectively, the intermediate value of the output voltage of the hall sensor can be denoted by US, and US can be acquired by the following formula:
U
S
=U
p
*AD
UO
At step S404, a zero-point deviation value of the hall sensor is acquired. The zero-point deviation value of the hall sensor represents a deviation between a theoretical value and an actual measured value of the output voltage of the hall sensor in the absence of current passing through the power bus of the battery.
Specifically, the zero-point deviation value can be acquired externally and directly input into the controller, and can be directly acquired and used by the controller. The zero-point deviation value can also be acquired by inputting a corresponding parameter(s) for calculating the zero-point deviation value into the controller and having the controller perform calculations based on the parameter(s).
Step S406, the output voltage of the hall sensor is determined based on the zero-point deviation value and the intermediate value of the hall sensor.
In a specific embodiment, in the case where the zero-point deviation value and the intermediate value of the hall sensor are Vdelt and US respectively, the output voltage UO of the hall sensor can be determined by the following formula:
U
O
=U
S
+V
delt
In the above embodiment, by introducing the zero-point deviation value to the calculation of the output voltage of the hall sensor, the output voltage of the hall sensor is calculated more accurately, which in turn improves the measurement accuracy of the battery current.
In an embodiment, as shown in
At step S502, the output voltage of the hall sensor and the supply voltage are acquired in the absence of current passing through the power bus of the battery.
At step S504, the zero-point deviation value of the hall sensor is determined based on the output voltage and the supply voltage of the hall sensor.
The output voltage of the hall sensor is a voltage output from the hall sensor in the absence of current passing through the power bus of the battery. As shown in
In a specific embodiment, in the absence of current passing through the power bus of the battery, and assuming that the output voltage and supply voltage of the hall sensor are Uzero and UV+ respectively, the zero-point deviation value Vdelt can be acquired by the following formula:
V
delt
−U
V+/2−Uzero
In the above embodiment, by acquiring the output voltage and supply voltage of the hall sensor in the absence of current passing through the power bus of the battery, the zero-point deviation value of the hall sensor is determined, and the monitoring accuracy of the battery current is further improved.
In an embodiment, as shown in
At step S602, the second analog-to-digital conversion value of the output voltage of the hall sensor and the analog-to-digital conversion correction coefficient are acquired in the absence of current passing through the power bus of the battery.
At step S604, the output voltage of the hall sensor is determined based on the second analog-to-digital conversion value of the output voltage of the hall sensor and the analog-to-digital conversion correction coefficient.
The second analog-to-digital conversion value is an analog-to-digital conversion value acquired by inputting the output voltage of the hall sensor to the controller for analog-to-digital conversion in the absence of current passing through the power bus of the battery.
In a specific embodiment, when the second analog-to-digital conversion value of the output voltage of the hall sensor is ADUzero and the analog-to-digital conversion correction coefficient is Up in the above case, then the output voltage Uzero of the hall sensor can be determined by the following formula:
U
zero
—U
p
*AD
Uzero
In an embodiment, as shown in
At step S702, a first voltage dividing coefficient of the first voltage dividing circuit is acquired.
The first voltage dividing circuit is configured to divide the output voltage of the hall sensor when it is input to the controller. In a specific embodiment, as shown in
At step S704, the output voltage of the hall sensor is determined based on the first voltage dividing coefficient, the second analog-to-digital conversion value, and the analog-to-digital conversion correction coefficient.
In a specific embodiment, when the first voltage dividing coefficient is
the second analog-to-digital conversion value is ADUO and the analog-to-digital conversion correction coefficient is Up, the output voltage of the hall sensor can be acquired by the following formula:
In the above embodiment, by introducing the first voltage dividing circuit in the current monitoring circuit to divide the output voltage of the hall sensor, so as to ensure that the voltage input to the controller is within a safe range, and avoid the damage and safety issues caused by the excessive input voltage of the controller.
In an embodiment, as shown in
At step S706, a second voltage dividing coefficient of the second voltage dividing circuit is acquired.
As shown in
At step S708, the supply voltage of the hall sensor is determined based on the second voltage dividing coefficient, the third analog-to-digital conversion value, and the analog-to-digital conversion correction coefficient.
In a specific embodiment, when the second voltage dividing coefficient is
the third analog-to-digital conversion value is ADV+ and the analog-to-digital conversion correction coefficient is Up, the supply voltage of the hall sensor can be acquired by the following formula:
In the above embodiment, by introducing the second voltage dividing circuit in the current monitoring circuit, the supply voltage of the Hall sensor is divided to ensure that the voltage input to the controller is within a safe range, thus avoiding damage and safety issues caused by the excessive input voltage of the controller.
The solution of the disclosure will be further illustrated with the following specific embodiment which is applied to a battery current monitoring scenario. In this case, as shown in
U
P
=V
ref
/AD
ref
For example, if the voltage Vref is 2.5V and the analog-to-digital conversion value ADref converted and acquired by the analog-to-digital converter of the controller 204 is 3100, the voltage value corresponding to the unit analog-to-digital conversion value can be acquired, that is, the analog-to-digital conversion correction coefficient Up is 2500/3100=0.9064.
Assuming that the supply voltage of hall sensor 202 is UV+, and assuming that the supply voltage of hall sensor 202 is input to controller 204 through the second voltage dividing circuit 210 as shown in
In the case of no current passing through the power bus of the battery, i.e., within 200 mS before the battery is powered on, the controller 204 acquires the output voltage UO of the hall sensor 202 from the third input port as Uzero. Similarly, the Uzero with the constant voltage source 206 as the reference can be acquired by combining the current monitoring circuit as shown in
Based on the specific value of the theoretical supply voltage UV+ of the hall sensor 202, the zero-point deviation value Vdelt of the hall sensor 202 can be determined as:
V
delt
−U
V+/2−Uzero
where Vdelt can be a positive or negative value, indicating a deviation value between the theoretical and actual measurement of the output voltage of the hall sensor 202 when no current is passed.
Further, after the battery is powered on for 200 ms, based on the above formula, the output voltage UO of the hall sensor 202 is acquired as:
Finally, the current of the hall sensor 202 is calculated as:
I=(UO−UV+/2)*G
Combined with the above formula, the battery current I after powering on can be acquired as:
In the above embodiment, the influence of unstable supply voltage of the hall sensor and the operating voltage of the controller itself is eliminated, and the zero-point deviation value is introduced to eliminate the deviation between a theoretical zero-point value and an actual measured zero-point value of the hall sensor, so as to improve the accuracy of current monitoring.
It should be understood that although the individual steps in the flowcharts involved in the embodiments as described above are shown sequentially as indicated by the arrows, the steps are not necessarily performed sequentially in the order indicated by the arrows. Unless explicitly stated herein, these steps are performed in no strict order and they can be performed in any other order. Moreover, at least some of the steps in the flowcharts involved in the embodiments as described above may include multiple steps or multiple stages that are not necessarily performed at the same moment of completion, but may be performed at different moments, and the order in which these steps or stages are performed is not necessarily sequential, but may be performed alternately or alternately with other steps or at least some of the steps or stages in other steps.
Based on the same inventive concept, the present disclosure embodiment also provides a battery current monitoring device for implementing the battery current monitoring method mentioned above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more embodiments of the battery current monitoring device provided below can be referred to the limitations for the battery current monitoring method above and will not be repeated herein.
In an embodiment, as shown in
In an embodiment, the second determination module 908 described above includes:
In an embodiment, the first voltage determination unit described above includes:
In an embodiment, the deviation value acquisition unit described above includes:
In an embodiment, the first voltage acquisition unit described above includes:
In an embodiment, the first voltage determination unit described above further includes:
In an embodiment, the second voltage determination unit described above further includes:
The individual modules in the above battery current monitoring device can be implemented in whole or in part by software, hardware and combinations thereof. Each of the above modules can be embedded in or independent of the processor in the computer device in hardware form, or can be stored in the memory in the computer device in software form, so that the processor can be called to perform the corresponding operations of the above modules.
In an embodiment, a controller is provided, which can be a terminal, and its internal structure can be as shown in
Those skilled in the art can understand that the structure shown in
Those skilled in the art can understand that the structure shown in
In an embodiment, a controller is provided, including a memory and a processor. The memory stores computer programs, and the processor implements the steps in the above method embodiments when executing computer programs.
In an embodiment, a current monitoring circuit is provided, including:
In an embodiment, a computer readable storage medium is provided on which a computer program is stored, and the computer program implements the steps in the above method embodiments when executed by the processor.
In an embodiment, a computer program product is provided, including a computer program, which is executed by the processor to implement the steps in the above method embodiments.
A person of ordinary skill in the art can understand that implementing all or part of the processes in the methods of the above embodiments can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes in the embodiments of the above methods. Any reference to memory, database or other medium used in the embodiments provided in this disclosure can include at least one of a non-volatile and a volatile memory. The non-volatile memory can include a read-only memory (ROM), a magnetic tape, a floppy disk, a flash memory, an optical memory, a high-density embedded non-volatile memory, a resistive random access memory (ReRAM), a magnetoresistive random access memory (MRAM), a ferroelectric random access memory (FRAM), a phase change memory (PCM), and a graphene memory, etc. The volatile memory can include a random access memory (RAM) or an external cache memory, etc. As an illustration rather than a limitation, the random access memory can be in various forms, such as a static random access memory (SRAM) or a dynamic random access memory (DRAM). The databases involved in the embodiments provided by the present disclosure can include at least one of a relational database and a non-relational database. The non-relational database can include, without limitation, a blockchain-based distributed database, etc. The processor involved in the embodiments provided by the present disclosure can be a general purpose processor, a central processor, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computation, and the like, without limitation.
The technical features of the above embodiments can be combined arbitrarily. In order to make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as the combination of these technical features is not contradictory, it should be considered as the scope of this description.
The above embodiments only express several implementations of the present disclosure, and their description is specific and detailed, but should not be understood as a limitation on the scope of the present disclosure. It should be pointed out that for those skilled in the art may further make variations and improvements without departing from the conception of the present disclosure, and these fall within the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be subject to the appended claims.
Number | Date | Country | Kind |
---|---|---|---|
202211302960.4 | Oct 2022 | CN | national |
Number | Date | Country | |
---|---|---|---|
20240133956 A1 | Apr 2024 | US |