- Research
- Open access
- Published:

# Improved electrical coupling integrated energy system based on particle swarm optimization

*Energy Informatics*
**volumeÂ 7**, ArticleÂ number:Â 9 (2024)

## Abstract

The rational utilization of energy is an important issue for sustainable development. Electrically coupled integrated energy systems can enhance energy utilization efficiency and reduce energy costs. However, traditional integrated energy system optimization has problems with local optima and slow convergence speed, which cannot fully utilize energy resources. Therefore, this study proposes an improved electrical coupling integrated energy system on the ground of particle swarm optimization algorithm. In response to the problems of local optima and slow convergence speed in traditional optimization algorithms, particle swarm optimization algorithm is introduced for system optimization. By combining PSO with simulated annealing algorithm, the possibility of PSO in global optimization is reduced. The local search ability of PSO and the global search ability of simulated annealing algorithm are used to find the optimal solution. The particle swarm optimization algorithm is used for preliminary search. When the particle falls into the local optimal, the simulated annealing algorithm is introduced for global search, and the particle is guided to jump out of the local optimal and continue searching. The experiment demonstrates that the improved algorithm has certain advantages in solving test functions. The variance, mean, and optimal values are 0.00125, 0.13874, and 0.105531, respectively, which are all better than the particle swarm optimization algorithm. The simulated annealing algorithm improved the particle swarm optimization algorithm with a high accuracy index, which eventually stabilized above 0.9, and the recall index also remained above 0.8. After 100 iterations, it had already fallen into a local optimal solution. By applying the improved hybrid optimization algorithm to the electrically-coupled integrated energy system, the distribution of various energy sources can be managed and optimized more effectively, and the overall performance of the system can be improved. Especially when dealing with complex energy scheduling and distribution problems, the algorithm can provide more stable, efficient and reliable solutions. This study can achieve efficient operation and optimized scheduling of integrated energy systems, reduce energy consumption and environmental pollution, and reduce energy costs. And it can improve the reliability and stability of energy supply, which has important application value and research significance.

## Introduction

With the excessive dependence and consumption of fossil energy, its reserves are decreasing day by day, coupled with the increasingly serious environmental problems, global warming, sea level rise, biodiversity reduction and other phenomena are becoming more prominent. This makes the development and utilization of renewable energy and clean energy gradually become the focus of global attention, and countries have incorporated it into their national development strategies in order to achieve sustainable development (Tsai and Fredrickson 2022). In China, the government attaches great importance to the development of renewable energy and clean energy. In recent years, China has made remarkable achievements in the fields of solar energy, wind energy, water energy and biomass energy. In addition, China is also actively promoting the adjustment of energy structure, increasing investment in clean energy, and trying to reduce dependence on fossil energy. The development and utilization of renewable energy and clean energy can not only help alleviate the global energy crisis and environmental problems, but also promote economic growth, improve people's living standards, and reduce carbon emissions. However, the development of renewable energy and clean energy still faces many challenges, such as technical bottlenecks, insufficient investment, and insufficient policy support (Usman and Abdullah 2023). Therefore, governments need to take effective measures to increase investment in scientific research, improve policy systems, improve market competitiveness, and further promote the development of renewable energy and clean energy. At present, the research in the field of energy informatics is important and timely. With the development of energy system and information technology, energy informatics has become an interdisciplinary field, involving energy, information, control and other aspects (Xia et al. 2022). In the optimization design and operation control of energy system, intelligent optimization algorithms such as particle swarm optimization algorithm are more and more widely used. By introducing intelligent optimization algorithm, the global optimization and intelligent control of the energy system can be realized, and the energy utilization efficiency and system stability can be improved. At the same time, with the development of the Internet of Things, cloud computing and other technologies, the research in the field of energy informatics is also deepening. The development of these technologies provides more possibilities and technical support for the optimization of energy systems. An electrically coupled integrated energy system can combine wind energy, solar energy, fossil energy and other energy sources to achieve optimal allocation and efficient utilization of energy (Redfoot et al. 2022). However, the optimal design and operation control of electrically-coupled integrated energy systems still face many challenges, such as multi-objective optimization, uncertainty processing, dynamic response, etc. (He et al. 2022). Therefore, this paper proposes an improved electrically-coupled integrated energy system based on PSO to improve the optimization effect of the system by introducing PSO to solve the current challenges and problems in the field of energy informatics. The main contribution of the research is to propose a method to improve the electrically-coupled integrated energy system. The introduction of particle swarm optimization makes the design and operation control of the electrically-coupled integrated energy system optimized. Through the intelligent search and optimization of system parameters and structure, the energy utilization efficiency of the system can be improved, energy consumption and environmental pollution can be reduced, and sustainable development can be achieved. There are many uncertain factors in the operation of the electrically-coupled integrated energy system, such as the fluctuation of energy supply and the change of market demand. Pso can learn and self-adapt in uncertain environment, adjust the operating state of the system according to real-time changes, and improve the robustness and stability of the system. Pso algorithm has fast dynamic response performance and can deal with various changes and disturbances in the system in time. This helps to improve the real-time responsiveness of electrically coupled integrated energy systems, enabling the system to better adapt to dynamically changing energy markets and environmental conditions. The article is separated into four parts. The first part is the literature review section, which discusses and analyzes the current research status of PSO algorithm and IESs at home and abroad. The second part proposes an improved PSO algorithm to optimize the IES. The third part verifies the effectiveness and performance of the IES through experiments. The fourth part is the summary section, summarizing the research results.

