An intelligent alternating current-optimal power flow for reduction of pollutant gases with incorporation of variable generation resources

Frequent escalations in fuel costs, environmental concerns, and the depletion of non-renewable fuel reserves have driven the power industry to significant utilisation of renewable energy resources. These resources cannot satisfy the entire system load demand because of the intermittent nature of variable generation resources (VGRs) such as wind and solar. Therefore, there is a need to optimally schedule the generating units (thermal and VGRs) to reduce the amount of fuel used and the level of emissions produced. In this study, an AC-power flow in conjunction with combined economic and environmental dispatch approach through the implementation of a modified constricted coefficient particle swarm optimisation was used to minimise the fuel cost and the level of emission gases produced. The approach was applied to the Institute of Electric and Electronic Engineers 30 bus test system through three different load conditions: base-load, increase-load and critical-load. The results showed the practicality of the proposed approach for the simultaneous reduction of the total generation cost and emission levels on a large electrical power grid while maintaining all the physical and operational constraints of the system.


Introduction
Optimal power flow (OPF) is the result of combining economic dispatch (ED) and power flow studies [1]. The operating cost in ED is optimised by a suitable distribution of the amount of power generated by different generating units. Its primary objective is to determine the optimal redistribution of the generator power outputs to meet the load demand at the minimum operating cost, while satisfying a set of qualitative system constraints. It has become necessary to not only minimise fuel cost but also reduce the level of emissions gases, because of increased environmental concerns about thermal power plants releasing a significant level of pollutants such as mercury ( 0 ), carbon dioxide ( 2 ), sulphur oxides ( ) and nitrogen oxides ( ) into the atmosphere. The resulting problem is called combined economic and emission dispatch (CEED) [2]. Several methods to reduce the production of emission gases have been considered [2,3]. The scheduling of generators, fuel cost and the transmission line characteristics of a power system network have a key influence over a generator's ability to optimise the total production cost and transmission losses. System operators are required to schedule the generating units in a manner which lowers the rate of pollutant gas production. However, this must be done together with maintaining the system security, especially in the presence of variable generation resources (VGRs).
Wind and solar power generation are the primary categories of VGRs since they are very intermittent [3]. Solar power is a renewable energy, with sunlight converted into electrical energy using solar photovoltaic (PV) technology [3]. High capital costs and the need for appropriate geographical locations are becoming increasingly minor obstacles in the application of renewable energy resources because of a promising growth of the renewable energy research and development curve [3].
Traditionally, classical optimisation techniques like lambda iteration and linear programming were used to solve the optimal power flow (OPF) problem with considerable accuracy and efficiency. However, optimisation, while maintaining an acceptable system performance, renders it impractical to solve the task using these traditional techniques [4]. There is an emerging need to integrate reliable artificial intelligence (AI) methods that can solve this complex problem efficiently. Heuristic AI optimisation methods, e.g., genetic algorithm, particle swarm optimisation (PSO), and artificial bee colony are capable of handling complex system constraints.
In this study, an OPF algorithm-based approach was used to reduce the level of emission gases produced by conventional generators with respect to the global trend towards the reduction of pollution gases. To solve the OPF problem, a modified metaheuristic algorithm based on the improved version of PSO was designed.

Methodology
An algorithm was designed to utilise a larger proportion of intermittent renewable energy that is available at any one time. This was done with consideration to various real-world power system constraints. Wind and solar PV generators were modelled for integration into the Institute of Electric and Electronic Engineers (IEEE) 30-bus test system. After a comprehensive study on different plausible heuristic AI optimisation techniques that could be used to efficiently solve the OPF problem, modified constricted coefficient particle swarm optimisation (MCCPSO) was developed. The following sub-sections explain the formulated objective function and the proposed optimisation method.

