Energy storage battery container temperature control method for optimizing PID (Proportion Integration Differentiation) based on improved Kangen's algorithm

By optimizing the PID controller with the improved horned lizard algorithm and combining it with logistic chaos mapping and adaptive perturbation strategy, the problems of slow adjustment speed and low precision of traditional PID controller in temperature control of energy storage battery containers are solved, precise temperature control is achieved in different environments, and the adaptability and robustness of the system are improved.

CN120669785APending Publication Date: 2025-09-19JIANGSU UNIV OF SCI & TECH +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510824278.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-19
Publication Date
2025-09-19

AI Technical Summary

Technical Problem

Traditional PID controllers have difficulty coping with nonlinearities and environmental disturbances in temperature control of energy storage battery containers, resulting in slow adjustment speed, large overshoot, and significant steady-state error. This makes it impossible to achieve fast and accurate temperature control, especially in scenarios with large temperature differences between day and night or frequent load fluctuations, which may lead to control failure or increased energy consumption.

Method used

The improved horned lizard algorithm is used to optimize the PID control method. By optimizing the parameters of the PID controller in real time, the improved HLOA algorithm is combined with the Logistic chaos map and the adaptive disturbance strategy to dynamically adjust the disturbance amplitude and stage weight to achieve precise control of the energy storage battery container temperature.

Benefits of technology

The temperature of the energy storage battery container can be precisely controlled both with and without interference, which improves adaptability and robustness, reduces energy consumption, and enhances the accuracy and response speed of temperature control.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120669785A_ABST
    Figure CN120669785A_ABST
Patent Text Reader

Abstract

The invention discloses an energy storage battery container temperature control method for optimizing PID based on an improved kenen algorithm, and the method comprises the steps: building a container energy storage battery temperature control system according to an established container energy storage battery temperature control model; the method comprises the following steps: acquiring output end temperature data of a container energy storage battery temperature control system in real time, comparing the acquired output end temperature data with set temperature data, and calculating a temperature error; based on the temperature error, an improved HLOA algorithm is utilized to optimize parameters of a PID controller in real time; and temperature control of the energy storage battery container is realized through the PID controller after parameter optimization. According to the invention, the PID controller based on the improved Kangen optimization algorithm is designed, accurate control of the temperature of the energy storage battery container can be realized no matter under the condition of interference or no interference, the adaptive capability is excellent, and the adaptive control requirement of the temperature of the energy storage battery container can be effectively met.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of container battery energy storage, and relates to a temperature control technology for an energy storage battery container, and specifically to a temperature control method for an energy storage battery container based on an improved horned lizard algorithm to optimize PID. Background Art

[0002] With the rapid development of new energy technologies, the power system is increasingly dependent on energy storage devices. As an important component of large-scale energy storage systems, energy storage battery containers are widely used in scenarios such as wind power, photovoltaic power generation, grid peak regulation, and emergency power supply. Lithium-ion batteries have become the mainstream choice for energy storage systems due to their high energy density, long cycle life, and high charge and discharge efficiency. However, lithium batteries generate a lot of heat during the charging and discharging process. If the temperature is not properly controlled, it will cause safety issues such as capacity decay, shortened life, and even thermal runaway. Therefore, to ensure the performance and safe operation of the battery pack, real-time monitoring and efficient control of battery temperature have become key links in the design of energy storage systems. Current container-type energy storage systems generally use forced air cooling or liquid cooling systems for thermal management, which places higher requirements on the response speed and accuracy of the control algorithm.

[0003] In temperature control, PID controllers are widely used in temperature control systems for energy storage battery containers due to their simple structure, good control stability, and ease of implementation. However, traditional PID controllers often struggle to maintain optimal control performance when faced with nonlinearity, parameter changes, and environmental disturbances during the operation of energy storage systems. They suffer from shortcomings such as slow adjustment speed, large overshoot, and significant steady-state error, making it impossible to achieve rapid and precise temperature control. In particular, in application scenarios with large day-night temperature differences or frequent load fluctuations, PID controllers with fixed parameters have difficulty adapting to dynamic environments, potentially leading to control failure or increased energy consumption. Therefore, there is an urgent need for a control method that can adaptively adjust PID parameters online to improve the intelligence and robustness of temperature control systems. Summary of the Invention

[0004] Purpose of the invention: In order to overcome the shortcomings of the existing technology, a temperature control method for an energy storage battery container is provided based on the improved horned lizard algorithm to optimize PID. The method can achieve precise control of the temperature of the energy storage battery container regardless of interference or no interference, and can effectively meet the adaptive control requirements of the energy storage battery container temperature.

