Oil field underground lithium battery charging state estimation method

By applying the second-order RC equivalent circuit model and dual adaptive attenuation Kalman filtering algorithm underground in the oil field, the accuracy and computing resource problems of lithium battery SOC estimation are solved, and the accurate and real-time estimation of lithium battery SOC in the oil field underground in the oil field is achieved.

CN120178074APending Publication Date: 2025-06-20山东大东联石油设备有限公司 +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510411603.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-02
Publication Date
2025-06-20

AI Technical Summary

Technical Problem

The prior art is difficult to accurately estimate the charging status of underground lithium batteries in oil fields, especially when there are few samples and limited computing resources, resulting in the inaccurate indication of the working time and reliability of downhole working equipment.

Method used

The second-order RC equivalent circuit model is used to combine the dual adaptive attenuation Kalman filtering algorithm to achieve accurate estimation of lithium battery SOC by establishing a mathematical model and real-time update of parameters.

Benefits of technology

This method can reflect the charging and discharge state of lithium batteries in real time underground in the oil field, overcome the problems of few samples and limited computing resources, and improve the accuracy and robustness of SOC estimation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120178074A_ABST
    Figure CN120178074A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of oil field underground lithium batteries, in particular to an oil field underground lithium battery charging state estimation method. Comprising the following steps: 1, constructing hardware mechanical structures of an underground and ground electric energy transmitting end and a receiving end, and then constructing an oil field underground wireless charging circuit; 2, establishing a second-order RC equivalent circuit model by a battery model construction module; 3, testing the electric power performance of the underground lithium battery with 100% SOC (State of Charge); 4, estimating the SOC of the underground lithium battery by using a dual-adaptive attenuation Kalman filtering algorithm; 5, the single-chip microcomputer EKF system detects whether the SOC state value of the battery reaches 80% or not; and 6, the single-chip microcomputer calculates the current SOC state value under the well and uploads the SOC state value to a control PC terminal on the well. Polarization characteristics of an oil field underground working battery can be considered in all directions, multiple advantages in capacitive and resistive directions are achieved, the current charging and discharging state can be reflected in real time, and the problem that an existing underground battery electric quantity aging test is not accurate can be solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of downhole lithium batteries in oil fields, and particularly relates to a method for estimating the charging state of downhole lithium batteries in oil fields. Background Art

[0002] At present, rechargeable batteries have been applied in various corners of life, such as wearable devices (earphones, watches), and portable life (floor cleaning robots). Due to the strong self-endurance, low probability of active discharge, long recyclable service life, and high output working voltage of lithium batteries, they have become the first choice for power batteries in various scenarios. At present, many downhole projects in oil exploitation require cable-free operation to get rid of the previous bondage of cable power supply. And the state of charge (SOC) of lithium batteries is one of the most important parameter in the downhole battery management system. The accurate state cannot be directly obtained by measuring current and voltage parameters. The accurate estimation of the SOC of lithium batteries can directly determine the working time and reliability of downhole working equipment such as downhole water distributors.

[0003] Due to the influence of the accuracy of the internal battery model and the values of various parameters, after multiple charge and discharge cycles, the state of charge of the power battery does not completely match the corresponding value of the previously preset measurement method, and there may be a situation where the working requirements cannot be met, which often causes inaccurate indication of the sustainable working time of the downhole working module during downhole operations, and may further lead to the suspension of the downhole working module. At present, many companies use neural network big data algorithms for mathematical simulation, which can improve the accuracy of the state of charge of the test battery pack within a certain range, but cannot fundamentally solve the problem of large errors. At the same time, the requirements for the processor during the neural network calculation process are relatively high, and the data calculation is very complex, so it cannot be applied to the downhole site of oil exploitation operations.

[0004] At present, most of the SOC calculation methods for lithium batteries mainly adopt: neural network method, ampere-hour integration, open circuit voltage of the circuit, Kalman filter and derivative filtering algorithms, etc. Among them, the neural network method requires a large amount of data for fitting, cannot be applied to small samples, is difficult to adjust hyperparameters, needs to ensure black-box nature, and often has bias problems. The ampere-hour integration method requires ensuring the stability of the currently collected voltage, current, and resistance, and long-term simulation will lead to distortion problems. The traditional Kalman Filter algorithm is applied to power batteries. At the beginning of use, it can achieve accurate estimation of the battery. However, during the application of the battery, calendar decay and cycle decay problems will inevitably occur. Along with the increase in the number of underground operations, the power release will not always be in a regular state. After the battery is charged and discharged for a long time and other operations that do not conform to the health of the battery, the accuracy of using this algorithm will drop sharply. Therefore, there is an urgent need to develop an algorithm with few samples and low requirements for computer computing resources, and at the same time, it can meet the requirements of oilfield downhole working batteries. Summary of the Invention