Objective functions
The OPF problem can be mathematically expressed as a series of equations starting with Equations 1 and 2. Minimise where ( ) is the main objective function of the study; ( ) represents the set of the equality constraints; and ℎ( ) defines the set of the inequality constraints. Therefore, can be expressed as Equation 3 where is the number of the generator, is the active power of the generator ; is the voltage of the generator ; is the thermal limit of the transmission line ; and is the reactive power of the bus .
Economic dispatch objective function: The ED objective function is primarily used in the OPF problem for the minimisation of the overall cost of generation and is given by Equation 4.
where is the total generation cost function; , are the generators' cost coefficients; and is the active power of the ℎ generator. Emission dispatch objective function: Pollutants such as and are major waste emissions into the atmosphere by thermal power plants.
The problem for minimising the quantity of emissions, , is formulated by including the reduction of emissions as an objective function using Equation 5.
where is the total generator emissions function and , are the generators' emission coefficients. The pollution control cost, (USD/h), can be obtained by assigning a cost factor to the pollution level, expressed as in Equation 6.
where ℎ is emission control cost factor and represents the ratio of the maximum fuel cost to the minimum emissions of the generating units [2], as in Equation 7 .
where ℎ 2 ℎ 1 are price penalty factors associated with the last and the current unit; 2 1 are the maximum powers associated with the last and the current unit; and is the power demand of the system. Therefore, the price penalty factor of the ℎ unit (ℎ ) can be calculated using Equation 8.
where is the generation cost of the ℎ unit and is the emission volume of the ℎ unit. The CEED objective function: The ED minimises the total operating cost at the expense of increasing the rate of emission gases such as . On the contrary, emission dispatch minimises the volume of emission gases released by the system at the expense of an increased system operating cost. In this study, the operating and emission cost simultaneously was reduced mathematically as in Equation 9.

Minimise
( , ) subject to the load demand equality and the generator inequality constraints. A multi-dimensional optimisation is converted into a single-dimensional optimisation problem by introducing the price penalty factor, ℎ , in Equation 10.
The equality constraints: The ℎ bus injected active and reactive powers are described using equality constraints and can be defined by Equation 11 [5].
where is the total generation loss. The inequality constraints: The inequality constraints associated with the power system network represent the physical limits of the components. These constraints ensure maintenance of the system security [5]. Equations 12-15 represent the inequality constraints of the control variables considered in this study.
(ii) Reactive power generation constraint at the generator buses (iv) The voltage of each P-Q bus constraint where , , are the minimum and the maximum active generation capacity of the ℎ generator; , , are the minimum reactive generation capacity of the ℎ generator; , is the transmission line power flow constraint between bus and bus ; , is the maximum power that can flow between bus and bus ; and , , are the minimum and the maximum voltage of the ℎ P-Q bus constraint.

Variable generation resources
Wind power generation: The wind speed gained by the wind turbines is usually effective at 50-100 m above ground [6]. Thus, the wind speed measured by the anemometer (at its height above ground) needs to be converted to the turbine's hub height [7]. Equation 16 explains the relationship of the wind speeds at different height hubs.
where 1 2 are the wind speed at the initial and the changed hub height respectively; ℎ 1 ℎ 2 are the hub height of the initial and selected point respectively; and is the friction coefficient that implicates actual parameters such as the roughness of terrain and temperature. The power generated from the wind turbine can be approximated by Equation 17 [7] (see foot of page).
The cost of wind power generation: The total cost of power production from the wind farm can be calculated using Equation 18 [8,9] (see foot of page).
The solar PV power generation: Solar PV power is reliant on natural occurrences such as solar irradiance and the ambient temperature. These quantities are directly related to geographical location and season. The power generated from a solar PV farm is calculated by Equation 19 [10,11].
For a given radiation level and ambient temperature, the voltage-current characteristics of a PV module are determined using Equations 20-23.
where ( ) is the power generated by the solar farm; is the solar irradiance; is the number of the PV modules; is the fill factor of the PV module; is the voltage of the PV module; is the current of the PV module; is the voltage of the maximum power point tracking of the PV module; is the current of the maximum power point tracking of the PV module; is the open-circuit voltage of the PV module; is the short-circuit current of the PV module; is the voltage temperature coefficient; is the PV cell temperature; is the current temperature coefficient; and is the open-circuit voltage.
The cost of solar PV generation: The total cost of power production from the solar PV farm can be calculated using a cost function represented by Equation 24 [12] (see foot of page).
The penalty cost coefficient is caused by not using all the available wind/solar PV power available. It is the difference between the available wind power and the actual wind power used. The reserve cost coefficient is caused by under-generation; hence this coefficient is associated with the calling of reserves for compensation [9] where is the power generated by the wind turbine; is the wind speed, − is the cut-in wind speed of the wind turbine; − is the cut-out speed of the wind turbine; is the rated speed of the wind turbine; and is the rated power wind turbine.
where is the total cost of the generated power by the ℎ wind farm; is the total generated power by the ℎ wind farm; ( ) is the direct cost of wind power; . ( ) is the penalty cost coefficient for overestimation of the wind power; and . ( ) is the reserve cost for the underestimation of the wind power.
where is the total cost of the generated power by the ℎ solar farm, is the total generated power by the ℎ solar farm, ( ) is the direct cost of solar power, . ( ) is the penalty cost coefficient for overestimation of the solar power; and . ( ) is the reserve cost for the underestimation of the solar power.

