Phase Balancing Home Energy Management System Using Model Predictive Control

: Most typical distribution networks are unbalanced due to unequal loading on each of the three phases and untransposed lines. In this paper, models and methods which can handle three-phase unbalanced scenarios are developed. The authors present a novel three-phase home energy management system to control both active and reactive power to provide per-phase optimization. Simpliﬁed single-phase algorithms are not sufﬁcient to capture all the complexities a three-phase unbalance system poses. Distributed generators such as photo-voltaic systems, wind generators, and loads such as household electric and thermal demand connected to these networks directly depend on external factors such as weather, ambient temperature, and irradiation. They are also time dependent, containing daily, weekly, and seasonal cycles. Economic and phase-balanced operation of such generators and loads is very important to improve energy efﬁciency and maximize beneﬁt while respecting consumer needs. Since homes and buildings are expected to consume a large share of electrical energy of a country, they are the ideal candidate to help solve these issues. The method developed will include typical distributed generation, loads, and various smart home models which were constructed using realistic models representing typical homes in Austria. A control scheme is provided which uses model predictive control with multi-objective mixed-integer quadratic programming to maximize self-consumption, user comfort and grid support.


Introduction
The Energy Efficiency Directive of the European Commission provides great emphasis on the need to empower and integrate customers by considering them as key entity towards sustainable and energy efficient future [1]. Evolving systems such as smart meters are on a road map towards increased market integration. With the help of such devices, ICT aspects such as data mining, management, processing, and commutation are gaining lots of traction in smart grid [2].
In recent days, with rigorous funding and investment in renewable energy, large number of distributed energy resources such as photo-voltaic systems, wind generators, and new loads such as electric mobility and storage systems are gaining importance. They pose lots of challenges to the network such as voltage violations and line loading. Most of the typical distribution networks are unbalanced due to unequal loading on each of the three phases and untransposed lines [3]. Additionally, unbalance is further increased with the high penetration of single-phase distributed generators. Three-phase unbalance imposes various degrees of stresses on different components in distribution network. Losses on the lines and distribution transformers increase considerably with the increase in phase unbalance [3]. Therefore, it is extremely important to consider three-phase models. They have strong dependencies on external factors such as weather, ambient temperature, and irradiation which follows daily, weekly, and seasonal cycles. Photo-voltaic systems inject large amounts of active power into the network, especially when the solar irradiation is high during midday. Voltage violations may occur due to partial stochastic power input. Therefore, it is important to include reactive power in models so that it can be used to performed voltage regulation.
Homes and buildings are projects to consume a large share of total energy production. Therefore, it makes sense to produce strategies to use them to help mitigate the issues discussed above. Most of the homes today are not capable of providing any kind of support to the grid. Certain upgrades need to be made so that they can perform demand response. Loads which can be controlled directly or indirectly to provide demand response is referred to as demand side management (DSM). DSM is also referred to as flexibility. DSM can be used to provide number of grid support functionalities such as shifting the peak load to off-peak hours or curtailing the load to reduce the peak demand [4]. Smart building customers are given the opportunity to schedule the devices on their own to maximize comfort level and based on this initial schedule, the optimizer maximizes economic return which will result in demand which is more leveled over time [5]. Additionally, the optimizer will either minimize payment or maximize comfort based on the consumer needs in which, the user comfort is represented as a group of linear constraints [6].

Related Work
To control various devices in smart homes and all the issues associated with it, the authors in paper have presented a control scheme using Model predictive control, which is an ideal candidate to handle dynamic systems with evolving disturbances described in the previous section.
Various implementations of model predictive controller (MPC) in buildings are available in the literature. The core principle or issue being addressed by bodies of research mentioned below is dynamic scheduling of various flexibilities in building. Most of the authors below have addressed this issue using various MPC algorithms, problem formulations and objectives.
After analyzing the large body of work in MPC for buildings, three major categories can be defined. MPC in buildings is mainly used for demand side and flexibility management, building temperature control and optimal usage of energy.

