Optimal Scheduling of Microgrids Considering Offshore Wind Power and Carbon Trading

: Offshore wind energy entering the grid in coastal areas creates issues with the safe and stable operation of power systems. To control the carbon emission of power systems and increase the proportion of offshore wind consumption, a microgrid optimization model considering offshore wind power and carbon trading is proposed in this paper. To avoid the defect of Particle Swarm Optimization (PSO) falling into the local optimum prematurely, the PSO algorithm is improved by dynamically decreasing inertia weights and chaos factors. Combined with the powerful optimization capability of the genetic algorithm (GA), the improved PSO-GA algorithm is used to solve the model. The simulation results show that the improved algorithm iterates 11 times before the parameters reach the optimal value, with high convergence accuracy. The proposed approach can increase the proportion of offshore wind consumption and ensure the optimal economic performance of the system while reducing the carbon emission.


Introduction
With the rapid development of the global industrial economy and the continuous growth in the population, carbon dioxide emissions continue to rise, leading to increasingly serious environmental problems [1,2].The goal of achieving a low-carbon transition by adjusting the energy layout has received global attention.On the one hand, solving the low-carbon problem by policy and economic means has become one method of achieving this objective.The carbon trading mechanism is applied to the renewable-energy power system scheduling model by establishing a carbon trading market to promote energy conservation, emission reduction, and low-carbon development [3].On the other hand, the large-scale grid connection of offshore wind power in coastal areas has become an important way to consume renewable energy on a large scale.However, the anti-peaking characteristic of offshore wind power output leads to huge peak pressure on power systems and it is a complicated problem to reasonably allocate the distributed power output within the microgrid [4].Therefore, it is of great significance to study a microgrid scheduling method considering an offshore wind turbine grid connection to promote the low-carbon development of power systems.
Novel renewable-energy power-generation systems may include different kinds of renewable energy resources such as wind, tidal, wave, and solar.These hybrid renewableenergy systems can be electrically combined to form a microgrid system.There are many studies on the optimization of microgrids containing offshore wind power.To improve the output characteristics of offshore wind power and to enhance the wind power accommodation, the author of reference [5] analyzes the output characteristics along the southern coast of China, and a solution to combine the power supply of the islanded microgrid with the offshore wind power accommodation is proposed.In [6], a planning method for offshore microgrids is proposed to minimize the investment cost, while the ocean renewable energy's fluctuation could be robustly accommodated.Considering the uncertainty of renewable energy, the bi-layer scheduling method is proposed in [7] to achieve economic and environmentally friendly operations.Actively guiding wind power to participate in power system scheduling is an important means of realizing the low-carbon goals of a power system [8,9].In [10], a wind power consumption cost model is established to provide a theoretical basis for the economic dispatch of offshore wind power.Optimal load allocation is a problem in microgrids containing offshore wind power, and the proposed load optimization allocation method in [11] can effectively reduce the operating cost of microgrids and promote their optimal operation.A comprehensive compensation cost model is established in [12] to address the volatility and forecast uncertainty of wind power in the scheduling process of a power system.By factoring economic, policy, and environmental factors into the cost consideration, the unit combination strategy of the power system containing wind power and its benefit assessment are given.A microgrid price mechanism is constructed in [13] for wind-power-containing systems to promote wind power consumption by incentivizing thermal power unit energy declaration.Meanwhile, the carbon trading mechanism as a low-carbon policy has become an important initiative to balance the low-carbon and economic aspects of the system.To reduce the carbon emissions generated by the power industry, carbon emissions can be introduced into the microgrid economic dispatch as dispatchable resources [14].The author of reference [15] incorporated wind power resources into the electricity market and carbon trading market, achieving significant economic and low-carbon benefits.Reference [16] guided users with green power demand to participate in microgrid scheduling in a market-oriented way and proposed an optimal scheduling strategy for microgrids that considers users' green power incentives.The proposed incentive mechanism and scheduling strategy reduces the operating cost of the microgrid itself while guiding the users to change their electricity consumption behavior, which effectively improves the green level of the microgrid.In [17], the carbon trading mechanism is introduced into the joint operation and scheduling of wind power and thermal power, which fully exploits the potential of thermal power units to reduce emissions, improve the wind power consumption rate, and reduce the carbon emissions and comprehensive costs of the system.The increasing scale of offshore wind power, its inherent strong randomness, and volatility and other uncertainty factors complicate the power system operation and scheduling model [18,19].
Modern heuristic optimization methods are powerful and effective tools for solving non-benign optimization problems and have proven their effectiveness in many fields [20,21].Some modern heuristic algorithms are also frequently applied in the field of power system optimization, such as Particle Swarm Optimization (PSO), the genetic algorithm (GA), and the Salp Swarm Algorithm (SSA).Although modern heuristic optimization algorithms cannot guarantee that the global optimal solution can always be found in a finite time, this does not prevent them from having application value in practical problems.For complex problems, finding the global optimal solution is often a difficult and time-consuming task.The author of reference [22] addresses the uncertainty cost of wind power through a new stochastic constraint model developed by an improved Particle Swarm Optimization algorithm.In [23], wind power and pumped storage power plants are combined to increase the high penetration level of renewable energy in a power system based on an improved genetic algorithm.However, to further enhance the performance of the algorithm, it is necessary to improve its convergence performance.Given this, the author of reference [24] utilizes Levy flight characteristics to improve the GA to find the optimal output and operating cost of distributed power sources.However, this work did not compare the method with other optimization algorithms and did not highlight the superiority of the algorithm.In [25], electric vehicles are incorporated into microgrids, and a condor letting algorithm is improved based on inertia weights and variational operators, improving the accuracy and convergence speed of the optimization results.In [26], in response to the shortcomings of the PSO algorithm in terms of poor search accuracy and the tendency to fall into local optimization, the inertia weights, learning factor, and time factor were improved, which enhanced the algorithm's global optimization ability and search accuracy.However, only the PSO algorithm was considered; other intelligent algorithms were not introduced for comparison or combination, and stability analysis of the improved algorithm was not carried out.
Considering the characteristics of the microgrid low-carbon scheduling problem, such as multivariate, multi-constraint, and nonlinear properties, a hybrid optimization algorithm combining the improved PSO and GA with the features of fast convergence speed of the PSO algorithm and strong global optimization capability of the GA algorithm is proposed in this paper.The microgrid optimization model is solved using this algorithm.The contributions of this paper are as follows: (1) To control the total carbon emission of a power system and increase the proportion of offshore wind power consumption, a microgrid optimization model considering offshore wind power and carbon trading is proposed with the minimization of the total cost of microgrid system operation as the objective function.
(2) The PSO algorithm is improved by inertia weights and chaos factors.The improved PSO-GA algorithm combines the PSO algorithm and the GA and is used to solve the model, improving the optimization capability and convergence speed of the model solution.
The paper is organized as follows: Section 1 outlines the design framework of microgrids; Section 2 introduces the scheduling model for microgrids considering offshore wind and carbon trading; Section 3 introduces the improved PSO-GA algorithm; Section 4 details the simulation verification; and Section 5 is the conclusion.