[0005] The purpose of the present invention is to provide a method for estimating the charging state of lithium batteries in oilfield downholes in view of the above-mentioned defects existing in the prior art. The present invention can consider the polarization characteristics of downhole working batteries in all aspects, has multiple advantages in the capacitive and resistive directions, can reflect the current charge and discharge state in real time, and can overcome problems such as inaccurate aging tests of downhole battery power before.

[0006] A method for estimating the charging state of lithium batteries in oilfield downholes mentioned in the present invention, its technical solution includes the following steps: Step 1, build the hardware mechanical structure of the power transmission and reception ends underground and on the ground. Then, build the wireless charging circuit in the oilfield downhole, equip the voltage acquisition module, and input the voltage acquisition data into the STM32 single-chip microcomputer. Among them, the transmission end includes a transmission-end single-chip microcomputer and a transmission-end coil, and the reception end includes a reception-end coil, a reception-end single-chip microcomputer, and a reception-end battery; Step 2, the battery model construction module. By establishing a second-order RC equivalent circuit model, a definite mathematical relationship is obtained. Through theoretical calculation and simulation experiments, a second-order lithium battery mathematical model is established. Its second-order RC equivalent circuit model is: (1), In formula (1), U oc is the open circuit voltage of the power supply, R0 is the internal ohmic resistance of the lithium battery, R1 and R2 are the polarization resistances inside the battery, C1 and C2 are the polarization capacitances inside the battery, U1 and U2 are the external voltage values of the capacitors, I is the current, U L is the terminal voltage of the battery, η is the ratio of the discharge capacity to the charge capacity of the lithium battery, and SOC is the charge state of the battery; Step 3: Conduct power performance tests on downhole lithium batteries with 100% SOC. Obtain the test voltage data values through dynamic characteristic tests, identify the values of R1, R2, C1, and C2 through parameter identification, and use the fitting toolbox to obtain the true data values of the voltage-time curve to obtain the values of R1, R2, C1, and C2; Step 4: Use the dual adaptive fading Kalman filter algorithm to estimate the SOC of downhole lithium batteries; Step 5: The single-chip microcomputer EKF system detects whether the battery SOC state value reaches 80%. If it does not reach 80%, control the system frequency at 50KHz to keep the system charging mode in constant current charging. When it reaches 80%, the single-chip microcomputer system controls the working frequency at 80KHz to keep the charging system in constant voltage charging mode to ensure the battery health; Step 6: The single-chip microcomputer calculates the current SOC state value downhole, uploads it to the onshore control PC, and judges whether the battery charging state meets the maximum value. If it meets the maximum value, stop the wireless power switch and stop supplying power to the battery.

[0007] Preferably, in Step 2, use Equation (1) ampere-hour integration method to calculate the SOC value: (2), In Equation (2), t0 is the initial discharge test time, and t is the current (or cut-off) test moment, Q N is the rated capacity of the battery; discretize Equation (1).

[0008] Preferably, in Step 4, in order to estimate the accurate value of SOC, add a dual adaptive forgetting factor to the extended Kalman filter algorithm and use the dual adaptive fading Kalman filter algorithm to estimate the SOC of downhole lithium batteries; The application of the extended Kalman filter algorithm is: (5), Discretize Equation (5) and substitute the identified parameters at the same time to obtain the battery discrete model as: (6), In Equation (6): A is the state transition matrix, B is the control matrix, x k is the current state, u k is the input, C k and D k is the relationship matrix, v k are both white noise vectors with a mean of 0 and no correlation; ω kis the system noise, and its covariance matrix is Q k ; v k is the observation noise, and its covariance matrix is R k ; is the error of the state variable in the state equation; e k+1 is the residual, and P k+1 is the covariance of the current system state variable error; is the covariance of the system residual.

