Disclosure of Invention
The invention aims to provide a dynamic measuring and calculating method for internal resistance of a battery and a battery management system, which can ensure measuring and calculating precision of the internal resistance and cannot influence the normal operation of the system.
In order to achieve the above object, the present invention provides a method for dynamically measuring and calculating internal resistance of a battery, comprising:
the method comprises the steps of periodically collecting a stack current value and periodically collecting voltage values of all battery cells in a round-robin mode, wherein the voltage collection time of each battery cell is multiple times of a current collection period;
calculating a stack current difference value between a stack current value acquired in the current acquisition period and a stack current value acquired in the previous current acquisition period;
when the stack current difference value is larger than a preset threshold value, marking the moment as a first moment and issuing a step command of the first moment to a BMU unit, averaging all stack current values obtained in the voltage acquisition period before the first moment to obtain a first current average value, averaging all stack current values obtained in the voltage acquisition period after the first moment to obtain a second current average value, and subtracting the first current average value and the second current average value to obtain a first average difference value;
when the first average difference value is larger than a preset threshold value, averaging a plurality of stack current values acquired at each voltage acquisition time of two voltage acquisition periods before and after the first time to obtain a third current average value and a fourth current average value of each electric core, and performing difference on the corresponding third current average value and the fourth current average value to obtain a second average difference value of each electric core;
recording the time when one voltage acquisition cycle passes from the first time as a second time, and issuing the second average difference value of each battery cell and a step command of the second time to the BMU at the second time;
after receiving the step command at the first moment, the BMU unit records the voltage value of each battery cell at the first moment; after receiving the step command at the second moment, the BMU unit records the voltage value of each battery cell at the second moment; and
and obtaining the corresponding internal resistance according to the ratio of the difference value of the voltage value of the corresponding battery cell at the second moment and the voltage value of the corresponding battery cell at the first moment to the corresponding second average difference value.
Preferably, if the second average difference is greater than the preset threshold, the corresponding internal resistance is obtained according to a ratio of a difference between the voltage value of the corresponding battery cell at the second moment and the voltage value of the corresponding battery cell at the first moment to the second average difference; and if the second average difference value is not larger than the preset threshold value, skipping the calculation of the internal resistance of the corresponding battery cell.
Preferably, after receiving the step command at the first time, the BMU unit records the number of the electric core of which the voltage value is acquired at the first time; after receiving the step command at the second moment, the BMU unit records the number of the battery cell of which the voltage value is acquired at the second moment; and skipping the calculation of the internal resistances of the numbered battery cores at the first moment and the second moment.
Preferably, when the stack current difference is greater than a preset threshold, all stack current values collected in two voltage collection periods before and after the first time are respectively stored in two caches so as to respectively average all stack current values in the two caches to obtain the first current average value and the second current average value.
In order to achieve the above object, the present invention further provides a battery management system, including a BMS master controller and a BMU unit, wherein the BMS master controller is configured to periodically collect a stack current value, the BMU unit is configured to periodically collect voltage values of all battery cells in a round-robin manner, and the voltage collection time of each battery cell is several times of a current collection period;
the BMS master is further configured to:
calculating a stack current difference value between a stack current value acquired in the current acquisition period and a stack current value acquired in the previous current acquisition period;
when the stack current difference value is larger than a preset threshold value, marking the moment as a first moment and issuing a step command of the first moment to a BMU unit, averaging all stack current values obtained in the voltage acquisition period before the first moment to obtain a first current average value, averaging all stack current values obtained in the voltage acquisition period after the first moment to obtain a second current average value, and subtracting the first current average value and the second current average value to obtain a first average difference value;
when the first average difference value is larger than a preset threshold value, averaging a plurality of stack current values acquired at each voltage acquisition time of two voltage acquisition periods before and after the first time to obtain a third current average value and a fourth current average value of each electric core, and performing difference on the corresponding third current average value and the fourth current average value to obtain a second average difference value of each electric core; and
recording the time when one voltage acquisition cycle passes from the first time as a second time, and issuing the second average difference value of each battery cell and a step command of the second time to the BMU at the second time;
the BMU unit is further configured to perform:
after the step command at the first moment is received, recording the voltage value of each battery cell at the first moment;
after the step command at the second moment is received, recording the voltage value of each battery cell at the second moment; and
and obtaining the corresponding internal resistance according to the ratio of the difference value of the voltage value of the corresponding battery cell at the second moment and the voltage value of the corresponding battery cell at the first moment to the corresponding second average difference value.
Preferably, if the second average difference is greater than the preset threshold, the corresponding internal resistance is obtained according to a ratio of a difference between the voltage value of the corresponding battery cell at the second moment and the voltage value of the corresponding battery cell at the first moment to the second average difference; and if the second average difference value is not larger than the preset threshold value, skipping the calculation of the internal resistance of the corresponding battery cell.
Preferably, the BMU unit is further configured to perform: after the step command at the first moment is received, recording the number of the battery cell of which the voltage value is acquired at the first moment; after receiving the step command at the second moment, recording the number of the battery cell of which the voltage value is acquired at the second moment; and skipping the calculation of the internal resistances of the numbered battery cores at the first moment and the second moment.
Preferably, the BMS master is further configured to perform: when the stack current difference value is larger than a preset threshold value, storing all stack current values collected in two voltage collection periods before and after the first moment into two caches respectively to average all stack current values in the two caches respectively to obtain the first current average value and the second current average value.
Compared with the prior art, the method for dynamically measuring and calculating the internal resistance of the battery can simultaneously calculate the internal resistance of a plurality of sections of battery cores, and the internal resistance detection task is operated in real time without depending on the interruption of the highest priority, so that the normal task operation of the system is not influenced; and through the setting of each preset threshold, corresponding calculation is carried out when the current fluctuation meets the preset threshold, so that the internal resistance detection precision can be effectively ensured.
Detailed Description
The following detailed description is given with reference to the accompanying drawings for illustrating the contents, structural features, and objects and effects of the present invention.
Referring to fig. 1 and fig. 2, the present invention discloses a method for dynamically measuring and calculating internal resistance of a battery, comprising:
A. the method comprises the steps of periodically collecting a stack current value I and periodically collecting voltage values of all battery cells (the number of the battery cells is Z) in a round-robin mode, wherein the voltage collection time Y ms of each battery cell is Y/X times of the current collection period X ms. In most cases, because the cell voltage acquisition needs to switch and wait, the current acquisition speed is obviously faster than the cell voltage acquisition speed, that is, the current acquisition period X ms is obviously shorter than the voltage acquisition time Y ms of the cell, Y/X current values are acquired by the system in the Y ms process of single voltage acquisition (in order to avoid the situation that Y/X is not divided completely, the values of Y and X can be set respectively, so that the two values are exactly divided), correspondingly, within the total time Y Z ms that the voltage acquisition traverses all the cells once, Y Z/X stack current values I are acquired altogether.
B. Calculating the current value I of the pile collected in the current collection period X msbThe current value I of the pile collected in the last current collection period X msaDifference of stack current Δ I1A。
C. Current difference Δ I of current stack
1AWhen the current value is greater than the preset threshold value a, the time is marked as a first time T1, a step command of the first time T1 is issued to the BMU unit 2, and all stack current values I acquired in a voltage acquisition period before the first time T1 (i.e., Y × Z ms before the first time T1) are detected
1Averaging (Y, Z and X) to obtain a first current average value
For all stack current values I acquired in the voltage acquisition period after the first time T1 (i.e., Y × Z ms after the first time T1)
2Averaging (Y, Z and X) to obtain a second current average value
For the average value of the first current
And a second current average value
Obtaining a first average difference value Delta I by difference
2B。
D. When the first average difference value is Δ I
2BWhen the current value is greater than the preset threshold value B, collecting a plurality of stack current values I in each voltage collection time Y ms of two voltage collection periods Y x Z ms before and after the first time T1
N1And I
N2Averaging to obtain a third current average value of each battery cell
And fourth current average value
And for the corresponding third current average value
And fourth current average value
Obtaining a second average difference value delta I of each battery cell by difference calculation
1,△I
2,△I
3...△I
Z。
E. The time when a voltage acquisition cycle Y × Z ms passes from the first time T1 is recorded as a second time T2, and a second average difference Δ I of each cell is issued at the second time T21,△I2,△I3...△IZAnd a step command at a second time T2 to BMU unit 2.
F. After receiving the step command at the first time T1, the BMU unit 2 records the voltage value V of each battery cell at the first time T111,V21,V31,...VZ1(ii) a After receiving the step command at the second time T2, the BMU unit 2 records the voltage value V of each battery cell at the second time T212,V22,V32,...VZ2。
G. According to the voltage value V of the corresponding battery cell at the second time T2N2And a voltage value V at a first time T1N1Difference value V ofN2-VN1With corresponding second mean difference DeltaINThe corresponding internal resistance R is obtained by the ratioN。
The dynamic measuring and calculating method for the internal resistance of the battery can calculate the internal resistance of a plurality of battery cells at the same time, and the internal resistance detection task is operated in real time without being finished by the interruption of the highest priority, so that the normal task operation of a system is not influenced; and through the setting of each preset threshold, corresponding calculation is carried out when the current fluctuation meets the preset threshold, so that the internal resistance detection precision can be effectively ensured.
In some embodiments, if the second average difference Δ INIf the voltage value is greater than the preset threshold value C, the voltage value V corresponding to the battery cell at the second moment T2 is obtainedN2And a voltage value V at a first time T1N1Difference value V ofN2-VN1Is different from the second average by an amount Δ INThe corresponding internal resistance R is obtained by the ratioN(ii) a If the second average difference value DeltaINAnd if the internal resistance is not greater than the preset threshold C, skipping the internal resistance calculation of the corresponding electric core. By means of the design, the accuracy of internal resistance calculation is further guaranteed.
In some embodiments, after receiving the step command at the first time T1, the BMU unit 2 records the number N of the cell whose voltage value was collected at the first time T11(ii) a After receiving the step command at the second time T2, the BMU unit 2 records the number N of the battery cell of which the voltage value is collected at the second time T22(ii) a And skipping the calculation of the internal resistances of the numbered cells at the first time T1 and the second time T2. By means of the design, the accuracy of internal resistance calculation is further guaranteed.
In some embodiments, when the stack current valueDifference Delta I
1AWhen the current value is greater than the preset threshold value A, collecting all stack current values I in two voltage collecting periods Y x Z ms before and after the first time T1
1And I
2Respectively storing the current values into two caches to obtain all stack current values I in the two caches
1And I
2Respectively averaging to obtain a first current average value
And a second current average value
Referring to fig. 1 and fig. 2, the present invention further provides a battery management system, including a BMS master control 1 and a BMU unit 2, where the BMS master control 1 is configured to periodically collect a stack current value I, the BMU unit 2 is configured to periodically collect voltage values of all battery cells in a round-robin manner, and a voltage collection time Y ms of each battery cell is several times of a current collection period X ms. Specifically, the BMU unit 2 performs round-robin acquisition of voltage through a discrete device; the BMS main control 1 collects the stack current value I through the current collecting unit 3.
The BMS master 1 is further configured to:
calculating the current value I of the pile collected in the current collection period X msbThe current value I of the pile collected in the last current collection period X msaDifference of stack current Δ I1A;
Current difference Δ I of current stack
1AWhen the current value is greater than the preset threshold value a, the time is marked as a first time T1, a step command of the first time T1 is issued to the BMU unit 2, and all stack current values I acquired in a voltage acquisition period before the first time T1 (i.e., Y × Z ms before the first time T1) are detected
1Averaging (Y, Z and X) to obtain a first current average value
For all stack current values I acquired in the voltage acquisition period after the first time T1 (i.e., Y × Z ms after the first time T1)
2Averaging (Y, Z and X) to obtain a second current average value
For the average value of the first current
And a second current average value
Obtaining a first average difference value Delta I by difference
2B;
When the first average difference value is Δ I
2BWhen the current value is greater than the preset threshold value B, collecting a plurality of stack current values I in each voltage collection time Y ms of two voltage collection periods Y x Z ms before and after the first time T1
N1And I
N2Averaging to obtain a third current average value of each battery cell
And fourth current average value
And for the corresponding third current average value
And fourth current average value
Obtaining a second average difference value delta I of each battery cell by difference calculation
1,△I
2,△I
3...△I
Z(ii) a And
the time when a voltage acquisition cycle Y × Z ms passes from the first time T1 is recorded as a second time T2, and a second average difference Δ I of each cell is issued at the second time T21,△I2,△I3...△IZAnd a step command at a second time T2 to BMU unit 2.
The BMU unit 2 is further configured to perform:
after receiving the step command at the first time T1, the BMU unit 2 records the voltage value V of each battery cell at the first time T111,V21,V31,...VZ1;
After receiving the step command at the second time T2, the BMU unit 2 records the voltage value V of each battery cell at the second time T212,V22,V32,...VZ2(ii) a And
according to the voltage value V of the corresponding battery cell at the second time T2N2And a voltage value V at a first time T1N1Difference value V ofN2-VN1With corresponding second mean difference DeltaINThe corresponding internal resistance R is obtained by the ratioN。
In some embodiments, if the second average difference Δ INIf the voltage value is greater than the preset threshold value C, the voltage value V corresponding to the battery cell at the second moment T2 is obtainedN2And a voltage value V at a first time T1N1Difference value V ofN2-VN1Is different from the second average by an amount Δ INThe corresponding internal resistance R is obtained by the ratioN(ii) a If the second average difference value DeltaINAnd if the internal resistance is not greater than the preset threshold C, skipping the internal resistance calculation of the corresponding electric core. By means of the design, the accuracy of internal resistance calculation is further guaranteed.
In some embodiments, the BMU unit 2 is further configured to perform:
after receiving the step command at the first time T1, the BMU unit 2 records the number N of the battery cell of which the voltage value is collected at the first time T11;
After receiving the step command at the second time T2, the BMU unit 2 records the number N of the battery cell of which the voltage value is collected at the second time T22(ii) a And
skipping the calculation of the internal resistances of the numbered cells at the first time T1 and the second time T2.
By means of the design, the accuracy of internal resistance calculation is further guaranteed.
In some embodiments, the BMS master 1 is further configured to perform:
when the stack current value difference is delta I
1AWhen the current value is greater than the preset threshold value A, collecting all stack current values I in two voltage collecting periods Y x Z ms before and after the first time T1
1And I
2Respectively storing the current values into two caches to obtain all stack current values I in the two caches
1And I
2Respectively averaging to obtain first powerAverage value of flow
And a second current average value
The above disclosure is only a preferred embodiment of the present invention, which is convenient for those skilled in the art to understand and implement, and certainly not to limit the scope of the present invention, therefore, the present invention is not limited by the claims and their equivalents.