Demand Side and Flexibility Management
A multi-scale stochastic MPC is implemented to schedule heating, ventilation, air conditioning which is referred to as HVAC systems and controllable loads such as electric vehicles and washer/dryers is implemented in [7]. In [8], the authors have presented an MPC approach to tackle the load shifting problem in households equipped with controllable appliances and electric storage units. This approach used time of day tariff to minimize energy consumption. A decision-making framework for real time control of load serving entity of flexibilities used to provide ancillary services to the market is presented in [9]. This paper provides a generalized framework which includes wide array of flexibilities. An example with electric vehicle charging is provided in detail.
The authors in [10] have proposed a scheme which uses time varying real time pricing to schedule appliances in buildings in smart grid context. Thermal mass of the building is considered with a comfort indicator and a model associated with it is presented. Thermal mass storage is used to hedge against varying prices with a goal to minimize energy costs. Control approach for home energy management system (HEMS) under forecast uncertainty is presented in [11]. The smart home is controlled as a grid connected micro-grid with PV generation, battery systems, critical and controllable loads. Objective of MPC is to maximize the use of renewable energy generation and to minimize operation costs. It includes predictions of PV, load, and market prices. Various scenarios are considered with different forecasting accuracies. The authors in [12] presented an MPC model for HVAC system in medium sized building with receding horizon control. It is used to provide demand side flexibilities. Objective is to operate the building economically while respecting the comfort of dwellers. MPC scheme provided is a robust one to participate in both reserve and spot markets. Sensitivity of the controller towards economic and technical constraints are evaluated. The National Electricity Market of Singapore (NEMS) is used as a study case for grid building integration studies.
In [13], a non-intrusive identification of components in smart home is provided with a sampling frequency of one hertz. These identified models are used to predict flexibilities. These flexibilities are shifted in time to minimize energy costs. An MPC technique for energy optimization in residential appliance is proposed in [14]. Home cooling and heating system control is proposed to analyze the effect of conventional thermostats. In [15], an MPC EMS system for residential micro grids is furnished. EMS optimally schedules smart appliances, heating systems, PV generators based on consumer preferences. Weather and demand forecasts are integrated in it. Mixed-integer linear programming (MILP) is the core of MPC which minimizes the system costs of this residential micro-grid. At each sample time, the optimization algorithm adjusts itself to account for updated weather dependent PV systems and heating units in a receding fashion. This method is coupled with accurate simulation of micro-grid including energy storage and flexible loads. Emulation of real-world grid conditions on standard network interface is presented. The authors in [16] have provided a method to maximize the use of renewable energy resources in islanded grids. PV systems are used to provide energy to home loads and pico hydro power plant. MPC is used to control the flow valve of hydro plant and to modulate the energy supply to fulfill the deficit during islanded conditions. An economic MPC is illustrated in [17]. It includes PV combined heat and electrical storage system. Uncertainties from thermal behaviors of the building are quantified, formulated and MPC's capability to handle it is presented in this research work. An MPC scheme to control loads in residential buildings are presented in [18]. It also presents a novel load aggregation method using MPC for distribution networks. This method is tested with 342 bus network with 15,000 buildings. In [19], an MPC controller to perform demand side management is presented. It uses an ON/OFF PID controller and MPC to control air conditioning in rooms in houses. It also includes PV systems. Weekly expenses are calculated for each tariff is compared with control methods.

