# A Framework for Real-Time Optimal Power Flow under Wind Energy Penetration

^{*}

## Abstract

**:**

## 1. Introduction

- A novel RT-OPF framework is developed to address the conflict between the fast changing wind power and the slow optimization computation and consequently to realize an online optimization of energy systems in a very short sampling time;
- Discrete reference values of the slack bus voltage, wind power curtailment of WSs, and reverse power flow are considered simultaneously, leading to a MINLP problem;
- A scenario generation method is integrated in the RT-OPF framework to represent uncertain wind power for the prediction horizon, which leads to a set of uncoupled MINLP problems solved by parallel computing.

## 2. Problem Formulation

_{s}should be kept as short as possible. However, due to its high complexity, the computation time T

_{OPF}needed to solve the optimization problem can be much higher than the sampling time. To address this conflict, we employ the forecasted data of wind energy which are available in advance of a future time horizon T

_{p}. In this paper, this forecasted time horizon is called a prediction horizon. Since the prediction horizon T

_{p}is usually higher than the sampling time T

_{s}, we can divide the prediction horizon into M sampling times, i.e.,:

_{OPF}is smaller than the prediction horizon T

_{p}. Under this assumption, a prediction-realization approach for RT-OPF will be developed in this paper. In the prediction phase, the optimization problem is solved in advance for a number of probable wind energy scenarios, based on the forecasted data in the prediction horizon and its probability density function (PDF), leading to a lookup table for optional optimal operation strategies. In the realization phase, the actual wind energy data are successively available from one sampling time to the next. In each sampling time, the actual data will be compared with the predefined wind energy scenarios and an optimal operation strategy corresponding to the nearest higher scenario will be selected from the lookup table and realized in the network. In this way, an online update of the operation strategy according to the spontaneously changing wind energy generation is carried out.

## 3. Scenario Generation

## 4. Solution Framework

#### 4.1. Prediction Phase

#### 4.2. Realization Phase

Algorithm 1 Comparing and selection of wind power |

for each WS ${n}_{w}=1,\cdots ,{N}_{w}$ and ${n}_{s}\ge 2$ |

$\begin{array}{l}\mathrm{If}\text{}{P}_{w}({n}_{w},({n}_{s}-1)){P}_{w.A}({n}_{w},m)\le {P}_{w}({n}_{w},{n}_{s})\\ \mathrm{then}\text{}\mathrm{consider}\text{}{P}_{w.A}({n}_{w},m)\text{}\mathrm{as}\text{}{P}_{w}({n}_{w},{n}_{s})\end{array}$ |

end |

Achieve ${P}_{w}({n}_{c})$ |

Based on ${n}_{c}$, set ${\mathsf{\beta}}_{w}(m)={\mathsf{\beta}}_{w}({n}_{c})\text{}\mathrm{and}\text{}{V}_{S}(m)={V}_{S}({n}_{c})$ |

#### 4.3. Implementation of the Real-Time Optimal Power Flow Framework

- (1)
- For the current prediction horizon, provide the forecasted active ${P}_{d}(i)$ and reactive ${Q}_{d}(i)$ demand power and wind power ${P}_{w.M}({n}_{w})$.
- (2)
- Generate ${N}_{c}$ wind power scenario combinations based on the Beta distribution as described in Section 3.
- (3)
- Send the generated scenarios as inputs to formulate ${N}_{c}$ MINLP OPF problems.
- (4)
- Solve the ${N}_{c}$ MINLP OPF problems with parallel computing.
- (5)
- Send the solution results as a lookup table to the selection algorithm.
- (6)
- Provide the actual wind power of WSs, ${P}_{w.A}({n}_{w},m)$, available at the current sampling time $m$ (for $m=1,\cdots ,M$), to the selection algorithm.
- (7)
- Select one of the solutions from the lookup table based on ${P}_{w.A}({n}_{w},m)$ and the selection algorithm (see Section 4.2).
- (8)
- Send the values of the controls ${V}_{S}(m)$ and ${\mathsf{\beta}}_{w}(m)$ to the grid.

## 5. Case Study

#### 5.1. Network and Input Data

#### 5.2. Test Cases

- Forward energy flow: The forward active and reactive energy from the HV network to the MV network is to be minimized based on an energy price model.
- Reverse energy flow: The reverse power flow could have impacts on voltage profiles [53] of the upper-level network and may result in specific operational limits being exceeded at the congested primary substations [54]. However, reverse flows have been considered in many studies [45,55,56,57,58] and in reality, they are likely to happen. Therefore, in this paper we consider the cases with and without reverse power flows.

- Case (1):
- Both reverse active and reactive power to the upstream HV network is not allowed (i.e., ${\mathsf{\gamma}}_{Ps,rev}={\mathsf{\gamma}}_{Qs,rev}=0$), and with a fixed value of the slack bus voltage (${V}_{S}(m)={V}_{S}({n}_{c})=1\text{}\mathrm{pu}$).
- Case (2):
- Both reverse active and reactive power to upstream HV network is not allowed (i.e., ${\mathsf{\gamma}}_{Ps,rev}={\mathsf{\gamma}}_{Qs,rev}=0$), and with the slack bus voltage as a discrete free variable.
- Case (3):
- Both reverse active and reactive power to upstream HV network is allowed (i.e., ${\mathsf{\gamma}}_{Ps,rev}={\mathsf{\gamma}}_{Qs,rev}=1$), and with a fixed value of the slack bus voltage (i.e., ${V}_{S}(m)={V}_{S}({n}_{c})=1\text{}\mathrm{pu}$).
- Case (4):
- Both reverse active and reactive power to upstream HV network is allowed (i.e., ${\mathsf{\gamma}}_{Ps,rev}={\mathsf{\gamma}}_{Qs,rev}=1$), and with the slack bus voltage as a discrete free variable.

#### 5.3. Results and Discussions

## 6. Conclusions

## Acknowledgments

## Author Contributions

## Conflicts of Interest

## Abbreviations

## Sets and Indices

$i,j$ | Indices for buses, i.e., $i,j=1,\cdots ,{N}_{bus}$. |

$m$ | Index for sampling intervals, i.e., $m=1,\cdots ,M$. |

${n}_{c}$ | Index for wind power scenario combinations, i.e., ${n}_{c}=1,\cdots ,{N}_{c}$. |

${n}_{s}$ | Index for wind power scenarios of each individual wind station (WS), i.e., ${n}_{s}=1,\cdots ,{N}_{s}$. |

${n}_{w}$ | Index for WSs, i.e., ${n}_{w}=1,\cdots ,{N}_{w}$. |

$sb$ | Set of buses. |

## Functions

$f$ | Objective function. |

$F$ | Total value of objective function for one day. |

${F}_{1}$ | Total revenue from wind power injection for one day. |

${F}_{2}$ | Total cost of active energy losses in the grid for one day. |

${F}_{3}$ | Total cost of active energy at slack bus for one day. |

${F}_{4}$ | Total cost of reactive energy at slack bus for one day. |

$f({n}_{c})$ | Total value of objective function for scenario combination ${n}_{c}$. |

${f}_{1}({n}_{c})$ | Total revenue from wind power injection for scenario combination ${n}_{c}$. |

${f}_{2}({n}_{c})$ | Total cost of active energy losses in the grid for scenario combination ${n}_{c}$. |

${f}_{3}({n}_{c})$ | Total cost of active energy at slack bus for scenario combination ${n}_{c}$. |

${f}_{4}({n}_{c})$ | Total cost of reactive energy at slack bus for scenario combination ${n}_{c}$. |

${F}_{PDF}$ | Probability distribution function. |

${f}_{P}({n}_{c})$ | Network active power function for scenario combination ${n}_{c}$. |

${f}_{Q}({n}_{c})$ | Network reactive power function for scenario combination ${n}_{c}$. |

$g$ | Equality equations. |

$\rho $ | Density function. |

## Parameters

$L$ | Upper bound on integer variables. |

$M$ | Total number of sampling intervals in each prediction horizon. |

${N}_{bus}$ | Total number of buses. |

${N}_{s}$ | Total number of wind power scenarios for each WS. |

${N}_{pr}$ | Total number of processors. |

${N}_{c}$ | Total number of wind power scenario combinations. |

${N}_{w}$ | Total number of WSs. |

${P}_{d}(i)$ | Active power demand at bus $i$. |

$Pric{e}_{P}$ | Price for active energy. |

