Sectional type electric quantity detection method based on detachable battery

Through segmented power detection method and Kalman filter fitting, the charging and discharging data of the battery are analyzed, and the complexity and low efficiency of power detection in the prior art are solved, achieving higher detection accuracy and simple operation.

CN119199562AActive Publication Date: 2024-12-27HUIZHOU FUNENG TECHNOLOGY CO LTD
View PDF 10 Cites 0 Cited by

Patent Information

Application Number
CN202411612324.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-13
Publication Date
2024-12-27
Estimated Expiration
2044-11-13

AI Technical Summary

Technical Problem

The existing detachable battery power detection methods are complex and cannot effectively cover the entire battery life cycle. The operation is complicated, which affects the detection efficiency.

Method used

The segmented power detection method is used to obtain the charging and discharging data of the battery, and use Kalman filter fitting to analyze the Kalman gain during the charging and discharging process of the battery, construct the charging and discharging data model of the battery, and dynamically describe the battery state. Simplify the operation process.

Benefits of technology

It improves the accuracy and accuracy of power detection, simplifies the operating process, improves the detection efficiency, and can more accurately reflect the actual capacity and working status of the battery at each stage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119199562A_ABST
    Figure CN119199562A_ABST
Patent Text Reader

Abstract

The invention provides a sectional type electric quantity detection method based on a detachable battery, and belongs to the field of battery analysis. The problem of low battery analysis efficiency is solved; the method specifically comprises the following steps: S1, acquiring battery data; s2, acquiring charging data and discharging data; fitting the charging data and the discharging data according to the battery data to obtain the Kalman gain of the battery in the charging process and the Kalman gain of the battery in the discharging process; s3, analyzing the Kalman gain of the battery in the charging process and the Kalman gain of the battery in the discharging process to obtain a primary battery report; obtaining a sample battery, analyzing the power amplification state of the sample battery, and updating the primary battery report to obtain a battery report; s4, battery reports are summarized and fed back; according to the invention, the battery analysis report is obtained by acquiring, processing and analyzing the related data in the charging and discharging process of the battery, so that the efficiency and accuracy of battery electric quantity detection are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention discloses a segmented electric quantity detection method based on a detachable battery, and relates to the field of battery analysis. Background Art

[0002] The existing methods for detecting the power level of removable batteries have the following deficiencies:

[0003] Complex model: The battery modeling method requires the establishment of a complex data model to represent the relationship between battery voltage and power. The process of establishing this data model needs to consider multiple factors such as battery charging, discharging, load power consumption, etc., making the model establishment process very complex and cumbersome.

[0004] Algorithm design: The existing methods only involve the state changes of the battery charging process or the battery discharging process, and cannot cover the entire use cycle of the battery; at the same time, in the analysis of the actual power amplifier of the battery, the existing methods use static analysis methods. This method cannot achieve a dynamic description of the battery power amplifier state during the battery charging and discharging process, and cannot reflect the actual working state of the battery.

[0005] Operational complexity: Existing methods require battery practitioners to manually set or adjust the operating parameters of the power detection equipment to achieve segmented power detection of the battery; this detection method will increase the operational complexity of battery practitioners and affect detection efficiency. Summary of the invention

[0006] In view of the shortcomings of the prior art, the present invention aims to provide a segmented power detection method based on a detachable battery, aiming to solve the problem of low battery analysis efficiency.

[0007] In order to achieve the above object, the present invention is implemented by the following technical solution: a segmented power detection method based on a detachable battery includes:

[0008] Step S1: Obtain the capacity, charging power, charging voltage, charging current, discharging power and open voltage of the battery to be tested to obtain battery data;

[0009] Step S2: charging the dead battery, and recording the current change, voltage change and charging time of the battery during the charging process to obtain charging data;

[0010] Discharge the fully charged battery and record the current change, voltage change and discharge time of the battery during the discharge process to obtain discharge data;

[0011] According to the battery data, the charging data and the discharging data are fitted using Kalman filtering to obtain the Kalman gain of the battery during the charging process and the Kalman gain of the battery during the discharging process;

[0012] Step S3: Analyze the power amplifier status of charging and discharging of a single battery according to the Kalman gain of the battery during charging and the Kalman gain of the battery during discharging to obtain a primary battery report; sample all batteries to be tested as sample batteries; analyze the power amplifier status of multiple sample batteries, update the primary battery report, and obtain a battery report;

[0013] Step S4: Summarize the battery report and provide feedback; continuously update the battery data and the battery report.

[0014] Furthermore, the specific steps of step S2 are as follows:

[0015] Step S21: the capacity of the battery to be tested is recorded as rC, the charging power is recorded as rP, and the discharging power is recorded as dP;

[0016] Step S22: Obtain the charging time of the battery, recorded as rt;

[0017] Get the actual charging current of the battery during the charging time, recorded as: ir 1 、ir 2 ~ir rt ;

[0018] Get the actual charging voltage of the battery during the charging time, recorded as: ur 1 、ur 2 ~ur rt ;

[0019] Among them, ir 1 and 1 Respectively represent the actual charging current and actual charging voltage corresponding to the first second; ir 2 and 2 They represent the actual charging current and actual charging voltage corresponding to the second second respectively; and so on. rt and rt They represent the actual charging current and actual charging voltage corresponding to the rt second respectively;

[0020] Will ir 1 ~ir rt and 1 ~ur rt , as charging data;

[0021] Step S23: Obtain the discharge time of the battery, recorded as dt;

[0022] Get the actual discharge current of the battery during the discharge time, recorded as: id 1 ,id 2 ~id dt ;

[0023] Get the actual discharge voltage of the battery during the discharge time, recorded as: ud 1 ,ud 2 ~ud dt ;

[0024] Among them, id 1 and 1 , respectively represent the actual discharge current and actual discharge voltage corresponding to the first second; id 2 and 2 , respectively represent the actual discharge current and actual discharge voltage corresponding to the second second; and so on, id dt and dt , respectively represent the actual discharge current and actual discharge voltage corresponding to the dt second;

[0025] The id 1 ~id dt and 1 ~ud dt , as discharge data;

[0026] Step S24: the charging voltage is recorded as iU, the charging current is recorded as iI, and the charging data is fitted;

[0027] Step S25: record the open voltage as oU, record the open current as oI, and fit the discharge data;

[0028] Step S26: Summarize the data in steps S21 to S25 and proceed to step S3.

[0029] Furthermore, the specific steps of step S24 are as follows:

[0030] Step S241: define calculation formula a1:

[0031] Among them, Qb (i) Indicates the battery power percentage at the i-th second during the charging process. The value range of i is: 1~rt; ir j Indicates the actual charging current at the jth second during the charging process, and the value range of j is: 1~i;

[0032] Will ir 1 ~ir rt Substitute into formula a1 and calculate the battery power percentage from the 1st to the rtth second during the charging process, and we get: Qb (1) , Qb (2) ~Qb (rt) ;

[0033] Among them, Qb (1) Indicates the battery power percentage at the first second during the charging process; Qb (2)Indicates the battery power percentage at the 2nd second during the charging process; and so on, Qb (rt) Indicates the battery power percentage at the rt second during the charging process;

[0034] Step S242: define calculation formula a2:

[0035]

[0036] Among them, Pbr (i) Indicates the actual charging power percentage of the battery at the i-th second during the charging process, ir i Indicates the actual charging current at the i-th second during the charging process, ur i Indicates the actual charging voltage at the i-th second during the charging process, and the value range of i is: 1~rt;

[0037] Will ir 1 ~ir rt and 1 ~ur rt Substituting into formula a2, calculate the actual charging power percentage of the battery from the 1st to the rtth second during the charging process, and obtain: Pbr (1) , Pbr (2) ~Pbr (rt) ;

[0038] Among them, Pbr (1) Indicates the actual charging power percentage of the battery in the first second during the charging process; Pbr (2) Indicates the actual charging power percentage of the battery in the second second during the charging process; and so on, Pbr (rt) Indicates the actual charging power percentage of the battery at the rt second during the charging process;

[0039] Step S243: Summarize the data in steps S241 to S242 to construct a battery charging change matrix, which is recorded as matrix A. The mathematical expression of matrix A is:

[0040]

[0041] Split matrix A in chronological order to obtain matrix A (1) , Matrix A (2) ~Matrix A (rt) ;

[0042] The first second is divided into matrix A (1) ; Matrix A (1) The mathematical expression is:

[0043]

[0044] The second second is split into matrix A (2) ; Matrix A(2) The mathematical expression is:

[0045]

