Optimal Dispatch of Microgrid with Combined Heat and Power System Considering Environmental Cost

With the rapid development of wind power generation and photovoltaic power generation, the phenomenon of wind and solar abandoning becomes more and more serious in the operation of power systems, and the microgrid is a new operating mode of power systems which provides a new consumption mode for wind power generation. With the increasingly close connection among energy resources and people’s increasing awareness of environmental protection, this paper establishes a microgrid optimal scheduling model with a combined heat and power system, in consideration of environmental costs. This model aims at the lowest comprehensive cost, at the same time taking into account the emission reductions of SO2 and NOx, considering the cost of power generated by the micro-generator, environmental cost, the related cost of battery, operation and maintenance cost of wind power, and photovoltaic power generation. The related constraints of thermal balance and power balance are also considered during microgrid system operation. The established model is solved with an improved particle swarm algorithm. At last, taking a microgrid system as an example, the validity and reliability of the proposed model are verified.


Introduction
With the aggravation of environmental contamination and energy crisis, the bottleneck of traditional power generation is becoming more and more obvious.As a consequence, clean new energy generation forms are attracting more and more attention [1].Wind power and photovoltaic power generation are the early forms of new energy generation, and the installed capacity and grid-connected scale have gradually increased.At the same time, its randomness and volatility pose great challenge to the safe operation of the power grid [2][3][4].As a new form of network structure, microgrids can realize combined heat and power scheduling, give full play to the complementary characteristics of wind power generation and photovoltaic power generation [5], and realize local consumption of wind power and photovoltaic power generation, greatly reducing the amount of abandoned wind and photovoltaic energy.The problem of environmental pollution [6,7] is solved, to a certain extent.
With the deepening of relevant research, the advantages of microgrid economics, environmental protection, scheduling flexibility and other advantages, have gradually attracted the public's attention [8][9][10], and field studies of microgrid systems are carried out in many areas.With the rise of the microgrid, how to determine the combined heat and power scheduling in the multisource With the enhancement of people's awareness of environmental protection, the environmental factors in the operation of microgrids cannot be ignored.
This paper establishes a microgrid optimization scheduling model that takes into account the combined electric and thermal system under environmental costs, aiming at the lowest total cost and taking into account the emission reduction of SO 2 and NO x .The power generation cost of micro-generators, environmental costs, the related cost of battery, operation and maintenance cost of wind power and photovoltaic power generation, are all considered in the total cost.The related constraints of thermal balance and power balance are also considered during microgrid system operation.This paper aims to reduce the operating cost of the system, and the emissions of SO 2 and NO x .The impact of electricity price adjustment on microgrid scheduling cost is also analyzed.For wind power, photovoltaics, and other uncertain variables in the objective function, the clear equivalence forms are used to deal with this, so that the results are more accurate and realistic.
This paper is organized as follows: Sections 2 and 3 establish the microgrid scheduling model, and give the respective target function and constraint conditions.Section 4 presents clear equivalence forms to deal with the uncertain variables in the model.Section 5 proposes an improved social particle swarm optimization algorithm to solve the microgrid scheduling model.Section 6 analyzes the results obtained by the microgrid model.Finally, Section 7 summarizes the conclusions.

Microgrid Objective Function Establishment
This article aims to minimize the comprehensive cost, at the same time taking into account the emission reductions of SO 2 and NO x , based on the microgrid system with wind and solar storage, considering the cost of power generated by the micro-generator, environmental costs, operation and maintenance costs of wind power and photovoltaic power generation, and battery operating costs.In this paper, the microgrid structure is referred to [28] and improved on this basis, as shown in Figure 1, which consists of two thermal power generators (GEN), two combined heating and power units (CHP) containing heat storage devices, one wind turbine (WT), one unit of photovoltaic power generation equipment (PV), and one storage battery (SB) system.The combined heating and power unit includes two main parts: the microturbine (MT) and the bromine-cooling machine (BCM).The units in the network are uniformly controlled by the microgrid central controller (MGCC).
Energies 2018, 11, x 3 of 23 is rarely seen.With the enhancement of people's awareness of environmental protection, the environmental factors in the operation of microgrids cannot be ignored.This paper establishes a microgrid optimization scheduling model that takes into account the combined electric and thermal system under environmental costs, aiming at the lowest total cost and taking into account the emission reduction of SO2 and NOx.The power generation cost of microgenerators, environmental costs, the related cost of battery, operation and maintenance cost of wind power and photovoltaic power generation, are all considered in the total cost.The related constraints of thermal balance and power balance are also considered during microgrid system operation.This paper aims to reduce the operating cost of the system, and the emissions of SO2 and NOx.The impact of electricity price adjustment on microgrid scheduling cost is also analyzed.For wind power, photovoltaics, and other uncertain variables in the objective function, the clear equivalence forms are used to deal with this, so that the results are more accurate and realistic.
This paper is organized as follows: Sections 2 and 3 establish the microgrid scheduling model, and give the respective target function and constraint conditions.Section 4 presents clear equivalence forms to deal with the uncertain variables in the model.Section 5 proposes an improved social particle swarm optimization algorithm to solve the microgrid scheduling model.Section 6 analyzes the results obtained by the microgrid model.Finally, Section 7 summarizes the conclusions.