Formulation of the MCCPSO-OPF Load flow methodology:
In an electrical grid, power flows from the generation stations to the load centres. Thus, an investigation is required to determine the bus voltages and the power flow through the transmission lines. There are many methods (such as Newton-Raphson (NR), Gauss-Siedel, or Fast-Decoupled [13]) that can be used to perform the load flow calculations, however, to ensure that the system performs at an optimal level a load flow method needs to be selected based on merit and practicality. The NR method was selected because of its mathematical superiority and accuracy [14][15][16][17].

A modified constriction coefficient PSO
The PSO is a population-based stochastic optimisation technique developed in 1995 and inspired by the social behaviour of birds flocking and fish schooling [18]. In other words, its development was based on the behavioural ability of the swarms to share their information with each other (information is what food sources, danger, etc, are referred to as), where this characteristic increases the efficiency of the entire swarms as opposed to individual particle exploration.
The PSO contains a population of candidate solutions (randomly generated on the first iteration) called a swarm. In every iteration, every particle is a candidate solution to the optimisation problem, in which every particle has a position in the search space. Consider the particle having a position and velocity as stated in Equations 25 and 26.
For particle , • Position: • Velocity: Figure 1 shows a simple model of a moving particle in PSO, one which is not alone but part of a swarm. A particle ( ( )) moves towards the optimum solution based on its present velocity ( ( )), its previous experience (stored in memory) and the experience of its neighbours. In addition to the position and velocity of the particle, every particle has a memory of its own best position. This is denoted by ⃑⃑ ( ), which represents the personal best experience of the particle. In addition to ⃑⃑ ( ), there is a common best experience among the members of the swarm. This is denoted by ( ) (this is not denoted by , as it belongs to the entire swarm and not just to the particle), which represents the global best experience of all the particles in the swarm.
The mathematical model of PSO is simple. By defining these concepts on every iteration of PSO the position and velocity of the particle are updated according to the best experience. Figure 1 defines a vector from the current position to the personal best solution and a vector from the current position to the global best. The particle tends to move towards the new position using all the vectors shown. The black line indicates the motion of the vector as it moves to the new position (denoted by ⃑⃑⃑ ( + 1) ). The new velocity is denoted by ⃑⃑⃑ ( + 1). A new position is created according to the previous velocity ⃑⃑⃑⃑ ( ), the personal best ⃑⃑ ( ), and the global best ( ). Therefore, ⃑⃑⃑ ( + 1) is probably a better location (solution) as the particle was guided by its own motion (its memory of the previous best experience and the experience of the entire swarm). The velocity and position of each particle can be calculated using Equations 27 and 28 (see top of next page).
In the velocity updating process, the values of parameters such as 1 and 2 are equal to 2.05. The of the PSO algorithm, but several modifications are necessary to enhance the performance of the PSO.
Thus, this study has proposed the following methods to modify the basic PSO: Modification #1: In order to enhance the functionality of the random components' coefficients of the vector of velocity ( 1 and 2 ), they should generate the random numbers according to the size of the variable matrix and the produced values should be subtracted from 1. Therefore, Equation 27 can be modified as Equation 29 (see top of page) Modification #2: The vector of velocity should go under a refinement process once its values are defined through the Equation 29, to further improve its performance, as shown in Equations 30 and 31.
where is the maximum range of the vector of the velocity at that step; and are the maximum and minimum values for the size of the variables.
Modification #3: In this formulation, the study has implemented a constriction coefficient method to precisely determine the values of the velocity coefficient ( 1 and 2 ). The amplitude of a particle oscillations decreases as it focuses on the local and neighbourhood previous best positions. Through this method, the movement of particles will be confined to optimum point over time, also it prevents the particles from trapping in local minima [17]. The third modification for improving the performance of PSO can be implemented through Equations 32-35.
where is the constriction coefficient; is the constant multiplier in the constriction coefficient technique (typically, the value of is between 0.73 to 1); is the convergence factor; 1 is the fixed coefficient for the personal best experience and 2 is the fixed coefficient for the global best experience.
Modification #4: To create a suitable balance between the exploration and exploitation during the optimisation process, the study proposed a nonlinear time-varying damping inertia (NLTVD) technique. The NLTVD dynamically reduces the value of damping inertia from its maximum value towards its lower bound as the optimisation progresses. Also, it prevents the PSO from any premature convergence. (See Equations 36 and 37 below.) where are the maximum (0.9) and minimum (0.4) values for the damping inertia coefficient; 1 and 2 are multiplicative coefficients of NLTVD, where the value of 1 is 0.2 and the value of 2 is 7; is the current iteration; and is the maximum number of iterations.
where is the population number; and generates random integers according to population number and size of the variables.   Newton-Raphson power flow solution: The test system data is taken from Sadaat [13]. The bus data (admittance bus, denoted by ) is used to obtain the load flow solution for the intelligent AC-OPF. The MCCPSO-OPF updates the generated power column of the bus data matrix, which indicates the power required to be generated by each generator in the system. The losses in the system are calculated only at the end of the iteration. The difference in power injection and power demand is the loss of the system. This extra power must be accommodated in the load flow for the next iteration. Hence the slack bus, being the generator bus with the highest generating capacity, accepts this extra burden to balance the system. Therefore, at this bus, the voltage magnitude and phase angle are specified, and the real and reactive powers are calculated. Figure 3 depicts the process of power flow analysis with the help of MCCPSO.
Wind power model: Three wind farms will be integrated into the IEEE 30-bus network and are modelled with respect to wind farm projects in South Africa [20] as indicated in Table 1. The total installed capacity of these wind farms was 56.7 MW. By means of the input parameters presented in Table 1, it was possible to model the wind farms for this study using Equations 18 and 19. For the best practical results, using the average wind speed data (approximately 7 m/s) gathered from the actual wind farm locations [24], an artificial wind speed simulator was developed in MATLAB R2018a. Solar PV power model: For the integration of solar PV energy into this study, a 10 MW PV generator was considered. Solar irradiance and the ambient temperature data collected by the University of KwaZulu-Natal [25] was utilised for this model. Table 2 indicates the solar panel parameters. Following the design of a 5 MW solar PV farm [26], which used 22560 PV modules to produce this output power capacity, it takes 45 455 solar PV modules to produce 10 MW.
System integration: Considering the single-line diagram of the IEEE 30-bus network in Sadaat [13], the cookhouse, Gouda and Enel's Gibson Bay wind farms were strategically placed at buses 30, 29, and 24 respectively. The solar PV farm (10 MW) was placed at bus 23. Figure 4 illustrates a simple schematic of the overall power system network after integration.
One of the main objectives of this study was to create a control system that intelligently utilises a larger proportion of variable renewable energy when available to supply the load demand. The MCCPSO algorithm was designed to carry out this operation. The system algorithm first considered where is the new load demand of the system; is total generated power by the solar farm; and is the total generated power by the wind farm.