[0009] Preferably, the theoretical derivation process of the dual adaptive attenuation extended Kalman filter algorithm is as follows: (1) The single-chip microcomputer takes the continuously obtained voltage and current as the system input, controls the system state covariance of the extended Kalman filter, and makes it the smallest. Under the condition that the selected research structure is stable, let the state vector at time k be x k , and the optimal estimate of the research system state at time k is which can make P k the smallest, and the calculation formula is: (7); (2) The single-chip microcomputer internally controls the system to adaptively adjust the observation noise and measurement noise. When the battery system structure model is determined in the single-chip microcomputer EKF control system, the residual at time k is determined as y k , and the optimal estimate of the residual at time k is obtained by solving as , which can make the smallest, and the calculation formula is: (8); (3) The system adaptive attenuation factor, adding the attenuation factor α , can quickly improve the robustness and accuracy value of the filter. After the system model is determined, the residual sequence output by the Kalman filter is a group of uncorrelated Gaussian white noise. Therefore, all residual sequences at different times maintain the orthogonal property, that is: (9); Through the above calculation steps, the theory of the dual adaptive attenuation extended Kalman filter algorithm has been derived.

[0010] Preferably, the specific implementation process of the dual adaptive attenuation extended Kalman filter algorithm is as follows: (1) The initial conditions are: (10); (2) The system calculates the state variable forward: (11); (3) System forward prediction error covariance: (12); (4) Extended Kalman filter gain update: (13); (5) System state estimation measurement size update: (14); (6) Error covariance measurement update: (15); (7) System measurement noise and observation noise update: (16); In Equation (16), L Q and L R are the adjustment window sizes of the process noise and the measurement noise respectively; (8) Adaptive decay factor update: (17); (18); The dual adaptive decay Kalman filter algorithm can complete accurate SOC estimation through the above calculation steps.

[0011] Preferably, introducing an adaptive decay factor to continuously update and correct the covariance matrix Q and the matrix R in real time can better improve the accuracy of the estimation. The specific process includes: calculating the error value of the lithium battery terminal voltage at different K moments, and at the same time calculating the approximate value of the terminal voltage error covariance at the K moment, and determining and updating the current noise coefficient through this value.

[0012] Compared with the prior art, the beneficial effects of the present invention are as follows: First, the present invention proposes a second-order RC equivalent circuit model for lithium batteries, uses an adaptive algorithm to optimize the decay factor in the least squares method; takes the collected lithium battery terminal voltage error value as the final optimization target, and within the preset range, the decay factor can optimize the decay factor in real time according to different data collection conditions, effectively solving the problem of reduced parameter identifiability caused by inaccurate data selection; Second, in the parameter identification process of the present invention, the update of the adaptive attenuation factor is applied to continuously perform real-time update and correction on the covariance matrix Q and the matrix R, enabling the Kalman filter to output an autocorrelation-free Gaussian white noise sequence when outputting the residual sequence, thereby improving the accuracy and robustness of the filter; Third, the present invention is applied to the downhole wireless charging system in oil fields, which can take into account the battery polarization characteristics in all directions, has multiple advantages in the capacitive and resistive directions, can reflect the current charge and discharge state in real time, and can overcome problems such as inaccurate aging tests of downhole battery power before. Brief Description of the Drawings

[0013] Figure 1 It is a schematic diagram of the overall operation process of the present invention; Figure 2 It is a curve graph of the charging and discharging voltage in the dynamic stress test environment of Beijing buses; Figure 3 It is a curve graph of the charging and discharging current in the dynamic stress test environment of Beijing buses; Figure 4 It is a curve graph of the SOC estimation result in the dynamic stress test environment of Beijing buses; Figure 5 It is a curve graph of the SOC estimation error in the dynamic stress test environment of Beijing buses; Figure 6 It is a curve graph of the charging and discharging voltage in the hybrid pulsating dynamic characteristic environment; Figure 7 It is a curve graph of the charging and discharging current in the hybrid pulsating dynamic characteristic environment; Figure 8 It is a curve graph of the SOC estimation result in the hybrid pulsating dynamic characteristic environment; Figure 9 It is a curve graph of the SOC estimation error in the hybrid pulsating dynamic characteristic environment; Figure 10 It is a schematic diagram of the downhole wireless power charging structure; Figure 11 It is a schematic diagram of the equivalent circuit of the predicted battery; In the above figure: the transmitting end single-chip microcomputer 1, the transmitting end coil 2, the receiving end coil 3, the receiving end single-chip microcomputer 4, the receiving end battery 5. Detailed Embodiment