Microgrid Objective Function Establishment
This article aims to minimize the comprehensive cost, at the same time taking into account the emission reductions of SO2 and NOx, based on the microgrid system with wind and solar storage, considering the cost of power generated by the micro-generator, environmental costs, operation and maintenance costs of wind power and photovoltaic power generation, and battery operating costs.In this paper, the microgrid structure is referred to [28] and improved on this basis, as shown in Figure 1, which consists of two thermal power generators (GEN), two combined heating and power units (CHP) containing heat storage devices, one wind turbine (WT), one unit of photovoltaic power generation equipment (PV), and one storage battery (SB) system.The combined heating and power unit includes two main parts: the microturbine (MT) and the bromine-cooling machine (BCM).The units in the network are uniformly controlled by the microgrid central controller (MGCC).
where e is the total operating cost of the microgrid system, e 1 is the cost of generating electricity for the micro-generator set; e 2 is the environmental cost; e 3 is the operation and maintenance cost of wind power generation; e 4 is the operation and maintenance cost of photovoltaic power generation; e 5 is the cost for exchanging energy between the microgrid system and the public power grid; e 6 is the operating cost of the battery.

Micro-Generator Set Generation Cost e 1
The micro-generator set includes two types of thermal power generators and combined heating and power units; both are coal-fired units.The cost of generating electricity for the micro-generator set includes the operating cost of thermal power generator and combined heating and power unit.
where E 1 is the operating cost of the thermal power generator; E 2 is the operating cost of combined heating and power unit.P it is the power output of the i-th thermal power generator during the t period, and P ejt is the power output of the j-th combined heat and power unit during the t period.
A certain amount of fossil energy is consumed during the operation of thermal power generators, which will generate a certain cost of energy consumption.In the actual operation of thermal power generators, when the turbine intake valve suddenly opens, it will have a "valve point effect", causing the generator's consumption to increase, and the generator will have a certain start-up cost during the start-up process.Therefore, the calculation formula for the operating cost of a thermal power generator is as follows: where H(P it ) is the energy cost of thermal power generator i in t period; a i , b i , c i are the power generation cost coefficients of the thermal power generator i; V(P it ) is the energy consumption cost of the valve point effect of thermal power generator i during t period; e i , f i are the valve point effect coefficients of thermal power generator i; and P imin is the lower limit of the output of thermal power generator i. S it is the operating status of thermal power generator i during t period.S it = 1 indicates unit operation, S it = 0 indicates that the unit is out of service; B it is the start-up cost of thermal power generator i during t period; γ i , ϕ i and θ i are start-up cost factors for thermal power generator i; T it off is the downtime of thermal power generator i in t period.T is a scheduling period of the microgrid.In this paper, the scheduling period is divided into 24 periods, and N is the number of thermal power generators in the microgrid.
Combined heat and power unit as a heating unit cannot stop, therefore, the operating cost is the fuel cost.Equation (7) reference [29].
where P r hit is the total thermal power of the heat storage of the combined heat and power unit j during t period; P c hit,1 and P c hit,2 are the storage and release power of the heat storage device in the t period; a jr , b jr , c jr are the fuel cost coefficients of the combined heat and power unit j respectively; c v is the amount of change in electrical output when each unit heat output is increased for combined heat and power unit.M is the number of combined heat and power units in the microgrid.

Environmental Cost e 2
With the enhancement of the public's environmental awareness, the requirements for the environmental protection of the power grid are increasing.The main contaminants considered in this paper are SO 2 and NO x , and the environmental costs mainly include the operating costs of the desulfurization and denitrification devices and SO 2 and NO x emission fees.
where C 1 represents the operating cost of the desulfurization and denitrification device; and C 2 represents SO 2 and NO x emission fees.Among them, the calculation formulas for C 1 and C 2 are as follows: where d S and d N respectively generate the SO 2 and NO x quality for the each unit power generation of the coal-fired unit; η S and η N are the efficiency of the desulfurization and denitrification devices respectively; C S and C N are the cost of removing SO 2 and NO x per unit; L S and L N are the pollution equivalent values of SO 2 and NO x respectively; and C NS is the standard for the fee of SO 2 and NO x for each amount of pollution.D is the total amount of pollutant emission of the generator set.P tchange is the exchange power of the microgrid system with the public power grid during t period.