Temperature Control
The authors in [20], have presented a method to control temperature in building in a cost-effective manner. It uses linear programming heuristic to minimize the objective function of electricity cost to run air conditioning system. In [21], authors have presented models for Heat Recovery Ventilators connected to single zone building, its potential and nonlinear MPC is implemented to optimize energy consumption. Three distinct time zones are used namely, slow timescale for temperature of structural elements, fast timescale for air temperature and intermediate dynamics for recovery systems. A stochastic optimization technique is provided in [22]. This paper introduces several load classes such as heating, ventilation, air conditioning which is commonly referred to as HVAC systems. A first order thermal dynamic model is used with a mixed-integer MPC to generate load schedules. Real data is coupled with numerical solutions. The authors in [23] have proposed an MPC algorithm to control temperature in single zone building coupled with renewable energy generators such as solar and wind. MPC objective is to control temperature within certain permissible limits and optimal amount of power consumption.
In [24], a temperature control scheme with the consideration of occupants with three comfort indicators namely, strict, mild, loose levels are provided. It also includes window blind position control, illumination, and ambient temperature. Weather data such as solar irradiation, illumination, and ambient temperature is forecasted and used in MPC algorithm. Goal of MPC is to minimize energy consumption and maintain the desired level of comfort for occupants. Paper [25] focuses on analysis of MPC application to domestic appliances to optimize them. Relationship between MPC weight adjustment and minimization of energy consumption is evaluated. In this context, water heater, room temperature control by air conditioning system and refrigerators are explored.
In [26], a centralized direct control of on/off thermostats is furnished. Device operation temperature, on/off status, more importantly, temperature ramps are calculated and communicated to the central controller. It is observed that, same or better performance can be achieved by communication of temperature ramps which are essential data points. It also reduces the communication needs significantly. Right information exchange is essential for better performance and data flow reduction is the concluding argument of this paper.
An MPC control scheme to provide the best tradeoff between temperature control and energy cost is described in [27]. It also provides a comparison between PID controller and MPC. The weights are modified to obtain the best solution to increase quality of various electrical and thermal models. The authors in [28], have presented an MPC for entire building with a comfort metric to ensure high priority to user comfort for each of the various zones in the building. Simulation results are provided for four months showing large percentage of reduction in electrical and thermal energy consumption.

Optimal Energy Usage
Paper [29] proposes an MPC control strategy in HEMS to optimize energy usage and optimal operational schedules for input variables. It also provides results which demonstrated revenue from selling power to the utility. In [30], authors have furnished an MPC approach to obtain savings in residential households. Impact of local power generation such as roof top PV systems is determined for off-peak, mid-peak and on-peak periods. Hybrid MPC formulation for buildings is provided in [31]. It describes the interactions between continuous and discrete systems. It involves a two-level computation structure. Individual systems are controlled with upper level discrete commands.
In [32], an approach to minimize energy in home and office building is presented with renewable energy resources such as PV systems. This is done using an MPC technique with mixed-integer programming to handle switching constraints. This method allows for sufficient performance with respect to energy regulation and efficiency. It is shown that with various seasons, an annual savings of about 1.72% can be achieved with this approach. An MPC approach is introduced in [33] which exploits its capacity to reduce energy consumption and improve efficiency to reduce energy bills. MPC was trained for two different weight sets which is compared to thermostat control with three typical household loads.
It is shown that it is necessary to augment control weights to maximize energy cost minimization potential. In [34], an energy scheduling approach for smart home appliances using stochastic MPC is presented. It comprises a combination of genetic algorithm and linear programming. It analyzes the competence of the algorithm proposed with the objective of energy reduction.
An MPC scheme with a sample time of one hour is presented in [35]. It includes hot water usage, electric vehicle, domestic heating and with an actuator with water tank to use it as heat storage. Total power and energy cost is minimized. MPC robustness is evaluated using forecasted load profiles of the household. It is shown that using energy storage, the overall energy consumption of the household can be minimized.
A comprehensive cost optimal design is presented for a building HVAC system which includes MPC to generate cost optimal solution is presented in [36] The controller provides an optimal hourly set point for cooling and heating devices. This method is applied to multi-zone building in Italy. In [37], a study to minimize the cost of electricity for coordinating houses connected a micro-grid. It uses multi-objective optimization for micro-grid control which includes a house and an independent local plant. The control algorithm minimizes losses by power exchanges between the plant and the house.
It can be clearly seen that, three-phase implementation of HEMS is lacking. The papers mentioned above only use simple single-phase flexibility models and appliances are single phased. Additionally, reactive power control is not addressed by any of the research work mentioned above. Since three-phase models are not used, phase unbalance minimization cannot be performed. In this paper, the authors present a three-phase unbalanced HEMS in which, three objective functions, maximize user comfort, self-consumption and grid support is implemented. It also includes control scheme to manage both active and reactive powers and can handle number of electrical appliances with various configurations.
The contributions in this paper are enlisted below, 1. Various three-phase linear flexibility models are presented in Section 3.
2. Flexibilities are modeled in both active and reactive power. 3. Three objective functions are provided in Section 5 along with three objective weights which are user defined. 4. Control scheme is described in Section 6 for three-phase HEMS with various chronological events. 5. Simulation results for three-phase unbalanced HEMS with active and reactive power control is provided in Section 7.