## Related works

Recently, PSO algorithm has been widely studied and applied globally, and has made many progress. Mirmohammadi et al. proposed using PSO and Salp Swarm algorithm to optimize the cascade parameters of a flexible three section square gas centrifuge, which affects the specific enrichment level of xenon enriched intermediate isotopes. The research outcomes illustrate that the PSO algorithm has the highest separation efficiency, at 77.57% (Mirmohammadi et al. 2022). Amiri et al. proposed an adaptive shehart type control chart (COC) to address the possibility of rapid changes from control state to runaway state in clear operational control rules. It uses PSO algorithm for determining the optimal value corresponding to the membership function of the COC parameters. The research results indicate that the proposed COC is more excellent than other COC in economic and statistical standards under changes in parameters at different locations and scales (Amiri et al. 2023). Dagal et al. presented an improved salp swarm optimization algorithm on the ground of PSO for maximum power point tracking. The research results indicate that the efficiency of this algorithm under uniform irradiation and fast tracking irradiation is 99.99%, 99.63%, and 99.24%, respectively (Dagal et al. 2022). Mai et al. proposed a hybrid method that includes interval type 2 semi supervised likelihood fuzzy c-means clustering and PSO for addressing the impact of observation conditions and image acquisition equipment accuracy on satellite images. The research results indicate that the matching accuracy of this algorithm ranges from 98.8% to 99.39%, which exceeds other matching algorithms (Mai et al. 2021). Bacar and Rawhoudine presented a new multi-objective discrete PSO algorithm for the production and distribution vehicle routing problem. The research results indicate that it can achieve the main optimization solution and has higher efficiency compared to other given technologies (Bacar and Rawhoudine 2021). For different optimization problems, Madhumala et al. proposed a combination of improved first fit descent algorithm and PSO algorithm to solve the optimal virtual machine packaging on active physical machines. The research results indicate that compared to existing algorithms, this algorithm provides an optimized solution (Madhumala et al. 2021). In order to improve energy efficiency and protect the environment, Ge et al. proposed a wavelet neural network model based on improved particle swarm optimization algorithm for short-term load forecasting of power system, and the research results showed that the model significantly improved the prediction accuracy and operation efficiency (Ge et al. 2021).

Recently, the electrical coupling IES has developed rapidly in the energy field and has made significant progress. Lan et al. established a data-driven state estimation model for the electrically coupled IES to address the low redundancy and high measurement error of measurement data in the system. The research results indicate that the algorithm simulation verifies the proposed method by comparing it with classical model driven state estimation methods (Lan et al. 2022). Regarding hydrogen as a potential solution in the future energy structure, Utomo et al. proposed an IES using hydrogen as the energy carrier and hydrogen storage as the energy carrier. The research results indicate that fuel cells and hydrogen storage systems minimize the import and export prices of electricity from the power grid (Utomo et al. 2021). Chapaloglou et al. studied the grid connected microgrid of sports center facilities in Barcelona through dynamic simulation, aiming to improve the independence of the main power grid by achieving high self-sufficiency and autonomous operation of building facilities. The research results indicate that integrated thermoelectric dynamic modeling can serve as a useful tool for designing adaptive energy management algorithms (Chapaloglou et al. 2021). Xu et al. proposed a real-time state estimation framework for gas-electric coupled systems to provide data support for energy management systems through state estimation. The research results indicate that this method has advantages in efficiency and accuracy (Xu et al. 2022). If the huge energy demand cannot be effectively managed, Alabi et al. proposed a deep reinforcement learning intelligent agent that integrates hyperparameter automatic selection features. The research results indicate that carbon dioxide removal technology is attractive at a carbon price of $400 to $450 per ton (Alabi et al. 2023). Wang et al. proposed a IES planning method that couples biomass and solar energy for rural areas, in response to the rich energy resources and sufficient spatial resources in rural areas. The research results indicate that the IES coupled with biomass and solar energy can save the total cost, decrease carbon emissions, and improve energy efficiency by 35.33% and 20.31%, respectively (Wang et al. 2022). Aiming at the problem that the coupling relationship of electric cooling and heating system is not considered in the design of current methods, resulting in low accuracy of load calculation results, Zuo et al. built a load model of electric cooling and heating system according to the coupling relationship of electric cooling and heating system, and used gray Wolf algorithm to calculate the optimal solution of the model to complete the modeling study of electric cooling and heating system of integrated energy system in coastal areas. The research results show that the model designed in this study can obtain accurate calculation results of the active and reactive power of the electric heating and cooling system, and the calculation of the load of the electric heating and cooling system takes a long time, is accurate and reliable (Zuo et al. 2020).

