A Novel Data-Energy Management Algorithm for Smart Transformers to Optimize the Total Load Demand in Smart Homes

: The increased integration of Electric Vehicles (EVs) into the distribution network can create severe issues—especially when demand response programs and time-varying electricity prices are applied, EVs tend to charge during the o ﬀ -peak time to minimize the electricity cost. Hence, another peak demand might be created, and other solutions are required. Many researchers tried to solve the problem; however, limitations exist because of the decentralized topology of the network. The system operator is not allowed to control the end-users’ load due to security and privacy issues. To overcome this situation, we propose a novel data-energy management algorithm on the transformer’s level that controls the power demand proﬁles of the householders and exchange energy between them without violating their privacy and security. Our method is compared to an existing one in the literature based on a decentralized control strategy. Simulations show that our approach has reduced the electricity cost of the end-users by 3%, increased the revenue of the system operator, and reduced techno-economic losses by 50% and 42%, respectively. Our strategy shows better performance even with a 100% penetration level of EVs on the network, in which it respects the network’s constraints and maintains the voltage within the recommended limits.


Literature Review
To mitigate the impact of the high penetration level of Electric Vehicles (EVs) on the distribution systems, advanced optimization algorithms and control strategies were developed including, but not limited, to (i) Centralized [1] (ii) Hierarchical [2], (iii) Multi-Agent [3], and (iv) Decentralized [4]. According to [5], due to privacy and security issues, the most used strategy to control the electrical appliances and devices at home is the decentralized control strategy. A home energy management system (HEMS) is deployed to control and schedule the power demand profile of the electrical devices. Internal optimization and control are required without any intervention or communication with

Contribution
To fill the gap in the literature and to overcome the existing power network topology limits, especially in the presence of EVs and RESs, we propose novel data-energy management algorithms on the Smart Transformer (ST) level to control the total load profile of each connected home. The novelty will be stated as follows: • It is the first algorithm that proposes a variable soft-constrained power profile limit for each home, in order to limit the power consumption. The limit is based on the classification of homes according to their average energy demand (from the lowest to the highest). This limit will satisfy the system operator by limiting the total power demand on the transformer, hence, reducing the techno-economic losses on the network. • This is the first algorithm that proposes decentralized demand response and incentive programs for each individual home. In another meaning, at a certain period, home 1 should not exceed 5 kW while, home 2 should not exceed 4 kW. If not, they will not benefit from the incentive programs. • This is the first algorithm that shares the unused energy between homes, which will maximize the load factor and minimize the power congestion on the network. Hence, the voltage profile is maintained within limits, and techno-economic losses are reduced.

•
Our strategy is designed to satisfy both end-users and the system operator, which will be a great advantage to be implemented. That is why it is necessary to define a new incentive program which encourages the end-users to use our strategy to minimize their electricity cost, and to maximize the profit of the system operator under certain constraints.

