top of page

MATLAB Implementation of PV Battery DC Microgrid with ANFIS MPPT

1. Designing the Battery and Converter Setup

The system begins with designing a battery bank consisting of 12V batteries connected in series (10 in total), resulting in a total voltage of 120V. A bidirectional DC-DC converter is designed to regulate energy flow between the PV system, battery, and load.

Key parameters such as:

  • Inductor and capacitor sizing

  • Ripple voltage and current

  • Load resistance

  • Duty cycle

...are calculated to ensure stable power transfer. The load voltage is regulated to 220V, which is ideal for typical DC loads.




2. Bidirectional Converter Configuration in Simulink

The converter includes:

  • Two switching devices

  • Inductor and capacitor components

  • Load-side filtering

The battery is rated at 40 Ah with an initial state of charge (SOC) of 50%. A multimeter is used within the Simulink model to monitor voltage, current, and power at the load side. The load power is calculated as the product of load voltage and current.

To regulate voltage across the load, a PI controller is implemented with tuned values:

  • Proportional Gain (Kp): 0.001

  • Integral Gain (Ki): 0.1

The controller outputs a signal with a 10 kHz switching frequency to manage the converter’s duty cycle and maintain a constant 220V DC load voltage.



3. Solar PV Array Design

The solar PV system consists of:

  • 1 parallel string and 4 series-connected panels

  • Each panel rated at 250W, 30.7V, and 8.15A

The combined array delivers up to 1000W under full irradiation (1000 W/m²). The boost converter on the PV side is designed using standard equations for inductor and capacitor sizing based on input voltage and desired output voltage.

4. ANFIS-Based MPPT: Data Collection and Training

Before implementing the MPPT algorithm, training data for the ANFIS model is generated using the standard PV panel equations. Inputs for the training include:

  • Irradiation levels (0–1000 W/m²)

  • Temperature range (15–35°C)

Output targets are:

  • Vmp (Voltage at Max Power)

  • Pmp (Power at Max Power)

The dataset includes the combination of irradiation, temperature, and expected voltage. This data is used to train the ANFIS model.

5. ANFIS Model Configuration and Training

The ANFIS model is configured with:

  • 5 membership functions for each input (irradiation, temperature)

  • Linear output functions

  • 100 training iterations

The training results are validated by comparing the trained outputs against the collected dataset. The model shows good accuracy and is then exported and saved for integration into the MPPT system.

6. Integrating ANFIS MPPT in the Simulation

The trained ANFIS model is loaded into the system to predict the PV voltage based on real-time irradiation and temperature values. This predicted voltage is compared with the actual PV voltage and used as input for a PI controller, which then generates a PWM signal (10 kHz) to adjust the boost converter.

7. Dynamic Testing with Varying Irradiation Conditions

The system is tested under dynamically changing irradiation conditions:

  • Starts at 1000 W/m², then drops to 800, 600, 400, and 200 W/m² at 2-second intervals

  • Temperature is kept constant at 25°C

As expected, PV power output drops proportionally with irradiation. The system ensures the load voltage remains stable at 220V, and load power adjusts accordingly.

8. Battery Charging and Discharging Behavior

When PV power exceeds load demand, the battery charges (indicated by negative current flow). As irradiation decreases and PV generation drops below 500W (load requirement), the battery discharges to compensate for the shortfall, indicated by positive current flow.

This automatic switch between charging and discharging modes demonstrates the effectiveness of the bidirectional converter and control strategy.

Conclusion

This MATLAB-based implementation of a PV-Battery DC Microgrid with ANFIS MPPT control showcases an efficient, intelligent approach to renewable energy management. The integration of ANFIS enables adaptive and accurate tracking of the maximum power point under varying environmental conditions, while the bidirectional converter ensures seamless load support from both PV and battery sources.

Comments


bottom of page