Operation and Maintenance Costs of Wind Power and Photovoltaic Power Generation e 3 , e 4
Wind power generation and photovoltaic power generation are both new energy power generation forms, which do not generate environmental pollution during operation.They are clean energy and have strong competitiveness and broad prospects in future development.In this paper, the operation and maintenance costs of wind power and photovoltaic power generation are expressed as linear relations with their respective output power.The calculation formula is as follows: where C wk is the operational maintenance cost coefficient for wind turbine k; P wkt is the power generated by wind farm k during t period; and K is the number of wind turbines in the microgrid.
Energies 2018, 11, 2493 where C vl is the operating and maintenance cost coefficient of the photovoltaic power station l; P vlt is the power generated by photovoltaic power station l during t period.Q is the number of photovoltaic power stations in the microgrid.
2.4.The Cost of Exchanging Energy between the Microgrid System and the Public Power Grid e 5 The microgrid system is capable of power transmission with the public power grid, to ensure the microgrid system can operate safety.When the power provided by the power supply inside the microgrid system cannot meet the load demand, there is a need to buy electricity from the public grid.When the power generated by the internal power supply exceeds the load demand, excess power can be sold to the public power grid, therefore, it also plays the role of system rotary reserve.Equations ( 15) and ( 16) are from reference [10].The cost for exchanging energy between the microgrid system and the public power grid is as follows: where C buy is the cost of the microgrid system to purchase electricity from the public grid; and C sell,1 is the revenue from the sale of electric energy from the microgrid system to the public grid.Among them, the calculation formulas of C buy and C sell,1 are as follows: where P tchange is the exchange power of the microgrid system with the public grid during t period; P tchange > 0 indicates that the microgrid system purchases electricity from the public grid, and P tchange < 0 indicates that the microgrid system sells electricity to the public grid; C tgrid is the price of electricity for the public grid sells electricity to the microgrid during t period; and S tgrid is the price of electricity when the microgrid sells electricity to the public grid during t period.

Storage Battery Operating Cost e 6
When the power generation of the internal power supply of the microgrid system is higher than the load demand, it can be sold to the public power grid, or excess electric energy can be stored in the storage battery as a system backup power supply.The storage battery will generate a certain cost during operation.In this paper, the operating cost of the storage battery is expressed as a positive correlation function between charge and discharge power and sold electric energy, as follows: where C cha and C dis are the operating cost of the storage battery unit charging and discharging power respectively; P cha,ct , P dis,ct are the charging and discharging power of the storage battery during t period.P sell sells electricity to the public power grid for the storage battery during t period, and C cell,2 is the electricity price when the storage battery is sold to the public power grid during t period.

Operational Constraints of Micro-Sources within the Microgrid
The microgrid has a complete power system structure and can interact with the public power grid at the same time, which further ensures the reliable operation of the microgrid system.In order to ensure the security of the microgrid system, it is necessary to satisfy relevant constraints, and the main constraints considered in this paper are as follows:

Thermal Power Generator Output Constraint
The output constraint for the thermal power generator is as follows: where P imin and P imax are the lower and upper limits of the electric output of the thermal power generator i.

Thermal Power Generator Ramp Rate Constraint
The ramp rate constraint for the thermal power generator is as follows: where r ui and r di are the ramp-up rate constraint values and the ramp-down rate constraint values of the thermal power generator i.

Thermal Power Generator Output Constraint When Starting and Stopping
When the unit is out of service or from operation to downtime, the output of the unit should meet the minimum output:

Combined Heat and Power Unit Electric Output Constraint
The electric output constraint for the combined heat and power unit is as follows: where P ejmin and P ejmax are the lower and upper limits of the electric output of the combined heat and power unit j.

Combined Heat and Power Unit Thermal Output Constraint
The thermal output constraint for the combined heat and power unit is as follows: where P r hit,1 is the thermal output of the combined heat and power unit j during t period; P r hitmax is the thermal output upper limit of the combined heat and power unit.

Combined Heat and Power Unit Ramp Rate Constraint
The ramp rate constraint for the combined heat and power unit is as follows: where r r uj and r r dj are the ramp-up rate constraint values and the ramp-down rate constraint values of the combined heat and power unit.

Storage Battery Charging Capacity Constraint
In order to ensure the service life of the battery and the battery can be used safely, the occurrence of overcharge and overdischarge of the battery shall be prevented, that is, it shall meet the constraints of certain upper and lower limits of capacity: where C max and C min are the upper and lower limits of the battery state of charge; and C t is the state of charge of the battery t.
The formula for C t is as follows: where P cha,ct is the charging amount of the battery during the t period, and P dis,ct is the discharging amount of the battery during the t period.

Storage Battery Charge and Discharge Power Constraint
Taking into account the battery charging and discharging power directly affect the battery's service life and operating safety, therefore, the battery charging and discharging power need to meet the constraints of the certain limit, that is where P cha,max and P dis,max are the upper limit of the charging and discharging power of the battery, and P cha,min and P dis,min are the lower limits of the charging and discharging power of the battery, respectively.

Charge and Discharge Constraint of the Battery at the Same Time
At the same time, the battery cannot charge and discharge at the same time, that is: where X t and Y t are the battery's charging and discharging states respectively, where X t ∈{0, 1}, Y t ∈{0, 1}.

Storage Battery Beginning and Ending Power Constraint
In order to meet the scheduling requirements of the next dispatch day and the safety operation of the battery, it is necessary to ensure that the battery's electricity is equal to the initial battery's electricity at the end of scheduling period, that is where C t0 and C T are the initial value and the final value of the storage battery power during the scheduling period, respectively.

Heat Storage Device Capacity Constraint
The capacity constraint for the heat storage device is as follows: where C r min and C r max are the minimum and maximum heat storage of the heat storage device; and C r t is the heat storage of the heat storage device during t period.
Energies 2018, 11, 2493 9 of 23 C r t is calculated as follows: where P c hit,1 and P c hit,2 are the store and release power of the heat storage device during t period.

