Optimal Operation of Integrated PV and Energy Storage Considering Multiple Operational Modes With a Real-World Case Study

In the past decade, substantial investments have been made in researching and developing concepts and technologies to support the smart grid, renewable integration, and grid-interactive buildings. Adaptation of integrated solar photovoltaics with energy storage is increasing in residential buildings as consumers and utilities are becoming aware of their economic benefits and resilience benefits. Effective integration and control of these systems with other building loads is critical for providing load flexibility to improve building energy efficiency, reduce carbon footprint, and support grid resiliency. In recent years vendors are shifting towards device-level optimization and defining more sophisticated operational modes for controlling energy storage systems rather than charge and discharge power. As a result, optimization techniques must encompass the characteristics of these modes and their interactions with other system disruptions and attributes. This complexity gives rise to a nonlinear optimization problem that cannot be effectively addressed by an open-source solver and is impractical to implement in real-world scenarios. In this paper, we designed and evaluated a linear multi-objective model-predictive control optimization strategy for integrated photovoltaic and energy storage systems in residential buildings by using manufacturer-defined operational modes. The optimization goal is to minimize the power-purchasing cost from the grid and maximize the power selling cost to the grid. We developed a generalized method to keep the optimization linearized, even with operational modes consideration while coupling the modes with the overall system charging and discharging power. Our simulation results were aligned with real-world measurements and validated the linearized optimization formulation for each operational mode and for the economic use-case. The optimization results for the economic use-case demonstrated that the power associated to grid charge is mostly larger than the grid discharge power which means the optimization tried to maximize the power selling to the grid when the price is high and avoid power purchasing from the grid during high price.


