## 3 Formulation of Optimization Problem
### Set-Up of Objective Function  
The objective of this research is to minimize the expected operational cost in a day for the uncertainties of the forecasted error. The objective function and constraints are explained as follow. Objective function:  
\[Min\ E_{day} = E_{ELE}+E_{DEV} \tag{4}\] \[= \sum_{s=1}^{S}P^{s}\sum_{t=1}^{T}\biggl{\{}C_{t}(P_{tt}+\Delta P _{tt}^{s})+D_{t}|B_{tt}-(P_{tt}+\Delta P_{tt}^{s})|\biggr{\}}\]  
The objective function (4) consists of two indexes. The first term \(E_{ELE}\) represents conventional electricity payment which increases in proportion to energy usage amount, the electricity payment is obtained by multiplying the energy usage amount in a day (kWh) by the unit price \(C_{t}\). In this paper, we set the unit price referencing one used in Tokyo Electric Power Company (TEPCO) [21]. The second term \(E_{DEV}\) represents the penalty cost which increases according to quantity of deviation power, which have been proposed in the literature [1; 3] by our previous work and it has been verified that suppression of power flow can be reduced by the electricity price system. The penalty cost is decreased if the power flow \(P_{lt}\) in the smart home lies within a bandwidth of a commanded power flow which power company sets. In this paper, it is assumed that the commanded power flow from the power company to residential side has been determined throughout electricity market between power generation side and retail one such as aggregator and the power company gives the determined power flow to the residential side. The penalty cost is obtained by multiplying the deviation power (kW) by the unit price \(D_{t}\), where the \(D_{t}\) is varying according to the difference between commanded power flow and actual power flow in the smart home as depicted in Figure 2. For example, the penalty cost \(E_{DEV}\) is calculated as follows. If the power flow exists within \"region A\", the penalty cost \(E_{DEV}\) is calculated by multiplying the deviation power flow (kW) by the unit price \(D_{t}=10\) (Yen/kW). Besides, we set the constant unit price of sold power to \(20\) (Yen/kWh). The proposed electricity price is shown in Table 2.  
The forecast error of PV output is considered in the optimization process in this paper. We consider a number of possible scenarios for the uncertainties of PV output by applying the scenario-based approach where the scenario is produced by adding a forecast error based on normal distribution. Thus, the actual power flow changes in scenario \(s\) because of the forecast error and the actual power flow becomes \(P_{lt}+\Delta P_{lt}^{s}\). Hence, the smallest expected cost obtained as a result of the optimization process indicates that the solution of scheduling of the controllable loads such as batteries is effectual for all scenarios. Figure 2: Proposed electricity price system. Constraints conditions in solving the optimization problem to reveal the optimal scheduling of the controllable loads, are as following. Equations (5) and (6) mean inverter capacity constraints for the fixed battery and EV, respectively, these are \(P_{Bmax}=1\) kW and \(P_{EVmax}=3\) kW. Equations (7) and (8) indicate state of charge constraints for the battery and EV respectively where \(C_{Bmin}=20\%\), \(C_{EVmin}=20\%\), \(C_{Bmax}=100\%\) and \(C_{EVmax}=100\%\), respectively. Equation (9) indicates constraint for energy of battery in order to use at next day. Equation (10) indicates constraint for remaining energy of EV in preparation to be used outside and it is set to be higher than 90% of capacity of EV. Constraints:  
\[|P_{Bt}|<P_{Bmax} \tag{5}\] \[|P_{EVt}|<P_{EVmax}\] (6) \[C_{Bmin}<C_{Bt}<0.8\;C_{Bmax}\] (7) \[C_{EVmin}<C_{EVt}<0.8\;C_{EVmax}\] (8) \[0.5\;C_{Bmax}<C_{B(t=24)}<0.7\;C_{Bmax}\] (9) \[= \sum_{s=1}^{S}P^{s}\sum_{t=1}^{T}\biggl{\{}C_{t}(P_{tt}+\Delta P _{tt}^{s})+D_{t}|B_{tt}-(P_{tt}+\Delta P_{tt}^{s})|\biggr{\}}\]0  
where,