[0046] Similarly, the partition of the rtth second is matrix A (rt) ; Matrix A (rt) The mathematical expression is:

[0047]

[0048] Step S244: Taking matrix RO as the initial state, calculate the Kalman gain of the battery at the first second during the charging process, denoted as Krk (1) ; The mathematical expression of matrix RO is:

[0049] Step S245: Using matrix A (1) As the initial state, calculate the Kalman gain of the battery in the second second during the charging process, denoted as Krk (2) ;

[0050] Step S246: Repeat calculation of Krk (1) ~Krk (2) The same steps as above are used to calculate the Kalman gain corresponding to the 3rd to rtth seconds in the charging process, and Krk is obtained. (3) ~Krk (rt) .

[0051] Furthermore, the specific steps of step S244 are as follows:

[0052] Step S2441: Calculate the matrix RO to become the matrix A (1) The state transfer matrix of (O-1) ; Matrix A (O-1) The calculation formula is:

[0053] Among them, × represents matrix multiplication, T represents the transpose of the matrix, and -1 represents the inverse of the matrix;

[0054] Step S2442: Calculate the error proof of the matrix RO, recorded as the matrix RRO; the mathematical calculation formula of the matrix RRO is:

[0055] Among them, - represents matrix subtraction;

[0056] Calculate the matrix A (1) The error proof is denoted by the matrix RA (1) ; Matrix RA (1) The mathematical formula is:

[0057]

[0058] The calculation changes from matrix RO to matrix A (1) The error transition matrix is ​​denoted as matrix QA (1) ; Matrix QA (1) The mathematical formula is:

[0059] QA (1) =RA (1) - RRO;

[0060] Step S2443: Calculate the error covariance matrix of the matrix RO, denoted as matrix Pk -(O) ; Matrix Pk -(O) The calculation formula is:

[0061] P -(O) =(1 / 4)×(APk -(O) T ×APk -(O) ), where × represents matrix multiplication, T represents the transpose of the matrix, and APk -(O) Represents the matrix Pk -(O) The transition matrix, APk -(O) The calculation formula is:

[0062] APk -(O) =RO-[(1 / 4)×I×RO]; where - represents matrix subtraction and I represents the 1 matrix;

[0063] Step S2444: Calculate matrix A (1) The pre-error covariance matrix of (1) - ; Matrix PK (1) - The calculation formula is:

[0064] PK (1) - =A (O-1) ×Pk -(O) ×(A (O-1) ) T +QA (1) ; Where × represents matrix multiplication, T represents matrix transpose, and + represents matrix addition;

[0065] Calculate the Kalman gain Krk of the battery in the first second during the charging process (1) , the calculation formula is:

[0066]

[0067] Furthermore, the specific steps of step S245 are as follows:

[0068] Step S2451: Calculate matrix A (1) Becomes the matrix A(2) The state transfer matrix of (1-2) ; A (1-2) The calculation formula is:

[0069] Among them, × represents matrix multiplication, T represents the transpose of the matrix, and -1 represents the inverse of the matrix;

[0070] Step S2452: Obtain matrix A (1) The error evidence matrix RA (1) ;

[0071] Calculate the matrix A (2) The error proof is denoted by the matrix RA (2) ; Matrix RA (2) The mathematical formula is:

[0072] Among them, - represents matrix subtraction;

[0073] Calculated by matrix A (1) Becomes the matrix A (2) The error transition matrix is ​​denoted as matrix QA (2) ; Matrix QA (2) The mathematical formula is:

[0074] QA (2) =RA (2) -RA (1) ;

[0075] Step S2453: Calculate RA (1) The error covariance matrix of -(1) ; Matrix Pk -(1) The calculation formula is:

[0076] P -(1) =(1 / 4)×(APk -(1) T ×APk -(1) ), where × represents matrix multiplication, T represents the transpose of the matrix, and APk -(1) Represents the matrix Pk -(1) The transition matrix, matrix APk -(1) The calculation formula is:

[0077] APk -(1) =A (1) -[(1 / 4)×I×A (1) ]; where - represents matrix subtraction and I represents the 1 matrix;

[0078] Step S2454: Calculate matrix A (2) The pre-error covariance matrix of(2) - ; Matrix PK (2) - The calculation formula is:

[0079] PK (1) - =A (1-2) ×Pk -(1) ×(A (1-2) ) T +QA (2) ; Where × represents matrix multiplication, T represents matrix transpose, and + represents matrix addition;

[0080] Calculate the Kalman gain Krk of the battery at the 2nd second during the charging process (2) , the calculation formula is:

[0081]

[0082] Furthermore, the specific steps of step S25 are as follows:

[0083] Step S251: define calculation formula a3:

[0084] Among them, Yb (i) Indicates the remaining power percentage of the battery at the i-th second during the discharge process. The value range of i is: 1~rt; id j Indicates the actual charging current at the jth second during the charging process, and the value range of j is: 1~i;

[0085] The id 1 ~id dt Substitute into formula a3 and calculate the battery power percentage from the 1st to the ddt second during the charging process, and we get: Yb (1) , Yb (2) ~Yb (dt) ;

[0086] Among them, Yb (1) Indicates the battery power percentage at the first second during the discharge process; Yb (2) Indicates the remaining power percentage of the battery in the second second during the discharge process; and so on, Yb (dt) Indicates the remaining battery power percentage at dt seconds during the discharge process;

[0087] Step S252: define calculation formula a4:

[0088]

[0089] Among them, Pbd (i) Indicates the actual charging power percentage of the battery at the i-th second during the charging process, id iIndicates the actual charging current at the i-th second during the charging process, ud i Indicates the actual charging voltage at the i-th second during the charging process, and the value range of i is: 1~dt;

[0090] The id 1 ~id dt and 1 ~ud dt Substitute into formula a4 and calculate the actual charging power percentage of the battery from the 1st to the dtth second during the charging process, and we get: Pbd (1) 、Pbd (2) ~Pbd (dt) ;

[0091] Among them, Pbd (1) Indicates the actual charging power percentage of the battery in the first second during the charging process; Pbd (2) Indicates the actual charging power percentage of the battery in the second second during the charging process; and so on, Pbd (dt) Indicates the actual charging power percentage of the battery at the dt second during the charging process;

[0092] Step S253: Summarize the data in steps S251 to S252 to construct a battery charging change matrix, which is recorded as matrix B. The mathematical expression of matrix B is:

[0093]

[0094] Split matrix B in chronological order to obtain matrix B (1) , Matrix B (2) ~Matrix B (dt) ;

[0095] The first second is divided into matrix B (1) ; Matrix B (1) The mathematical expression is:

[0096]

[0097] The second second is divided into matrix B (2) ; Matrix B (2) The mathematical expression is:

[0098]

[0099] Similarly, the partition at the dtth second is matrix B (dt) ; Matrix B (dt) The mathematical expression is:

[0100]

[0101] Step S254: Taking matrix DO as the initial state, calculate the Kalman gain of the battery at the first second, denoted as Kdk (1) ; The mathematical expression of matrix DO is:

[0102] Step S255: Repeat calculation of Kdk (1) The same steps as above are used to calculate the Kalman gain corresponding to the 2nd to rtth seconds during the discharge process, and Kdk is obtained. (2) ~Kdk (dt) .

[0103] Furthermore, the specific steps of step S254 are as follows:

[0104] Step S2541: Calculate the matrix DO to become the matrix B (1) The state transfer matrix of (O-1) ; Matrix B (O-1) The calculation formula is:

[0105] Among them, × represents matrix multiplication, T represents the transpose of the matrix, and -1 represents the inverse of the matrix;

[0106] Step S2542: Calculate the error proof of the matrix DO, recorded as the matrix RBO; the mathematical calculation formula of the matrix RBO is:

[0107] Among them, - represents matrix subtraction;

[0108] Calculate the matrix B (1) The error proof is denoted by the matrix RB (1) ; Matrix RB (1) The mathematical formula is:

[0109]

[0110] The calculation changes from matrix DO to matrix B (1) The error transition matrix is ​​denoted as matrix QB (1) ; Matrix QB (1) The mathematical formula is:

[0111] QB (1) =RB (1) - RBO;

[0112] Step S2543: Calculate the error covariance matrix of the matrix DO, denoted as matrix Pd -(O) ; Matrix Pd -(O) The calculation formula is:

[0113] Pd -(O) =(1 / 4)×(APd -(O) T×APd -(O) ), where × represents matrix multiplication, T represents the transpose of the matrix, and APd -(O) Represents the matrix Pd -(O) The transition matrix, APd -(O) The calculation formula is:

[0114] APk -(O) =DO-[(1 / 4)×I×DO]; where - represents matrix subtraction and I represents the 1 matrix;

[0115] Step S2544: Calculate matrix B (1) The pre-error covariance matrix is ​​denoted as PD (1) - ;PD (1) - The calculation formula is:

[0116] PD (1) - =B (O-1) ×PD -(O) ×(B (O-1) ) T +QB (1) ; Where × represents matrix multiplication, T represents matrix transpose, and + represents matrix addition;

[0117] Calculate the Kalman gain Kdk of the battery in the first second during the discharge process (1) , the calculation formula is:

[0118]

[0119] Furthermore, the specific steps of step S3 are as follows:

[0120] Step S31: analyzing the power amplifier state of the battery charging process according to the Kalman gain of the battery during the charging process;

[0121] Define the relationship b1-1: [Krk (i) -Krk (i-1) ]×[Krk (i-1) -Krk (i-2) ]>0;

[0122] Relation b1-2: [Krk (i) -Krk (i-1) ]×[Krk (i+1) -Krk (i) ]<0;

[0123] Relation b1-3: [Krk (i+1) -Krk (i) ]×[Krk (i+2) -Krk(i+1) ]>0;

[0124] Among them, Krk (i) represents the Kalman gain corresponding to the i-th second during the battery charging process; Krk (i+1) represents the Kalman gain corresponding to the (i+1)th second during the battery charging process; and so on, Krk (i-2) represents the Kalman gain corresponding to the (i-2)th second during the battery charging process; the value range of i is: 1~rt; rt represents the charging time of the battery;

[0125] The Kalman gain Krk in the battery charging process (1) ~Krk (rt) , substitute into the relational expressions b1-1 to b1-3, extract the Kalman gain that satisfies the relational expressions b1-1 to b1-3 at the same time, as the charging power-off; count the number of charging power-offs, recorded as dr;

[0126] Step S32: Extract the time corresponding to the first charging breakpoint, recorded as rrt (1) ;

[0127] Extract the time corresponding to the second charging breakpoint, recorded as rrt (2) ;

[0128] Similarly, extract the time corresponding to the drth charging breakpoint, recorded as rrt (dr) ;

[0129] Among them, rrt (1) ~rrt (dr) Satisfied with rt: rrt (1) <rrt (2) <~<rrt (dr) <rt;

[0130] From 1 to rrt (1) Seconds is the first charging time period, analyzing the power amplifier status of the battery from the start of charging to the first charging breakpoint;

[0131] Step S33: rrt (1) torrt (2) seconds is the second charging time period; (3) torrt (3) seconds is the third charging time period; and so on, rrt (dr-1) torrt (dr) Seconds is the drth charging time period; rrt (dr) torrt (rt) Seconds is the (dr+1)th charging time period;

[0132] Repeat the same steps of analyzing the battery power amplifier state in the first charging time period, and analyze the battery power amplifier state in the second to (dr+1)th charging time periods during the charging process;

[0133] Step S34: Repeat the same steps of analyzing the power amplifier status during the battery charging process to analyze the power amplifier status during the battery discharging process;

[0134] Summarize the power amplifier status of the battery charging process and the power amplifier status of the battery discharging process as the primary battery report;

[0135] Step S35: Obtain the number of all batteries to be tested, recorded as tb; randomly sample all batteries to be tested as sample batteries; the number of sample batteries is recorded as bn; the relationship between bn and tb satisfies: bn≤(tb×15%);

[0136] Repeat the same steps of analyzing the power amplification state of a single battery to obtain the power amplification state of the sample battery;

[0137] According to the power amplifier status of the sample battery, the average function in the numpy library and MATLAB software are used to perform weighted updates on the time period division in the primary battery report to obtain a battery report.

[0138] Furthermore, the specific steps of step S32 are as follows:

[0139] Step S321: Obtain the Kalman gain Krk corresponding to the first second in the battery charging process (1) ;

[0140] Get the rrt value during battery charging (1) The Kalman gain Krk corresponding to seconds (rrt(1)) ;

[0141] Judgment (rrt(1)) -rrt (1) ], determine the power amplification equation of the battery in the first charging time period;

[0142] Step S322: If [Krk (rrt(1)) -rrt (1) ]>0, indicating that the battery is in fast charging state;

[0143] Obtain the actual charging current, actual charging voltage, power percentage and actual charging power percentage of the battery in the first time period;

[0144] With the percentage of power as the independent variable, the actual charging current, the actual charging voltage and the actual charging power percentage as the dependent variables, MATLAB software is used to solve the relationship equation between the percentage of power in the fast charging state and the actual charging current, recorded as fQi 1(Qb);

[0145] The relationship between the percentage of power and the actual charging voltage is expressed as fQu 1 (Qb);

[0146] The relationship between the percentage of power and the actual charging power percentage is expressed as fQP 1 (Qb);

[0147] fQi 1 (Qb), fQu 1 (Qb) and fQP 1 (Qb), as the power amplifier equation for the fast charging of the battery in the first charging time period;

[0148] Step S323: If [Krk (rrt(1)) -rrt (1) ]<0, indicating that the battery is in a slow charging state;

[0149] Repeatedly solve fQi 1 (Qb), fQu 1 (Qb) and fQP 1 (Qb), the relationship between the percentage of battery power in the slow charging state and the actual charging current is calculated using MATLAB software, recorded as fQi 1 (Qb)`;

[0150] The relationship between the percentage of power and the actual charging voltage is expressed as fQu 1 (Qb)`;

[0151] The relationship between the percentage of power and the actual charging power percentage is expressed as fQP 1 (Qb)`;

[0152] Will fQi 1 (Qb)`, fQu 1 (Qb)` and fQP 1 (Qb)`, as the power amplifier equation for the battery to charge slowly during the first charging period;

[0153] Step S324: If [Krk (rrt(1)) -rrt (1) ]=0, indicating that the battery is in a stable power state;

[0154] Calculate the average value of the actual charging current of the battery in the first time period, recorded as air (1) ; The average value of the actual charging voltage, recorded as aur (1) ; The average value of the power percentage, denoted as aQb (1) ; The average value of the actual charging power percentage, denoted as aPbr (1);

[0155] The air (1) 、aur (1) ,aQb (1) and aPbr (1) , as the power amplifier equation for the battery to maintain a stable charge during the first charging period.

[0156] Compared with the prior art, the present invention has the following beneficial effects:

[0157] High accuracy: The segmented battery detection of the present invention analyzes the charging and discharging process of the battery, divides the battery voltage into multiple segments, and then performs analysis and mathematical modeling, which can more accurately reflect the actual capacity of the battery at each stage and improve the accuracy of power detection.

[0158] High precision: The battery mathematical modeling method of the present invention establishes a battery charge and discharge data model by acquiring the voltage and current changes of the battery charge and discharge. This method can dynamically represent the battery power and battery working status, effectively improving the measurement accuracy of the power.

[0159] Easy operation and high efficiency:

[0160] The present invention can set the equipment parameters for battery measurement according to the factory parameters of the battery, and is simple to operate and friendly to practitioners. At the same time, the present invention can record the complete charging and discharging process of the battery in real time, accurately simulate the change of battery power at each moment to achieve rapid detection, and improve the speed of battery power measurement. BRIEF DESCRIPTION OF THE DRAWINGS

[0161] Other features, objects and advantages of the present invention will become more apparent from the detailed description of non-limiting embodiments made with reference to the following drawings:

[0162] Figure 1 It is a schematic diagram of the method of the present invention;

[0163] Figure 2 This is a schematic diagram of the charging circuit of the present invention;

[0164] Figure 3 Schematic diagram of the discharge circuit of the present invention. DETAILED DESCRIPTION

[0165] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0166] See also Figure 1 , the segmented power detection method based on the removable battery includes:

[0167] It should be noted that the “battery” in the present invention means a “removable battery”;

[0168] Step S1: Obtain the capacity, (rated) charging power, charging voltage, charging current, (rated) discharge power and open voltage of the battery to be tested to obtain battery data;

[0169] It should be noted that the "battery to be tested" in the present invention refers to the battery that uses the present invention (the segmented power detection method based on a detachable battery) to perform battery power detection; "open voltage" refers to the voltage at the positive and negative ends of the battery during the discharge process; "open current" refers to the current generated by the battery during the discharge process.

[0170] Step S2: (using the charging circuit) charging the dead battery, and recording the current change, voltage change and charging time of the battery during the charging process to obtain charging data;