I. INTRODUCTION
The US electric power grid is evolving.New carbon emission requirements and plummeting renewable generation costs (particularly from photovoltaic (PV) systems) have been paving the way for retirements of large fossil fuel-based generation facilities [1], [2].As part of the renewable deployment strategy, technologies such as lithium-ion energy storage systems (ESSs) have become increasingly important to ensuring the availability of energy capacity to meet demand.Beyond shifting energy from renewable resources, ESSs have also been a sought-after technology for augmenting system reliability and resiliency and ensuring renewable plant operations meet their commitments in the event of adverse weather phenomena [3].In [4], the feasibility and effectiveness of integrated PV and ESS in rural areas with limited access to reliable electricity is demonstrated and it highlights the potential for renewable energy systems to contribute to sustainability for such communities.
For grid-scale ESS (i.e., megawatt-scale), use cases have focused on energy arbitrage and provisioning of ancillary services [5] with complementary optimization strategies that focus on market bidding strategies.Other use cases under investigation include those that focus more on distributed energy storage technologies, behind the meter (BTM) energy, and community ESSs [6], [7], [8], [9].For these ESSs, utility time-of-use (TOU) mechanisms have been the primary target value stream in conjunction with reliability and resilience services.An agent-based software framework was developed and deployed to enable transactive control in residential buildings, which enables transactions over a load and price signal between buildings and the microgrid controller [10], [11].In another work, an optimization was developed that determines the optimal battery charge and discharge schedules for each day, with the goal of minimizing electricity cost over a given time period [12].Other optimizations have considered potential interruptions and using energy storage as a backup [13]; coordination between building energy storage (e.g., building envelope with HVAC) and battery energy storage [14]; a multi-energy storage system that includes battery, thermal, and hydrogen [15]; a multi-objective optimization for reducing the system cost, maximizing renewable energy generation, and minimizing green gas emission for integrated PV and ESS with ultra-fast charging capability [16]; and integrated energy storage with PV to support electric vehicle charging [17].In all this research work the ESS charge and discharge was used to control the system.SOC is a key variable used by various control strategies to optimize the performance of the ESS.Accurate SOC estimation is a critical challenge since it is a non-linear problem by nature.Various model-based, modelfree, and data driven methods used for SOC estimation along with their advantages and disadvantages are discussed in [18].
As ESS technology and use cases have matured, manufacturers have begun to imbed higher-order control modes (i.e., beyond the standard real and reactive power control) into storage systems to support these use cases and reduce the need for fast communications and constant decision-making.Instead, control modes can be set and left for extended periods, thereby allowing the ESS to deliver services without the need for significant interactions.
For example, mode selection for energy storage and power electronics controls has been presented for on-and off-grid scenarios or use cases that consider load and PV in a microgrid [19], [20].In another research work, charge and discharge modes are introduced where SOC values are used in a binary logic to determine the amount of charge to be requested [21].A simulation study was done to reduce the energy cost of residential houses with integrated PV and ESS using a multi-objective optimization by scheduling the charging and discharging of the battery [22].Another study demonstrated the impact of using different battery technologies and sizing for reducing the electricity bill of the households while ensuring a certain level of reliability and sustainability [23].In work related to a hybrid tramway, modes such as regenerative, charging, and traction were introduced and considered for engagement with energy storage [24].A use case for PV smoothing control between two systems has also been discussed [25].In this example, a peer-to-peer communication strategy was enacted between two assets.In another work, an ESS was used to directly measure PV output and automatically adjusted according to a target forecast [26].For residential, secondary-use ESS, a demand management is established through a secondary closed-loop proportional-integration (PI) control implementation [27].An energy management system was introduced to use control modes that are decided conditionally for an integrated PV and ESS [28].In other work, optimization was used for PV and ESSs that consider user satisfaction [29].In another work the authors developed and compared various control strategies for optimal operation of a PV-ESS based power plant considering typical scenarios such as a clear day, a partially cloudy day, a cloudy day, and a day with intermittent cloud cover [30].In another paper, the optimal charge and discharge schedule for integrated battery system is investigated with considering load uncertainty and battery characteristics [31].
In recent years, machine learning and data-driven algorithms are getting more attention to find the optimal ESS operational schedule.In a recent work, authors integrate a bidirectional long short-term memory predictive model with optimization algorithm for optimal energy distribution and scheduling of battery ESS [32].In another work, a reinforcement-learning(RL) based optimization algorithm was designed to create the optimal charge and discharge schedule for integrated PV and ESS in residential houses [33].DRL was also utilized for a hybrid ESS and reduced the system operating cost by 50% when compared to rule-based control for cooling a residential building in Mediterranean climate [34].A comprehensive literature review was done over the research and activities involving battery ESS modeling and optimal control strategies including dynamic programming, stochastic optimization, linear programming, mixedinteger quadratic programming, model predictive control, and RL [35].In all these methodologies charge and discharge power of the battery were the main control commands used by the control and optimization algorithm.
Although use cases and control modes are being developed, integrated, and deployed for ESS, optimization strategies for selecting the optimal mode for different time intervals and use cases have not been discussed to the same extent [36].Most of the existing works discussing the application of ESS optimization in the residential DR management use battery charge and discharge power as a control mechanism.However, in recent years, the ESS vendors define operational modes to control their system besides simply using battery charge power and discharge power.Each of these operational modes are based on a device-level optimization.These modes dictate the charge and discharge power of the ESS system based on the objective of the operational mode (such as solar-self consumption) as well as system disturbances (such as PV, load).In order to develop an optimization algorithm for such a system, it is necessary to: 1) understand and formulate the model for each operational mode, 2) properly formulate the relation of each operational mode to the overall system charging and discharging power and other system uncertainties, and 3) formulate the constraints and modeling in such a way that the optimization can be solved by a linear solver so it can be used in real-world applications for robustness and efficiency.Particularly, linear optimization formulations that consider different vendor defined operational modes and the ability to select between the modes have not been discussed and are novel contributions of this work.This is an important topic particularly in real-world implementations because fast communications to dispatch these types of systems at scale are not realistic and not scalable for vendor-based communications systems in which tens of thousands to millions of products could be sold around the world and utilize centralized communication frameworks.As such, this paper describes an approach of considering the available operational modes of an integrated PV and ESS in a model-predictive multi-objective optimization formulation with local control.This approach can easily be utilized and deployed by utility or building operators.In this work, actual measurements from a deployed ESS are used to derive an optimization formulation for different operational modes.These formulations are compared to the actual measurements captured for validation in a real-word implementation.
The paper contributes to the body of knowledge in four ways: (1) a linear model-predictive multi-objective optimization with vendor defined operational mode considerations has been developed for integrated PV and ESS instead of only using the system constant charging and discharging power; (2) modeling and formulating the relation of ESS charge and discharge power with vendor defined operational modes and other system disturbances such as load and PV power generation; (3) the operational modes on a real system have been modeled and validated based on real-world measured data; and (4) a generalized approach has been introduced that linearizes the model-predictive optimization formulation when considering various operational modes.Our developed approach will help utilities and building operators to deploy linearized optimization methodologies which are not computationally expensive and can be solved by open-source solvers for their integrated ESS with PV and other loads.This generalized approach can be applied to any device as vendors start to introduce more complex operational modes for their system.Each of these operational modes is based on a device-level optimization with a goal of satisfying the operational mode objective such as solar self-consumption.As ESS vendors move toward defining more complex operational modes, optimization methodology can no longer depend only on charge power and discharge power.The optimization methodology needs a systematic way to define and formulate the relation of operational modes with overall system charge power and discharge power along with other system disturbances.This coupling will result in a nonlinear optimization which cannot be easily solved by open-source solvers, computationally expensive, and impractical for real-world deployment.This is a barrier for utilizing and optimizing such systems in real-world deployments to support DR.For this reason, our systematic and generalized approach to perform this coupling in a linear fashion can pave the way for easy deployments of such optimization for ESS with vendor defined operational modes.
The rest of this paper is organized as follows: Section III provides general background on the integrated ESS and PV system and project, Section IV presents the proposed optimization formulations, Section V provides results of the optimization formulation as applied for different use cases, and Section VI describes the conclusions drawn from this work.