System Models
HEMS is a platform which enables monitoring and control of various energy appliances in the household. It allows the deployment of various control strategies to achieve an objective. Smart home in this paper refers to a home which is fitted with a HEMS. Using this system, various objectives can be achieved. For example, keeping the room temperature within certain comfortable limits.

Overview
Smart home models can be segregated into two categories. Namely, thermal and electrical models coupled by a heat pump. The main reason to use a thermal model is to characterize indoor temperature due to the thermal inertia of the house, since consumer comfort is paramount. The controller is formulated to give complete control to the user, a user-centric approach. The models are linear in nature so that, simple control strategies can be produced. Figure 1 represents a three-phase HEMS. It contains both single and three-phase components and therefore, it is unbalanced. In this scenario, the heat pump is three phased, inverters for battery and PV are three phased, controllable, and uncontrollable loads are single phased. The control scheme provided in this paper can include variety of configurations such as single-phase-neutral, phase-phase, three-phase star configuration, three-phase star configuration with neutral, and three-phase delta configuration. This can be done using the constraint imposed on the grid connection point described in Section 4.4.

Smart Home Thermal Model
Various linear single zone models representing single family homes with heat pumps and thermal parameters of the building are considered. They are based on nonlinear models which were constructed using data, representing physical behavior of real buildings in Vienna and Salzburg regions in Austria. Due to consumer privacy, more details about these homes cannot be provided. By generalizing these models, four study cases are derived, and their essential distinguishing features are shown in Table 1. Nonlinear models were created in Dymola [38], which is a modeling and simulation tool, as part of the project iWPP-Flex [39]. They were linearized using the functions within Dymola and were mathematically verified. Table 1. Building study cases which represent typical households in Austria. During the modeling stage of these houses, they only contained single-phase loads. To perform effective demand response, they had to be upgraded to include various other flexibilities such as single/three-phase heat pumps, controllable loads, electric storage, and PV system with three-phase inverters. Some of the important specifications such as heat demand, control method, and rated capacities which influences the control scheme are provided in this In the context of smart HEMS, the models of smart homes are recommended to be kept sufficiently simple to maintain generality, so that many building types can be accommodated. Therefore, first order models are implemented. Additionally, the focus of this work is not to use realistic building models but rather the control strategy and to minimize the objective function.
As a result, continuous state space models were generated and are assumed to be ordinary discrete linear time-invariant and is then discretized with a sampling time step of 15 min which can be observed in Equation (1).
x room (t + 1) = A room x room (t) + B room u room (t) The state variables x room of the building model are the room and wall temperature. The later represents the temperature of wall, floor, and ceiling of the house. A room and B room are the system matrices.
Limits on room and wall temperatures are given in Equations (3) and (4) T min The input quantities for the building are heat flow supplied by the heat pump, ambient temperature, solar irradiation from all directions, internal gains, and ventilation.
Limits on heat flows into the building are provided in Equation (6) 0 ≤ q room (t) ≤ q max room (6)

