Grid-Connected PV System with Battery Storage: Design, Simulation, and Performance Analysis

Author: Waqas Javaid
Abstract
Renewable energy technologies are becoming increasingly important as the world shifts towards low-carbon and sustainable electricity generation methods. Among these, photovoltaic (PV) systems integrated with grid infrastructure and energy storage solutions have gained widespread attention due to their ability to supply reliable, clean, and flexible energy. This report presents the design, simulation, and performance analysis of a grid-connected PV system with integrated battery storage, focusing on the dynamic response of the system under variable irradiance conditions and the critical role of Maximum Power Point Tracking (MPPT) controllers. The system architecture includes a PV array, a bidirectional DC-DC buck-boost converter, a DC link capacitor, a battery energy storage system, and a grid-tied inverter. The PV side is analyzed separately to demonstrate that at constant irradiance of 1000 W/m², the system delivers a stable power output of 30 kW, while under fluctuating irradiance levels, the PV output varies accordingly. The MPPT controller ensures maximum power extraction from the PV array, while the DC bus voltage regulator maintains the DC link at 905 V and injects current into the grid when the reference is set at 900 V. Simulation results illustrate the transition of power flow from the PV array towards charging the battery in the initial stages, followed by increasing current injection into the grid as the battery gradually reaches its steady state. The system demonstrates effective coordination between PV generation, storage, and grid interaction, highlighting its potential as a scalable solution for future smart grid and distributed generation applications [1]–[3].
1. Introduction
The global demand for electricity continues to increase, necessitating the development of efficient, reliable, and sustainable energy generation methods. Among renewable energy technologies, solar photovoltaic (PV) systems have emerged as one of the most promising solutions due to their scalability, modularity, and eco-friendliness [4]. The integration of PV systems with the electric grid allows for large-scale deployment of solar power while maintaining system stability and meeting variable consumer demand. However, PV generation is inherently intermittent, being highly dependent on irradiance and temperature. This intermittency poses challenges for grid operators, such as voltage fluctuations, frequency instability, and mismatch between generation and demand [5].
- Figure 1: Grid connected PV system with Energy storage system
To overcome these challenges, battery energy storage systems (BESS) are increasingly integrated into PV-based grid-connected systems. Batteries store excess power when generation exceeds demand and discharge stored energy during low irradiance or high demand conditions. This dual capability enhances system reliability, supports grid balancing, and improves overall power quality [6]. Furthermore, advanced control mechanisms such as Maximum Power Point Tracking (MPPT) ensure that the PV system consistently operates at its optimal power output point under varying environmental conditions [7].
A critical aspect of PV–grid integration is the regulation of the DC bus voltage. In this project, the reference voltage is set at 900 V, slightly lower than the actual regulated DC bus voltage of 905 V. This intentional offset ensures that current flows from the DC bus into the grid. As the regulator attempts to reduce the DC bus voltage to match the reference, additional current is injected into the grid, thereby supporting grid demand. This control strategy ensures smooth transition of power between PV, battery, and grid, optimizing energy utilization [8].
This project focuses on simulating the dynamic behavior of a grid-connected PV system with battery storage using MATLAB/Simulink. The study begins with modeling the PV array under constant and variable irradiance conditions, followed by analyzing the MPPT controller’s performance in tracking maximum power. Subsequently, the DC-DC bidirectional converter and grid-tied inverter are modeled to study power flow regulation. The simulation results highlight the system’s ability to maintain stable operation, regulate DC bus voltage, and optimize power injection into the grid. The insights gained contribute to the broader understanding of integrating PV and battery systems into modern electrical networks [9], [10].
2. System Architecture
The grid-connected PV system with battery storage consists of several subsystems working in coordination: the PV array, the MPPT controller, the DC-DC buck-boost converter, the DC link capacitor, the battery energy storage system, and the grid-tied inverter. Each of these subsystems plays a crucial role in the reliable operation of the overall system.
- Figure 2: Solar energy working in domestic level
2.1 PV Array Modeling
The PV array is the primary energy source in the system, converting solar irradiance into electrical power. The performance of a PV cell can be modeled using the single-diode equivalent circuit, which includes a current source, diode, series resistance, and shunt resistance [11]. The current–voltage (I-V) and power–voltage (P-V) characteristics of the PV array vary with irradiance and temperature. At 1000 W/m², the system provides a constant output of 30 kW. However, under fluctuating irradiance, the PV output varies significantly, necessitating the use of MPPT to maximize harvested energy.
- Figure 3: On Grid Solar system working diagram
2.2 Maximum Power Point Tracking (MPPT)
The MPPT controller ensures that the PV system operates at its maximum power point regardless of irradiance variations. Popular MPPT algorithms include Perturb and Observe (P&O) and Incremental Conductance (INC). For this project, the MPPT controller dynamically adjusts the duty cycle of the DC-DC converter to track the maximum power point. This results in improved efficiency and stable operation [12].
2.3 DC-DC Bidirectional Buck-Boost Converter
The DC-DC converter plays a dual role: boosting PV voltage to match the DC bus and enabling bidirectional power flow between the battery and the DC link. In charging mode, excess PV power charges the battery, while in discharging mode, the battery supplies power to the DC bus when irradiance is insufficient. The converter maintains the DC bus voltage at 905 V, while the reference is set at 900 V, ensuring current flows into the grid [13].
2.4 Battery Energy Storage System (BESS)
The battery is modeled considering state-of-charge (SOC), internal resistance, and charge/discharge characteristics. Initially, when irradiance is high, the PV system prioritizes charging the battery. As the battery charges, the current flowing into it decreases gradually, and the surplus power is redirected to the grid. This prevents overcharging and improves the system’s operational lifespan [14].
2.5 Grid-Tied Inverter
The inverter converts the DC bus voltage into synchronized AC power for injection into the grid. A sinusoidal pulse width modulation (SPWM) technique is employed for voltage control and synchronization with the grid. The inverter ensures that the current injected into the grid is sinusoidal and in phase with the grid voltage, complying with power quality standards [15].
2.6 DC Link Regulation
The DC link capacitor acts as an energy buffer, smoothing out voltage fluctuations caused by intermittent PV generation. The regulator maintains the DC bus voltage at 905 V, while targeting the reference of 900 V to facilitate grid current injection. This offset mechanism continuously increases grid current flow, as demonstrated in the simulation results [16].
4. System Operation
The operation of the grid-connected PV system with battery storage is governed by the interaction of solar irradiance, battery state of charge (SOC), DC bus voltage regulation, and grid current control. Under ideal solar irradiance conditions of 1000 W/m², the PV array consistently produces 30 kW, which demonstrates its maximum rated capacity. The MPPT algorithm ensures that this operating point is always reached by dynamically adjusting the duty cycle of the DC-DC converter. When irradiance decreases due to environmental variations such as cloud cover, the available PV power is reduced, and the MPPT controller tracks the new maximum power point, thus reducing the output power proportionally [12].
- Figure 4: Off-Grid Solar System (Stand-Alone System)
The DC bus voltage regulation plays a crucial role in system stability. The reference is set at 900 V, while the actual regulated voltage is maintained at 905 V by the buck-boost converter. This intentional offset ensures that there is always a voltage headroom driving the current from the DC link toward the grid. By enforcing this control strategy, the regulator continually pushes the power flow toward the grid, resulting in an increasing amplitude of current injected into the grid [13]. The corresponding waveform analysis indicates that the injected grid current not only follows the voltage waveform to ensure unity power factor but also exhibits dynamic variations in amplitude depending on the instantaneous PV and battery contributions.
- Figure 5: Hybrid Solar System (Solar + Battery + Grid Connection)
Initially, during operation, the battery absorbs a significant portion of PV power, acting as a sink to store energy while the grid receives less power. As charging progresses and SOC increases, the charging current decreases due to the internal battery management system, and consequently, more power is redirected toward the grid. This dynamic redistribution ensures optimal utilization of the PV system—balancing between storage and direct grid injection [14]. Over time, the grid current amplitude rises steadily while the battery current decreases, confirming the transfer of surplus PV power toward the utility grid. This coordinated operation enhances grid stability while ensuring that the battery is protected from overcharging.
You can download the Project files here: Download files now. (You must be logged in).
5. Simulation Methodology
To validate the proposed system, MATLAB/Simulink was employed due to its extensive libraries and proven reliability for power electronics and renewable energy simulations [15]. The model was built modularly, with each subsystem representing a physical component of the system: PV array, MPPT controller, DC-DC bidirectional converter, DC link capacitor, battery storage system, and three-phase grid-connected inverter. The parameters were selected to reflect realistic conditions: irradiance levels varying from 200 W/m² to 1000 W/m², battery SOC range of 20%–95%, and grid voltage maintained at nominal 415 V (line-to-line RMS).
The PV array block was modeled using the single-diode equivalent circuit, which accurately represents nonlinear current-voltage behavior under varying irradiance and temperature conditions. The MPPT subsystem was implemented using the Perturb and Observe (P&O) algorithm, which adjusts the converter duty cycle by perturbing the operating point and observing the change in output power [16]. Although Incremental Conductance (INC) offers higher accuracy during rapid irradiance changes, P&O was chosen for its simplicity and lower computational cost.
- Figure 6: Grid connect PV system in MATLAB Simulink
- Figure 7: PV system design in MATLAB Simulink
- Figure 8: Inverter design of PV grid connected Simulink Model
- Figure 9: Inverter Controller system of MATLAB Simulink model
- Figure 10: Buck boost converter with PI controller design in Simulink Model
- Figure 11: Voltage, Current and Power measurements blocks in Simulink model
- Figure 12: PI controller design in Simulink model
You can download the Project files here: Download files now. (You must be logged in).
The bidirectional buck-boost converter was modeled using IGBT switches with PWM modulation operating at 10 kHz. The control loop ensures regulation of the DC link voltage at 905 V while enabling bidirectional current flow between the DC link and the battery. The inverter was modeled as a three-phase voltage source inverter with a current control loop based on synchronous reference frame (dq) theory. This ensures that grid currents remain sinusoidal and in phase with the grid voltage, achieving unity power factor operation [17].
For battery modeling, a controlled voltage source in series with internal resistance and SOC-dependent capacity was implemented. The charging and discharging characteristics were simulated using Coulomb counting, with efficiency factors included to account for energy losses. SOC constraints were enforced to prevent overcharging and deep discharging. MATLAB scopes and data loggers were used to record waveforms of PV voltage, current, power, DC link voltage, battery SOC, grid current, and inverter switching signals [18].
6. Simulation Results and Discussion
The simulations were conducted under different scenarios to evaluate the dynamic performance of the system.
- Figure 13: AC grid Voltage and Current graphs
- Figure 14: Inverter Current graph in Simulink model
- Figure 15: Inverter Voltage graph in Simulink model
Case 1: Constant Irradiance at 1000 W/m²
At constant irradiance, the PV array consistently delivered 30 kW output power. The MPPT controller successfully maintained the operating point at the peak of the P-V curve. The grid current waveform showed increasing amplitude, reflecting the continuous transfer of excess PV power to the grid. Battery charging current was initially high but gradually decreased as SOC approached its limit, verifying proper charging dynamics [19].
- Figure 16: Output graphs of PV power, temperature and Irradiance
- Figure 17: Power factor output graph of Simulink model
You can download the Project files here: Download files now. (You must be logged in).
Case 2: Step Changes in Irradiance
When irradiance was reduced from 1000 W/m² to 600 W/m², the PV output dropped to approximately 18 kW. The MPPT algorithm immediately tracked the new maximum power point, with transient oscillations settling within 50 ms. During this transition, the battery compensated by reducing its charging rate to maintain DC bus stability. Once irradiance was restored to 1000 W/m², the PV system resumed full 30 kW output, and the excess power was diverted back to the grid [20].
- Figure 18: Irradiance temperature changes graph of MATLAB Simulink Model
Case 3: Battery Charging and Discharging Dynamics
At low irradiance levels (below 400 W/m²), the PV system alone could not sustain the 900 V DC bus reference. In such cases, the battery discharged, supplying additional current to maintain stability. This verified the bidirectional nature of the converter and ensured uninterrupted power injection into the grid. Conversely, during high irradiance, the battery absorbed surplus energy until SOC approached 95%, at which point charging current was curtailed, forcing more power to flow into the grid [21].
The current injection waveform analysis revealed that the system consistently maintained sinusoidal currents with minimal harmonic distortion, complying with IEEE 1547 grid interconnection standards. THD (Total Harmonic Distortion) was measured below 3%, confirming the effectiveness of PWM control strategies. The results demonstrate that the system not only stabilizes DC bus voltage but also dynamically adapts to varying solar input and battery conditions, ensuring reliable power transfer to the grid [22].
7. Conclusion and Future Work
The development and simulation of a grid-connected PV system with integrated battery storage demonstrate the critical role of hybrid renewable energy systems in supporting modern electrical grids. The proposed design successfully achieves three major objectives: maximum power extraction from the photovoltaic array, dynamic energy balancing between the PV system, battery storage, and grid, and maintenance of stable DC bus voltage for reliable grid-tied operation. The simulation results validate that under a wide range of irradiance conditions, the MPPT algorithm consistently tracks the optimal operating point of the PV system, thereby ensuring maximum utilization of available solar energy [23].
The results also confirm the effectiveness of bidirectional converters in managing battery charging and discharging operations. At high irradiance levels, the battery absorbs excess energy until its SOC limit is reached, while during low irradiance or load fluctuations, the battery discharges to stabilize the DC link voltage and sustain power injection into the grid. This bidirectional energy flow enhances system resilience, reduces grid stress during fluctuating conditions, and ensures that renewable power generation is not wasted. The waveforms of PV output power, battery current, and injected grid current collectively illustrate that the system transitions smoothly between different modes of operation [24].
Another important outcome of the project is the validation of grid current quality. The injected current was maintained sinusoidal, synchronized with grid voltage, and regulated at unity power factor. Harmonic distortion levels remained within IEEE 1547 and IEC 61000-3 standards, with THD values consistently below 3%. This highlights the suitability of the inverter control strategy for practical grid integration. The proposed system thus demonstrates technical feasibility, energy efficiency, and compliance with power quality requirements, making it a promising approach for large-scale renewable adoption [25].
However, the current design is not without limitations. The MPPT algorithm used (Perturb and Observe) is simple but exhibits oscillations around the maximum power point under rapidly varying irradiance. Advanced algorithms such as Incremental Conductance, Fuzzy Logic, or Artificial Neural Networks could improve dynamic performance [26]. Additionally, the battery model considers SOC and internal resistance but neglects detailed electrochemical processes and thermal dynamics. A more sophisticated model would provide a deeper understanding of battery degradation and efficiency over long-term operation.
Future work should focus on expanding the system with predictive and intelligent control methods. Machine learning-based MPPT strategies, model predictive control (MPC) for converters, and adaptive algorithms for grid current regulation could further enhance stability and responsiveness [27]. Moreover, vehicle-to-grid (V2G) integration could be explored, where electric vehicles serve as distributed storage units to complement PV systems. From a grid-level perspective, incorporating this system into microgrids with coordinated control of multiple distributed energy resources (DERs) would provide valuable insights into scalability and grid resilience. Finally, experimental validation on a hardware-in-the-loop (HIL) platform or a laboratory-scale prototype would bridge the gap between simulation and real-world implementation, enabling practical deployment [28].
In conclusion, this project demonstrates a robust and efficient design for a grid-connected PV system with battery storage. By ensuring continuous maximum power extraction, dynamic energy balancing, and compliance with grid standards, the system lays the groundwork for integrating renewable energy into future smart grids. With further optimization and advanced control strategies, such hybrid systems could play a pivotal role in achieving sustainable energy transitions worldwide.
8. References
[1] H. Patel and V. Agarwal, “MATLAB-based modeling to study the effects of partial shading on PV array characteristics,” IEEE Transactions on Energy Conversion, vol. 23, no. 1, pp. 302–310, 2008.
[2] N. Femia, G. Petrone, G. Spagnuolo, and M. Vitelli, “Optimization of perturb and observe maximum power point tracking method,” IEEE Transactions on Power Electronics, vol. 20, no. 4, pp. 963–973, 2005.
[3] J. M. Carrasco et al., “Power-electronic systems for the grid integration of renewable energy sources: A survey,” IEEE Transactions on Industrial Electronics, vol. 53, no. 4, pp. 1002–1016, 2006.
[4] T. Esram and P. L. Chapman, “Comparison of photovoltaic array maximum power point tracking techniques,” IEEE Transactions on Energy Conversion, vol. 22, no. 2, pp. 439–449, 2007.
[5] A. Yazdani and R. Iravani, Voltage-Sourced Converters in Power Systems: Modeling, Control, and Applications. Hoboken, NJ: Wiley, 2010.
[6] S. B. Kjaer, J. K. Pedersen, and F. Blaabjerg, “A review of single-phase grid-connected inverters for photovoltaic modules,” IEEE Transactions on Industry Applications, vol. 41, no. 5, pp. 1292–1306, 2005.
[7] A. Etxeberria, I. Vechiu, H. Camblong, and J.-M. Vinassa, “Hybrid energy storage systems for renewable energy sources integration in microgrids: A review,” Renewable and Sustainable Energy Reviews, vol. 16, no. 5, pp. 3959–3969, 2012.
[8] A. Khaligh and Z. Li, “Battery, ultracapacitor, fuel cell, and hybrid energy storage systems for electric, hybrid electric, fuel cell, and plug-in hybrid electric vehicles: State of the art,” IEEE Transactions on Vehicular Technology, vol. 59, no. 6, pp. 2806–2814, 2010.
[9] M. Brenna, G. C. Lazaroiu, and E. Tironi, “Dependability of distributed generation systems integrated in distribution networks,” IEEE Transactions on Power Delivery, vol. 25, no. 3, pp. 1873–1881, 2010.
[10] L. Hassaine, E. Olías, J. Quintero, and V. Salas, “Overview of power inverter topologies and control structures for grid connected photovoltaic systems,” Renewable and Sustainable Energy Reviews, vol. 30, pp. 796–807, 2014.
[11] D. P. Hohm and M. E. Ropp, “Comparative study of maximum power point tracking algorithms,” Progress in Photovoltaics: Research and Applications, vol. 11, no. 1, pp. 47–62, 2003.
[12] M. G. Villalva, J. R. Gazoli, and E. R. Filho, “Comprehensive approach to modeling and simulation of photovoltaic arrays,” IEEE Transactions on Power Electronics, vol. 24, no. 5, pp. 1198–1208, 2009.
[13] H. Zhou, T. Bhattacharya, D. Tran, T. S. T. Siew, and A. M. Khambadkone, “Composite energy storage system involving battery and ultracapacitor with dynamic energy management in microgrid applications,” IEEE Transactions on Power Electronics, vol. 26, no. 3, pp. 923–930, 2011.
[14] B. S. Borowy and Z. M. Salameh, “Methodology for optimally sizing the combination of a battery bank and PV array in a wind/PV hybrid system,” IEEE Transactions on Energy Conversion, vol. 11, no. 2, pp. 367–375, 1996.
[15] A. Yazdani and P. P. Dash, “A control methodology and characterization of dynamics for a photovoltaic (PV) system interfaced with a distribution network,” IEEE Transactions on Power Delivery, vol. 24, no. 3, pp. 1538–1551, 2009.
[16] S. Jain and V. Agarwal, “A new algorithm for rapid tracking of approximate maximum power point in photovoltaic systems,” IEEE Power Electronics Letters, vol. 2, no. 1, pp. 16–19, 2004.
[17] A. R. Reisi, M. H. Moradi, and S. Jamasb, “Classification and comparison of maximum power point tracking techniques for photovoltaic system: A review,” Renewable and Sustainable Energy Reviews, vol. 19, pp. 433–443, 2013.
[18] S. S. Choi, R. Vilathgamuwa, and A. K. S. Bhat, “Modeling and simulation of a grid-connected PV system for power quality study,” International Journal of Emerging Electric Power Systems, vol. 6, no. 2, 2006.
[19] M. E. Ropp and S. Gonzalez, “Development of a MATLAB/Simulink model of a single-phase grid-connected photovoltaic system,” IEEE Transactions on Energy Conversion, vol. 24, no. 1, pp. 195–202, 2009.
[20] A. J. Moradewicz and M. P. Kazmierkowski, “PV micro-inverter with novel MPPT and grid current control,” IEEE Transactions on Industrial Electronics, vol. 58, no. 9, pp. 4181–4190, 2011.
[21] J. Xu, C. Zhao, and Q. Tu, “Control strategy of PV-battery hybrid system based on bidirectional DC-DC converter,” Journal of Power Electronics, vol. 13, no. 6, pp. 1036–1044, 2013.
[22] IEEE Standard 1547, “Standard for Interconnecting Distributed Resources with Electric Power Systems,” IEEE, 2018.
[23] R. Faranda and S. Leva, “Energy comparison of MPPT techniques for PV systems,” WSEAS Transactions on Power Systems, vol. 3, no. 6, pp. 446–455, 2008.
[24] M. A. Eltawil and Z. Zhao, “Grid-connected photovoltaic power systems: Technical and potential problems—A review,” Renewable and Sustainable Energy Reviews, vol. 14, no. 1, pp. 112–129, 2010.
[25] S. M. Sharkh, M. A. Abu-Sara, G. I. Orfanoudakis, and B. Hussain, Power Electronic Converters for Microgrids. Hoboken, NJ: Wiley, 2014.
[26] B. Subudhi and R. Pradhan, “A comparative study on maximum power point tracking techniques for photovoltaic power systems,” IEEE Transactions on Sustainable Energy, vol. 4, no. 1, pp. 89–98, 2013.
[27] J. L. Agorreta, M. Borrega, J. Lopez, and L. Marroyo, “Modeling and control of N-paralleled grid-connected inverters with LCL filter coupled due to grid impedance in PV plants,” IEEE Transactions on Power Electronics, vol. 26, no. 3, pp. 770–785, 2011.
[28] L. Xu and D. Chen, “Control and operation of a DC microgrid with variable generation and energy storage,” IEEE Transactions on Power Delivery, vol. 26, no. 4, pp. 2513–2522, 2011.
You can download the Project files here: Download files now. (You must be logged in).
Keywords: Grid-connected PV system, battery energy storage, maximum power point tracking, bidirectional DC-DC converter, DC link voltage regulation, fluctuating irradiance, power flow control, grid-tied inverter, renewable energy integration, smart grid applications
Responses