II. PROJECT BACKGROUND
Today, developers are integrating PV and ESSs into single systems to reduce the complexity of system operation and integration for the user.Figure 1 depicts an example of the electrical configuration of such a system for a residential building owner.In this implementation, the PV array directly connects to the DC bus.The inverter regulates the DC bus voltage with a PI control loop, and a target voltage is determined through a perturb and observe maximum power point tracking (MPPT) control method [37].An ESS is integrated into the shared DC bus through a DC/DC converter and can inject and extract energy via current control based on control requests.Energy injected into the DC bus is automatically extracted by the inverter and pushed to the grid connection of the DC bus voltage control.Current transducers interconnected to the grid-side AC interconnection provide a mechanism to utilize closed-loop control formulations via a secondary PI loop.Other topologies exist and utilize a DC/DC stage for the PV system [16], [38].However, the addition of hardware increases the overall cost of the deployed technology.
Figure 2 depicts the technology as deployed in a test home, in which two separate battery systems are employed to provide the total net kWh.These systems are switched on individually based on logic embedded in the controllers.This deployment is part of a Smart Communities [39] project called the Georgia Power Smart Neighborhood TM .Each home in this community utilizes 3.6 kW DC of rooftop PV paired with 19.6 kWh of battery storage.These homes are also equipped with improved energy efficient construction, high efficiency and smart mechanical equipment with internet connectivity.The next section describes an optimization formula that considers the available modes for a deployed integrated ESS and PV system.

III. INTEGRATED PV AND ESS OPTIMIZATION AND CONTROL FORMULATION
The integrated PV and ESS presented here does not provide direct charge and discharge control for the grid interconnection.Instead, the inverter uses MPPT control to regulate   the DC bus and automatically sends injected energy from solar and energy storage to the grid connection.Hence, control modes are based on how the integrated ESS is used in conjunction with the PV and locally measured load.The different modes include load compensating mode, store extra solar mode, limited load compensation mode, and multimode load and solar.Each of these operating modes has its own objective that dictates certain behavior of the ESS.Detailed descriptions for these modes are presented in Table 1.
Although these modes provide automatic integration in a closed-loop control formulation, the primary objective of the presented PV and ESS optimization formulation is to minimize the homeowner's electric energy cost by considering TOU and proxy hourly real-time pricing rate structures.The formulations must also consider the constraints of different mode options and equipment.To construct an optimization model for the ESS, models of each mode have been created to predict the system performance and SOC under different operational conditions.Model formulation has been achieved by operating the system for extended periods (i.e., weeks to months), collecting and evaluating data, and then deriving control and optimization methods in response to different system conditions.The model predictions and measured data are compared as a means for validation.In the next sections, the objective function and constraints (i.e., device and mode models) are discussed in detail.

