Optimal Control of a Virtual Power Plant by Maximizing Conditional Value-at-Risk

: This research acquired data from the Central Weather Bureau Observation Data Inquiry System (CODIS) for historical weather information, such as observation time, temperature, humidity, wind speed, global radiation, etc., and constructed a historical weather database by using Excel software. Least square support vector machine (LSSVM) was used to forecast wind speed and solar radiation; then, the power output of wind and solar was derived. Considering factors of the demand response and the load and electricity pricing, a maximized risk income model of the virtual power plant (VPP) is established based on conditional value-at-risk (CVAR). An enhanced bacterial foraging algorithm (EBFA) was proposed to solve the risk dispatch problem of a VPP in this paper. In an EBFA, the stochastic weight trade-off is embedded to improve the behavior pattern of individual bacteria to enhance their sorting efﬁciency and accuracy in a high-dimension solution space. Various moving patterns of EBFA were considered for improvement, which were demonstrated by using a VPP system on Penghu island, Taiwan. Many scenarios were created, including various seasons, power rebate pricings, and conﬁdence levels, so the maximal risk and return of VPP could be simulated and analyzed. Simulation and tests show a positive result for a VPP to perform the power dispatch by maximizing risk income. This paper also provides a guideline for the VPP to handle the risk management.


Introduction
Climate change due to the greenhouse effect is a major topic in studying the increasingly serious problem of global warming. Controlling greenhouse gases is an important gateway for international organizations to perform environmental protection. The use of distributed energy resources (DERs) is a popular trend for friendly energy dispatch in reducing greenhouse gases. They are generally close to the load and can improve power quality and reliability [1]. DERs refer to distributed generations (DGs), including renewable energy and energy storage systems (ESS), which require a dispatch strategy to coordinate DERs for reliable operations. However, it is difficult to manage and control a large number of small-scale DERs in a conventional power system. To integrate and control scattered DERs, the concept of a virtual power plant (VPP) is proposed in [2]. A VPP can aggregate capacities of many DERs and create a single operating profile to participate in electricity markets and provide system support. Furthermore, VPP can utilize flexible loads to perform demand management (DM); it is also attractive to power utilities in electricity markets.
When selecting DERs for the aggregation of VPPs, it is necessary to understand the characteristics and correlations of various DERs. A VPP is not only a power provider, but it is also a customer who can sell or buy power from the market. It can perform a demand response to shift a demand profile and reduce peaks. However, VPP operations also inherit uncertain factors from DERs in the scheduling process [3]. Optimized operation of a VPP is needed to maximize the profits of DERs and customers [4]. Challenges come from the intermittent nature of renewables, which are not predictable and are dependent on weather and other climate factors. By a proper daily dispatch in minimizing the risks of the grid, a VPP can maximize its profit to ensure higher levels of energy security and reliability. Profit may be at risk due to uncertainties. While risk is expected in the formation and operation of VPPs, addressing uncertainties in VPP operations is a key issue when studying this topic.
Previous studies were conducted to solve the VPP operation problem in relation to electricity markets. M. Shafiekhani et al. [5] and E.G. Kardakos et al. [6] proposed a bidding strategy for VPPs in the power market, where a bi-level program with equilibrium constraints was presented for modeling the behavior of each producer. Based on the concept of aggregators, a bidding strategy for the dispatch of a VPP was proposed to obtain maximal profit [7]. VPP architecture was proposed in [8,9] based on a smart producer to establish an energy management platform by integrating distributed power and energy storage with demand response. By considering the optimal sizing of DGs, and the price of electricity, energy management of VPPs was proposed in order to achieve security issues and technical constraints [10]. Duan et al. [11] established a multi-objective VPP construction model based on decision area division, and an improved bat algorithm was used to solve this model. Based on the demand response strategy, the demand bidding mechanism of the VPP was used in the electricity market [12][13][14] to help participants obtain profit. Some approaches, such as the binding scenario identification approach [15], mixed integer quadratic programming [16], deep learning-based prediction and particle swarm optimization [17], etc., were used to solve the operation and dispatch problem of VPPs. In the above studies, VPP problems were addressed by considering the risks without the related uncertainties, i.e., with the concept of a "deterministic" risk, regardless of the fact that uncertainties are inherent in risk. Combining the conditional value-at-risk (CVAR) method and robust stochastic optimization theory, a revenue-risk equilibrium model was constructed taking into account uncertainties [18]. Risk assessments of VPPs are considered in energy and reserve markets [19], providing valuable information to decision makers. Decision makers require comprehensive risk assessments, providing a full distribution of profitability outcomes before making a decision [20]. By using two risk formulas, the rolling horizon control was used to explore the risk aversion of VPPs, which can efficiently solve the risk problem of VPPs [21].
In studies [22,23], the operating cost was minimized while maintaining the power equality of the system in question. X. Kong et al. [24] used the robust stochastic method to analyze uncertain factors and solve the optimal scheduling of multi-energy VPPs. For the uncertainty of electricity pricing, a risk-averse stochastic stage [25,26] was introduced by using CVAR. R. Lima et al. [27] considered both risk-neutral and risk-averse formulations that depend on CVAR to solve the optimal operation of a VPP. Value-at-risk (VAR) is a viable measure for the risk analysis and is generally used by financial institutions to measure the minimum loss expected in a given portfolio within an assigned period [28,29]. Conditional value-at-risk is the extended risk measure of VAR that quantifies the average loss over a specified time period of unlikely scenarios beyond the confidence level. It works similarly to a market risk measure for capital calculation.
This paper used CVAR to model the risk associated with uncertainties in the objective function and constructed a CVAR-based risk aversion model [25,26]. Uncertainties that are specific to companies can be acquired and built from operation data. An enhanced bacterial foraging algorithm (EBFA) is proposed to solve the risk dispatch problem of a VPP. In the EBFA procedure, stochastic weight trade-off (SWT) is embedded in bacterial foraging to improve the behavior patterns of each bacterium to enhance its searching efficiency in high-dimension solution space. Various moving patterns of EBFA were also proposed to improve the efficiency and effectiveness, which were demonstrated by using a VPP system on Penghu island, Taiwan. Many scenarios were created, including various seasons, power rebate pricings, and confidence levels, so the maximal risk and return of VPPs could be simulated and analyzed. Simulation results show a positive direction for a VPP to perform the power dispatch by maximizing risk income. This paper also provides a guideline for planning a VPP and includes risk management.

