A Model Predictive Power Control Scheme for PV Inverter and Battery Energy Storage System for a Microgrid

In recent decades, there has been a substantial surge in the adoption of renewable energy systems (RESs), particularly photovoltaic systems (PVs). However, the increasing integration of PV systems into distribution networks has exposed limitations in traditional control methods, such as cascaded linear control with PID controllers. These limitations manifest in dynamic response, power regulation capability, and adaptability to varying operating conditions. Voltage fluctuations arising from intermittent PV output have become a significant concern. The primary aim of this study is to develop a Model Predictive Control (MPC) scheme capable of generating a control signal based on a cost function. The study also seeks to validate the effectiveness of MPC under diverse scenarios. Additionally, an energy storage system, represented by a battery, is incorporated to support the PV system during periods of low power output. The chosen methodology involves using a Dual Active Bridge converter for charging and discharging the batteries. Including an LCL filter in the design significantly reduces THD from 51% to 2.62%. When comparing the response to changing linear loads, MPC demonstrates faster performance than DQ control, with a response time ahead of 0.23 seconds.


Introduction
Over the past few decades, there has been a remarkable growth in renewable energy systems, particularly photovoltaic (PV) systems, driven by ecological, social, economic, and political considerations.The inherent advantages of PV energy, including environmental cleanliness, versatility, scalability, and accessibility, position it as a pivotal player in the global transition towards cleaner and more sustainable energy sources [1].As PV systems become increasingly integrated into distribution networks, traditional control methods face limitations regarding dynamic response, power regulation, and adaptability to varying operating conditions.This paper addresses these challenges by proposing the utilization of Model Predictive Control (MPC) as a novel and effective control scheme.Hierarchical control in microgrids is introduced, highlighting primary, secondary, and tertiary control levels.Conventional droop control methods, widely used for power sharing within microgrids, are discussed, emphasizing their limitations and paving the way for the application of MPC in controlling power electronic converters within PV systems.[2] The core problem addressed in this paper is designing and implementing an MPC-based control system for PV systems integrated into distribution networks.Considering inherent constraints and nonlinearities, the objective is to enhance dynamic response, power regulation, and overall system performance.Also, lithium-ion battery is used as an energy storage system that works under a dual active bridge converter supporting the system.The proposed control strategy aims to improve power quality, grid stability, and the efficient operation of PV systems in modern distribution networks.The working of the Model predictive control scheme is verified under different scenarios in case of linear load, nonlinear load, changing reference voltage, and changing load on a time basis.The utilization of predictive control has gained recent traction in power converters due to its rapid dynamic response, versatility in handling various system constraints and nonlinearities, and ease of implementation.Despite the computational demands of predictive control, advancements in microprocessor capabilities have made its practical application feasible.Predictive control relies on system modeling for predicting the future behavior of controlled variables, enabling optimal actuation based on predefined optimization criteria.Numerous predictive control algorithms have been introduced, such as hysteresisbased predictive control, trajectory-based predictive control, deadbeat control, and model predictive control (MPC), including MPC with finite control set.Deadbeat control and MPC with a continuous control set require a modulator to generate the necessary voltage, resulting in a fixed switching frequency.In contrast, other controllers directly produce switching signals for the converter, avoiding the need for a modulator and allowing for a variable switching frequency.The deadbeat controller, a well-known predictive control type, has found application in various systems, including three-phase inverters, active filters, power factor pre-regulators, uninterruptible power supplies, and DC-DC converters.However, a drawback of deadbeat control is its challenge in incorporating nonlinearities and constraints of system variables.[3] Another approach, MPC, also known as receding-horizon control, uses a system model to predict variable behavior over a specified time horizon, selecting optimal future actions based on a cost function [7].MPC stands out for its flexibility in incorporating system constraints and nonlinearities during the controller 1 A model predictive power control scheme for PV and energy storage system design stage.Different formulations of the cost function, considering various norms and including multiple variables and weighting factors, are possible.MPC can also accommodate different prediction horizons, and the inputs can be treated as continuous, either through a modulator or by simplifying the implementation by modeling the converter with a finite number of switching states [4].The paper introduces a straightforward MPC scheme for a three-phase inverter with an output LC filter.This controller uses a system model to predict the output voltage behavior for each possible switching state on every sampling interval.A cost function is then employed to select the switching state for the next interval.Importantly, this approach eliminates the need for internal current control loops and modulators, with gate-drive signals generated directly by the control scheme.