To sum up, in the existing research, the optimization of electrically-coupled integrated energy systems mainly focuses on individual components or subsystems, such as photovoltaic systems, energy storage systems, thermal systems, etc. Lack of comprehensive optimization of the whole system, resulting in the overall performance of the system can not be fully played. In the actual energy system, there are many uncertain factors, such as fluctuations in energy supply and changes in market demand. Existing studies often ignore the effects of these uncertainties on system performance. In the actual energy system, the operating parameters need to be adjusted in real time to adapt to the real-time changes. In order to fill in the gaps and shortcomings of the existing research, this paper adopts particle swarm optimization to carry out comprehensive optimization, multi-objective optimization, uncertainty processing and real-time optimization for the whole electrically-coupled integrated energy system. To improve the overall performance of the system, achieve the balance between multiple objectives, enhance the adaptability and robustness of the system to uncertainty, and achieve rapid response and efficient operation of the system. This will provide an important theoretical and practical basis for the further development and application of electrically-coupled integrated energy systems.

## Construction of an electrical coupled IES on the ground of PSO

The study first constructs an electrically coupled IES, and then optimizes the electrically coupled IES using PSO algorithm. However, the PSO algorithm falls into local minimum solutions during the search process and has a slow convergence speed. This study uses simulated annealing (SA) algorithm to improve the PSO algorithm.

### Construction of an electrically coupled IES

With the deterioration of people's living environment pollution, various countries have gradually increased their emphasis on energy conservation and emission reduction. IESs can achieve coupling between various energy systems, greatly improving their utilization efficiency and reducing carbon dioxide emissions. The electrically coupled IES is a coordinated operation of different energy supply equipment. The cost and economic parameters of system equipment have a direct or indirect impact on the investment and operation of the system (Murat et al. 2023; Gao et al. 2022). Therefore, it is necessary to model the mathematical model of the power supply device and analyze it, on the ground of which further research can be conducted. The rationale for selecting components and configurations combines efficiency and performance, compatibility, cost and return on investment, environment and security, scalability and maintainability, and technology maturity. Selecting high-efficiency, high-performance components ensures that the system achieves energy conversion and supply more quickly and accurately. Ensure that selected components and configurations are compatible with other devices or systems to avoid operational problems caused by incompatibilities. Select cost-effective components and configurations that meet performance and compatibility to reduce overall investment costs. Consider the environmental impact of components and configurations, such as carbon emissions, energy consumption, etc. At the same time, ensure that the selected components and configurations meet safety standards and do not pose a hazard to people and the environment. Select components and configurations that are easy to expand and maintain for future system upgrades or maintenance as needed. Select proven, technologically mature components and configurations to reduce the risk of technology immaturity. The research on the IES includes providing energy supply methods such as refrigeration demand, heating demand, power supply demand, and gas demand, as shown in Fig.Â 1.

In Fig.Â 1, the P2G device is a technology that can convert electrical energy into natural gas. The P2G device can use CO_{2} to synthesize methane, which enters the natural gas network and is converted into electricity and heat through a gas turbine (GT). The electricity is directly supplied to the user side through the power grid, as well as together with the power network, it meets the user's electricity load demand. By utilizing P2G conversion technology, renewable clean energy can be transformed into natural gas, thereby enabling energy coupling between the power grid and natural gas network. A GT is composed of three parts: an air compressor, a combustion chamber, and a GT. After compressing and mixing air and natural gas, the turbine blades are driven to rotate by high-temperature and high-pressure gas, generating electricity from the generator. The high-temperature gas can also be recovered by the waste heat device. The mathematical model of the tertiary efficiency of gas generators can reflect the accurate influence of the unit's efficiency on it. The mathematical model of GT efficiency is shown in Eq.Â (1).

In Eq.Â (1), \(F_{G,i,t}\) represents the gas consumption of the \(i\) th gas generator during period \(t\). \(\eta_{Gi.e}\) represents power generation efficiency, \(\eta_{Gi.h}\) represents thermal efficiency, \(\eta_{Gi.en}\) represents rated power generation, and \(\eta_{Gi.hn}\) represents rated thermal efficiency. \(a_{i}\), \(b_{i}\), \(c_{i}\), and \(d_{i}\) represent the efficiency coefficients of the \(i\)-th gas generator. \(a_{j}\), \(b_{j}\) and \(c_{j}\) represent the thermal efficiency coefficient of the gas generator, while \(P^{\prime}_{G,i,t}\) represents the power of the \(i\)th gas generator during the \(t\) period. The mathematical model of GT power generation is shown in Eq.Â (2).

In Eq.Â (2), \(\eta_{Gi.e}\) is the power generation efficiency of the GT. \(V_{g}\) serves as the natural gas consumption rate, and \(q_{g}\) is the natural gas calorific value. The mathematical model for the output power of GT waste heat is shown in Eq.Â (3).

