Realistic Optimal Power Flow of a Wind-Connected Power System With Enhanced Wind Speed Model

The complexity of achieving optimal power flow in the presence of renewable resources decreases the accuracy and optimality levels of the power system due to the associated intermittency and uncertainty. The increased challenge of large-scale deployment of wind energy necessitates the proper modeling of wind impact on power system security and reliability levels. This article discusses a new reliable power flow optimization tool that accounts for wind power availability and uncertainty. An accurate wind forecast model is created to maintain power system security considering wind power variability. The error of the forecasting phase is included in the proposed model to accurately predict the available wind power. In this work, the scattered wind data is converted into informative frequency distribution considering the effect of averaging around integers, halves, and quarters. The proposed method maximizes the utilization level of wind energy without deteriorating the system security. The accuracy of the new proposed work is presented by comparing its results with other models discussed in the literature. A complete and integrated formulation of the objective function has been accomplished. The cost function includes transmission losses, generation operating costs, generation gas emissions, and valve-point effects. Reliable and efficient optimization algorithms are adopted to minimize the established cost function of the system—namely, teaching-learning-based optimization and symbiotic organisms search algorithms. The effectiveness of the proposed approach is validated using the IEEE 39-bus system.


I. INTRODUCTION
In light of the global warming alarms and the increased environmental concerns over using fossil fuels in power generation, wind power plants have become more attractive, on both economic and ecological levels, compared to fossil fuel power plants [1]− [5]. Unfortunately, the uncertain and unpredictable nature of wind power has constrained the penetration of wind power plants in the generation systems. Moreover, increasing wind power penetration in power grids above certain limits creates serious grid security problems. Wind power variability requires an additional operational primary reserve, which increases the operating cost of the system and adds a potential threat to system reliability [6].
The associate editor coordinating the review of this manuscript and approving it for publication was Yang Li .
As wind power penetration increases, an accurate forecast for wind speed-and thus wind power during the next dispatch or commitment period-becomes essential.
Probability distribution functions such as Weibull distribution are usually employed to characterize wind speed for wind plant sites over long periods such as seasons and years. In [7], wind speed was presented in the optimal power flow (OPF) model using Weibull probability distribution function. The model considers the risk associated with overestimation of the offered wind energy in the dispatch period as a penalty cost on the owner of the wind plant. The risk of underestimating wind power is treated as an additional generation reserve cost, which is integrated into the model. The results of the economic dispatch are strongly dependent on many coefficients such as the scale factor, the shape factor of Weibull distribution function, the reserve cost, and the penalty cost.
The authors in [8] proposed a three-stage deterministic wind power forecasting method. A search-based, multiplesupport, vector regression method, with enhanced harmony, was used to predict the wind power capacity. The accuracy of the developed method relies on a training phase for the models generated. The prediction stages of the method show a sophisticated and elongated iterative style, which makes it more applicable for long-term wind forecasting. However, the results show similar convergence using simpler methods. A more complex wind speed forecasting model, presented in [9] through a genetic algorithm-based, auto-regressive neural network model, was used for wind and load forecasting. Combined weather and load forecasting was performed to increase the reliability of the forecasting model. The method focused on long-term forecast modeling, making it suitable for planning stages rather than operation stages. This modeling relies on iterative and training phases that require extended execution periods.
The work presented in [10] employed the kernel recursive least-squares model as a solution to address the necessities of online error correction. An iterative error adjustment method has been designed to produce the possible benefits of statistical models in achieving accurate modeling for optimal power flow. In [11], the authors proposed a method that extracted the ultra-short-term wind power prediction errors based on deep believe network algorithm. Historical input data are employed as inputs to train the network model through the training phase and reverse fine-tuning processes. The model is then combined with the probability distribution fitting model to capture better wind power forecast errors to optimize the net power flow in the system. The authors in [12] used the maximum entropy principle to find the most likely realized probability distributions to provide better probabilistic circumstances. The results were used to solve the generation dispatch model of power systems with significant wind power deployment.
Several studies reported in the literature used other models for optimal power flow including wind. In [13], a multivariate model was constructed to consider the influence of wind uncertainty and stochastic dependence characteristics of forecasting errors on wind power. A piece-wise exponential error distribution model was created to define the probability distribution functions where the nonlinear, leastsquares-based method was employed to estimate the model parameters.
In this work, a new modeling and optimal power flow solution for grid-connected wind power is presented. The optimization efficiently considers the modeling of wind speed uncertainty and correlates it to power system security. To handle wind power variability and to enhance the system security level, wind power is accurately forecasted and integrated into the OPF model. A new wind forecast model is developed to predict wind power, and then the error of the forecast is incorporated into the OPF model to guarantee a high level of system security at the maximum possible wind power level. The framework of the proposed optimization scheme is shown in Fig. 1. The accuracy of the proposed work is presented by comparing the results and conclusions from this work with the models reported in the literature. Moreover, the model of the gas emission of thermal generation units is incorporated in the optimization. To solve the problem more realistically, precise transmission line losses and valve-point effects are also considered. The wrong estimation (underestimation or overestimation) of the offered wind power has a direct impact on the solution of the OPF problem. The scheduled wind power decreases as the reserve cost coefficient increases. Thus, it is more costly to overestimate the existing wind energy. Similarly, the scheduled wind power increases if the penalty cost coefficient increases, as it is costly to underestimate the existing wind speed. Therefore, the operator must increase the planned power. The factor is also addressed in the proposed work to reinforce the OPF level. The proposed algorithm shows the effectiveness of utilizing the distribution of forecast errors and compares it with Weibull probability distribution method used in [7].
The main contributions of this manuscript can be summarized as follows: • A new wind energy modeling and optimal power flow solution of grid-connected wind energy system are developed. The optimization procedure efficiently considers the modeling of wind speed uncertainty and correlates it to power system security.
• Two efficient and robust stochastic optimization algorithms are employed to increase the optimality of the solution and to ensure a high rate of convergence.
• Gas emission modeling of thermal generation units is considered in the proposed optimization procedure. Precise transmission line losses and valve-point effects are incorporated to have a realistic and accurate system modeling.
• Wind power is accurately forecasted and integrated into the newly developed OPF model to account for wind power variability to minimize the tradeoff between system security and operation optimality.
• A solid statistical analysis is undertaken to present a new speed forecast model for wind speed in the short-term period. The accuracy of the proposed forecast model is high and measurable. Unlike Weibull distribution model, the proposed model shows the impact of underestimating each speed and the associated percentage of the error.
• The statistical forecast model is valid even for nonuniform wind speed profiles and it is not necessary to have certain known distribution functions. Moreover, the proposed model considers different periods and the accuracy is reflected in the wind speed forecast.
• The work demonstrates how overestimation/ underestimation of wind speed by 1 m/s or less can affect the reliability of the whole power system. This article is organized as follows: Section 2 presents a summary of the used optimization algorithms. Section 3 presents a short discussion about wind speed forecast models. Section 4 discusses wind speed and the distribution of forecast errors. The mathematical formulation of the OPF problem is detailed in Sections 5 and 6. A test system, results, comparisons, and discussion are presented in Sections 7 and 8. Section 9 concludes the paper with final remarks.