System Modeling
A simulation model was created on MATLAB that consists of a 50 kW solar, boost converter, and Lithium-ion battery as an energy storage system that works under a dual active bridge converter.Simulation of the system was carried out for different types of loads such as linear load non-A simulation model was created on MATLAB that consists of 50 kW solar, boost converter, Lithium-ion battery as energy storage system which works under dual active bridge converter Simulation of the system were carried out for different types of load such as linear load, nonlinear load, imbalance load and even time changing load scenarios.

Methodology
The model of the system is used to predict the value of the load current in the next sampling interval for each of the different voltage vectors.In this case, the quality function g evaluates the error between the reference and predicted currents in the next sampling interval.The voltage vector that minimizes the current error is selected and applied to the load through the inverter.The MPC function calculates optimal switching states for a solar inverter by predicting output voltages associated with different states and selecting the state that results in the voltage closest to the desired reference voltage while minimizing a cost function.The function uses a simplified optimization-based approach to control the inverter and aims to achieve the desired output while considering system dynamics and constraints.This code provides a basic illustration of how MPC can be applied to control a solar inverter's switching states for voltage regulation.

Converter Modeling
The converter and filter models are presented here.The switching states of the converter are determined by the gating signals Sa, Sb, and Sc as follows:

Solar modeling
A PV system with 50 kW rating output at minimum of 1000 w/m 2 irradiation.Temperature is taken as 25 0 C with 22 parallel strings and 8 series connected per strings.The performance of Photo voltaic under variable and constant irradiance are plotted.

Results and Discussion
A simulation model was created on MATLAB that consists of a 50 kW solar, boost converter, and Lithium-ion battery as an energy storage system which works under a dual active bridge converter

Working of mpc under linear load condition
The analysis of a linear local load of 4 kW is conducted in a scenario with the presence of a photovoltaic (PV) system, an inverter and a battery.The inverter's operations are governed by Model Predictive Control (MPC).Also, the impact of varying the reference voltage from 300V to 500V under different linear load conditions is checked and analyzed, and the resulting Total Harmonic Distortion (THD)

Under combined system
Initially, the power system under study has a 2-kW load, increasing to 3.4 kW at 2.5 seconds and 5 kW at 5 seconds.After 2.5 seconds, the battery charging function activates, causing a discernible voltage drop.This dynamic behavior Figureure results from the evolving load profile and the impact of battery charging, including current draw and voltage fluctuations.The examined power system's battery serves both as an energy provider and receiver.Starting with an 85 percent as State of Charge (SOC), it initially discharges slowly until 2.5 seconds, when it connects to the system.From 2.5 to 5 seconds, the battery charges.The SOC maintenance strategy adapts to load variations, evident in a decline after a 1.6 kW load increase at the fifth second.This showcases the battery's adaptability in balancing energy demand for stable system functionality.

Conclusion
A Model Predictive Control (MPC) framework is developed for a photovoltaic (PV) system with a boost converter, three-phase voltage source inverter, and various loads, incorporating an LCL filter.Using an LCL filter for a linear load of 4 kW reduces Total Harmonic Distortion (THD) from 51.65% to 2.12%.The MPC scheme is validated under linear, nonlinear, imbalance loads, and a combined system.THD variation is plotted with reference voltage changes for linear loads (10, 15, 20 ohms).
In a PV-battery system, with sequential load introduction, the battery compensates for deviations in voltage.
The Dual Active Bridge converter operates at a 90-degree phase angle, minimizing battery charging and discharging.The battery exhibits a slight SOC reduction due to aging during transient periods but efficiently supports the system.

Figure 1 :
Figure 1: Overall model of the system

Figure 3 : 3 ((
Figure 3: Three phase vsi with lc filter Using vectorial notation, the filter current if, the output voltage Vc, and the output current can be expressed as space vector   = 2 3 (  +   +  2   )(4)

Figure 4 :
Figure 4: MATLAB model of mpc

Figure 5 :
Figure 5: PV and IV curve under variable irradiance 2.5 Energy storage system A lithium-ion battery with a capacity of 60 Ah is used.A dual active bridge converter charges and discharges the battery based on phase angle.Positive phase angle means charging of battery whereas negative means

Figure 8 :
Figure 8: battery soc, current and voltage

Table 1 :
PV panel parameters

Table 2 :
battery parameter