[0014] The following is a description of the preferred embodiments of the present invention with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present invention and are not used to limit the present invention.

[0015] Embodiment 1, a method for estimating the charging state of a lithium battery in an oil field downhole, includes the following steps: Step 1: Build the hardware mechanical structures of the power transmitter and receiver between the underground and the ground. Then, build the wireless charging circuit for the oilfield underground, equip it with a voltage acquisition module, and input the voltage acquisition data into the STM32 single-chip microcomputer. Among them, the transmitter includes a transmitter single-chip microcomputer 1 and a transmitter coil 2, and the receiver includes a receiver coil 3, a receiver single-chip microcomputer 4, and a receiver battery 5; Step 2: The battery model construction module, by establishing a second-order RC equivalent circuit model, referring to Figure 11 , obtains a definite mathematical relationship, and establishes a second-order lithium battery mathematical model through theoretical calculations and simulation experiments. Its second-order RC equivalent circuit model is: (1), In formula (1), U oc is the open-circuit voltage of the power supply, R0 is the internal ohmic resistance of the lithium battery, R1 and R2 are the polarization resistances inside the battery, C1 and C2 are the polarization capacitances inside the battery, U1 and U2 are the external voltage values of the capacitors, I is the current, U L is the terminal voltage of the battery, η is the ratio of the discharge capacity to the charge capacity of the lithium battery, and SOC is the state of charge of the battery; Apply the (1) ampere-hour integration method to calculate the SOC value: (2), In formula (2), t0 is the initial discharge test time, t is the current (or cut-off) test moment, Q N is the rated capacity of the battery; discretize formula (1); Step 3: Conduct power performance tests on the underground lithium battery with 100% SOC. Obtain the test voltage data values through dynamic characteristic tests, and identify the values of R1, R2, C1, and C2 through parameter identification. The specific process is as shown in Figure 2 and Figure 3 and Figure 5 and Figure 6 . Apply the fitting toolbox to obtain the true data values of the voltage-time curve, and the values of R1, R2, C1, and C2 can be obtained; Step 4: Apply the dual adaptive fading Kalman filter algorithm to estimate the SOC of the underground lithium battery: Regarding the problem that the Kalman filter algorithm cannot accurately estimate the SOC size, converges too slowly and has large errors when estimating the SOC of the lithium battery. In order to predict the accurate value of the SOC, add a dual adaptive forgetting factor to the extended Kalman filter algorithm, and use the dual adaptive fading Kalman filter algorithm to estimate the SOC of the underground lithium battery; Currently, many Kalman filter algorithms and their extended algorithms have been applied to the field of lithium battery SOC estimation. The application of the extended Kalman filter algorithm is: (5), By discretizing equation (5) and introducing the identification parameters, the battery discrete model can be obtained as follows: (6), In formula (6): A is the state transfer matrix, B is the control matrix, x k is the current state, u k For input, C k and D k is the relationship matrix, v k They are all white noise vectors with a mean of 0 and are uncorrelated; ω k is the system noise, and its covariance matrix is Q k ; v k is the observation noise, and its covariance matrix is R k ; is the state quantity error in the state equation; e k+1 is the residual, P k+1 is the covariance of the current system state quantity error; is the covariance of the system residual; Step 5: The MCU EKF system detects whether the battery SOC value reaches 80%. If it does not reach 80%, the system frequency is controlled to 50KHz to keep the system charging mode at constant current charging. When it reaches 80%, the MCU system controls the operating frequency to 80KHz to keep the charging system in constant voltage charging mode to ensure battery health. Step 6: The microcontroller calculates the current SOC status value underground and uploads it to the well control PC to determine whether the battery charging status meets the maximum value. If it meets the maximum value, the wireless power switch is stopped and the battery is stopped from being powered.