II. THE EMPLOYMENT OF THE CANDIDATE OPTIMIZATION ALGORITHMS IN THE PROPOSED FRAMEWORK
Two efficient and robust optimization algorithms are adopted to solve the proposed OPF models: teaching-learning-based optimization (TLBO) and symbiotic organisms search (SOS). These algorithms have been recently introduced as powerful stochastic optimization algorithms [14]− [20]. Most nature-inspired metaheuristic algorithms rely on random variables and have some parameters to be fitted to handle the problem under study [16]- [18]. In contrast, TLBO and SOS have no tuned parameters. Therefore, the implementation is more straightforward in comparison with other population-based algorithms.
TLBO is divided into two phases. In the first phase, learning is an interactive process. The teacher phase is associated with the best available solution at each iteration, which refers to the ''teacher'' term. The second phase is known as the learner phase and represents the interactive learning between learners. The inputs from the learner phase will update the best available solution in the population, if possible, and so on; consequently, the convergence rate can be increased.
SOS is stimulated by the biological communications between two organisms in any ecosystem through three phases. In the mutualism phase, two different organisms can receive some benefit when interacting with each other. This relation is represented by random variables that simulate the degree of interest. This step ends with updating the organisms when the new fitness is better compared with the previous one. In the commensalism phase, the interaction between the organisms is close to that of the last phase, but the benefit is associated with one organism, while the other may suffer from this relation. In the parasitism phase, one organism tries to kill the other organism. Mathematically, if the solution is not the best at this point, it will be rejected until a new best solution is generated by the process.
Both TLBO and SOS have superiority over many different population-based algorithms in terms of rate of convergence, global solution, and computational time [19], [20]. The optimal results obtained by the optimization framework are taken after comparing the output of TLBO and SOS for each loading and weather condition. The flowchart shown in Fig. 2 has been developed to demonstrate the methodology of the proposed optimization. The analysis and implementation of the algorithms have been explained in detail in [21], [22], and repeating these details is beyond the scope of this article.