The Structure of a Microgrid System
A microgrid is a localized, relatively small-scale power system that provides electricityrelated services for customers.Its islanded operation is particularly desirable when it comes to remote areas, especially offshore locations, where undersea cables can be expensive and erratic given the huge distance and complicated environment between the island and the mainland.Meanwhile, offshore wind is usually incorporated into the microgrids to serve load demands, reduce electricity costs, as well as enhance the penetration of renewable energy sources.The microgrid system studied in this paper includes thermal power units, offshore wind clusters, and electrical energy storage systems.The offshore wind cluster transmits power to the land-based AC grid through an offshore converter station, a submarine DC cable, and an on-road converter station.The microgrid structure is shown in Figure 1.

Offshore Wind Systems
The energy conversion process of wind power generation is to convert the kinet energy carried by the airflow into the mechanical energy of the rotating blades of the win turbine and ultimately into electrical energy through the power-generation device.In a movement with kinetic energy, that is, the flow of air carried by the wind energy, th

Offshore Wind Systems
The energy conversion process of wind power generation is to convert the kinetic energy carried by the airflow into the mechanical energy of the rotating blades of the wind turbine and ultimately into electrical energy through the power-generation device.In air movement with kinetic energy, that is, the flow of air carried by the wind energy, the airflow is swept through the impeller section during kinetic energy transfer to the impeller.The airflow with a wind speed of v in a unit of time flows through the impeller with a section area of S, and the size of the wind energy transferred by the airflow is: where m is the mass flow rate per unit time, m = ρSv.
where P is the wind energy per second of air flow through the wind turbine impeller cross-section area; S is the impeller rotation for one week in the swept area; ρ is the air density; and v is the wind speed, m/s.According to Betz's theory, there is a limit to the conversion efficiency of wind power generators to the wind energy carried by natural wind, and the value of this limited efficiency is calculated as C p = 0.593, which is called the theoretical wind energy utilization coefficient.In reality, the wind energy utilization coefficient varies and always maintains C p < 0.593, and the actual wind power of the wind turbine is: Observing the wind power output formula, removing the inherent parameters S and C p of the wind turbine itself, the key factors determining the active output of the wind turbine are the value of the air density p and the wind speed v.In the offshore environment, the magnitude of the air density ρ is relatively small, whereas the magnitude of the wind speed v is large.Thus, to simplify the calculation of the active output of a wind turbine, the wind turbine manufacturer chooses only one variable, the wind speed v, to be derived.Before the turbine leaves the factory, the manufacturer fits the wind speed-wind power variation curve of the manufactured turbine under standard air density experimental conditions, as shown in Figure 2.

