Segmented Battery Charge Detection Method Based on Removable Batteries
The charging and discharging data of the removable battery are fitted through Kalman filtering technology and a battery report is generated, solving the problems of complexity and low efficiency of existing power detection methods, achieving higher detection accuracy and simplicity of operation.
Patent Information
- Application Number
- CN202411612324.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-13
- Publication Date
- 2025-06-10
- Estimated Expiration
- 2044-11-13
AI Technical Summary
The existing detachable battery power detection method is complex, and cannot effectively cover the entire battery life cycle. It has high operation complexity, which affects detection efficiency.
A segmented power detection method based on Kalman filtering is used to obtain the charging and discharging data of the battery, perform data fitting, analyze the charging and discharging status of the battery, and generate a battery report.
It improves the accuracy and accuracy of power detection, simplifies the operation process, improves detection efficiency, and can more accurately reflect the actual capacity of the battery at each stage.
Smart Images

Figure CN119199562B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a segmented power detection method based on a detachable battery, and belongs to the field of battery analysis. Background Art
[0002] The existing power detection methods for detachable batteries have the following deficiencies:
[0003] Complex model: The battery modeling method needs to establish a complex data model to represent the relationship between battery voltage and power; the establishment process of this data model needs to consider various factors such as battery charging, discharging, and load power consumption, making the model establishment process very complex and cumbersome.
[0004] Algorithm design: The existing methods only involve the state changes during the battery charging process or the battery discharging process, and cannot cover the entire usage cycle of the battery; at the same time, in the analysis process of the actual power of the battery, the existing methods use static analysis methods, which cannot dynamically describe the power state of the battery during the charging and discharging processes of the battery and cannot reflect the actual working state of the battery.
[0005] Operation complexity: The existing methods require battery practitioners to manually set or adjust the operating parameters of the power detection device to achieve segmented power detection of the battery; this detection method will increase the operation complexity of battery practitioners and affect the detection efficiency. Summary of the Invention
[0006] Aiming at the deficiencies of the existing technology, the purpose of the present invention is to provide a segmented power detection method based on a detachable battery, aiming to solve the problem of low battery analysis efficiency.
[0007] To achieve the above purpose, the present invention is realized through the following technical solutions: The 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 detected to obtain battery data;
[0009] Step S2: Charge the battery without power and record the current change, voltage change, and charging duration during the charging process of the battery to obtain charging data;
[0010] Discharge the fully charged battery and record the current change, voltage change, and discharging duration during the discharging process of the battery to obtain discharging data;
[0011] According to the battery data, use the Kalman filter to fit the charging data and the discharging data to obtain the Kalman gain during the charging process of the battery and the Kalman gain during the discharging process of the battery;
[0012] Step S3: Analyze the power amplifier states of individual batteries during charging and discharging based on the Kalman gains during charging and discharging of the batteries, and obtain a primary battery report; sample all the batteries to be inspected as sample batteries; analyze the power amplifier states 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] Further, the specific steps of step S2 are as follows:
[0015] Step S21: Denote the capacity of the battery to be inspected as rC, the charging power as rP, and the discharging power as dP.
[0016] Step S22: Obtain the charging duration of the battery, denoted as rt.
[0017] Obtain the actual charging current of the battery during the charging duration, denoted as: ir 1 、ir 2 ~ir rt ;
[0018] Obtain the actual charging voltage of the battery during the charging duration, denoted as: ur 1 、ur 2 ~ur rt ;
[0019] Among them, ir 1 and ur 1 respectively represent the actual charging current and actual charging voltage corresponding to the 1st second; ir 2 and ur 2 respectively represent the actual charging current and actual charging voltage corresponding to the 2nd second; and so on, ir rt and ur rt respectively represent the actual charging current and actual charging voltage corresponding to the rt-th second.
[0020] Take ir 1 ~ir rt and ur 1 ~ur rt as charging data.
[0021] Step S23: Obtain the discharging duration of the battery, denoted as dt.
[0022] Obtain the actual discharging current of the battery during the discharging duration, denoted as: id 1 、id 2 ~id dt ;
[0023] Obtain the actual discharge voltage of the battery during the discharge duration, denoted as: ud 1 and ud 2 ~ud dt ;
[0024] Among them, id 1 and ud 1 respectively represent the actual discharge current and actual discharge voltage corresponding to the 1st second; id 2 and ud 2 respectively represent the actual discharge current and actual discharge voltage corresponding to the 2nd second; and so on, id dt and ud dt respectively represent the actual discharge current and actual discharge voltage corresponding to the dt-th second;
[0025] Take id 1 ~id dt and ud 1 ~ud dt as the discharge data;
[0026] Step S24: Denote the charging voltage as iU and the charging current as iI, and perform fitting on the charging data;
[0027] Step S25: Denote the open-circuit voltage as oU and the open-circuit current as oI, and perform fitting on the discharge data;
[0028] Step S26: Summarize the data in Steps S21 to S25 and enter Step S3.
[0029] Furthermore, the specific steps of Step S24 are as follows:
[0030] Step S241: Define the calculation formula a1:
[0031] Among them, Qb (i) represents the percentage of the battery's charge at the i-th second during the charging process, and the value range of i is: 1 to rt; ir j represents the actual charging current at the j-th second during the charging process, and the value range of j is: 1 to i;
[0032] Substitute ir 1 ~ir rt into the calculation formula a1 to calculate the percentage of the battery's charge from the 1st to the rt-th second during the charging process, and obtain: Qb (1) 、Qb (2) ~Qb (rt) ;
[0033] Among them, Qb (1) represents the percentage of the battery's charge at the 1st second during the charging process; Qb (2)Indicates the percentage of battery power at the 2nd second during charging; and so on, Qb (rt) Indicates the percentage of battery power at the rt-th second during charging;
[0034] Step S242: Define the calculation formula a2:
[0035]
[0036] Among them, Pbr (i) Indicates the actual charging power percentage of the battery at the i-th second during charging, ir i Indicates the actual charging current at the i-th second during charging, ur i Indicates the actual charging voltage at the i-th second during charging, and the value range of i is: 1 to rt;
[0037] Substitute ir 1 ~ir rt and ur 1 ~ur rt into the calculation formula a2, and calculate the actual charging power percentage of the battery from the 1st to the rt-th second during charging, to obtain: Pbr (1) 、Pbr (2) ~Pbr (rt) ;
[0038] Among them, Pbr (1) Indicates the actual charging power percentage of the battery at the 1st second during charging; Pbr (2) Indicates the actual charging power percentage of the battery at the 2nd second during charging; and so on, Pbr (rt) Indicates the actual charging power percentage of the battery at the rt-th second during charging;
[0039] Step S243: Summarize the data in steps S241 to S242, and construct a charging change matrix of the battery, denoted as matrix A; the mathematical expression of matrix A is:
[0040]
[0041] According to the time sequence, divide matrix A to obtain matrix A (1) 、matrix A (2) ~matrix A (rt) ;
[0042] The division of the 1st second is matrix A (1) ; The mathematical expression of matrix A (1) is:
[0043]
[0044] The division of the 2nd second is matrix A (2) ; Matrix A(2) The mathematical expression is:
[0045]
[0046] And so on, the segmentation at the r-th 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 1st second during the charging process, denoted as Krk (1) ; The mathematical expression of matrix RO is:
[0049] Step S245: Taking matrix A (1) as the initial state, calculate the Kalman gain of the battery at the 2nd second during the charging process, denoted as Krk (2) ;
[0050] Step S246: Repeatedly calculate the same steps of Krk (1) ~Krk (2) to calculate the corresponding Kalman gains at the 3rd to r-th seconds during the charging process, obtaining Krk (3) ~Krk (rt) .
[0051] Furthermore, the specific steps of the said step S244 are as follows:
[0052] Step S2441: Calculate the state transition matrix when matrix RO becomes matrix A (1) , denoted as matrix A (O-1) ; The calculation formula of matrix A (O-1) is:
[0053] where, × represents matrix multiplication, T represents the transpose of the matrix, and -1 represents the inverse of the matrix;
[0054] Step S2442: Calculate the error matrix of matrix RO, denoted as matrix RRO; The mathematical calculation formula of matrix RRO is:
[0055] where, - represents matrix subtraction;
[0056] Calculate the error matrix of matrix A (1) , denoted as matrix RA (1) ; The mathematical calculation formula of matrix RA (1) is:
[0057]
[0058] Calculate the error transition matrix from matrix RO to matrix A (1) , denoted as matrix QA (1) ; Matrix QA (1) The mathematical calculation formula is:
[0059] QA (1) = RA (1) - RRO;
[0060] Step S2443: Calculate the error covariance matrix of matrix RO, denoted as matrix Pk -(O) ; Matrix Pk -(O) The calculation formula is:
[0061] Pk -(O) =(1 / 4)×(APk -(O) T ×APk -(O) ); where, × represents matrix multiplication, T represents the transpose of the matrix, and APk -(O) represents the transition matrix of matrix Pk -(O) , and the calculation formula of APk -(O) is:
[0062] APk -(O) = RO - [(1 / 4)×I×RO]; where, - represents matrix subtraction, and I represents the identity matrix;
[0063] Step S2444: Calculate the pre-error covariance matrix of matrix A (1) , denoted as matrix PK (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 the transpose of the matrix, and + represents matrix addition;
[0065] Calculate the Kalman gain Krk at the 1st second of the battery during the charging process (1) , and the calculation formula is:
[0066]
[0067] Furthermore, the specific steps of step S245 are as follows:
[0068] Step S2451: Calculate matrix A (1) changing to 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 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 of
[0079] PK (1) - = A (1-2) × Pk -(1) × (A (1-2) ) T + QA (2) ; where, × represents matrix multiplication, T represents the transpose of the matrix, and + represents matrix addition;
[0080] Calculate the Kalman gain Krk of the battery at the 2nd second during the charging process (2) , and the calculation formula is:
[0081]
[0082] Furthermore, the specific steps of step S25 are as follows:
[0083] Step S251: Define the calculation formula a3:
[0084] Among them, Yb (i) represents the remaining power percentage of the battery at the ith second during the discharging process, and the value range of i is: 1 ~ rt; id j represents the actual charging current at the jth second during the charging process, and the value range of j is: 1 ~ i;
[0085] Substitute id 1 ~ id dt into the calculation formula a3, and calculate the power percentage of the battery from the 1st to the ddtth second during the charging process to obtain: Yb (1) 、Yb (2) ~ Yb (dt) ;
[0086] Among them, Yb (1) represents the power percentage of the battery at the 1st second during the discharging process; Yb (2) represents the remaining power percentage of the battery at the 2nd second during the discharging process; and so on, Yb (dt) represents the remaining power percentage of the battery at the dtth second during the discharging process;
[0087] Step S252: Define the calculation formula a4:
[0088]
[0089] Among them, Pbd (i) represents the actual charging power percentage of the battery at the ith second during the charging process, id iRepresents the actual charging current at the i-th second during the charging process, ud i Represents the actual charging voltage at the i-th second during the charging process, and the value range of i is: 1 to dt;
[0090] Substitute id 1 ~id dt and ud 1 ~ud dt into the calculation formula a4 to calculate the actual charging power percentage of the battery from the 1st to the dt-th second during the charging process, and obtain: Pbd (1) 、Pbd (2) ~Pbd (dt) ;
[0091] Among them, Pbd (1) represents the actual charging power percentage of the battery at the 1st second during the charging process; Pbd (2) represents the actual charging power percentage of the battery at the 2nd second during the charging process; and so on, Pbd (dt) represents the actual charging power percentage of the battery at the dt-th second during the charging process;
[0092] Step S253: Summarize the data in steps S251 to S252 to construct a charging change matrix of the battery, denoted as matrix B; the mathematical expression of matrix B is:
[0093]
[0094] Divide matrix B in chronological order to obtain matrix B (1) 、matrix B (2) ~matrix B (dt) ;
[0095] The division at the 1st second is matrix B (1) ; The mathematical expression of matrix B (1) is:
[0096]
[0097] The division at the 2nd second is matrix B (2) ; The mathematical expression of matrix B (2) is:
[0098]
[0099] And so on, the division at the dt-th second is matrix B (dt) ; The mathematical expression of matrix B (dt) is:
[0100]
[0101] Step S254: Taking matrix DO as the initial state, calculate the Kalman gain of the battery at the 1st second, denoted as Kdk (1) ; The mathematical expression of matrix DO is:
[0102] Step S255: Repeat the same steps of calculating Kdk (1) to calculate the Kalman gains corresponding to the 2nd to the rt-th second during the discharging process, and obtain Kdk (2) ~Kdk (dt) .
[0103] Furthermore, the specific steps of the said Step S254 are as follows:
[0104] Step S2541: Calculate the state transition matrix when matrix DO becomes matrix B (1) , denoted as matrix B (O-1) ; The calculation formula of matrix B (O-1) is:
[0105] where, × represents matrix multiplication, T represents the transpose of the matrix, and -1 represents the inverse of the matrix;
[0106] Step S2542: Calculate the error matrix of matrix DO, denoted as matrix RBO; The mathematical calculation formula of matrix RBO is:
[0107] where, - represents matrix subtraction;
[0108] Calculate the error matrix of matrix B (1) , denoted as matrix RB (1) ; The mathematical calculation formula of matrix RB (1) is:
[0109]
[0110] Calculate the error transition matrix when matrix DO becomes matrix B (1) , denoted as matrix QB (1) ; The mathematical calculation formula of matrix QB (1) is:
[0111] QB (1) =RB (1) -RBO;
[0112] Step S2543: Calculate the error covariance matrix of matrix DO, denoted as matrix Pd -(O) ; The calculation formula of matrix Pd -(O) is:
[0113] Pd -(O) =(1 / 4)×(APd -(O) T×APd -(O) );where, × represents matrix multiplication, T represents the transpose of a matrix, and APd -(O) represents the transition matrix of matrix Pd -(O) , and the calculation formula of APd -(O) is:
[0114] APk -(O) = DO - [(1 / 4) × I × DO]; where, - represents matrix subtraction, and I represents the identity matrix;
[0115] Step S2544: Calculate the prior error covariance matrix of matrix B (1) , denoted as PD (1) - ; The calculation formula of PD (1) - is:
[0116] PD (1) - = B (O-1) × PD -(O) × (B (O-1) ) T + QB (1) ; where, × represents matrix multiplication, T represents the transpose of a matrix, and + represents matrix addition;
[0117] Calculate the Kalman gain Kdk of the battery at the 1st second during the discharging process (1) , and the calculation formula is:
[0118]
[0119] Furthermore, the specific steps of step S3 are as follows:
[0120] Step S31: Analyze the power amplifier state of the battery charging process according to the Kalman gain during the battery charging process;
[0121] Define the relational expression b1-1: [Krk (i) - Krk (i-1) × [Krk (i-1) - Krk (i-2) > 0;
[0122] Relational expression b1-2: [Krk (i) - Krk (i-1) × [Krk (i+1) - Krk (i) < 0;
[0123] Relational expression 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 to rt; rt represents the charging duration of the battery;
[0125] Substitute the Kalman gains Krk (1) to Krk (rt) into the relational expressions b1-1 to b1-3, extract the Kalman gains that simultaneously satisfy the relational expressions b1-1 to b1-3 as the charging power-off; count the number of charging power-offs, denoted as dr;
[0126] Step S32: Extract the time corresponding to the first charging breakpoint, denoted as rrt (1) ;
[0127] Extract the time corresponding to the second charging breakpoint, denoted as rrt (2) ;
[0128] And so on, extract the time corresponding to the dr-th charging breakpoint, denoted as rrt (dr) ;
[0129] Among them, rrt (1) to rrt (dr) satisfy: rrt (1) < rrt (2) < ~ < rrt (dr) < rt;
[0130] Take 1 to rrt (1) seconds as the first charging time period, and analyze the power amplifier state of the battery from the start of charging to the first charging breakpoint;
[0131] Step S33: Take rrt (1) to rrt (2) seconds as the second charging time period; take rrt (3) to rrt (3) seconds as the third charging time period; and so on, take rrt (dr-1) to rrt (dr) seconds as the dr-th charging time period; take rrt (dr) to rrt (rt) seconds as the (dr + 1)-th charging time period;
[0132] Repeat the same steps for analyzing the battery power amplifier state during the first charging time period, and analyze the power amplifier state of the battery during the 2nd to (dr + 1)th charging time periods during the charging process;
[0133] Step S34: Repeat the same steps for analyzing the power amplifier state during the battery charging process, and analyze the power amplifier state during the battery discharging process;
[0134] Summarize the power amplifier state during the battery charging process and the power amplifier state during the battery discharging process as the primary battery report;
[0135] Step S35: Obtain the number of all batteries to be inspected, denoted as tb; randomly sample all the batteries to be inspected as the sample batteries; the number of the sample batteries is denoted as bn; the relationship between bn and tb satisfies: bn ≤ (tb × 15%);
[0136] Repeat the same steps for analyzing the power amplifier state of a single battery to obtain the power amplifier state of the sample batteries;
[0137] Based on the power amplifier state of the sample batteries, use the average function in the numpy library and MATLAB software to perform weighted update on the time period division in the primary battery report to obtain the battery report.
[0138] Further, the specific steps of the said Step S32 are as follows:
[0139] Step S321: Obtain the Kalman gain Krk corresponding to the 1st second during the battery charging process (1) ;
[0140] Obtain the Kalman gain Krk corresponding to the rrt (1) th second during the battery charging process (rrt(1)) ;
[0141] Judge the magnitude of [Krk (rrt(1)) - rrt (1) to determine the power amplifier equation of the battery during the first charging time period;
[0142] Step S322: If [Krk (rrt(1)) - rrt (1) > 0, it indicates that the battery is in the fast charging state;
[0143] Obtain the actual charging current, actual charging voltage, battery charge percentage, and actual charging power percentage of the battery during the first time period;
[0144] Taking the battery charge percentage as the independent variable and the actual charging current, actual charging voltage, and actual charging power percentage as the dependent variables, use MATLAB software to sequentially solve the relationship equation between the battery charge percentage - actual charging current in the fast charging state, denoted as fQi 1(Qb);
[0145] The relationship equation between the percentage of battery charge and the actual charging voltage, denoted as fQu 1 (Qb);
[0146] The relationship equation between the percentage of battery charge and the percentage of actual charging power, denoted as fQP 1 (Qb);
[0147] Take fQi 1 (Qb), fQu 1 (Qb) and fQP 1 (Qb) as the power amplifier equation for fast charging of the battery in the first charging time period;
[0148] Step S323: If [Krk (rrt(1)) -rrt (1) <0, it indicates that the battery is in the slow charging state;
[0149] Repeat the process of solving fQi 1 (Qb), fQu 1 (Qb) and fQP 1 (Qb), and use MATLAB software to calculate the relationship equation between the percentage of battery charge and the actual charging current in the slow charging state, denoted as fQi 1 (Qb)`;
[0150] The relationship equation between the percentage of battery charge and the actual charging voltage, denoted as fQu 1 (Qb)`;
[0151] The relationship equation between the percentage of battery charge and the percentage of actual charging power, denoted as fQP 1 (Qb)`;
[0152] Take fQi 1 (Qb)`, fQu 1 (Qb)` and fQP 1 (Qb)` as the power amplifier equation for slow charging of the battery in the first charging time period;
[0153] Step S324: If [Krk (rrt(1)) -rrt (1) =0, it indicates that the battery is in a stable charge state;
[0154] Calculate the average value of the actual charging current of the battery in the first time period, denoted as air (1) ; the average value of the actual charging voltage, denoted as aur (1) ; the average value of the percentage of battery charge, denoted as aQb (1) ; the average value of the percentage of actual charging power, denoted as aPbr (1);
[0155] Take air (1) , aur (1) , aQb (1) and aPbr (1) , as the power amplifier equation for the stable battery power during the first charging period.
[0156] Compared with the prior art, the beneficial effects of the present invention are:
[0157] High accuracy: The segmented battery detection of the present invention analyzes the charging and discharging processes 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 charge-discharge data model of the battery by obtaining the voltage and current changes during battery charging and discharging. This method can dynamically represent the battery power and the working state of the battery, effectively improving the measurement precision of the power.
[0159] Simple operation and high efficiency:
[0160] The present invention can set the device parameters for battery measurement according to the factory parameters of the battery, with simple operation and user-friendly for practitioners; at the same time, the present invention can monitor the complete charging and discharging process of the battery in real time, and can accurately simulate and quickly detect the power change of the battery at each moment, improving the speed of battery power measurement. BRIEF DESCRIPTION OF THE DRAWINGS
[0161] By reading the following detailed description of the non-limiting embodiments with reference to the accompanying drawings, other features, objects, and advantages of the present invention will become more apparent:
[0162] Figure 1 Schematic diagram of the method of the present invention;
[0163] Figure 2 Schematic diagram of the charging circuit of the present invention;
[0164] Figure 3 Schematic diagram of the discharging circuit of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0165] To make the above objects, features, and advantages of the present invention more obvious and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0166] Please refer to Figure 1 , the segmented power detection method based on a detachable battery includes:
[0167] It should be noted that the "battery" in the present invention all represents a "detachable battery";
[0168] Step S1: Obtain the capacity, (rated) charging power, charging voltage, charging current, (rated) discharging 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 for which the battery power is detected by applying the present invention (the segmented power detection method based on a detachable battery); the "open voltage" refers to the voltage across the positive and negative electrodes of the battery during the discharging process; the "open current" refers to the current generated by the battery during the discharging process
[0170] Step S2: Charge the dead battery (using a charging circuit) and record the current change, voltage change, and charging duration during the charging process of the battery to obtain charging data;
[0171] Discharge the fully charged battery (using a discharging circuit) and record the current change, voltage change, and discharging duration during the discharging process of the battery to obtain discharging data;
[0172] According to the battery data, use the Kalman filter to fit the charging data and the discharging data to obtain the Kalman gain during the charging process of the battery and the Kalman gain during the discharging process of the battery;
[0173] It should be noted that the "dead battery" and the "fully charged battery" in the present invention are the same battery, that is, first charge the battery and then discharge the battery;
[0174] The specific steps of Step S2 are as follows:
[0175] Step S21: Denote the capacity of the battery to be tested as rC, the (rated) charging power as rP, and the (rated) discharging power as dP;
[0176] Step S22: Please refer to Figure 2 , construct a charging circuit;
[0177] Disconnect the external power supply, then connect the dead battery in parallel with the protection resistor and connect it to the external power supply to form a charging circuit;
[0178] Connect a voltmeter V1 across the dead battery, connect an ammeter A1 in the branch of the dead battery, connect an ammeter A2 in the branch of the resistor R, and connect an ammeter A3 in 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, 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, \(i_1\) represent the current flowing through the battery, and \(i_2\) 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] Taking "the external power supply is connected" as the starting point of timing, take the time from "the external power supply is connected" to " \(i_1 = 0\), and \(i_2\) is equal to \(i\) for the first time" as the charging duration of the battery, and record the charging duration as \(rt\) (unit: second);
[0183] Read the reading of ammeter \(A1\) during the charging duration as the actual charging current of the battery, and record it as: \(i_r\) 1 、\(i_r\) 2 ~\(i_r\) rt ;
[0184] Read the reading of voltmeter \(V1\) during the charging duration as the actual charging voltage of the battery, and record it as: \(u_r\) 1 、\(u_r\) 2 ~\(u_r\) rt ;
[0185] Among them, \(i_r\) 1 and \(u_r\) 1 respectively represent the actual charging current and actual charging voltage corresponding to the 1st second; \(i_r\) 2 and \(u_r\) 2 respectively represent the actual charging current and actual charging voltage corresponding to the 2nd second; and so on, \(i_r\) rt and \(u_r\) rt respectively represent the actual charging current and actual charging voltage corresponding to the \(rt\)th second;
[0186] Take \(i_r\) 1 ~\(i_r\) rt and \(u_r\) 1 ~\(u_r\) rt , as the charging data;
[0187] Step S24: Please refer to Figure 3 , construct a discharging circuit;
[0188] Disconnect the switch, and then connect the fully charged battery in series with the switch and the tester \(M\) to form a discharging circuit;
[0189] Connect a voltmeter \(V2\) across the fully charged battery, and connect an ammeter \(A4\) in the main circuit of the discharging circuit;
[0190] Among them, the voltmeter \(V2\) is used to measure the voltage across the battery during discharging, and the ammeter \(A4\) is used to measure the current of the discharging 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 and discharge the fully charged battery;
[0193] Taking "closing the switch" as the starting point of timing, the period from "closing the switch" to "when i4 = 0 and U2 = 0" is regarded as the discharge duration of the battery, and the discharge duration is denoted as dt (unit: second);
[0194] Read the reading of ammeter A4 during the discharge duration as the actual discharge current of the battery, denoted as: id 1 、id 2 ~id dt ;
[0195] Read the reading of voltmeter V2 during the discharge duration as the actual discharge voltage of the battery, denoted as: ud 1 、ud 2 ~ud dt ;
[0196] Among them, id 1 and ud 1 respectively represent the actual discharge current and actual discharge voltage corresponding to the 1st second; id 2 and ud 2 respectively represent the actual discharge current and actual discharge voltage corresponding to the 2nd second; and so on, id dt and ud dt respectively represent the actual discharge current and actual discharge voltage corresponding to the dt-th second;
[0197] Take id 1 ~id dt and ud 1 ~ud dt as the discharge data;
[0198] It should be noted that the "detachable battery" in the present invention mainly serves mobile phones, so the test machine M in the discharge circuit refers to a mobile phone;
[0199] Step S25: Denote the charging voltage as iU and the charging current as iI, and perform fitting on the charging data;
[0200] Step S251: Define the calculation formula a1:
[0201] Among them, Qb (i) represents the percentage of the battery's power at the i-th second during the charging process, and the value range of i is: 1 to rt; ir j represents the actual charging current at the j-th second during the charging process, and the value range of j is: 1 to i;
[0202] Substitute ir 1 ~ir rt into the calculation formula a1, and calculate the percentage of the battery's power from the 1st to the rt-th second during the charging process, obtaining: Qb (1) 、Qb (2) ~Qb (rt) ;
[0203] Among them, Qb (1) represents the percentage of the battery's power at the 1st second during the charging process; Qb (2) represents the percentage of the battery's power at the 2nd second during the charging process; and so on, Qb (rt) represents the percentage of the battery's power at the rt-th second during the charging process;
[0204] Step S252: Define the calculation formula a2:
[0205]
[0206] Among them, Pbr (i) represents the actual charging power percentage of the battery at the i-th second during the charging process, ir i represents the actual charging current at the i-th second during the charging process, ur i represents the actual charging voltage at the i-th second during the charging process, and the value range of i is: 1~rt;
[0207] Substitute ir 1 ~ir rt and ur 1 ~ur rt into the calculation formula a2, and calculate the actual charging power percentage of the battery from the 1st to the rt-th second during the charging process, obtaining: Pbr (1) 、Pbr (2) ~Pbr (rt) ;
[0208] Among them, Pbr (1) represents the actual charging power percentage of the battery at the 1st second during the charging process; Pbr (2) represents the actual charging power percentage of the battery at the 2nd second during the charging process; and so on, Pbr (rt) represents the actual charging power percentage of the battery at the rt-th second during the charging process;
[0209] Step S253: Summarize the data in Steps S251~S252, and construct a charging change matrix of the battery, denoted as matrix A; the mathematical expression of matrix A is:
[0210]
[0211] Arrange matrix A in chronological order and divide it to obtain matrix A (1) 、matrix A(2) ~ matrix A (rt) ;
[0212] The segmentation at the 1st second is matrix A (1) ; matrix A (1) The mathematical expression of is:
[0213]
[0214] The segmentation at the 2nd second is matrix A (2) ; matrix A (2) The mathematical expression of is:
[0215]
[0216] And so on, the segmentation at the rth second is matrix A (rt) ; matrix A (rt) The mathematical expression of is:
[0217]
[0218] Step S254: Taking matrix RO as the initial state, calculate the Kalman gain of the battery at the 1st second during the charging process, denoted as Krk (1) ; The mathematical expression of matrix RO is:
[0219] Step S2541: Calculate the state transition matrix when matrix RO becomes matrix A (1) denoted as matrix A (O-1) ; matrix A (O-1) The calculation formula of is:
[0220] where, × represents matrix multiplication, T represents the transpose of the matrix, and -1 represents the inverse of the matrix;
[0221] Step S2542: Calculate the error matrix of matrix DO, denoted as matrix RBO; The mathematical calculation formula of matrix RBO is:
[0222] where, - represents matrix subtraction;
[0223] Calculate the error matrix of matrix A (1) denoted as matrix RA (1) ; matrix RA (1) The mathematical calculation formula of is:
[0224]
[0225] Calculate the error transition matrix when matrix RO becomes matrix A (1) denoted as matrix QA (1) ; matrix QA (1)The mathematical calculation formula is:
[0226] QA (1) = RA (1) - RRO;
[0227] Step S2543: Calculate the error covariance matrix of matrix RO, denoted as matrix Pk -(O) ; Matrix Pk -(O) The calculation formula is:
[0228] Pk -(O) = (1 / 4) × (APk -(O) T × APk -(O) ); where, × represents matrix multiplication, T represents the transpose of the matrix, and APk -(O) represents the transition matrix of matrix Pk -(O) , and the calculation formula of APk -(O) is:
[0229] APk -(O) = RO - [(1 / 4) × I × RO]; where, - represents matrix subtraction, and I represents the 1 matrix (i.e., a 4-row and 4-column matrix with 1 in each row and column);
[0230] Step S2544: Calculate the pre-error covariance matrix of matrix A (1) , denoted as matrix PK (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 the transpose of the matrix, and + represents matrix addition;
[0232] Calculate the Kalman gain Krk at the 1st second of the battery during the charging process (1) , and the calculation formula is:
[0233]
[0234] Step S255: With matrix A (1) as the initial state, calculate the Kalman gain at the 2nd second of the battery during the charging process, denoted as Krk (2) ;
[0235] Step S2551: Calculate the change from matrix A (1) to matrix A (2)The state transition matrix, denoted as matrix A (1-2) ; A (1-2) The calculation formula of
[0236] where, × 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 proof matrix RA of (1) ;
[0238] Calculate the error proof of matrix A (2) denoted as matrix RA (2) ; Matrix RA (2) The mathematical calculation formula of is:
[0239] where, - represents matrix subtraction;
[0240] Calculate the error transition matrix from matrix A (1) to matrix A (2) denoted as matrix QA (2) ; Matrix QA (2) The mathematical calculation formula of is:
[0241] QA (2) = RA (2) -RA (1) ;
[0242] Step S2553: Calculate the error covariance matrix of RA (1) denoted as matrix Pk -(1) ; Matrix Pk -(1) The calculation formula of is:
[0243] Pk -(1) =(1 / 4)×(APk -(1) T ×APk -(1) ); where, × represents matrix multiplication, T represents the transpose of the matrix, APk -(1) represents the transition matrix of matrix Pk -(1) , and the calculation formula of matrix APk -(1) is:
[0244] APk -(1) = A (1) -[(1 / 4)×I×A (1) ; where, - represents matrix subtraction, and I represents the 1 matrix (i.e., a 4-row and 4-column matrix with 1 in each row and column);
[0245] Step S2554: Calculate the pre-error covariance matrix of matrix A (2) denoted as matrix PK(2) - ; matrix PK (2) - The calculation formula of
[0246] PK (1) - = A (1-2) × Pk -(1) × (A (1-2) ) T + QA (2) ; where, × represents matrix multiplication, T represents the transpose of a matrix, and + represents matrix addition;
[0247] Calculate the Kalman gain Krk at the 2nd second during the charging process (2) , and the calculation formula is:
[0248]
[0249] Step S256: Repeatedly calculate Krk (1) ~ Krk (2) for the same steps (i.e., steps S254 to S255), calculate the Kalman gains corresponding to the 3rd to the rt-th second during the charging process, and obtain Krk (3) ~ Krk (rt) ;
[0250] Step S26: Denote the open-circuit voltage as oU and the open-circuit current as oI, and fit the discharge data;
[0251] Step S261: Define the calculation formula a3:
[0252] where, Yb (i) represents the percentage of the remaining battery power at the i-th second during the discharge process, and the value range of i is: 1 to rt; id j represents the actual charging current at the j-th second during the charging process, and the value range of j is: 1 to i;
[0253] Substitute id 1 ~ id dt into the calculation formula a3, calculate the percentage of the battery power from the 1st to the ddt-th second during the charging process, and obtain: Yb (1) 、 Yb (2) ~ Yb (dt) ;
[0254] where, Yb (1) represents the percentage of the battery power at the 1st second during the discharge process; Yb (2) represents the percentage of the remaining battery power at the 2nd second during the discharge process; and so on, Yb (dt) represents the percentage of the remaining battery power at the dt-th second during the discharge process;
[0255] Step S262: Define calculation formula a4:
[0256]
[0257] Wherein, Pbd (i) represents the actual charging power percentage of the battery at the i-th second during charging, id i represents the actual charging current at the i-th second during charging, ud i represents the actual charging voltage at the i-th second during charging, and the value range of i is: 1 to dt;
[0258] Substitute id 1 ~id dt and ud 1 ~ud dt into the calculation formula a4 to calculate the actual charging power percentage of the battery from the 1st to the dt-th second during charging, and obtain: Pbd (1) 、Pbd (2) ~Pbd (dt) ;
[0259] Wherein, Pbd (1) represents the actual charging power percentage of the battery at the 1st second during charging; Pbd (2) represents the actual charging power percentage of the battery at the 2nd second during charging; and so on, Pbd (dt) represents the actual charging power percentage of the battery at the dt-th second during charging;
[0260] Step S263: Aggregate the data in Steps S261 to S262 to construct a charging change matrix of the battery, denoted as matrix B; the mathematical expression of matrix B is:
[0261]
[0262] According to the time sequence, divide matrix B to obtain matrix B (1) 、matrix B (2) ~matrix B (dt) ;
[0263] The division of the 1st second is matrix B (1) ; The mathematical expression of matrix B (1) is:
[0264]
[0265] The division of the 2nd second is matrix B (2) ; The mathematical expression of matrix B (2) is:
[0266]
[0267] And so on, the segmentation at the dt-th second is matrix B (dt) ; Matrix B (dt) The mathematical expression of is:
[0268]
[0269] Step S264: Taking matrix DO as the initial state, calculate the Kalman gain of the battery at the 1st second, denoted as Kdk (1) ; The mathematical expression of matrix DO is:
[0270] Step S2641: Calculate the state transition matrix when matrix DO becomes matrix B (1) , denoted as matrix B (O-1) ; Matrix B (O-1) The calculation formula of is:
[0271] where, × represents matrix multiplication, T represents the transpose of the matrix, and -1 represents the inverse of the matrix;
[0272] Step S2642: Calculate the error matrix of matrix DO, denoted as matrix RDO; The mathematical calculation formula of matrix RDO is:
[0273] where, - represents matrix subtraction;
[0274] Calculate the error matrix of matrix B (1) , denoted as matrix RB (1) ; Matrix RB (1) The mathematical calculation formula of is:
[0275]
[0276] Calculate the error transition matrix when matrix DO becomes matrix B (1) , denoted as matrix QB (1) ; Matrix QB (1) The mathematical calculation formula of is:
[0277] QB (1) = RB (1) - RBO;
[0278] Step S2643: Calculate the error covariance matrix of matrix DO, denoted as matrix Pd -(O) ; Matrix Pd -(O) The calculation formula of is:
[0279] Pd -(O) =(1 / 4)×(APd -(O) T ×APd -(O)) where × represents matrix multiplication, T represents the transpose of a matrix, and APd -(O) represents the transition matrix of matrix Pd -(O) , and the calculation formula of APd -(O) is:
[0280] APk -(O) = DO - [(1 / 4) × I × DO]; where - represents matrix subtraction, and I represents the identity matrix (i.e., a 4×4 matrix with all elements equal to 1);
[0281] Step S2644: Calculate the prior error covariance matrix of matrix B (1) , denoted as PD (1) - ; and the calculation formula of PD (1) - is:
[0282] PD (1) - = B (O-1) × PD -(O) × (B (O-1) ) T + QB (1) ; where × represents matrix multiplication, T represents the transpose of a matrix, and + represents matrix addition;
[0283] Calculate the Kalman gain Kdk at the 1st second during the discharge process of the battery (1) , and its calculation formula is:
[0284]
[0285] Step S265: Repeat the same steps for calculating Kdk (1) (i.e., Step S264) to calculate the Kalman gains corresponding to the 2nd to the rt-th second during the discharge process, and obtain Kdk (2) ~ Kdk (dt) .
[0286] Step S3: Analyze the power amplifier states of individual batteries during charging and discharging based on the Kalman gains during the charging process and the Kalman gains during the discharging process of the batteries, and obtain a primary battery report; sample all the batteries to be inspected as sample batteries; analyze the power amplifier states of multiple sample batteries, and update the primary battery report to obtain a battery report;
[0287] The specific steps of Step S3 are as follows:
[0288] Step S31: Analyze the power amplifier state of the battery during the charging process based on the Kalman gain during the charging process of the battery;
[0289] Define the relational expression b1-1: [Krk (i) - Krk(i-1) [Krk (i-1) -Krk (i-2) >0;
[0290] Relationship b1-2: [Krk (i) -Krk (i-1) [Krk (i+1) -Krk (i) <0;
[0291] Relationship 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 to rt; rt represents the charging duration of the (dead) battery;
[0293] Substitute the Kalman gains Krk (1) ~Krk (rt) during the battery charging process into relationships b1-1 to b1-3, and extract the Kalman gains that simultaneously satisfy relationships b1-1 to b1-3 as the charging power-off points; count the number of charging power-off points and record it as dr;
[0294] Step S32: Extract the time corresponding to the first charging breakpoint and record it as rrt (1) ;
[0295] Extract the time corresponding to the second charging breakpoint and record it as rrt (2) ;
[0296] And so on, extract the time corresponding to the dr-th charging breakpoint and record it as rrt (dr) ;
[0297] Among them, rrt (1) ~rrt (dr) and rt satisfy: rrt (1) <rrt (2) <~<rrt (dr) <rt;
[0298] Take 1 (second) to rrt (1) (second) as the first charging time period, and analyze the power amplifier state of the battery from the start of charging to the first charging breakpoint;
[0299] Step S321: Obtain the Kalman gain Krk corresponding to the 1st second during the battery charging process (1) ;
[0300] Obtain the Kalman gain Krk corresponding to the rrt (1) th second during the battery charging process (rrt(1)) ;
[0301] Judge the magnitude of [Krk (rrt(1)) - rrt (1) , and determine the power amplifier equation of the battery within the 1st charging time period;
[0302] Step S322: If [Krk (rrt(1)) - rrt (1) > 0, it indicates that the battery is in the fast charging state;
[0303] Obtain the actual charging current, actual charging voltage, battery charge percentage, and actual charging power percentage of the battery within the 1st time period (i.e., all parameters in the 1st row to the rrt (1) th row of matrix A in step S253);
[0304] Taking the battery charge percentage as the independent variable and the actual charging current, actual charging voltage, and actual charging power percentage as the dependent variables, use MATLAB software (MATLAB is short for Matrix Laboratory, an application software for matrix operations, numerical solutions, function optimization, solving ordinary differential equations, etc.) to sequentially solve the relationship equations of battery charge percentage - actual charging current, denoted as fQi 1 (Qb);
[0305] The relationship equation of battery charge percentage - actual charging voltage, denoted as fQu 1 (Qb);
[0306] The relationship equation of battery charge percentage - actual charging power percentage, denoted as fQP 1 (Qb);
[0307] Take fQi 1 (Qb), fQu 1 (Qb), and fQP 1 (Qb) as the power amplifier equations for fast charging of the battery within the 1st charging time period;
[0308] Step S323: If [Krk (rrt(1)) - rrt (1) < 0, it indicates that the battery is in the slow charging state;
[0309] Repeat the solution of fQi1 (Qb), fQu 1 (Qb) and fQP 1 During the process of (Qb), use MATLAB software to calculate the relationship equation between the percentage of battery charge and the actual charging current in the slow charging state, denoted as fQi 1 (Qb)`;
[0310] The relationship equation between the percentage of battery charge and the actual charging voltage, denoted as fQu 1 (Qb)`;
[0311] The relationship equation between the percentage of battery charge and the percentage of actual charging power, denoted as fQP 1 (Qb)`;
[0312] Take fQi 1 (Qb)`, fQu 1 (Qb)` and fQP 1 (Qb)` as the power amplifier equation for slow charging of the battery in the first charging time period;
[0313] Step S324: If [Krk (rrt(1)) -rrt (1) = 0, it indicates that the battery is in a stable charge state;
[0314] Calculate the average value of the actual charging current of the battery in the first time period, denoted as air (1) ; The average value of the actual charging voltage, denoted as aur (1) ; The average value of the percentage of battery charge, denoted as aQb (1) ; The average value of the percentage of actual charging power, denoted as aPbr (1) ;
[0315] Take air (1) 、aur (1) 、aQb (1) and aPbr (1) as the power amplifier equation (i.e., parametric equation) for the stable charge of the battery in the first charging time period;
[0316] It should be noted that since physical quantities such as the actual charging current, actual charging voltage, battery internal resistance, and battery impedance of the battery are constantly changing during charging, the "relationship between the percentage of battery charge and the actual charging current", "relationship between the percentage of battery charge and the actual charging voltage", and "relationship between the percentage of battery charge and the percentage of actual charging power" may be linear or non-linear relationships, and it is difficult to give a certain stable mathematical function expression. Therefore, in this invention, only the method is described here without a specific or complete mathematical expression; similarly, the same is true for the battery discharge process.
[0317] Step S33: Using rrt(1) (seconds) to rrt (2) (seconds) is the second charging time period; with rrt (3) (seconds) to rrt (3) (seconds) is the third charging time period; and so on, with rrt (dr-1) (seconds) to rrt (dr) (seconds) is the dr-th charging time period; with rrt (dr) (seconds) to rrt (rt) (seconds) is the (dr + 1)-th charging time period;
[0318] Repeat the same steps for analyzing the battery power amplifier state in the first charging time period (i.e., steps S321 to S324); analyze the power amplifier state of the battery during the 2nd to (dr + 1)-th charging time periods during the charging process of the battery;
[0319] Step S34: Repeat the same steps for analyzing the power amplifier state during the battery charging process (i.e., steps S31 to S33), and analyze the power amplifier state during the battery discharging process;
[0320] Summarize the power amplifier state during the battery charging process and the power amplifier state during the battery discharging process as the primary battery report;
[0321] Step S35: Obtain the number of all batteries to be inspected, denoted as tb; randomly sample all the batteries to be inspected as sample batteries; the number of sample batteries is denoted as bn; the relationship between bn and tb satisfies: bn ≤ (tb × 15%);
[0322] Repeat the same steps for analyzing the power amplifier state of a single battery (i.e., steps S2 and steps S31 to S34 in step S3), and obtain the power amplifier state of the sample batteries;
[0323] According to the power amplifier state of the sample batteries, use the average function in the numpy library and MATLAB software to perform weighted update on the time period division in the primary battery report to obtain the battery report.
[0324] Step S4: Summarize and feedback the battery report; continuously update the battery data and update the battery report.
[0325] The above formulas are all dimensionless and take their numerical values for calculation. The formulas are obtained by collecting a large amount of data and performing software simulation to obtain a formula closest to the actual situation. The preset parameters in the formulas are set by those skilled in the art according to the actual situation. For example, if there are weight coefficients and proportionality coefficients, the sizes of their settings are for quantifying each parameter to obtain a specific numerical value for subsequent comparison. Regarding the sizes of the weight coefficients and proportionality coefficients, as long as they do not affect the proportional relationship between the parameters and the quantified numerical values.
[0326] Finally, it should be noted that the above-described embodiments are only specific embodiments of the present invention, used to illustrate the technical solutions of the present invention, rather than limiting it. The protection scope of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that any technician familiar with the technical field of the present invention can still modify the technical solutions recorded in the foregoing embodiments, or can easily think of changes, or perform equivalent replacements on some of the technical features; 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 all be covered within the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims described.
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 update the battery report; 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) Indicates 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 relation b1-1 to relation b1-3, extract the Kalman gain that satisfies the relation b1-1 to relation b1-3 at the same time as the charging breakpoint; count the number of charging breakpoints, 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; (2) 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.
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 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) ; 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 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) ; 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 rtth 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: ; Where × represents matrix multiplication, T represents the transpose of the matrix, and -1 represents the inverse of the matrix; Step S2442: Calculate the error matrix of the matrix RO, recorded as the matrix RRO; the mathematical calculation formula of the matrix RRO is: ; Where - represents matrix subtraction; Calculate the matrix A (1) The error matrix is denoted by 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) ; Among them, × 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 the matrix A (2) The state transfer matrix of (1-2) ; A (1-2) The calculation formula is: ; Where × 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 matrix RA (1) ; Calculate the matrix A (2) The error matrix is denoted by matrix RA (2) ; Matrix RA (2) The mathematical formula is: ; Where - represents matrix subtraction; 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: 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) ; Among them, × 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: ; Where × represents matrix multiplication, T represents the transpose of the matrix, and -1 represents the inverse of the matrix; Step S2542: Calculate the error matrix of the matrix DO, recorded as matrix RBO; the mathematical calculation formula of the matrix RBO is: ; Where - represents matrix subtraction; Calculate the matrix B (1) The error matrix is denoted by 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 is denoted as PD (1) - ;PD (1) - The calculation formula is: PD (1) - =B (O-1) ×PD -(O) ×(B (O-1) ) T +QB (1) ; Among them, × 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 1 is 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)) -Krk (1) ], determine the power amplification equation of the battery in the first charging time period; Step S322: If [Krk (rrt(1)) -Krk (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)) -Krk (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)) -Krk (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, 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
Energy storage battery test method
CN103630847A
Battery SOC estimation method and system based on steady-state Kalman filter
CN116973770A