[0016] Preferably, the theoretical derivation process of the dual adaptive attenuated extended Kalman filter algorithm is as follows: (1) The microcontroller uses the continuously obtained voltage and current as the system input to control the system state covariance of the extended Kalman filter to make it minimum. When the selected research structure is stable, let the state vector at time k be x k , the optimal estimate of the system state at time k is Can make P k Minimum, the calculation formula is: (7); (2) The control system inside the single-chip microcomputer adaptively adjusts the observation noise and measurement noise. When the battery system structure model is determined in the single-chip microcomputer EKF control system, the residual at time k is determined as y k , and the optimal estimate of the residual at time k is obtained by solving, so that can be minimized. The calculation formula is: (8); (3) System adaptive attenuation factor. Adding the attenuation factor α can quickly improve the robustness and accuracy of the filter. After the system model is determined, the residual sequence output by the Kalman filter is a set of uncorrelated Gaussian white noise. Therefore, all residual sequences at different times must maintain the orthogonality property, that is: (9); Through the above calculation steps, the theory of the dual adaptive attenuation extended Kalman filter algorithm has been derived.

[0017] Preferably, the specific implementation process of the dual adaptive attenuation extended Kalman filter algorithm is as follows: (1) The initial conditions are: (10); (2) The system projects the state variable forward: (11); (3) The system projects the error covariance forward: (12); (4) Update the extended Kalman filter gain: (13); (5) Update the system state estimation measurement size: (14); (6) Update the error covariance measurement: (15); (7) Update the system measurement noise and observation noise: (16); In equation (16), L Q and L R are the adjustment window sizes of the process noise and measurement noise respectively; (8) Update the adaptive attenuation factor: (17); (18); Through the above calculation steps, the dual adaptive fading Kalman filter algorithm can complete accurate SOC estimation.

[0018] Through the above steps, it can effectively handle the uncertainty of the initial value of the covariance matrix when predicting SOC during the charge and discharge of downhole lithium batteries; at the same time, by introducing an adaptive fading factor to continuously update the covariance matrix Q and matrix R in real time, it can better improve the accuracy of estimation; the present invention can adjust the Kalman filter parameters and covariance matrix in real time according to the data status and current data conditions of the downhole charge and discharge detection system, and can better adapt to the battery state changes caused by factors such as aging.

[0019] According to the requirements of the downhole battery, the battery is tested for SOC at varying temperatures, and the SOC prediction diagram of the dual adaptive fading Kalman filter algorithm is obtained. Its prediction results are very close to the true values, as shown in Figure 4 and Figure 8 shown. At the same time, based on this algorithm, the errors of SOC and ampere-hour integration method (Ah), extended Kalman filter (EKF), and unscented Kalman filter (UKF) are calculated and graphed, as shown in Figure 5 and Figure 9 shown, it can be intuitively seen that the dual adaptive fading Kalman filter algorithm has a good convergence speed, and at the same time the error is always controlled below 0.012, which has good application value in the prediction of downhole lithium battery SOC.

[0020] Embodiment 2, a method for estimating the charging state of a downhole lithium battery in an oilfield mentioned in the present invention includes the following steps: I. Battery model construction module, by establishing a second-order RC equivalent circuit model, a definite mathematical relationship is obtained; II. Parameter identification module, by transforming the mathematical model of the circuit to obtain a transfer function, and at the same time converting the transfer function into a difference equation, and using the least squares method with an adaptive fading factor to deduce each parameter inside the second-order RC equivalent circuit model; III. Adaptive fading factor optimization module, placed in the derivation process, using an adaptive algorithm to optimize the fading factor; IV. Charge and discharge state charge estimation module, applying the previously obtained parameter values and substituting them into the dual adaptive fading Kalman filter algorithm to estimate the charge state SOC of the lithium battery; V. Apply the STM32 single-chip microcomputer to write the above-mentioned steps and parameters into the internal memory of the single-chip microcomputer in the form of a program. Continuously obtain the voltage and current values on both sides of the lithium battery working in the oilfield wellbore, calculate the current SOC state in digital form, and send it to the PC side. Determine whether the charging state of the lithium battery meets the maximum value. If it meets the maximum value, stop power supply.

[0021] Preferably, in Step 1, according to the battery category status, its second-order RC equivalent circuit model is: (1), In the above formula, U oc is the open-circuit voltage of the power supply, R0 is the internal ohmic resistance of the lithium battery, R1 and R2 are the polarization resistances inside the battery, C1 and C2 are the polarization capacitors inside the battery, U L is the terminal voltage of the battery, I is the current, U1 and U2 are the external voltage values of the capacitors, η is the ratio of the discharge capacity to the charge capacity of the lithium battery, SOC is the battery charge state, and SOC is calculated by the ampere-hour integration method, that is: (3), In the above formula, Q N is the rated capacity of the battery.