$Pric{e}_{O}$ | Price for reactive energy. |

${P}_{w.R}({n}_{w})$ | Rated installed wind power of WS . |

${Q}_{d}(i)$ | Reactive power demand at bus $i$. |

${S}_{l.\mathrm{max}}(i,j)$ | Upper limit of apparent power flow of line between bus $i$ and $j$. |

${S}_{S.\mathrm{max}}$ | Upper limit of apparent power at slack bus. |

${T}_{p}$ | Length of prediction horizon. |

${T}_{OPF}$ | Length of reserved time for computing OPF problems. |

${T}_{s}$ | Length of sampling interval. |

${T}_{r}$ | Length of reserved time for data management. |

${u}_{\mathrm{max}}$ | Upper limits on continuous decision variables. |

${u}_{\mathrm{min}}$ | Lower limits on continuous decision variables. |

${V}_{\mathrm{max}}(i)$ | Upper limit of voltage at bus $i\text{}(i\ne 1)$. |

${V}_{\mathrm{min}}(i)$ | Lower limit of voltage at bus $i\text{}(i\ne 1)$. |

${V}_{S.\mathrm{max}}$ | Upper limit of slack bus voltage. |

${V}_{S.\mathrm{min}}$ | Lower limit of slack bus voltage. |

${x}_{\mathrm{max}}$ | Upper limits on state variables. |

${x}_{\mathrm{min}}$ | Lower limits on state variables. |

${\mathsf{\mu}}_{d}(i)$ | Mean value for demand at bus $i$. |

${\mathsf{\sigma}}_{d}(i)$ | Standard deviation for demand at bus $i$. |

${\mathsf{\sigma}}_{w}({n}_{w})$ | Standard deviation for wind power of WS ${n}_{w}$. |

${\mathsf{\gamma}}_{Ps,rev}$ | Coefficient of reverse boundary on active power at slack bus. |

${\mathsf{\gamma}}_{Qs,rev}$ | Coefficient of reverse boundary on reactive power at slack bus. |

## Random Variables

${P}_{w.A}({n}_{w},m)$ | Actual wind power of WS ${n}_{w}$ in sampling interval $m$. |

${P}_{w}(i,{n}_{c})$ | Wind power of WS located at bus $i$ for scenario combination ${n}_{c}$. |

${P}_{w}({n}_{c})$ | Vector of active power of WSs for scenario combination ${n}_{c}$. |

${P}_{w}({n}_{w},{n}_{s})$ | Wind power of WS ${n}_{w}$ for wind power scenario combination ${n}_{s}$. |

${P}_{w.M}({n}_{w})$ | Mean (forecasted) wind power of WS ${n}_{w}$. |

$\mathsf{\xi}$ | Vector of random variables. |

## Decision Variables

$l$ | Vector of integer decision variables. |

$u$ | Vector of continuous decision variables. |

${V}_{S}(m)$ | Slack bus voltage in sampling interval $m$. |

${V}_{S}({n}_{c})$ | Slack bus voltage for scenario combination ${n}_{c}$. |

${\mathsf{\beta}}_{w}(i,{n}_{c})$ | Curtailment factor of wind power for WS located at bus $i$ for scenario combination ${n}_{c}$. |

${\mathsf{\beta}}_{w}(m)$ | Vector of curtailment factors of wind power for WSs in sampling interval $m$. |

${\mathsf{\beta}}_{w}({n}_{c})$ | Vector of curtailment factors of wind power of WSs for scenario combination ${n}_{c}$. |

$\Delta {V}_{S}({n}_{c})$ | Voltage change at slack bus for scenario combination ${n}_{c}$. |

## State Variables

${P}_{loss}({n}_{c})$ | Active power losses for scenario combination ${n}_{c}$. |

${P}_{S}({n}_{c})$ | Active power injected at slack bus for scenario combination ${n}_{c}$. |

${P}_{S}(m)$ | Active power injected at slack bus in sampling interval $m$. |

${Q}_{S}({n}_{c})$ | Reactive power injected at slack bus for scenario combination ${n}_{c}$. |

${Q}_{S}(m)$ | Reactive power injected at slack bus in sampling interval $m$. |

$S(i,j,{n}_{c})$ | Apparent power flow from bus $i$ to $j$ for scenario combination ${n}_{c}$. |

$V(i,{n}_{c})$ | Voltage at bus $i\text{}(i\ne 1)$ for scenario combination ${n}_{c}$. |

$x$ | Vector of state variables. |

$\mathsf{\alpha}({n}_{w})$ | First shape parameter of Beta distribution for WS ${n}_{w}$. |

$\mathsf{\beta}({n}_{w})$ | Second shape parameter of Beta distribution for WS ${n}_{w}$. |

## References