Carbon Trading Model
Carbon emissions from microgrids are mainly derived from thermal power units, which can be expressed as: where p δ denotes the intensity of thermal power; , , G i t P denotes the dispatch power; c E denotes the carbon emission in the dispatch cycle; and T is the dispatch cycle.
The allocation of carbon emission allowances is proportional to the dispatch output of conventional generating units throughout the dispatch period, which can be expressed as follows:

Carbon Trading Model
Carbon emissions from microgrids are mainly derived from thermal power units, which can be expressed as: where δ p denotes the intensity of thermal power; P G,i,t denotes the dispatch power; E c denotes the carbon emission in the dispatch cycle; and T is the dispatch cycle.The allocation of carbon emission allowances is proportional to the dispatch output of conventional generating units throughout the dispatch period, which can be expressed as follows: where E p denotes the emission quota in the dispatch cycle, and η q,i is allocated to generating unit i per unit of electricity.

Modeling of Energy Storage
The core function of the electrochemical storage is the storage and release of energy, which can be described as: where E t denotes power stored at time t, and when t = 1, the meaning of this constraint is that the storage energy at the initial moment of this optimization cycle has the continuity of the previous week; σ is the self-discharge rate; η ch and η dis are the charging and discharging efficiencies; P ch t and P dis t denote the charging and discharging power at time period t, respectively; ∆t denotes the time interval of the operational optimization; and T is the collection of time periods of a cycle of the operational optimization.
The charging or discharging rate of an energy storage system is limited by the technical parameters of the battery device, which can be described as [27]: where u ch t and u dis t are the 0-1 variables identifying whether the energy storage system is charging or discharging in time period t; P min ch and P max ch are the minimum and maximum charging power limit values of the energy storage system; and P min dis and P max dis are the minimum and maximum discharging power limit values of the energy storage system, respectively.

Objective Function
Offshore wind power has its trough in summer and peak in winter, which coincides with the seasonal distribution characteristics of the grid load.In addition, the average value of output in spring is high and stable, and the output at night in autumn and winter is usually higher than that during the day, with obvious anti-peak characteristics.Therefore, the coordinated and optimal scheduling of offshore wind power is particularly important.To maximize the consumption of offshore wind turbines, this paper proposes an optimal scheduling model that takes into account the low-carbon and economic benefits of microgrids, which can be described as where F W , F G , F ESS , F co 2 , and F QW denote the cost function of offshore wind, thermal generation, energy storage, carbon trading, and wind abandonment, respectively.The generation cost of offshore wind turbines is linearly related to the generation capacity.So, F W can be described as: where C 1 denotes the cost coefficient of offshore wind turbine generation; P w,i,t denotes the actual power generation of the i-th offshore wind turbine; M denotes the number of offshore wind turbines.
The cost function F G can be approximated as a quadratic function, which can be described as [28]: where a j , b j , and c j denote the cost coefficient of the j-th conventional thermal power unit, respectively.
The cost function F ESS can be described as [29]: where K p denotes the power operation cost coefficient; K C denotes the capacity operation cost coefficient; and E t denotes the rated capacity.
The carbon emissions are regarded as tradable commodities, and a stepwise carbon trading model is established.The carbon trading cost F CO 2 can be expressed as: where p c denotes the trading price.
To maximize the power consumption of offshore wind turbines, the penalty cost function F QW can be described as: where ∆P w,t denotes the abandoned offshore wind, and ξ w denotes the abandoned offshore wind penalty coefficient.