[0022] Preferably, in Step 2, the specific process of deriving each parameter inside the second-order RC equivalent circuit model by the least squares method with an adaptive attenuation factor includes: In order to better identify the second-order Thevenin model, an attenuation factor λ is added on the basis of the recursive least squares method, which can improve the convergence speed and tracking performance; by using the recursive least squares algorithm with an adaptive attenuation factor to identify the battery parameter model, its parameter identification recursive formula is: (4), In the above formula: e(k) is the predicted error of y(k); λ(k) is the attenuation factor; K(k) is the gain value; P(k) is the covariance matrix; In implementation, the voltage and current values obtained at each moment are continuously input into the conversion formula, and the iteration is started to correct K(k) and P(k) continuously, and stable gain values K(k) and covariance matrix P(k) are obtained for parameter identification.

[0023] Preferably, in Step 3, the specific implementation process includes taking the error between the collected current and voltage as the minimum optimization parameter target, continuously obtaining the predicted error, obtaining the attenuation factor, and substituting it into the above formula to estimate the parameters to obtain R0, R1, R2, C1, and C2.

[0024] Preferably, in step four, the specific operation of estimating the state of charge of the lithium battery using the dual adaptive fading Kalman filter algorithm is as follows: input the initial parameters, construct and obtain the covariance matrix, and calculate the weights matching the sampled data through analysis; perform time update to calculate the predicted values of the equations and each state variable in the error covariance matrix; continuously obtain data and substitute it into the model to obtain the initial predicted value and the covariance matrix; substitute the predicted value to obtain the posterior estimate and perform correction.

[0025] Preferably, introducing an adaptive fading factor to continuously update and correct the covariance matrix Q and matrix R in real time can better improve the accuracy of estimation. The specific process includes: calculating the error value of the terminal voltage of the lithium battery at different K moments, and at the same time calculating the approximate value of the covariance of the terminal voltage error at the K moment, and determining and updating the current noise coefficient through this value.

[0026] The present invention is applied to the underground wireless charging system, which can consider the battery polarization characteristics in all directions, has multiple advantages in the capacitive and resistive directions, can reflect the current charge and discharge state in real time, and can overcome problems such as inaccurate aging tests of underground battery power before.

[0027] The above are only some preferred embodiments of the present invention. Any person skilled in the art may modify the above-described technical solutions or modify them into equivalent technical solutions. Therefore, the corresponding simple modifications or equivalent transformations made according to the technical solutions of the present invention all fall within the scope of protection required by the present invention.

Claims

1. A method for estimating the charging state of a lithium battery in an oil field, characterized in that The following steps are involved: Step 1, constructing the hardware mechanical structure of the underground and ground power transmitting and receiving ends, and then constructing the oil field underground wireless charging circuit, equipping the voltage acquisition module, and inputting the voltage acquisition data into the STM32 single-chip microcomputer, wherein the transmitting end includes a transmitting single-chip microcomputer (1) and a transmitting coil (2), and the receiving end includes a receiving coil (3), a receiving single-chip microcomputer (4) and a receiving battery (5); Step 2, the battery model construction module, by establishing a second-order RC equivalent circuit model, obtains a certain mathematical relationship, and establishes a second-order lithium battery mathematical model through theoretical calculation and simulation experiments. Its second-order RC equivalent circuit model is: (1), In formula (1), U oc is the open circuit voltage of the power supply, R0 is the internal ohmic resistance of the lithium battery, R1 and R2 are the polarization resistances inside the battery, C1 and C2 are the polarization capacitances inside the battery, U1 and U2 are the external voltage values ​​of the capacitors, I is the current, and U L is the terminal voltage of the battery, η is the ratio of the discharge capacity to the charge capacity of the lithium battery, and SOC is the battery charge state; Step 3: Conduct a power performance test on the underground lithium battery with 100% SOC, obtain the test voltage data value through the power characteristic test, perform parameter identification on it to obtain the values ​​of R1, R2, C1, and C2, apply the fitting toolbox to the voltage and time curve to obtain the real value of the data, and obtain the values ​​of R1, R2, C1, and C2; Step 4: Apply the dual adaptive decay Kalman filter algorithm to estimate the SOC of the underground lithium battery; Step 5: The MCU EKF system detects whether the battery SOC value reaches 80%. If it does not reach 80%, the system frequency is controlled to 50KHz to keep the system charging mode at constant current charging. When it reaches 80%, the MCU system controls the operating frequency to 80KHz to keep the charging system in constant voltage charging mode to ensure battery health. Step 6: The microcontroller calculates the current SOC status value underground and uploads it to the well control PC to determine whether the battery charging status meets the maximum value. If it meets the maximum value, the wireless power switch is stopped and the battery is stopped from being powered.