[0005] Technical solution: To achieve the above objectives, the present invention provides a temperature control method for an energy storage battery container based on an improved horned lizard algorithm to optimize PID, comprising the following steps:

[0006] S1: Build a container energy storage battery temperature control system based on the established container energy storage battery temperature control model;

[0007] S2: Collect the output temperature data of the container energy storage battery temperature control system in real time, compare the collected output temperature data with the set temperature data, and calculate the temperature error;

[0008] S3: Based on the temperature error, the parameters of the PID controller are optimized in real time using the improved HLOA algorithm;

[0009] S4: The temperature of the energy storage battery container is controlled by the PID controller after parameter optimization.

[0010] Furthermore, the establishment of the container energy storage battery temperature control model in step S1 includes:

[0011] The algorithm is co-simulated with the Simulink model to establish a container energy storage battery temperature control model. Lithium batteries generate heat during the charging and discharging process. The Bernardi equation of the container energy storage battery heat generation model is:

[0012]

[0013] Among them, Q g is the heat generated by the battery, I is the battery charge and discharge current, EOC is the battery open circuit voltage, E is the terminal voltage, Tb is the battery temperature, R is the battery internal resistance, is the entropy thermal coefficient of the battery;

[0014] Establishing temperature control error

[0015] e=ΔT=T c -T t

[0016] Among them, T c is the current temperature of the battery, T t is the target temperature to be controlled; the deviation between the temperature observation value at time t+1 and the previous time is

[0017] Δe=e(t+1)-e(t).

[0018] Furthermore, in step S3, PID parameters are optimized according to the fitness function J to find the optimal PID parameter values. The fitness function J is expressed as:

[0019]

[0020] Among them, μ1, μ2, μ3 are weighting coefficients; e M (t) is the overshoot, which can be expressed as

[0021]

[0022] The main indicators for container energy storage battery temperature control are temperature error, adjustment speed and overshoot;

[0023] To make the temperature control process more dynamic, the first term in the fitness function J incorporates the absolute integral of the accumulated temperature error to measure the overall magnitude of the error during the entire control process, improving system accuracy. The second term incorporates the absolute integral of the error rate of change to adjust the response speed and improve system stability. The third term incorporates the square integral of the overshoot to penalize and directly limit overshoot, minimizing overshoot. Ultimately, the optimal PID parameters are found, resulting in better control performance for the energy storage battery container system.

[0024] Furthermore, in step S3, the PID controller parameters are optimized and adjusted in real time based on the PID control and combined with the HLOA algorithm. The expression of PID control is:

[0025]

[0026] Where e(t) is the temperature deviation, t and t i is the current time and the initial time, k p 、k i 、k d Represents the proportional, integral and derivative gains respectively.

[0027] The optimization and adjustment process is carried out within a specified period. The temperature deviation is used as the input signal of the controller. The parameters of the PID controller are optimized in real time using the HLOA algorithm. The optimized parameters are then input into the PID controller to perform control operations.

[0028] Furthermore, the process of optimizing the parameters of the PID controller in real time using the improved HLOA algorithm in step S3 includes:

[0029] A1: Initialize the algorithm parameters, set the horned lizard population size, and introduce random perturbations through the improved Logistic Chaos Map dynamics model to generate a better initial population. The population generation is random and has chaotic characteristics, thus providing higher diversity and search capabilities.

[0030] A2: For each individual in the population, calculate its fitness value as a measure of individual quality. After calculating the fitness value, select the best individual in the current population as a reference. This best individual will serve as the basis for subsequent algorithm optimization.

[0031] A3: Determine whether it is necessary to dynamically adjust the disturbance amplitude and stage weight according to the current state of the population; if necessary, the system will make corresponding adjustments; otherwise, it will directly proceed to step A4;

[0032] Dynamic adjustment of the perturbation amplitude can balance the algorithm's global exploration capabilities in the early stages and local development capabilities in the later stages, making the distribution of individuals in the search space more reasonable, thereby effectively avoiding falling into local optimal solutions and improving overall optimization performance. However, excessive perturbations may cause confusion in the search direction and affect the convergence speed; excessively small perturbations may not be enough to escape the local optimum. Therefore, an adaptive perturbation strategy is adopted to dynamically change the perturbation intensity as the optimization process progresses.