[0171] (Using a discharge circuit) discharging a fully charged battery, and recording the current change, voltage change and discharge time of the battery during the discharge process to obtain discharge data;

[0172] According to the battery data, the charging data and the discharging data are fitted using Kalman filtering to obtain the Kalman gain of the battery during the charging process and the Kalman gain of the battery during the discharging process;

[0173] It should be noted that the "empty battery" and the "fully charged battery" in the present invention are the same battery, that is, the battery is first charged and then discharged;

[0174] The specific steps of step S2 are as follows:

[0175] Step S21: the capacity of the battery to be tested is recorded as rC, the (rated) charging power is recorded as rP, and the (rated) discharging power is recorded as dP;

[0176] Step S22: Please refer to Figure 2 , build a charging circuit;

[0177] Disconnect the external power supply, then connect the dead battery and the protection resistor in parallel and connect them to the external power supply to form a charging circuit;

[0178] Connect a voltmeter V1 to both ends of the dead battery, connect an ammeter A1 to the dead battery branch, connect an ammeter A2 to the resistor R branch, and connect an ammeter A3 to the main circuit of the charging circuit;

[0179] Among them, the ammeter A3 is used to measure the total current of the charging circuit, the ammeter A1 is used to measure the current flowing through the battery, the voltmeter V3 is used to measure the voltage across the battery during the charging process, and the ammeter A2 is used to measure the current flowing through the protection resistor, and the resistor R represents the protection resistor;

[0180] Step S23: let i represent the total current of the charging circuit, i1 represent the current flowing through the battery, and i2 represent the current flowing through the protection resistor;

[0181] Adjust the voltage and current of the external power supply to the charging voltage and charging current in sequence, and connect the external power supply to charge the dead battery;

[0182] The timing starts from "external power supply is turned on", and the time from "external power supply is turned on" to "i1 = 0, and i2 is equal to i for the first time" is taken as the charging time of the battery, and the charging time is recorded as rt (unit: second);

[0183] Read the reading of ammeter A1 during the charging time as the actual charging current of the battery, recorded as: ir 1 、ir 2 ~ir rt ;

[0184] Read the reading of the voltmeter V1 during the charging time as the actual charging voltage of the battery, recorded as: ur 1 、ur 2 ~ur rt ;

[0185] Among them, ir 1 and 1 Respectively represent the actual charging current and actual charging voltage corresponding to the first second; ir 2 and 2 They represent the actual charging current and actual charging voltage corresponding to the second second respectively; and so on. rt and rt They represent the actual charging current and actual charging voltage corresponding to the rt second respectively;

[0186] Will ir 1 ~ir rt and 1 ~ur rt , as charging data;

[0187] Step S24: Please refer to Figure 3 , construct a discharge circuit;

[0188] Disconnect the switch, and then connect the fully charged battery, the switch and the tester M in series to form a discharge circuit;

[0189] Connect a voltmeter V2 to both ends of the fully charged battery and an ammeter A4 to the main path of the discharge circuit;

[0190] Among them, the voltmeter V2 is used to measure the voltage across the battery during the discharge process, and the ammeter A4 is used to measure the current of the discharge circuit;

[0191] Let U2 represent the voltage across the battery during the discharge process, and i4 represent the current in the discharge circuit;

[0192] Close the switch to discharge the fully charged battery;

[0193] Take "closing the switch" as the timing starting point, and take the time from "closing the switch" to "i4=0 and U2=0" as the discharge time of the battery, and record the discharge time as dt (unit: second);

[0194] Read the reading of ammeter A4 during the discharge time as the actual discharge current of the battery, recorded as: id 1 ,id 2 ~id dt ;

[0195] Read the reading of the voltmeter V2 during the discharge time as the actual discharge voltage of the battery, recorded as: ud 1 ,ud 2 ~ud dt ;

[0196] Among them, id 1 and 1 , respectively represent the actual discharge current and actual discharge voltage corresponding to the first second; id 2 and 2 , respectively represent the actual discharge current and actual discharge voltage corresponding to the second second; and so on, id dt and dt , respectively represent the actual discharge current and actual discharge voltage corresponding to the dt second;

[0197] The id 1 ~id dt and 1 ~ud dt , as discharge data;

[0198] It should be noted that the "removable battery" in the present invention mainly serves mobile phones, so the tester M in the discharge circuit refers to the mobile phone;

[0199] Step S25: The charging voltage is recorded as iU, the charging current is recorded as iI, and the charging data is fitted;

[0200] Step S251: define calculation formula a1:

[0201] Among them, Qb (i) Indicates the battery power percentage at the i-th second during the charging process. The value range of i is: 1~rt; ir j Indicates the actual charging current at the jth second during the charging process, and the value range of j is: 1~i;

[0202] Will ir 1 ~ir rt Substitute into formula a1 and calculate the battery power percentage from the 1st to the rtth second during the charging process, and we get: Qb (1) , Qb (2) ~Qb (rt) ;

[0203] Among them, Qb (1) Indicates the battery power percentage at the first second during the charging process; Qb (2) Indicates the battery power percentage at the 2nd second during the charging process; and so on, Qb (rt) Indicates the battery power percentage at the rt second during the charging process;

[0204] Step S252: define calculation formula a2:

[0205]

[0206] Among them, Pbr (i) Indicates the actual charging power percentage of the battery at the i-th second during the charging process, ir i Indicates the actual charging current at the i-th second during the charging process, ur i Indicates the actual charging voltage at the i-th second during the charging process, and the value range of i is: 1~rt;

[0207] Will ir 1 ~ir rt and 1 ~ur rt Substituting into formula a2, calculate the actual charging power percentage of the battery from the 1st to the rtth second during the charging process, and obtain: Pbr (1) , Pbr (2) ~Pbr (rt) ;

[0208] Among them, Pbr (1) Indicates the actual charging power percentage of the battery in the first second during the charging process; Pbr (2) Indicates the actual charging power percentage of the battery in the second second during the charging process; and so on, Pbr (rt) Indicates the actual charging power percentage of the battery at the rt second during the charging process;

[0209] Step S253: Summarize the data in steps S251 to S252 to construct a battery charging change matrix, which is recorded as matrix A. The mathematical expression of matrix A is:

[0210]

[0211] Split matrix A in chronological order to obtain matrix A (1) , Matrix A(2) ~Matrix A (rt) ;

[0212] The first second is divided into matrix A (1) ; Matrix A (1) The mathematical expression is:

[0213]

[0214] The second second is split into matrix A (2) ; Matrix A (2) The mathematical expression is:

[0215]

[0216] Similarly, the partition of the rtth second is matrix A (rt) ; Matrix A (rt) The mathematical expression is:

[0217]

[0218] Step S254: Taking matrix RO as the initial state, calculate the Kalman gain of the battery at the first second during the charging process, denoted as Krk (1) ; The mathematical expression of matrix RO is:

[0219] Step S2541: Calculate the matrix RO to become the matrix A (1) The state transfer matrix of (O-1) ; Matrix A (O-1) The calculation formula is:

[0220] Among them, × represents matrix multiplication, T represents the transpose of the matrix, and -1 represents the inverse of the matrix;

[0221] Step S2542: Calculate the error proof of the matrix DO, recorded as the matrix RBO; the mathematical calculation formula of the matrix RBO is:

[0222] Among them, - represents matrix subtraction;

[0223] Calculate the matrix A (1) The error proof is denoted by the matrix RA (1) ; Matrix RA (1) The mathematical formula is:

[0224]

[0225] The calculation changes from matrix RO to matrix A (1) The error transition matrix is ​​denoted as matrix QA (1) ; Matrix QA (1)The mathematical formula is:

[0226] QA (1) =RA (1) - RRO;

[0227] Step S2543: Calculate the error covariance matrix of the matrix RO, denoted as matrix Pk -(O) ; Matrix Pk -(O) The calculation formula is:

[0228] P -(O) =(1 / 4)×(APk -(O) T ×APk -(O) ), where × represents matrix multiplication, T represents the transpose of the matrix, and APk -(O) Represents the matrix Pk -(O) The transition matrix, APk -(O) The calculation formula is:

[0229] APk -(O) =RO-[(1 / 4)×I×RO]; where - represents matrix subtraction, and I represents a 1 matrix (i.e., a matrix with 4 rows and 4 columns, where each row and column is 1);

[0230] Step S2544: Calculate matrix A (1) The pre-error covariance matrix of (1) - ; Matrix PK (1) - The calculation formula is:

[0231] PK (1) - =A (O-1) ×Pk -(O) ×(A (O-1) ) T +QA (1) ; Where × represents matrix multiplication, T represents matrix transpose, and + represents matrix addition;

