Smart household management systems with renewable generation to increase the operation profit of a microgrid

: During the past few years, due to the growth of electric power consumption, generation costs as well as rises in the level of greenhouse gases efficiency bring special focus on distributed generation. Developing distributed generation resources, especially renewable energy resources, is one of the safest ways to solve such problem. These resources have been decentralised by being installed close to the houses producing few kilowatts. Therefore, there are no losses in transmission lines and provide response for demand. Based on their benefits, the use of such energy resources should be developed in the future, but its management and optimal use is a major challenge. This has become one of the main concerns ofenergy systems researchers. In the current study, an innovative model is provided as a strategic management. It is intended to optimise the operation in smart homes consisting of generation units such as a wind turbine, solar panels, storages, and un/controllable loads. The main objective of this optimisation management is to maximise microgrid profitability for 24 h. The overall results of the model proved that the profit of microgrid increased significantly.


Notation
The notation used throughout the paper is stated below.

Indexes
N number of solar modules T time interval (

Motivation
Demand response is defined as the reduction in consumers' electricity consumption in line with changing electricity costs or through the encouraging factors provided by electrical distribution company [1]. One encouraging factor could be to pay consumers to use less electricity, or enable it to be set in surcharge for excessive load, even a combination of both could be suggested. In other words, demand response changes according to the behaviour of load consumption. In a conventional system, the cost for each kWh at any time of the day is constant for most consumers which is equal to the average price of the electricity; while some consumers are aware of the real electricity price. Obviously, there is no factor for encouraging consumers to reduce electricity consumption in peak load and adopting their consumption to generation, grid mode, and the electricity cost in the market [2].
Generally, the objective of demand response is to reduce the power consumption in peak demand. Peak demands depend upon two situations: (i) high power prices and (ii) low demand response reliability for reasons such as overload in distribution transformers, errors in generation units, and bad weather conditions. These factors will lead the consumers to consider demand response programmes. The distribution company could set up a contract with the consumers to supply part of the required energy. It is up to the consumers to manage their consumption conforming to the company's requirements.
In smart grid, demand response stores the received energy of renewable resources in order to cover up for the uncertainty in these resource generations. To this end, operator can reduce energy consumption instead of receiving power from the grid through renewable generation changes. This can be done in predicted values. Thus, the demand response programme will provide more options to eliminate unbalanced power.
As mentioned before, consumers do not have any incentive to reduce consumption at peak demand because the electricity costs are the same throughout the day. However, the consumers will have the incentive to reduce energy consumption at the peak load or shift them to other hours by applying thechangeable electricity cost for each hour. Overall, demand response could change electrical energy consumption then reduce the peak load of the system and transfer the consumption to off-peak load hours.

Literature review
Many researchers have been interested in the study of microgrids. As a result, the impact of generation resources and variant loads are investigated in many studies. In this paper, some of the literature is discussed briefly.
Study [3] planned to optimise smart homes energy-consumption pattern through load transfer strategy. Researchers claimed that their system has a significant impact on reducing the cost of electrical energy and peak-to-average ratio (PAR) power regarding consumer welfare and appliance management. What is presented is a day-ahead and real-time-based programme in order to manage demanded consumers' electrical load. A standard model is highlighted to balance loads in off-peak hours. Furthermore, this system was developed by dynamically programming: (i) to optimise coordinately between the current mode of the grid and the appliances; (ii) to help making the optimal decision to turn off or turn on of the appliances; and (iii) to reduce the waiting time for each of appliances. Finally, it is asserted that the system operated the demand response behaviour with the internal reliability indices (α = 0.95) in three pricing patterns: time of use, real-time pricing (RTP), and critical peak pricing.
Researchers in another article [4] proposed a home energy management system (EMS) with the aim of reducing electric energy consumption, PAR, and improvement in consumers' welfare. An optimisation hybrid bacterial harmony algorithm has been used which consists of two algorithms: Bacteria foraging algorithm and harmony search algorithm. The findings showed that it is possible to reduce the price of electric energy for consumers and increase the consumers' welfare. This is done by providing a coordinated programme which is in line with the generated electrical energy information of the grid based on the use of appliances.
The authors in article [5] intended to enhance the electricity efficiency of a residential microgrid by providing an actiondependent heuristic dynamic programming (ADHDP) method to solve the residential energy scheduling problem. Three aspects could be considered: (i) the weather-type classification was adopted to establish three types of programming models based on the solar energy features, including the prioritisation of various energy resources with the aim of reducing the losses of electrical energy transmission; (ii) electrical energy management three ADHDP plans in conformity with the grids behaviour was provided which can be updated throughout the programme performance; and (iii) Finally, the findings showed that the method reduces the costs of electricity energy consumption and has a positive effect on improving the load balancing.
In study [6], the fluctuation of renewable energy resources generation with demand response variables was considered as a critical challenge in the sustainability of energy supply resource. A microgrid with solar panels and battery energy storage was examined. Schematic-based charging was designed in order to control the energy stored in the battery to smooth out the solar panels output. Thus, a sophisticated control algorithm was adopted to combine model predictive voltage control and a model predictive power control (MPPC) for connecting the convertors. In order to ensure power balancing, a system was designed considering the intermittent modality of the solar panels and the load profile of an EMS. Furthermore, in [7], a cost-based droop control method was developed based on generation cost and the participated consumers cost in demand response programme. The results showed that the droop control method minimised the generation cost. An intelligent residential EMS (IREMS) has been proposed in article [8] for smart residential buildings. The main objective of IREMS was to minimise electricity costs while the maximum power demand was limited to various parameters such as the operation of residential loads and renewable energy resources. Moreover, a battery solution has been proposed to reduce the loss of power generated by renewable resources.
Study [9] has provided an optimal overall framework for efficient energy management and its components, including a smart home with batteries, plug-in electric vehicle, and photovoltaic. The aim of the researchers was to boost profits even if demand response required energy supply for PEV. A battery energy storage system (BESS) is also used in this model. The cost of the home BESS is analysed in this project according to different optimisation times, including the types and various modes of PEVs control, the parameters of the BESS and the electricity costs in a systematic way.
The results indicated that the implementation of the convex programming (CP) control programme in V2H and H2V modes, the houses with a BESS did not purchase electricity at peak load hours.
In study [10], a home EMS including photovoltaic panels and BESS was investigated. The following items were examined: (i) the effect of the electricity price mechanism using the time-of-use (TOU) pricing, the RTP, and the stepwise power tariff (SPT); (ii) the impact of solar panels; and (iii) the variability of solar panels in different seasons. The management plan presented in this study was also programmable in the GAMS.
Finally, in research [11], a fuel cell was examined as an energy carrier to use in off-grid mode. In this work, an energy management algorithm was utilised for alternative energy sources in smart home systems. The fuzzy control logic was developed to this purpose and simulated in MATLAB.
In study [12], the authors have presented and designed a parallel decomposition algorithm, based on the probabilistic renewable generation and load models. In this work, both PV power generation and household electrical consumption are characterised via probabilistic models. The results demonstrate that the proposed algorithm can substantially reduce the system operation cost.
In study [13], a mathematical model of an intelligent multiobjective home energy management (HEM) with the integration of renewable energy sources was presented. The main aim of the proposed model is to handle the residential load demand in a smart way to minimise both the consumer's energy bill and the system peak demand simultaneously. Also, the authors presented a cooperative game theory approach to generate the best compromise solution of the proposed multi-objective problem. The results demonstrate that the renewable energy resources with the proposed HEM model can give more benefits to consumers with minimum cash payback period.
Most of the previous studies have been conducted on just a specific issue of the microgrid, such as demand response management, the integration of renewable energy resources, and the impact of the use of battery energy storage. Hence, this study attempts to design and develop a smart EMS (SEMS) to increase the profit of a microgrid, seeking to consider all microgrid components, such as the connection capability to the power grid and to energy exchange, including the use of renewable energy resources to set up a strategy for managing home appliances separately and making use of the battery storage system in the network. The aim is to increase the profit of the microgrid by proposing a method which transfers loads to the time when the grid price is low and access to renewables is high.
The main contributions of this paper are as follows: i. Proposing a new SEMS for residential load with energy storage capability to store renewable energy and use it in times of necessity. ii. Considering a residential load management system based on the availability of renewable resources, so according to this method, the dependency of domestic customers on the grid and conventional power plants is reduced and environmental pollution is simultaneously optimised.

Paper organisation
According to the purpose, the structure of the article is as follows: the microgrid structure is introduced, then an economic model is presented for the different elements of this microgrid such as generators, storages, and loads. In order to optimise the operation of the microgrid and indicate the microgrid profit, the objective function is presented. It is worth mentioning that the PSO algorithm is used to optimise the function, as it can be seen in Fig. 1.

Proposed system model
To estimate the reliability of the proposed model, a numerical example is used for the sample microgrid, and generation scheduling for the next day was performed taking into account possible parameters, and finally the conclusions and recommendations were presented. This structure of the considered microgrid included wind and solar generators, storages, and the load that is located on the AC bus. Some of the power electrical converters which are used in the generator at the microgrid bus bars' junction are assuming the losses are zero. Moreover, the microgrid is capable of exchanging the energy in the distribution grid. The schema of the microgrid structure is demonstrated in Fig. 2. The current research presents a (SEMS) to optimise microgrid function within the electricity market.

Generators
The energy resources used in the presented microgrid consist of solar energy system (photovoltaic) and wind turbine.

Wind:
The wind turbine output in each location depends on the speed, hubs height, and the features of speed-power. Therefore, (1) is used to calculate the wind speed based on hubs height.
where h and h 1 are hubs height and reading the wind speed; v and v 1 are the wind speed at the height of hub and speed of wind reading at the h 1 height, respectively; As well as, index b depends on the climate and atmospheric phenomena. In fact, the wind speeds will be estimated at the height of the hub in order to calculate the electric power generation through wind speed in the region and using above equation which showed in Table 1 to variance phenomena. Table 1 shows the figures of index b based on different climate and environmental conditions. The output of the power of the wind turbine generator will be obtained by (2): [15,16] where P r is known as a turbine nominal power, V ci and V co are cutin and cut-out. V r is also the speed of the turbine nominal power. Moreover, A, B, and C represent the coefficients which were estimated through equation [15][16][17].
As it can be seen in Fig. 3, the curve of the wind turbine power is considered based on (2). The cost of generating one kilowatt-hour of energy by wind turbines depends on the investment costs, cost of operation, the amount of generated electrical energy in 1 year, and turbine longevity. The cost of generation per unit of electricity energy is not the same around the world. In fact, the cost of fuel in wind units is zero; however, the initial investment cost is higher (such as the turbine, connection to grid and construction operations), and constitutes about 80% of the total cost of wind unit [18].
The cost of wind unit can be divided into the initial investment cost, operating cost, and maintenance (a stable cost in per year). Considering a loan with an n-year repayment period and loan interest rate i, the annual cost of wind unit is estimated by (6): where I is the initial investment, OM wt is the cost of operation and maintenance considered a stable value per year and CRF is the capital recovery factor for n years which can be calculated via (7) [19]: Total generated energy for one wind unit throughout a year was estimated via: P is the nominal capacity of installed in kilowatt and CF is the capacity coefficient. According to the above equations, the specific cost of power generation in this system was calculated using (9).
Based on (8) and (9), the cost of wind unit generation is estimated as follows: where p w is the turbine nominal power in kilowatt, CF W is the capacity coefficient and A w ′ is calculated by (6) [20].

Solar:
The solar panels power output (Fig. 4) is achieved through (11): NP mpv (11) in which P PV is the solar panels power output in watts, p mpv is nominal power of each panels, N is the number of solar array, and G t is the intensity of solar radiation in watt per square meter (W/ m 2 ), (G t = 1000). The lack of continuity in power generation is a problem when solar panels are used. As a result, an energy storage unit is used to address the problem. Moreover, the surplus power generated by wind and solar units is stored in the battery which is injected into the grid if necessary [2]. The cost of solar unit is calculated as the wind unit model, as follow (12): While E PV is the approximate amount of total annual generated energy for solar cells. The cost of each kwh generated by these units is computed as follows: where P pv is the nominal capacity of the installed solar power plant and CF PV is the capacity coefficient that is recognised by annual operation of the panels [14].

Storage:
Considering the market price fluctuation, the storage can be charged when the energy cost is low and used when the costs are high. The storage unit can also save the energy surplus then sell it to the grid when there is a lack of generation to gain economic profit [22].

Consumers:
The proposed microgrid has two types of loads. The first one is the uncontrollable loads (Fig. 5) and second one is the controllable loads. The controlling programme that used here intended to transfer the time of use of appliances such as washing machine and dishwasher etc. and control the light loads.

Controllable loads:
The appliances that have the most consumer loads are washing and laundry appliances. They are known to have high consumption rate throughout short time between 1 and 2 h (Fig. 6). Hence, in this microgrid, the demand energy profile was adjusted in accordance with solar and wind generation, increasing the microgrid profit through controlling the time of energy consumption and transferring them to the time when there is enough generation. A control algorithm has been implemented on the device in order to coordinate the time of washing appliances consumption and solar-wind generation. In this microgrid, the demand energy profile was adjusted in order to increase the microgrid profit. According to this method, at any time period, the difference between solar and wind production and other loads calculated, if this amount is more than demand of washing appliances, the demand response will be carried out. Otherwise, the extra amount is transferred to the next time. This amount calculated by (14): where P wash_after indicates the power transmission to the next time, P wash is demand power of washing appliances in time i, P wind, i is wind power generation in time i, P PV, i is solar power generation in time i and P Load total , i is demand load of other appliances.
In order to encourage consumers for transfer these appliances to next time periods, the percentages of the price of upstream power grid (α wash ) is considered. Then, by comparing the amount of encouragement and benefits of transfer for microgrid, there will be decided that the loads should be transferred or not. The suggested microgrid model considers that the price of selling energy to the washing appliances is equal to the predicted price of the upstream energy market. Hence, when the loads be transferred to other time the consumers will be encouraged.

Lighting loads:
Another common electrical energy consumer are light loads (Fig. 7). These loads consume a lot of electrical energy especially in the early hours of the night, which leads to a peak in the load profile. Thus, electrical energy can be saved by controlling the brightness of the lights.
To implement this control method, the lighting management system (LMS) is needed.
One of the most important of applications in this method is to set the amount of light emitted from the lamps, which is determined in proportion to the natural light environment and the price of energy. It is assumed that the intensity of lighting can be changed with the price of electrical energy. In other words, the lighting load of microgrid depends on the price of the electric energy of the upstream-grid [23].

Objective function
In order to obtain an optimal operation programme, an objective function is required which would recognise the operation strategy of the microgrid. The function aims to maximise the profit (revenue minus the cost) that is eventuating to all the provisions of operation. This function is used to increase the microgrid profit, determination of the load supplying, the participation rate of generators, storage, and energy exchange.
In spite of the nature of renewable units, the on/off mode all the generated energy would be injected into the microgrid bus.
The overall structure of this objective function is as follows: Revenue t − cost t (15) In this equation, the range of t changes is considered 1-24, which indicates the time period is 24 h a day.
As it can be seen in (15), the objective function is divided into two parts: earning and cost. The microgrid earning and costs are listed in the following: i. Selling electrical energy to the regional electrical companies ii. Selling Electrical energy to emergency loads iii. Selling Electrical energy to normal loads iv. Selling Electrical energy to washing household appliances v. Selling Electrical energy to light loads The microgrid costs: i. The cost to buy energy of distribution network ii. Solar unit generation cost iii. Wind unit generator cost iv. The cost of energy saving in the battery v. The cost of paying fines to ordinary charges if they are interrupted vi. The cost of paying reward for shifting the loads in use of washing appliances According to above costs and earning, the equation of the objective function (15) in the modelling of this paper is considered by (16). {[P grid t ρ grid t + P Load, e (t)ρ Load, e t +P normal t ρ normal + P wash t ρ wash t + P light t ρ light ] −[C PV (t) + C w t + C bat P bat t +C shed P normal, curtail t + penalty wash (t)]} (16)

Constraints
P Load, e t + P normal t + P wash t + P light t + P grid t = P bat t + P wt t + P PVt t (17) In this equation, the positive/negative sign for P bat t indicates the battery charge or discharge.
where P grid is the power exchange with the distribution grid and P grid max is the maximum exchangeable power with the grid. The connection to distribution grid is mutual in this model and the installed transformer has 400 kW capacity and 90% efficiency.
In the considered microgrid, the energy purchase price of the grid is in accordance with the selling price of energy in the Iranian market. For this to be carried out, the information used was of the selling price of energy for the consumers in summer. The electrical energy price in Iran was predicted by kilowatthour for the next day which is presented in Fig. 8.

First scenario
In this scenario, there is no programme to respond to the load.
The result of the wind and solar unit generation planning, distribution grid (i.e. the positive signs indicate earnings and negative signs indicate the purchases), and the total energy balance in the microgrid over the next 24 h (next day) is presented in Fig. 9. The microgrid profit is estimated to reach $774,984.8.

Second scenario
In the second scenario, the demand response programme is simulated for the microgrid loads and the results of the simulation are presented in this section. The suggested microgrid matches certain factors by coordinating the time of the washing appliance's loads with both wind and solar generation. If consumers transfer their demand to hours except peak hours, they will be encouraged. The consumption time of this load before and after control plan implementation is shown in Fig. 10. The amount of hourly wind energy generation is also considered. As shown in Fig. 10, only the loads of time 12 are transmitted, due to the fact that the control programme does not transfer to other loads based on the amount of encouragement.

Lighting loads
In the proposed microgrid model, the brightness and the energy consumption of these loads are coordinated with the energy cost of the grid in order to control the light loads. The power consumed by the loads is calculated according to (17). The curve in Fig. 11 shows the power consumption before and after the control programme. When the control programme is implemented, the light load consumption corresponds to the electricity market price. For instance, the load consumption is reduced at peak time. Furthermore, in the proposed control programme, the lights' intensity is reduced at midnight when the traffic is considered low. Fig. 11 shows the result of this simulation.
All the demand response programmes would enter the microgrid optimised operation programme when the programme is implemented completely. The total energy balance over the next 24 h is indicated by the implementation of the plan. The profit is estimated to be $ 930,708.8. Fig. 12 represents its flowchart.
The current plan can be compared to the previous one to conclude that the amount of generation has been reduced. On this basis, this microgrid's purpose is to increase profit not supply loads, it is better for the controllable loads to be sensitive to the grid price. In this situation, on the one hand if the price of the grid is high, less power is consumed (less power is to be purchased) and power sold to the grid will increase. On the other hand, if the price of the grid is low, power purchased of the gird will increase and less power is to be sold. This situation will have benefit for microgrid too. In fact, as long as the profit from the sold power to the grid is more than supply loads, the microgrid will only act as a seller. Therefore, in order to rational justification of making the loads supplying structure and demand response programme by microgrid, free energy market is the fundamental infrastructures.

Conclusion
This paper proposed a new SEMS for residential load with energy storage capability. The renewable resources and smart battery energy storage are used in this paper to increase the profit of a microgrid. In order to optimise the operation of the proposed microgrid, various scenarios and plans were simulated and examined. The simulation shows if the control programme implementation covers renewable resources or electricity's market price, that is, if it can reduce the costs or if it can increase the operation profit of the microgrid. Furthermore, if the microgrid is in a free energy market, by considering the initial investment cost, the short-term operation of the microgrid will not be economic, which should be considered in the initial design of the microgrid. Also, for some household appliances, such as dishwashers and washing machines that consume an extensive amount of energy in a short period of time, transferring the loads to a time when the energy generation is high or purchasing energy from the grid when the price is low can be part of the solution. Applying this solution would decrease the cost of operation and would help to increase the profit. Light loads are one of the most common electrical energy consumers. Based on the suggested method, by sensitising light loads to the price fluctuations in the range of permitted lighting, the operation profit of the microgrid will increase and the consumption cost for consumers will decrease. Finally, the findings of this paper showed if the microgrid does not have the load and the main objective of operation is to increase profits, it will be achieved when the loads become sensitive to the price fluctuations. In the condition that the microgrid has the load and the main objective of the operation is to reduce the costs, controlling loads by changes in energy resources will be suitable.