[0033] To improve the adaptability of the Horned Lizard Optimization Algorithm in diverse interference environments, this paper adjusts the execution weights of each HLOA phase based on the interference intensity. This method dynamically adjusts the execution weights of the stealth and escape phases of the HLOA algorithm based on the external interference intensity S. By adaptively adjusting the execution weights of these phases based on the external interference intensity S, the algorithm improves convergence accuracy in low-interference environments and enhances global exploration capabilities in high-interference environments, preventing the algorithm from falling into local optima.

[0034] A4: Further enhance the diversity of the population through escape behavior, so that the search process can avoid local optimal solutions. After completing the above behavior, update the current population status and prepare for the next round of evolution. Determine whether the set responsiveness threshold is reached. If the condition is met, the algorithm stops and outputs the currently found optimal solution.

[0035] Furthermore, in step A1, the complexity and high sensitivity of the chaotic system are utilized to generate the initial population, thereby improving the diversity of the initial population and enhancing the diversity and global search capability of the algorithm in the initial search stage.

[0036] Logistic chaos mapping is a typical nonlinear dynamic system, and its dynamic model can be defined as

[0037] x n+1 =r·x n ·(1-x n )

[0038] Among them, x n represents the population proportion at time point n, r is the growth parameter that determines the dynamic behavior of the system;

[0039] While the numerically chaotic nature of the logistic map can improve population diversity to a certain extent, it still has limitations. Issues such as periodicity and pseudo-chaos can arise in the iterative sequence, leading to uneven coverage of the search space and thus compromising the algorithm's global search capabilities. To address this, the present invention introduces a random perturbation term based on the logistic chaotic map to enhance the ergodic nature of the chaotic sequence, maintain individual variability among horned lizards, and prevent premature convergence of the algorithm.

[0040] The improved Logistic chaotic map dynamic model is:

[0041] x n+1 =r·x n ·(1-x n )+δ·sin(10 6 ·x n )

[0042] Among them, δ·sin(10 6 x n ) is the perturbation term, and δ is the sub-precision perturbation coefficient. At this point, the generated initial population has a good distribution, which can effectively improve the global search capability of the optimization algorithm.

[0043] Furthermore, the dynamic adjustment of the disturbance amplitude in step A3 includes:

[0044] The disturbance factor α is designed as the adjustment control variable to gradually decay during the optimization process and be affected by environmental factors. The random disturbance factor α is

[0045]

[0046] Among them, α min and α max is the upper and lower limits of disturbance fluctuation; β is the attenuation coefficient, which controls the speed at which the disturbance decreases with the number of iterations, f best is the most adaptable normalized value. When the optimization approaches the optimal solution, the disturbance amplitude is automatically reduced to improve the convergence accuracy. S is the external interference intensity. The greater the intensity, the greater the disturbance.

[0047] Furthermore, the external interference intensity S in step A3 is expressed as

[0048]

[0049] Among them, A is the amplitude, which indicates the magnitude of the external interference intensity; ω is the frequency of the external interference intensity, which indicates the rate of change of the external interference intensity; σ 2 is the variance of the actual temperature deviation, which indicates the influence of the external interference intensity on the system stability; c1, c2, and c3 are weight factors.

[0050] Furthermore, the stage weights in step A3 include a stealth stage weight and an escape stage weight, and the stealth stage weight and the escape stage weight are dynamically adjusted based on the external interference intensity S;

[0051] During the temperature control optimization process for energy storage battery containers, when external interference intensity is low, the population fitness distribution is relatively uniform, and the algorithm enters the local search phase. The temperature state of the energy storage battery container is relatively stable, and the temperature deviation is small. In the stealth phase, under low external interference intensity, the algorithm mainly converges to the optimal solution. Increasing the weight of this phase makes the algorithm more inclined to make fine adjustments near the optimal solution, thereby improving control accuracy and convergence speed.

[0052] Dynamically adjusted secret phase weight ω mimicry for

[0053] ω mimicry =ω1+γ(1-S)

[0054] Among them, ω1 is the basic weight of the hidden stage; γ is the first weight adjustment coefficient, which determines the magnitude of the weight change in the hidden stage;

[0055] During the optimization of the temperature control of energy storage battery containers, when the intensity of external interference is high, the temperature state of the energy storage battery container is greatly affected by external factors, the diversity of the algorithm population is reduced, and it is trapped in a local optimal solution, and the temperature may deviate significantly. In the escape phase, the random jump is increased under the intensity of external interference, a larger search space is explored, and the execution weight of the escape behavior is increased, so that individuals randomly jump within a larger solution space, thereby expanding the search range and avoiding premature convergence;

[0056] Dynamically adjusted escape phase weight ω escape for