III. REVIEW OF WIND SPEED FORECAST MODELS
Wind speed forecast models aim to estimate wind speed for a future time. They can be categorized into two types: time-scale horizon and model source types [23], [24].
The time scale of the forecast models is classified into four classes: (a) ultra-short-term forecasting varies from a few seconds to one hour, (b) short-term forecasting ranges from one hour to several hours, (c) medium-term models range from several hours to one week, and (d) long-term forecasting extends from a week to a year [25]. Both the time-scale forecast and model source forecast are shown in Fig. 3. The bidirectional arrows indicate the interrelationship between these models. The figure shows the designations of the model source-based forecast. The models can be classified as follows:

A. PERSISTENCE MODEL
The persistence model adopted in this work is the simplest model ever used. The model assumes that the wind speed at the next period will be the same as it is now-''what you see now is what you will get next'' [13]. Mathematically, the persistence model can be expressed as where d is the forecast period and (t + d) is the forecast time. As the period, d, decreases, the accuracy of the forecast increases. The persistence model is built on the assumption of a high correlation between the current and future wind speeds [26] and the model focused on in this work. The advantage of the persistence model is that it is hard to be beaten in the short-term forecasting scale.

B. PHYSICAL MODEL
The physical model approach (also called numerical weather prediction) is based on (a) the atmospheric physical data used for weather prediction, such as temperature, pressure, and humidity and (b) the physical data of the land such as height, sea level, surface roughness, mountains, and obstacles. These physical data are used as input for supercomputers that use VOLUME 8, 2020  complex mathematical models of wind speed forecast to predict the atmospheric status and the wind speed for the next time horizons. Speed prediction results are highly dependent on the accuracy of the input data and the accuracy of the model. This limits the physical approaches to about 6 to 24 hours [24].

C. STATISTICAL MODEL
This model is implemented based on training with old available data and using the difference between the immediate past and actual wind speed to tune the model parameters.
The most popular statistical models are the following: autoregressive, autoregressive moving average, autoregressive integrated moving average, and neural network. These statistical models are easy to implement and inexpensive, and they do not need more than historical wind data. Because it mainly depends on learning from historical data, the accuracy of the forecast decreases significantly as the forecast time horizon is extended [13], [24].

D. HYBRID MODELS
Hybrid models [27] are a combination of physical and statistical models or a combination of two models with different time horizons from the same type or different types. The forecast error increases as the time horizon of the forecast increases.   within less than one hour. This example demonstrates how difficult it is to accurately forecast the wind speed even for short periods and therefore the wind power. For example, the highlighted periods show severe wind speed fluctuation (i.e., more than 10 m/s speed difference) and thus large output power variations. This, in turn, necessitates an accurate (ultra) short-term forecast scheme to take into account wind speed fluctuations and minimize forecast errors. The persistence model is adopted in this work and the associated forecast errors are investigated to develop a forecast model-based OPF formulation. Statistical analysis of real wind speed historical data taken every 10 minutes (d = 10 min) over one year is performed to show the effectiveness of the persistence model. The 52,560 data points are displayed and derived from instruments mounted on an 82-meter meteorological tower [28]. Fig. 5 shows the wind speed frequency distribution for the tower over a year by rounding the wind speed to the nearest integer. The average wind speed is 4.3 m/s, where the speed of 3 m/s has the highest occurrence frequency. Fig. 5 depicts the wind speed distribution over this year, which approximately follows the Weibull distribution, with Weibull-related coefficients k = 2 and c = 4.5 (for more details, see [7]).