In Eq.Â (3), \(\eta_{Gi.h}\) is the heating efficiency of the GT. The power generation efficiency curve of a micro GT is shown in Fig.Â 2.

A gas boiler is a nonlinear interconnected device that includes multiple input and output terminals, controlled through multiple internal circuits, and undergoes energy conversion. A gas boiler consists of three parts: water temperature control, flue gas system, and pressure control system. The output values of these three parts are adjusted to maintain a stable output by adjusting the gas volume and air supply volume at the input end. The mathematical model of a gas boiler is shown in Eq.Â (4).

In Eq.Â (4), \(Q_{gb}\) is the operating efficiency of the gas boiler. \(V_{g}\) serves as the natural gas consumption rate, and \(q_{g}\) serves as the calorific value of natural gas. The combination of P2G equipment and GTs improves the utilization efficiency of photovoltaic power generation (PPG) as well as reduces the energy fluctuations caused by natural factors. It can improve the efficiency of electricity utilization and convert electricity into gas devices. When there is abundant or intermittent energy in the system, the excess electrical energy is efficiently utilized and converted into natural gas energy for storage, achieving the transfer and consumption of the electrical energy system. Then it transfers the excess electrical energy to the gas power generation side for power generation, achieving coupling in the power system as well as the natural gas system. Its details are shown in Eq.Â (5).

In Eq.Â (5), at \(t\), \(p_{gt}\) is the gas production power; \(\eta_{p2g}\) is the gas production efficiency, and \(p_{et}\) is the power consumption. Most of them come from PPG. In an electrically coupled IES, it is essential for establishing a suitable mathematical model to describe the coupling process. Energy hubs usually use matrices to describe the mutual conversion between electricity, gas, heat, and cold, which can intuitively describe the energy coupling relationship between systems. Solar and gas power grids utilize P2G devices, GTs, and gas boilers to convert electricity and natural gas, thereby achieving energy coupling. Its output terminals are electricity and thermal energy. The energy center model is a multi input, multi output IES with multiple energy conversion, regulation, and storage functions, as shown in Fig.Â 3.

The main research focuses on GTs as the coupling equipment of the system. The main energy source of GTs is natural gas. When thermal energy cannot meet the needs of users, it can be supplemented by other energy supply equipment. The output matrix is shown in Eq.Â (6).

In Eq.Â (6), \(C_{\alpha \beta }\) is the coupling matrix, and \(P_{\alpha }\) and \(L_{\beta }\) represent the energy input output matrix. The energy hub model consisting of transformers, GTs, and gas boilers has a coupling coefficient matrix as shown in Eq.Â (7).

In Eq.Â (7), \(L_{e}\) and \(L_{h}\) represent the electrical load and thermal load, while \(p_{e}\) and \(p_{g}\) represent the input values of electricity and natural gas, respectively. \(\eta_{MT.ce}\) and \(\eta_{MT.gh}\) are the efficiency of converting GTs into thermal energy, respectively, and \(v_{MT}\) is the natural gas distribution coefficient. According to the above requirements and system objectives, an electrically coupled integrated energy system is designed. According to the design requirements, choose the appropriate energy supply equipment, such as photovoltaic panels, energy storage batteries, gas turbines, gas boilers, etc. Equipment selection should consider efficiency, cost, reliability and environmental adaptability. Install various devices and components according to the design layout. This requires ensuring that all devices are properly and securely connected to the energy network. After equipment installation, system integration and commissioning are carried out to ensure that all devices can work normally and cooperatively. During system operation, check and maintain the equipment regularly to ensure stable and efficient system operation.

### SA algorithm improved PSO algorithm for optimizing IESs

Due to the fact that the research model is a nonlinear hybrid model, and the basic PSO algorithm is relatively mature and convenient in solving nonlinear hybrid models, improvements have been made to the basic PSO algorithm. This is for further enhancing the accuracy of the model results. The PSO algorithm seeks the global optimal solution by simulating the movement and information exchange of particles in the search space. PSO algorithms usually use geometric concepts to express themselves more intuitively. In the \(D\)-dimensional space, the position and velocity of particles are shown in Eq.Â (8).

In Eq.Â (8), \(X_{i}\) serves as the position of the particle. \(V_{i}\) serves as the velocity of the particle, and the number of population is \(N\). The instantaneous position and velocity of particles are shown in Eq.Â (9).

In Eq.Â (9), \(r_{1}\) and \(r_{2}\) serve as random numbers with values between [0, 1]; \(c_{1}\) and \(c_{2}\) serve as individual learning factors and social learning factors; \(w\) serves as inertia weight, and \(pbest_{i} (t)\) and \(pbest(t)\) are local and global optimal solutions. The specific process of PSO algorithm is showcased in Fig.Â 4.