Heat Pump in Residential Building
Heat pump is used to provide the heat flow into the home which is the only controllable variable in the home model described in Section 3.2. Heat pump is the only coupling element between electrical and thermal systems as mentioned above. Equation (7) describes the relationship between heat pump power and heat flows. The model represented below is that of a single-phase heat pump since it is in a modest home. This can be easily extended to three-phase by dividing the right-hand side of Equation (7) by 3 for per-phase balanced active power. Coefficient of performance (cop) is assumed to be constant with respect to time.
Where, P heat pump is the active power and cop heat pump is the coefficient of performance. Low-energy and existing house contains on-off heat pump. To model this, a binary variable B heat pump with 0 for off and 1 for on is used. P heat pump (t) = B heat pump P rated heat pump The pump in heat pump consists of an induction motor. This motor is assumed to be lossless and with constant power factor (p f heat pump ) as described in Equation (9), using which reactive power (Q heat pump ) is calculated.
Since only heating period is considered, P heat pump and Q heat pump ≥ 0. Constraints on heat pump active power limits. 0 ≤ P heat pump (t) ≤ P max heat pump Constraints on heat pump reactive power limits, where, P max heat pump and Q max heat pump are the maximum rated power active and reactive powers of head pump, respectively.

Electrical System Constraints
In recent years, lots of smart electrical appliances are becoming popular. It is possible to control the behavior of these appliances. In this paper, the authors have decided to use the following electrical appliances.

Electric Storage Constraints
For the maximal use of intermittent renewable energy generators and self-consumption, electric batteries are becoming very important in the recent days. Therefore, it is necessary to model and include them in the HEMS systems. In this paper, only linear battery models are used. Equation (12) represents the energy balance of electric storage system, a battery.
soc(t + 1) C battery = soc(t) C battery + ∆t η battery P battery (t) (12) It can be seen in Equation (12) that, P battery takes values both positive and negative. This is a form of linearization because, the battery charging and discharging efficiencies are different and therefore, nonlinear. This nonlinearity can be tackled by solving it as is, using a nonlinear solver or by splitting the P battery into P charging and P discharge . The latter is coupled with a binary variable to make it either charge or discharge, leading to MILP. The authors have chosen to use the linear form and the reasons for it are provided in Section 4.2.
Constraints on soc limits are given below, Constraints on battery charging and discharging power limits are as follows.

Three-Phase Inverter Constraints
The battery described in the previous section is connected to a three-phase inverter. The inverter can control active and reactive power flows on each of the phases. The relationship between battery and inverter is described using simple power balance Equation (15).
(P battery (t)) 2 = (P inverter (t)) 2 + (Q inverter (t)) 2 (15) Equation (15) is nonlinear. If on the precious section, a binary variable is defined and P battery is split into P charging and P discharge , Equation (15) becomes nonlinear and non-convex. One way to deal with the nonconvexity is to limit the Q inverter with a constant power factor as shown in Equation (16). However, this is still nonlinear. Q ρ inverter (t) = tan(cos −1 (p f inverter ))P ρ inverter (t) (16) where, ρ is the phase and ρ ∈ phases(r, s, t). To remedy the nonlinearity, the inverter is only controlled at unity power factor. In other words, the reactive power is zero. This is represented in Equation (17) (P battery (t)) 2 = (P inverter (t)) 2 Individual phase powers are represented as follows,

Constraints on Controllable Loads
Simple controllable loads are used with constant power factor operation as described in Equation (21). Controllable loads have the following constraints. Equations (19) and (20) are the active and reactive power constraints and Equation (21) is the relationship between them.
It is assumed that the power factor is constant with time. Typical power factor for household loads is between 0.90 to 0.95.

Constraints on Grid Connection Point
The grid connection point (point of common coupling) is where the smart home is connected to the grid. When excess power is fed into the grid, it is referred to as infeed and when power is drawn, it is referred to as consumption. Since P grid takes both positive and negative values due to battery linearization, both infeed and consumption is represented by P grid . It also represents the energy balance of all the electrical components in the smart home.
Equations (22) and (23) are constraints on limits of active and reactive power at the grid connection point.