Heat Storage Device Beginning and Ending Heat Storage Constraint
The beginning and ending heat storage constraint for the heat storage device is as follows: where C r t0 and C r T are the initial and final value of heat storage in the heat storage device scheduling period, respectively.

Heat Storage Device Storage and Exhaust Heat Constraint
The storage and exhaust heat constraint for the heat storage device is as follows:

The Exchange Power of the Microgrid System with the Public Grid Constraint
The exchange power constraint for the microgrid system with the public grid is as follows: where P tchange,max and P tchange,min are the upper and lower limits of the exchange power between the microgrid and the public power grid.

System Credibility Opportunity Constraint
Wind power and photovoltaic power generation are fluctuating power supplies, have a certain degree of randomness, and the load and battery are also uncertain.Therefore, the wind power output, photovoltaic power output, battery output and load are represented by fuzzy parameters.That is, the power balance constraint is established at the confidence level α, which is where P lt is the demand for the load in the system during the period t.P lt is the fuzzy parameter of load demand; P wkt , P vlt is the fuzzy parameter of the volatility power output of wind power and photovoltaic power generation; and P cit is the power output of battery during t period, with P cit > 0 indicating battery discharge, and P cit < 0 indicating battery storage.P cit is the fuzzy parameter of the battery fluctuation output, Cr{•} is the credibility of the event in {•}, and α is the confidence level.

The Clear Equivalence Class of Fuzzy Chance Constraints
The fuzzy parameter G F of fluctuating power output and load in each scheduling can be represented by trapezoidal functions: where µ(G F ) is a membership function; G Fs (s = 1, 2, 3, 4) is a membership parameter; and G Fs can be determined based on the predicted value G fc .G F1 -G F4 can be determined based on the predicted value G fc : where ω s (s = 1, 2, 3, 4) is a proportional coefficient, 0 < ω s < 1.The proportional coefficient is generally determined by the historical data of the fluctuating power output and load.
Trapezoidal fuzzy parameters can be represented by quadruplets: Trapezoidal fuzzy parameters are shown in Figure 2.
The fuzzy parameter causes the constraint condition to not give a certain feasible set, so the confidence level is introduced, and it is hoped that the constraint condition is established with a certain confidence level α, expressed as where α is the confidence level; and Cr{•} is the credibility of the event in {•}.Define two functions: ( ), ( ) 0 ( ) 0, ( ) 0 where When the confidence level of the opportunity constraint is α ≧ 0.5, the clear equivalence form The constraint function g(x, ξ) has the following form: where ξ k is a trapezoidal fuzzy parameter (r s1 , r s2 , r s3 , r s4 ), s = 1, 2, . . ., t, t∈R; and r s1 -r s4 is a membership parameter.The fuzzy parameter causes the constraint condition to not give a certain feasible set, so the confidence level is introduced, and it is hoped that the constraint condition is established with a certain confidence level α, expressed as where α is the confidence level; and Cr{•} is the credibility of the event in {•}.Define two functions: where When the confidence level of the opportunity constraint is α 0.5, the clear equivalence form of the opportunity constraint (Equation (38)) is According to the above method, the fuzzy opportunity constraint is processed to obtain the clear equivalence form of the power balance constraint:

Social Particle Swarm Optimization
The social particle swarm optimization algorithm sets have different audience thresholds for each individual and, accordingly, determine whether the individual follows other individuals or maintains the current state, or is free to move.In order to maintain the diversity of individuals in the population, avoid premature convergence of the algorithm and fall into a local optimum.
There are two types of particles in the social particle swarm algorithm: free particles and following particles.The free particle is a particle with a threshold value of 0. It is not affected by the behavior of other particles, and randomly determines the position of the next generation of particles.Particles with non-zero thresholds are followed by particles which are affected by the attraction point during the search process.Whether or not they follow the attraction point depends on how many other follower particles are present.The SPSO algorithm follows the particle update formula as: where ω is the inertia weight, indicating the impact of the historical velocity information of the particle on the current velocity; c 1 and c 2 are learning factors; and r 1 and r 2 are random numbers of [0,1].Among them, the third term in the above formula is changed from the gbest ij in the standard PSO to the attraction point attract ij , which may also be different for different particles.When the algorithm is initialized, the following particle selects the individual with the best fitness value of the population as the initial attraction point, and the algorithm is consistent with the standard PSO algorithm.As the search progresses, each free particle may become a new attraction point.If the fitness value of a certain free particle k is better than the fitness value of all other particles, then k becomes the attraction point.At this time, individuals with a threshold value of 1 in the following particle will be attracted first, and then individuals with a higher threshold value will also move toward the attraction point.Individuals whose number of attracted populations do not reach the threshold will maintain the original searching mode.