Constraints
(1) Output power constraint of offshore wind turbines It is assumed that the point prediction value of the known wind power output power is p w .In this paper, the normal distribution function is selected to describe the wind power output power prediction error, and its probability distribution function can be expressed as: where ∆P w is the deviation of wind power output prediction, and σ 2 is the standard deviation of wind power output prediction error.The prediction interval for wind power output can be obtained as: where β w is the confidence level of the wind power prediction interval.Considering that the wind power output is limited to P w, max by the installed capacity of the wind turbine, the smaller value between the upper limit of the prediction interval and the installed capacity of the wind turbine is determined.The maximum output of wind power is obtained as: The minimum output of wind power can be expressed as: Therefore, the output power constraint of offshore wind turbines can be expressed as (2) Power balance constraints The existence of a mathematical relationship between the combined output of the microgrid system can be described as: where P G,t denotes the active power; N denotes the thermal unit set; and P L is the load power.
(3) Upper and lower thermal unit output constraints where P G, max and P G, min denote the upper and lower limit of thermal power unit.
(4) Climbing constraints for thermal power units Thermal power units have a range of variation in output over a short period of time, and this rate of change is called the climb constraint.The unit creepage constraint can be expressed as: P G,j,t − P G,j,t−1 ⩽ v up,j 1 − y j,t + P G,j,min y j,t P G,j,t−1 − P G,j,t ⩽ v down,j 1 − z j,t + P G,j,min z j,t y j,t − z j,t = I j,t − I j,t−1 (23) where y j,t is the start-up state of the j-th thermal generating unit in time period t; z j,t is the shut-down state of the j-th thermal generating unit in time period t; I j,t is the operating state of the j-th thermal generating unit in time period t; and v up,j and v down,j are the upward and downward climb rates of the j-th thermal generating unit in time period t in the scheduling cycle. (

5) Spinning reserve constraints
To ensure that the system can operate safely and stably after the offshore wind turbine is connected to the grid, it is necessary to set the selection of standby capacity.In this paper, the standby capacity is completely assumed by the thermal power units in the system, which can be expressed as: +P G,j,min y j,t , v down,j 1 − z j,t + P G,j,min z j,t ≥ P w,i,t L u + P w,i,t W u (25) where SU t is the total amount of spare capacity that the thermal power unit can provide at time t; SU it is the amount of rotating spare capacity that thermal power unit i can provide at time t; P L is the value of the load at time t; P w,i,t is the power of wind power at time t; L u is the spare capacity demand rate of load; and W u is the spare capacity demand rate of wind power.
(6) Minimum runtime and downtime constraints for thermal power units The thermal power unit cannot change its operating state for a period of time after start-up or shutdown.The system needs to consider the constraints of minimum operation and downtime of the thermal power unit, which can be expressed as: where X on i (t − 1) is the continuous operation time of thermal unit j in time period t − 1; X o f f j (t − 1) is the continuous downtime of thermal unit j at time t − 1; T on j is the minimum operation time of thermal unit j; and T o f f j is the minimum downtime of thermal unit j.
(7) Energy storage system power constraints Since the energy storage devices cannot simultaneously be in both charging and discharging states, the charging and discharging states of the energy storage system need to meet the following requirements: where u ch t and u dis t are the 0-1 variables identifying whether the energy storage system is charging or discharging in time period t.
The ESS charge state constraint during operation is expressed as: where E max t and E min t are the upper and lower limits of the charging state of the ESS, respectively.
In addition, to ensure that the energy storage device has a continuous working capability in the new dispatch cycle, it is necessary to make the charging state of the ESS at the beginning of the dispatch and the end of the dispatch consistent.So, the optimization process should also satisfy the constraint: where E inital t and E end t denote the state of charge of the energy storage system at the beginning and end of the dispatch, respectively.

