Objective functions
In this paper, the revenue of PVBESS power plants in typical scenario is divided into three parts: power generation revenue, assessing rewards or penalties and peak shaving and valley filling revenue of the BESS. In different typical scenarios, the capacity of BESS for optimizing PV power and the capacity of BESS for peak shaving and valley filling are optimized to maximize the revenue of the PVBESS based power plant.
Power generation revenue
The revenue of the PVBESS power plant is mainly from the grid connected power generation. The electricity charge is settled in accordance with the regional unified photovoltaic benchmark price. The daily power generation revenue of the PVBESS power plant can be expressed as:
$$ {R}_{elc}={\rho}_{pv}\cdot {Q}_{pv bess} $$
(5)
$$ {\displaystyle \begin{array}{c}{Q}_{pv bess}=\sum \limits_{k=1}^N{P}_{pv bess}(k)\cdot \varDelta t\\ {}=\sum \limits_{k=1}^N\left({P}_{pv\_ act}(k)+{P}_{bess}^{opt}(k)\right)\cdot \varDelta t\end{array}} $$
(6)
where, R
_{
elc
} is power generation revenue, ρ
_{PV} is the unified photovoltaic benchmark price of the area, Q
_{
pvbess
} is daily generation, P
_{
pvbess
}(k) is the power of PVBESS at sampling point, P
_{
pv_act
}(k) is the PV power of sampling point, \( {P}_{bess}^{opt}(k) \) is discharge power of the BESS at sampling point, ∆t is sampling time interval, N is the number of sampling points, N = 24/∆t.
Assessing rewards or penalties
After the photovoltaic power plant is connected to the power grid, the power generation will be assessed by the dispatching department according to the management measures. Take the detailed rules of the implementation of grid operation management for the northwest regional power plants in China as an example, according to Article No.31 [19], the deviation between the 96 points dayahead forecasted PV power and the actual PV power should be less than 10%. If the deviation is less than 10%, the plant will be rewarded by 1000 yuan/(10^{4}kWh) according to the integral electricity. If the deviation range is between 10% and 20%, the plant will be penalized by 1000 yuan/(10^{4}kWh) according to the integral electricity. If the deviation is more than 20%, the plant will be penalized by 3000 yuan/(10^{4}kWh) according to the integral electricity.
According to the regulation, the root mean square error (RMSE) is calculated as follows:
$$ {RMSE}_{pv}=\frac{\sqrt{\sum_{i=1}^n{\left({P}_{pv}(i){P}_{pv\_ for}(i)\right)}^2}}{C_{ap}\bullet \sqrt{n}}\times 100\% $$
(7)
where, RMSE
_{
pv
} is the root mean square error between the dayahead forecasted PV power and actual PV power (%), P
_{
pv
}(i) is the actual PV power at ith moment (kW), P
_{
pv_for
}(i) is the forecasted PV power at ith moment (kW), C
_{
ap
} is the average capacity of generating units (kW), n is the number of moments traversed by the forecasting.
For PVBESS power plants, the grid connected power is the sum of the PV power and BESS power, so the formula of RMSE above can be expressed as [20]:
$$ {\displaystyle \begin{array}{c}{RMSE}_{pv bess}=\frac{\sqrt{\sum \limits_{i=1}^n{\left({P}_{pv bess}(i){P}_{pv\_ for}(i)\right)}^2}}{C_{ap}\bullet \sqrt{n}}\times 100\%\\ {}=\frac{\sqrt{\sum \limits_{i=1}^n{\left({P}_{bess}^{opt}(i)+{P}_{pv\_ act}(i){P}_{pv\_ for}(i)\right)}^2}}{C_{ap}\bullet \sqrt{n}}\times 100\%\end{array}} $$
(8)
The assessing rewards or penalties of the PVBESS power plant can be expressed as:
$$ {R}_{ass}={\alpha}_{ass}\cdot {Q}_{pv bess} $$
(9)
where, R
_{
ass
} is the assessing rewards or penalties (yuan), α
_{
ass
} is the coefficient of the rewards or penalties (yuan/kWh). The value of α
_{
ass
} can be set up according to the relevant contents of the assessing rules of the power grid enterprises in different regions.
Peak shaving and valley filling revenue of the BESS
The primary role of BESS in a PVBESS power plant is to optimize the output of PV power generation system and reduce the deviation between the actual and forecasted PV output. While in actual operation, only the partial capacity of the BESS is needed by the optimization of PV power. The PVBESS power plant can take the remaining BESS into the power grid to help cut peak and fill valley, charging with low electricity price in valley time, and discharging with high electricity price during peak time, to obtain some extra income [21].
The revenue of the BESS participating in peak shaving and valley filling can be calculated by the below formula:
$$ {R}_{tou}=\sum_{i=1}^{24}{\rho}_{tou}(i)\cdot {P}_{bess}^{tou}(i) $$
(10)
where, R
_{
tou
} is the revenue of the BESS participating in peak shaving and valley filling (yuan), ρ
_{
tou
}(i) is the timeofuse price during ith period (yuan/kWh), Ptou bess(i) is the charging or discharging power of the BESS in ith period (kW). At the same time, the BESS will only maintain a single charge or discharge state.
Based on the above analysis, the optimal objective functions of the revenue optimization model of PVBESS power plants in typical scenario can be expressed as:
$$ \mathit{\operatorname{Max}}\kern0.5em {R}_{sum}={R}_{elc}+{R}_{ass}+{R}_{tou} $$
(11)
where, the R
_{
sum
} is the revenue of the PVBESS power plants.
Constraints
In the typical scenarios developed in this paper, the calculation of revenue should be consistent with the operation constraints of the PVBESS power plant, as follows:

(1)
Power balance constraint of the whole system [22]
$$ {P}_{pv\_ act}(k)+{P}_{bess}^{opt}(k)={P}_{pv bess}(k) $$
(12)

(2)
Power constraint of the BESS
$$ {P}_{bess\max}^{opt}\le {P}_{bess}^{opt}(k)\le {P}_{bess\max}^{opt} $$
(13)
where, \( {P}_{bess\max}^{opt} \) is the maximum charge and discharge power of the BESS used to optimize PV power (kW).

(3)
StateofCharge (SOC) constraint of the BESS [23]
The SOC of the BESS refers to the ratio of residual energy to total capacity. To prevent the overcharge and over discharge of the BESS, the SOC of the BESS should be bound up to the upper and lower limits.
$$ {SOC}_{bess.\min}^{opt}\le {SOC}_{bess}^{opt}(k)\le {SOC}_{bess.\max}^{opt} $$
(14)
where, \( {\mathrm{SOC}}_{bess}^{opt}(k) \), \( {\mathrm{SOC}}_{bess\max}^{opt}(k) \) and \( {\mathrm{SOC}}_{bess\min}^{opt}(k) \) are respectively the SOC and the upper and lower limits at the kth sampling point.
$$ {SOC}_{bess}^{opt}(k)={SOC}_{bess}^{opt}(0)\frac{\sum_{i=1}^k{\eta}_{bess}{P}_{bess}^{opt}(i)\cdot \varDelta t}{E_{bess\max}^{opt}} $$
(15)
where, \( {\mathrm{SOC}}_{bess}^{opt}(0) \) is the initial state of the SOC (%), \( {E}_{bess\max}^{opt} \) is the rated capacity of the BESS used to optimize the PV output (kWh), η
_{
bess
} is the charge and discharge efficiency of the BESS, which is set as 90% in this paper.

(4)
Capacity allocation constraints of the BESS
$$ 0\le {E}_{bess\max}^{opt}\le {E}_{bess} $$
(16)
where, E
_{
bess
} is the rated capacity of the whole BESS in the PVBESS power plant.