Various Disturbances Applied to HEMS
Various electrical and thermal disturbances are applied to HEMS during simulation which can be seen in Figure 2. Disturbances are forecasted using a convolutional neural network which is not described in this paper. Uncontrollable loads data is from a smart meter from a real household in Austria. Various thermal disturbances such as ambient temperature and irradiation data is sourced from weather stations in Austria, ventilation, and internal gains from the project iWPP-Flex.

Objective Functions
In this paper, three different objectives are considered. These are explained in detail below.

Improve Self-Consumption
In many countries, with higher share of renewables, it is more economical to self-consume and therefore, the following objective function in Equation (24) is minimized. Since electricity tariffs only depend on active power, reactive power is excluded from the objective.
On the other hand, in Austria, it is more economical to feed as mush power into the grid as possible since power sale tariff is higher than consumption tariffs. It can be done easily by maximizing equation. It is customary to involve a variable price signal along with P grid which is the electricity tariff provided by the energy retailer. However, this is neglected for the sake of clarity.

Improve User Comfort
Since user comfort is paramount, this objective is introduced. It minimizes the difference between a reference temperature and actual room temperature in smart home. The limits of these temperature are defined by the user.

Improve Grid Support
As mentioned in Section 1, smart homes can provide support to the grid by optimally controlling its renewable generation and consumption. Therefore, objective in Equation (26) is provided. It minimizes the difference between reference and actual active, reactive powers at grid connection point. This reference is generated from a large grid level optimal power flow controller based on a grid level objective function.
This paper does not include details or methods to generate this reference profile and instead uses it as is. If the smart home can follow this reference profile, grid level optimization is achieved. The objective on the grid can be loss minimization, line loading minimization, operational efficiency, unit dispatch and so on. In this paper, the reference profiles where generated with an objective to minimize the three-phase unbalance on the grid level. For this to work, multiple buildings connected at various locations in the network must follow its own reference profile provided by the grid controller, simultaneously.

Complete Objective Function
Complete objective function is provided in Equation (27). Weights S, U and G are introduced with self-consumption, user comfort and grid support, respectively. By varying these weights, more importance can be given to the objectives. minimize J = S J sel f consumption + U J user com f ort + G J grid support (27) These weights can be varied on-line and the controller updates it in the next simulation step. There are the most prominent parameters which the user can determine and can have significant influence over the controller and ultimately the optimum. Controllable variables are P battery , P heat pump and P controllable load .

Control Scheme
Due to the high intermittency of renewable energy generators, loading in households along with dependencies on external factors such as weather and solar irradiation, it is extremely important to choose a controller which makes effective use of available predictions.
Therefore, the authors have chosen to use MPC. MPC control used is receding horizon control. Figure 3 describes an MPC and data exchange between various devices in smart home. MPC is responsible to generate optimal set-points to minimize the objective function. MPC control scheme is illustrated in Figure 4. It describes various functions which need to be executed within a sample duration.  The chronological control functions and events described in Figure 4 are described in detail below.

Sensor data acquisition
1. At time t, measure thermal disturbances such as irradiation, ambient temperature, ventilation losses and internal gains. Additionally, smart meters measures uncontrollable load and photo-voltaic generation. 2. These sensor data points are acquired by the data acquisition system and sensor database is updated. Figure 5 illustrates the sensor data acquisition system using in this work.
3. Disturbances are forecasted for a given prediction horizon using an appropriate forecasting algorithm. In this paper, using convolutional neural networks. 4. Active and reactive power optimal set-points are received from the grid level controller. 5. Internal temperature reference signals are received. 6. User defined objective weights are received. 7. Objective functions are set up using Equations (24)- (27). 8. Constraints from Equations (1)-(23) are setup. 9. Optimal set-points are generated. 10. The process is repeated for next sample period, (t + 1). The optimization problem is solved by a suitable quadratic programming for passive, renovated house and mixed-integer quadratic programming for low-energy and existing houses as discussed in Section 3.3.