- Dommel, H.W.; Tinney, W.F. Optimal power flow solutions. IEEE Trans. Power Appar. Syst.
**1968**, PAS-87, 1866–1876. [Google Scholar] [CrossRef] - Jolissaint, C.H.; Arvanitidis, N.V.; Luenberger, D.G. Decomposition of real and reactive power flows: A method suited for on-line applications. IEEE Trans. Power Appar. Syst.
**1972**, PAS-91, 661–670. [Google Scholar] [CrossRef] - Shoults, R.R.; Sun, D.T. Optimal power flow based upon P-Q decomposition. IEEE Trans. Power Appar. Syst.
**1982**, PAS-101, 397–405. [Google Scholar] [CrossRef] - Atwa, Y.M.; El-Saadany, E.F. Optimal allocation of ESS in distribution systems with a high penetration of wind energy. IEEE Trans. Power Syst.
**2010**, 25, 1815–1822. [Google Scholar] [CrossRef] - Gabash, A.; Li, P. Active-reactive optimal power flow in distribution networks with embedded generation and battery storage. IEEE Trans. Power Syst.
**2012**, 27, 2026–2035. [Google Scholar] [CrossRef] - Bacher, R.; van Meeteren, H.P. Real-time optimal power flow in automatic generation control. IEEE Trans. Power Syst.
**1988**, 3, 1518–1529. [Google Scholar] [CrossRef] - Sharif, S.S.; Taylor, J.H.; Hill, E.F.; Scott, B.; Daley, D. Real-time implementation of optimal reactive power flow. IEEE Power Eng. Rev.
**2000**, 20, 47–51. [Google Scholar] [CrossRef] - Siano, P.; Cecati, C.; Yu, H.; Kolbusz, J. Real time operation of smart grids via FCN networks and optimal power flow. IEEE Trans. Ind. Inform.
**2012**, 8, 944–952. [Google Scholar] [CrossRef] - Mohamed, A.; Salehi, V.; Mohammed, O.A. Real-time energy management algorithm for mitigation of pulse loads in hybrid microgrids. IEEE Trans. Smart Grid
**2012**, 3, 1911–1922. [Google Scholar] [CrossRef] - Mohamed, A.; Salehi, V.; Ma, T.; Mohammed, O.A. Real-time energy management algorithm for plug-in hybrid electric vehicle charging parks involving sustainable energy. IEEE Trans. Sustain. Energy
**2014**, 5, 577–586. [Google Scholar] [CrossRef] - Salehi, V.; Mohamed, A.; Mohammed, O.A. Implementation of real-time optimal power flow management system on hybrid AC/DC smart microgrid. In Proceedings of the IEEE Industry Applications Society (ISA) Annual Meeting, Las Vegas, NV, USA, 7–11 October 2012; pp. 1–8. [Google Scholar]
- Di Giorgio, A.; Liberati, F.; Lanna, A. Real time optimal power flow integrating large scale storage devices and wind generation. In Proceedings of the 23th Mediterranean Conference (MED) on Control and Automation, Torremolinos, Spain, 16–19 June 2015; pp. 480–486. [Google Scholar]
- Di Giorgio, A.; Liberati, F.; Lanna, A. Electric energy storage systems integration in distribution grids. In Proceedings of the 15th IEEE International Conference on Environment and Electrical Engineering. Torremolinos, Rome, Italy, 10–13 June 2015; pp. 1279–1284. [Google Scholar]
- Di Giorgio, A.; Liberati, F.; Lanna, A.; Pietrabissa, A.; Delli Priscoli, F. Model predictive control of energy storage systems for power tracking and shaving in distribution grids. IEEE Trans. Sustain. Energy
**2016**, 8, 496–504. [Google Scholar] [CrossRef] - Bird, L.; Cochran, J.; Wang, X. Wind and Solar Energy Curtailment: Experience and Practices in the United States. 2014. Available online: http://www.nrel.gov/docs/fy14osti/60983.pdf (accessed on 10 December 2016).
- Dolan, M.J.; Davidson, E.M.; Kockar, I.; Ault, G.W.; McArthur, S.D.J. Reducing distributed generator curtailment through active power flow management. IEEE Trans. Smart Grid
**2014**, 5, 149–157. [Google Scholar] [CrossRef] - Alnaser, S.W.; Ochoa, L.F. Advanced network management systems: A risk-based AC OPF approach. IEEE Trans. Power Syst.
**2015**, 30, 409–418. [Google Scholar] [CrossRef] - Gan, L.; Low, S.H. An online gradient algorithm for optimal power flow on radial networks. IEEE J. Sel. Areas Commun.
**2016**, 34, 625–638. [Google Scholar] [CrossRef] - Hong, W.; Wang, S.; Li, P.; Wozny, G.; Biegler, L.T. A quasi-sequential approach to large-scale dynamic optimization problems. AIChE J.
**2006**, 52, 255–268. [Google Scholar] [CrossRef] - Bartl, M.; Li, P.; Biegler, L.T. Improvement of state profile accuracy in nonlinear dynamic optimization with the quasi-sequential approach. AIChE J.
**2011**, 57, 2185–2197. [Google Scholar] [CrossRef] - Li, Z.; Qiu, F.; Wang, J. Data-driven real-time power dispatch for maximizing variable renewable generation. Appl. Energy
**2016**, 170, 304–313. [Google Scholar] [CrossRef] - Peterson, N.M.; Scott Meyer, W. Automatic adjustment of transformer and phase-shifter taps in the newton power flow. IEEE Trans. Power Appar. Syst.
**1971**, PAS-90, 103–108. [Google Scholar] [CrossRef] - Gómez-Expósito, A.; Romero-Ramos, E.; Džafić, I. Hybrid real-complex current injection-based load flow formulation. Electr. Power Syst. Res.
**2015**, 119, 237–246. [Google Scholar] [CrossRef] - Jabr, R.A.; Džafić, I.; Karaki, S. Tracking transformer tap position in real-time distribution network power flow applications. IEEE Trans. Smart Grid
**2016**, PP. [Google Scholar] [CrossRef] - Surender Reddy, S.; Bijwe, P.R. Day-Ahead and real time optimal power flow considering renewable energy resources. Int. J. Electr. Power Energy Syst.
**2016**, 82, 400–408. [Google Scholar] [CrossRef] - Surender Reddy, S.; Bijwe, P.R.; Abhyankar, A.R. Real-time economic dispatch considering renewable power generation variability and uncertainty over scheduling period. IEEE Syst. J.
**2014**, 9, 1440–1451. [Google Scholar] [CrossRef] - Surender Reddy, S.; Bijwe, P.R. Real time economic dispatch considering renewable energy resources. Renew. Energy
**2015**, 83, 1215–1226. [Google Scholar] [CrossRef] - Surender Reddy, S.; Momoh, J.A. Realistic and transparent optimum scheduling strategy for hybrid power system. IEEE Trans. Smart Grid
**2015**, 6, 3114–3125. [Google Scholar] [CrossRef] - Surender Reddy, S. Optimal scheduling of thermal-wind-solar power system with storage. Renew. Energy
**2016**, 101, 1357–1368. [Google Scholar] [CrossRef] - Mohagheghi, E.; Gabash, A.; Li, P. Real-time optimal power flow under wind energy penetration-Part I: Approach. In Proceedings of the 16th IEEE International Conference on Environment and Electrical Engineering, Florence, Italy, 7–10 June 2016; pp. 1–6. [Google Scholar]
- Mohagheghi, E.; Gabash, A.; Li, P. Real-time optimal power flow under wind energy penetration-Part II: Implementation. In Proceedings of the 16th IEEE International Conference on Environment and Electrical Engineering, Florence, Italy, 7–10 June 2016; pp. 1–6. [Google Scholar]
- Taylor, J.W. An evaluation of methods for very short-term load forecasting using minute-by-minute British data. Int. J. Forecast.
**2008**, 24, 645–658. [Google Scholar] [CrossRef] - Alamaniotis, M.; Ikonomopoulos, A.; Tsoukalas, L.H. Evolutionary multiobjective optimization of Kernel-based very-short-term load forecasting. IEEE Trans. Power Syst.
**2012**, 27, 1477–1484. [Google Scholar] [CrossRef] - Guan, C.; Luh, P.B.; Michel, L.D.; Chi, Z. Hybrid Kalman filters for very short-term load forecasting and prediction interval estimation. IEEE Trans. Power Syst.
**2013**, 28, 3806–3817. [Google Scholar] [CrossRef] - Hsiao, Y.H. Household electricity demand forecast based on context information and user daily schedule analysis from meter data. IEEE Trans. Ind. Inform.
**2015**, 11, 33–43. [Google Scholar] [CrossRef] - Bofinger, S.; Luig, A.; Beyer, H. Qualification of wind power forecasts. In Proceedings of the Global Wind Power Conference, Paris, France, 2–5 April 2002. [Google Scholar]
- Fabbri, A.; San Roman, T.G.; Abbad, J.R.; Quezada, Y.H.M. Assessment of the cost associated with wind generation prediction errors in a liberalized electricity market. IEEE Trans. Power Syst.
**2005**, 20, 1440–1446. [Google Scholar] [CrossRef] - Bludszuweit, H.; Domínguez-Navarro, J.A.; Llombart, A. Statistical analysis of wind power forecast error. IEEE Trans. Power Syst.
**2008**, 23, 983–991. [Google Scholar] [CrossRef] - Menemenlis, N.; Huneault, M.; Robitaille, A. Computation of dynamic operating balancing reserve for wind power integration for the time-horizon 1–48 hours. IEEE Trans. Sustain. Energy
**2012**, 3, 692–702. [Google Scholar] [CrossRef] - Wu, X.; Wang, X.; Qu, C. A Hierarchical framework for generation scheduling of microgrid. IEEE Trans. Power Deliv.
**2014**, 29, 2448–2457. [Google Scholar] [CrossRef] - Wang, Z.; Chen, B.; Wang, J.; Begovic, M.M.; Chen, C. Coordinated energy management of networked Microgrids in distribution systems. IEEE Trans. Smart Grid
**2015**, 6, 45–53. [Google Scholar] [CrossRef] - Li, P.; Guan, X.H.; Wu, J.; Zhou, X.X. Modeling dynamic spatial correlations of geographically distributed wind farms and constructing ellipsoidal uncertainty sets for optimization-based generation scheduling. IEEE Trans. Sustain. Energy
**2015**, 6, 1594–1605. [Google Scholar] [CrossRef] - Xiong, P.; Jirutitijaroen, P.; Singh, C. A distributionally robust optimization model for unit commitment considering uncertain wind power generation. IEEE Trans. Power Syst.
**2017**, 32, 39–49. [Google Scholar] [CrossRef] - McKay, M.D.; Beckman, R.; Conover, W. A comparison of three methods for selecting values of input variables in the analysis of output from a computer code. Technometrics
**1979**, 21, 239–245. [Google Scholar] [CrossRef] - Gabash, A.; Li, P. On variable reverse power flow-part I: Active-reactive optimal power flow with reactive power of wind stations. Energies
**2016**, 3, 121. [Google Scholar] [CrossRef] - Van der Hoven, I. Power spectrum of horizontal wind speed in the frequency range from 0.0007 to 900 cycles per hour. J. Meteorol.
**1957**, 14, 160–164. [Google Scholar] [CrossRef] - Kaya, E.; Barutçu, B.; Menteş, S.S. A method based on the Van der Hoven spectrum for performance evaluation in prediction of wind speed. Turk. J. Earth Sci.
**2013**, 22, 681–689. [Google Scholar] - Tao, Y.; Chen, H. A hybrid wind power prediction method. In Proceedings of the IEEE Power and Energy Society General Meeting, Boston, MA, USA, 17–21 July 2016; pp. 1–5. [Google Scholar]
- Gabash, A. Flexible Optimal Operations of Energy Supply Networks: With Renewable Energy Generation and Battery Storage; Südwestdeutscher Verlag: Saarbrücken, Germany, 2014. [Google Scholar]
- Atwa, Y.M.; El-Saadany, E.F. Probabilistic approach for optimal allocation of wind-based distributed generation in distribution systems. IET Renew. Power Gener.
**2011**, 5, 79–88. [Google Scholar] [CrossRef] - General Algebraic Modeling System (GAMS). Available online: http://www.gams.com/ (accessed on 7 January 2017).
- Bonami, P.; Lee, J. BONMIN User’s Manual. 2009. Available online: https://projects.coin-or.org/Bonmin/browser/stable/0.1/Bonmin/doc/BONMIN_UsersManual.pdf?format=raw (accessed on 17 March 2017).
- Eurelectric. Active Distribution System Management: A Key Tool for the Smooth Integration of Distributed Generation. 2013. Available online: www.eurelectric.org/media/74356/asm_full_report_discussion_paper_final-2013-030-0117-01-e.pdf (accessed on 15 March 2016).
- Northern Ireland Electricity. NIE Briefing on Connecting Renewable Generation to the Electricity Network. 2015. Available online: http://www.niassembly.gov.uk/globalassets/documents/enterprise-trade-and-investment/inquiry---corp-tax/written-submissions/20150503-response-to-the-inquiry-from-nie.pdf (accessed on 1 March 2017).
- Distributed Generation Technical Interconnection Requirements: Interconnections at Voltages 50 kV and Below. 2013. Available online: http://www.hydroone.com/Generators/Documents/Distribution/Distributed%20Generation%20Technical%20Interconnection%20Requirements.pdf (accessed on 4 December 2015).
- Gabash, A.; Alkal, M.E.; Li, P. Impact of allowed reverse active power flow on planning PVs and BSSs in distribution networks considering demand and EVs growth. In Proceedings of the IEEE PESS, Bielefeld, Germany, 24–25 January 2013; pp. 11–16. [Google Scholar]
- Arefifar, S.A.; Mohamed, Y.A.I.; El-Fouly, T.H.M. Supply-adequacy-based optimal construction of microgrids in smart distribution systems. IEEE Trans. Smart Grid
**2012**, 3, 1491–1502. [Google Scholar] [CrossRef] - Shaaban, M.F.; Atwa, Y.M.; El-Saadany, E.F. DG allocation for benefit maximization in distribution networks. IEEE Trans. Power Syst.
**2013**, 28, 639–649. [Google Scholar] [CrossRef]