Solving Algorithm-The Improved PSO-GA Algorithm
To efficiently solve the mathematical model of microgrid scheduling, the PSO algorithm, which has the advantages of low computational complexity, high accuracy, and fast convergence, is adopted [22].Combined with the powerful optimization capability of the GA, the improved PSO-GA algorithm is used to take advantage of the dual advantages of the two algorithms.To avoid the defect of PSO falling into the local optimum prematurely, the PSO-GA algorithm is improved by dynamically reducing the inertia weights, algorithmic crossover, and mutation operation methods to improve its optimization ability.
The PSO algorithm considers each possible position and motion of a moving particle as a solution to the problem.It evaluates the suitability of the solution by establishing an adaptive degree function.The historical optimal solution of the particle during movement is P i = (p i1 , p i2 , • • • p in ), the global optimal solution is P g = (p ig , p g2 , • • • p gn ), and the formula for the particle's change in velocity and position is: where v k id and x k id are the d-th dimensional velocity and position; ω is the inertia weights; c 1 and c 2 are the learning factors, respectively; and rand 1 and rand 2 are the random numbers in the region of [0, 1], respectively.
Dynamically decreasing inertia weights are designed to improve the algorithm.The inertia weights have the function of regulating the search range of the whole solution space.The m-th iteration of inertia weights is calculated as: Improvements are made to the algorithm crossover and mutation operations.Let the particle swarm population size be s pop and the selection probability be p c .All particles in the k-th generation are sorted in descending order according to the size of the adaptation value F, and the previous particle is selected as the parent.For each parent i, the parent j that is different from it is selected, and the crossover operation is carried out with a random number to generate the offspring.The k-th iteration of its velocity and position is given as: When the fitness value of the resulting offspring is improved, the parent is replaced with the velocity and position of the offspring; otherwise, the velocity and position of the parent are retained.
The Gaussian mutation operation is carried out on each parent with probability p k , and the selection of the best and the worst is carried out after generating the offspring.The average time-space position of the region where the current particle is located is set as the average time-space position, and the position variance σ is introduced to carry out the mutation.The formula for the k-th iteration of generating the position of the child generation is as follows: x The velocity of the offspring remains unchanged after the mutation, and if the resulting offspring has a better fitness value than the parent, the parent is replaced with the offspring position; otherwise, the parent position is retained.In general, as the computational range increases, the overall potential variance decreases, which means that the particles gradually move toward a solution.Therefore, to prevent the entire population from being in a locally optimal prediction solution, the particle state must be mutated by the corresponding mutation computation.The steps are given as follows.
Step 1: Parameter initialization.The microgrid system parameters and particle swarm algorithm parameters are set.The population size is 300; the maximum number of iterations is 200; the maximum and minimum inertia weights are 0.9 and 0.4, respectively; the selection probability and variance probability are [0.3,0.8] and [0.001, 0.1], respectively; and the learning factor is 2.
Step 2: The position and velocity of the initial population are calculated.rand 1 and rand 2 are random numbers in the region [0, 1], which are used to randomly obtain the velocity and position of the particles.
Step 3: The individual fitness value of particles is calculated.According to the satisfaction of constraints in the objective function corresponding to different particles, the algorithm iteration is entered to determine the best scheduling strategy, and the local and global optimal positions are calculated.
Step 4: Iterative optimization.For each particle, the change in fitness of two positions is calculated with ∆ f = f new − f old .If ∆ f < 0, the new state is accepted with probability 1.If ∆ f > 0, the new state is accepted with probability.The fitness value change can be defined as: Step 5: Cross-mutation.The GA algorithm is introduced to implement the crossmutation operation in the particle swarm.The position and velocity values are updated, and the new fitness values of the particles are calculated based on the new position and velocity.If the new fitness value is greater than the particle fitness value before iteration, the new position value is used to update the local and global optimal positions; otherwise, it is not updated.
The objective function is set to select some of the best-performing particles.Let these particles into the hybridization pool and particle cross-pairing; let the child particles after pairing replace the initial particles to ensure that the total number of particles in the hybridization pool remains unchanged; and let the initial particles and the child particles share information, so as to make the algorithm's convergence speed accelerate continuously.
Step 6: Determination of whether the iteration count has been reached.If the count has been reached, the scheduling terminates and outputs the optimal scheduling result according to the particle individuals corresponding to the global optimal position derived at the end.Otherwise, another iteration is carried out to find the optimal solution.The flow of the solution method is shown in Figure 3.The objective function is set to select some of the best-performing particles.Let these particles into the hybridization pool and particle cross-pairing; let the child particles after pairing replace the initial particles to ensure that the total number of particles in the hybridization pool remains unchanged; and let the initial particles and the child particles share information, so as to make the algorithm's convergence speed accelerate continuously.
Step 6: Determination of whether the iteration count has been reached.If the count has been reached, the scheduling terminates and outputs the optimal scheduling result according to the particle individuals corresponding to the global optimal position derived at the end.Otherwise, another iteration is carried out to find the optimal solution.The flow of the solution method is shown in Figure 3.