Results and discussion
The system designed and simulated on MATLAB was executed on Inter ® Core TM i5-7200U (2.7 GHz), 4.00 GB RAM (DDR5) and windows 10 OS (personal property). First, this section defines the main contributions of this study: i) The proposed MCCPSO was employed to solve the OPF problem using the CEED objective function. ii) Three wind farms were modelled on the basis of a novel algorithm formulated to artificially convert the generated wind speed variations to the power output of WTGs. iii) A novel mathematical formulation was proposed to model the power output of monocrystalline PV-arrays. iv) The proposed MCCPSO algorithm was implemented to intelligently utilise a large proportion of VGRs to meet the load demand at the specified hour. v) A proposed metaheuristic OPF approach was able to maximise the social welfare, while minimise the volume of the produced pollutant gases.

The MCCPSO-OPF on the Original IEEE 30-bus
The original IEEE 30-bus test network specifications are shown in Table 3 [27,28].  Table 4 indicates the resultant IEEE 30-bus fuel cost after applying the MCCPSO algorithm through ED and presents the potential of the proposed AI algorithm by comparing it with other AI optimisation algorithms under similar circumstances. Table 5 indicates the new rate of emission gases produced through MCCPSO-OPF using the different objective functions. Although the level of emissions produced is slightly higher than what was achieved through emission dispatch, the total cost of production is significantly less; thus, an appropriate balance between the fuel cost and the level of emission gases has been established. Considering the initial fuel cost and rate of emission gases emitted, through the proposed CEED function there were 7.67% and 27% reductions in /ℎ and /ℎ respectively. This remarkable outcome can be attributed to the fact that dispatching the cheapest generators in a power system to meet the load demand cannot guarantee the optimum cost of operation as it can increase the power losses with respect to the geographical location of the generators and loads. The total cost of generation and the emissions released by each generating unit are shown respectively in Figures 5 and 6.
Use of the CEED objective function resulted in the dispatched power being more economical than the ED objective function, which overburdened the slack bus to optimise the fuel cost as depicted in Figure 5. Overloading of the slack bus to minimise the fuel cost resulted in a significant increase in the rate of emissions released by the slack bus alone, affecting the overall cost of production as shown in Figure 5. Overloading of the slack bus is a common issue in economic load dispatch, however, several methods to distribute this burden were studied by Panda [29].