IV. WIND SPEED AND DISTRIBUTION OF FORECAST ERRORS
The forecast error is calculated by subtracting each wind speed value from its preceding value. The errors over the year for different periods (d) in minutes are statistically shown in Fig. 6. Starting with d = 10 min, the first column of Table 1 is the forecast error in m/s, which extends from −8 m/s to 12 m/s. The second column shows the frequency of the corresponding error over the whole year. For example, the most considerable negative error (wind-speed drop) was −8 m/s, which happened three times during the year, and the maximum positive error (wind-speed rise) was 12 m/s, which happened once over the whole year. The third column shows the percentage of the error occurrence, EFP i , which is a division of the error's frequency over the total number of points/errors (52,560). The fourth column shows the accumulated error percentage, AP i , for all errors below or equal to the corresponding error. The last column shows the reversed accumulated percentage (the accumulated percentage starting from the highest positive error to the lowest negative error), RAP. As shown in Fig. 5, the speed is rounded to the closest integer. Moreover, a similar complete study is performed by rounding all points to the nearest half and quarter without any significant impact on the results.
The accumulated percentage of the error is a representation of the percentage of the occurrence of all errors less than or equal to this error, which can be mathematically expressed as where e i is the forecast error number i, AP (e i ) is the accumulated percentage of error i, and EFP(e i ) is the error frequency percentage. The reversed accumulated percentage of an error is a representation of the percentage of the occurrence of all errors greater than or equal to the error, which can be expressed as where RAP (e i ) is the reversed accumulated percentage of error.
The accumulated percentage of the error gives the percentage frequency of errors less than or equal to the error. The reversed accumulated percentage gives the percentage VOLUME 8, 2020 frequency of errors greater than or equal to the error. The RAP column shows that about 75.244% of the errors are greater than or equal to zero, and 99.49% of the errors are greater than or equal to (−3 m/s). This means that 99.49% of wind speed drops not less than (3 m/s). The distribution of forecast error probabilities for d = 10, 20, and30 is shown in Fig. 6. The power of the persistence model is apparent where the highest probability is linked with zero error, which leads to (1).
The distribution of the persistence model forecast errors is skewed and follows the normal (Gaussian) distribution. Considering it is not easy to sample the wind speed frequency as continuous wind speed, Gaussian regression is used as expressed in (4).
where G (x) is the Gaussian distribution function and A, b, and c are constants. For the data presented in Fig. 4, the obtained Gaussian curve-fitting constants are A = 51.65, b = −0.02512, and c = 0.9982. Wind power plants can decrease the output power to a value lower than the available power when the wind speed is higher than the set point. In case the wind speed drops below the required set point, a plant cannot maintain its output power at the scheduled value, and this may cause stability problems. As a result, the RAP column has the highest weight and is the most important parameter in this work.
Equation (1) is modified to increase the confidence and accuracy of the persistence model, and it is rewritten as where V λ is the intended underestimated speed difference (the needed V to ensure λ accuracy). The power of the persistence model in a single period is mathematically proven here, where V λ is zero when λ 75%. For high level of system security, a safe region is defined as the region where a high percentage of errors is located starting from the biggest positive error to the error with reversed accumulated percentage equaling the safe percentage; a 99.0% safe region is considered. Depending on the site of the power plant, its capacity, and the ramping capabilities of the system, the ramp-down limit is restricted to avoid the remainder unsafe region of forecast errors. This problem is usually handled either by leaving some available wind power as a reserve for the plant as considered in [2] or by integrating energy storage systems into the plant.
For an increased forecast period (d = 20 minutes), Table 2 shows the persistence model error results. As the forecast period d increases, the percentage of zero error decreases, the standard deviation increases, and the safety region becomes wider with a lower peak, as shown in Fig. 6. The safe region worst-negative forecast error is very critical and used in the OPF model, as will be demonstrated in the next section. The safe region worst-negative forecast errors for 99% safety percentage of the forecast periods are −3, −4, −5, and −6 for d = 10, 20, 30, and 40, respectively. After wind speed is forecast using the proposed persistence model, the output power from the wind generator can be known and scheduled.