In Fig.Â 4, the velocity and position of particles are updated on the ground of the current velocity, historical optimal position, and population optimal position. The speed update decides the direction and distance of the particle's next movement. The position update decides the particle's new position. Due to the tendency of the basic particle swarm algorithm for falling into local minimum solutions and low convergence speed during the search process, the study uses the SA algorithm to improve the basic particle swarm. SA algorithm is a global optimization algorithm that simulates the gradual decrease in temperature during the solid-state annealing process. The basic idea of SA algorithm is for randomly perturbing the current solution and determine whether to accept a new solution on the ground of the difference in the objective function between the perturbed solution and the current solution. When the initial temperature is high, the probability of the algorithm accepting a poor solution is higher, which can escape the trap of local optimal solution (Beygzadeh et al. 2022; Yu et al. 2022). As the temperature gradually decreases, the algorithm gradually tends to accept better solutions until the temperature drops to the lowest and reaches the global optimal solution. The SA algorithm is shown in Fig.Â 5.

By combining PSO algorithm with SA algorithm, the possibility of PSO algorithm in global optimization can be reduced. In the initial stage, the SA algorithm needs to determine the initial temperature on the ground of the initial state of the population. In each iteration method, when the temperature decreases, the Mitro Poles criterion is used to determine whether the overall optimal solution in the system has been replaced by a new disturbance. Its expression is shown in Eq.Â (10).

In Eq.Â (10), \(E_{i} (k)\) serves as the internal energy of the \(i\)th particle at the \(k\)th iteration, which serves as the fitness value of the current particle. \(E_{g}\) serves as the optimal internal energy of the current population, and \(T_{i}\) represents the current temperature. Each iteration results in a certain degree of temperature decay, which is an alternating process of constantly seeking new solutions and slowly cooling. On this basis, a PSO optimization method using random weights is proposed, which ensures the convergence performance of the method by selecting appropriate parameters and eliminates the constraint on speed. In the velocity correction formula, particles will move in the optimal direction, which will cause uneven distribution of particles and reduce the overall performance of the search. For enhancing the capability of this method for avoiding getting stuck in local minima, one can select a location from numerous regions and record it to replace existing formulas. The formula for speed and location is shown in Eq.Â (11).

A well performing \(p_{i}\) should have a higher chance of selection. By utilizing the mechanism, the difference between \(p_{i}\) and \(p_{g}\) is treated as a specific ratio difference, and the relative jump probability of \(p_{i}\) relative to \(p_{g}\) at temperature \(t\) can be counted, as shown in Eq.Â (12).

In Eq.Â (12), \(e^{{ - (f_{pi} - f_{pg} )/t}}\) represents the probability of sudden jumps, and \(N\) represents the population size. Adopting a roulette strategy, the roulette algorithm includes individual selection probability and cumulative probability. Due to the fact that the SA algorithm mainly simulates the process of object temperature annealing, which is similar to the process of cumulative probability, cumulative probability is chosen for probability calculation to determine a globally optimal alternative value \(p^{\prime}_{g}\) among all \(p_{i}\). The flowchart of SA improved PSO solution is shown in Fig.Â 6.

In Fig.Â 6, the research algorithm increases the search domain during solving, which has a positive promoting effect on the basic particle algorithm that fails to break through local solutions and increases the probability of solving. The study used two classic test functions, Rastigrin and Rosenbrock, to compare the basic PSO algorithm and SA improved PSO algorithm in the experimental stage. The Rastigrin function is shown in Eq.Â (13).

The Rastigrin function is a multimodal function with a global minimum value of 0 taken at \((x_{1} ,x_{2} ,...,x_{n} ) = (0,0,...,0)\). The Rosenbrock function is shown in Eq.Â (14).

The Rosenbrock function serves as a peak free function with a global minimum value of 0 taken at \((x_{1} ,x_{2} ,...,x_{n} ) = (1,1,...,1)\). When using particle swarm optimization algorithm to optimize the test function, the same random particle swarm can be used to reduce the influence of random properties on the initial data. The particle swarm size is set to 30, which provides enough variety without making the calculation too complicated. The inertia weight is set to 0.7 to balance global and local search. The cognitive acceleration constant affects the speed at which a particle moves toward its individual optimal position. c1 set to 1.5 means that the particles will be attracted to a certain degree, towards their own historical best position. The social acceleration constant affects the speed at which particles move toward the optimal position of the group. c2 is also set to 1.5, indicating that the particles are also attracted to the optimal position of the group. The maximum number of iterations is set to 1000, which is a relatively large value that allows the algorithm enough time to find a good solution. However, real-world applications may need to adjust this value based on the complexity of the problem and computational resources. Random seeds can take any fixed value, the study takes 42. In summary, by introducing simulated annealing algorithm to improve PSO, it can be more suitable for optimizing integrated energy system. This improved method combines the ability of global search and local search, and can keep the probability of multiple solutions in the search process, so as to find the global optimal solution more effectively. This helps to improve the optimization effect and performance of the integrated energy system, and achieve efficient use of energy and sustainable development.