Wind generator model
The wind speed generator was simulated to investigate the severe restrictions of the wind turbine for each wind farm. Figure 6 shows the wind speed characteristics at the selected wind farms. Figure 7 shows the power generated by each wind farm and the combined generated power. The model was developed over 12 hours, but was extended to 24 hours

Emission dispatch ( )
Proposed CEED ( , )    when integrated. The energy produced by wind farms was directly proportional to wind speed variations. The total cost of wind power generation for each hour is also indicated in Figure 7.

Solar PV generator model
In general, the temperature and irradiance levels peak between 11:00 and 15:00 pm when the sun's intensity is brightest, hence maximum power output can be expected from the PV farm during this period. The amount of solar irradiance present directly affects the amount of power produced by the 10 MW farm, as shown in Figure 8.
On every execution of the PV model over 24 hours, the results produced are dependent on the sample of seasonal data collected from [25]. As the amount of power generated by the PV model increases, so does the cost of production (USD/h). The model generally produced the best distribution of power output during the day in summer (based on an average summer day).

Generator cost comparison
The cost of power generation for the wind and solar generators were calculated using Equations 18 and 24, respectively. Table 6 shows the cost coefficients. Table 7 shows the cost of generation per MW for each generator. Power generation from the PV farm was slightly more than wind power at 2.23 USD/MW. However, this was still better than the power produced by conventional generators. The cost of power generation by Solar PV is generally more expensive compared with wind turbine generators [30].