V. OPTIMAL AND SECURE POWER FLOW
OPF is used to find the optimal settings for the considered power system using multi-objective function while satisfying the imposed constraints associated with power flow equations, security limits, and equipment operating limits. There are many objective functions in a power system that are considered in OPF, such as total generation cost, total system loss, and total gas emission. In this work, the total generation cost function is used as the objective function.
The proposed OPF model goal is to maximize the system security under conditions of high wind power penetration. Besides, as the capacity of a thermal plant increases, the valve-point effects become valuable and consequently impose a notable impact on power dispatch decisions from the cost point of view. Therefore, for accurate modeling, the valve-point effects are incorporated in formulating the cost function of the thermal units.
Different types of dangerous gas oxides (e.g., carbon, sulfur, and nitrogen oxides) are released to the atmosphere from gas, coal, and other thermal power plants. These environmentally harmful gas emissions from conventional power plants should be kept in mind when dispatching power plants, especially considering the existence of renewable energy plants because renewable plants are classified as clean energy resources. In this work, gas emission penalties are added to the cost function of thermal generating units in the OPF to show the benefits of wind power as a clean energy source over conventional generation sources. It is expected that adding gas emission penalties to the thermal generation cost function will improve the chances of deploying more wind power. The generation cost function of the thermal units used here is a combination of a nonlinear cost function, the valve-point effects, and the gas emission penalties.

A. GENERATION COST FUNCTION
The generation cost function is defined as the relationship between the output power and the operational cost of the system based on the output power. The general form of these cost functions is a quadratic function. The thermal generation units have lower and upper limits for the output power that cannot be exceeded due to technical and unit capacity reasons. The cost function F G i (P i ) of the thermal units can be expressed in quadratic form as where P i is the output real power of unit i; a i , b i , c i are the cost coefficients; and P imin , P imax are the minimum and maximum limits of real power production.

B. VALVE-POINT EFFECT
For large thermal units, the cost function is highly nonlinear because of the steam turbine valve position. These turbines have several valves that open sequentially to increase the output power of the unit [29]. With the increase of unit dispatch, the input power increases while the incremental heat rate will decrease based on the opening situation of the valves. Another reason to increase the incremental heat rate is linked with the input-output characteristics due to the increase in throttling losses. If e i and k i are constants for the unit i, the valve-point effects are usually modeled in the cost function (F V i ) by a rectified sinusoid function added to the cost function in $, as

C. GAS EMISSION PENALTIES EFFECT
The quantity of gas emission, E (P i ), released from a thermal power plant i, can be expressed as a sum of quadratic and exponential functions of generation power output, in ton/h, as where α i , β i , γ i , ε i , andλ i are the emission constants of generation unit i. The optimization problem with the existence of gas emission can be converted to a single objective minimization problem by multiplying the gas emission level by a penalty cost (emission control cost factor h in $/ton) to get a cost function of emission. The cost function (penalty) of gas emission EC (P i ) = F E i (P i ) in $/h unit can be expressed by where h is the emission control cost factor in $/ton.
Finally, the penalty cost of emission is added to the cost function of the thermal generation power plant, including the valve-point effect. Therefore, the overall generation cost function including valve-point effect and gas emission effect is formulated.

D. THE COST FUNCTION OF WIND POWER
A direct cost function of wind power, F W i (Pw i ), is used for the wind power plant as where bw i is the direct power cost in $/MW and Pw i is the output of wind unit i in MW.

E. FORMULATION OF OPTIMAL POWER FLOW OBJECTIVE FUNCTION
The general formulation of the OPF objective function considered in this work is subject to Ng i=1 P i = P Load + P loss , where P loss is the total real power transmission losses, and N g is the number of thermal generating units. Using the so-called B-coefficients, P loss in (11) is approximated using (12) Inaccurate loss calculation leads to nonoptimal power flow solutions. Therefore, a more accurate iterative method is used to achieve better OPF solutions. The iterative method considers the step of economic dispatch, power flow, and transmission losses. The method initially solves for economic dispatch and then calculates the full power flow using the real power output of generators from the dispatch result. The total loss, P loss , is then calculated directly based on power flow results. Finally, a check for the equality constraint is performed. If this constraint is satisfied within an acceptable error (ε), then the solution is obtained; otherwise, the economic dispatch step is repeated using the newly calculated losses, and the loop iterates until the equality constraint is satisfied.

