top of page

MATLAB Simulation of Dual Buck–Boost Based Grid-Connected PV Inverter System

👋 Introduction

MATLAB/Simulink implementation of a Dual Buck–Boost based Grid-Connected PV Inverter System. This model is developed by referring to a research paper on buck–boost grid-connected PV inverter operation under mismatch and varying environmental conditions. The main goal is to ensure stable grid injection while handling different irradiance levels on two PV strings.

MATLAB Simulation of Dual Buck Boost based PV grid system
₹12,000.00₹6,000.00
Buy Now

🎯 Why Dual Buck–Boost Inverter for Grid-Connected PV?

In practical PV installations, mismatch occurs due to:

  • ☁️ Uneven irradiance (partial shading)

  • 🌡️ Temperature variations

  • 🧱 Module aging or string mismatch

A dual buck–boost structure helps:

  • ⚡ Maintain proper operating voltage for each PV source

  • 🔄 Operate in both buck mode and boost mode depending on conditions

  • 🌐 Inject power into the grid with controlled current and unity power factor

🧩 System Structure (Power Circuit Overview)

The overall system contains three major sections:

  1. ☀️ Two PV sources (PV1 and PV2)

  2. 🔁 Dual Buck–Boost Converter Stage (power conditioning stage)

  3. 🌐 Inverter + Grid Interface (grid synchronization and power injection)

✅ The PV arrays feed the dual buck–boost network, and the inverter stage connects it to the single-phase grid.

☀️ PV Inputs and MPPT Blocks

In this system, two PV sources are used:

  • 🌞 PV1

  • 🌞 PV2

Each PV has its own MPPT:

  • 🧠 MPPT-1 for PV1

  • 🧠 MPPT-2 for PV2

📥 MPPT Inputs:

  • PV voltage (VP1 / VP2)

  • PV current (IP1 / IP2)

📤 MPPT Outputs:

  • Duty-related reference signal → used to generate Vref for each PV

This ensures both PV sources operate close to their respective maximum power points, even if one panel experiences changing irradiance.

🎛️ PI Control for PV Power Processing

After MPPT generates the reference voltage:

  • ⚖️ Vref is compared with PV voltage (VP1, VP2)

  • 🧰 Error is processed through a PI controller

  • 📌 Output becomes PV power terms:

    • Ppv1

    • Ppv2

So this block effectively links MPPT voltage tracking to a controlled power reference for the next stages.

🧮 Calculation of VC01V_{C0_1}VC01​​ and VC02V_{C0_2}VC02​​

Based on the paper’s control approach:

  • Ppv1P_{pv1}Ppv1​ and Ppv2P_{pv2}Ppv2​ are used to compute:

    • 🔹 VC01V_{C0_1}VC01​​

    • 🔹 VC02V_{C0_2}VC02​​

These values represent the converter-side voltage quantities used later for deciding operating mode and current reference calculation.

🧮 Calculation of RPC0R_{PC0}RPC0​ (Converter Equivalent Resistance)

After computing VC01V_{C0_1}VC01​​ and VC02V_{C0_2}VC02​​, the system calculates:

  • 🔹 RPC01R_{PC0_1}RPC01​​

  • 🔹 RPC02R_{PC0_2}RPC02​​

📌 As per the paper, RPC0R_{PC0}RPC0​ is obtained using the given formula involving VC0V_{C0}VC0​ and PV power variables.✅ This resistance term helps decide how much inductor current is required to transfer the extracted PV power through the converter.

🔀 Buck Mode vs Boost Mode Decision

The converter can operate in two modes depending on the relationship between:

  • PV voltage VPN

  • Converter reference voltage VCN

Buck Mode Condition:

  • ⚡ If VPN≥VCN​ → System operates in Buck Mode

Boost Mode Condition:

  • ⚡ If VPN<VCN→ System operates in Boost Mode

This switching logic ensures the dual buck–boost converter always maintains the required operating point.

📌 Inductor Current Reference IL​ Generation

Once the mode is decided, the reference inductor current is calculated:

  • 🟦 In Buck mode: IL​ derived using VC0, RPC0​, and power terms

  • 🟧 In Boost mode: IL is computed using the boost-mode equation given in the paper

📌 This reference current becomes the central control objective for energy transfer.

🎚️ Inductor Current Control Using PI

  • 🔁 IL is compared with actual inductor current ILN​

  • ⚙️ Error is processed via PI controller

  • 📤 PI output becomes an intermediate variable (often denoted B in the paper)

This “B” is used in the duty logic generation stage.

🧠 Duty Cycle Selection Logic (DP & DQ)

After PI current control, the system applies a decision rule:

✅ If VPN≥VC0N

  • DP = A, DQ = 0

✅ Otherwise:

  • DP = 1, DQ = 0 (as shown in your script explanation)

📌 Based on DP and DQ, the switching signals are formed for:

  • 🧷 S1, S3

  • 🧷 S2, S4

These pulses control the dual buck–boost converter stage.

🔄 Inverter Switching Control (S5–S8) Using PLL

The inverter stage is controlled using grid synchronization:

  • 🌐 Grid voltage is measured

  • 🧭 PLL generates phase angle ωt\omega tωt

  • 🟰 This produces synchronized switching for:

    • S5, S6, S7, S8

✅ This ensures:

  • Grid current follows grid voltage

  • Power is injected with unity power factor (voltage and current in-phase)

🌤️ Test Case: Irradiance Mismatch Scenario

To validate mismatch performance:

  • ☀️ PV2 irradiance is fixed at 1000 W/m²

  • 🌥️ PV1 irradiance is varied step-by-step:

    • 500 → 600 → 700 → 800 → 900 → 1000 W/m²

This creates controlled mismatch between PV1 and PV2 to evaluate stability and power sharing.

📊 Simulation Results (What to Observe)

✅ PV Side Outputs

You observe:

  • ⚡ PV1 Power (changes with irradiance)

  • ⚡ PV2 Power (almost constant since irradiance fixed)

  • 🔋 PV voltages VP1, VP2

  • 🔌 PV currents IP1, IP2

📌 Result trend:

  • PV1 power rises step-by-step as irradiance increases

  • PV2 remains nearly steady

This matches the paper’s reported Figure-6 type behavior (PV1 and PV2 response comparison).

✅ Grid Voltage and Grid Current

At the grid side:

  • 🌐 Grid voltage waveform is sinusoidal

  • 🔌 Grid current waveform is sinusoidal and aligned

📌 Key observation:

  • Grid voltage and current remain in-phase

  • ✅ Indicates unity power factor power injection

⭐ Key Takeaways

  • 🔥 Dual buck–boost inverter handles mismatch effectively

  • 🧠 Independent MPPT for PV1 and PV2 improves energy capture

  • 🔀 Automatic buck/boost mode switching ensures stable operation

  • 🌐 PLL-based inverter switching maintains synchronization

  • ✅ Grid current injected with unity power factor

🏁 Conclusion

This blog explained the working of a Dual Buck–Boost Based Grid-Connected PV Inverter System implemented in MATLAB/Simulink. The model successfully tracks power from two PV arrays under mismatch irradiance conditions, switches between buck and boost operation automatically, and injects stable sinusoidal current into the grid with unity power factor—matching the control strategy presented in the reference paper.

Comments


bottom of page