Problem Formulation
The VPP's architecture studied in this paper is shown in Figure 1. The VPP control center has a link to the utilities/independent system operator (ISO), integrating wind power, solar power, and energy storage systems (ESS), and sells power to aggregated loads in order to obtain profit. The ISO selling power to the VPP determines whether or not to perform demand response (DR), which involves money rebate to the VPP. If DR is performed, the VPP will curtail the aggregated loads and return part of the rebate to the aggregated load. In the uncertain environment with wind and solar, VPPs seek to maximize the risk return of power dispatch through power trading and DR.

CVAR Model
Let f (x, y) be a loss function with a set of decision variables x and random variables y. ρ(y) is a probability density function for VAR with β confidence level and can be represented in Equation (1). By using the model in [28,29], we have CVAR, for a confidence level β, is defined as CVAR of the cost, calculated in NT$, can be approximated by In Equation (3), CVAR can be expressed as a discrete function as in Equation (4).
is an estimated value of CVAR cost. y k are the k samples of variable y. VAR is an estimate of loss for a given probability of occurrence. The given probability is called the confidence level, which represents the degree of the VAR. The VAR value is a threshold. We know the probability of future losses exceeding this threshold, but do not know how bad the situation is when the loss exceeds this threshold.
CVAR cost refers to the condition where loss exceeds the given VAR value. CVAR takes into account the characteristics of tail events, satisfaction of positive homogeneity, transmission immutability, and subadditivity. It can overcome several disadvantages of the VAR measure and become more accurate in risk assessment. The difference between VAR and CVAR is shown in Figure 2. VAR relates to the probability of loss excess and CVAR is the expectation of loss excess. CVAR is generally preferable, is more widely used, and is used in this paper.

The Power Output of the PVs/WTs
In this paper, an Excel database was constructed with data from the Central Weather Bureau Observation Data Inquiry System (CODIS) [30]. The least square support vector machine (LSSVM) [31] was developed for wind speed and global radiation forecasts, as shown in Figure 3. The LSSVM performs model training, where data of the input layer are trained and transferred to the output layer using the radial basis function network (RBFN) with kernel function, K(x, y) = e (−σ 2 |x−y| 2 ) . The function can yield a good prediction, while error is calculated by using mean absolute percentage error (MAPE) as where S A Figure 3. The wind speed/global radiation forecasting using the LSSVM.
By using the predicted value of solar radiation and wind speed, power generation of PV and WT is simultaneously calculated as C p (λ, θ) is assigned as follows.
The ON/OFF status of the WT is explained in Equation (9).