VI. OPTIMAL POWER FLOW MODEL INCLUDING FORECAST ERRORS
The forecast errors for multi-forecast periods and the ramp capabilities of the thermal generating units are considered in the OPF model. As the OPF solution relies on future forecast values, the OPF model has multi-periods. Each period has different results and forecast wind power values. Constraints of system variables link the subsequent periods for complete-time horizon modeling.
The first period of the OPF is t = 0, and the period width is T . For each OPF, it is assumed that the current time is in the middle of the first period and the OPF is needed to be calculated for the next periods with wind power forecast in the middle of each period. If the OPF has to be calculated for period t = 1, then the wind power should be forecast for one period or (d = T ) and so on until t = N , and then the forecast period can be expressed as The aggregated objective function of the generation units for multi-periods is subjected to accumulated technical and economic constraints where the solution is required to converge, and the global minimum cost is obtained. The proposed multi-periods OPF model is derived from the unit commitment model used in [30]. The proposed OPF model can be expressed as where N g is the number of thermal generation units, N W is the number of wind power plants, N is the number of periods under study, UR i /DR i is the power ramp-up/down limit for generation unit i, PER is the allowed percentage of the ramping capability that can be used, and i is the allowed percentage that can be taken from the i th wind power unit.
The percentage constant i is suggested here to limit the maximum wind power that can be assigned from the available power in the wind power units. It depends on many factors such as the available reserve, ramp capabilities of the system, forecast errors, and size of the wind plants. i can also be used to assign reserve power of the wind plant by not taking all the available wind power, as in [29]. The available wind power at any period (W iav ) is the power of the forecast wind speed after subtracting the worst forecast error in the safe region of that period.
Two approaches are proposed to consider wind speed forecast in the OPF problem. In the first one, the available wind power is forecast using the worst forecast error in the safe region previously defined. The wind power of the plant is not allowed to exceed this power limit. The main advantage of this method is to guarantee high system security. It takes the worst forecast error case and assigns the wind power depending on its ignoring the ramping capability of the system. However, in this method, the wind power dispatch will be lower, which will increase the generation cost and emissions of the system. In the second approach, wind power plants are dispatched using the worst forecast error plus a percentage of the remaining ramp-up capability of the total system. This occurs by sharing the remaining capability between wind plants based on their capacities. Fig. 7 shows the graphical explanation of the two methods. Fig. 7a visualizes the first method of wind speed forecasting without including the ramping capability. Fig. 7b shows how the ramping capability affects the wind speed forecast.
The second approach can be expressed as Pw i (t)} = P Load (t) + P loss (t) where Pw Total is the total wind capacity of the system, and UR s is the total ramp-up capability of the system. The second approach depends on the fact that obtaining the worst error is not valid in all cases. The advantage of this strategy is that the generation cost and gas emission are low compared with the cost of the first approach, because of the integration of more wind power. The disadvantage of this method is that it may take the system to the maximum ramping limits and may not be able to handle any additional generation output. Both approaches have been used, and their results are discussed in the next section.