Simulation Results
In this section, simulation setup and results are provided. As mentioned earlier, the objective weights, S, U and G are defined by the user, it is difficult to analyze the controller performance due to large number of combinations of these three variables.
To overcome this, only extreme cases of these weights are considered. This can be observed in Figure 6. The method of choosing weights in such fashion was inspired from [40] in which, mixed-integer quadratic programming is introduced with multi-objective optimization. The simulation is performed for the duration of 48 hours with prediction and control horizon of 24 hours. Simulation parameters are provided in Table 2.   (24)). It illustrates P grid for various home types and for given simulation horizon.
It can be observed that for objective weights (S, U , G) = (1, 0, 0), the controller is trying to get P grid close to zero which can be perceived from the medians which are at zero for all the house types. Same can be observed with objective weights (S, U , G) = (1, 1, 1). Since all three weights are equal, the results are not as effective as the one from before and S is not dominating other weights.

Improve User Comfort
Objective terms abs(T re f erence room − T room ) is illustrated in Figure 9. Since the objective weight U is predominant, (S, U , G) = (0, 1, 0), the absolute difference between T re f erence room and T room is the least. It can be observed that the temperature median is very close to zero. From this, it can be inferred that the objective function to improve user comfort is maximized. However, since the building models are first order, the controller is quiet easily able to achieve similar results with (S, U , G) = (1, 1, 1).  7.1.3. Improve Grid Support Figure 10 illustrates abs(P grid re f erence (t) − P grid ). With the predominant weight in (S, U , G) = (0, 0, 1) is G. Therefore, similar to previous objectives, it can be observed that the controller is able to minimize the absolute difference between the target profile and the profile at the grid connection point. This is also illustrated in Figures 11 and 12 where, both active and reactive power profiles are presented for phase r.  Figures 11 and 12 describes all the parameters for passive house with objective weight scenario (S, U , G) = (0, 0, 1) for both active and reactive power. In Figure 11, since the objective weight scenario is to minimize abs(P grid re f erence (t) − P grid ) + abs(Q grid re f erence (t) − Q grid ), it can be observed that the P grid is trying to closely follow the P grid re f erence . . Figure 11. Per-phase active power controllable and disturbance variables for passive house and weight scenario (S, U , G) = (0, 0, 1) It is evident from Equation (23) that, there are no direct reactive power controllable variables for all the phases. This makes it difficult for the controller to actively tract Q grid re f erence which can be observed in Figure 12. In phase r, due to the existing single-phase appliances, better reactive control tracking is possible unlike phase s and t.

Conclusions and Outlook
In this paper, a novel three-phase balancing HEMS was presented along with control strategies for both active and reactive power. Four linear building models representing typical households in Austria were described. Various linear three-phase flexibility models were presented in detail. Three unique conflicting objective functions with three weights which are user defined is described. Model predictive control scheme was applied to this smart home for various extreme objective weight scenarios. Active and reactive power set-points were generated for all electrical controllable variables. Due to the vast number of combinations of objective weights, four extreme cases were chosen for analysis, (S, U , G) = (0, 0, 1), (0, 1, 0), (1, 0, 0) and (1, 1, 1). Analysis was done based on three objective functions. It was shown that the results reflect the chosen objective weights for each of the three objective functions. In Figures 11 and 12, grid support maximization objective was illustrated for objective weights (S, U , G) = (0, 0, 1). In these figures, it was shown that P grid and Q grid are indeed able to track their reference profiles and implications being, the objectives on the grid level controller (three-phase unbalance minimization) are being met, leading to a grid level optimization.
The models presented in the paper were linear and first order in nature. In reality it makes sense to use higher order nonlinear models to closely match the real behavior of the smart home. Therefore, the model needs to be extended to nonlinear ones. Even though the scheme includes reactive power, it is not given high importance in this paper to keep it linear. Due to high share of renewable generators, it is interesting to be able to control reactive power in this context. The inverter connected to the battery in this paper only works at unity power factor. However, by including reactive power control, better reactive power tracking can be performed. Additionally, with the power balance equation at the inverter is non-convex in nature. Therefore, the MPC needs to be extended to be able to solve such problems using a non-convex solver.