**Figure 1.**Illustration of wind power scenarios (i.e., S

_{1}, …, S

_{7}), for a WS with ${\mathsf{\sigma}}_{w}=0.1$, ${P}_{w.M}$ = 0.15 (

**left**), ${P}_{w.M}$ = 0.5 (

**middle**), and ${P}_{w.M}$ = 0.85 (

**right**).

**Figure 2.**Graphical examples of wind power scenario combinations for (

**a**) ${N}_{w}=2$, ${N}_{s}=7$ and (

**b**) ${N}_{w}=3$, ${N}_{s}=4$. Here, dark to light colors denote high to low wind power scenarios, respectively.

**Figure 3.**Framework of the proposed real-time optimal power flow (RT-OPF) for a prediction horizon. Here, HV, MV and LV denote high-voltage, medium-voltage and low-voltage, respectively.

**Figure 4.**Time allocation for the computational tasks of the 8 steps in Figure 3.

**Figure 7.**Trajectories of one day: (

**a**) total active (blue-solid) and reactive (red-dashed) power demand; (

**b**) forecasted (red-dashed) and actual (blue-solid) wind power of the first WS; and (

**c**) forecasted (red-dashed) and actual (blue-solid) wind power of the second WS.

**Figure 8.**Trajectories of one day for Case 1. (

**a**) Forecasted (red-dashed) and actual (blue-solid) curtailment factors for first WS; (

**b**) Forecasted (red-dashed) and actual (blue-solid) curtailment factors for second WS; (

**c**) Forecasted (red-dashed) and actual (blue-solid) values of voltage at the slack bus; (

**d**) Forecasted (red-dashed) and actual (blue-solid) slack bus active power; (

**e**) Forecasted (red-dashed) and actual (blue-solid) slack bus reactive power; (

**f**) Forecasted (red-dashed) and actual (blue-solid) total objective function value; (

**g**) Feasibility status of the deterministic (red-dashed) and prediction-realization (blue-solid) approaches when applying actual wind power. Here, 1 denotes feasible and 0 denotes infeasible solution; and (

**h**) computational time of the seven processors.

**Figure 9.**Trajectories of one day for Case 2. (

**a**) Forecasted (red-dashed) and actual (blue-solid) curtailment factors for first WS; (

**b**) Forecasted (red-dashed) and actual (blue-solid) curtailment factors for second WS; (

**c**) Forecasted (red-dashed) and actual (blue-solid) values of voltage at the slack bus; (

**d**) Forecasted (red-dashed) and actual (blue-solid) slack bus active power; (

**e**) Forecasted (red-dashed) and actual (blue-solid) slack bus reactive power; (

**f**) Forecasted (red-dashed) and actual (blue-solid) total objective function value; (

**g**) Feasibility status of the deterministic (red-dashed) and prediction-realization (blue-solid) approaches when applying actual wind power. Here, 1 denotes feasible and 0 denotes infeasible solution; and (

**h**) computational time of the seven processors.

**Figure 10.**Trajectories of one day for Case 3. (

**a**) Forecasted (red-dashed) and actual (blue-solid) curtailment factors for first WS; (

**b**) Forecasted (red-dashed) and actual (blue-solid) curtailment factors for second WS; (

**c**) Forecasted (red-dashed) and actual (blue-solid) values of voltage at the slack bus; (

**d**) Forecasted (red-dashed) and actual (blue-solid) slack bus active power; (

**e**) Forecasted (red-dashed) and actual (blue-solid) slack bus reactive power; (

**f**) Forecasted (red-dashed) and actual (blue-solid) total objective function value; (

**g**) Feasibility status of the deterministic (red-dashed) and prediction-realization (blue-solid) approaches when applying actual wind power. Here, 1 denotes feasible and 0 denotes infeasible solution; and (

**h**) computational time of the seven processors.

**Figure 11.**Trajectories of one day for Case 4. (

**a**) Forecasted (red-dashed) and actual (blue-solid) curtailment factors for first WS; (

**b**) Forecasted (red-dashed) and actual (blue-solid) curtailment factors for second WS; (

**c**) Forecasted (red-dashed) and actual (blue-solid) values of voltage at the slack bus; (

**d**) Forecasted (red-dashed) and actual (blue-solid) slack bus active power; (

**e**) Forecasted (red-dashed) and actual (blue-solid) slack bus reactive power; (

**f**) Forecasted (red-dashed) and actual (blue-solid) total objective function value; (

**g**) Feasibility status of the deterministic (red-dashed) and prediction-realization (blue-solid) approaches when applying actual wind power. Here, 1 denotes feasible and 0 denotes infeasible solution; and (

**h**) computational time of the seven processors.

n_{c} | Scenario Combination | ||||

P_{w}(n_{w},n_{s}) | P_{w}(n_{w},n_{s}) | … | P_{w}(n_{w},n_{s}) | P_{w}(n_{w},n_{s}) | |

n_{w} = 1 | n_{w} = 2 | n_{w} = N_{w} − 1 | n_{w} = N_{w} | ||

1 | P_{w}(1,N_{s}) | P_{w}(2,N_{s}) | … | P_{w}((N_{w} – 1),N_{s}) | P_{w}(N_{w},N_{s}) |

2 | P_{w}(1,N_{s}) | P_{w}(2,N_{s}) | ... | P_{w}((N_{w} – 1),N_{s}) | P_{w}(N_{w},(N_{s} − 1)) |

. . . | . . . | . . . | . . . | . . . | . . . |

N_{c} − 1 | P_{w}(1,1) | P_{w}(2,1) | … | P_{w}((N_{w} – 1),1) | P_{w}(N_{w},2) |

N_{c} | P_{w}(1,1) | P_{w}(2,1) | … | P_{w}((N_{w} – 1),1) | P_{w}(N_{w},1) |

**Table 2.**Lookup table for the first prediction horizon (with P

_{w.M}(1) = 3.8 MW, P

_{w.M}(2) = 7.05 MW) for Case 1.

Scenario Combination | Optimal Results | ||||||
---|---|---|---|---|---|---|---|

