Improved electrical coupling integrated energy system based on particle swarm optimization

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 pre-liminary 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 algo-rithm 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 multiobjective 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 electricallycoupled 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, multiobjective 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 .η Gi.e represents power generation efficiency, η Gi.h represents thermal efficiency, η Gi.en rep- resents rated power generation, and η 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 ′ 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). (1) .
(2) In Eq. ( 2), η 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), η 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 con- sumption 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; η p2g is the gas production efficiency, and p et is the power consumption.Most of them come from PPG.In an electrically (3) (5) p gt = η p2g p et .

Fig. 2 Generation efficiency curve
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 αβ is the coupling matrix, and P α and L β 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.η MT .ceand η MT .ghare 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 (6) Fig. 3 Energy hub that all devices are properly and securely connected 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 parti- cle, and the number of population is N .The instantaneous position and velocity of parti- cles 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 (8) 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 (10) Fig. 5 The process of SA algorithm 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 mecha- nism, 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 ′ 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). (11 x 2 i − 10 cos(2π x i ) + 10 .
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 algo- rithm 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, realworld 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 (14 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 Fig. 11 Summer, winter cold and heat load demand and PPG 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 Fig. 12 Consider increasing the electrical balance of photovoltaic power system equipment 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.

Fig. 1
Fig. 1 Electrical coupling IES network basic architecture diagram

Fig.Fig. 8
Fig. The index comparison of PSO algorithm before and after improvement

Fig.
Fig. Comparison of response speed accuracy

Table 1
The optimization outcomes of these algorithms are compared with the objective of comprehensive cost