[0232] Calculate the Kalman gain Krk of the battery in the first second during the charging process (1) , the calculation formula is:

[0233]

[0234] Step S255: Using matrix A (1) As the initial state, calculate the Kalman gain of the battery in the second second during the charging process, denoted as Krk (2) ;

[0235] Step S2551: Calculate matrix A (1) Becomes the matrix A (2)The state transfer matrix of (1-2) ; A (1-2) The calculation formula is:

[0236] Among them, × represents matrix multiplication, T represents the transpose of the matrix, and -1 represents the inverse of the matrix;

[0237] Step S2552: Obtain matrix A (1) The error evidence matrix RA (1) ;

[0238] Calculate the matrix A (2) The error proof is denoted by the matrix RA (2) ; Matrix RA (2) The mathematical formula is:

[0239] Among them, - represents matrix subtraction;

[0240] Calculated by matrix A (1) Becomes the matrix A (2) The error transition matrix is ​​denoted as matrix QA (2) ; Matrix QA (2) The mathematical formula is:

[0241] QA (2) =RA (2) -RA (1) ;

[0242] Step S2553: Calculate RA (1) The error covariance matrix of -(1) ; Matrix Pk -(1) The calculation formula is:

[0243] P -(1) =(1 / 4)×(APk -(1) T ×APk -(1) ), where × represents matrix multiplication, T represents the transpose of the matrix, and APk -(1) Represents the matrix Pk -(1) The transition matrix, matrix APk -(1) The calculation formula is:

[0244] APk -(1) =A (1) -[(1 / 4)×I×A (1) ]; where - represents matrix subtraction, and I represents a 1 matrix (i.e. a matrix with 4 rows and 4 columns, where each row and column is 1);

[0245] Step S2554: Calculate matrix A (2) The pre-error covariance matrix of(2) - ; Matrix PK (2) - The calculation formula is:

[0246] PK (1) - =A (1-2) ×Pk -(1) ×(A (1-2) ) T +QA (2) ; Where × represents matrix multiplication, T represents matrix transpose, and + represents matrix addition;

[0247] Calculate the Kalman gain Krk of the battery at the 2nd second during the charging process (2) , the calculation formula is:

[0248]

[0249] Step S256: Repeat calculation of Krk (1) ~Krk (2) The same steps as in step S254 to step S255 are used to calculate the Kalman gain corresponding to the 3rd to rtth seconds in the charging process, and Krk is obtained. (3) ~Krk (rt) ;

[0250] Step S26: record the open voltage as oU, record the open current as oI, and fit the discharge data;

[0251] Step S261: define calculation formula a3:

[0252] Among them, Yb (i) Indicates the remaining power percentage of the battery at the i-th second during the discharge process. The value range of i is: 1~rt; id j Indicates the actual charging current at the jth second during the charging process, and the value range of j is: 1~i;

[0253] The id 1 ~id dt Substitute into formula a3 and calculate the battery power percentage from the 1st to the ddt second during the charging process, and we get: Yb (1) , Yb (2) ~Yb (dt) ;

[0254] Among them, Yb (1) Indicates the battery power percentage at the first second during the discharge process; Yb (2) Indicates the remaining power percentage of the battery in the second second during the discharge process; and so on, Yb (dt) Indicates the remaining battery power percentage at dt seconds during the discharge process;

[0255] Step S262: define calculation formula a4:

[0256]

[0257] Among them, Pbd (i) Indicates the actual charging power percentage of the battery at the i-th second during the charging process, id i Indicates the actual charging current at the i-th second during the charging process, ud i Indicates the actual charging voltage at the i-th second during the charging process, and the value range of i is: 1~dt;

[0258] The id 1 ~id dt and 1 ~ud dt Substitute into formula a4 and calculate the actual charging power percentage of the battery from the 1st to the dtth second during the charging process, and we get: Pbd (1) 、Pbd (2) ~Pbd (dt) ;

[0259] Among them, Pbd (1) Indicates the actual charging power percentage of the battery in the first second during the charging process; Pbd (2) Indicates the actual charging power percentage of the battery in the second second during the charging process; and so on, Pbd (dt) Indicates the actual charging power percentage of the battery at the dt second during the charging process;

[0260] Step S263: Summarize the data in steps S261 to S262 to construct a battery charging change matrix, which is recorded as matrix B. The mathematical expression of matrix B is:

[0261]

[0262] Split matrix B in chronological order to obtain matrix B (1) , Matrix B (2) ~Matrix B (dt) ;

[0263] The first second is divided into matrix B (1) ; Matrix B (1) The mathematical expression is:

[0264]

[0265] The second second is divided into matrix B (2) ; Matrix B (2) The mathematical expression is:

[0266]

[0267] Similarly, the partition at the dtth second is matrix B (dt) ; Matrix B (dt) The mathematical expression is:

[0268]

[0269] Step S264: Taking matrix DO as the initial state, calculate the Kalman gain of the battery at the first second, denoted as Kdk (1) ; The mathematical expression of matrix DO is:

[0270] Step S2641: Calculate the matrix DO to become the matrix B (1) The state transfer matrix of (O-1) ; Matrix B (O-1) The calculation formula is:

[0271] Among them, × represents matrix multiplication, T represents the transpose of the matrix, and -1 represents the inverse of the matrix;

[0272] Step S2642: Calculate the error proof of the matrix DO, recorded as the matrix RDO; the mathematical calculation formula of the matrix RDO is:

[0273] Among them, - represents matrix subtraction;

[0274] Calculate the matrix B (1) The error proof is denoted by the matrix RB (1) ; Matrix RB (1) The mathematical formula is:

[0275]

[0276] The calculation changes from matrix DO to matrix B (1) The error transition matrix is ​​denoted as matrix QB (1) ; Matrix QB (1) The mathematical formula is:

[0277] QB (1) =RB (1) - RBO;

[0278] Step S2643: Calculate the error covariance matrix of the matrix DO, denoted as matrix Pd -(O) ; Matrix Pd -(O) The calculation formula is:

[0279] Pd -(O) =(1 / 4)×(APd -(O) T ×APd -(O)), where × represents matrix multiplication, T represents the transpose of the matrix, and APd -(O) Represents the matrix Pd -(O) The transition matrix, APd -(O) The calculation formula is:

[0280] APk -(O) =DO-[(1 / 4)×I×DO]; where - represents matrix subtraction, and I represents a 1 matrix (i.e., a matrix with 4 rows and 4 columns, where each row and column is 1);

[0281] Step S2644: Calculate matrix B (1) The pre-error covariance matrix is ​​denoted as PD (1) - ;PD (1) - The calculation formula is:

[0282] PD (1) - =B (O-1) ×PD -(O) ×(B (O-1) ) T +QB (1) ; Where × represents matrix multiplication, T represents matrix transpose, and + represents matrix addition;

[0283] Calculate the Kalman gain Kdk of the battery in the first second during the discharge process (1) , the calculation formula is:

[0284]

[0285] Step S265: Repeat calculation of Kdk (1) The same steps as in step S264 are used to calculate the Kalman gain corresponding to the 2nd to rtth seconds during the discharge process, and Kdk is obtained. (2) ~Kdk (dt) .

[0286] Step S3: Analyze the power amplifier status of charging and discharging of a single battery according to the Kalman gain of the battery during charging and the Kalman gain of the battery during discharging to obtain a primary battery report; sample all batteries to be tested as sample batteries; analyze the power amplifier status of multiple sample batteries, update the primary battery report, and obtain a battery report;

[0287] The specific steps of step S3 are as follows:

[0288] Step S31: analyzing the power amplifier state of the battery charging process according to the Kalman gain of the battery during the charging process;

[0289] Define the relationship b1-1: [Krk (i) -Krk(i-1) ]×[Krk (i-1) -Krk (i-2) ]>0;

[0290] Relation b1-2: [Krk (i) -Krk (i-1) ]×[Krk (i+1) -Krk (i) ]<0;

[0291] Relation b1-3: [Krk (i+1) -Krk (i) ]×[Krk (i+2) -Krk (i+1) ]>0;

[0292] Among them, Krk (i) represents the Kalman gain corresponding to the i-th second during the battery charging process; Krk (i+1) represents the Kalman gain corresponding to the (i+1)th second during the battery charging process; and so on, Krk (i-2) represents the Kalman gain corresponding to the (i-2)th second during the battery charging process; the value range of i is: 1~rt; rt represents the charging time of the (dead) battery;