n_{c} | P_{w}(n_{w},n_{s}) (MW) n_{w} = 1 | P_{w}(n_{w},n_{s}) (MW) n_{w} = 2 | β_{w}(1) - | β_{w}(2) - | Vs (pu) | P_{S} (MW) | Q_{S} (Mvar) |

1 | P_{w}(1,7) = 10 | P_{w}(2,7) = 10 | 0.379 | 0.288 | 1 | 0 | 2.375 |

2 | P_{w}(1,7) = 10 | P_{w}(2,6) = 8.04 | 0.379 | 0.358 | 1 | 0 | 2.375 |

3 | P_{w}(1,7) = 10 | P_{w}(2,5) = 7.55 | 0.379 | 0.382 | 1 | 0 | 2.375 |

4 | P_{w}(1,7) = 10 | P_{w}(2,4) = 7.13 | 0.379 | 0.404 | 1 | 0 | 2.375 |

5 | P_{w}(1,7) = 10 | P_{w}(2,3) = 6.67 | 0.379 | 0.432 | 1 | 0 | 2.375 |

6 | P_{w}(1,7) = 10 | P_{w}(2,2) = 6.07 | 0.379 | 0.475 | 1 | 0 | 2.375 |

7 | P_{w}(1,7) = 10 | P_{w}(2,1) = 0 | 0.669 | 1 | 1 | 0 | 2.406 |

8 | P_{w}(1,6) = 4.79 | P_{w}(2,7) = 10 | 0.792 | 0.288 | 1 | 0 | 2.375 |

9 | P_{w}(1,6) = 4.79 | P_{w}(2,6) = 8.04 | 0.792 | 0.358 | 1 | 0 | 2.375 |

10 | P_{w}(1,6) = 4.79 | P_{w}(2,5) = 7.55 | 0.792 | 0.382 | 1 | 0 | 2.375 |

11 | P_{w}(1,6) = 4.79 | P_{w}(2,4) = 7.13 | 0.792 | 0.404 | 1 | 0 | 2.375 |

12 | P_{w}(1,6) = 4.79 | P_{w}(2,3) = 6.67 | 0.792 | 0.432 | 1 | 0 | 2.375 |

13 | P_{w}(1,6) = 4.79 | P_{w}(2,2) = 6.07 | 0.792 | 0.475 | 1 | 0 | 2.375 |

14 | P_{w}(1,6) = 4.79 | P_{w}(2,1) = 0 | 1 | 1 | 1 | 1.9 | 2.419 |

15 | P_{w}(1,5) = 4.22 | P_{w}(2,7) = 10 | 0.899 | 0.288 | 1 | 0 | 2.375 |

16 | P_{w}(1,5) = 4.22 | P_{w}(2,6) = 8.04 | 0.899 | 0.358 | 1 | 0 | 2.375 |

17 | P_{w}(1,5) = 4.22 | P_{w}(2,5) = 7.55 | 0.899 | 0.382 | 1 | 0 | 2.375 |

18 | P_{w}(1,5) = 4.22 | P_{w}(2,4) = 7.13 | 0.899 | 0.404 | 1 | 0 | 2.375 |

19 | P_{w}(1,5) = 4.22 | P_{w}(2,3) = 6.67 | 0.899 | 0.432 | 1 | 0 | 2.375 |

20 | P_{w}(1,7) = 4.22 | P_{w}(2,2) = 6.07 | 0.899 | 0.475 | 1 | 0 | 2.375 |

21 | P_{w}(1,5) = 4.22 | P_{w}(2,1) = 0 | 1 | 1 | 1 | 2.476 | 2.427 |

22 | P_{w}(1,4) = 3.77 | P_{w}(2,7) = 10 | 1 | 0.29 | 1 | 0 | 2.375 |

23 | P_{w}(1,4) = 3.77 | P_{w}(2,6) = 8.04 | 1 | 0.361 | 1 | 0 | 2.375 |

24 | P_{w}(1,4) = 3.77 | P_{w}(2,5) = 7.55 | 1 | 0.385 | 1 | 0 | 2.375 |

25 | P_{w}(1,4) = 3.77 | P_{w}(2,4) = 7.13 | 1 | 0.407 | 1 | 0 | 2.375 |

26 | P_{w}(1,4) = 3.77 | P_{w}(2,3) = 6.67 | 1 | 0.435 | 1 | 0 | 2.375 |

27 | P_{w}(1,4) = 3.77 | P_{w}(2,2) = 6.07 | 1 | 0.478 | 1 | 0 | 2.375 |

28 | P_{w}(1,4) = 3.77 | P_{w}(2,1) = 0 | 1 | 1 | 1 | 2.927 | 2.435 |

29 | P_{w}(1,3) = 3.33 | P_{w}(2,7) = 10 | 1 | 0.334 | 1 | 0 | 2.376 |

30 | P_{w}(1,3) = 3.33 | P_{w}(2,6) = 8.04 | 1 | 0.416 | 1 | 0 | 2.376 |

31 | P_{w}(1,3) = 3.33 | P_{w}(2,5) = 7.55 | 1 | 0.443 | 1 | 0 | 2.376 |

32 | P_{w}(1,3) = 3.33 | P_{w}(2,4) = 7.13 | 1 | 0.469 | 1 | 0 | 2.376 |

33 | P_{w}(1,3) = 3.33 | P_{w}(2,3) = 6.67 | 1 | 0.501 | 1 | 0 | 2.376 |

34 | P_{w}(1,3) = 3.33 | P_{w}(2,2) = 6.07 | 1 | 0.551 | 1 | 0 | 2.376 |

35 | P_{w}(1,3) = 3.33 | P_{w}(2,1) = 0 | 1 | 1 | 1 | 3.370 | 2.444 |

36 | P_{w}(1,2) = 2.81 | P_{w}(2,7) = 10 | 1 | 0.387 | 1 | 0 | 2.379 |

37 | P_{w}(1,2) = 2.81 | P_{w}(2,6) = 8.04 | 1 | 0.481 | 1 | 0 | 2.379 |

38 | P_{w}(1,2) = 2.81 | P_{w}(2,5) = 7.55 | 1 | 0.512 | 1 | 0 | 2.379 |

39 | P_{w}(1,2) = 2.81 | P_{w}(2,4) = 7.13 | 1 | 0.542 | 1 | 0 | 2.379 |

40 | P_{w}(1,2) = 2.81 | P_{w}(2,3) = 6.67 | 1 | 0.58 | 1 | 0 | 2.379 |

41 | P_{w}(1,2) = 2.81 | P_{w}(2,2) = 6.07 | 1 | 0.637 | 1 | 0 | 2.379 |

42 | P_{w}(1,2) = 2.81 | P_{w}(2,1) = 0 | 1 | 1 | 1 | 3.895 | 2.457 |

43 | P_{w}(1,1) = 0 | P_{w}(2,7) = 10 | 1 | 0.67 | 1 | 0 | 2.429 |

44 | P_{w}(1,1) = 0 | P_{w}(2,6) = 8.04 | 1 | 0.833 | 1 | 0 | 2.429 |

45 | P_{w}(1,1) = 0 | P_{w}(2,5) = 7.55 | 1 | 0.887 | 1 | 0 | 2.429 |

46 | P_{w}(1,1) = 0 | P_{w}(2,4) = 7.13 | 1 | 0.939 | 1 | 0 | 2.429 |

47 | P_{w}(1,1) = 0 | P_{w}(2,3) = 6.67 | 1 | 1 | 1 | 0.025 | 2.428 |

48 | P_{w}(1,1) = 0 | P_{w}(2,2) = 6.07 | 1 | 1 | 1 | 0.619 | 2.414 |

49 | P_{w}(1,1) = 0 | P_{w}(2,1) = 0 | 1 | 1 | 1 | 6.744 | 2.554 |

**Table 3.**Lookup table for the first prediction horizon (with P

_{w.M}(1) = 3.8 MW, P

_{w.M}(2) = 7.05 MW) for Case 2.

Scenario Combination | Optimal Results | ||||||
---|---|---|---|---|---|---|---|

n_{c} | P_{w}(n_{w},n_{s}) (MW) n_{w} = 1 | P_{w}(n_{w},n_{s}) (MW) n_{w} = 2 | β_{w}(1) - | β_{w}(2) - | Vs (pu) | P_{S} (MW) | Q_{S} (Mvar) |

1 | P_{w}(1,7) = 10 | P_{w}(2,7) = 10 | 0.379 | 0.288 | 1.06 | 0 | 2.352 |