The Model for the ESS
The power output of ESS can be calculated as the difference between the stored energies of two consecutive stages. Regardless of charging or discharging, ESS must be traded with the VPP. ESS is expressed as follows [32]: If the battery is charging: 2.
If the battery is discharging: where η C and η D are charging efficiency and the discharging efficiency, both are brand-dependent. P t ees is the electrical power of the battery output at the t − th h. Q t s is the aggregated capacity of the batteries at t − th h. Q s,max is the rated maximum storage energy. k c /k D is the maximum portion of the rated capacity that can be added to/withdrawn from storage in an h. ∆t is the scheduling hour. In this paper, ∆t was equal to 1 h.

Objective Function and Constraints
The VPP needs to plot its daily dispatch in the electricity market, and the proposed model combines the expected profit and risk. The objective of Equation (14) is to maximize the VPP's profit, where risk income is also included. Risk income equals the summation of the average income of the VPP under various scenarios, and the CVAR considers not only risk but also economic income. Total income and total cost of the VPP are formulated in Equations (15) and (16), respectively.
The daily dispatch in the objective function is divided in three intervals. DR interval is performed from h k-th to h l-th. During the NO_DR interval, the profit of the VPP only comes from selling the electricity to the aggregated load, while the costs of the VPP will include the cost of buying electricity from ISO, WTs, PVs, and the operating cost of the battery. The profit of the DR interval includes the profit of selling electricity after load curtailment (λ t vpp (P t load − P t cur )) and the provision of ISO to rebate any money (λ t DR P t DR ) to DR. Similarly, the VPP must provide the rebate money to the aggregated load in the DR interval (λ t inc P t cur ). The following constraints are also defined with: (1) VPP energy balance constraint P t load = P t iso + P t ess + P t cur + P t w_est + P t s_est (17) (2) demand response (3) rebate constraints (4) the expected return on investment (5) the rate of expected return on investment

Solution Algorithm
In 2002, ref. [33] proposed a bacterial foraging algorithm (BFA) for numerical analysis. BFA produces a set of initial solutions, known as E. coli, and then looks for the optimal value through chemotaxis, reproduction, and elimination-dispersal. Bacteria must constantly move the position of individuals in the process of evolution, and gradually move to a better environment. For efficient performance, BFA is modified by hybrid stochastic weight trade-off [34] in this paper and is called EBFA. EBFA was developed as follows.

Bacterial Chemotaxis
The bacterial chemotaxis can be described as where θ i (j, k, l) is the location of the i-th bacterium at the j-th chemotactic step, k-th is the reproduction step, and l-th is the elimination-dispersal event. C(i) is the distance of the bacterium at each step and ϕ(j) is the tumble direction of the bacterium. Let J(i, j, k, l) be defined as the fitness value of the i-th bacterium. If the fitness J(i, j + 1, k, l) of θ i (j + 1, k, l) is lower than the fitness J(i, j, k, l) of θ i (j, k, l), C(i) will remain in the same direction. Conversely, ϕ(j) will turn in another direction. Bacterial chemotaxis depends on the moving distance (C(i)) and the tumble direction (ϕ(j)). If the useful chemotaxis message is not transmitted among the bacteria, it will lead to a local minimum. In order to improve the local searching capability, a stochastic weight trade-off is integrated in EBFA. The bacterial chemotaxis is modified by using Equation (24) as r 1 , r 2 : random number between 0 and 1; Sign: freak factor.
Sign(r 2 ) = 1 r 2 > P let −1 r 2 ≤ P let (25) P let : the probability of "lethargy". C(i) is the distance factors, varying according to the stage of optimal process [35] as ξ j is a control parameter, which is used to reduce the stochastic effect linearly. ξ j varies with the stage of optimal process: The values of maximum iterations, ξ min , ξ max and P let are set to 0.5, 2.5, and 0.5, respectively.

Bacterial Reproduction
Optimization is performed based on the fitness value J(i, j, k, l). For the chemotaxis step, the fitness value is calculated with Equation (28) as N C : the maximum step in the chemotaxis step.
In the reproduction process, the bacteria are sorted in ascending order by fitness and the better half of the bacteria will split into two bacteria, placed at the same location. Constant population size was used for convenient coding.