The Proposed Data-Energy Management Algorithm for the Smart Transformer
In this subsection, we propose a novel data-energy management algorithm on the transformer level that suggests a power soft-constraint limit for each home (HSC), in which the total power demand of all homes must respect the transformer critical power limit (e.g., 100 kVA). This limit is variable and depends on the power consumption profiles of all end-users. It allows the consumers to exchange the unused energy between them, which will increase their satisfaction while respecting the limits on the transformer. The transformer's role is similar to the chief executive officer (CEO) of a company; it collects and analyzes data, takes decisions, and gives orders and tasks to the end-users to accomplish. The end-users are considered as the head of departments. They have the complete freedom to do whatever they want to, in a condition to perform their tasks within the specified period and constraints. In this way, the ST does not intervene directly with controlling and scheduling the electrical loads of the end-users. Moreover, the energy demand data of the consumers are manipulated internally between the transformer and the users, i.e., they are not sent to the system operator; hence, the security and privacy issues are resolved, which increases their satisfaction. The system operator's role is to verify that the total load on the network respects the constraints and limits. From this place, the system operator only checks the status of the transformer and is not allowed to control the load of the consumers since the transformer can do it internally. The proposed algorithm is presented in different steps. Figure 1 shows a simplified schematic diagram of the proposed strategy. The following steps are considered: Energies 2020, 13 Step Description of the Flow Chart in Figure 1 1. ST receives data from the DSO, and the electricity retailer through the WIFI (as presented in  2. ST is assigned with a unique identification code in order to access data on the internet 3. • Active and reactive power demands of each electrical load at home are saved in the HEMS for a long period (i.e., one year); • The average apparent ( , , ) and active power ( , , consumptions are calculated as in Equation (1) for home "h" at instant " " and day "d", in which they are used to calculate the Home Soft-Constraint (HSC) limit as in Equations (5) and (11). HSC should be respected in order to guarantee that the total load on the ST will not violate its critical power limits and constraints; • Equation (2) calculates the average energy demand for a day; • The above mentioned data are received by the ST via local wireless communication between the ST and homes (e.g., WIFI, Long Range Wide-Area Network (LoRaWAN)). We Step Description of the Flow Chart in Figure 1 1. ST receives data from the DSO, and the electricity retailer through the WIFI (as presented in Figure 2). Data are stored on a cloud-based platform using the most recent cybersecurity software (e.g., Global System for Mobile Communications (GSM) or Ethernet with the state-of-the-art cybersecurity). Data can be categorized as follows: • Householder's data: Number of homes on the same smart transformer; Circuit breaker rates of each home; Number of phases for each home (e.g., single or three phases).
• Cables' data between the transformer and homes: Phase number, type, length, resistivity, inductivity, size.
• Electricity Tariff: fixed price, progressive price, time-of-use, dynamic, real-time price, etc.; • Demand response and incentive programs; • Code for the smart transformer.

2.
ST is assigned with a unique identification code in order to access data on the internet 3.
• Active and reactive power demands of each electrical load at home are saved in the HEMS for a long period (i.e., one year); • The average apparent (S Load h,t,d ) and active power (P Load h,t,d ) consumptions are calculated as in Equation (1) for home "h" at instant "t" and day "d", in which they are used to calculate the Home Soft-Constraint (HSC) limit as in Equations (5) and (11). HSC should be respected in order to guarantee that the total load on the ST will not violate its critical power limits and constraints; • Equation (2) calculates the average energy demand for a day; • The above mentioned data are received by the ST via local wireless communication between the ST and homes (e.g., WIFI, Long Range Wide-Area Network (LoRaWAN)). We are not using internet for security and privacy reasons. In this way, we also avoid any connection problems on the internet which might fail.

a.
Sensors in the ST collect weather and local data: • Weather data, such as solar irradiance, wind speed, condition and alert, ambient temperature, humidity.

•
ST internal data (in case it is a coil-based transformer): Top-oil temperature, winding current and voltage, and oil and moisture level.
ST calculates the transformer's critical power limit (S TCL t ) as it is presented in [22].
Energies 2020, 13, x FOR PEER REVIEW 6 of 22 are not using internet for security and privacy reasons. In this way, we also avoid any connection problems on the internet which might fail.  (3) calculates the total homes aggregated circuit breaker rating ( ), where is the circuit breaker rate at home "ℎ". For example, 5 kVA, 7 kVA, 9 kVA,… 5 7 9 ⋯ e. Equation (4) calculates the soft constraint per unit ( ) at the home level. is in per unit and its has the same value for all homes on the same ST. Equation (5) calculates the softconstraint apparent power ( , ) of each home. , can be different for each home; it is the result of multiplying by . If each home respects its soft-constraint limit ( , ), the transformer's critical power limit will also be respected). In case the power demands at homes overpass their , , homes are not affected; however, the total load on the transformer may exceed its capacity.
is the energy soft-constraint limit at home in Equation (6 (3) calculates the total homes aggregated circuit breaker rating ( ), where is the circuit breaker rate at home "ℎ". For example, 5 kVA, 7 kVA, 9 kVA,… 5 7 9 ⋯ e. Equation (4) calculates the soft constraint per unit ( ) at the home level. is in per unit and its has the same value for all homes on the same ST. Equation (5) calculates the softconstraint apparent power ( , ) of each home. , can be different for each home; it is the result of multiplying by . If each home respects its soft-constraint limit ( , ), the transformer's critical power limit will also be respected). In case the power demands at homes overpass their , , homes are not affected; however, the total load on the transformer may exceed its capacity.
is the energy soft-constraint limit at home in Equation (6 d. Equation (3) calculates the total homes aggregated circuit breaker rating (S CB Total ), where S CB h is the circuit breaker rate at home "h". For example, S CB 1 = 5 kVA, S CB 2 = 7 kVA, S CB 3 = 9 kVA, . . . S CB Total = 5 + 7 + 9 + . . . e. Equation (4) calculates the soft constraint per unit (α t ) at the home level. α t is in per unit and its has the same value for all homes on the same ST. Equation (5) calculates the soft-constraint apparent power (S HSC h,t ) of each home. S HSC h,t can be different for each home; it is the result of multiplying α t by S CB h . If each home respects its soft-constraint limit (S HSC h,t ), the transformer's critical power limit will also be respected). In case the power demands at homes overpass their S HSC h,t , homes are not affected; however, the total load on the transformer may exceed its capacity. E HSC h is the energy soft-constraint limit at home in Equation (6). Example: consider four homes on an ST with the following data, we have to calculate α t and S HSC h,t . may decrease or increase depending on the home's energy needs. Hence, calculating the optimal power soft-constraint limit for each home is necessary and is carried out by iteration considering the average energy demand. For this reason, , is replaced by , as presented in Equation (8). The iteration number is represented by . Starting from ( 1), , is iterated for all homes for ∈ 1, . In Equation (9), , is the ratio of the power soft constraint at home to the transformer's critical power limit. It is used for homes (h > 1), and it is used to calculate , for homes ℎ 2 → . is a correction factor that is used to decrease or increase the power limit , at home h = 1 depending on the actual energy demand. , is a factor that adjusts the HSC at home 1 in a way that , ≲ . g. The first iterations of , and , are sent to the home "h = 1". These values are used as a constraint in the optimization model and algorithm. , for all homes must be respected to respect the transformer's power limit.
Energies 2020, 13, x FOR PEER REVIEW 7 of 22 f. Energy demand may vary significantly from home to home for a certain period. Hence, , may decrease or increase depending on the home's energy needs. Hence, calculating the optimal power soft-constraint limit for each home is necessary and is carried out by iteration considering the average energy demand. For this reason, , is replaced by , as presented in Equation (8). The iteration number is represented by . Starting from ( 1), , is iterated for all homes for ∈ 1, . In Equation (9), , is the ratio of the power soft constraint at home to the transformer's critical power limit. It is used for homes (h > 1), and it is used to calculate , for homes ℎ 2 → . is a correction factor that is used to decrease or increase the power limit , at home h = 1 depending on the actual energy demand. , is a factor that adjusts the HSC at home 1 in a way that , ≲ . g. The first iterations of , and , are sent to the home "h = 1". These values are used as a constraint in the optimization model and algorithm. , for all homes must be respected to respect the transformer's power limit.

f.
Energy demand may vary significantly from home to home for a certain period. Hence, S HSC h,t may decrease or increase depending on the home's energy needs. Hence, calculating the optimal power soft-constraint limit for each home is necessary and is carried out by iteration considering the average energy demand. For this reason, S HSC h,t is replaced by S HSC(i) h,t as presented in Equation (8). The iteration number is represented by i. Starting from h,t is the ratio of the power soft constraint at home to the transformer's critical power limit. It is used for homes (h > 1), and it is used to calculate S HSC(i) h,t for homes h = 2 → H . c h=1 is a correction factor that is used to decrease or increase the power limit S  for all homes must be respected to respect the transformer's power limit. homes (h > 1), and it is used to calculate , for homes ℎ 2 → . is a correction factor that is used to decrease or increase the power limit , at home h = 1 depending on the actual energy demand. , is a factor that adjusts the HSC at home 1 in a way that , ≲ . g. The first iterations of , and , are sent to the home "h = 1". These values are used as a constraint in the optimization model and algorithm. , for all homes must be respected to respect the transformer's power limit.

a.
, and , are received by the Local Controller (LC) of home (h = 1). b. Electrical loads at home "h = 1" are scheduled based on the optimal solution found by the LC. The algorithm for HEMS is set by a party such as end-user, DSO, or a specialized company, etc. Electrical loads at home "h = 1" are scheduled based on the optimal solution found by the LC. The algorithm for HEMS is set by a party such as end-user, DSO, or a specialized company, etc.
Energies 2020, 13, x FOR PEER REVIEW 8 of 22 6. a. After the optimization, ST receives , and , from the LC, and calculates the unused energy in home 1. The unused energy is transmitted to other homes in order to use it and increase their soft-constraint power limit, which will help them to minimize their electricity cost and increase their demand if needed. The unused power and energy values are mentioned in the orange area of home 1 in the following figure: b. After receiving the information, ST increases by 1 ( 1), e.g., 2; this means that a second iteration starts to calculate the soft-power constraints of all homes. c. ℎ is increased by 1 (ℎ ℎ 1). For example, with ℎ 2, the calculation of the , and , starts from the second home to the last one. d. In Equations (10) and (11), , and , are recalculated for homes with ℎ 1.
Compare ℎ to for the second time. If ℎ , it means that the calculation of , , , and the optimization process has been completed for all homes. If not, data of the , and , are sent to home ℎ (e.g., h = 2) through steps 7, 9, 11, etc.

a.
After the optimization, ST receives P Load h,t and S Load h,t from the LC, and calculates the unused energy in home 1. The unused energy is transmitted to other homes in order to use it and increase their soft-constraint power limit, which will help them to minimize their electricity cost and increase their demand if needed. The unused power and energy values are mentioned in the orange area of home 1 in the following figure: Energies 2020, 13, x FOR PEER REVIEW 8 of 22 6. a. After the optimization, ST receives , and , from the LC, and calculates the unused energy in home 1. The unused energy is transmitted to other homes in order to use it and increase their soft-constraint power limit, which will help them to minimize their electricity cost and increase their demand if needed. The unused power and energy values are mentioned in the orange area of home 1 in the following figure: b. After receiving the information, ST increases by 1 ( 1), e.g., 2; this means that a second iteration starts to calculate the soft-power constraints of all homes. c. ℎ is increased by 1 (ℎ ℎ 1). For example, with ℎ 2, the calculation of the , and , starts from the second home to the last one. d. In Equations (10) and (11), , and , are recalculated for homes with ℎ 1.
Compare ℎ to for the second time. If ℎ , it means that the calculation of , , , and the optimization process has been completed for all homes. If not, data of the , and , are sent to home ℎ (e.g., h = 2) through steps 7, 9, 11, etc. b.
After receiving the information, ST increases i by 1 (i = i + 1), e.g., i = 2; this means that a second iteration starts to calculate the soft-power constraints of all homes. c.
h is increased by 1 (h = h + 1). For example, with h = 2, the calculation of the P Load h,t and S Load h,t starts from the second home to the last one. b. After receiving the information, ST increases by 1 ( 1), e.g., 2; this means that a second iteration starts to calculate the soft-power constraints of all homes. c. ℎ is increased by 1 (ℎ ℎ 1). For example, with ℎ 2, the calculation of the , and , starts from the second home to the last one. d. In Equations (10) and (11), , and , are recalculated for homes with ℎ 1.
Compare ℎ to for the second time. If ℎ , it means that the calculation of , , , and the optimization process has been completed for all homes. If not, data of the , and , are sent to home ℎ (e.g., h = 2) through steps 7, 9, 11, etc.
b. Optimize and schedule the controlled elements at home "h" as in step 5.b. b.
Optimize and schedule the controlled elements at home "h" as in step 5.b.
Energies 2020, 13, x FOR PEER REVIEW 9 of 22 8.  Repeat the steps until h=H for the second comparison in step 6.f.  The final value of , and are used as a soft-constraint at homes.
• Repeat the steps until h=H for the second comparison in step 6.f.

•
The final value of S HSC h,t and E HSC h are used as a soft-constraint at homes.

Assumptions for the Study
To validate our novel approach, a case study is chosen in Quebec, Canada. Generally, in Quebec, a transformer supplies ten homes with 200 A, single-phase (1−φ) circuit breaker for each home. However, the proposed strategy could work no matter the number of homes, their circuit breaker ratings, or their load demands. The following data are provided by Hydro-Quebec Utility, reference [4], and other references for simulation purposes:


The baseload power and water consumption profiles at homes;  Real weather data such as solar irradiance and ambient temperature;  Real-time pricing is taken from reference [4] and presented in Figure 3;  Transformer data: 80 kVA, 1−φ, 60 Hz, 11 kV/120 V;  Optimized elements at home are similar to reference [4]: 2 EVs, one BSS, one electric water heater, and one Photovoltaic (PV) system.

Assumptions for the Study
To validate our novel approach, a case study is chosen in Quebec, Canada. Generally, in Quebec, a transformer supplies ten homes with 200 A, single-phase (1 − ϕ) circuit breaker for each home. However, the proposed strategy could work no matter the number of homes, their circuit breaker ratings, or their load demands. The following data are provided by Hydro-Quebec Utility, reference [4], and other references for simulation purposes: • The baseload power and water consumption profiles at homes; • Real weather data such as solar irradiance and ambient temperature; • Real-time pricing is taken from reference [4] and presented in Figure 3; • Transformer data: 80 kVA, 1 − ϕ, 60 Hz, 11 kV/120 V; • Optimized elements at home are similar to reference [4]: 2 EVs, one BSS, one electric water heater, and one Photovoltaic (PV) system.


The baseload power and water consumption profiles at homes;  Real weather data such as solar irradiance and ambient temperature;  Real-time pricing is taken from reference [4] and presented in Figure 3;  Transformer data: 80 kVA, 1−φ, 60 Hz, 11 kV/120 V;  Optimized elements at home are similar to reference [4]: 2 EVs, one BSS, one electric water heater, and one Photovoltaic (PV) system. Our study is compared to reference [4]. Therefore, the same energy management system and optimization model are chosen for both studies. However, in [4] a conventional transformer is used, and energy management on the transformer level is not considered. Therefore, we carried out some modifications to the algorithm in which we added the power ( , ) and energy ( ) soft-constraint limits at home, and we developed a new incentive program as presented in Table 1. Our study is compared to reference [4]. Therefore, the same energy management system and optimization model are chosen for both studies. However, in [4] a conventional transformer is used, and energy management on the transformer level is not considered. Therefore, we carried out some modifications to the algorithm in which we added the power (P HSC h,t ) and energy (E HSC h ) soft-constraint limits at home, and we developed a new incentive program as presented in Table 1. In Table 1, the homeowner gains 2.9 $/day and 2 $/day if the power and energy limits are respected, respectively. However, no additional tariffs are applicable if he does not respect these limits. This incentive program does not penalize users if they exceed the power and energy limits. However, each homeowner will save an amount of 1788.5 $/year (4.9 $/day × 365 day/year) if he does not exceed the limit during a complete year. This may cost the DSO lots of money for all end-users. However, DSO saves much more by reducing the techno-economic losses on the network. In this way, a win-win situation is settled between the householders and the DSO. The values of π P and π E are optimally chosen in a way to minimize the compensation of the DSO and increase the benefit of the end-users at the same time.
For validation purposes, our proposed method M2 is compared to the one (M1) in reference [4]. Mixed-Integer Nonlinear Programming (MINLP) is chosen to solve the optimization model for both methods in MATLAB R2016b. For the implementation of our strategy on a larger network, IEEE 123 node test feeder is chosen and solved in OpenDSS. Three different scenarios are considered: • Scenario 1: From the perspective of the customers using method 1, which is in favor of the consumers and not the system operator. The main goal of this scenario is to minimize the electricity cost at homes without considering the constraints on the network as in [4]. • Scenario 2: From the perspective of the system operator using our proposed method 2 without considering our proposed incentive program. This method is called M2woIP (Method 2 without Incentive Program), which is in favor of the system operator and not the customer. In this scenario, the system operator gets the most benefits since it minimizes the techno-economic losses on the network while maximizing its revenue from the electricity bills. • Scenario 3: In this scenario, we tried to satisfy both end-users and the system operator, in which the end-user pays less than scenario 2 (sometimes even less than scenario 1), and at the same time, the system operator increases its revenue compared to scenario 1, which is due to the minimization of techno-economic losses on the transformer and the network. This scenario is called M2wIP (Method 2 with Incentive Program), in which we implement our proposed incentive program that encourages the users to adopt it and not to be fined in case they do not want to.
Energies 2020, 13, 4984 12 of 22 The above-mentioned scenarios are important and show how much the proposed method can encourage the system operator and the clients to adopt such strategies to increase their satisfaction, reduce their losses, and increase their revenue. In the following section, it becomes much clearer why we choose to study three different scenarios and which one is considered the best to be implemented.

Results and Discussions
In this section, both methods (M1 and M2) are studied, and techno-economic comparison is performed at home, on the transformer and the distribution network as presented in Table 2.

Impact on Power Consumption at Homes
This subsection aims at studying the impact of both methods on the total power consumption at homes. Two typical homes are considered in Figures 4 and 5, in which Figure 4 represents homes 1, 2, 3, 4, 5, 7, 8, and 9 when the power consumption, using our method (M2), respects the soft-constraint limit (HSC), while Figure 5 represents homes 6 and 10 when M2 has slightly exceeded the soft-constraint limit. The case is different for M1, in which the power consumption using M1 at all homes has exceeded the HSC. In Figure 4, home 4 is studied. The red curve presents the power profile of the baseload, which cannot be optimized or controlled. For the case of M1 (blue curve), the power demand at home highly exceeds the HSC during low electricity price periods (between 21:00 and 09:00 as in Figure 3) for about 2.5 times (at 05:00 in Figure 4), which is considered very high. On the contrary, in periods when the electricity price is high, the power consumption appears negative (blue curve, between hours 15:00 and 21:00, and 09:00 and15:00), because the algorithm tries to minimize the electricity cost by injecting power to the grid from the EVs and the BSS.

Impact on Power Consumption at Homes
This subsection aims at studying the impact of both methods on the total power consumption at homes. Two typical homes are considered in Figures 4 and 5, in which Figure 4 represents homes 1, 2, 3, 4, 5, 7, 8, and 9 when the power consumption, using our method (M2), respects the soft-constraint limit (HSC), while Figure 5 represents homes 6 and 10 when M2 has slightly exceeded the softconstraint limit. The case is different for M1, in which the power consumption using M1 at all homes has exceeded the HSC. In Figure 4, home 4 is studied. The red curve presents the power profile of the baseload, which cannot be optimized or controlled. For the case of M1 (blue curve), the power demand at home highly exceeds the HSC during low electricity price periods (between 21:00 and 09:00 as in Figure 3) for about 2.5 times (at 05:00 in Figure 4), which is considered very high. On the contrary, in periods when the electricity price is high, the power consumption appears negative (blue curve, between hours 15:00 and 21:00, and 09:00 and15:00), because the algorithm tries to minimize the electricity cost by injecting power to the grid from the EVs and the BSS.   On the other hand, for our method M2 (black curve), the HSC limit is respected by the power demand at home, and the charging period of the EVs might be extended, and could even charge during high electricity price due to the limit imposed by the HSC. Consequently, M2 has a higher electricity cost compared to M1, as presented in Figure 6 (blue columns compared to red columns).  On the other hand, for our method M2 (black curve), the HSC limit is respected by the power demand at home, and the charging period of the EVs might be extended, and could even charge during high electricity price due to the limit imposed by the HSC. Consequently, M2 has a higher electricity cost compared to M1, as presented in Figure 6 (blue columns compared to red columns).   Table 1).

Economic Impact on the Electricity Cost at Homes
M1 shows better results compared to M2woIP, which is very logical since M1 tries to minimize the electricity cost at home without considering the constraint HSC. M2woIP is perfect for the system operator and not for the end-user since his electricity cost at home becomes higher with the same energy consumption as in M1. Therefore, to increase the satisfaction factor of the householders, M2wIP is considered, and it gives better results than M2woIP, and sometimes better than M1, as can be seen for homes 1, 2, 3, 4, 5, and 9. The benefits of using M2wIP are stated as follows:  2 $/day is deduced from the electricity bill of the householder if he respects the energy softconstraint limit at home ( );  2.9 $/day is deduced if the householder respects the power soft-constraint limit at home ( , );  4.9 $/day is deduced in case the householder is able to respect both energy and power softconstraint limits;  0 $/day is deduced in case the householder could not respect any limits (refer to Table 1).
In conclusion, M2wIP encourages the householders to adopt our strategy in order to reduce their electricity bill (sometimes even better than M1), while maintaining the stability of the network and protecting the transformers from overheating.   Table 1).

Economic Impact on the Electricity Cost at Homes
M1 shows better results compared to M2woIP, which is very logical since M1 tries to minimize the electricity cost at home without considering the constraint HSC. M2woIP is perfect for the system operator and not for the end-user since his electricity cost at home becomes higher with the same energy consumption as in M1. Therefore, to increase the satisfaction factor of the householders, M2wIP is considered, and it gives better results than M2woIP, and sometimes better than M1, as can be seen for homes 1, 2, 3, 4, 5, and 9. The benefits of using M2wIP are stated as follows: 1.
2 $/day is deduced from the electricity bill of the householder if he respects the energy soft-constraint limit at home (E HSC h ); 2.
2.9 $/day is deduced if the householder respects the power soft-constraint limit at home (P HSC h,t ); 3.
4.9 $/day is deduced in case the householder is able to respect both energy and power soft-constraint limits; 4. 0 $/day is deduced in case the householder could not respect any limits (refer to Table 1).
In conclusion, M2wIP encourages the householders to adopt our strategy in order to reduce their electricity bill (sometimes even better than M1), while maintaining the stability of the network and protecting the transformers from overheating. . The presence of two EVs, one BSS, and one EWH in each home puts lots of stress on the transformer. The total number of EVs is 20 for ten homes. Therefore, it is obvious for M1 (red curve) to exceed the critical power limit of the transformer since it does not consider our proposed power soft-constraint limit at homes. However, our method, M2, has increased the load factor and almost flattens the profile. Hence, M2 mitigates the impact on the transformer, reducing its loss of life. It also reduces the losses, and the voltage drops, as in Figure 8.   Please note that since some protection devices are used (such as circuit breakers and fuses), the mentioned peak demand for M1 on the transformer in Figure 7 might be lower. These devices will protect the transformer from very high overloading. However, protection devices can be activated, and circuit breakers might trip and leave the householders without electricity, and even blackouts on the network may happen. In this study, both methods, M1 and M2, are compared without considering the existence of the protection devices on the transformer in a goal to see their impact on the network without any interventions. Although, notably, if protection devices are activated, M1 risks reducing the lifetime of the transformer and causing brownout.

Economic Impact on the Distribution Transformer
After studying the technical impact, it is necessary to study the economic impact of both methods on the transformer and the network. Some definitions are necessary to be introduced at the beginning. In this paper, the Loss of Life during a day ( ) in Equation (12) is defined as the reduced time from the transformer's lifetime during one day of operation in the presence of an electrical burden.
is expressed by number of days. For example, 3 means that one day of operation for a certain power demand profile is equivalent to 3 days of operations at the transformer full nameplate rating. Where % is the percent loss of life of the transformer [23], is the transformer lifetime provided by the manufacturer in hours (e.g., 180,000 hours 20.55 years) [23]. Sometimes, because of very high-power consumption during a day, the transformer may lose   Please note that since some protection devices are used (such as circuit breakers and fuses), the mentioned peak demand for M1 on the transformer in Figure 7 might be lower. These devices will protect the transformer from very high overloading. However, protection devices can be activated, and circuit breakers might trip and leave the householders without electricity, and even blackouts on the network may happen. In this study, both methods, M1 and M2, are compared without considering the existence of the protection devices on the transformer in a goal to see their impact on the network without any interventions. Although, notably, if protection devices are activated, M1 risks reducing the lifetime of the transformer and causing brownout.

Economic Impact on the Distribution Transformer
After studying the technical impact, it is necessary to study the economic impact of both methods on the transformer and the network. Some definitions are necessary to be introduced at the beginning. In this paper, the Loss of Life during a day ( ) in Equation (12) is defined as the reduced time from the transformer's lifetime during one day of operation in the presence of an electrical burden.
is expressed by number of days. For example, 3 means that one day of operation for a certain power demand profile is equivalent to 3 days of operations at the transformer full nameplate rating. Where % is the percent loss of life of the transformer [23], is the transformer lifetime provided by the manufacturer in hours (e.g., 180,000 hours 20.55 years) [23]. Sometimes, because of very high-power consumption during a day, the transformer may lose Please note that since some protection devices are used (such as circuit breakers and fuses), the mentioned peak demand for M1 on the transformer in Figure 7 might be lower. These devices will protect the transformer from very high overloading. However, protection devices can be activated, and circuit breakers might trip and leave the householders without electricity, and even blackouts on the network may happen. In this study, both methods, M1 and M2, are compared without considering the existence of the protection devices on the transformer in a goal to see their impact on the network without any interventions. Although, notably, if protection devices are activated, M1 risks reducing the lifetime of the transformer and causing brownout.

Economic Impact on the Distribution Transformer
After studying the technical impact, it is necessary to study the economic impact of both methods on the transformer and the network. Some definitions are necessary to be introduced at the beginning. In this paper, the Loss of Life during a day (LOL Day ) in Equation (12) is defined as the reduced time from the transformer's lifetime during one day of operation in the presence of an electrical burden. LOL Day is expressed by number of days. For example, LOL Day = 3 days means that one day of operation for a certain power demand profile is equivalent to 3 days of operations at the transformer full nameplate rating. Where LOL % is the percent loss of life of the transformer [23], L N is the transformer lifetime provided by the manufacturer in hours (e.g., L N = 180, 000 h ≈ 20.55 years) [23]. Sometimes, because of very high-power consumption during a day, the transformer may lose its total lifetime within one day of operation. Hence, the LOL per day cannot exceed its total lifetime. Therefore, it is necessary to limit its LOL to the maximum life expectancy of the transformer L N /24. For this purpose, the minimum between the percent loss of life per day and the total lifetime of the transformer is considered in order to guarantee the real values of the LOL per day.
In Equation (13), the transformer's Remaining Lifetime (RT DT ) is defined as the period in which the transformer can survive if the same power demand profile is applied every day. E.g., RT DT = 6000 days means that the transformer can survive 6000 days if it the same power demand profile is applied every day. Table 3 presents the results of the Loss of Life per day, the transformer's remaining lifetime, and its benchmark depreciation cost per day. Regarding the baseload, the LOL per day is equal to 0.25, which is considered below the reference value "1". It means that one day of operation at the baseload power profile is equal to 0.25 days of operation at the transformer's full power capacity. Therefore, the remaining lifetime of the transformer is increased to 80.95 years (instead of 20.55 years), and the depreciation cost shows a negative value, which means that the DSO is saving 0.6 $/day because of the low power demand. However, the case is different for M1 and M2. As M1 has created a high peak demand during the day for a long period, the LOL per day is equal to the transformer lifetime 20.55 years (or 7500 days). In another meaning, the transformer lasts only for one day and ceases to function. Its benchmark depreciation cost is equal to the transformer's cost (6000 $). Therefore, the DSO should change the transformer after one day of operation, which will cost millions and even billions of dollars for a large network. On the contrary, M2 shows a better performance, in which the LOL per day is reduced to 1.81 days for the same energy demand during a day (instead of 7500 for the case of M1). Therefore, the remaining lifetime of the transformer is increased to 11.35 years, and the benchmark depreciation cost becomes equal to 0.65 $/day. * The Benchmark Depreciation Cost (BDC) means how much the system operator is losing from the value of its transformers per day. (In this paper, we consider that the cost of the considered DT is 6000 $). A value BDC = 0 means that the transformer is not depreciating, a value greater than zero (BDC = 2) means that the system operator is losing about 2 $/day of the depreciation cost of the transformer due to the peak demand. Figures 9 and 10 show the impact of both methods on the total energy losses and their cost on the DT and at homes during a day, respectively. M1 has the highest energy losses, while M2 shows better performance and has reduced the energy losses up to 71.4% (for home 4) and their cost by 69.2% (for home 6). Moreover, M2 has reduced the cost even below that of the baseload for homes 4, 6, and 10, which is considered a remarkable improvement. The reduction in energy losses increases the saving of the DSO since it is not paid by the end-users.

Technical Impact on the Network
In this subsection, the impact of both methods on a large distribution network is considered and studied. Voltage drop, power losses, and their cost are calculated for each point of the distribution network. To do so, some assumptions are necessary to be considered: 1-OpenDSS is chosen as software to solve the power flow on the distribution network; 2-Two particular hours are studied as in Figure 11, 06:00 and 13:00, in which the power demands using M1 attain their maximum and minimum values during a day, respectively; 3-IEEE 123-Node Test Feeder is chosen as a distribution network in OpenDSS ( Figure 12); 4-The distribution network has 123 nodes in which only 85 nodes (black nodes in Figure 12) have loads; 5-The black nodes in Figure 12 represent the nodes in which homes with only baseloads are supplied, while the black nodes with red circles represent the nodes in which homes with baseloads and the optimized elements (PV, EWH, BSS, and 2 EVs) are supplied; 6-Two different penetration levels (43% and 100%) of nodes with smart homes are considered.

Technical Impact on the Network
In this subsection, the impact of both methods on a large distribution network is considered and studied. Voltage drop, power losses, and their cost are calculated for each point of the distribution network. To do so, some assumptions are necessary to be considered: 1-OpenDSS is chosen as software to solve the power flow on the distribution network; 2-Two particular hours are studied as in Figure 11, 06:00 and 13:00, in which the power demands using M1 attain their maximum and minimum values during a day, respectively; 3-IEEE 123-Node Test Feeder is chosen as a distribution network in OpenDSS ( Figure 12); 4-The distribution network has 123 nodes in which only 85 nodes (black nodes in Figure 12) have loads; 5-The black nodes in Figure 12 represent the nodes in which homes with only baseloads are supplied, while the black nodes with red circles represent the nodes in which homes with baseloads and the optimized elements (PV, EWH, BSS, and 2 EVs) are supplied; 6-Two different penetration levels (43% and 100%) of nodes with smart homes are considered.

Technical Impact on the Network
In this subsection, the impact of both methods on a large distribution network is considered and studied. Voltage drop, power losses, and their cost are calculated for each point of the distribution network. To do so, some assumptions are necessary to be considered: 1-OpenDSS is chosen as software to solve the power flow on the distribution network; 2-Two particular hours are studied as in Figure 11, 06:00 and 13:00, in which the power demands using M1 attain their maximum and minimum values during a day, respectively; 3-IEEE 123-Node Test Feeder is chosen as a distribution network in OpenDSS ( Figure 12); 4-The distribution network has 123 nodes in which only 85 nodes (black nodes in Figure 12) have loads; 5-The black nodes in Figure 12 represent the nodes in which homes with only baseloads are supplied, while the black nodes with red circles represent the nodes in which homes with baseloads and the optimized elements (PV, EWH, BSS, and 2 EVs) are supplied; 6-Two different penetration levels (43% and 100%) of nodes with smart homes are considered. Energies 2020, 13, x FOR PEER REVIEW 17 of 22  Figure 13, it is obvious that even a penetration level of 43% can increase the voltage drop on the network for M1, while M2 shows better results even for a penetration level of 100%, as in Figure 14. For the case of M1, most of the nodes on the network faced severe voltage drops below the recommended limit (0.95 p.u.), especially for the phase "a" (black curve). It can be concluded that M2 has improved the voltage stability on the network, even with a very high penetration of EVs.
In Figures 15 and 16, different penetration levels are studied at time 13:00 where the power demands using M1 have the lowest negative values (a negative value indicates a reverse power flow from homes to the grid). Results show that a high reverse power flow raises the voltage on the network above the limit (1.05 p.u.) on many nodes, which may put the network at risk. On the other hand, M2 shows better results in which a smaller number of nodes is above the voltage limit, even with a 100% penetration level of EVs. Figure 17 presents the line losses on the network for both methods. M2 is better at time 06:00 (Figure 17a), in which line losses are reduced by at least 72% (43% penetration level of EVs) and by a maximum of 80.6% (for 100% penetration level of EVs). However, at time 13:00 (Figure 17b), M1 is better since all homes have lower power demands. A 100% penetration level of EVs using M1 ( Figure  17b) shows that line losses become higher, which is caused by a reverse power flow that has increased quadratically the losses on the lines.  13:00) are studied. In Figure 13, it is obvious that even a penetration level of 43% can increase the voltage drop on the network for M1, while M2 shows better results even for a penetration level of 100%, as in Figure 14. For the case of M1, most of the nodes on the network faced severe voltage drops below the recommended limit (0.95 p.u.), especially for the phase "a" (black curve). It can be concluded that M2 has improved the voltage stability on the network, even with a very high penetration of EVs.
In Figures 15 and 16, different penetration levels are studied at time 13:00 where the power demands using M1 have the lowest negative values (a negative value indicates a reverse power flow from homes to the grid). Results show that a high reverse power flow raises the voltage on the network above the limit (1.05 p.u.) on many nodes, which may put the network at risk. On the other hand, M2 shows better results in which a smaller number of nodes is above the voltage limit, even with a 100% penetration level of EVs. Figure 17 presents the line losses on the network for both methods. M2 is better at time 06:00 (Figure 17a), in which line losses are reduced by at least 72% (43% penetration level of EVs) and by a maximum of 80.6% (for 100% penetration level of EVs). However, at time 13:00 (Figure 17b), M1 is better since all homes have lower power demands. A 100% penetration level of EVs using M1 ( Figure  17b) shows that line losses become higher, which is caused by a reverse power flow that has increased quadratically the losses on the lines.   Feeder. Different penetration levels of smart homes (43% and 100%) at different times (06:00 and 13:00) are studied. In Figure 13, it is obvious that even a penetration level of 43% can increase the voltage drop on the network for M1, while M2 shows better results even for a penetration level of 100%, as in Figure 14. For the case of M1, most of the nodes on the network faced severe voltage drops below the recommended limit (0.95 p.u.), especially for the phase "a" (black curve). It can be concluded that M2 has improved the voltage stability on the network, even with a very high penetration of EVs.      In Figures 15 and 16, different penetration levels are studied at time 13:00 where the power demands using M1 have the lowest negative values (a negative value indicates a reverse power flow from homes to the grid). Results show that a high reverse power flow raises the voltage on the network above the limit (1.05 p.u.) on many nodes, which may put the network at risk. On the other hand, M2 shows better results in which a smaller number of nodes is above the voltage limit, even with a 100% penetration level of EVs. Figure 17 presents the line losses on the network for both methods. M2 is better at time 06:00 (Figure 17a), in which line losses are reduced by at least 72% (43% penetration level of EVs) and by a maximum of 80.6% (for 100% penetration level of EVs). However, at time 13:00 (Figure 17b), M1 is better since all homes have lower power demands. A 100% penetration level of EVs using M1 (Figure 17b) shows that line losses become higher, which is caused by a reverse power flow that has increased quadratically the losses on the lines. To conclude the study, Table 4 presents the income and the cost from the viewpoint of the DSO for a penetration level of 43% (43% of nodes supply smart homes with the optimized elements). For M1, the DSO is collecting 5134.9 $/day from the householders. However, there are high losses on the transformers (−449.5 $/day), lines (−807.1 $/day), and the depreciation cost of the transformers (−294,000 $/day), which is considered the main problem of M1. In total, the DSO is losing (−29,121.7 $/day). The case is different for M2, in which the DSO always has positive revenue. M2 without the incentive program (M2woIP) increases the revenue of the DSO (5781.5 $/day), however, the housholders are not satisfied because they pay more than M1 for consuming the same energy. While for M2 with incentive program (M2wIP), householders pay less compared to M1 and M2woIP. Hence, their satisfaction is increased, but the DSO is reducing its income to 4321.4 $/day (instead of 5781.5 $/day) compared to M2woIP, but its revenue is much better than M1. From this place, M2wIP is recommended to be used because it satisfies both end-users and the DSO for its advantages in reducing the techno-economic losses on the network and minimizing the electricity cost of the endusers. Table 5 presents a comparison between M1 and M2 from the viewpoints of the householders and the DSO. In general, M2wIP is better than M1 in many aspects. To conclude the study, Table 4 presents the income and the cost from the viewpoint of the DSO for a penetration level of 43% (43% of nodes supply smart homes with the optimized elements). For M1, the DSO is collecting 5134.9 $/day from the householders. However, there are high losses on the transformers (−449.5 $/day), lines (−807.1 $/day), and the depreciation cost of the transformers (−294,000 $/day), which is considered the main problem of M1. In total, the DSO is losing (−29,121.7 $/day). The case is different for M2, in which the DSO always has positive revenue. M2 without the incentive program (M2woIP) increases the revenue of the DSO (5781.5 $/day), however, the housholders are not satisfied because they pay more than M1 for consuming the same energy. While for M2 with incentive program (M2wIP), householders pay less compared to M1 and M2woIP. Hence, their satisfaction is increased, but the DSO is reducing its income to 4321.4 $/day (instead of 5781.5 $/day) compared to M2woIP, but its revenue is much better than M1. From this place, M2wIP is recommended to be used because it satisfies both end-users and the DSO for its advantages in reducing the techno-economic losses on the network and minimizing the electricity cost of the end-users. Table 5 presents a comparison between M1 and M2 from the viewpoints of the householders and the DSO. In general, M2wIP is better than M1 in many aspects.