Demand Side Management for Smart Grid Based on Smart Home Appliances with Renewable Energy Sources and an Energy Storage System

A novel energy management system to improve the efficiency of renewable energy and storage system by scheduling various types of household appliances is developed. The end users schedule appliances optimally taking into account maximum utility (a measure of the satisfaction level of user’s electricity consumption) as well as minimum user’s cost of energy as competitive objectives. A random disturbance (reflecting an uncertainty) is introduced to describe the indeterminate amount of the electricity produced from the renewable energy sources at the adjacent slots. By applying the probability theory, the uncertain optimization model is transformed into a convex optimization problem. Then, the optimal solution is obtained using a quasi-Newton method. The rationality of our proposed model is verified through numerical simulations. According to the results of simulation studies, it is demonstrated that our proposed model not only enhances users’ utility but also reduces energy consumption cost.


Literature Review.
e energy shortage and aggravation of environmental pollution are serious problems in a traditional power grid system. Power management is currently undergoing through a dramatic transformation from a traditional power system (TPS) into a smart grid [1]. e smart grid is an intellectualized power network system, which is based on highly integrated two-way communication networks and information systems. It is reliable, economical, and environmentally friendly and can be applied in sensing technologies and control infrastructures. Compared with traditional power grids, the smart grid has the advantages of flexible structure, excellent system performance, and high quality, which can improve the social development.
erefore, smart grid has become a beacon of development in the direction toward a modern power system [2][3][4].
Demand side management (DSM) in smart grid is a kind of management activity which can effectively promote and mobilize the enthusiasm of users to change or transfer the power consumption according to the dynamic prices (e.g., real-time pricing, time of use pricing, and inclining block rates) [5]. It is a hot topic for how to mobilize the enthusiasm of users to participate in their energy management. With improving the technology of renewable energy sources (RES) in recent years, many users are equipped with rooftop solar panels or small wind turbines. e RES is reducing the reliance on the TPS and relieving the supply pressure of power grids [6][7][8][9]. To alleviate the randomness and intermittent characteristics of the RES, an energy storage system (ESS) is being applied in smart grid, for example, popular electric vehicles that require both energy availability and storage power [10][11][12][13].
prediction [10,16,18,19,[27][28][29][30][31][32][33]. An optimization method [10] based on teaching-learning and adaptive neuro-fuzzy inference is used to estimate the maximum actual capacity of a charging state. A charging and discharging strategy of a future battery energy storage system was studied using an open distribution system simulator software to predict the daily load and photovoltaic (PV) generation curves [31]. e authors in [32], presented a simple method for determining the optimal capacity of PV power generation with a battery system based on the total annual solar radiation. e grid dependency can be obtained based on the total annual solar radiation without considering the time-series waveform of solar radiation. e studies need to know the production power distribution of the RES. However, in our model, a random disturbance (reflecting an uncertainty) is introduced to describe the indeterminate amount of the electricity produced from the RES at the adjacent slots. It is unnecessary to know about the distribution of electricity produced from the RES which is our first novelty.
Considering the RES or ESS, the classification of appliances is given in some studies [16,[34][35][36][37][38][39][40][41][42]. A cost minimization problem focusing on the uninterruptible operation with an uncertainty of renewable energy generation at different time intervals was raised in [34]. In this study, uninterruptible and immovable electrical appliances were involved, whereas elastic appliances (such as air conditioners and water heaters) and semielastic ones (such as washing machines, dishwashers, and electric cookers) were not. A user convenience model employing a heuristic algorithm was proposed to minimize a user's dissatisfaction and the supplier's cost [36]. e model only involved appliances with beginning operation time and ending time. A robust optimization technique for scheduling smart appliances and electrical energy storage was applied to minimize the electricity bill and the CO 2 emissions [37]. Chen et al. utilized a Lyapunov optimization approach to minimize the total payment from the grid and also have focused on semielastic appliances [38]. Similarly, authors in [39][40][41][42] elaborated on multilevel management with various RES and controllable loads, taking into account the energy saving and comfortable lifestyle as objectives of a realistic smart home energy management system.
Nevertheless, these works failed to consider the impacts of RES and ESS by scheduling different types of smart appliances, which is our second novelty.
To address these issues, an efficient model for demand side management is proposed, wherein, not only it is unnecessary to know about the distribution of electricity produced from the RES but also the impacts of RES and ESS are taken into account through managing various types of household appliances. In this way, users can optimally schedule operating set times of their smart home appliances and reasonably equip with the ESS and RES to achieve their energy management.
In our model, an expectation (caused by the uncertainty of RES) users' welfare maximization model is established. e users' utility maximization and bill minimization constitute the objective function. e users can design their electricity consumption mode according to the objective function.
e constraint reflects the fluctuation (uncertainty) of electricity caused by the intermittency of the RES. e objective function is transformed into a deterministic problem and the constraint into the deterministic one. e model is then solved by applying the dual method. Finally, the rationality of the model and the validity of the algorithm are verified through numerical simulations. Our contributions are as follows: (1) A random disturbance is introduced to describe the intermittence and instability of the RES at the adjacent slots. In this model, it is unnecessary to know about the distribution of electricity produced from the RES. (2) An efficient model for demand side management is proposed so that users can reasonably arrange different smart appliances and consume the electricity supplied from the TPS, produced from the RES, or stored in the ESS concerning the users' utility maximization and their bill minimization. e remainder of this paper is organized as follows. In Section 2, the classification of different appliances and the problem statement are formulated. We present the proposed model in Section 3. e results of numerical simulations are provided in Section 4, and some concluding remarks are given in Section 5. e list of abbreviations is shown in Appendix. e architecture of the proposed system model in time slot k is illustrated in Figure 1.

Classification of Appliances and Problem Statement
A system that includes a power supplier and multiple residential users is considered. e supplier and all users are linked using a communication infrastructure to realize information exchange. An energy hub (a detailed description given in [43]) of each user contains a rooftop solar panel, a small wind turbine, several batteries and electrical vehicles, some smart home appliances, and an electric quantity controller (EQC) with a smart meter. e smart meter not only bears a function of information transmission but also has the function of regulating and controlling household electricity information. It transmits the information of household electrical equipment consumption to users in order to better control the consumption and cost of electricity and sends relevant information to the power supplier to achieve load control and electricity price. e electricity price is given by the power supplier. Consumers can adjust the mode of electricity consumption by smart meters to achieve their maximum utility and minimum bill. In this model, it is supposed that users cannot sell redundant energy to the grid or other users, and thus the excess power from the RES is discarded [36].
Within the scope of our model, the devices' cost and the reactive power are not considered, and frequency and voltage stability are guaranteed [44]. e appliances are linked with the smart meter, where t is the initial time, and not is necessarily 1, K is the number of time slots, and K � t, t + 1, . . . , K { } is the entire cycle. e indexes, functions and variables, and parameters are listed in Tables 1-3, respectively. e modeling of the energy system components is detailed as follows.

Classification of Appliances.
Every user has three types of appliances, namely, A i , B i , and C i . e first type of household appliances, A i , which are must-run appliances, are those household electrical appliances that must be operated. Owing to their inelasticity, this type of electrical appliances does not depend on the change of electricity price. For instance, lighting appliances, televisions, and refrigerators are not controlled by an EQC unit. e second category of household appliances, B i , includes elastic equipment, such as air conditioners, water heaters, and other adjustable equipment. e use of these appliances is directly affected by the electricity price. When the electricity price rises, the electricity consumption decreases, and vice versa. e last type of household appliances, C i , includes semielastic equipment, such as washing machines, dishwashers, electric cookers, and dryers. ese appliances all require a certain amount of working time to complete an established task. Similar to elastic devices, semielastic devices are affected by the electricity price, whereas the working time of semielastic devices is fixed.

Must-Run Appliances.
Let l a k u,i denote the power consumed by appliance a u,i ∈ A i ∪ B i ∪ C i of user i in time slot k; K a u,i denotes the running time of a must-run appliance a u,i ∈ A i , which consumes r a k u,i in time slot k; and K a u,i ⊆ K. Denote M A i as the number of must-run appliances, and let E a u,i � M A i u�1 l a k u,i denote the total power consumption of must-run appliances during an operation cycle. is given. Referring to this value, users can make their own unique electricity consumption mode.
is means that, for the same total electricity consumption, the user has the opportunity to keep the water heater at a higher temperature during the winter or turn an electric fan on.

Semielastic
Appliances. Semielastic appliances complete a task within a fixed time interval. Every household has M C i semielastic appliances. Denote E a u,i ′ as the total electricity of semielastic appliances. e working hours of these appliances are continuous. Once semielastic appliances are operated, they need to complete their tasks without stop. Here, K a u,i ′ is the working time of semielastic appliances. e beginning time of an electrical appliance is α a u,i , and the end time is β a u,i . e working time can be expressed as α a u,i , α a u,i + 1, . . . , β a u,i ∈ K a u,i ′ . e satisfaction of the user will be seriously hindered if semielastic appliances are interrupted during an operation.
e three types of appliances satisfy the available electricity consumption, as indicated in Table 4.

Renewable Energy Sources.
e RES are deemed as significant generation alternatives in smart grid owing to their nonexhausted nature and benign environmental effects. Both a stochastic approach and a robust one are optimization methods for uncertain situations. e RES power generation is stochastic and intermittent and will be disturbed by many independent random factors. In the stochastic approach, the probability distribution of random parameters is known; in the robust one, the probability distribution of random parameters is unknown, but its fluctuation range needs to be known. In our model, unnecessary to know about the distribution of electricity produced from the RES, a random disturbance ρ k i is introduced to describe the uncertainty of the RES with expectation value E(ρ k i ) � μ k i and variance D(ρ k i ) � (σ k i ) 2 . en, where y k i denotes the electricity produced from the RES in time slot k.
By applying the Central Limit eorem, when the number of users is large enough or segmentation of time slots is small enough, the sum of all random variables n i�1 k j�t+1 ρ j i is subject to a normal distribution:  Total electricity quantity of the power system kWh

Mathematical Problems in Engineering
Distribution function - where N(·) denotes a normal distribution function, the standardization of the normal distribution can be obtained as follows: w ∼ N(0, 1); therefore, the distribution of all random variables is known why a stochastic approach is chosen instead of a robust one in our study.

Energy Storage System. Electric vehicles and batteries
can be classified as the ESS, which can be charged or discharged. C b is denoted as the capacity of the ESS. In time slot k, the charge rate z k i is positive and the discharge rate z k i is negative. In addition, g b and − g b denote the maximum and minimum capacity values of the ESS, − g b ≤ z k i ≤ g b , s k i is denoted as the capacity of the ESS at the beginning time slot k, and s 0 i is the initial charging state of the ESS. At every time slot, the stored energy cannot exceed the storage capacity:

Real-Time
Pricing. e existing price forms mainly include fixed pricing, step pricing, time of use pricing (TOU), real-time pricing (RTP), and inclining block rates (IBR). Among them, RTP and IBR models have been extensively studied. It refers to the cost occurring at a certain moment during electricity sales, which reflects the characteristics of electricity prices with respect to time. Practically, power suppliers design the real-time price considering the time of demand and the power availability. Contrastingly in the IBR pricing model, as time goes on, prices remain unchanged, while incurring an increase when the energy consumption of a user reaches a predetermined threshold [19].
In our model, combining RTP and IBR price tariffs, the price p k is denoted as follows (see [45]): where m k and n k are differentiated prices, in which m k ≤ n k ; l k i denotes the total electricity consumption of user i in time slot k; and b k is the energy consumption threshold in time slot k.

Utility Function of a User.
e concept of a utility function in microeconomics is widely used to characterize a user's satisfaction with a certain amount of electricity consumption. e existing studies have shown that the user's response can be expressed by a utility function. e electricity demand varies with each individual and depends upon the time of a day, climate, and price. e value of utility function denotes the satisfaction level of each user after using the electricity purchased. U(l k i , ω k i ) is the utility function of user i, l k i denotes the amount of consumed energy, and ω k i is an elastic coefficient and is a known parameter, and the utility value is expressed in a monetary form. Different utility functions represent different types of users and are distinguished by different elastic coefficients. Under the same conditions, the larger the ω k i value is, the higher the user' satisfaction. Usually, the general utility functions satisfy the following basic assumptions: (1) e utility function is a nondecreasing function, i.e., zU(l)/zl ≥ 0. (2) Marginal utility is nonincreasing, i.e., the utility is a concave function. us, z 2 U(l)/zl 2 ≤ 0. (3) When the user does not consume electricity, the utility is zero, that is, U(0) � 0.
In this paper, utility functions are considered as follows: where α i is a preset parameter, and ω k i and l k i are the elastic coefficient and power consumed by user i in time slot k, respectively.

Payment Function of Users.
e term P(l k i ) denotes a user's payment function. In our model, the devices' cost is not considered. Based on the price shown in (4), for a total load l k i in time slot k, the user's cost P(l k i ) is determined as the maximum of two intersecting lines [45]: e user's payment function is obtained from the following equation:

Problem
Formulation. In our model, based on scheduling household appliances and considering the fluctuation of electricity produced from the RES, an expectation model of users' welfare maximization is taken as follows: subject to Mathematical Problems in Engineering 5 where U(l k i , ω k i ) and P(l k i ) are the utility function and payment function of user i in time slot k, respectively, ω k i (reflecting the satisfaction level of each user after using the electricity purchased) is an elastic coefficient and is a known parameter, x k i is the amount of electricity supplied from the TPS, y k i is the amount of electricity produced from the RES, and z k i is the electricity charged or discharged in the ESS. In addition, x k i , y k i , and z k i are variables which the amount is eight hundred and forty and G k is the total electricity quantity of a power system. e constraints (9a) and (9b)-(9d) characterize the electric performance of elastic and semielastic appliances, respectively. e compositions and sources of a user's electricity consumption are expressed as constraints (9e) and (9i). Constraint (9f ) is the power fluctuation generated from the RES between two time slots. is constraint on the RES is not considered in [46]. Besides, determining the relationship between y k i and y t i , y k i can be expressed as follows: Constraint (9g) describes the electric performance of the ESS. Constraint (9h) shows that the expected total electricity consumption of users does not exceed the electricity production, which reflects the correlation and coupling between the electricity consumption of users. Samadi et al. do not take the constraint into account [35].

Convex Optimization Problem Formulation.
e transformation of the objective function and constraint (9h) are shown as Appendixes A and B.
According to Appendixes A and B, a convex optimization problem from problem (P1) is obtained as subject to (9a)-(9e), (10a), (9g), and (9i) E(ρ k i ) � μ k i and D(ρ k i ) � (σ k i ) 2 are the expectation and variance of the random disturbance ρ k i , respectively. Among these constraints, constraints (9g), (12a), and (12b) are our inequality constraints, and constraints (9d) are our equality ones. e type of decision variables is real, and there are eight hundred and forty variables, one hundred and thirty-nine inequality constraints, twenty equality constraints, and eight hundred and forty boundaries.

Theorem 1. Problem (P2) is a convex optimization and has an optimal solution.
Proof of eorem 1 is shown in Appendix C.

Dual Problem.
From eorem 1, (P2) is a convex optimization and has an optimal solution. It is equivalent to its dual problem. erefore, it can be solved using a dual method [20].
e Lagrangian function of (P2) is where c ∈ R + . e objective function of the dual optimization problem is as follows: e dual problem is the following:

Introduction of Smoothing
Methods. e payment function P(l k i ) of (P2) contains of the plus and maximum functions, which are nonsmooth. It is impossible to solve this problem directly using classical optimization methods. Smooth approximation functions can be found to replace the abovementioned functions. e basic idea of a smoothing method is to replace the nonsmooth function with a smooth approximation function and solving the original problem is equivalent to solving the traditional optimization problem.
ere are many smoothing methods, such as quadratic function method, aggregate function method, and density method (see [47]).
Absolute value function y � |x| is convex on R 1 and smooth everywhere except x � 0. Given a small constant ε > 0, the following smooth function approximates it: which is called quadratic function method. e aggregate function method is considered. e maximum function is as follows: where f i (x)(i � 1, . . . , m) is a second-order continuous differentiable function on R n . e following aggregate function is a smooth approximation function of formula (18) [47]: where π is a small positive number. Next, the density method is discussed. Let ρ(x) be a probability density function from R 1 to R + and satisfy

Mathematical Problems in Engineering
e smooth approximation function of x + � max x, 0 { } is as follows: where μ > 0 is a smaller number. Because the plus function is inside and the maximum function is outside of the payment function P(l k i ), the plus function is considered first smoothing and then smoothing the maximum function.

First Smoothing.
e quadratic function and aggregate function method are simple, practical, and effective, and these smoothing methods are adopted to deal with the nonsmoothness of payment function P(l k i ). e quadratic method is first adopted.
x, x > t, Proof of eorem 2 is shown as Appendix D.
According to eorem 2, x of formula (22) is directly replaced by (l t i − k j�t+1 μ j i ) + and the smoothing function

Second Smoothing.
During the second smoothing process, the aggregate function method is used to smooth the maximum function of the payment function P(l k i ).
and the model in (15) can be transformed to find the maximum value of the smoothing approximation function: e optimal solution of (25) can be obtained using a quasi-Newton method [34]: (1) Taking X 0 , H 0 , and parameter ε ≥ 0, let k � 0. 8 Mathematical Problems in Engineering (2) Computing d k � − H k g k and X k+1 � X k + α k d k , where X k � (x k i , y k i , z k i ), g k � (zL tu /zX)| X�X k , α k is a step generated by a line search. If ‖g k+1 ‖ ≤ ε, the algorithm stops; otherwise, moves to the next step.
H k y k ) T y k ), where y k � g k+1 − g k , and k � k + 1, go to (2).
us, X * (λ, θ, c) is obtained and is substituted into (25). We can then have D(λ, θ, c). Computing λ, θ, and c, the solution of the model is obtained.
A flowchart of the algorithm is shown in Figure 2.