[0293] The Kalman gain Krk in the battery charging process (1) ~Krk (rt) , substitute into the relational expressions b1-1 to b1-3, extract the Kalman gain that satisfies the relational expressions b1-1 to b1-3 at the same time, as the charging power-off; count the number of charging power-offs, recorded as dr;

[0294] Step S32: Extract the time corresponding to the first charging breakpoint, recorded as rrt (1) ;

[0295] Extract the time corresponding to the second charging breakpoint, recorded as rrt (2) ;

[0296] Similarly, extract the time corresponding to the drth charging breakpoint, recorded as rrt (dr) ;

[0297] Among them, rrt (1) ~rrt (dr) Satisfied with rt: rrt (1) <rrt (2) <~<rrt (dr) <rt;

[0298] From 1(second) to rrt (1) (seconds) is the first charging time period, analyzing the power amplifier status of the battery from the start of charging to the first charging breakpoint;

[0299] Step S321: Obtain the Kalman gain Krk corresponding to the first second in the battery charging process (1) ;

[0300] Get the rrt value during battery charging (1) The Kalman gain Krk corresponding to seconds (rrt(1)) ;

[0301] Judgment (rrt(1)) -rrt (1) ], determine the power amplification equation of the battery in the first charging time period;

[0302] Step S322: If [Krk (rrt(1)) -rrt (1) ]>0, indicating that the battery is in fast charging state;

[0303] Obtain the actual charging current, actual charging voltage, power percentage and actual charging power percentage of the battery in the first time period (i.e., in step S253, the first to the rrtth rows of matrix A (1) All parameters of the line);

[0304] With the percentage of power as the independent variable, the actual charging current, the actual charging voltage and the actual charging power percentage as the dependent variables, MATLAB software (MATLAB stands for Matrix Laboratory, which is an application software for solving mathematical problems such as matrix operations, numerical solutions, function optimization, and solving ordinary differential equations) is used to solve the relationship equation between the percentage of power in the fast charging state and the actual charging current, recorded as fQi 1 (Qb);

[0305] The relationship between the percentage of power and the actual charging voltage is expressed as fQu 1 (Qb);

[0306] The relationship between the percentage of power and the actual charging power percentage is expressed as fQP 1 (Qb);

[0307] Will fQi 1 (Qb), fQu 1 (Qb) and fQP 1 (Qb), as the power amplifier equation for the fast charging of the battery in the first charging time period;

[0308] Step S323: If [Krk (rrt(1)) -rrt (1) ]<0, indicating that the battery is in a slow charging state;

[0309] Repeatedly solve fQi1 (Qb), fQu 1 (Qb) and fQP 1 (Qb), the relationship between the percentage of battery power in the slow charging state and the actual charging current is calculated using MATLAB software, recorded as fQi 1 (Qb)`;

[0310] The relationship between the percentage of power and the actual charging voltage is expressed as fQu 1 (Qb)`;

[0311] The relationship between the percentage of power and the actual charging power percentage is expressed as fQP 1 (Qb)`;

[0312] Will fQi 1 (Qb)`, fQu 1 (Qb)` and fQP 1 (Qb)`, as the power amplifier equation for the battery to charge slowly during the first charging period;

[0313] Step S324: If [Krk (rrt(1)) -rrt (1) ]=0, indicating that the battery is in a stable power state;

[0314] Calculate the average value of the actual charging current of the battery in the first time period, recorded as air (1) ; The average value of the actual charging voltage, recorded as aur (1) ; The average value of the power percentage, denoted as aQb (1) ; The average value of the actual charging power percentage, denoted as aPbr (1) ;

[0315] The air (1) 、aur (1) ,aQb (1) and aPbr (1) , as the power amplifier equation (i.e., parameter equation) for the battery to maintain a stable charge during the first charging period;

[0316] It should be noted that, because the actual charging current, actual charging voltage, battery internal resistance, battery impedance and other physical quantities of the battery are constantly changing during charging, the "relationship between battery percentage and actual charging current", "relationship between battery percentage and actual charging voltage" and "relationship between battery percentage and actual charging power percentage" may be linear or non-linear, and it is difficult to give a stable mathematical function expression. Therefore, the present invention only makes a method statement here, without a specific or complete mathematical expression; similarly, the battery discharge process is also the same.

[0317] Step S33: rrt(1) (seconds) to rrt (2) (seconds) is the second charging time period; rrt (3) (seconds) to rrt (3) (seconds) is the third charging time period; and so on, rrt (dr-1) (seconds) to rrt (dr) (seconds) is the drth charging time period; (dr) (seconds) to rrt (rt) (seconds) is the (dr+1)th charging time period;

[0318] Repeat the same steps of analyzing the battery power amplifier state in the first charging time period (i.e., steps S321 to S324); analyze the battery power amplifier state in the second to (dr+1)th charging time periods during the charging process;

[0319] Step S34: Repeat the same steps of analyzing the power amplifier state during the battery charging process (i.e., steps S31 to S33) to analyze the power amplifier state during the battery discharging process;

[0320] Summarize the power amplifier status of the battery charging process and the power amplifier status of the battery discharging process as the primary battery report;

[0321] Step S35: Obtain the number of all batteries to be tested, recorded as tb; randomly sample all batteries to be tested as sample batteries; the number of sample batteries is recorded as bn; the relationship between bn and tb satisfies: bn≤(tb×15%);

[0322] Repeat the same steps of analyzing the power amplification state of a single battery (i.e., steps S2 and S31 to S34 in step S3) to obtain the power amplification state of the sample battery;

[0323] According to the power amplifier status of the sample battery, the average function in the numpy library and MATLAB software are used to perform weighted updates on the time period division in the primary battery report to obtain a battery report.

[0324] Step S4: Summarize the battery report and provide feedback; continuously update the battery data and the battery report.

[0325] The above formulas are all dimensionless and numerical calculations. The formula is a formula for the most recent real situation obtained by collecting a large amount of data and performing software simulation. The preset parameters in the formula are set by technical personnel in this field according to actual conditions. For example, if there are weight coefficients and proportional coefficients, their set sizes are to quantify each parameter to obtain a specific value, which is convenient for subsequent comparison. Regarding the size of the weight coefficient and the proportional coefficient, it is sufficient as long as it does not affect the proportional relationship between the parameter and the quantized value.

[0326] Finally, it should be noted that the above-described embodiments are only specific implementations of the present invention, which are used to illustrate the technical solutions of the present invention, rather than to limit them. The protection scope of the present invention is not limited thereto. Although the present invention is described in detail with reference to the above-described embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-described embodiments within the technical scope disclosed by the present invention, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.

Claims

1. A segmented power detection method based on a removable battery, characterized in that: The method comprises: Step S1: Obtain the capacity, charging power, charging voltage, charging current, discharging power and open voltage of the battery to be tested to obtain battery data; Step S2: charging the dead battery, and recording the current change, voltage change and charging time of the battery during the charging process to obtain charging data; Discharge the fully charged battery and record the current change, voltage change and discharge time of the battery during the discharge process to obtain discharge data; According to the battery data, the charging data and the discharging data are fitted using Kalman filtering to obtain the Kalman gain of the battery during the charging process and the Kalman gain of the battery during the discharging process; Step S3: Analyze the power amplifier status of charging and discharging of a single battery according to the Kalman gain of the battery during charging and the Kalman gain of the battery during discharging to obtain a primary battery report; sample all batteries to be tested as sample batteries; analyze the power amplifier status of multiple sample batteries, update the primary battery report, and obtain a battery report; Step S4: Summarize the battery report and provide feedback; continuously update the battery data and the battery report.

2. The segmented power detection method based on a detachable battery according to claim 1 is characterized in that: The specific steps of step S2 are as follows: Step S21: the capacity of the battery to be tested is recorded as rC, the charging power is recorded as rP, and the discharging power is recorded as dP; Step S22: Obtain the charging time of the battery, recorded as rt; Get the actual charging current of the battery during the charging time, recorded as: ir1, ir2~ir rt ; Get the actual charging voltage of the battery during the charging time, recorded as: ur1, ur2 ~ ur rt ; Among them, ir1 and ur1 represent the actual charging current and actual charging voltage corresponding to the first second respectively; ir2 and ur2 represent the actual charging current and actual charging voltage corresponding to the second second respectively; and so on. rt and rt They represent the actual charging current and actual charging voltage corresponding to the rt second respectively; Set ir1~ir rt and ur1~ur rt , as charging data; Step S23: Obtain the discharge time of the battery, recorded as dt; Get the actual discharge current of the battery during the discharge time, recorded as: id1, id2~id dt ; Get the actual discharge voltage of the battery during the discharge time, recorded as: ud1, ud2 ~ ud dt ; Among them, id1 and ud1 represent the actual discharge current and actual discharge voltage corresponding to the first second, respectively; id2 and ud2 represent the actual discharge current and actual discharge voltage corresponding to the second second, respectively; and so on. dt and dt , respectively represent the actual discharge current and actual discharge voltage corresponding to the dt second; Set id1~id dt and ud1~ud dt , as discharge data; Step S24: the charging voltage is recorded as iU, the charging current is recorded as iI, and the charging data is fitted; Step S25: record the open voltage as oU, record the open current as oI, and fit the discharge data; Step S26: Summarize the data in steps S21 to S25 and proceed to step S3.