Improvement of Weight ω
It is proposed that the inertia weight of each particle decreases not only with the increase of the number of iterations, but also decreases as the distance from the global best point increases.That is, the inertia weight ω dynamically changes according to the position of the particle: where l xg is the distance from the particle x to the optimal particle, and l max and l min are the preset parameters of maximum distance and minimum distance, respectively.According to the above formula, when l xg > l max , ω = ω start ; when l xg < l min , ω = ω end ; when l min < l xg < l max , ω increases monotonically with l xg .Simulation results show that the algorithm has a significant improvement in convergence speed and convergence accuracy under this strategy.The flowchart for improved standard particle swarm optimization (SPSO) is shown in Figure 3.

System Example Summarize
The microgrid system consists of two thermal power generators, two combined heating and power units with thermal storage units, one wind turbine unit, one photovoltaic power generation unit, and one battery system.The relevant data of wind power and photovoltaic power generation in the microgrid are shown in Table 1, which references [10], and the relevant parameters of the thermal power generator are shown in

System Example Summarize
The microgrid system consists of two thermal power generators, two combined heating and power units with thermal storage units, one wind turbine unit, one photovoltaic power generation unit, and one battery system.The relevant data of wind power and photovoltaic power generation in the microgrid are shown in Table 1, which references [10], and the relevant parameters of the thermal power generator are shown in Table 2. Coefficients of combined heating and power units are shown in Tables 3 and 4, and related data of batteries are shown in Table 1, Table 5, and Table 6.Pollutant emissions of each unit are shown in Tables 7 and 8. Related parameters of heat storage device are shown in Table 9.The exchange prices of microgrid and public power grid at each time period are shown in Table 10, which references [30].This article selects a typical dispatch day as a research object and divides one day into 24 scheduling periods of one hour each.The forecast curve of load, wind power, and photovoltaic power generation is shown in Figure 4.The upper and lower limits of the exchange power between the microgrid and the public power grid are 2 MW and −2 MW, respectively (the microgrid absorbs power from the public power grid positively, otherwise it is negative).The number of charge and discharge times T n of the battery is 8 times, and the rated capacity C n is 5 MW•h.

Example Result
This paper has established a comprehensive consideration of the cost of power generation for micro-generator sets, environmental costs, operation and maintenance costs of wind power and photovoltaic power generation, and operating costs of batteries.A microgrid optimization scheduling model was built that included the combined heat and power system in consideration of

Example Result
This paper has established a comprehensive consideration of the cost of power generation for micro-generator sets, environmental costs, operation and maintenance costs of wind power and photovoltaic power generation, and operating costs of batteries.A microgrid optimization scheduling model was built that included the combined heat and power system in consideration of environmental costs.Through the improved particle swarm algorithm, the minimum operating cost for the scheduled intraday microgrid system is 12,285 dollars.At this time, the scheduling curves of the power output of each micro-source are shown in Figure 5, and the thermal output of the combined heat and power units is shown in Figure 6. Figure 5 shows the dispatch value of power generation output of each micro-generator when the total cost is the lowest.Both wind power and photovoltaic power generation are completely consumed in this dispatching process, that is, the maximum power follows the control.As can be seen from Figure 5, the thermal power generator and the combined heating and power unit serve as controllable units to track the change trend of the load to some extent.Figure 5 shows the dispatch value of power generation output of each micro-generator when the total cost is the lowest.Both wind power and photovoltaic power generation are completely consumed in this dispatching process, that is, the maximum power follows the control.As can be seen from Figure 5, the thermal power generator and the combined heating and power unit serve as controllable units to track the change trend of the load to some extent.As can be seen from Figure 6, the sum of the heat output of the combined heat and power unit and the heat storage device is equal to the value of the heat load, which satisfies the heat balance constraint during the operation.The heat storage device breaks the thermoelectric coupling  Figure 5 shows the dispatch value of power generation output of each micro-generator when the total cost is the lowest.Both wind power and photovoltaic power generation are completely consumed in this dispatching process, that is, the maximum power follows the control.As can be seen from Figure 5, the thermal power generator and the combined heating and power unit serve as controllable units to track the change trend of the load to some extent.
As can be seen from Figure 6, the sum of the heat output of the combined heat and power unit and the heat storage device is equal to the value of the heat load, which satisfies the heat balance constraint during the operation.The heat storage device breaks the thermoelectric coupling characteristics of the combined heat and power unit, and realizes a reasonable dispatch of the unit's heat output.
The battery storage capacity and charge or discharge power of the battery during this economic dispatch are shown in Figure 7.
Energies 2018, 11, x 16 of 23 characteristics of the combined heat and power unit, and realizes a reasonable dispatch of the unit's heat output.
The battery storage capacity and charge or discharge power of the battery during this economic dispatch are shown in Figure 7.As can be seen from Figure 7, for the storage battery, charging and discharging cannot be performed at the same time, and the charging and discharging amount of the storage battery are equal in a scheduling period.Compared with Figure 4, we can see that in the low-load period, the battery is charging.In the peak load period, the battery is discharging, which not only increased the peak capacity of the microgrid system, but also provides a new way for the consumption of new energy generation.
From Figure 8, it can be seen that the heat storage device cannot store and release heat at the same time, and the thermal storage capacity is the same as the thermal release capacity.After a scheduling period, the thermal storage remains unchanged, which ensures the normal operation of the next scheduling cycle.As can be seen from Figure 7, for the storage battery, charging and discharging cannot be performed at the same time, and the charging and discharging amount of the storage battery are equal in a scheduling period.Compared with Figure 4, we can see that in the low-load period, the battery is charging.In the peak load period, the battery is discharging, which not only increased the peak capacity of the microgrid system, but also provides a new way for the consumption of new energy generation.
From Figure 8, it can be seen that the heat storage device cannot store and release heat at the same time, and the thermal storage capacity is the same as the thermal release capacity.After a scheduling period, the thermal storage remains unchanged, which ensures the normal operation of the next scheduling cycle.