## Performance analysis of SA algorithm improved PSO for IES optimization

To test the performance of SA algorithm in improving PSO, this study compared and analyzed the improved PSO algorithm with conventional PSO algorithm, ant colony algorithm, quantum fireworks algorithm, and knowledge transfer Q-learning algorithm. Finally, plan and analyze the electrical coupling IES.

### Performance comparison of SA algorithm improved PSO

When optimizing the experimental function, the PSO algorithm uses the same random particle swarm to reduce the impact of random attributes on the initial data. To reduce the effect of random properties on the initial data, the same random particle swarm is used. The particle swarm size is set to 30, which maintains sufficient diversity without increasing computational complexity. The inertia weight is set to 0.7 to achieve the balance of global and local search. c1 and c2 are set to 1.5, respectively, causing the particles to move toward both the individual and group optimal positions. The maximum number of iterations is set to 1000, allowing the algorithm enough time to find a good solution. Random seed fixed at 42. To test the convergence, two different methods were used and the method was tested more than 100 times. It compares the best value, variance, and optimal mean with the 100 best values, as shown in Fig.Â 7.

In Fig.Â 7, the proposed improved algorithm has certain advantages in solving the test function. The variance, mean, and optimal values are 0.00125, 0.13874, and 0.105531, respectively, all better than the PSO algorithm. For testing the improved PSO electrical coupling energy system, the accuracy, recall, and average fitness of the improved PSO will be compared and analyzed with the PSO without improvement. Its details are shown in Fig.Â 8.

In Fig.Â 8a shows the accuracy, recall, and average fitness of the SA algorithm in improving PSO. It indicates that the accuracy index is relatively high, eventually stabilizing above 0.9, and the recall index is also above 0.8. After 100 iterations, it has already fallen into a local optimal solution. In (b), the precision and recall of conventional PSO are around 0.7â€“0.8, which leads to premature local optima. This indicates that the improved PSO has a higher accuracy than before. The response speed and accuracy of SA algorithm, PSO algorithm and SA improved PSO algorithm were compared, as shown in Fig.Â 9.

In Fig.Â 9a, the response speed of SA improved PSO algorithm is in the interval of 0.10â€“011Â s, which is faster than that of SA algorithm and PSO algorithm. In Fig.Â 9b, the accuracy of SA improved PSO algorithm finally stabilized above 80%, which was higher than that of SA algorithm and PSO algorithm. The application of 5G communication technology in smart grid automation performs well in terms of response speed and accuracy. To demonstrate the performance of improved PSO (Method 1) more scientifically, this study analyzed and compared it with the pre improved PSO algorithm (Method 2), ant colony algorithm (Method 3), quantum fireworks algorithm (Method 4), and knowledge transfer Q-learning algorithm (Method 5). The average accuracy and accuracy comparison are shown in Fig.Â 10.

In Fig.Â 10, Method 1, which improves the PSO algorithm, has the most excellent accuracy, achieving 96.8%. The average accuracy of the improved PSO algorithm is also the most excellent, achieving 95.6%. The average accuracy of Algorithm 2 is 83%; Algorithm 3 is 90%; Algorithm 4 is 88%, and Algorithm 5 is 89%. The improved PSO algorithm has higher average accuracy than all four models. Therefore, improving the PSO algorithm results in better performance. However, the limitations of the algorithm's performance remain. For complex multi-peak optimization problems, the improved PSO algorithm may still fall into local optimal solutions. In addition, how to select the appropriate parameters and adjust the algorithm's strategy according to the characteristics of the problem are also potential areas for future improvement. In order to further improve the performance of the improved PSO algorithm, we can consider combining other intelligent optimization algorithms or introducing new ideas and methods to achieve better optimization results.

### Planning and analysis of electrically coupled IES

It applies the electrical coupling IES proposed by the research institute to the energy supply system of a certain park in northern China. When choosing the North China Park as the case study object, the following factors were mainly considered. The northern region is one of the important regions of energy consumption in China and is representative. The energy supply system of the park can reflect the actual situation and characteristics of energy supply in the northern region, and provide real and reliable data support for research. The North Park has a certain diversity in the demand for thermal and cold power loads, which is in line with the application scenario of the electrically-coupled integrated energy system. By studying the energy supply system of the park, the practical application effect of the electric-coupled integrated energy system can be verified better. Choosing a park with complete power supply data for case study can obtain accurate load demand and power supply data for model verification and optimization analysis. Considering the future scalability in other regions or different types of energy systems, selecting a representative northern park for case study can provide reference and reference for future applications in other regions. The scheme was validated by simulating the load demand and power supply data of a certain park. It analyzes the investment and operating costs, and the carbon trading costs on an annual basis. 1000 iterations and 200 groups were set. Two typical working days of the summer and winter cooling, heating, and electricity load demand and PPG in the community are used as representatives. The demand for cooling, heating and electricity load and PPG on a certain day in summer and on a certain day in winter are shown in Fig.Â 11.