A. OBJECTIVE FUNCTION
The objective of the model-predictive multi-objective optimization is to minimize the power purchasing cost from the grid and maximizing the power selling cost to the grid.The objective function of the optimization problem is formulated to reliably manage the ESS within bounded operational constrains e.g., SOC Aux,t limits, the economic value of buying from or selling to the grid, P where W SOC is the weight associated to SOC auxiliary variable, W Grid is the weight associated to Grid auxiliary variable, W Modex is the weight associated to operational mode charge and discharge power auxiliary variables, W GridC is the weight associated to the power sold to the grid, and W GridD is the weight associated to the power purchased from the grid.A multiplier, , has been included to increase the values nearest in time.This incentivizes the optimization to enact control when economical instead of waiting for the same opportunity again in the observed time window.Considering the conflicting goals in the operation of such systems, the auxiliary variables associated with SOC, the ESS mode charge and discharge power, and the grid charge and discharge power were added to the objective function.This enables the optimization to successfully solve and drive the SOC, operational mode charge and discharge power, and grid power to the desired range without specifying this as a hard constraint for these variables.This is achieved via the first four terms in the objective function.The fifth term is the negative of the cost associated to the power selling to the grid, and the last term is the cost associated to the power purchased from the grid.

IV. PV, LOAD, AND ENERGY STORAGE MODELS
As presented in [40], the data used to drive the optimization is often forecast data.For the load and PV estimations, models use the expected value of forecasted power as presented in Eqs. ( 2) and ( 3) at the house level.
The energy storage model captures the injected, P C t x t, and extracted energy, P D t x t, into the ESS, and the impact on the system's capacity is represented as SOC.According to [41], a linear model for the energy storage can be applied as where E is the system energy capacity, and η is the system efficiency in a single direction (charging or discharging).
A multiplier was added to represent the two storage systems (i.e., maximum of 200% SOC) and the ability to discharge and charge from a single system at a given interval.
Power limits associated with charging and discharging are represented in Eqs. ( 5)- (7).The binary variables b C t and b D t ensure that the system is represented as charging, discharging, or off.These constraints and equations limit the variables and improve the computational time for the optimization.(7) The energy storage SOC operational capacity limits are shown in Eqs. ( 8)- (10).The SOC min t and SOC max t represent the minimum and maximum SOC limits for each interval, respectively.These values could be adjusted in real time depending on the need to reserve energy for different anticipated operational conditions (e.g., potential outage caused by a forecasted storm).The following sections describe the modeled constraints for the operational modes.
A. MODE 1: LOAD COMPENSATING In mode 1 (load compensating mode), the integrated energy storage and PV systems are used to compensate for the measured load.The control of the system is conditional and performed in one of two ways: (1) if a load value is measured, then the energy storage and PV-generated power is controlled to match the measured load, P load t , up to a maximum power rating, which is captured by the overall limits; or (2) if no load is measured, then the system charges, P These values are applied as positive values for P Mode1 Aux,t to create a cost for the objective function, as shown in Eqs.(15) and (16).
The control charge power, P CMode1 t , and discharge power, P DMode1 t , are derived to provide the targeted request but also to allow these values to be decoupled or set to zero when a mode is not active, as shown in Eqs. ( 17) and (18).A large negative condition has been added to decrease the value below zero, and a positive constraint has been added to break the connection.This approach couples the operational mode power to the system over all power while keeping it linear.
In mode 2 (store extra solar mode), the integrated energy storage and PV systems are controlled to ensure excess solar production is consumed locally.The control is again conditional: (1) if the power generated by the PV system is more than the load, then the excess energy is stored; and (2) if there is load, then energy is discharged to match the load.The formulations for these conditions are presented in Eqs. ( 19)- (22).23) and (24).
C. MODE 3: LIMITED LOAD COMPENSATION For mode 3 (limited load compensation mode), the integrated energy storage and PV are controlled conditionally: (1) if a load value is measured, then the discharge power matches the measured load up to a maximum power rating; and (2) if no load is measured, then the energy storage is charged when the PV is producing.The formulations for this are shown in Eqs. ( 27)- (30).These values are applied as positive values for P Mode3 Aux,t to create a cost for the objective function, as shown in Eqs.(31) and (32).
The control charge power, P CMode3 t , and discharge power, P DMode3 t , are provided in Eqs.(33) and (34) to set values to zero when the modes are not active.
Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.

D. MODE 4: MULTIMODE LOAD AND SOLAR
These modes can be combined to consider load and the need to consume solar locally.To represent these modes, the charge and discharge equations are a combination of the different modes (charging: store extra solar mode and discharging: limited load compensating mode).The formulation for this mode is represented in Eqs. ( 35)-(42):