Case Study
The microgrid system off the southeast coast of China was used for the simulation.The structure is as shown in Figure 1.The system contains three thermal power units and the offshore wind farm with an installed capacity of 100 MW.The simulation platform is a 64-bit Windows 10 operating system with 16 GB RAM and an Intel(R) Core(TM) i5-7300HQ CPU @ 2.50 GHz.The computation was performed with the MATLAB R2016a tool.The basic parameters configured for this offshore wind farm are shown in Table 1.Taking a typical spring day of this offshore wind farm as the scheduling cycle, the offshore wind farm curve and load demand are shown in Figures 4 and 5. Table 2 shows the parameters related to thermal power units.The time period of the dispatch optimization before the calculation day is 24 h, the time interval is 1 h, and three cases were set up.Case 1 is the microgrid dispatch without considering carbon trading; Case 2 is the microgrid lowcarbon dispatch considering carbon trading; and Case 3 is based on Case 2, considering the uncertainty of offshore wind turbines.The parameters of the PSO-GA algorithm were set as follows: the number of population individuals was 600, and the number of iterations was 200.A comparison of the iterative optimization processes of the different algorithms is shown in Figure 6.

Case Study
The microgrid system off the southeast coast of China was used for the simulation.The structure is as shown in Figure 1.The system contains three thermal power units and the offshore wind farm with an installed capacity of 100 MW.The simulation platform is a 64-bit Windows 10 operating system with 16 GB RAM and an Intel(R) Core(TM) i5-7300HQ CPU @ 2.50 GHz.The computation was performed with the MATLAB R2016a tool.The basic parameters configured for this offshore wind farm are shown in Table 1.Taking a typical spring day of this offshore wind farm as the scheduling cycle, the offshore wind farm curve and load demand are shown in Figures 4 and 5. Table 2 shows the parameters related to thermal power units.The time period of the dispatch optimization before the calculation day is 24 h, the time interval is 1 h, and three cases were set up.Case 1 is the microgrid dispatch without considering carbon trading; Case 2 is the microgrid low-carbon dispatch considering carbon trading; and Case 3 is based on Case 2, considering the uncertainty of offshore wind turbines.The parameters of the PSO-GA algorithm were set as follows: the number of population individuals was 600, and the number of iterations was 200.A comparison of the iterative optimization processes of the different algorithms is shown in Figure 6.