In Fig.Â 11a represents the demand for cooling and thermal power load and PPG on a certain day in summer, and (b) represents the demand for cooling and thermal power load and PPG on a certain day in winter. This indicates that after the application of the electrically coupled IES, it is possible to visually observe the cooling, heating, and PPG loads. The cooling load in summer is stronger, the heating load in winter is stronger, and the predicted photovoltaic values in summer are also higher. It compares the optimization outcomes of the above five algorithms with the goal of comprehensive cost, as showcased in TableÂ 1.

In TableÂ 1, if the cost of solar power generation devices is included in investment costs, combined with carbon dioxide trading costs, it will have a positive impact on the environmental costs of the entire system, thereby further reducing the cost of the entire system. This indicates that the improved method is much better than the basic PSO algorithm. Further research will be conducted on the planning and analysis of the electrically coupled IES, considering increasing the equipment balance of the PPG system as shown in Fig.Â 12.

In Fig.Â 12, it can be seen that from 7 to 18 oâ€™clock, the PPG reaches its maximum, the GT power generation decreases, and from 19 to 6 oâ€™clock, the GT power generation increases. This indicates that after considering increasing the power of PPG, the power generation of GTs is reduced during the output of photovoltaic equipment, and the use of natural gas is reduced, reducing operating costs, increasing carbon efficiency, and achieving the best economic effect. After considering the cost of purchasing and selling electricity and purchasing gas, electricity is purchased at the lowest cost to meet user needs, and electricity is sold at the highest cost to maximize system economic benefits. Although the research mainly focuses on the analysis of the energy supply system in the north China park, the proposed electric coupled integrated energy system has good versatility and scalability. The electrically-coupled integrated energy system is not limited by geography and can be applied worldwide. Energy needs and resource conditions may vary from region to region, but the system can be adapted and optimized according to local conditions to achieve the best energy supply results. Electrically coupled integrated energy systems can be applied to many types of energy systems, including but not limited to fossil and renewable energy sources. Through reasonable energy scheduling and control strategy, the complementary and optimal utilization of various energy sources can be realized, and the efficiency and reliability of the whole energy system can be improved. The system is suitable for energy supply systems of all sizes, from small distributed energy systems to large centralized energy systems. According to the actual demand and scale, the equipment and scale of the system can be flexibly configured and expanded to meet the needs of different levels of energy supply. Through continuous research and improvement, the system is expected to make an important contribution to the sustainable development of global energy.

## Conclusion

With the development of the energy field, it is necessary for enhancing the EUE of electrical coupling IES, reduce energy costs, and carry out intelligent control and optimization of the system. Therefore, a study has proposed an improved electrical coupling IES on the ground of PSO algorithm. The research results indicate that the improved algorithm has certain advantages in solving test functions. The variance, mean, and optimal values are 0.00125, 0.13874, and 0.105531, respectively, all better than the PSO algorithm. The SA algorithm improved PSO with a high accuracy index, which eventually stabilized above 0.9, and the recall index also remained above 0.8. By the time of 100 iterations, it had already fallen into a local optimal solution. The electrically coupled IES considers the cost of purchasing electricity and selling electricity, as well as the cost of purchasing gas. It purchases electricity at the lowest cost to meet user needs, and sells electricity at the highest cost to maximize system economic benefits. The improved electrical coupling IES can significantly enhance the EUE and economy of the system. The improved electrical coupling IES on the ground of PSO algorithm can achieve optimized design and operational control of the system, enhance the EUE, reliability and stability of the system, reduce carbon emissions, and reduce environmental pollution. This is of great significance for achieving sustainable development. The parameter selection of PSO has great influence on the performance of PSO. If the parameters are not selected properly, the algorithm may converge prematurely or fall into local optimal solutions. Therefore, in practical applications, the parameters need to be carefully adjusted and optimized. Pso performs well in global search, but needs to be strengthened in local search. For some complex optimization problems, it may be necessary to combine other local search techniques in the algorithm to improve the search accuracy and efficiency. In the future, we should further study how to apply the multi-objective optimization problem to the electrically-coupled integrated energy system to achieve the optimal performance of the system in multiple performance indexes. Research on how to integrate advanced communication and control technologies into an electrically-coupled integrated energy system to improve the intelligence and adaptability of the system.

## Availability of data and materials

The data are included in the manuscript.

## References

Alabi TM, Lawrence NP, Lu L, Yang Z, Bhushan GR (2023) Automated deep reinforcement learning for real-time scheduling strategy of multi-energy system integrated with post-carbon and direct-air carbon captured system. Appl Energy 333:120633

Amiri A, Salmasnia A, Zarifi M, Maleki MR (2023) Adaptive shewhart control charts under fuzzy parameters with tuned particle swarm optimization algorithm. J Indus Integr Manage 8(2):241â€“276

Bacar AHH, Rawhoudine SC (2021) An attractors-based particle swarm optimization for multiobjective capacitated vehicle routing problem. RAIRO Opera Res 55(5):2599â€“2614