E. ADOPTING COMBINATIONS OF MODES
Because only a single mode can be selected for control implementation at any given time, all binaries associated with charging and discharging are summed to 1, as shown in Eq. (43). x∈Modes The available modes binaries must also be tied to the system's corresponding overall charge binary, b c t , and discharge binary, b d t , as shown in Eqs. ( 44) and ( 45).This ensures that the charge and discharge of the individual control modes and the maximum power ratings associated with charge and discharge are all coupled.
In obtaining the ESS's total charge power, P C t , and discharge power, P D t , the contributing power from each mode is summed (all modes except for the chosen mode are zero).This is represented by Eqs. ( 46) and (47).In summary, Eq. ( 43) ensures that we have only one operational mode for either charging or discharging enabled at each given time.Eqs. ( 44)-( 45) ensure that the binary variable for operational mode for charge or discharge matches the overall system charging or discharge binary variable.Eqs. ( 46)-( 47) ensure that the active operational model charge or discharge power matches the overall system charge or discharge power.

F. POINT OF COMMON COUPLING MODEL
For interconnection to the grid, a maximum power limit has been defined.This limit is represented by Eq. ( 48), which captures the power from the grid in separate components for charging, P Grid,C t , and discharging, P Grid,D   t   .This equation ensures that the calculated power for grid charge and discharge remains within the permissible operational range.
As the case with the energy storage model, the grid can only be charged or discharged at a given time interval, and this constraint reduces the potential solutions available, as shown in Eqs. ( 49 Finally, the summation of all the resources at the point of common coupling can be represented by Kirckoff's Laws in Eq. (52).

V. EXPERIMENTAL RESULTS
The ESS optimization period is a rolling 6-hour window with 5-minute time steps or 72 total intervals.The optimization has a price signal forecast, load forecast, and PV forecast for all time intervals.This optimization is used for the deployed integrated ESS and PV systems in the Georgia Power Smart Neighborhood TM described in Section III.The optimization formulation has been implemented in Python.COIN_MD [20] is used to solve the optimization, and the PuLP library [21] is used as an interface to the solver and to construct the problem.As mentioned in INTRODUCTION, proper modeling of operational mode is necessary to incorporate them in optimization.The modeling involves formulating the charging and discharging power of each mode based on system disturbances (i.e., PV and load), impact of the power on SOC changes, and proper coupling of the operational model charge/discharge power with the overall system charge/discharge power.This was explained in detail in previous section and in Eqs. ( 4)-(52).To validate the control formulation, the deployed ESS was set to each of the operational modes for two weeks and we collected the data during 99076 VOLUME 11, 2023 Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.
that period for each mode.This data, which was collected from a real-world setup, is used to establish the characteristic behavior of the different control modes and to validate each mode's optimization formulation.
We ran the optimization with a flat price signal using the PV and load data that was used by the ESS in realworld deployment.The flat price signal was used to ensure the optimization is solely making its decision based on the operational mode formulated model and not due the economic benefit.During this validation for each mode, the constraints associated to other modes were removed to ensure that only the operational mode under investigation is making the control decisions.The result of this model validation for each operational mode is presented in the following next four subsections.
A. MODE 1: LOAD COMPENSATING Figure 3 shows the measured power collected from the integrated PV system, the measured load, and the optimization results for the ESS running in mode 1 (load compensating mode).The measured load and PV system data are used as forecast input for the optimization along with the initial SOC to compare the optimization result against measured data.As shown for this case, when a load appears, the optimization formulation projects the system discharge to track the load.However, because the load exceeds the rated power of the system, the system only discharges to the 5 kW limit.Once the load is no longer observed, the optimization immediately begins charging the system.Results of the optimization projections compared against the measured charging of the ESS and measured SOC during this period are presented in Figs. 4  and 5, respectively.The system overall SOC is calculated as the sum of the first battery SOC and the second battery SOC.For this reason, in the plots the SoC range is between 0 and 200.As shown, the projected optimization SOC follows the same functionality as the measured SOC and almost perfectly matches the charging power.This slight mismatch is likely a result of inaccuracies associated with charge and discharge efficiency in the energy storage model.Tuning the energy storage model to better represent the measured data is the subject of future work.This result validates the SOC modeling and proper coupling between overall system charge and discharge power and Mode 1 charge and discharge power.

B. MODE 2: LOCAL SOLAR CONSUMING
Figure 6 shows the measured power collected from the integrated PV system, the measured load, and the optimization results for the ESS running in mode 2 (store extra solar mode).Again, the measured load and PV system data are used as forecast input for the optimization along with the initial SOC to compare the optimization result against the measured data.As shown in Figure 6, the charging power follows the difference between the PV and the load (Blue Line).During discharge periods, the discharge power is less than the load, which is expected because the discharge power is governed by a maximum limit of 5 kW.As shows in Figure 7, the     interval 25 which can be caused due to calculating the power every five minutes.The measured SOC and the calculated SOC by the optimization match almost perfectly as shown in Figure 8.This validates the proper modeling and coupling between system SOC, system charge and discharge power, and mode 2 charge and discharge power.

C. MODE 3: LIMITED LOAD COMPENSATION
Figure 9 shows the measured power collected from the integrated PV system, the measured load, and the optimization results for the ESS running in mode 3 (limited load compensation mode).In this event, no PV power is present, and only load is measured.When load is observed, the optimization projects that the ESS will discharge to meet the load (up to the 5 kW limit).Figure 10 shows that the projected SOC from the optimization matches almost perfectly with the measured SOC.This implies that the relation between the system SOC, system charge and discharge power, and the mode charge and discharge power are captured properly.results for the ESS running in mode 4 (multimode load and solar).As shown, the ESS discharges when a load is measured but charges only when PV power is available.Figure 12 shows that the projected charging power by the optimization and the measured charging power match almost perfectly.There is a mismatch between time interval 45 and 50 which can be addressed by using a dynamic constant rather than a fixed constant for charging power in Eq. (35 and 36). Figure 13 shows that the forecasted SOC by the optimization follows the measured SOC.There is a mismatch in the slope of these two plots between time interval 40 and 60 which is a result of the charge and discharge power efficiency used in SOC model.Fine tuning of this variable is a subject of the future work.These plots validate the SOC model formulation and proper modeling of mode 4 charge and discharge power and coupling it with overall system charge and discharge power.

E. OPTIMIZATION CONSIDERING CHANGING MODES
With the available vendor defined operational modes modeled individually, we tested the objective function while   considering a dynamic price and all operational modes included.The price signal is based on residential TOU pricing with a peak-price of $0.20/kWh and a low-price of $0.05/kWh (Fig. 14). Figure 15 shows the measured load power in green and the measured PV generated power in purple.In this figure, optimization charge and discharge power are shown by dark blue and red, respectively.The goal of optimization is to minimize the power purchasing cost from the grid and maximizing the power selling cost to the grid.We can see this in Figure 14 in which the difference between  the grid discharge and grid charge is negative during the peak time and positive during non-peak period.
Figure 16 shows the optimization SOC, and Fig. 17 shows the modes selected by the optimization.As shown, the optimization opted to charge the ESS before the price peaked by selecting mode 2 (store extra solar mode).This mode enforces charging when solar is present and is used to drive the SOC to a higher state before the peak-price period.Once the price peak is reached, the optimization opted to discharge or switch to mode 1 (load compensating mode).This forced the ESS to cover most of the load while sending solar energy back to the grid (creating a negative power).As the ESS reaches a minimum SOC threshold at 90%, the optimization attempts to hold the energy capacity by switching modes.

VI. CONCLUSION AND FUTURE WORK
The increasing electrification of buildings and the growing adoption of DERs like solar power has created a pressing demand for the advancement of optimization and control techniques for integrated ESS in conjunction with other building loads and generated power.These techniques are crucial for providing grid services and ensuring the reliable operation of the power grid.In recent years, ESS vendors are shifting towards defining more complex operational modes for these systems which is based on a device-level optimization.To effectively develop optimization and control strategies for such systems, it is important to properly model the behavior of these operational modes, establish their relationship with system disturbances such a load and PV, and overall system charge/discharge power.Consequently, this gives rise to a non-linear optimization problem that is computationally expensive and cannot be solved using open-source linear.
To address this challenge and enable real-world applications for such system, there is a critical need for a linear optimization framework and an accurate yet simplified model capable of capturing the system's dynamic behavior.To address this need, this paper describes a multi-objective model-predictive control for integrated PV and ESS that considers different operational modes.The goal of the optimization is to minimize the cost of purchasing power from the grid and to maximize the amount of power sold back to the grid.We developed a general approach that linearizes the optimization formulation when considering various operational modes while coupling them with system disturbances and overall ESS charge/discharge power.This is crucial for deployment of optimization for integrated ESS used by utilities and building operators.Each of these vendors defined operational mode is basically a device-level optimization to achieve the mode objective such as solar self-consumption.We validated the accuracy of model-predictive optimization in capturing the behavior of each operational mode by running the optimization for that mode with a flat price.We did this experiment for each operational mode and compared the result with the measured data when the ESS was operating under that mode.The result validated our proper formulation and coupling of the operational mode with system disturbances and overall system charge and discharge power.Although an exact match to the ESS model was not captured, future work is anticipated to utilize artificial intelligence tuning approaches to better fit the model to the data.This future task will involve using AI for periodic and dynamic tuning of the charge and discharge power efficiency and the constant weights associated to the calculated charge and discharge power.
We also evaluated the effectiveness of our optimization method based on a TOU price.As presented in the result section, by having the optimization select between the modes, the optimization can manage the system to meet cost objectives using vendor defined operational mode.We demonstrated the ESS is forced to cover most of the load while sending solar energy back to the grid during the peak period (creating a negative power).Our developed approach offers utilities and building operators a valuable solution for implementing cost-effective and computationally efficient linearized optimization methodologies for their integrated ESS with PV and other loads.By leveraging open-source solvers, our approach significantly reduces computational expenses and deployment costs.Furthermore, it can be applied to any device, accommodating the growing complexity of operational modes introduced by system vendors.
In this experiment, we use the measured PV and load as an input to our optimization.For future work, we are aiming to use data driven algorithm such as long short-term memory to forecast the load and PV power and integrate that result in the battery optimization.The other future experiment includes developing and testing a whole house optimization which includes the battery optimization along with HVAC and water heater optimization to minimize the power purchased from the grid while satisfying the homeowner comfort constraints.

FIGURE 2 .
FIGURE 2. Picture of deployed integrated PV and ESS.
decreasing contribution until SOC max t is reached.The formulations of these considerations are shown in Eqs.(11)-(14).

FIGURE 3 .
FIGURE 3. Measured power (load and PV) as used in validating the optimization formulation and corresponding charge and discharge power for mode 1 operation.

FIGURE 4 .
FIGURE 4. Charging power modeling for mode 1.The dark-blue line represents the optimization charging power, and the light-blue line is the measured charging power.It can be seen that these lines match nicely.

FIGURE 5 .
FIGURE 5. SOC modeling for mode 1.The orange line represents the optimization SOC, and the blue line is the measured SOC.These two lines are very close which implies on the accuracy of battery model.

FIGURE 6 .
FIGURE 6. Measured power (load and PV) as used in validating the optimization formulation and the corresponding charge and discharge power for a mode 2 operation.

FIGURE 7 .
FIGURE 7. Charging power modeling for mode 2. The dark-blue line represents the optimization charging power, and the light-blue line is the measured charging power.We can see that the measured data and modeled and optimized data aligned nicely.

FIGURE 8 .
FIGURE 8. SOC modeling for mode 2. The orange line represents the optimization SOC, and the blue line is the measured SOC.

FIGURE 9 .
FIGURE 9. Measured power (load and PV) as used in validating the optimization formulation and corresponding charge and discharge power for a mode 3 operation.

FIGURE 10 .
FIGURE 10.SOC modeling for mode 3. The orange line represents the optimization SOC, and the blue line is the measured SOC.

FIGURE 11 .
FIGURE 11.Measured power (load and PV) as used in validating the optimization formulation and corresponding charge and discharge power for a mode 4 operation.

FIGURE 12 .
FIGURE 12. Charging power modeling for mode 3. The dark-blue line represents the optimization charging power, and the light-blue line is the measured charging power.

FIGURE 13 .
FIGURE 13.SOC modeling for mode 4. The orange line represents the optimization SOC, and the blue line is the measured SOC.

FIGURE 14 .
FIGURE 14.Price signal and net PV and ESS power.It can be seen that during high peak price the algorithms tries to maximize its benefit by selling power back to the grid.

FIGURE 15 .
FIGURE 15.Measured power (load and PV) and ESS charge and discharge power.It can be seen that when there is a load, the optimization discharges the battery and when there is extra PV production, it tries to charge the battery.

FIGURE 16 .
FIGURE 16.Optimization SOC.During high peak price the battery discharged until it hits the min SOC, then it charges again but still tries to avoid purchasing power from the grid till end of peak (around minute 45).

FIGURE 17 .
FIGURE 17. Modes selected by the optimization.We can see only one mode is activated at each time.

TABLE 1 .
PV and energy storage integrated system modes.
Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.