VII. CASE STUDY: IEEE 39-BUS SYSTEM
The OPF models are investigated and discussed using the standard IEEE 39-bus system [31] to check the effectiveness of the proposed models in incorporating wind power, system transmission losses, gas emission of thermal generation, and valve-point effects. The power flow optimization (economic dispatch) was first achieved in the system without wind integration. After that, the wind power plants were added to the system. The optimization was then implemented using the two proposed methods.
A full AC power flow was executed, and all bus voltages were within 5.0% of the rated voltage. The maximum voltage angle deviation was found to be −10.615 • at bus #8 where one of the wind plants was connected later. All valve parameters and gas emission coefficients of the 10 generation units are listed in Table 3. The transmission losses using B-coefficients of equation (12) are calculated to be 46.7694 MW, and if the numerical iterative method is used, the losses become 43.7117 MW.
The OPF is implemented including only the quadratic cost function F i (P i ) 1 (without gas emission or valve-point effect). Fig. 8 presents the best optimization results from the two optimization algorithms. The system losses are 39.5483 MW, which has a reflection on the generation cost, which increases from $76,821.9 without losses to $77,562.9 including losses (i.e. an increase of $741.0). Now both valve-point effects and gas emission are added to the cost function. After updating the previous formulation and considering equation (11), adding both valve-points effects and gas emission penalties increases the generation cost from $77,562.9 to $110,341.92.
The obtained results demonstrate the importance of increasing the complexity level of the optimization problem formulation by adding more realistic constraints that have  a significant impact on the global cost of system operation. Moreover, the significance of these constraints shows the need for integrating renewable energy from an economic point of view.
To test the OPF models after incorporating wind power, four wind power plants with a total capacity of 1500.0 MW are added to the 39-system with 400, 300, 350, and 450 MW real power capacities connected at buses 4, 8, 13, and 27, respectively, as highlighted in Fig. 9. It is assumed that all the wind plants face the same wind speed at the same period, but each one will have its output generated power depending on its capacity. The wind speed forecast error is used to achieve the available wind power for each plant for the three periods, as shown in Fig. 10.
To increase the weight of system security, the maximum allowed wind power to be dispatched is 90% of the available power ( = 90%), which assigns 10% extra reserve and will not allow all the available wind power to be dispatched.
The proposed methods are applied to consider the wind speed forecast error in the OPF of the modified 39-bus system as follows. VOLUME 8, 2020 The optimization of the 39-bus system including wind power and using Method 1 can be expressed as The upper ramp capability UR i of the generation units is assumed to be 8 MW/min, and the down ramp capability DR i is supposed to be 10 MW/min; so the maximum allowed change in each generation for each period is 80 MW rise and 100 MW drop. The best optimization results are shown in Fig. 11. As expected, the best solution dispatches all the allowed wind power; Method 2 will try to increase the permitted wind power by taking advantage of the system ramp-up capability.

B. METHOD 2
In this method, the optimization of the 39-bus system including wind power can be expressed as where UR s is the summation of the individual generation ramp-up capabilities in the system, and it is assumed to be 80 MW/min.
Using this method and the ramping capabilities of the system, the wind power that can be assigned for each wind power plant has increased. This increases wind power harvesting and environmental and economic benefits. The best optimization results are shown in Fig. 11 (Method 2). Considering the ramping capabilities of the system, Method 2 was able to assign more wind power in the second and third periods, which in turn, resulted in lower generation cost. Fig. 12 shows the flowchart that summarizes the overall procedure developed in the proposed optimization framework.
To show the cost function and run time for each case, comparative results are listed in Table 4. The results of the genetic algorithm (GA) are also introduced as benchmark results to show the effectiveness of the used algorithms in the proposed study. The optimal results are highlighted. The results justify the use of two metaheuristic algorithms where the results are close to each other. On the other hand, the run time using GA is much higher and the cost is always the highest.