[0057] ω escape =ω2+λS

[0058] Among them, ω2 is the basic weight in the escape stage; λ is the second weight adjustment coefficient, which determines the amplitude of the weight change in the escape stage.

[0059] Beneficial effects: Compared with the existing technology, the present invention designs a PID controller based on the improved horned lizard optimization algorithm, which can achieve precise control of the temperature of the energy storage battery container regardless of interference or non-interference. It has excellent adaptive ability and can effectively meet the adaptive control requirements of the energy storage battery container temperature. BRIEF DESCRIPTION OF THE DRAWINGS

[0060] Figure 1 is a control structure diagram of the method of the present invention;

[0061] Figure 2 This is the flow chart of the improved HLOA algorithm;

[0062] Figure 3 The temperature change curve of the energy storage battery container temperature control in step response;

[0063] Figure 4 The temperature deviation curve of the energy storage battery container temperature control in step response;

[0064] Figure 5 The temperature change curve of the energy storage battery container temperature control in step response to external interference;

[0065] Figure 6 The temperature deviation curve of the energy storage battery container temperature control step response under external interference;

[0066] Figure 7 The temperature change curve of the energy storage battery container temperature controller in response to external interference;

[0067] Figure 8 This is the temperature deviation curve of the energy storage battery container temperature controller's wave response under external interference. DETAILED DESCRIPTION

[0068] The present invention is further illustrated below with reference to the accompanying drawings and specific embodiments. It should be understood that these embodiments are only used to illustrate the present invention and are not used to limit the scope of the present invention. After reading the present invention, modifications of various equivalent forms of the present invention made by those skilled in the art all fall within the scope defined by the claims attached to this application.

[0069] Example 1:

[0070] like Figure 1 As shown, this embodiment provides a temperature control method for an energy storage battery container based on an improved horned lizard algorithm to optimize PID, comprising the following steps:

[0071] S1: Build a container energy storage battery temperature control system based on the established container energy storage battery temperature control model;

[0072] S2: Collect the output temperature data of the container energy storage battery temperature control system in real time, compare the collected output temperature data with the set temperature data, and calculate the temperature error;

[0073] S3: Based on the temperature error, the parameters of the PID controller are optimized in real time using the improved HLOA algorithm;

[0074] S4: The temperature of the energy storage battery container is controlled by the PID controller after parameter optimization.

[0075] The establishment of the container energy storage battery temperature control model includes:

[0076] The algorithm is co-simulated with the Simulink model to establish a container energy storage battery temperature control model. Lithium batteries generate heat during the charging and discharging process. The Bernardi equation of the container energy storage battery heat generation model is:

[0077]

[0078] Among them, Q g is the heat generated by the battery, I is the battery charge and discharge current, EOC is the battery open circuit voltage, E is the terminal voltage, Tb is the battery temperature, R is the battery internal resistance, is the entropy thermal coefficient of the battery;

[0079] Establishing temperature control error

[0080] e=ΔT=T c -T t

[0081] Among them, T c is the current temperature of the battery, T t is the target temperature to be controlled; the deviation between the temperature observation value at time t+1 and the previous time is

[0082] Δe=e(t+1)-e(t).

[0083] In step S3, the PID parameters are optimized according to the fitness function J to find the optimal PID parameter values. The fitness function J is expressed as:

[0084]

[0085] Among them, μ1, μ2, μ3 are weighting coefficients; e M (t) is the overshoot, which can be expressed as

[0086]

[0087] The main indicators for container energy storage battery temperature control are temperature error, adjustment speed and overshoot;

[0088] To make the temperature control process more dynamic, the first term in the fitness function J incorporates the absolute integral of the accumulated temperature error to measure the overall magnitude of the error during the entire control process, improving system accuracy. The second term incorporates the absolute integral of the error rate of change to adjust the response speed and improve system stability. The third term incorporates the square integral of the overshoot to penalize and directly limit overshoot, minimizing overshoot. Ultimately, the optimal PID parameters are found, resulting in better control performance for the energy storage battery container system.

[0089] The design is based on PID control and combines the HLOA algorithm to optimize and adjust the PID controller parameters in real time. The expression of PID control is:

[0090]

[0091] Where e(t) is the temperature deviation, t and t i is the current time and the initial time, k p 、k i 、k d Represents the proportional, integral and derivative gains respectively.

[0092] The optimization and adjustment process is carried out within a specified period. The temperature deviation is used as the input signal of the controller. The parameters of the PID controller are optimized in real time using the HLOA algorithm. The optimized parameters are then input into the PID controller to perform control operations.