Different Model Results
In order to verify the superiority of this paper's scheduling model in consideration of environmental costs, it is compared with the conventional micro-network scheduling model that does not consider environmental costs, and is defined as follows.
Model 1: This article takes into account the environmental costs of the microgrid thermal-electric joint scheduling model.
Model 2: Traditional microgrid thermal-electric joint scheduling model without environmental costs.
The comparison of wind power's consumption under different scheduling models is shown in Figure 9, and the comparison of photovoltaic power consumption is shown in Figure 10.

Different Model Results
In order to verify the superiority of this paper's scheduling model in consideration of environmental costs, it is compared with the conventional micro-network scheduling model that does not consider environmental costs, and is defined as follows.
Model 1: This article takes into account the environmental costs of the microgrid thermal-electric joint scheduling model.
Model 2: Traditional microgrid thermal-electric joint scheduling model without environmental costs.The comparison of wind power's consumption under different scheduling models is shown in Figure 9, and the comparison of photovoltaic power consumption is shown in Figure 10.

Different Model Results
In order to verify the superiority of this paper's scheduling model in consideration of environmental costs, it is compared with the conventional micro-network scheduling model that does not consider environmental costs, and is defined as follows.
Model 1: This article takes into account the environmental costs of the microgrid thermal-electric joint scheduling model.
Model 2: Traditional microgrid thermal-electric joint scheduling model without environmental costs.
The comparison of wind power's consumption under different scheduling models is shown in Figure 9, and the comparison of photovoltaic power consumption is shown in Figure 10.From Figures 9 and 10, it can be seen that for the consumption of wind power and photovoltaic power generation, model 1 is generally higher than model 2, that is, it can effectively increase the consumption of wind power generation after taking into account environmental costs, and promote the development of wind power generation.
The scheduling results for different models are shown in Table 11.From Table 11, it can be seen that in terms of comprehensive cost, model 1 is increased by 3595 dollars compared with model 2.However, in terms of wind power generation's consumption, model 1 achieved complete absorption of wind power generation and photovoltaic power generation, and the wind power's consumption increased by 45.53% compared with model 2, and the photovoltaic power generation's consumption increased by 29.91% compared with model 2. Regarding the emission of pollutants, model 1 reduced SO2 and NO2 emissions by 0.033 t and 1.555 respectively, compared with model 2, which can significantly promote the development of electricity and environmental protection.
Taking into account that the environmental costs in the scheduling process can significantly increase the amount of wind power generation and photovoltaic power generation, and reduce SO2 and NOx emissions, for new energy generation and environmental protection, this development has great significance.

Different Algorithm Results
In order to verify the superiority of the improved particle swarm optimization algorithm in terms of iterative speed and accuracy, the results obtained by the two algorithms are compared.The curve is shown in the following figure.From Figures 9 and 10, it can be seen that for the consumption of wind power and photovoltaic power generation, model 1 is generally higher than model 2, that is, it can effectively increase the consumption of wind power generation after taking into account environmental costs, and promote the development of wind power generation.
The scheduling results for different models are shown in Table 11.From Table 11, it can be seen that in terms of comprehensive cost, model 1 is increased by 3595 dollars compared with model 2.However, in terms of wind power generation's consumption, model 1 achieved complete absorption of wind power generation and photovoltaic power generation, and the wind power's consumption increased by 45.53% compared with model 2, and the photovoltaic power generation's consumption increased by 29.91% compared with model 2. Regarding the emission of pollutants, model 1 reduced SO 2 and NO 2 emissions by 0.033 tons and 1.555 tons, respectively, compared with model 2, which can significantly promote the development of electricity and environmental protection.
Taking into account that the environmental costs in the scheduling process can significantly increase the amount of wind power generation and photovoltaic power generation, and reduce SO 2 and NO x emissions, for new energy generation and environmental protection, this development has great significance.