2. The method for estimating the state of charge of a lithium battery in an oil field according to claim 1, wherein: In step 2, the SOC value is calculated using the ampere-hour integration method of formula (1): (2), In formula (2), t0 is the initial discharge test time, t is the current (or cut-off) test time, Q N is the rated capacity of the battery; Discretize equation (1).

3. The method for estimating the state of charge of a lithium battery in an oil field according to claim 2, wherein: In step 4, in order to estimate the accurate value of SOC, a dual adaptive forgetting factor is added to the extended Kalman filter algorithm, and a dual adaptive decay Kalman filter algorithm is used to estimate the SOC of the underground lithium battery; The extended Kalman filter algorithm is applied as follows: (5), By discretizing equation (5) and introducing the identification parameters, the battery discrete model is obtained as follows: (6), In formula (6): A is the state transfer matrix, B is the control matrix, x k is the current state, u k For input, C k and D k is the relationship matrix, v k They are all white noise vectors with a mean of 0 and are uncorrelated; ω k is the system noise, and its covariance matrix is Q k ; v k is the observation noise, and its covariance matrix is R k ; is the state quantity error in the state equation; e k+1 is the residual, P k+1 is the covariance of the current system state quantity error; is the covariance of the system residuals.

4. The method for estimating the state of charge of a lithium battery in an oil field underground according to claim 3, characterized in that: The theoretical derivation process of the dual adaptive attenuated extended Kalman filter algorithm is as follows: (1) The microcontroller uses the continuously obtained voltage and current as the system input to control the system state covariance of the extended Kalman filter to make it minimum. When the selected research structure is stable, let the state vector at time k be x k , the optimal estimate of the system state at time k is Can make P k Minimum, the calculation formula is: (7); (2) The control system in the single-chip microcomputer adaptively adjusts the observation noise and measurement noise. Under the condition that the battery system structure model is determined, the single-chip microcomputer EKF control system determines the residual at time k as y k , by solving the optimal estimate of the residual at time k: , which can make Minimum, the calculation formula is: (8); (3) System adaptive attenuation factor, adding attenuation factor α , which can quickly improve the robustness and accuracy of the filter. After determining the system model, the residual sequence output by the Kalman filter is a set of non-autocorrelated Gaussian white noise, so all residual sequences at different times maintain orthogonal characteristics, that is: (9); Through the above calculation steps, the dual adaptive attenuated extended Kalman filter algorithm theory has been derived.

5. The method for estimating the state of charge of a lithium battery in an oil field according to claim 4, characterized in that: The specific implementation process of the dual adaptive attenuated extended Kalman filter algorithm is as follows: (1) The initial conditions are: (10); (2) The system calculates state variables forward: (11); (3) System forward extrapolation error covariance: (12); (4) Extended Kalman filter gain update: (13); (5) System state estimation measurement size update: (14); (6) Error covariance measurement update: (15); (7) System measurement noise and observation noise update: (16); In formula (16), L Q and L R are the adjustment window sizes for process noise and measurement noise, respectively; (8) Adaptive attenuation factor update: (17); (18); The dual adaptive decay Kalman filter algorithm can complete accurate SOC estimation through the above calculation steps.

6. The method for estimating the state of charge of a lithium battery in an oil field according to claim 5, characterized in that: Introducing an adaptive attenuation factor to continuously update and correct the covariance matrix Q and the matrix R in real time can better improve the accuracy of the estimation. The specific process includes: calculating the error value of the lithium battery terminal voltage at different moments K, and calculating the approximate value of the terminal voltage error covariance at moment K, and using this value to determine and update the current noise coefficient.