[0093] like Figure 2 As shown, the process of optimizing the parameters of the PID controller in real time using the improved HLOA algorithm in step S3 includes:

[0094] A1: Initialize the algorithm parameters, set the horned lizard population size, and introduce random perturbations through the improved Logistic Chaos Map dynamics model to generate a better initial population. The population generation is random and has chaotic characteristics, thus providing higher diversity and search capabilities.

[0095] Utilize the complexity and high sensitivity of chaotic systems to generate the initial population, improve the diversity of the initial population, and enhance the diversity and global search capability of the algorithm in the early stages of the search;

[0096] Logistic chaos mapping is a typical nonlinear dynamic system, and its dynamic model can be defined as

[0097] x n+1 =r·x n ·(1-x n )

[0098] Among them, x n represents the population proportion at time point n, r is the growth parameter that determines the dynamic behavior of the system;

[0099] While the numerically chaotic nature of the logistic map can improve population diversity to a certain extent, it still has limitations. Issues such as periodicity and pseudo-chaos can arise in the iterative sequence, leading to uneven coverage of the search space and thus compromising the algorithm's global search capabilities. To address this, the present invention introduces a random perturbation term based on the logistic chaotic map to enhance the ergodic nature of the chaotic sequence, maintain individual variability among horned lizards, and prevent premature convergence of the algorithm.

[0100] The improved Logistic chaotic map dynamic model is:

[0101] x n+1 =r·x n ·(1-xn )+δ·sin(10 6 ·x n )

[0102] Among them, δ·sin(10 6 x n ) is the perturbation term, and δ is the sub-precision perturbation coefficient. At this point, the generated initial population has a good distribution, which can effectively improve the global search capability of the optimization algorithm.

[0103] A2: For each individual in the population, calculate its fitness value as a measure of individual quality. After calculating the fitness value, select the best individual in the current population as a reference. This best individual will serve as the basis for subsequent algorithm optimization.

[0104] A3: Determine whether it is necessary to dynamically adjust the disturbance amplitude and stage weight according to the current state of the population; if necessary, the system will make corresponding adjustments; otherwise, it will directly proceed to step A4;

[0105] Dynamic adjustment of the perturbation amplitude can balance the algorithm's global exploration capabilities in the early stages and local development capabilities in the later stages, making the distribution of individuals in the search space more reasonable, thereby effectively avoiding falling into local optimal solutions and improving overall optimization performance. However, excessive perturbations may cause confusion in the search direction and affect the convergence speed; excessively small perturbations may not be enough to escape the local optimum. Therefore, an adaptive perturbation strategy is adopted to dynamically change the perturbation intensity as the optimization process progresses.

[0106] To improve the adaptability of the Horned Lizard Optimization Algorithm in diverse interference environments, this paper adjusts the execution weights of each HLOA phase based on the interference intensity. This method dynamically adjusts the execution weights of the stealth and escape phases of the HLOA algorithm based on the external interference intensity S. By adaptively adjusting the execution weights of these phases based on the external interference intensity S, the algorithm improves convergence accuracy in low-interference environments and enhances global exploration capabilities in high-interference environments, preventing the algorithm from falling into local optima.

[0107] Dynamic adjustment of the disturbance amplitude includes:

[0108] The disturbance factor α is designed as the adjustment control variable to gradually decay during the optimization process and be affected by environmental factors. The random disturbance factor α is

[0109]

[0110] Among them, α min and α max is the upper and lower limits of disturbance fluctuation; β is the attenuation coefficient, which controls the speed at which the disturbance decreases with the number of iterations, f bestis the most adaptable normalized value. When the optimization approaches the optimal solution, the disturbance amplitude is automatically reduced to improve the convergence accuracy. S is the external interference intensity. The greater the intensity, the greater the disturbance.

[0111] The external interference intensity S is expressed as

[0112]

[0113] Among them, A is the amplitude, which indicates the magnitude of the external interference intensity; ω is the frequency of the external interference intensity, which indicates the rate of change of the external interference intensity; σ 2 is the variance of the actual temperature deviation, which indicates the influence of the external interference intensity on the system stability; c1, c2, and c3 are weight factors.

[0114] The stage weights include the stealth stage weight and the escape stage weight, which are dynamically adjusted based on the external interference intensity S;