Different Algorithm Results
In order to verify the superiority of the improved particle swarm optimization algorithm in terms of iterative speed and accuracy, the results obtained by the two algorithms are compared.The curve is shown in the following figure.Figures 11 and 12 show the change curve of the scheduling cost and the amount of pollutant emissions with the number of iterations, obtained by the standard particle swarm optimization algorithm.Figures 13 and 14 show the change curve of the scheduling cost and the amount of pollutant emissions with the number of iterations, obtained by the improved social particle swarm optimization algorithm.Table 12 shows the value of the scheduling cost and the amount of the pollutant emission finally obtained by the two algorithms.
Energies 2018, 11, x 19 of 23 cost and the amount of pollutant emissions with the number of iterations, obtained by the standard particle swarm optimization algorithm.Figures 13 and 14 show the change curve of the scheduling cost and the amount of pollutant emissions with the number of iterations, obtained by the improved social particle swarm optimization algorithm.Table 12 shows the value of the scheduling cost and the amount of the pollutant emission finally obtained by the two algorithms.cost and the amount of pollutant emissions with the number of iterations, obtained by the standard particle swarm optimization algorithm.Figures 13 and 14 show the change curve of the scheduling cost and the amount of pollutant emissions with the number of iterations, obtained by the improved social particle swarm optimization algorithm.Table 12 shows the value of the scheduling cost and the amount of the pollutant emission finally obtained by the two algorithms.It can be seen from the above figure that with the increase of the number of iterations, the scheduling cost and the amount of pollutant emissions obtained by the improved particle swarm optimization algorithm finally converge to the lowest value, which verifies the effectiveness of the algorithm.It can be seen from Figures 11 and 12 that when the standard particle swarm optimization algorithm is used, the cost of the scheduling and the amount of pollutant emissions converge to the lowest value after 500 iterations.Figures 13 and 14 show that the convergence speed is significantly improved after using the improved particle swarm algorithm, and the lowest value is obtained after 300 iterations.In Table 12, the scheduling cost and the amount of pollutant emissions obtained by the improved particle swarm optimization algorithm are, respectively, 12,285 dollars and 0.26 tons.Compared with the results obtained by the standard particle swarm optimization algorithm, the superiority of the improved particle swarm optimization algorithm in convergence speed and accuracy is well verified.0 100 200 300 400 500 600 700 800 900 1000 11.5  It can be seen from the above figure that with the increase of the number of iterations, the scheduling cost and the amount of pollutant emissions obtained by the improved particle swarm optimization algorithm finally converge to the lowest value, which verifies the effectiveness of the algorithm.It can be seen from Figures 11 and 12 that when the standard particle swarm optimization algorithm is used, the cost of the scheduling and the amount of pollutant emissions converge to the lowest value after 500 iterations.Figures 13 and 14 show that the convergence speed is significantly improved after using the improved particle swarm algorithm, and the lowest value is obtained after 300 iterations.In Table 12, the scheduling cost and the amount of pollutant emissions obtained by the improved particle swarm optimization algorithm are, respectively, 12,285 dollars and 0.26 tons.Compared with the results obtained by the standard particle swarm optimization algorithm, the superiority of the improved particle swarm optimization algorithm in convergence speed and accuracy is well verified.

The Effect of Adjustment of Time-of-Use Electricity Price on Scheduling Results
For the calculation of e 5 in the objective function, the time-of-use price is taken into account, and now adjusting the time-of-use price, to analyze the impact of price changes on microgrid scheduling.The electricity price is uniformly increased by 10% and reduced by 10%, respectively.The power generation output scheduling curve obtained is shown in the Figure 15.

The Effect of Adjustment of Time-of-Use Electricity Price on Scheduling Results
For the calculation of e5 in the objective function, the time-of-use price is taken into account, and now adjusting the time-of-use price, to analyze the impact of price changes on microgrid scheduling.The electricity price is uniformly increased by 10% and reduced by 10%, respectively.The power generation output scheduling curve obtained is shown in the Figure 15.From this, it can be seen that mode 1 is the power generation output curve obtained after increasing by 10%, and it can be seen that the peak valley difference is the smallest.Mode 2 is the power generation output curve under the original electricity price.Mode 3 is the curve obtained after 10% reduction, with the maximum peak valley difference.This is because after mode 1 increases the electricity price, restraining the demand of the load and shortening the peak valley difference becomes inevitable.After the electricity price is decreased in mode 3, the electricity consumption of users during peak hours will be increased, further increasing the peak valley difference.
For further increase or decrease of electricity price, the corresponding scheduling cost is shown in Table 13.It can be seen from the table that after the electricity price increases by 10%, the scheduling cost is slightly reduced, but it is not obvious.After the electricity price 10% reduction, the scheduling cost increased slightly.When the electricity price is increased or decreased by 20%, the scheduling cost increases obviously.This is because when electricity prices are raised, load demand is suppressed, and peak valley difference reduced, thereby reducing the number of power generator start and stop times, saving the start-up cost and total cost of scheduling.When the electricity price is decreased, the demand of load during peak hours will be increased, increasing peak valley difference.The From this, it can be seen that mode 1 is the power generation output curve obtained after increasing by 10%, and it can be seen that the peak valley difference is the smallest.Mode 2 is the power generation output curve under the original electricity price.Mode 3 is the curve obtained after 10% reduction, with the maximum peak valley difference.This is because after mode 1 increases the electricity price, restraining the demand of the load and shortening the peak valley difference becomes inevitable.After the electricity price is decreased in mode 3, the electricity consumption of users during peak hours will be increased, further increasing the peak valley difference.
For further increase or decrease of electricity price, the corresponding scheduling cost is shown in Table 13.It can be seen from the table that after the electricity price increases by 10%, the scheduling cost is slightly reduced, but it is not obvious.After the electricity price 10% reduction, the scheduling cost increased slightly.When the electricity price is increased or decreased by 20%, the scheduling cost increases obviously.This is because when electricity prices are raised, load demand is suppressed, and peak valley difference reduced, thereby reducing the number of power generator start and stop times, saving the start-up cost and total cost of scheduling.When the electricity price is decreased, the demand of load during peak hours will be increased, increasing peak valley difference.The number of power generator start and stop times will be increased, so the scheduling costs will also increase.The results from the table show that the price of electricity cannot increase arbitrarily, and the scheduling cost will have a significant increasing due to the unreasonable electricity prices.Under the calculation parameters of this paper, for the adjustment of electricity price, it is reasonable to increase within 10 percentage points, if necessary.