Numerical Simulations
A power system that includes a power supplier with five users is considered. One day is divided into twenty-four periods. Each family is equipped with a rooftop solar panel, a small wind turbine, several batteries and electrical vehicles, and ten electric appliances. e must-run appliances a 1 , a 2 ∈ A i consume electricity at any time during the day. e electricity consumption of these appliances is set as 1 kWh and 3 kWh. e elastic appliances B i , include four appliances a 3 , a 4 , a 5 , and a 6 . eir electricity consumption is considered as a whole, so long as the total electricity consumption will not exceed R max    Let b k � 4 kW during the entire period. e utility function of user i is set as follows: where ω k i is an elastic utility coefficient and is a known parameter. Under the same conditions, the larger is the value of ω k i , the higher is the power consumption while increasing the pressure on the TPS (further information regarding the utility function can be found in [48]). erefore, ω k i needs to be taken into account as a proper range. In the first scenario, different ranges of the elastic coefficient ω k i are analyzed. In the other scenario, the impacts of the RES and ESS by manipulating semielastic and elastic appliances are studied under the appropriate range of ω k i in various models.    [1,3,5,7,9,11] and [18,20], respectively. "w � 2" means ω k i ∈ [1, 3] for the lowest satisfaction level; "w � 6" and "w � 10" mean ω k i ∈ [5,7] and ω k i ∈ [9,11] for the normal satisfaction levels, respectively; and "w � 20" means ω k i ∈ [19,21] for the highest satisfaction level. e specifications of these units are summarized in Table 6.
rough the simulations, the electricity consumption from the TPS by the semielastic appliance a 7 at each hour is computed and their average values are determined. e cycle of appliance a 7 is denoted as {3, 4, . . ., 9} (see in Table 5) and the assignment must be completed during this period. As shown from Figure 3, the appliance a 7 is operated at time 4:00 am and is turned off at 8:00 am. Its assignment is completed within the designated time {3, 4, . . ., 9}. e appropriate ranges of ω k i in semielastic appliances are discussed, as shown from Figures 3-6. From Figure 3, when w � 2, 6, 10, the electricity consumption from the TPS by scheduling the semielastic appliance a 7 is relatively smaller and stabler (relieving the supply pressure of the TPS) than that when w � 20. e similar conclusions of other semielastic appliances are obtained, as shown from Figures 4-6. erefore, the value of ω k i under [1,11] is more appropriate. Multiple simulations are conducted; the electricity consumption from the TPS by elastic appliances B i for five users is computed at each hour, and the average value is determined. e smaller and stabler electricity consumption from the TPS by scheduling elastic appliances is seen from, Figure 7, when w � 2 and w � 6. Consequently, ω k i is suitable under [5,11] considering the influence on the TPS.
Users are enthusiastic for making full use of electricity consumption from the RES when ω k i is suitable under [11,20], as shown from Figure 8. While w � 10, the availability of the ESS is relatively higher, especially in peak periods (10:00-20:00) discharged and off-peak periods charged, as presented in Figure 9.
As for the objective of this model, the higher the user's welfare value is when w � 20, the worser the stability is. While not only a higher welfare value but also an optimal solution is obtained when w � 10, as shown in Figure 10. e users' welfare values are relatively stabler as w � 2 and w � 6; however, it is abnormal to get the negative values (e.g., w � 2). In summary, w � 10 (i.e., ω k i ∈ [9,11]) is the suitable range considering both the interest of users and the influence on the TPS.