2 | P_{w}(1,7) = 10 | P_{w}(2,6) = 8.04 | 0.379 | 0.359 | 1.06 | 0 | 2.352 |

3 | P_{w}(1,7) = 10 | P_{w}(2,5) = 7.55 | 0.379 | 0.382 | 1.06 | 0 | 2.352 |

4 | P_{w}(1,7) = 10 | P_{w}(2,4) = 7.13 | 0.379 | 0.405 | 1.06 | 0 | 2.352 |

5 | P_{w}(1,7) = 10 | P_{w}(2,3) = 6.67 | 0.379 | 0.432 | 1.06 | 0 | 2.352 |

6 | P_{w}(1,7) = 10 | P_{w}(2,2) = 6.07 | 0.379 | 0.475 | 1.06 | 0 | 2.352 |

7 | P_{w}(1,7) = 10 | P_{w}(2,1) = 0 | 0.668 | 1 | 1.06 | 0 | 2.38 |

8 | P_{w}(1,6) = 4.79 | P_{w}(2,7) = 10 | 0.791 | 0.288 | 1.06 | 0 | 2.352 |

9 | P_{w}(1,6) = 4.79 | P_{w}(2,6) = 8.04 | 0.791 | 0.359 | 1.06 | 0 | 2.352 |

10 | P_{w}(1,6) = 4.79 | P_{w}(2,5) = 7.55 | 0.791 | 0.382 | 1.06 | 0 | 2.352 |

11 | P_{w}(1,6) = 4.79 | P_{w}(2,4) = 7.13 | 0.791 | 0.405 | 1.06 | 0 | 2.352 |

12 | P_{w}(1,6) = 4.79 | P_{w}(2,3) = 6.67 | 0.791 | 0.433 | 1.06 | 0 | 2.352 |

13 | P_{w}(1,6) = 4.79 | P_{w}(2,2) = 6.07 | 0.791 | 0.475 | 1.06 | 0 | 2.352 |

14 | P_{w}(1,6) = 4.79 | P_{w}(2,1) = 0 | 1.000 | 1 | 1.06 | 1.896 | 2.391 |

15 | P_{w}(1,5) = 4.22 | P_{w}(2,7) = 10 | 0.898 | 0.288 | 1.06 | 0 | 2.352 |

16 | P_{w}(1,5) = 4.22 | P_{w}(2,6) = 8.04 | 0.898 | 0.359 | 1.06 | 0 | 2.352 |

17 | P_{w}(1,5) = 4.22 | P_{w}(2,5) = 7.55 | 0.898 | 0.382 | 1.06 | 0 | 2.352 |

18 | P_{w}(1,5) = 4.22 | P_{w}(2,4) = 7.13 | 0.898 | 0.405 | 1.06 | 0 | 2.352 |

19 | P_{w}(1,5) = 4.22 | P_{w}(2,3) = 6.67 | 0.898 | 0.433 | 1.06 | 0 | 2.352 |

20 | P_{w}(1,7) = 4.22 | P_{w}(2,2) = 6.07 | 0.898 | 0.475 | 1.06 | 0 | 2.352 |

21 | P_{w}(1,5) = 4.22 | P_{w}(2,1) = 0 | 1 | 1 | 1.06 | 2.471 | 2.398 |

22 | P_{w}(1,4) = 3.77 | P_{w}(2,7) = 10 | 1 | 0.29 | 1.06 | 0 | 2.352 |

23 | P_{w}(1,4) = 3.77 | P_{w}(2,6) = 8.04 | 1 | 0.361 | 1.06 | 0 | 2.352 |

24 | P_{w}(1,4) = 3.77 | P_{w}(2,5) = 7.55 | 1 | 0.384 | 1.06 | 0 | 2.352 |

25 | P_{w}(1,4) = 3.77 | P_{w}(2,4) = 7.13 | 1 | 0.407 | 1.06 | 0 | 2.352 |

26 | P_{w}(1,4) = 3.77 | P_{w}(2,3) = 6.67 | 1 | 0.435 | 1.06 | 0 | 2.352 |

27 | P_{w}(1,4) = 3.77 | P_{w}(2,2) = 6.07 | 1 | 0.478 | 1.06 | 0 | 2.352 |

28 | P_{w}(1,4) = 3.77 | P_{w}(2,1) = 0 | 1 | 1 | 1.07 | 2.921 | 2.401 |

29 | P_{w}(1,3) = 3.33 | P_{w}(2,7) = 10 | 1 | 0.334 | 1.06 | 0 | 2.353 |

30 | P_{w}(1,3) = 3.33 | P_{w}(2,6) = 8.04 | 1 | 0.416 | 1.06 | 0 | 2.353 |

31 | P_{w}(1,3) = 3.33 | P_{w}(2,5) = 7.55 | 1 | 0.443 | 1.06 | 0 | 2.353 |

32 | P_{w}(1,3) = 3.33 | P_{w}(2,4) = 7.13 | 1 | 0.469 | 1.06 | 0 | 2.353 |

33 | P_{w}(1,3) = 3.33 | P_{w}(2,3) = 6.67 | 1 | 0.501 | 1.06 | 0 | 2.353 |

34 | P_{w}(1,3) = 3.33 | P_{w}(2,2) = 6.07 | 1 | 0.551 | 1.06 | 0 | 2.353 |

35 | P_{w}(1,3) = 3.33 | P_{w}(2,1) = 0 | 1 | 1 | 1.07 | 3.364 | 2.409 |

36 | P_{w}(1,2) = 2.81 | P_{w}(2,7) = 10 | 1 | 0.386 | 1.06 | 0 | 2.355 |

37 | P_{w}(1,2) = 2.81 | P_{w}(2,6) = 8.04 | 1 | 0.480 | 1.06 | 0 | 2.355 |

38 | P_{w}(1,2) = 2.81 | P_{w}(2,5) = 7.55 | 1 | 0.512 | 1.06 | 0 | 2.355 |

39 | P_{w}(1,2) = 2.81 | P_{w}(2,4) = 7.13 | 1 | 0.542 | 1.06 | 0 | 2.355 |

40 | P_{w}(1,2) = 2.81 | P_{w}(2,3) = 6.67 | 1 | 0.579 | 1.06 | 0 | 2.355 |

41 | P_{w}(1,2) = 2.81 | P_{w}(2,2) = 6.07 | 1 | 0.636 | 1.06 | 0 | 2.355 |

42 | P_{w}(1,2) = 2.81 | P_{w}(2,1) = 0 | 1 | 1 | 1.07 | 3.888 | 2.419 |

43 | P_{w}(1,1) = 0 | P_{w}(2,7) = 10 | 1 | 0.669 | 1.06 | 0 | 2.4 |

44 | P_{w}(1,1) = 0 | P_{w}(2,6) = 8.04 | 1 | 0.832 | 1.06 | 0 | 2.4 |

45 | P_{w}(1,1) = 0 | P_{w}(2,5) = 7.55 | 1 | 0.886 | 1.06 | 0 | 2.4 |

46 | P_{w}(1,1) = 0 | P_{w}(2,4) = 7.13 | 1 | 0.938 | 1.06 | 0 | 2.4 |

47 | P_{w}(1,1) = 0 | P_{w}(2,3) = 6.67 | 1 | 1 | 1.06 | 0.02 | 2.399 |

48 | P_{w}(1,1) = 0 | P_{w}(2,2) = 6.07 | 1 | 1 | 1.06 | 0.615 | 2.387 |

49 | P_{w}(1,1) = 0 | P_{w}(2,1) = 0 | 1 | 1 | 1.07 | 6.731 | 2.504 |

**Table 4.**Lookup table for the first prediction horizon (with P

_{w.M}(1) = 3.8 MW, P

_{w.M}(2) = 7.05 MW) for Case 3.

Scenario Combination | Optimal Results | ||||||
---|---|---|---|---|---|---|---|

n_{c} | P_{w}(n_{w},n_{s}) (MW) n_{w} = 1 | P_{w}(n_{w},n_{s}) (MW) n_{w} = 2 | β_{w}(1) - | β_{w}(2) - | Vs (pu) | P_{S} (MW) | Q_{S} (Mvar) |

1 | P_{w}(1,7) = 10 | P_{w}(2,7) = 10 | 1 | 1 | 1 | −13.034 | 3.091 |