Beygzadeh S, Torkzadeh P, Salajegheh E (2022) A two-stage structural damage detection method using dynamic responses based on Kalman filter and particle swarm optimization. Struct Eng Mech 83(5):593â€“607

Chapaloglou S, Nesiadis A, Atsonios K, Nikolopoulos N, Camara O (2021) Microgrid energy management strategies assessment through coupled thermal-electric considerations. Energy Convers Manage 228:113711

Dagal I, Akn B, Akboy E (2022) Improved salp swarm algorithm based on particle swarm optimization for maximum power point tracking of optimal photovoltaic systems. Int J Energy Res 46(7):8742â€“8759

Gao CJ, Sun YZ, Zhang HF (2022) Tunable dual-band linear-to-circular polarization conversion based on the electromagnetically induced transparency utilizing the graphene metamaterial. Phys E 141(1):115225â€“115236

Ge L, Li Y, Yan J, Wang Y, Zhang N (2021) Short-term load prediction of integrated energy system with wavelet neural network model based on improved particle swarm optimization and chaos optimization algorithm. J Modern Power Syst Clean Energy 9(6):1490â€“1499

He J, Wu Y, Wu M, Xu M, Liu F (2022) Two-stage configuration optimization of a novel standalone renewable integrated energy system coupled with hydrogen refueling. Energy Convers Manage 251:114953

Lan P, Han D, Xu X, Yan Z, Ren X, Xia S (2022) Data-driven state estimation of integrated electric-gas energy system. Energy 252:124049

Madhumala RB, Tiwari H, Devaraj VC (2021) Virtual machine placement using energy efficient particle swarm optimization in cloud datacenter. Cybernet Informat Technol 21(1):62â€“72

Mai DS, Ngo LT, Trinh LH, Hagras H (2021) A hybrid interval type-2 semi-supervised possibilistic fuzzy c-means clustering and particle swarm optimization for satellite image analysis. Inf Sci 548(2â€“3):398â€“422

Mirmohammadi S, Ezazi F, Mallah MH, Safdari J (2022) Selection of the best 3-section squared-off cascade to enrichment of the 126Xe and 131Xe using particle swarm optimization algorithm. Prog Nucl Energy 146:104153

Murat F, Kaymaz I, Sensoy AT, Korkmaz IH (2023) Determining the optimum process parameters of selective laser melting via particle swarm optimization based on the response surface method. Met Mater Int 29(1):59â€“70

Redfoot EK, Mckellar MG, Borrelli RA (2022) Allocating heat and electricity in an integrated energy system coupled with a water purification system. Nucl Eng Des 397:111902

Tsai CL, Fredrickson G (2022) Using particle swarm optimization and self-consistent field theory to discover globally stable morphologies of block copolymers. Macromolecules 55(12):5249â€“5262

Usman AM, Abdullah MK (2023) An assessment of building energy consumption characteristics using analytical energy and carbon footprint assessment model. Green Low-Carbon Econ 1(1):28â€“40

Utomo O, Abeysekera M, Ugaldeloo CE (2021) Optimal operation of a hydrogen storage and fuel cell coupled integrated energy system. Sustainability 13(6):1â€“17

Wang Y, Cai C, Liu C, Han X, Zhou M (2022) Planning research on rural integrated energy system based on coupled utilization of biomass-solar energy resources. Sustainable Energy Technol Assess 53:1â€“20

Xia G, Chen J, Tang X, Zhao L, Sun B (2022) Shift quality optimization control of power shift transmission based on particle swarm optimizationâ€“genetic algorithm. Proc Inst Mech Eng Part D J Automobile Eng 236(5):872â€“892

Xu D, Xu J, Wu Z, Hu Q (2022) A real-time state estimation framework for integrated energy system considering measurement delay. IET Gener Transm Distrib 16(14):2891â€“2902

Yu H, Zheng M, Zhang W, Nie W, Bian T (2022) Optimal design of helical flute of irregular tooth end milling cutter based on particle swarm optimization algorithm. Proc Inst Mech Eng Part C J Mech Eng Sci 236(7):3323â€“3339

Zuo X, Dong M, Gao F, Tian S (2020) The modeling of the electric heating and cooling system of the integrated energy system in the coastal area. J Coastal Res 103(SI):1022â€“1029

## Funding

No funding was received.

## Author information

### Authors and Affiliations

### Contributions

From the first draft to the final draft was completed by Lei Wang.

### Corresponding author

## Ethics declarations

### Ethical approval and consent to participate

Not applicable.

### Consent for publication

Not applicable.

### Competing interests

The authors declare no competing interests.

## Additional information

### Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

## Rights and permissions

**Open Access** This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.

## About this article

### Cite this article

Wang, L. Improved electrical coupling integrated energy system based on particle swarm optimization.
*Energy Inform* **7**, 9 (2024). https://doi.org/10.1186/s42162-024-00309-3

Received:

Accepted:

Published:

DOI: https://doi.org/10.1186/s42162-024-00309-3