Elimination-Dispersal
The elimination-dispersal of the bacteria is set by the number of chemotaxis (N C ). After a new reproduction process, the new bacteria were dispersed from their original location according to the elimination-dispersal rate (N ed ) and moved to the best position within the searching space. The elimination-dispersal process will help to avoid premature convergence and entrapment in the local optimum. Figure 4 is the flowchart of the applied EBFA.

Simulation Results
The proposed algorithm was simulated on a modified Penghu grid with renewables, as shown in Figure 5. The configuration of the VPP system consists of two WT fields, one PV fields, one thermal turbine, and one energy storage system (EES). The associated data for the study system are listed in Table 1. Note that utility is represented by the real thermal units of Penghu island, capable of providing 129.8 MW power. In general, utility is transparent to the VPP, which needs the data of power output only, while the utility may have to deal with many VPPs. Table 1 is also modified by adding "utility" besides thermal. The load profile of a typical summer and non-summer day is shown in Figure 6, for example. Solving the risk dispatch problem of a VPP, hour-driven results are assumed in this paper, which could be extended to cover a different timespan or to become a daily operation. Summer and non-summer seasons refer to the two charge rates enforced by the Tai-Power Company in Taiwan [36]. Many scenarios were tested and analyzed. Two typical scenarios are shown as examples.

The Power Output of the PVs/WTs in the Summer/Non-Summer
The weather data used are from 1 July 2018 to 21 July 2018 and 1 December 2018 to 31 December 2018. The time horizon chosen was one day of 24 h. By using LSSVM, the wind speed and global radiation were forecast simultaneously, where the power output of WT/PV was calculated using Equations (6) and (7). The number of data samples for CVAR was 50. The emulation results of WT/PV power output are shown in Figures 7 and 8. Figure 7 shows the power output of PV in the summer and non-summer seasons, and Figure 8 shows the power output of WT in the summer and non-summer seasons.

Results from Various Scenarios
To analyze the performance of VPPs, the number of data samples, risk level, and aversion parameter are 50, 95%, and 0.4, respectively. The cost-benefit power trading between VPP and utility needs to meet aggregated loads. Figure 9 shows the daily profit of the VPP for the summer and non-summer seasons with renewable uncertainties. Since the peak load usually occurs in the summer, the control center of the VPP must pay more rebate to aggregated loads for performing the DR. Table 2 shows the total income and total cost of the VPP in the daily dispatch. Table 2 shows that the dispatch with DR can gain more profit in the summer, but not the non-summer period.   Figure 10 shows the load curtailment in the summer and non-summer seasons. On a summer day, the control center of the VPP must curtail more load to satisfy the objectives. On the contrary, the VPP needs to curtail less of the load to obtain a better profit in the non-summer season.  Figure 11 shows the CVAR and the summer daily profit of the VPP with various confidence levels (β = 100%, β = 95%, β = 90%). The CVAR in Figure 11 shows that a higher confidence level leads to a lower CVAR of maximal profit, i.e., with a lower risk. Table 3 shows a comparison chart of using evolutionary programming (EP), genetic algorithm (GA), particle swarm optimization (PSO), BFA, and EBFA in the simulation. The tests were performed using an Intel Core i7-6700HQ, 3.4 Hz CPU with 8 GB DRAM. Each algorithm was tested 100 times with the same initial values. It can be seen that EBFA improves the searching efficiency with the best probability of guaranteeing a global optimum. Table 3 shows that EBFA can maximize the profit better than EP, GA, PSO, and BFA, i.e., it yields the greatest profit among all the methods, with the average execution time only a little longer than BFA. Figures 12 and 13 show the convergent characteristics of EP, GA, PSO, BFA, and EBFA for the summer and non-summer periods. They also show that EBFA has a better capability to explore a better global optimum.

Conclusions
This paper developed an EBFA algorithm to solve the risk dispatch of a VPP to obtain maximal profit. By considering WTs and PVs, uncertainties of load and VAR of power generation were integrated into the searching process. EBFA can solve the complicated problem with a better efficiency than other algorithms and can obtain a global optimum. It has great potential to be further applied to many non-convex problems in power system planning and operation. The EBFA successfully demonstrated its performance on the Penghu VPP system. By considering various scenarios, the maximal risk and return of the VPP were simulated and analyzed. Results show a good opportunity for VPPs to perform power dispatch by maximizing risk income. The proposed algorithm can be integrated into real-time operations and applied to many other mixed integer combinational optimization problems for power systems.