Conclusions
This paper aims to minimize the total cost, while taking into account the emission reductions of SO 2 and NO x , considering the power generation costs, the environmental costs of micro-generator sets, the operation and maintenance costs of wind power and photovoltaic power generation, the related cost of battery, and the operation and maintenance cost of wind power and photovoltaic power generation.The related constraints of thermal balance and power balance also considered during microgrid system operation.A microgrid optimization scheduling model was established that included a combined heat and power system in consideration of environmental costs.Taking a microgrid system as an example, the improved particle swarm optimization algorithm is used to verify the validity and reliability of the model, and it also proves the effectiveness and superiority of the improved algorithm.The impact of electricity price's adjustment on microgrid scheduling cost also analyzed.The results show that, in this paper, the environmental cost scheduling model is compared with the traditional non-environmental cost scheduling model.Although the total cost has increased by 3595 dollars, the wind power consumption has increased by 45.53%, and the photovoltaic generation consumption has increased by 29.91%.SO 2 and NO x emissions are respectively reduced by 0.033 tons and 1.555 tons, which has great significance for energy conservation and emission reduction.
Photovoltaic Prediction power

Figure 4 .
Figure 4. Prediction curve of load, wind power, and PV.

Figure 6 .
Figure 6.Heat power scheduling curve of combined heat and power unit.

Figure 6 .
Figure 6.Heat power scheduling curve of combined heat and power unit.

Figure 7 .
Figure 7. Storage battery capacity and charge and discharge power.

2 Figure 7 .
Figure 7. Storage battery capacity and charge and discharge power.

Figure 8 .
Figure 8. Thermal storage power and exothermic power of heat storage system.

Figure 9 .
Figure 9.Comparison of wind power accommodation under different models.

Figure 8 .
Figure 8. Thermal storage power and exothermic power of heat storage system.

Energies 2018, 11 , x 17 of 23 Figure 8 .
Figure 8. Thermal storage power and exothermic power of heat storage system.

Figure 9 .Figure 9 .
Figure 9.Comparison of wind power accommodation under different models.

Figure 10 .
Figure 10.Comparison of photovoltaic accommodation under different models.
Figures 11 and 12  show the change curve of the scheduling 0

Figure 10 .
Figure 10.Comparison of photovoltaic accommodation under different models.

Figure 11 .
Figure 11.The change curve of economic costs with the number of iterations (SPSO).

Figure 12 .Figure 11 .
Figure 12.The change curve of pollutant emissions with the number of iterations (SPSO).

Figure 11 .
Figure 11.The change curve of economic costs with the number of iterations (SPSO).

Figure 13 .
Figure 13.The change curve of economic costs with the number of iterations (improved SPSO).

Figure 14 .
Figure 14.The change curve of pollutant emissions with the number of iterations (improved SPSO).

Figure 14 .
Figure 14.The change curve of pollutant emissions with the number of iterations (improved SPSO).

Figure 15 .
Figure 15.Power output curve under different electricity price.

2 Figure 15 .
Figure 15.Power output curve under different electricity price.
scheduling model for a multisource microgrid power system was established.The objective function is as follows: e = min[e 1 + e 2 + e 3 + e 4 + e 5 + e 6 ], A

Table 2 .
Coefficients of combined heating and power units are shown Figure 3. Flowchart for improved standard particle swarm optimization (SPSO).

Table 1 .
Distributed power parameters of microgrid.

Table 2 .
Conventional thermal power generator parameters.

Table 3 .
Combined heat and power unit parameters.

Table 4 .
Combined heat and power unit parameters.

Table 5 .
Data of storage battery.
n /MW•h C max /MW•h C min /MW•h C t0 /MW•h C T /MW•h

Table 6 .
Data of storage battery.

Table 7 .
Correlation coefficient of environmental cost calculation.

Table 9 .
Related parameters of heat storage device.

Table 10 .
Electricity exchange price of microgrid and the public grid.

Table 9 .
Related parameters of heat storage device.

Table 10 .
Electricity exchange price of microgrid and the public grid.

Table 11 .
Scheduling results comparison of two models.

Table 11 .
Scheduling results comparison of two models.

Table 12 .
Comparison of two algorithm scheduling results.

Table 12 .
Comparison of two algorithm scheduling results.

Table 13 .
Scheduling cost under different electricity price.

Table 13 .
Scheduling cost under different electricity price.