Case Study
The microgrid system off the southeast coast of China was used for the simulation.The structure is as shown in Figure 1.The system contains three thermal power units and the offshore wind farm with an installed capacity of 100 MW.The simulation platform is a 64-bit Windows 10 operating system with 16 GB RAM and an Intel(R) Core(TM) i5-7300HQ CPU @ 2.50 GHz.The computation was performed with the MATLAB R2016a tool.The basic parameters configured for this offshore wind farm are shown in Table 1.Taking a typical spring day of this offshore wind farm as the scheduling cycle, the offshore wind farm curve and load demand are shown in Figures 4 and 5. Table 2 shows the parameters related to thermal power units.The time period of the dispatch optimization before the calculation day is 24 h, the time interval is 1 h, and three cases were set up.Case 1 is the microgrid dispatch without considering carbon trading; Case 2 is the microgrid low-carbon dispatch considering carbon trading; and Case 3 is based on Case 2, considering the uncertainty of offshore wind turbines.The parameters of the PSO-GA algorithm were set as follows: the number of population individuals was 600, and the number of iterations was 200.A comparison of the iterative optimization processes of the different algorithms is shown in Figure 6.When the value of the fitness function converges, it means that the model parameters have reached the optimum.The iteration process of different algorithms is shown in Figure 6.The PSO algorithm iterates 32 times to reach the optimal value, while the PSO-GA iterates 25 times to reach the optimal solution, and the improved algorithm iterates 11 times before the parameters reach the optimal value, with high convergence accuracy.The method prevents the algorithm from falling into the local optimum by designing dynamically decreasing inertia weights and chaos factors and introduces the cross-variable operation of the GA algorithm, which enables the algorithm to avoid falling into the local optimum and achieves fast optimality-seeking performance.
Output results of thermal units for different cases are shown in Figures 7 and 8.When the value of the fitness function converges, it means that the model parameters have reached the optimum.The iteration process of different algorithms is shown in Figure 6.The PSO algorithm iterates 32 times to reach the optimal value, while the PSO-GA iterates 25 times to reach the optimal solution, and the improved algorithm iterates 11 times before the parameters reach the optimal value, with high convergence accuracy.The method prevents the algorithm from falling into the local optimum by designing dynamically decreasing inertia weights and chaos factors and introduces the cross-variable operation of the GA algorithm, which enables the algorithm to avoid falling into the local optimum and achieves fast optimality-seeking performance.
Output results of thermal units for different cases are shown in Figures 7 and 8.When the value of the fitness function converges, it means that the model parameters have reached the optimum.The iteration process of different algorithms is shown in Figure 6.The PSO algorithm iterates 32 times to reach the optimal value, while the PSO-GA iterates 25 times to reach the optimal solution, and the improved algorithm iterates 11 times before the parameters reach the optimal value, with high convergence accuracy.The method prevents the algorithm from falling into the local optimum by designing dynamically decreasing inertia weights and chaos factors and introduces the cross-variable operation of the GA algorithm, which enables the algorithm to avoid falling into the local optimum and achieves fast optimality-seeking performance.
Output results of thermal units for different cases are shown in Figures 7 and 8. 18 to 22, it can be seen that Unit G1 has the highest output in the traditional scenario, followed by Case 2 and Case 1.Because offshore wind is more frequent in this time period, the microgrid prioritizes the dispatch to reduce wind abandonment.The dispatch output of Unit G1 in Case 3 reaches the minimum and plays the dual role of a carbon trading mechanism and addressing wind power uncertainty.As can be seen from Figure 8, Unit G2 is more sensitive to the carbon trading mechanism, which is due to the higher carbon emission factor of this unit.So, the microgrid reduces the dispatch of Unit G2 with the highest emission factor to meet the carbon quota requirement and reduce the cost of carbon trading.In the period of 6-12, the dispatch output of thermal power Unit G2 in Case 3 and Case 2 decreases significantly compared with Case 1, while Unit G2 in Case 1 is higher in this period because both Unit 1 and Unit G3 in Case 1 have lower output in this period, which leads to a decrease in Unit G2 in Case 1 to meet the load requirement.The thermal units need to cooperate, so this process leads to the higher output of Unit G2 in this time period.
The wind power consumption and abandonment in different scenarios are shown in Table 3.As can be seen from Table 3, the offshore wind abandonment rate of Case 1 is 22.2%.The offshore wind abandonment rate of Case 2 is 16.1%, a reduction in the wind abandonment rate by 27.4% compared with Scenario 1.The offshore wind abandonment rate of As can be seen from Figure 7, for Unit G1, the output in the traditional wind storage dispatch case reaches the first peak at 10:00-12:00 p.m.The output of Unit G1 in both Case 1 and Case 2 reaches the peak earlier than that in the traditional scenario, which prompts the priority dispatch of offshore wind in the peak load section at 10-12 p.m.The output of Unit G1 at points 10-12 is significantly lower, and in the second peak period from points 18 to 22, it can be seen that Unit G1 has the highest output in the traditional scenario, followed by Case 2 and Case 1.Because offshore wind is more frequent in this time period, the microgrid prioritizes the dispatch to reduce wind abandonment.The dispatch output of Unit G1 in Case 3 reaches the minimum and plays the dual role of a carbon trading mechanism and addressing wind power uncertainty.
As can be seen from Figure 8, Unit G2 is more sensitive to the carbon trading mechanism, which is due to the higher carbon emission factor of this unit.So, the microgrid reduces the dispatch of Unit G2 with the highest emission factor to meet the carbon quota requirement and reduce the cost of carbon trading.In the period of 6-12, the dispatch output of thermal power Unit G2 in Case 3 and Case 2 decreases significantly compared with Case 1, while Unit G2 in Case 1 is higher in this period because both Unit 1 and Unit G3 in Case 1 have lower output in this period, which leads to a decrease in Unit G2 in Case 1 to meet the load requirement.The thermal units need to cooperate, so this process leads to the higher output of Unit G2 in this time period.
The wind power consumption and abandonment in different scenarios are shown in Table 3.As can be seen from Table 3, the offshore wind abandonment rate of Case 1 is 22.2%.The offshore wind abandonment rate of Case 2 is 16.1%, a reduction in the wind abandonment rate by 27.4% compared with Scenario 1.The offshore wind abandonment rate of Case 3 is 9.1%, which is lower by 43.4% compared with Case 2 and by 58.9% compared with Case 1.
The results of offshore wind turbine output changes in different scenarios for each time period are shown in Figure 9.With the proposed mechanism, during the peak load period, wind turbines provide additional functionality by actively participating in the system dispatch.Offshore wind is consumed through storage equipment to improve the utilization rate of wind, and the whole scheduling process improves by about 10.34% compared with that without the participation of energy storage.
Case 3 is 9.1%, which is lower by 43.4% compared with Case 2 and by 58.9% compared with Case 1.
The results of offshore wind turbine output changes in different scenarios for each time period are shown in Figure 9.With the proposed mechanism, during the peak load period, wind turbines provide additional functionality by actively participating in the system dispatch.Offshore wind is consumed through storage equipment to improve the utilization rate of wind, and the whole scheduling process improves by about 10.34% compared with that without the participation of energy storage.By changing the carbon trading price, the impact of price changes on the dispatching results is analyzed.The change curve is shown in Figure 10.In Figure 10, the price of carbon trading is not effective in regulating the unit output when the price is low, and the carbon emissions are kept high to improve cost effectiveness.As the price continues to rise, the cost of carbon trading continues to rise.For this reason, it is necessary to reasonably dispatch the unit output to reduce carbon emissions.When the price reaches 11 USD/t, the carbon emission decreases rapidly with the carbon price rising until the price reaches 20.6 USD/t.Carbon trading costs in the carbon price By changing the carbon trading price, the impact of price changes on the dispatching results is analyzed.The change curve is shown in Figure 10.
The results of offshore wind turbine output changes in different scenarios for each time period are shown in Figure 9.With the proposed mechanism, during the peak load period, wind turbines provide additional functionality by actively participating in the system dispatch.Offshore wind is consumed through storage equipment to improve the utilization rate of wind, and the whole scheduling process improves by about 10.34% compared with that without the participation of energy storage.By changing the carbon trading price, the impact of price changes on the dispatching results is analyzed.The change curve is shown in Figure 10.In Figure 10, the price of carbon trading is not effective in regulating the unit output when the price is low, and the carbon emissions are kept high to improve cost effectiveness.As the price continues to rise, the cost of carbon trading continues to rise.For this reason, it is necessary to reasonably dispatch the unit output to reduce carbon emissions.When the price reaches 11 USD/t, the carbon emission decreases rapidly with the carbon price rising until the price reaches 20.6 USD/t.Carbon trading costs in the carbon price In Figure 10, the price of carbon trading is not effective in regulating the unit output when the price is low, and the carbon emissions are kept high to improve cost effectiveness.As the price continues to rise, the cost of carbon trading continues to rise.For this reason, it is necessary to reasonably dispatch the unit output to reduce carbon emissions.When the price reaches 11 USD/t, the carbon emission decreases rapidly with the carbon price rising until the price reaches 20.6 USD/t.Carbon trading costs in the carbon price and carbon emissions show a trend.The price is about 19.8 USD/t, and there is no carbon trading cost.The difference between carbon emissions and carbon emission quotas almost remains unchanged; at this time, selling carbon to obtain a high level of income is not in line with reality and does not have practical significance.