2 | P_{w}(1,7) = 10 | P_{w}(2,6) = 8.04 | 1 | 1 | 1 | −11.167 | 2.863 |

3 | P_{w}(1,7) = 10 | P_{w}(2,5) = 7.55 | 1 | 1 | 1 | −10.697 | 2.813 |

4 | P_{w}(1,7) = 10 | P_{w}(2,4) = 7.13 | 1 | 1 | 1 | −10.293 | 2.773 |

5 | P_{w}(1,7) = 10 | P_{w}(2,3) = 6.67 | 1 | 1 | 1 | −9.85 | 2.731 |

6 | P_{w}(1,7) = 10 | P_{w}(2,2) = 6.07 | 1 | 1 | 1 | −9.27 | 2.681 |

7 | P_{w}(1,7) = 10 | P_{w}(2,1) = 0 | 1 | 1 | 1 | −3.301 | 2.439 |

8 | P_{w}(1,6) = 4.79 | P_{w}(2,7) = 10 | 1 | 1 | 1 | −7.96 | 2.755 |

9 | P_{w}(1,6) = 4.79 | P_{w}(2,6) = 8.04 | 1 | 1 | 1 | −6.069 | 2.586 |

10 | P_{w}(1,6) = 4.79 | P_{w}(2,5) = 7.55 | 1 | 1 | 1 | −5.593 | 2.551 |

11 | P_{w}(1,6) = 4.79 | P_{w}(2,4) = 7.13 | 1 | 1 | 1 | −5.184 | 2.524 |

12 | P_{w}(1,6) = 4.79 | P_{w}(2,3) = 6.67 | 1 | 1 | 1 | −4.736 | 2.497 |

13 | P_{w}(1,6) = 4.79 | P_{w}(2,2) = 6.07 | 1 | 1 | 1 | −4.148 | 2.465 |

14 | P_{w}(1,6) = 4.79 | P_{w}(2,1) = 0 | 1 | 1 | 1 | 1.9 | 2.419 |

15 | P_{w}(1,5) = 4.22 | P_{w}(2,7) = 10 | 1 | 1 | 1 | −7.399 | 2.728 |

16 | P_{w}(1,5) = 4.22 | P_{w}(2,6) = 8.04 | 1 | 1 | 1 | −5.505 | 2.566 |

17 | P_{w}(1,5) = 4.22 | P_{w}(2,5) = 7.55 | 1 | 1 | 1 | −5.029 | 2.533 |

18 | P_{w}(1,5) = 4.22 | P_{w}(2,4) = 7.13 | 1 | 1 | 1 | −4.619 | 2.507 |

19 | P_{w}(1,5) = 4.22 | P_{w}(2,3) = 6.67 | 1 | 1 | 1 | −4.17 | 2.481 |

20 | P_{w}(1,7) = 4.22 | P_{w}(2,2) = 6.07 | 1 | 1 | 1 | −3.582 | 2.452 |

21 | P_{w}(1,5) = 4.22 | P_{w}(2,1) = 0 | 1 | 1 | 1 | 2.476 | 2.427 |

22 | P_{w}(1,4) = 3.77 | P_{w}(2,7) = 10 | 1 | 1 | 1 | −6.959 | 2.708 |

23 | P_{w}(1,4) = 3.77 | P_{w}(2,6) = 8.04 | 1 | 1 | 1 | −5.063 | 2.551 |

24 | P_{w}(1,4) = 3.77 | P_{w}(2,5) = 7.55 | 1 | 1 | 1 | −4.586 | 2.519 |

25 | P_{w}(1,4) = 3.77 | P_{w}(2,4) = 7.13 | 1 | 1 | 1 | −4.176 | 2.495 |

26 | P_{w}(1,4) = 3.77 | P_{w}(2,3) = 6.67 | 1 | 1 | 1 | −3.726 | 2.47 |

27 | P_{w}(1,4) = 3.77 | P_{w}(2,2) = 6.07 | 1 | 1 | 1 | −3.138 | 2.442 |

28 | P_{w}(1,4) = 3.77 | P_{w}(2,1) = 0 | 1 | 1 | 1 | 2.927 | 2.435 |

29 | P_{w}(1,3) = 3.33 | P_{w}(2,7) = 10 | 1 | 1 | 1 | −6.527 | 2.69 |

30 | P_{w}(1,3) = 3.33 | P_{w}(2,6) = 8.04 | 1 | 1 | 1 | −4.629 | 2.538 |

31 | P_{w}(1,3) = 3.33 | P_{w}(2,5) = 7.55 | 1 | 1 | 1 | −4.151 | 2.508 |

32 | P_{w}(1,3) = 3.33 | P_{w}(2,4) = 7.13 | 1 | 1 | 1 | −3.741 | 2.484 |

33 | P_{w}(1,3) = 3.33 | P_{w}(2,3) = 6.67 | 1 | 1 | 1 | −3.29 | 2.461 |

34 | P_{w}(1,3) = 3.33 | P_{w}(2,2) = 6.07 | 1 | 1 | 1 | −2.701 | 2.434 |

35 | P_{w}(1,3) = 3.33 | P_{w}(2,1) = 0 | 1 | 1 | 1 | 3.37 | 2.444 |

36 | P_{w}(1,2) = 2.81 | P_{w}(2,7) = 10 | 1 | 1 | 1 | −6.015 | 2.670 |

37 | P_{w}(1,2) = 2.81 | P_{w}(2,6) = 8.04 | 1 | 1 | 1 | −4.115 | 2.524 |

38 | P_{w}(1,2) = 2.81 | P_{w}(2,5) = 7.55 | 1 | 1 | 1 | −3.636 | 2.495 |

39 | P_{w}(1,2) = 2.81 | P_{w}(2,4) = 7.13 | 1 | 1 | 1 | −3.225 | 2.473 |

40 | P_{w}(1,2) = 2.81 | P_{w}(2,3) = 6.67 | 1 | 1 | 1 | −2.774 | 2.451 |

41 | P_{w}(1,2) = 2.81 | P_{w}(2,2) = 6.07 | 1 | 1 | 1 | −2.184 | 2.427 |

42 | P_{w}(1,2) = 2.81 | P_{w}(2,1) = 0 | 1 | 1 | 1 | 3.895 | 2.457 |

43 | P_{w}(1,1) = 0 | P_{w}(2,7) = 10 | 1 | 1 | 1 | −3.239 | 2.591 |

44 | P_{w}(1,1) = 0 | P_{w}(2,6) = 8.04 | 1 | 1 | 1 | −1.325 | 2.478 |

45 | P_{w}(1,1) = 0 | P_{w}(2,5) = 7.55 | 1 | 1 | 1 | −0.843 | 2.457 |

46 | P_{w}(1,1) = 0 | P_{w}(2,4) = 7.13 | 1 | 1 | 1 | −0.429 | 2.442 |

47 | P_{w}(1,1) = 0 | P_{w}(2,3) = 6.67 | 1 | 1 | 1 | 0.025 | 2.428 |

48 | P_{w}(1,1) = 0 | P_{w}(2,2) = 6.07 | 1 | 1 | 1 | 0.619 | 2.414 |

49 | P_{w}(1,1) = 0 | P_{w}(2,1) = 0 | 1 | 1 | 1 | 6.744 | 2.554 |

**Table 5.**Lookup table for the first prediction horizon (with P

_{w.M}(1) = 3.8 MW, P

_{w.M}(2) = 7.05 MW) for Case 4.

Scenario Combination | Optimal Results | ||||||
---|---|---|---|---|---|---|---|

n_{c} | P_{w}(n_{w},n_{s}) (MW) n_{w} = 1 | P_{w}(n_{w},n_{s}) (MW) n_{w} = 2 | β_{w}(1) - | β_{w}(2)- | Vs (pu) | P_{S} (MW) | Q_{S} (Mvar) |

1 | P_{w}(1,7) = 10 | P_{w}(2,7) = 10 | 1 | 1 | 1.04 | −13.057 | 3.022 |

2 | P_{w}(1,7) = 10 | P_{w}(2,6) = 8.04 | 1 | 1 | 1.05 | −11.187 | 2.798 |

3 | P_{w}(1,7) = 10 | P_{w}(2,5) = 7.55 | 1 | 1 | 1.05 | −10.715 | 2.753 |

4 | P_{w}(1,7) = 10 | P_{w}(2,4) = 7.13 | 1 | 1 | 1.05 | −10.31 | 2.717 |