[0115] During the temperature control optimization process for energy storage battery containers, when external interference intensity is low, the population fitness distribution is relatively uniform, and the algorithm enters the local search phase. The temperature state of the energy storage battery container is relatively stable, and the temperature deviation is small. In the stealth phase, under low external interference intensity, the algorithm mainly converges to the optimal solution. Increasing the weight of this phase makes the algorithm more inclined to make fine adjustments near the optimal solution, thereby improving control accuracy and convergence speed.

[0116] Dynamically adjusted secret phase weight ω mimicry for

[0117] ω mimicry =ω1+γ(1-S)

[0118] Among them, ω1 is the basic weight of the hidden stage; γ is the first weight adjustment coefficient, which determines the magnitude of the weight change in the hidden stage;

[0119] During the optimization of energy storage battery container temperature control, when external interference intensity is high, the temperature state of the energy storage battery container is greatly affected by external factors, the algorithm population diversity is reduced, and it is trapped in a local optimal solution, and the temperature may deviate significantly. In the escape phase, random jumps are increased under external interference intensity to explore a larger search space. The execution weight of escape behavior is increased, so that individuals randomly jump within a larger solution space, thereby expanding the search range and avoiding premature convergence.

[0120] Dynamically adjusted escape phase weight ω escape for

[0121] ω escape =ω2+λS

[0122] Among them, ω2 is the basic weight in the escape stage; λ is the second weight adjustment coefficient, which determines the amplitude of the weight change in the escape stage.

[0123] A4: Further enhance the diversity of the population through escape behavior, so that the search process can avoid local optimal solutions. After completing the above behavior, update the current population status and prepare for the next round of evolution. Determine whether the set responsiveness threshold is reached. If the condition is met, the algorithm stops and outputs the currently found optimal solution.

[0124] Example 2:

[0125] In order to verify the effect of the method of the present invention, the following experiments and analyses were performed in this embodiment:

[0126] The experimental hardware environment consisted of an Intel(R) Core(TM) i5-8400 CPU @ 2.80GHz, 16GB of RAM, and a 512GB hard drive. The operating system was Windows 11, and the programming environment was Matlab 2022b. To verify the optimization performance of the improved horned lizard algorithm, five typical test functions were selected: the Ackley function (f1), the Sphere function (f2), the Rastrigin function (f3), the Griewank function (f4), and the Rosenbrock function (f5). Performance simulations were performed in Matlab and compared with the basic horned lizard algorithm. To reduce the impact of algorithmic randomness on the experiment, 30 independent randomized experiments were conducted for each function group. The initial population parameters of the experimental horned lizards were all set to N = 30. As shown in Table 1, due to the addition of strategies such as the chaotic initialization strategy, the improved HLOA algorithm significantly outperformed the basic HLOA algorithm in terms of average convergence times. The basic HLOA algorithm converged slowly during multiple optimizations and was prone to falling into local optimal solutions, resulting in a higher number of iterations required for convergence. In the improved HLOA, the chaos initialization strategy generates an initial population with higher diversity by introducing the improved Logistic chaotic map, which effectively increases the distribution range of the population, thereby improving the global search capability, enhancing the optimization performance, and improving the convergence and stability of the algorithm.

[0127] Table 1

[0128]

[0129]

[0130] To verify the effectiveness of the proposed method for temperature control in energy storage battery containers, temperature control simulation tests were conducted under different interference conditions and the test results were compared with empirical PID control. The proposed PID parameters were Kp = 1.5584, Ki = 1.0241, and Kd = 0.8635; the HLOA-PID parameters were Kp = 1.3251, Ki = 1.4127, and Kd = 0.6238; and the empirical PID parameters were Kp = 0.6358, Ki = 0.9265, and Kd = 1.1587.

[0131] Figure 3 and Figure 4 is the step response control result of the temperature control of the energy storage battery container. Figure 3 and Figure 4 It can be seen that all three methods can track the desired temperature, but the method of the present invention adopts dynamic adjustment of the disturbance amplitude. The optimization algorithm applies a larger disturbance in the early stage and adds a disturbance factor as a regulating variable to achieve dynamic adjustment of the disturbance amplitude, thereby improving the early search capability and convergence accuracy of the algorithm. In addition, a dynamic adjustment stage weight strategy is adopted to increase the weight of the local search stage and improve the temperature control accuracy in the absence of interference. The maximum cooling intensity of the method of the present invention is 3400W, and the cooling intensities of the empirical PID and basic HLOA-PID are 3800W and 3650W, respectively. In comparison, the method of the present invention reduces by 11.76% and 7.35%, respectively, and no obvious oscillation is manifested during the control process; the PID parameters can quickly adapt to the target temperature of the temperature control of the energy storage battery container. In terms of response speed, the PID provided by the present invention is significantly better than the traditional PID control. The cooling intensity of the method of the present invention tends to 0 at 65 seconds, which is improved by 23.0% and 12.3% compared with 80 seconds and 73 seconds of the empirical PID and basic HLOA-PID, respectively. This is because the improved logistic chaotic mapping in the method of the present invention introduces random interference terms to enhance the ergodicity of the chaotic sequence and escape the local optimum of the algorithm; the algorithm chaos initialization improves the global search speed of the algorithm, thus reaching the target temperature faster than the basic HLOA-PID.