Discussion under the Same Elastic Coefficient.
In this scenario, four models to illustrate the impacts of the RES and ESS by manipulating semielastic and elastic appliances are studied under ω k i ∈ [9,11]. e indexes used in the four models are listed in Table 7.
As can be observed from Figure 11, the average of electricity consumed from the TPS by semielastic appliances a 7 in the all-model is the least during the working periods. It is shown that the RES and ESS play positive roles as auxiliary energies making users using less power consumption from the TPS. It should be also noted, owing to the continuous working cycle of the semielastic appliances, users' aggregate power consumption (green line) from the TPS in the ESSmodel is much less than that, in the RES-model (blue line).  erefore, users have priority to consume the electricity stored in the ESS and then produced from the RES and from the TPS last. By giving aggregate electricity consumption shown from Figure 11, users can reasonably arrange batteries or electrical vehicles according to their semielastic home appliances, to a large extent, alleviating the pressure of the traditional power grid. Likewise, the same conclusions are obtained from Figures 12-14.
From Figure 15, it can be seen that the electricity consumption from the TPS by elastic appliances B i in the allmodel is the most stable at each moment, and the range of fluctuation is the smallest of the four models. At the same time, it is observed that the ESS-model and RES-model have a similar impact in terms of electricity consumption from the TPS by elastic appliances.
From Figure 16, it can be demonstrated that the electricity consumption from the RES in the all-model is relatively higher during peak periods than that in the RESmodel, which indicates that users make full use of the RES in our proposed model. It can be seen from Figure 17 that the ESS is in the discharge states (positive values) during peak periods while in the charge states (negative values) during off-peak periods in the all-model. To some extent, the ESS relieves the power pressure on the TPS.
Without loss of generality, we consider the difference in electricity consumed from the TPS by three types of appliances for user 1 at each hour in four models. Figure 18 shows the electricity consumed from the TPS by all appliances for user 1 at each hour. e electricity consumption from the TPS in our proposed model is much less than those other models overall. Figure 19 shows that the users' welfare value in the allmodel (i.e., our proposed model) is significantly higher than that of other models. Users' welfare values in the all-model are more than double those of other models under ω k i ∈ [9,11]. In particular, the welfare value of user 4 reaches 448 dollars in the all-model, while it reaches 175 dollars, 180 dollars, and 200 dollars in other models, respectively. is verifies the rationality of our proposed model and feasibility of the method.
It can be demonstrated from Figure 20 that the proposed algorithm has remarkable convergence performance, and it converges at 16 times keeping the total welfare of users around 2250 dollars.