3. The segmented power detection method based on a detachable battery according to claim 2 is characterized in that: The specific steps of step S24 are as follows: Step S241: define calculation formula a1: Among them, Qb (i) Indicates the battery power percentage at the i-th second during the charging process. The value range of i is: 1~rt; ir j Indicates the actual charging current at the jth second during the charging process, and the value range of j is: 1~i; Set ir1~ir rt Substituting into formula a1, calculate the battery power percentage from the 1st to the rtth second during the charging process, and get: Qb (1) , Qb (2) ~Qb (rt) ; Among them, Qb (1) Indicates the battery power percentage at the first second during the charging process; Qb (2) Indicates the battery power percentage at the 2nd second during the charging process; and so on, Qb (rt) Indicates the battery power percentage at the rt second during the charging process; Step S242: define calculation formula a2: Among them, Pbr (i) Indicates the actual charging power percentage of the battery at the i-th second during the charging process, ir i Indicates the actual charging current at the i-th second during the charging process, ur i Indicates the actual charging voltage at the i-th second during the charging process, and the value range of i is: 1~rt; Set ir1~ir rt and ur1~ur rt Substitute into formula a2 to calculate the actual charging power percentage of the battery from the 1st to the rtth second during the charging process, and we get: Pbr (1) , Pbr (2) ~Pbr (rt) ; Among them, Pbr (1) Indicates the actual charging power percentage of the battery in the first second during the charging process; Pbr (2) Indicates the actual charging power percentage of the battery in the second second during the charging process; and so on, Pbr (rt) Indicates the actual charging power percentage of the battery at the rt second during the charging process; Step S243: Summarize the data in steps S241 to S242 to construct a battery charging change matrix, which is recorded as matrix A. The mathematical expression of matrix A is: Split matrix A in chronological order to obtain matrix A (1) , Matrix A (2) ~Matrix A (rt) ; The first second is divided into matrix A (1) ; Matrix A (1) The mathematical expression is: The second second is split into matrix A (2) ; Matrix A (2) The mathematical expression is: Similarly, the partition of the rt second is matrix A (rt) ; Matrix A (rt) The mathematical expression is: Step S244: Taking matrix RO as the initial state, calculate the Kalman gain of the battery at the first second during the charging process, denoted as Krk (1) ; The mathematical expression of matrix RO is: Step S245: Using matrix A (1) As the initial state, calculate the Kalman gain of the battery in the second second during the charging process, denoted as Krk (2) ; Step S246: Repeat calculation of Krk (1) ~Krk (2) The same steps as above are used to calculate the Kalman gain corresponding to the 3rd to rtth seconds in the charging process, and Krk is obtained. (3) ~Krk (rt) .

4. The segmented power detection method based on a detachable battery according to claim 3 is characterized in that: The specific steps of step S244 are as follows: Step S2441: Calculate the matrix RO to become the matrix A (1) The state transfer matrix of (O-1) ; Matrix A (O-1) The calculation formula is: Among them, × represents matrix multiplication, T represents the transpose of the matrix, and -1 represents the inverse of the matrix; Step S2442: Calculate the error proof of the matrix RO, recorded as the matrix RRO; the mathematical calculation formula of the matrix RRO is: Among them, - represents matrix subtraction; Calculate the matrix A (1) The error proof is recorded as matrix RA (1) ; Matrix RA (1) The mathematical formula is: The calculation changes from matrix RO to matrix A (1) The error transition matrix is ​​denoted as matrix QA (1) ; Matrix QA (1) The mathematical formula is: QA (1) =RA (1) -RRO; Step S2443: Calculate the error covariance matrix of the matrix RO, denoted as matrix Pk -(O) ; Matrix Pk -(O) The calculation formula is: P -(O) =(1 / 4)×(APk -(O) T ×APk -(O) ), where × represents matrix multiplication, T represents the transpose of the matrix, and APk -(O) Represents the matrix Pk -(O) The transition matrix, APk -(O) The calculation formula is: APk -(O) =RO-[(1 / 4)×I×RO]; where - represents matrix subtraction and I represents the 1 matrix; Step S2444: Calculate matrix A (1) The pre-error covariance matrix of (1) - ; Matrix PK (1) - The calculation formula is: PK (1) - =A (O-1) ×Pk -(O) ×(A (O-1) ) T +QA (1) ; Where × represents matrix multiplication, T represents matrix transpose, and + represents matrix addition; Calculate the Kalman gain Krk of the battery in the first second during the charging process (1) , the calculation formula is:

5. The segmented power detection method based on a detachable battery according to claim 3 is characterized in that: The specific steps of step S245 are as follows: Step S2451: Calculate matrix A (1) becomes matrix A (2) The state transfer matrix of (1-2) ; A (1-2) The calculation formula is: Among them, × represents matrix multiplication, T represents the transpose of the matrix, and -1 represents the inverse of the matrix; Step S2452: Obtain matrix A (1) The error evidence matrix RA (1) ; Calculate the matrix A (2) The error proof is recorded as matrix RA (2) ; Matrix RA (2) The mathematical formula is: Among them, - represents matrix subtraction; Calculated by matrix A (1) becomes matrix A (2) The error transition matrix is ​​denoted as matrix QA (2) ; Matrix QA (2) The mathematical formula is: QA (2) RA (2) RA (1) 100. Step S2453: Calculate RA (1) The error covariance matrix of -(1) ; Matrix Pk -(1) The calculation formula is: P -(1) =(1 / 4)×(APk -(1) T ×APk -(1) ), where × represents matrix multiplication, T represents the transpose of the matrix, and APk -(1) Represents the matrix Pk -(1) The transition matrix, matrix APk -(1) The calculation formula is: APk -(1) =A (1) -[(1 / 4)×I×A (1) ]; where - represents matrix subtraction and I represents the 1 matrix; Step S2454: Calculate matrix A (2) The pre-error covariance matrix of (2) - ; Matrix PK (2) - The calculation formula is: PK (1) - =A (1-2) ×Pk -(1) ×(A (1-2) ) T +QA (2) ; Where × represents matrix multiplication, T represents matrix transpose, and + represents matrix addition; Calculate the Kalman gain Krk of the battery at the 2nd second during the charging process (2) , the calculation formula is:

6. The segmented power detection method based on a detachable battery according to claim 2 is characterized in that: The specific steps of step S25 are as follows: Step S251: define calculation formula a3: Among them, Yb (i) Indicates the remaining power percentage of the battery at the i-th second during the discharge process. The value range of i is: 1~rt; id j Indicates the actual charging current at the jth second during the charging process, and the value range of j is: 1~i; Set id1~id dt Substitute into formula a3 and calculate the battery power percentage from the 1st to the ddt second during the charging process, and we get: Yb (1) , Yb (2) ~Yb (dt) ; Among them, Yb (1) Indicates the battery power percentage at the first second during the discharge process; Yb (2) Indicates the remaining power percentage of the battery in the second second during the discharge process; and so on, Yb (dt) Indicates the remaining battery power percentage at dt seconds during the discharge process; Step S252: define calculation formula a4: Among them, Pbd (i) Indicates the actual charging power percentage of the battery at the i-th second during the charging process, id i Indicates the actual charging current at the i-th second during the charging process, ud i Indicates the actual charging voltage at the i-th second during the charging process, and the value range of i is: 1~dt; Set id1~id dt and ud1~ud dt Substitute into formula a4 and calculate the actual charging power percentage of the battery from the 1st to the dtth second during the charging process, and we get: Pbd (1) 、Pbd (2) ~Pbd (dt) ; Among them, Pbd (1) Indicates the actual charging power percentage of the battery in the first second during the charging process; Pbd (2) Indicates the actual charging power percentage of the battery in the second second during the charging process; and so on, Pbd (dt) Indicates the actual charging power percentage of the battery at the dt second during the charging process; Step S253: Summarize the data in steps S251 to S252 to construct a battery charging change matrix, which is recorded as matrix B. The mathematical expression of matrix B is: Split matrix B in chronological order to obtain matrix B (1) , Matrix B (2) ~Matrix B (dt) ; The first second is divided into matrix B (1) ; Matrix B (1) The mathematical expression is: The second second is divided into matrix B (2) ; Matrix B (2) The mathematical expression is: Similarly, the partition at the dtth second is matrix B (dt) ; Matrix B (dt) The mathematical expression is: Step S254: Taking matrix DO as the initial state, calculate the Kalman gain of the battery at the first second, denoted as Kdk (1) ; The mathematical expression of matrix DO is: Step S255: Repeat calculation of Kdk (1) The same steps as above are used to calculate the Kalman gain corresponding to the 2nd to rtth seconds during the discharge process, and Kdk is obtained. (2) ~Kdk (dt) .

