Off-grid inverter battery optimization method and system based on adaptive algorithm
By updating the off-grid inverter battery model parameters in real time through an adaptive algorithm and combining multiple state estimation methods, the charging and discharging current is optimized, which solves the problem of battery state assessment error accumulation and improves battery safety and lifespan.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GUANGDONG YUEJINGRUN TECH CO LTD
- Filing Date
- 2026-03-30
- Publication Date
- 2026-04-28
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In existing technologies, the charging and discharging optimization of off-grid inverter batteries relies on fixed battery model parameters, which cannot track battery aging and temperature changes, leading to the accumulation of state assessment errors and affecting battery life and system safety.
An adaptive algorithm-based approach is adopted to identify the physical parameters of the battery model online using the recursive least squares method, obtain the state of charge by combining the ampere-hour integral method and the open-circuit voltage method, and optimize the charge and discharge current correction coefficients using extended Kalman filtering and fuzzy logic algorithms to achieve real-time updating and optimization of the battery state.
It improves the accuracy of battery status assessment, prevents excessive charging and discharging current, extends battery life, and enhances system safety.
Smart Images

Figure CN121939604A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of battery optimization management technology, and in particular to an off-grid inverter battery optimization method and system based on an adaptive algorithm. Background Technology
[0002] An off-grid inverter is a stand-alone power system device, mainly used for off-grid power supply in residential and commercial settings. Its core function is to convert the DC power from the battery into AC power. It is suitable for areas without grid access or for emergency power demand scenarios. In an off-grid system, the battery is the only energy buffer and support unit, so the optimized management of the battery is particularly important. Among them, the optimization of battery charging and discharging is an extremely important part of battery optimization management. Most existing technologies rely on fixed battery model parameters (such as internal resistance) to evaluate the battery health status. However, the parameters will change with factors such as battery aging and temperature. Fixed models cannot track this drift, resulting in the accumulation of state evaluation errors, which in turn leads to excessive charging and discharging current, seriously damaging battery life and system safety. Summary of the Invention
[0003] To address the technical problems existing in the prior art, this invention provides an off-grid inverter battery optimization method based on an adaptive algorithm, comprising the following steps: S1. The physical parameters of the battery model are identified and updated online based on the recursive least squares method. The physical parameters of the battery model include ohmic internal resistance, polarization resistance and polarization capacitance. S2. Based on the physical parameters of the current battery model, the first state of charge (SOC1) and the second state of charge (SOC2) of the current battery are obtained by the ampere-hour integration method and the open-circuit voltage method, respectively. The first state of charge (SOC1) and the second state of charge (SOC2) are fused to obtain the comprehensive state of charge (SOC3). S3. Evaluate the current battery's first health state result SOH1 based on the battery's current actual capacity, evaluate the current second health state result SOH2 based on the current ohmic internal resistance, and perform a weighted fusion of the first health state result SOH1 and the second health state result SOH2 to obtain the current battery's comprehensive health state result SOH3. S4. Based on the current state of charge (SOC3) and state of health (SOH3) results, optimize the charging current correction coefficient Kc and the discharging current correction coefficient Kf using a fuzzy logic algorithm. S5. Based on the optimized charging current correction coefficient Kc and discharging current correction coefficient Kf, evaluate the optimal maximum charging current and maximum discharging current at the current moment.
[0004] Furthermore, the online identification and updating of the battery model's physical parameters based on the recursive least squares method specifically involves: S11. Synchronously sample battery data, including terminal voltage U, load current I, and battery temperature Tc; S12. Using a first-order RC equivalent circuit model as the basic model, and discretizing the first-order RC equivalent circuit model, the discrete difference equation form of the terminal voltage is derived: ; Where k represents the current time, k-1 represents the previous time, and a1, a2, a3 and a4 are all discrete model coefficients to be identified; S13, Constructing Data Vectors : ; Constructing the coefficient vector of the discrete model : T denotes matrix transpose; S14. Perform recursive calculations in the following order: Calculate the gain vector ; Calculate voltage estimation error ; Update the discrete model coefficient vector ; Update covariance matrix ; in, To pre-set the forgetting factor, It is the identity matrix with the same dimension as P.
[0005] Furthermore, the method of obtaining the first state of charge result SOC1 through ampere-hour integration is specifically as follows: Based on the current ohmic internal resistance R0 and battery temperature Tc, the current coulombic efficiency CE of the battery is obtained from the first preset lookup table. The first preset lookup table is established after the battery has been experimentally tested based on multiple sets of different ohmic internal resistances and battery temperatures to obtain the corresponding coulombic efficiencies. Based on the current coulomb efficiency CE, the first state of charge (SOC1) of the current battery is obtained using the ampere-hour integration method: ; Where Cn is the rated capacity of the battery. This is the preset sampling period.
[0006] Furthermore, the method of obtaining the second state of charge result SOC2 using the open-circuit voltage method specifically involves: Estimate the open-circuit voltage at the current moment: OCV is the open-circuit voltage; The second state of charge (SOC2) of the current battery is obtained from the second preset lookup table based on the current open-circuit voltage and battery temperature. The second preset lookup table is established after experimental testing of the battery based on multiple sets of different open-circuit voltages and battery temperatures to obtain the corresponding state of charge results.
[0007] Furthermore, the process of fusing the first state of charge result SOC1 and the second state of charge result SOC2 to obtain the comprehensive state of charge result SOC3 involves using the first state of charge result SOC1 as the predicted value and the second state of charge result SOC2 as the observed value, and then using the extended Kalman filter algorithm to fuse them to obtain the comprehensive state of charge result SOC3.
[0008] Furthermore, the method of evaluating the current battery's first state of health (SOH1) based on the battery's current actual capacity specifically involves: when the battery has undergone a complete charge-discharge cycle, integrating the discharge current and time using the ampere-hour integration method to obtain the total amount of electricity released by the battery from a fully charged state to a discharged state, which is taken as the battery's current actual capacity. The ratio of the current actual capacity to the battery's rated capacity is then calculated to obtain the current battery's first state of health (SOH1). The assessment of the current second health state result SOH2 based on the current ohmic internal resistance specifically involves calculating the ratio of the current ohmic internal resistance to the initial internal resistance reference value to obtain the current second health state result SOH2. The initial internal resistance reference value is the ohmic internal resistance measured at standard temperature when the battery leaves the factory.
[0009] Furthermore, based on the current comprehensive state of charge (SOC3) and comprehensive health status (SOH3), the charging current correction coefficient Kc and the discharging current correction coefficient Kf are optimized using a fuzzy logic algorithm, specifically as follows: S41. For the comprehensive state of charge result SOC3, comprehensive health result SOH3, charging current correction coefficient Kc and discharging current correction coefficient Kf, divide them into multiple fuzzy subsets on the corresponding preset universe of discourse. The membership function of each fuzzy subset adopts the triangular membership function, and each fuzzy subset is set with a corresponding triangular membership function vertex. S42. Based on the current state of charge result SOC3, calculate the membership degree of each fuzzy subset using the triangular membership function. Take the fuzzy subset corresponding to the largest membership degree as the fuzzy subset to which the current state of charge result SOC3 belongs. Similarly, obtain the fuzzy subset to which the current state of health result SOH3 belongs. S43. Based on the fuzzy subsets to which the current integrated state of charge result SOC3 and integrated health result SOH3 belong, select matching rules from the preset fuzzy rule base, and obtain the fuzzy subsets to which the charging current correction coefficient Kc and the discharging current correction coefficient Kf belong according to the matching rules. S44. Obtain the vertex of the triangle membership function corresponding to the fuzzy subset to which the charging current correction coefficient Kc belongs, and calculate the mean value as the optimized charging current correction coefficient Kc. Similarly, obtain the optimized discharge current correction coefficient Kf.
[0010] Furthermore, based on the optimized charging current correction coefficient Kc and discharging current correction coefficient Kf, the optimal maximum charging current and maximum discharging current at the current moment are evaluated: ; ; in, The optimal maximum charging current at the current moment. The optimal maximum discharge current at the current moment. The initial maximum charging current, Let be the initial maximum discharge current, and k be the current time.
[0011] This invention also provides an off-grid inverter battery optimization system based on an adaptive algorithm, applied to any of the above-described off-grid inverter battery optimization methods based on adaptive algorithms, comprising: The update module identifies and updates the physical parameters of the battery model online based on the recursive least squares method. The physical parameters of the battery model include ohmic internal resistance, polarization resistance, and polarization capacitance. The state of charge analysis module, based on the physical parameters of the current battery model, obtains the first state of charge result SOC1 and the second state of charge result SOC2 of the current battery through the ampere-hour integration method and the open circuit voltage method, respectively. The first state of charge result SOC1 and the second state of charge result SOC2 are fused to obtain the comprehensive state of charge result SOC3. The health status analysis module assesses the current battery's first health status result SOH1 based on its current actual capacity, assesses the current second health status result SOH2 based on its current ohmic internal resistance, and performs a weighted fusion of the first health status result SOH1 and the second health status result SOH2 to obtain the current battery's comprehensive health status result SOH3. The coefficient optimization module optimizes the charging current correction coefficient Kc and the discharging current correction coefficient Kf based on the current comprehensive state of charge result SOC3 and comprehensive health state result SOH3 using a fuzzy logic algorithm. The charge / discharge optimization module evaluates the optimal maximum charging current and maximum discharging current at the current moment based on the optimized charging current correction coefficient Kc and discharging current correction coefficient Kf.
[0012] Furthermore, the online identification and updating of the battery model's physical parameters based on the recursive least squares method specifically involves: Simultaneously sample battery data, including terminal voltage U, load current I, and battery temperature Tc; Using a first-order RC equivalent circuit model as the basic model, and discretizing the first-order RC equivalent circuit model, the discrete difference equation form of the terminal voltage is derived: ; Where k represents the current time, k-1 represents the previous time, and a1, a2, a3 and a4 are all discrete model coefficients to be identified; Construct data vector : ; Constructing the coefficient vector of the discrete model : T denotes matrix transpose; Perform the recursive calculations in the following order: Calculate the gain vector ; Calculate voltage estimation error ; Update the discrete model coefficient vector ; Update covariance matrix ; in, To pre-set the forgetting factor, It is the identity matrix with the same dimension as P.
[0013] Compared with the prior art, the beneficial effects of the present invention are as follows: This invention uses a recursive least squares method to identify and update the physical parameters of a battery model online. Based on the current physical parameters of the battery model, it calculates and obtains the comprehensive state of charge (SOC) and comprehensive health status results, effectively improving the accuracy of the battery status. Based on the comprehensive SOC and comprehensive health status results, it optimizes the charging current correction coefficient and the discharging current correction coefficient using a fuzzy logic algorithm. Based on the optimized charging current correction coefficient and discharging current correction coefficient, it estimates the optimal maximum charging current and maximum discharging current at the current moment, effectively preventing excessive charging and discharging currents and improving battery safety and lifespan. Attached Figure Description
[0014] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0015] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0016] Figure 1 This is a flowchart of an off-grid inverter battery optimization method based on an adaptive algorithm according to the present invention; Figure 2 This is a structural block diagram of an off-grid inverter battery optimization system based on an adaptive algorithm according to the present invention. Detailed Implementation
[0017] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention.
[0018] It should be noted that all directional indications (such as up, down, left, right, front, back, etc.) in the embodiments of the present invention are only used to explain the relative positional relationship and movement of each component in a certain specific posture (as shown in the figure). If the specific posture changes, the directional indication will also change accordingly.
[0019] Furthermore, the use of terms such as "first" and "second" in this invention is for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined with "first" or "second" may explicitly or implicitly include at least one of that feature. Additionally, the technical solutions of the various embodiments can be combined with each other, but only on the basis of being achievable by those skilled in the art. When the combination of technical solutions is contradictory or impossible to implement, such a combination of technical solutions should be considered non-existent and not within the scope of protection claimed by this invention.
[0020] Example 1 See Figure 1 As shown, the present invention provides an off-grid inverter battery optimization method based on an adaptive algorithm, which specifically includes the following steps: S1. The physical parameters of the battery model are identified and updated online based on the recursive least squares method. The physical parameters of the battery model include ohmic internal resistance, polarization resistance and polarization capacitance. S2. Based on the physical parameters of the current battery model, the first state of charge (SOC1) and the second state of charge (SOC2) of the current battery are obtained by the ampere-hour integration method and the open-circuit voltage method, respectively. The first state of charge (SOC1) and the second state of charge (SOC2) are fused to obtain the comprehensive state of charge (SOC3). S3. Evaluate the current battery's first health state result SOH1 based on the battery's current actual capacity, evaluate the current second health state result SOH2 based on the current ohmic internal resistance, and perform a weighted fusion of the first health state result SOH1 and the second health state result SOH2 to obtain the current battery's comprehensive health state result SOH3. S4. Based on the current state of charge (SOC3) and state of health (SOH3) results, optimize the charging current correction coefficient Kc and the discharging current correction coefficient Kf using a fuzzy logic algorithm. S5. Based on the optimized charging current correction coefficient Kc and discharging current correction coefficient Kf, evaluate the optimal maximum charging current and maximum discharging current at the current moment.
[0021] The following explains each step: S1. Online identification and updating of battery model physical parameters based on recursive least squares method, wherein the battery model physical parameters include ohmic internal resistance, polarization resistance and polarization capacitance, specifically including the following steps: S11. Synchronously sample battery data, including terminal voltage U, load current I, and battery temperature Tc; The above parameters were obtained by filtering the original acquired signal with a low-pass filter to eliminate high-frequency noise.
[0022] S12. Using a first-order RC equivalent circuit model as the basic model, and discretizing the first-order RC equivalent circuit model, the discrete difference equation form of the terminal voltage is derived: ; Where k represents the current time, k-1 represents the previous time, and a1, a2, a3, and a4 are the discrete model coefficients to be identified.
[0023] S13, Constructing Data Vectors : ; Constructing the coefficient vector of the discrete model : ;T represents matrix transpose.
[0024] S14. Perform recursive calculations in the following order: Calculate the gain vector ; Calculate voltage estimation error ; Update the discrete model coefficient vector ; Update covariance matrix ; in, To pre-set the forgetting factor, This is the identity matrix with the same dimensions as P. The covariance matrix P has a dimension of 4×4.
[0025] S15, from the discrete model coefficient vector at the current moment Extract the coefficients of the discrete model, and obtain the physical parameters of the equivalent circuit model at the current moment based on the inverse mapping relationship of the discretization process in step S12: Ohmic resistance ; polarization resistor ; Polarized capacitor .
[0026] Ohmic internal resistance, polarization resistance, and polarization capacitance directly reflect the internal state of a battery, changing in real time with state of charge (SOC), battery temperature (Tc), and state of health (SOH). Current technologies using fixed model parameters cannot describe these changes. This step, through online identification, ensures the model always "fits" the physical battery, providing an accurate model foundation for subsequent high-precision state estimation and optimized control. Ohmic internal resistance represents the voltage change instantaneously during a current step and is the most significant internal resistance characteristic of a battery; polarization resistance reflects the resistance to electrochemical polarization; polarization capacitance reflects the battery's ability to store polarization charge; and the time constant... It reflects the speed of the battery polarization process.
[0027] S2. Based on the current battery model physical parameters, the first state of charge (SOC1) and the second state of charge (SOC2) of the current battery are obtained by the ampere-hour integration method and the open-circuit voltage method, respectively. The first state of charge (SOC1) and the second state of charge (SOC2) are then fused to obtain the comprehensive state of charge (SOC3).
[0028] Specifically, based on the current battery model physical parameters, the first state of charge (SOC1) is obtained through the ampere-hour integration method, as follows: Based on the current ohmic internal resistance R0 and battery temperature Tc, the current coulombic efficiency CE of the battery is obtained from the first preset lookup table. The first preset lookup table is established after the battery has been experimentally tested based on multiple sets of different ohmic internal resistances and battery temperatures to obtain the corresponding coulombic efficiencies. Based on the current coulomb efficiency CE, the first state of charge (SOC1) of the current battery is obtained using the ampere-hour integration method: ; Where Cn is the rated capacity of the battery. This is the preset sampling period.
[0029] The second state of charge (SOC2) is obtained using the open-circuit voltage method, specifically as follows: Estimate the open-circuit voltage at the current moment: OCV is the open-circuit voltage; The second state of charge (SOC2) of the current battery is obtained from the second preset lookup table based on the current open-circuit voltage and battery temperature. The second preset lookup table is established after experimental testing of the battery based on multiple sets of different open-circuit voltages and battery temperatures to obtain the corresponding state of charge results.
[0030] The first state of charge result SOC1 and the second state of charge result SOC2 are fused to obtain the comprehensive state of charge result SOC3. Specifically, the first state of charge result SOC1 is used as the state prediction value, and the second state of charge result SOC2 is used as the observation value. The extended Kalman filter algorithm is used to fuse them to obtain the comprehensive state of charge result SOC3.
[0031] S3. Evaluate the current battery's first state of health (SOH1) based on its current actual capacity, and evaluate the current second state of health (SOH2) based on its current ohmic internal resistance. Then, weight and fuse the first state of health (SOH1) and the second state of health (SOH2) to obtain the current battery's comprehensive state of health (SOH3). The current state of health (SOH1) of the battery is assessed based on its current actual capacity. When the battery has undergone a complete charge-discharge cycle, the discharge current and time are integrated using the ampere-hour integration method to obtain the total amount of electricity released by the battery from the fully charged state to the discharged state, which is taken as the current actual capacity of the battery. The ratio of the current actual capacity to the rated capacity of the battery is calculated to obtain the current first health state result SOH1 of the battery.
[0032] The current second health state result SOH2 is assessed based on the current ohmic internal resistance. Specifically, the ratio of the current ohmic internal resistance to the initial internal resistance reference value is used to obtain the current second health state result SOH2. The initial internal resistance reference value is the ohmic internal resistance measured at standard temperature when the battery leaves the factory.
[0033] The first state of health result SOH1 characterizes the state of health of the battery by the degree of attenuation of the current actual available capacity of the battery relative to the initial rated capacity. It directly reflects the decline in the battery's ability to store electrical energy and is the core indicator for evaluating "how long the battery can still be used". The second state of health result SOH2 characterizes the state of health of the battery by the increase in the current ohmic internal resistance of the battery relative to the initial internal resistance. It directly reflects the decline in the battery's power output ability (i.e., "how fast it can still be used"). During the battery aging process, capacity decline and internal resistance increase usually occur simultaneously. A single indicator cannot comprehensively evaluate the battery's state of health. This technical solution uses a weighted fusion method to comprehensively combine the first state of health result SOH1 and the second state of health result SOH2, and outputs a robust and multi-scale comprehensive state of health result SOH3, providing a more reliable decision-making basis for adaptive optimization control.
[0034] S4. According to the comprehensive state of charge result SOC3 and the comprehensive state of health result SOH3 at the current moment, optimize the charging current correction coefficient Kc and the discharging current correction coefficient Kf through a fuzzy logic algorithm, which specifically includes the following steps: S41. Divide multiple fuzzy subsets for the comprehensive state of charge result SOC3, the comprehensive state of health result SOH3, the charging current correction coefficient Kc, and the discharging current correction coefficient Kf on their respective preset universes of discourse. The membership functions of each fuzzy subset adopt triangular membership functions, and corresponding triangular membership function vertices are set for each fuzzy subset; (For example, for the comprehensive state of charge result SOC3, the universe of discourse is set to [0, 100], and three fuzzy subsets are divided on its universe of discourse: {poor, medium, excellent}. The vertex of "poor" is set to (0, 0, 50), the vertex of "medium" is set to "40, 60, 80", and the vertex of "excellent" is set to (70, 100, 100). Fuzzy control essentially transforms the operation experience of human experts into mathematical expressions. The position of the triangular vertex reflects the "typical value" and "boundary" of the fuzzy subset in the universe of discourse. The triangular membership function vertex includes three parameters, namely the left endpoint, the midpoint, and the right endpoint. At the same time, the value of the triangular membership function vertex is set based on the corresponding universe of discourse. The form of the triangular membership function is a piecewise function. For example, taking the fuzzy subset 1 of SOC3 as an example, its triangular membership function: If SOC3 < DA1, then μ1(SOC3) = 0; If DA1 ≤ SOC3 < DB1, then μ1(SOC3) = (SOC3 - DA1) / (DB1 - DA1); If DB1 ≤ SOC3 < DC1, then μ1(SOC3) = (DC1 - SOC3) / (DC1 - DB1); If DC1 ≤ SOC3, then μ1(SOC3) = 0; DA1, DB1 and DC1 are the left endpoint, middle endpoint and right endpoint of the fuzzy subset 1 of the integrated state of charge result SOC3, respectively, and μ1 is the membership degree of the integrated state of charge result SOC3 in the fuzzy subset 1. Using the three fuzzy subsets mentioned above as examples, if SOC3=70, then the membership degree μ1(70) of the fuzzy subset "Poor" is 0, because it belongs to DC1≤SOC3; the membership degree μ1(70) of the fuzzy subset "Medium" is (80-70) / (80-60)=0.5, because it belongs to DB1≤SOC3<DC1; the membership degree μ1(70) of the fuzzy subset "Excellent" is (70-70) / (100-70)=0, because it belongs to DA1≤SOC3<DB1; therefore, when SOC3=70, its fuzzy subset is "Medium"). S42. Based on the current state of charge result SOC3, calculate the membership degree of each fuzzy subset using the triangular membership function. Take the fuzzy subset corresponding to the largest membership degree as the fuzzy subset to which the current state of charge result SOC3 belongs. Similarly, obtain the fuzzy subset to which the current state of health result SOH3 belongs. S43. Based on the fuzzy subsets to which the current integrated state of charge result SOC3 and integrated health result SOH3 belong, select matching rules from the preset fuzzy rule base, and obtain the fuzzy subsets to which the charging current correction coefficient Kc and the discharging current correction coefficient Kf belong according to the matching rules. The fuzzy rule base records multiple matching rules. Each matching rule is used to reflect the combination of the fuzzy subsets to which the integrated state of charge result SOC3 and the integrated state of health result SOH3 belong, and the combination of the fuzzy subsets to which the matched charging current correction coefficient Kc and discharging current correction coefficient Kf belong. (For example, in a certain matching rule, when the fuzzy subset to which the comprehensive state of charge result SOC3 belongs is "medium" and the fuzzy subset to which the comprehensive health state result SOH3 belongs is "medium", then the fuzzy subset to which the corresponding charging current correction coefficient Kc belongs is "large", and the fuzzy subset to which the corresponding discharging current correction coefficient Kf belongs is "large"). S44. Obtain the vertex of the triangle membership function corresponding to the fuzzy subset to which the charging current correction coefficient Kc belongs, and calculate the mean value as the optimized charging current correction coefficient Kc. Similarly, obtain the optimized discharge current correction coefficient Kf.
[0035] S5. Based on the optimized charging current correction coefficient Kc and discharging current correction coefficient Kf, evaluate the optimal maximum charging current and maximum discharging current at the current moment: ; ; in, The optimal maximum charging current at the current moment. The optimal maximum discharge current at the current moment. The initial maximum charging current, This is the initial maximum discharge current.
[0036] In some embodiments, step S5 further includes: generating the current target state of charge (SOCT) based on the current overall health status result SOH3; if the current overall health status result SOC3 is greater than the current target state of charge (SOCT), then overcharge protection is activated to forcibly stop charging. ; This is the preset aging degradation coefficient.
[0037] Example 2 See Figure 2 As shown, the present invention also provides an off-grid inverter battery optimization system based on an adaptive algorithm, specifically including: The update module identifies and updates the physical parameters of the battery model online based on the recursive least squares method. The physical parameters of the battery model include ohmic internal resistance, polarization resistance, and polarization capacitance. The state of charge analysis module, based on the physical parameters of the current battery model, obtains the first state of charge result SOC1 and the second state of charge result SOC2 of the current battery through the ampere-hour integration method and the open circuit voltage method, respectively. The first state of charge result SOC1 and the second state of charge result SOC2 are fused to obtain the comprehensive state of charge result SOC3. The health status analysis module assesses the current battery's first health status result SOH1 based on its current actual capacity, assesses the current second health status result SOH2 based on its current ohmic internal resistance, and performs a weighted fusion of the first health status result SOH1 and the second health status result SOH2 to obtain the current battery's comprehensive health status result SOH3. The coefficient optimization module optimizes the charging current correction coefficient Kc and the discharging current correction coefficient Kf based on the current comprehensive state of charge result SOC3 and comprehensive health state result SOH3 using a fuzzy logic algorithm. The charge / discharge optimization module evaluates the optimal maximum charging current and maximum discharging current at the current moment based on the optimized charging current correction coefficient Kc and discharging current correction coefficient Kf.
[0038] Example 3 The present invention also provides an electronic device, including: a processor, a transmitting device, an input device, an output device, and a memory. The processor may be implemented using a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit, or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this application. The memory may be implemented using a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM), and is used to store computer program code. The computer program code includes computer instructions. When the processor executes the computer instructions, the electronic device executes a method as described in any of the above possible implementation methods.
[0039] Example 4 The present invention also provides a computer-readable storage medium storing a computer program, the computer program including program instructions, which, when executed by a processor of an electronic device, cause the processor to perform a method as described in any of the above possible implementations.
[0040] The beneficial effects of this invention are as follows: This invention uses a recursive least squares method to identify and update the physical parameters of a battery model online. Based on the current physical parameters of the battery model, it calculates and obtains the comprehensive state of charge (SOC) and comprehensive health status results, effectively improving the accuracy of the battery status. Based on the comprehensive SOC and comprehensive health status results, it optimizes the charging current correction coefficient and the discharging current correction coefficient using a fuzzy logic algorithm. Based on the optimized charging current correction coefficient and discharging current correction coefficient, it estimates the optimal maximum charging current and maximum discharging current at the current moment, effectively preventing excessive charging and discharging currents and improving battery safety and lifespan.
[0041] In the description of this specification, the references to terms such as "an embodiment," "example," "specific example," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0042] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes multiple instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing programs, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0043] The above description is merely a specific embodiment of the present invention, enabling those skilled in the art to understand or implement the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the present invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features claimed herein.
Claims
1. A method for optimizing the battery of an off-grid inverter based on an adaptive algorithm, characterized in that, Includes the following steps: S1. The physical parameters of the battery model are identified and updated online based on the recursive least squares method. The physical parameters of the battery model include ohmic internal resistance, polarization resistance and polarization capacitance. S2. Based on the physical parameters of the current battery model, the first state of charge (SOC1) and the second state of charge (SOC2) of the current battery are obtained by the ampere-hour integration method and the open-circuit voltage method, respectively. The first state of charge (SOC1) and the second state of charge (SOC2) are fused to obtain the comprehensive state of charge (SOC3). S3. Evaluate the current battery's first health state result SOH1 based on the battery's current actual capacity, evaluate the current second health state result SOH2 based on the current ohmic internal resistance, and perform a weighted fusion of the first health state result SOH1 and the second health state result SOH2 to obtain the current battery's comprehensive health state result SOH3. S4. Based on the current state of charge (SOC3) and state of health (SOH3) results, optimize the charging current correction coefficient Kc and the discharging current correction coefficient Kf using a fuzzy logic algorithm. S5. Based on the optimized charging current correction coefficient Kc and discharging current correction coefficient Kf, evaluate the optimal maximum charging current and maximum discharging current at the current moment.
2. The off-grid inverter battery optimization method based on adaptive algorithm according to claim 1, characterized in that, The online identification and updating of the battery model's physical parameters based on the recursive least squares method is specifically as follows: S11. Synchronously sample battery data, including terminal voltage U, load current I, and battery temperature Tc; S12. Using a first-order RC equivalent circuit model as the basic model, and discretizing the first-order RC equivalent circuit model, the discrete difference equation form of the terminal voltage is derived: ; Where k represents the current time, k-1 represents the previous time, and a1, a2, a3 and a4 are all discrete model coefficients to be identified; S13, Constructing Data Vectors : ; Constructing the coefficient vector of the discrete model : T denotes matrix transpose; S14. Perform recursive calculations in the following order: Calculate the gain vector ; Calculate voltage estimation error ; Update the discrete model coefficient vector ; Update covariance matrix ; in, To pre-set the forgetting factor, It is the identity matrix with the same dimension as P.
3. The off-grid inverter battery optimization method based on adaptive algorithm according to claim 2, characterized in that, The method of obtaining the first state of charge result SOC1 through ampere-hour integration is as follows: Based on the current ohmic internal resistance R0 and battery temperature Tc, the current coulombic efficiency CE of the battery is obtained from the first preset lookup table. The first preset lookup table is established after the battery has been experimentally tested based on multiple sets of different ohmic internal resistances and battery temperatures to obtain the corresponding coulombic efficiencies. Based on the current coulomb efficiency CE, the first state of charge (SOC1) of the current battery is obtained using the ampere-hour integration method: ; Where Cn is the rated capacity of the battery. This is the preset sampling period.
4. The off-grid inverter battery optimization method based on adaptive algorithm according to claim 2, characterized in that, The second state of charge result SOC2 obtained by the open-circuit voltage method is as follows: Estimate the open-circuit voltage at the current moment: OCV is the open-circuit voltage; The second state of charge (SOC2) of the current battery is obtained from the second preset lookup table based on the current open-circuit voltage and battery temperature. The second preset lookup table is established after experimental testing of the battery based on multiple sets of different open-circuit voltages and battery temperatures to obtain the corresponding state of charge results.
5. The off-grid inverter battery optimization method based on adaptive algorithm according to claim 2, characterized in that, The first state of charge result SOC1 and the second state of charge result SOC2 are fused to obtain the comprehensive state of charge result SOC3. Specifically, the first state of charge result SOC1 is used as the state prediction value, and the second state of charge result SOC2 is used as the observation value. The extended Kalman filter algorithm is used to fuse them to obtain the comprehensive state of charge result SOC3.
6. The off-grid inverter battery optimization method based on adaptive algorithm according to claim 1, characterized in that, The method of evaluating the first state of health (SOH1) of the battery based on its current actual capacity is as follows: when the battery has undergone a complete charge-discharge cycle, the discharge current and time are integrated using the ampere-hour integration method to obtain the total amount of electricity released by the battery from a fully charged state to a discharged state, which is taken as the current actual capacity of the battery. The ratio of the current actual capacity to the rated capacity of the battery is calculated to obtain the first state of health (SOH1) of the battery. The assessment of the current second health state result SOH2 based on the current ohmic internal resistance specifically involves calculating the ratio of the current ohmic internal resistance to the initial internal resistance reference value to obtain the current second health state result SOH2. The initial internal resistance reference value is the ohmic internal resistance measured at standard temperature when the battery leaves the factory.
7. The off-grid inverter battery optimization method based on adaptive algorithm according to claim 1, characterized in that, The process involves optimizing the charging current correction coefficient Kc and the discharging current correction coefficient Kf using a fuzzy logic algorithm based on the current comprehensive state of charge (SOC3) and comprehensive state of health (SOH3). Specifically: S41. For the comprehensive state of charge result SOC3, comprehensive health result SOH3, charging current correction coefficient Kc and discharging current correction coefficient Kf, divide them into multiple fuzzy subsets on the corresponding preset universe of discourse. The membership function of each fuzzy subset adopts the triangular membership function, and each fuzzy subset is set with a corresponding triangular membership function vertex. S42. Based on the current state of charge result SOC3, calculate the membership degree of each fuzzy subset using the triangular membership function. Take the fuzzy subset corresponding to the largest membership degree as the fuzzy subset to which the current state of charge result SOC3 belongs. Similarly, obtain the fuzzy subset to which the current state of health result SOH3 belongs. S43. Based on the fuzzy subsets to which the current integrated state of charge result SOC3 and integrated health result SOH3 belong, select matching rules from the preset fuzzy rule base, and obtain the fuzzy subsets to which the charging current correction coefficient Kc and the discharging current correction coefficient Kf belong according to the matching rules. S44. Obtain the vertex of the triangle membership function corresponding to the fuzzy subset to which the charging current correction coefficient Kc belongs, and calculate the mean value as the optimized charging current correction coefficient Kc. Similarly, obtain the optimized discharge current correction coefficient Kf.
8. The off-grid inverter battery optimization method based on adaptive algorithm according to claim 1, characterized in that, The optimal maximum charging current and maximum discharging current at the current moment are evaluated based on the optimized charging current correction coefficient Kc and discharging current correction coefficient Kf. ; ; in, The optimal maximum charging current at the current moment. The optimal maximum discharge current at the current moment. The initial maximum charging current, Let be the initial maximum discharge current, and k be the current time.
9. An off-grid inverter battery optimization system based on an adaptive algorithm, applied to the off-grid inverter battery optimization method based on an adaptive algorithm as described in any one of claims 1 to 8, characterized in that, include: The update module identifies and updates the physical parameters of the battery model online based on the recursive least squares method. The physical parameters of the battery model include ohmic internal resistance, polarization resistance, and polarization capacitance. The state of charge analysis module, based on the physical parameters of the current battery model, obtains the first state of charge result SOC1 and the second state of charge result SOC2 of the current battery through the ampere-hour integration method and the open circuit voltage method, respectively. The first state of charge result SOC1 and the second state of charge result SOC2 are fused to obtain the comprehensive state of charge result SOC3. The health status analysis module assesses the current battery's first health status result SOH1 based on its current actual capacity, assesses the current second health status result SOH2 based on its current ohmic internal resistance, and performs a weighted fusion of the first health status result SOH1 and the second health status result SOH2 to obtain the current battery's comprehensive health status result SOH3. The coefficient optimization module optimizes the charging current correction coefficient Kc and the discharging current correction coefficient Kf based on the current comprehensive state of charge result SOC3 and comprehensive health state result SOH3 using a fuzzy logic algorithm. The charge / discharge optimization module evaluates the optimal maximum charging current and maximum discharging current at the current moment based on the optimized charging current correction coefficient Kc and discharging current correction coefficient Kf.
10. The off-grid inverter battery optimization system based on adaptive algorithm according to claim 9, characterized in that, The online identification and updating of the battery model's physical parameters based on the recursive least squares method is specifically as follows: Simultaneously sample battery data, including terminal voltage U, load current I, and battery temperature Tc; Using a first-order RC equivalent circuit model as the basic model, and discretizing the first-order RC equivalent circuit model, the discrete difference equation form of the terminal voltage is derived: ; Where k represents the current time, k-1 represents the previous time, and a1, a2, a3 and a4 are all discrete model coefficients to be identified; Construct data vector : ; Constructing the coefficient vector of the discrete model : T denotes matrix transpose; Perform the recursive calculations in the following order: Calculate the gain vector ; Calculate voltage estimation error ; Update the discrete model coefficient vector ; Update covariance matrix ; in, To pre-set the forgetting factor, It is the identity matrix with the same dimension as P.