Conclusions
A microgrid optimization approach considering offshore wind power and carbon trading is proposed in this paper.The PSO algorithm is improved by inertia weights and chaos factors to avoid falling into the local optimum prematurely.The simulation results show that, on the one hand, by combining the powerful optimization capability of the GA algorithm with PSO, the improved PSO-GA algorithm improves the optimization capability and convergence speed of the model solution.On the other hand, with the inclusion of a carbon trading mechanism, thermal power units are motivated to participate in peaking while promoting the consumption of offshore wind power.

Figure 1 .
Figure 1.The structure of the studied microgrid system.

Figure 1 .
Figure 1.The structure of the studied microgrid system.

Figure 2 .
Figure 2. Wind speed-power variation curve of the wind turbine.

Figure 2 .
Figure 2. Wind speed-power variation curve of the wind turbine.

Figure 3 .
Figure 3. Flowchart of the improved PSO-GA algorithm solution.

Figure 3 .
Figure 3. Flowchart of the improved PSO-GA algorithm solution.

Figure 7 .
Figure 7. Output results of thermal Unit G1 for different cases.

Figure 8 .
Figure 8.Output results of thermal unit G2 in different cases.

Figure 8 .
Figure 8.Output results of thermal unit G2 in different cases.

Figure 9 .
Figure 9. Offshore wind turbine output results for different cases.

Figure 10 .
Figure 10.Curve of carbon emissions and carbon trading costs with carbon price.

Figure 9 .
Figure 9. Offshore wind turbine output results for different cases.

Figure 9 .
Figure 9. Offshore wind turbine output results for different cases.

Figure 10 .
Figure 10.Curve of carbon emissions and carbon trading costs with carbon price.

Figure 10 .
Figure 10.Curve of carbon emissions and carbon trading costs with carbon price.

Table 1 .
Parameters related to energy storage systems.

Table 1 .
Parameters related to energy storage systems.
min E /

Table 1 .
Parameters related to energy storage systems.
min E /

Table 2 .
Parameters related to thermal power units.

Table 2 .
Parameters related to thermal power units.

Table 2 .
Parameters related to thermal power units.

Table 3 .
Offshore wind power consumption in different cases.

Table 3 .
Offshore wind power consumption in different cases.