5 | P_{w}(1,7) = 10 | P_{w}(2,3) = 6.67 | 1 | 1 | 1.05 | −9.866 | 2.679 |

6 | P_{w}(1,7) = 10 | P_{w}(2,2) = 6.07 | 1 | 1 | 1.05 | −9.284 | 2.634 |

7 | P_{w}(1,7) = 10 | P_{w}(2,1) = 0 | 1 | 1 | 1.06 | −3.306 | 2.409 |

8 | P_{w}(1,6) = 4.79 | P_{w}(2,7) = 10 | 1 | 1 | 1.05 | −7.977 | 2.701 |

9 | P_{w}(1,6) = 4.79 | P_{w}(2,6) = 8.04 | 1 | 1 | 1.05 | −6.079 | 2.547 |

10 | P_{w}(1,6) = 4.79 | P_{w}(2,5) = 7.55 | 1 | 1 | 1.05 | −5.602 | 2.516 |

11 | P_{w}(1,6) = 4.79 | P_{w}(2,4) = 7.13 | 1 | 1 | 1.05 | −5.192 | 2.491 |

12 | P_{w}(1,6) = 4.79 | P_{w}(2,3) = 6.67 | 1 | 1 | 1.05 | −4.742 | 2.466 |

13 | P_{w}(1,6) = 4.79 | P_{w}(2,2) = 6.07 | 1 | 1 | 1.06 | −4.155 | 2.432 |

14 | P_{w}(1,6) = 4.79 | P_{w}(2,1) = 0 | 1 | 1 | 1.06 | 1.896 | 2.391 |

15 | P_{w}(1,5) = 4.22 | P_{w}(2,7) = 10 | 1 | 1 | 1.05 | −7.414 | 2.676 |

16 | P_{w}(1,5) = 4.22 | P_{w}(2,6) = 8.04 | 1 | 1 | 1.05 | −5.515 | 2.529 |

17 | P_{w}(1,5) = 4.22 | P_{w}(2,5) = 7.55 | 1 | 1 | 1.05 | −5.037 | 2.499 |

18 | P_{w}(1,5) = 4.22 | P_{w}(2,4) = 7.13 | 1 | 1 | 1.05 | −4.626 | 2.475 |

19 | P_{w}(1,5) = 4.22 | P_{w}(2,3) = 6.67 | 1 | 1 | 1.05 | −4.176 | 2.452 |

20 | P_{w}(1,7) = 4.22 | P_{w}(2,2) = 6.07 | 1 | 1 | 1.06 | −3.588 | 2.42 |

21 | P_{w}(1,5) = 4.22 | P_{w}(2,1) = 0 | 1 | 1 | 1.06 | 2.471 | 2.398 |

22 | P_{w}(1,4) = 3.77 | P_{w}(2,7) = 10 | 1 | 1 | 1.05 | −6.974 | 2.658 |

23 | P_{w}(1,4) = 3.77 | P_{w}(2,6) = 8.04 | 1 | 1 | 1.05 | −5.072 | 2.515 |

24 | P_{w}(1,4) = 3.77 | P_{w}(2,5) = 7.55 | 1 | 1 | 1.05 | −4.594 | 2.487 |

25 | P_{w}(1,4) = 3.77 | P_{w}(2,4) = 7.13 | 1 | 1 | 1.05 | −4.183 | 2.464 |

26 | P_{w}(1,4) = 3.77 | P_{w}(2,3) = 6.67 | 1 | 1 | 1.06 | −3.733 | 2.437 |

27 | P_{w}(1,4) = 3.77 | P_{w}(2,2) = 6.07 | 1 | 1 | 1.06 | −3.143 | 2.412 |

28 | P_{w}(1,4) = 3.77 | P_{w}(2,1) = 0 | 1 | 1 | 1.07 | 2.921 | 2.401 |

29 | P_{w}(1,3) = 3.33 | P_{w}(2,7) = 10 | 1 | 1 | 1.05 | −6.541 | 2.642 |

30 | P_{w}(1,3) = 3.33 | P_{w}(2,6) = 8.04 | 1 | 1 | 1.05 | −4.637 | 2.504 |

31 | P_{w}(1,3) = 3.33 | P_{w}(2,5) = 7.55 | 1 | 1 | 1.05 | −4.158 | 2.476 |

32 | P_{w}(1,3) = 3.33 | P_{w}(2,4) = 7.13 | 1 | 1 | 1.05 | −3.747 | 2.455 |

33 | P_{w}(1,3) = 3.33 | P_{w}(2,3) = 6.67 | 1 | 1 | 1.06 | −3.297 | 2.428 |

34 | P_{w}(1,3) = 3.33 | P_{w}(2,2) = 6.07 | 1 | 1 | 1.06 | −2.706 | 2.405 |

35 | P_{w}(1,3) = 3.33 | P_{w}(2,1) = 0 | 1 | 1 | 1.07 | 3.364 | 2.409 |

36 | P_{w}(1,2) = 2.81 | P_{w}(2,7) = 10 | 1 | 1 | 1.05 | −6.028 | 2.624 |

37 | P_{w}(1,2) = 2.81 | P_{w}(2,6) = 8.04 | 1 | 1 | 1.05 | −4.122 | 2.491 |

38 | P_{w}(1,2) = 2.81 | P_{w}(2,5) = 7.55 | 1 | 1 | 1.05 | −3.643 | 2.465 |

39 | P_{w}(1,2) = 2.81 | P_{w}(2,4) = 7.13 | 1 | 1 | 1.06 | −3.232 | 2.439 |

40 | P_{w}(1,2) = 2.81 | P_{w}(2,3) = 6.67 | 1 | 1 | 1.06 | −2.78 | 2.42 |

41 | P_{w}(1,2) = 2.81 | P_{w}(2,2) = 6.07 | 1 | 1 | 1.06 | −2.189 | 2.398 |

42 | P_{w}(1,2) = 2.81 | P_{w}(2,1) = 0 | 1 | 1 | 1.07 | 3.888 | 2.419 |

43 | P_{w}(1,1) = 0 | P_{w}(2,7) = 10 | 1 | 1 | 1.05 | −3.249 | 2.551 |

44 | P_{w}(1,1) = 0 | P_{w}(2,6) = 8.04 | 1 | 1 | 1.06 | −1.332 | 2.443 |

45 | P_{w}(1,1) = 0 | P_{w}(2,5) = 7.55 | 1 | 1 | 1.06 | −0.849 | 2.425 |

46 | P_{w}(1,1) = 0 | P_{w}(2,4) = 7.13 | 1 | 1 | 1.06 | −0.435 | 2.411 |

47 | P_{w}(1,1) = 0 | P_{w}(2,3) = 6.67 | 1 | 1 | 1.06 | 0.02 | 2.399 |

48 | P_{w}(1,1) = 0 | P_{w}(2,2) = 6.07 | 1 | 1 | 1.06 | 0.615 | 2.387 |

49 | P_{w}(1,1) = 0 | P_{w}(2,1) = 0 | 1 | 1 | 1.07 | 6.731 | 2.504 |

Case | P_{loss} Average (kW) | F_{1} ($/day) | F_{2} ($/day) | F_{3} ($/day) | F_{4} ($/day) | F ($/day) |
---|---|---|---|---|---|---|

1 | 29.61 | 7654.76 | 35.54 | 1540.61 | 773.73 | 5304.88 |

2 | 26 | 7651.96 | 31.2 | 1539.07 | 766.30 | 5315.39 |

3 | 97.94 | 14,007.64 | 117.52 | −4730.28 | 821.61 | 17,798.78 |

4 | 88.95 | 14,007.63 | 106.74 | −4741.06 | 811.02 | 17,830.94 |

© 2017 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Mohagheghi, E.; Gabash, A.; Li, P.
A Framework for Real-Time Optimal Power Flow under Wind Energy Penetration. *Energies* **2017**, *10*, 535.
https://doi.org/10.3390/en10040535

**AMA Style**

Mohagheghi E, Gabash A, Li P.
A Framework for Real-Time Optimal Power Flow under Wind Energy Penetration. *Energies*. 2017; 10(4):535.
https://doi.org/10.3390/en10040535

**Chicago/Turabian Style**

Mohagheghi, Erfan, Aouss Gabash, and Pu Li.
2017. "A Framework for Real-Time Optimal Power Flow under Wind Energy Penetration" *Energies* 10, no. 4: 535.
https://doi.org/10.3390/en10040535