Integrated system model
To have a comprehensive investigation of the proposed method, the three following load conditions were considered over 24-hour cycle: • base-load condition, 283.4 MW; • increased load condition, 370 MW; and • critical load condition, 160 MW. This section presents the outcome of integrating the intermittent renewable generators into the IEEE 30-bus network under the control of the MCCPSO algorithm. Figure 9 represents the proportional contribution of the wind, solar PV, and conventional generators of the system towards the overall load demand and the total cost of generation (for each hour). It is significant to mention that, in all the presented tables in section 3.5, , are representing the conventional generators, wind farms and solar farms, respectively. Figure 9 indicates the varying of the load demand conditions where a, b, and c respectively represent the baseload, increased load, and critical load conditions. The load demand conditions were programmed to consistently alternate over the 24 hours for the sake of analysis, given the intermittent nature of renewable energies. Under each load condition, for the first hour, the renewable generators were purposely omitted to investigate the effectiveness of the proposed algorithm on the test system.

Baseload condition
The total standard load demand of the IEEE 30-bus network was taken as 283.4 MW, which represented the baseload condition. The simulation produced the optimal dispatching of each generator for every hour through a very detailed cost analysis. Table 8 presents the optimal dispatching of the generators in the standard 30-bus network to meet the baseload demand (1 st hour). The outcome was similar to the CEED results presented in the system analysis before integrating the renewable generators (decimal variation caused by the stochastic nature of MCCPSO). Table 9 shows the dispatching of the generators in the network considering renewable power penetration (10 th hour).    Figure 10 shows the proportional power generation at the baseload demand with a reduced production cost because of the integration of renewable generators. Figure 11 indicates the produced emission volume versus power losses, where the level of emissions produced was significantly reduced after the system utilised a more significant proportion of available renewable power to meet the baseload demand.

Increased load condition
To illustrate the efficiency of the proposed algorithm, the load demand was increased to 370 MW. Table 10 represents the second hour of the simulation, which presents the outcome of introducing the increased load demand, while omitting any renewable energy penetration. Table 11 represents the system with the renewable generators contributing towards the load demand. The system algorithm efficiently dispatched all the conventional generators to meet this load demand without exceeding any of the generator constraints (evident for the real powers of generators C4 and C5 in both Tables 10 and 12, respectively) and concerning the availability of renewable energies. The proportional contribution of each generator type towards the increased load demand is shown in Figure 12. There was an increase in the cost of production, level of emissions, and the power loss as shown in Figures 12 and 13, respectively. However, with the incorporation of renewable energies, these quantities were significantly reduced. The renewable generators significantly mitigated the level of emissions produced.

Critical load condition
To test the efficiency of the proposed algorithm at the extremum points, the load demand was reduced to 160 MW. This situation is termed as the critical load condition as it is the initial point where the systems lower bound constraints might be infringed upon. Table 12 displays the outcome of the simulation without the output of renewable generators. Table 13 shows the outcome of the simulation with renewable energies penetration. The MCCPSO algorithm efficiently dispatched each generator without infringing on the inequality constraints of the conventional generators, while taking into consideration the available renewable power.
The proportional contribution of each generator type towards the critical load demand is illustrated in Figure 14. A decrease was recorded in the cost of production, the level of emissions produced and the amount of power loss incurred, as shown in Figures  14 and 15.

Conclusions
In this study, an intelligent AC-optimal power flow (AC-OPF) through the adoption of modified constriction coefficient particle swarm optimisation (MCCPSO) was proposed for solving the dynamic power flow analysis in the presence of variable generation resources (VGRs). The proposed MCCPSO-OPF was designed to interactively incorporate a larger proportion of power supplied by VGRs into the network at any given time, considering the system security. The MCCPSO-OPF has the unique capability to comprehend and adhere to the physical and systematic operational constraints. The developed MCCPSO-OPF significantly reduced the operation cost and the emission volume by 7.67% and 27%, respectively, for a 24-hour cycle. With respect to the investigated case studies, it can be concluded that the proposed method of the study is able to maximise the social welfare, while minimising the generation costs. It can, therefore, be used by system operators in the power market industry.