[0132] Figure 5 and Figure 6 is the step response control result under external interference. Figure 5 and Figure 6It can be seen that in the presence of interference, the empirical PID control has a large steady-state error when dealing with external interference, has limited anti-interference ability, and the temperature is difficult to return to the target value under the influence of interference; in contrast, the control parameters of the method of the present invention are optimized according to the intensity of external interference, and an adaptive disturbance strategy is introduced. The disturbance intensity changes dynamically with the optimization process, reducing the impact of external interference on system stability. The energy storage battery container temperature controller corrects temperature errors more quickly, with a maximum cooling intensity of 4700W. The maximum cooling intensities of the empirical PID and basic HLOA-PID are 5400W and 5100W, respectively, which are reduced by 14.89% and 8.51%, respectively, to ensure temperature stability. The disturbance amplitude of the method of the present invention changes adaptively with the optimization process, and the stability of the control system is enhanced when external interference changes. Compared with the traditional fixed disturbance strategy, it has better robustness and stronger adaptability, enabling the system to adjust more quickly. The cooling intensity of the method of the present invention tends to 0 at 76s, which is improved by 19.73% and 10.53% compared with 91s and 84s of the empirical PID and basic HLOA-PID, respectively, and reduces the overshoot and adjustment time.

[0133] Figure 7 and Figure 8 This is the temperature control result of the energy storage battery container temperature controller in response to external interference. Figure 7 and Figure 8 As can be seen, the experiment uses a single-step optimization method to update the control parameters online to ensure the real-time performance of the algorithm. To balance computational efficiency and optimization performance, the population size N is limited to 30 during the single-step optimization process. This effectively reduces the computational effort while appropriately sacrificing some optimization accuracy, ensuring the algorithm can run stably in real-time control scenarios.

[0134] The algorithm adopts a strategy of dynamically adjusting the disturbance amplitude. The method of the present invention introduces a dynamic stage weight adjustment strategy based on interference intensity. Under different interference intensities, the execution weights of the stealth stage and the escape stage are adaptively adjusted. When the interference is high, local search is performed to ensure fine adjustment of the control parameters, reduce temperature errors, and improve temperature control accuracy. The highest temperature in the method of the present invention is 29.1°, which is 7.21% and 4.12% lower than the 31.2° of the empirical PID and 30.3° of the basic HLOA-PID, respectively. The oscillation amplitude is small and the anti-interference ability is strong. When the interference is low, the global search ability is enhanced and the algorithm convergence speed is accelerated. Therefore, the method of the present invention responds faster to changes in square wave signals. The cooling intensity tends to 0 after 5.1s. Compared with the 7.3s of the traditional empirical PID and the 6.2s of the basic HLOA-PID, the method of the present invention is improved by 43.1% and 21.57%, respectively. It has a shorter adjustment time and a faster response speed, which can effectively improve the temperature control performance of energy storage battery containers in practical applications.

[0135] It can be seen from the above simulation test results that the method of the present invention can achieve precise control of the temperature of the energy storage battery container regardless of whether there is interference or not, has excellent adaptive ability, and can effectively meet the adaptive control requirements of the energy storage battery container temperature.

Claims

1. A temperature control method for an energy storage battery container based on an improved horned lizard algorithm to optimize PID, characterized in that: The steps include: S1: Build a container energy storage battery temperature control system based on the established container energy storage battery temperature control model; S2: Collect the output temperature data of the container energy storage battery temperature control system in real time, compare the collected output temperature data with the set temperature data, and calculate the temperature error; S3: Based on the temperature error, the parameters of the PID controller are optimized in real time using the improved HLOA algorithm; S4: The temperature of the energy storage battery container is controlled by the PID controller after parameter optimization.

