top of page

Matlab simulation of Off grid Solar PV Battery system

Matlab simulation of Off grid Solar PV Battery system


Hello, viewers! Welcome to LMS Solution. Today, we delve into the intricacies of an off-grid solar PV battery system. This simulation model incorporates solar panels, a battery, and a backup generator to provide a reliable and sustainable power solution. Let's explore the components and the system's operation in various scenarios

Simulation Model Overview

The system comprises a solar panel array with a total rating of 2000 watts. Each individual panel has a rating of 250 watts, with a maximum power point voltage of 30.9 volts and a maximum current of 8.1 amps. The panels are arranged in four series per string, with two parallel strings. The output of the solar panels is fed into a single-phase DC-DC converter, supplying power to both the AC load and the battery. Additionally, there's an AC input, either from the grid or a backup generator, serving as a supplementary power source.

MPPT Algorithm and Battery Charging Control

To extract the maximum power from the solar panels, a Maximum Power Point Tracking (MPPT) algorithm, specifically Particle Swarm Optimization (PSO), is employed. The PSO algorithm adjusts the duty cycle of the DC-DC converter to optimize power extraction. The battery charging is controlled based on the PSO results, ensuring efficient utilization of solar power.

System Operation Scenarios

1. High Irradiation Scenario

In conditions of high irradiation, the solar panels generate significant power. The battery is in a charging mode, and the excess power is used to supply the AC load. The backup generator is inactive in this scenario.

2. Low Irradiation Scenario

When irradiation decreases, the solar panels generate less power, leading to the battery supplying power to the AC load. The backup generator comes into play to maintain power to the AC load, ensuring uninterrupted power supply.

3. Generator Set Integration

The inclusion of a backup generator enhances the system's capability. During low solar power or battery levels, the generator provides additional power to both the battery and the AC load, maintaining system reliability.

4. Changing Irradiation Levels

Simulating changing irradiation levels demonstrates the system's adaptability. As irradiation increases, the solar panels contribute more to the power supply, reducing the reliance on the backup generator.

5. Ideal Battery Scenario

In a scenario where the battery is at an ideal charging level, the solar panels and the backup generator share power to supply the AC load, ensuring consistent power delivery.


The simulation and analysis of the off-grid solar PV battery system showcase its versatility and efficiency in different operating conditions. The integration of solar power, battery storage, and a backup generator provides a robust solution for reliable off-grid power supply.

19 views0 comments


bottom of page