7. The segmented power detection method based on a detachable battery according to claim 6 is characterized in that: The specific steps of step S254 are as follows: Step S2541: Calculate the matrix DO to become the matrix B (1) The state transfer matrix of (O-1) ; Matrix B (O-1) The calculation formula is: Among them, × represents matrix multiplication, T represents the transpose of the matrix, and -1 represents the inverse of the matrix; Step S2542: Calculate the error proof of the matrix DO, recorded as the matrix RBO; the mathematical calculation formula of the matrix RBO is: Among them, - represents matrix subtraction; Calculate the matrix B (1) The error proof is denoted by the matrix RB (1) ; Matrix RB (1) The mathematical formula is: The calculation changes from matrix DO to matrix B (1) The error transition matrix is ​​denoted as matrix QB (1) ; Matrix QB (1) The mathematical formula is: QB (1) =RB (1) -RBO; Step S2543: Calculate the error covariance matrix of the matrix DO, denoted as matrix Pd -(O) ; Matrix Pd -(O) The calculation formula is: Pd -(O) =(1 / 4)×(APd -(O) T ×APd -(O) ), where × represents matrix multiplication, T represents the transpose of the matrix, and APd -(O) Represents the matrix Pd -(O) The transition matrix, APd -(O) The calculation formula is: APk -(O) =DO-[(1 / 4)×I×DO]; where - represents matrix subtraction and I represents the 1 matrix; Step S2544: Calculate matrix B (1) The pre-error covariance matrix of (1) - ;PD (1) - The calculation formula is: PD (1) - =B (O-1) ×PD -(O) ×(B (O-1) ) T +QB (1) ; Where × represents matrix multiplication, T represents matrix transpose, and + represents matrix addition; Calculate the Kalman gain Kdk of the battery in the first second during the discharge process (1) , the calculation formula is:

8. The segmented power detection method based on a detachable battery according to claim 2 is characterized in that: The specific steps of step S3 are as follows: Step S31: analyzing the power amplifier state of the battery charging process according to the Kalman gain of the battery during the charging process; Define the relationship b1-1: [Krk (i) -Krk (i-1) ]×[Krk (i-1) -Krk (i-2) ]>0; Relation b1-2: [Krk (i) -Krk (i-1) ]×[Krk (i+1) -Krk (i) ]<0; Relation b1-3: [Krk (i+1) -Krk (i) ]×[Krk (i+2) -Krk (i+1) ]>0; Among them, Krk (i) represents the Kalman gain corresponding to the i-th second during the battery charging process; Krk (i+1) represents the Kalman gain corresponding to the (i+1)th second during the battery charging process; and so on, Krk (i-2) represents the Kalman gain corresponding to the (i-2)th second during the battery charging process; the value range of i is: 1~rt; rt represents the charging time of the battery; The Kalman gain Krk in the battery charging process (1) ~Krk (rt) , substitute into the relational expressions b1-1 to b1-3, extract the Kalman gain that satisfies the relational expressions b1-1 to b1-3 at the same time, as the charging power-off; count the number of charging power-offs, recorded as dr; Step S32: Extract the time corresponding to the first charging breakpoint, recorded as rrt (1) ; Extract the time corresponding to the second charging breakpoint, recorded as rrt (2) ; Similarly, extract the time corresponding to the drth charging breakpoint, recorded as rrt (dr) ; Among them, rrt (1) ~rrt (dr) Satisfied with rt: rrt (1) <rrt (2) <~<rrt (dr) <rt; From 1 to rrt (1) Seconds is the first charging time period, analyzing the power amplifier status of the battery from the start of charging to the first charging breakpoint; Step S33: rrt (1) torrt (2) seconds is the second charging time period; (3) torrt (3) seconds is the third charging time period; and so on, rrt (dr-1) torrt (dr) Seconds is the drth charging time period; rrt (dr) torrt (rt) Seconds is the (dr+1)th charging time period; Repeat the same steps of analyzing the battery power amplifier state in the first charging time period, and analyze the battery power amplifier state in the second to (dr+1)th charging time periods during the charging process; Step S34: Repeat the same steps of analyzing the power amplifier status during the battery charging process to analyze the power amplifier status during the battery discharging process; Summarize the power amplifier status of the battery charging process and the power amplifier status of the battery discharging process as the primary battery report; Step S35: Obtain the number of all batteries to be tested, recorded as tb; randomly sample all batteries to be tested as sample batteries; the number of sample batteries is recorded as bn; the relationship between bn and tb satisfies: bn≤(tb×15%); Repeat the same steps of analyzing the power amplification state of a single battery to obtain the power amplification state of the sample battery; According to the power amplifier status of the sample battery, the average function in the numpy library and MATLAB software are used to perform weighted updates on the time period division in the primary battery report to obtain a battery report.

9. The segmented power detection method based on a detachable battery according to claim 8, characterized in that: The specific steps of step S32 are as follows: Step S321: Obtain the Kalman gain Krk corresponding to the first second in the battery charging process (1) ; Get the rrt value during battery charging (1) The Kalman gain Krk corresponding to seconds (rrt(1)) ; Judgment (rrt(1)) -rrt (1) ], determine the power amplification equation of the battery in the first charging time period; Step S322: If [Krk (rrt(1)) -rrt (1) ]>0, indicating that the battery is in fast charging state; Obtain the actual charging current, actual charging voltage, power percentage and actual charging power percentage of the battery in the first time period; With the percentage of power as the independent variable, the actual charging current, the actual charging voltage and the actual charging power percentage as the dependent variables, the MATLAB software is used to solve the relationship equation between the percentage of power of the battery in the fast charging state and the actual charging current, recorded as fQi1(Qb); The relationship between the percentage of power and the actual charging voltage is expressed as fQu1(Qb); The relationship between the percentage of power and the percentage of actual charging power is expressed as fQP1(Qb); fQi1(Qb), fQu1(Qb) and fQP1(Qb) are used as the power amplifier equations for fast charging of the battery in the first charging time period; Step S323: If [Krk (rrt(1)) -rrt (1) ]<0, indicating that the battery is in a slow charging state; Repeat the process of solving fQi1(Qb), fQu1(Qb) and fQP1(Qb), and use MATLAB software to calculate the relationship between the battery power percentage in the slow charging state and the actual charging current, which is recorded as fQi1(Qb)`; The relationship between the percentage of power and the actual charging voltage is expressed as fQu1(Qb)`; The relationship between the percentage of power and the percentage of actual charging power is expressed as fQP1(Qb)`; Take fQi1(Qb)`, fQu1(Qb)` and fQP1(Qb)` as the power amplifier equations for slow charging of the battery in the first charging time period; Step S324: If [Krk (rrt(1)) -rrt (1) ]=0, indicating that the battery is in a stable power state; Calculate the average value of the actual charging current of the battery in the first time period, recorded as air (1) ; The average value of the actual charging voltage is recorded as aur (1) ; The average value of the percentage of electricity, denoted as aQb (1) ; The average value of the actual charging power percentage, denoted as aPbr (1) ; The air (1) 、aur (1) ,aQb (1) and aPbr (1) , as the power amplifier equation for the battery to maintain a stable charge during the first charging period.

Citation Information

Patent Citations

  • SOC (State of Charge) and SOH (State of Health) prediction method of electric vehicle-mounted lithium iron phosphate battery

    CN103020445A

  • Energy storage battery test method

    CN103630847A

  • Control system for lithium ion battery of electric car

    CN107037366A

  • Battery SOC estimation method based on HCKF

    CN111537903A

  • Lithium ion battery SOC estimation method based on time-varying feedback correction Kalman filtering

    CN115856632A