VIII. A COMPARISON WITH WEIBULL STATISTICAL MODEL
The main difference between the proposed wind speed forecast model and the state-of-the-art research is related to the linkage between the amount of underestimation in wind speed and the resulting accuracy. If higher accuracy is needed, the value of ''V λ '' must be increased. As a result,   the comparison from an accuracy point of view can always be biased towards the proposed method. The same logic is applicable when the comparison is related to the estimated wind power generation. The lower value of ''V λ '' will end by virtual predicted wind power. In other words, the proposed model can be made adaptive to match the other short-term wind speed models and it can always be better than them.
The comparison with Weibull probability distribution can indicate the importance of having an accurate model.
In several research studies, OPF was studied by selecting one value of wind speed. This can contradict the accuracy of the analysis and can lead to unwanted results. As a benchmark, ''Weibull probability distribution-based modeling'' of wind speed is considered here as a statistical distribution method.
A comparison between the proposed method and the Weibull method is made using non-windy and windy sites.
To clarify the importance and effectiveness of the proposed wind speed forecasting model, three cases are tested for each site. Usually, Weibull distribution method is used for its simplicity, which makes it difficult to be used as a forecasting model or to incorporate system security as a factor in the modeling. The numbers in the following three cases are only logical indicators that classify the wind speed ranges to facilitate presenting the modeling. The wind speed is above 15 m/s. For 5 m/s cut-in wind speed and Weibull probability distribution (the data are given in Fig. 5), the estimated wind power will be zero. The probabilities of the wind output power of the turbine during the year considering 15 m/s rated speed and 25 m/s cut-off wind speed are 71.24%, 27.14%, and 1.611%, respectively, where the normalized power (P w > P rated ) is 0, less than 1, and 1, respectively. If the wind plant is to be dispatched depending on the Weibull method, the highest probability is for the zero power, and as a result, energy will not be dispatched from this turbine even on windy days. For the Weibull method, there is no difference between windy or nonwindy days-the dispatch depends on the yearly data.
Considering the proposed RAP model, a wind speed of 4 m/s is used to represent Case 1 (non-windy day), which is less than the cut-in speed. The resultant wind speed during the day is 1 m/s, and as a result, zero power is delivered from the wind turbine. For Case 2, a wind speed of 12 m/s is considered to represent a sample of the semi-windy day. Using 99% RAP, the forecast error is −3 m/s. The estimated wind power to be dispatched is associated with 9 m/s wind speed. The generated power from the turbine will be deficient (about 6.4% of the rated power) using a typical wind power curve with the presented cut-in and cut-off wind speed. On windy days and considering a wind speed of 20 m/s, the estimated wind speed is 17 m/s. As this speed is higher than the rated speed, the estimated wind power to be dispatched is the rated power.
From this comparison, it is clear that the Weibull distribution method is not suitable for non-windy sites where the highest probability is directed to be lower or around the cut-in speed. However, the proposed RAP model shows the ability to harvest more wind power when it is sufficient to be converted. Another critical point in the proposed RAP model is related to the selection of the cut-in wind speed, which is mainly linked to the structure of the wind plant. Another security factor is introduced here to enhance power system security. For extremely high accuracy (99%), 3 m/s is added to the cutin speed to check the suitability of the site. Fig. 13 shows an example of a windy site [28]. The same procedure presented in Section 5 is repeated for this wind data, and the power probabilities for this site all over the year are 90.21% for P w > P rated , 0.27% for P w = 0, and 9.52% for the other range.
The estimated wind power using the Weibull distribution method is 19.5 m/s for Cases 1 and 2, which is higher than the actual available wind power. This will degrade the power system security. On windy days, the estimated wind power will match with the rated power as the wind speed is higher than the cut-off speed. On a windy day, if the wind speed is higher than the rated speed, the system security will be reserved. The proposed RAP model is secure in both Case 1 and Case 2 as only the available wind power will be dispatched. For Case 3, the scenario is similar to the Weibull probability method, as the wind speed is high.

IX. CONCLUSION
This article provides a realistic solution for the security-constrained OPF by developing a mathematical optimization problem. For accurate and realistic outcomes, the optimization problem considers the modeling of wind power resources, wind power fluctuations, wind speed uncertainty, valve-point effect, gas-emission effect, and transmission losses. Therefore, the impact of each of these parameters on the outcomes is captured. The proposed framework can be applied and used as an OPF tool for any system with any number of buses and sources.
Compared to the commonly used statistical probability distribution function methods used in the literature, the proposed model provides a more accurate wind speed forecast model. The model uses a safe region in which the worst forecast error is selected to be the limit that cannot be exceeded by the allowed dispatchable wind power. This is implemented considering different forecast periods (d = 10, 20, and 30 min). The proposed statistical analysis converts the scattered wind speed over one year to a useful frequency-distributed information. Rounding the values to the closest integer shows accurate and informative results.
In this study, the proposed approach is examined using the IEEE 39-bus with different approaches. TLBO and SOS optimization methods have been applied to solve the OPF problem. The significance of considering all environmental and operational constraints makes the results of OPF to be directed toward harvesting optimal power from the available wind power resources. The energy harvest using the proposed model is higher than the commonly used Weibull method for non-windy sites and is more reliable for windy sites. The fluctuation and the uncertainty in the wind speed are not part of the Weibull distribution method, while it is an essential part of the proposed model.