Conclusions
In this paper, an optimal residential energy consumption model is proposed, which aims to achieve a trade-off between maximizing users' utility and minimizing their payment based on scheduling household appliances. e optimal solution of the model is obtained using a smoothing quasi-Newton method. Several cases are discussed under different elastic coefficients ω k i which is demonstrated that ω k i ∈ [9,11] is the suitable range considering not only the interest of users but also the influence on the TPS. Afterwards, the impacts of the ESS and the RES are discussed in several models. e discussion results show that users' aggregate power consumption from the TPS by semielastic appliances in the ESS-model is much less than that in the RES-model. However, in terms of electric power consumed from the TPS by elastic appliances, the ESS-model and the RES-model have little difference. Finally, the simulation results show that our proposed model is superior to other models in terms of not only users' welfare but also electricity consumption from the TPS.
Future studies will be conducted to extend as follows: (1) An optimal residential energy consumption model is proposed considering thermoelectrical load modeling of a house (2) Similar models are solved adopting a robust approach or artificial intelligence algorithms such as machine-learning algorithm At the initial time slot t, At other time slots, We denote According to the properties of the mathematical expectation, V k can be rewritten as follows: During operation of the power grid, power consumption of users is not saturated. us, only the situation 0 ≤ l k i ≤ (ω k i /α i ) is considered. At this time, the utility function can be written as follows: en, Substituting (10a) into (A.6), it is obtained that Mathematical Problems in Engineering 15 , which can be determined as follows: In addition, where ρ j i describes the uncertain powers produced from the RES. e expected value of distribution is E(ρ j i ) � μ j i , and the variance is D(ρ j+1 i ) � (σ j i ) 2 . By applying the probability theory, the payment function with expectation is transformed into a certain function. erefore, a new payment function is denoted as follows: 16 Mathematical Problems in Engineering (A.10) Substituting U(l t i , ω k i ) and P(l k i ) into (A.6), we have Considering the first case k � t, it can be seen that the objective function still satisfies formula (A.11).
us, objective function (P1) can be equivalent to the following deterministic problem:

B. Transformation of Constraint (9h)
Constraint (9h) provides a probabilistic constraint on the total electricity consumption. In other words, the power supplier needs to ensure that the probability of the difference between the electricity power consumption of all users and the output of the power supplier exceeding a given threshold should be smaller than any small positive number. us, condition (9h) can be drastically expressed as follows: where η is a given threshold, reflecting the degree of difference between the total electricity consumption and the quantity of electricity produced by the power supplier and ε is a very small positive number, which can be understood as the failure probability. By replacing formula (10a) into (B.1), it can be obtained as follows: Formula (B.1) can be rewritten as the following expression: Namely, where w � − ( n i�1 k j�t+1 ρ j i + μ)/σ. Owing to w ∼ N(0, 1), the variable obeys a standard normal with an expectation of zero and a variance of 1. Expression (B.4) can be simplified as x k i − y t i + z k i + ≤ G k + η + μ − σΦ − 1 (ε) � G k + φ(k), where φ(k) � η + μ − σ Φ − 1 (ε).

C. Proof of Theorem1
Theorem 1. Problem (P2) is a convex optimization and has an optimal solution.
Proof. According to the property of utility function, is a strictly concave function, whereas the sum of the strictly concave function K k�t n i�1 U(l t i , ω k i ) is still a strictly concave function. Next, it is shown that P(l k i ) � max m k (l t i − k j�t+1 μ j i ) + , n k (l t i − k j�t+1 μ j i ) + + (m k − n k )b k } is a convex function. In addition, l t i − k j�t+1 μ j i is a linear function, and thus it is convex. e bigger value of two convex functions is a convex function [49], and thus (l t i − k j�t+1 μ j i ) + is a convex function, which is called a plus function. en, P(l k i ) is a convex function, − P(l k i ) is a concave function. In addition, K k�t n i�1 P(l k i ) is a convex function obtained through the property of the convex function. us, − K k�t n i�1 P(l k i ) is a concave function, and thus K k�t n i�1 [U(l t i , ω k i ) − P(l k i )] is a concave function. erefore, according to the conclusion drawn by [50] and described in Section 4.2, the concave function Proof. When x > t or x < t, |ψ t (x) − ψ(x)| � 0, when − t ≤ x < 0, we have |ψ t (x) − ψ(x)| � |x 2 /4t + x/2 + t/4 − 0| � |(x + t) 2 /4t| ≤ t/4, and when 0 < x ≤ t, we obtain erefore, for ∀t > 0, |ψ t (x) − ψ(x)| ≤ (t/4), and thus ψ t (x) is a smooth approximation function of ψ(x) [47]. □

Data Availability
e data used to support the findings of this study are included within the article.

Conflicts of Interest
e authors declare that there are no conflicts of interest regarding the publication of this paper.