2. The energy storage battery container temperature control method based on the improved horned lizard algorithm to optimize PID according to claim 1 is characterized in that: The establishment of the container energy storage battery temperature control model in step S1 includes: The algorithm is co-simulated with the Simulink model to establish a container energy storage battery temperature control model. Lithium batteries generate heat during the charging and discharging process. The Bernardi equation of the container energy storage battery heat generation model is: Among them, Q g is the heat generated by the battery, I is the battery charge and discharge current, EOC is the battery open circuit voltage, E is the terminal voltage, Tb is the battery temperature, R is the battery internal resistance, is the entropy thermal coefficient of the battery; Establishing temperature control error e=ΔT=T c -T t Among them, T c is the current temperature of the battery, T t is the target temperature to be controlled; the deviation between the temperature observation value at time t+1 and the previous time is Δe=e(t+1)-e(t).

3. The energy storage battery container temperature control method based on the improved horned lizard algorithm to optimize PID according to claim 2 is characterized in that: In step S3, PID parameters are optimized according to the fitness function J to find the optimal PID parameter values. The fitness function J is expressed as: Among them, μ1, μ2, and μ3 are weighting coefficients; e M (t) is the overshoot, which can be expressed as 4. The energy storage battery container temperature control method based on the improved horned lizard algorithm to optimize PID according to claim 3 is characterized in that: In step S3, the PID controller parameters are optimized and adjusted in real time based on the PID control and combined with the HLOA algorithm. The expression of PID control is: Where e(t) is the temperature deviation, t and t i is the current time and the initial time, k p 、k i 、k d Represents the proportional, integral and derivative gains respectively.

5. The energy storage battery container temperature control method based on the improved horned lizard algorithm to optimize PID according to claim 4 is characterized in that: The process of optimizing the parameters of the PID controller in real time using the improved HLOA algorithm in step S3 includes: A1: Initialize the algorithm parameters and introduce random perturbations through the improved Logistic chaotic map dynamics model to generate a better initial population; A2: For each individual in the population, calculate its fitness value as a measure of individual quality. After calculating the fitness value, select the best individual in the current population as a reference. This best individual will serve as the basis for subsequent algorithm optimization. A3: Determine whether it is necessary to dynamically adjust the disturbance amplitude and stage weight according to the current state of the population; if necessary, the system will make corresponding adjustments; otherwise, it will directly proceed to step A4; A4: Further enhance the diversity of the population through escape behavior, so that the search process can avoid local optimal solutions. After completing the above behavior, update the current population status and prepare for the next round of evolution. Determine whether the set responsiveness threshold is reached. If the condition is met, the algorithm stops and outputs the currently found optimal solution.

6. The energy storage battery container temperature control method based on the improved horned lizard algorithm to optimize PID according to claim 5 is characterized in that: The improved Logistic chaotic map dynamics model in step A1 is: x n+1 =r·x n ·(1-x n )+δ·sin(10 6 ·x n ) Among them, δ·sin(10 6 x n ) is the disturbance term, and δ is the sub-precision disturbance coefficient.

7. The energy storage battery container temperature control method based on the improved horned lizard algorithm to optimize PID according to claim 5 is characterized in that: The dynamic adjustment of the disturbance amplitude in step A3 includes: The disturbance factor α is designed as the adjustment control variable to gradually decay during the optimization process and be affected by environmental factors. The random disturbance factor α is Among them, α min and α max is the upper and lower limits of disturbance fluctuation; β is the attenuation coefficient, which controls the speed at which the disturbance decreases with the number of iterations, f best is the most adaptable normalized value; S is the external interference intensity.

8. The energy storage battery container temperature control method based on the improved horned lizard algorithm to optimize PID according to claim 5 is characterized in that: The external interference intensity S in step A3 is expressed as Among them, A is the amplitude, which indicates the magnitude of the external interference intensity; ω is the frequency of the external interference intensity, which indicates the rate of change of the external interference intensity; σ 2 is the variance of the actual temperature deviation, which indicates the influence of the external interference intensity on the system stability; c1, c2, and c3 are weight factors.

9. The energy storage battery container temperature control method based on the improved horned lizard algorithm to optimize PID according to claim 5 is characterized in that: The stage weights in step A3 include the stealth stage weight and the escape stage weight, which are dynamically adjusted based on the external interference intensity S; Dynamically adjusted secret phase weight ω mimicry for oh mimicry =ω1+γ(1-S) Among them, ω1 is the basic weight of the hidden stage; γ is the first weight adjustment coefficient, which determines the magnitude of the weight change in the hidden stage; Dynamically adjusted escape phase weight ω escape for oh escape =ω2+λS Among them, ω2 is the basic weight in the escape stage; λ is the second weight adjustment coefficient, which determines the amplitude of the weight change in the escape stage.