top of page

DC Microgrid with PV, Battery & Supercapacitor Coordinated Control in MATLAB/Simulink

Aug 20
8 min read

DC Microgrid with PV, Battery & Supercapacitor Coordinated Control


𝐈𝐧𝐭𝐫𝐨𝐝𝐮𝐜𝐭𝐢𝐨𝐧


A DC microgrid provides an efficient platform for integrating renewable energy sources, energy-storage devices, and DC loads through a common DC bus.

DC Microgrid with PV, Battery & Supercapacitor Coordinated Control


DC Microgrid with PV, Battery & Supercapacitor Coordinated Control

DC Microgrid Operation and control In MATLAB
₹12,000.00₹6,000.00
Buy Now

This MATLAB/Simulink model demonstrates the coordinated operation of:

  • ☀️ Solar PV system

  • 🔋 Lithium-ion battery

  • ⚡ Supercapacitor

  • 🔄 DC–DC power converters

  • 🎯 Incremental Conductance MPPT

  • 🎛️ Voltage and current controllers

  • 💡 DC load

The main objective is to maintain the DC bus voltage at 24 V while continuously balancing power among the PV source, battery, supercapacitor, and load.

The model also demonstrates how a supercapacitor can handle fast transient power changes while the battery manages slower and sustained power imbalances.


𝐒𝐲𝐬𝐭𝐞𝐦 𝐎𝐯𝐞𝐫𝐯𝐢𝐞𝐰


The DC microgrid consists of three main energy sources/storage elements connected to a common DC bus.

Component

Interface

Main Function

Solar PV

Boost converter

Renewable power generation

Battery

Bidirectional DC–DC converter

Long-term energy storage

Supercapacitor

Bidirectional DC–DC converter

Fast transient compensation

DC Load

DC bus

Consumes approximately 4 W

MPPT Controller

PV boost converter

Extracts maximum PV power

Voltage/Current Controller

Storage converters

Maintains power balance and DC voltage

The common DC bus acts as the main point through which generation, storage, and load power are exchanged.


𝐌𝐚𝐢𝐧 𝐒𝐲𝐬𝐭𝐞𝐦 𝐏𝐚𝐫𝐚𝐦𝐞𝐭𝐞𝐫𝐬


Solar PV Parameters

Parameter

Value

Rated PV power

10 W

Open-circuit voltage

21.9 V

Voltage at maximum power point

17.9 V

Short-circuit current

0.71 A

Current at maximum power point

0.56 A

A relatively small PV rating is used so that the complete DC microgrid operation can be clearly demonstrated and analyzed.

Battery Parameters

Parameter

Specification

Battery type

Lithium-ion

Individual cell/module voltage

3.6 V

Number connected in series

2

Main role

Energy balancing and sustained charging/discharging

Supercapacitor Parameters

Parameter

Value

Capacitance

58 F

Rated voltage

16 V

Main role

Transient power support

DC Microgrid Parameters

Parameter

Value

DC bus reference voltage

24 V

DC load power

4 W

Approximate load current

0.17–0.18 A


𝐒𝐲𝐬𝐭𝐞𝐦 𝐀𝐫𝐜𝐡𝐢𝐭𝐞𝐜𝐭𝐮𝐫𝐞


The basic energy flow is:

Solar PV → Boost Converter → DC Bus → DC Load

The battery is connected as:

Battery ↔ Bidirectional DC–DC Converter ↔ DC Bus

The supercapacitor is connected as:

Supercapacitor ↔ Bidirectional DC–DC Converter ↔ DC Bus

This configuration allows energy to move in both directions between the storage devices and the DC bus.


𝐖𝐨𝐫𝐤𝐢𝐧𝐠 𝐏𝐫𝐨𝐜𝐞𝐬𝐬


1. Solar PV Generation

The PV panel generates electrical power according to the available solar irradiance.

When irradiance changes:

  • PV current changes significantly.

  • PV power changes accordingly.

  • PV operating voltage remains close to its maximum-power operating region.

  • The MPPT controller adjusts the converter duty cycle.

The PV source is connected to the common DC bus through a boost converter.

2. Maximum Power Point Tracking

An Incremental Conductance MPPT algorithm is used to extract the maximum available power from the PV array.

The controller continuously monitors:

  • PV voltage

  • PV current

Based on these measurements, it determines an appropriate converter operating point.

The resulting control signal is processed by the PWM generator, which produces switching pulses for the boost converter.

This enables the PV system to track changing solar conditions effectively.

3. DC Bus Voltage Regulation

The DC bus reference is fixed at:

24 V

The actual DC bus voltage is continuously measured and compared with this reference.

The voltage controller generates the required current reference for the energy-storage system.

This control structure helps:

  • Maintain the DC bus close to 24 V

  • Compensate for PV power variations

  • Support the DC load

  • Coordinate battery and supercapacitor operation


𝐂𝐨𝐧𝐭𝐫𝐨𝐥 𝐒𝐭𝐫𝐚𝐭𝐞𝐠𝐲


The battery and supercapacitor use a coordinated voltage-current control strategy.

Outer Voltage Control

The DC bus voltage is monitored continuously.

The controller determines how much current is required from or absorbed by the storage system.

Battery Current Control

The battery reference current is compared with the actual battery current.

The current controller then produces the required duty-cycle command for the battery's bidirectional converter.

Supercapacitor Current Control

The supercapacitor has a separate current-control path.

Its primary purpose is to react rapidly when sudden power variations occur.

This makes the supercapacitor particularly useful during:

  • Irradiance step changes

  • Sudden increases in PV generation

  • Sudden reductions in PV generation

  • Short-duration DC bus disturbances


𝐑𝐨𝐥𝐞 𝐨𝐟 𝐭𝐡𝐞 𝐁𝐚𝐭𝐭𝐞𝐫𝐲 𝐚𝐧𝐝 𝐒𝐮𝐩𝐞𝐫𝐜𝐚𝐩𝐚𝐜𝐢𝐭𝐨𝐫


The two storage devices perform different but complementary functions.

Storage Device

Response Characteristic

Main Role

Battery

Relatively slower

Sustained energy balancing

Supercapacitor

Very fast

Transient compensation

Battery

The battery:

  • Charges when excess PV power is available.

  • Discharges when PV generation is below load demand.

  • Helps maintain long-term power balance.

  • Supports the DC bus during low solar generation.

Supercapacitor

The supercapacitor:

  • Responds rapidly during transitions.

  • Supplies short bursts of power when PV power suddenly falls.

  • Absorbs excess transient power when PV generation suddenly increases.

  • Reduces the burden of rapid current changes on the battery.

This coordinated operation improves the overall dynamic response of the DC microgrid.


𝐒𝐨𝐥𝐚𝐫 𝐈𝐫𝐫𝐚𝐝𝐢𝐚𝐧𝐜𝐞 𝐓𝐞𝐬𝐭 𝐏𝐫𝐨𝐟𝐢𝐥𝐞


To test the controller under changing renewable generation, the PV irradiance is varied approximately every 2 seconds.

Operating Interval

Irradiance

Initial condition

1000 W/m²

Next level

800 W/m²

Next level

500 W/m²

Next level

300 W/m²

Minimum level

100 W/m²

Increasing level

300 W/m²

Increasing level

500 W/m²

Final increasing level

800 W/m²

This profile allows both decreasing and increasing PV-generation conditions to be evaluated.


𝐒𝐢𝐦𝐮𝐥𝐚𝐭𝐢𝐨𝐧 𝐑𝐞𝐬𝐮𝐥𝐭𝐬


The simulation evaluates:

  • PV voltage

  • PV current

  • PV power

  • DC bus voltage

  • Load current

  • Load power

  • Battery voltage

  • Battery current

  • Battery power

  • Battery SOC

  • Supercapacitor voltage

  • Supercapacitor current

  • Supercapacitor power

PV Response at 1000 W/m²

At full irradiance:

Parameter

Approximate Response

Irradiance

1000 W/m²

PV power

10 W

PV voltage

≈18 V

PV current

≈0.51 A

DC bus voltage

≈24 V

Load power

≈4 W

Load current

≈0.17 A

Since PV generation is substantially higher than the load demand, the available surplus power can be directed toward the energy-storage system.

PV Response at 800 W/m²

When the irradiance decreases to 800 W/m²:

  • PV output falls to approximately 8 W.

  • The DC load remains approximately 4 W.

  • Excess PV energy is still available.

  • Battery charging can continue.

  • The supercapacitor responds briefly during the irradiance transition.

  • DC bus voltage returns quickly to approximately 24 V.

PV Response at 500 W/m²

At approximately 500 W/m²:

  • PV output becomes approximately 5 W.

  • Load demand remains approximately 4 W.

  • Only a small amount of excess PV power remains.

  • Battery power approaches a low-energy-transfer or near-idle condition.

  • The supercapacitor provides short transient compensation during the irradiance step.

This operating point demonstrates effective coordination between the two storage devices.

PV Response at 300 W/m²

When irradiance falls to 300 W/m²:

  • PV output becomes approximately 3 W.

  • The load still requires approximately 4 W.

  • PV generation alone cannot meet the load demand.

  • The battery begins supplying the missing power.

  • The supercapacitor initially supports the transient.

  • The DC bus remains regulated close to 24 V.

PV Response at 100 W/m²

At the lowest irradiance level:

  • PV generation falls to approximately 1 W.

  • The load remains around 4 W.

  • A significant power deficit exists.

  • The battery provides additional energy.

  • The supercapacitor handles the initial transition.

  • Storage power increases as required to maintain system balance.


𝐑𝐞𝐬𝐩𝐨𝐧𝐬𝐞 𝐃𝐮𝐫𝐢𝐧𝐠 𝐈𝐧𝐜𝐫𝐞𝐚𝐬𝐢𝐧𝐠 𝐈𝐫𝐫𝐚𝐝𝐢𝐚𝐧𝐜𝐞


The second part of the test increases solar irradiance again.

100 → 300 W/m²

As PV power increases:

  • Battery discharge requirement decreases.

  • The supercapacitor absorbs part of the sudden power increase.

  • A short charging transient appears in the supercapacitor.

300 → 500 W/m²

As PV generation approaches and exceeds load demand:

  • Battery output decreases further.

  • Battery operation can transition toward charging.

  • Supercapacitor transient charging occurs.

  • The DC bus remains controlled.

500 → 800 W/m²

At higher PV generation:

  • PV power becomes significantly higher than the 4 W load.

  • Excess PV power becomes available for storage charging.

  • Battery power moves into the charging region.

  • Supercapacitor absorbs fast transient energy.

  • Stable DC bus operation is maintained.


𝐏𝐨𝐰𝐞𝐫 𝐁𝐚𝐥𝐚𝐧𝐜𝐢𝐧𝐠 𝐁𝐞𝐡𝐚𝐯𝐢𝐨𝐮𝐫


The operating principle can be summarized simply.

PV Condition

Battery Behavior

Supercapacitor Behavior

PV power much greater than load

Charging

Absorbs transient surplus

PV power slightly greater than load

Light charging / near idle

Short transient action

PV power approximately equal to load

Near idle

Minimal steady-state contribution

PV power below load

Discharging

Supplies transient deficit

Sudden PV decrease

Supports deficit

Rapid discharge response

Sudden PV increase

Charging requirement increases

Rapid charging response

This division of responsibility is one of the major advantages of using a hybrid battery–supercapacitor energy-storage system.


𝐃𝐂 𝐁𝐮𝐬 𝐕𝐨𝐥𝐭𝐚𝐠𝐞 𝐏𝐞𝐫𝐟𝐨𝐫𝐦𝐚𝐧𝐜𝐞


One of the most important results is the regulation of the DC bus.

The reference voltage is:

24 V

During irradiance transitions:

  • Small temporary voltage deviations may appear.

  • The battery and supercapacitor controllers respond immediately.

  • The DC bus quickly returns to the reference level.

  • The DC load continues receiving regulated power.

This demonstrates the effectiveness of the coordinated storage control strategy.


𝐁𝐚𝐭𝐭𝐞𝐫𝐲 𝐒𝐎𝐂 𝐁𝐞𝐡𝐚𝐯𝐢𝐨𝐮𝐫


Battery state of charge changes according to the power balance.

When PV generation is high:

  • Excess energy charges the battery.

  • Battery SOC tends to increase.

When PV generation becomes low:

  • The battery supplies the power deficit.

  • Battery SOC tends to decrease.

When PV generation increases again:

  • Battery discharge decreases.

  • The battery eventually returns to charging operation.

Therefore, the SOC response confirms correct bidirectional energy transfer.


𝐖𝐡𝐲 𝐔𝐬𝐞 𝐚 𝐒𝐮𝐩𝐞𝐫𝐜𝐚𝐩𝐚𝐜𝐢𝐭𝐨𝐫?


A battery alone can maintain energy balance, but continuously forcing it to respond to rapid power variations may increase electrical stress.

The supercapacitor provides several advantages:

  • Fast charging and discharging

  • Rapid transient response

  • High power capability

  • Reduced rapid current changes in the battery

  • Better DC bus voltage regulation

  • Improved dynamic power sharing

  • Effective compensation during solar irradiance transitions

The battery therefore handles energy, while the supercapacitor primarily handles fast power variations.


𝐊𝐞𝐲 𝐅𝐞𝐚𝐭𝐮𝐫𝐞𝐬


  • ☀️ 10 W solar PV source

  • 🔋 Lithium-ion battery energy storage

  • ⚡ 58 F supercapacitor

  • 🔄 Two bidirectional DC–DC converters

  • ⬆️ PV boost converter

  • 🎯 Incremental Conductance MPPT

  • 🎛️ Cascaded voltage and current control

  • ⚡ Coordinated battery-supercapacitor power sharing

  • 🔌 24 V regulated DC bus

  • 💡 4 W DC load

  • 🌤️ Variable solar irradiance simulation

  • 📊 Battery SOC monitoring

  • 📈 PV voltage, current, and power monitoring

  • 📉 Storage voltage, current, and power analysis

  • 🔁 Charging and discharging operation

  • ⚡ Fast transient support from the supercapacitor


𝐌𝐚𝐭𝐥𝐚𝐛/𝐒𝐢𝐦𝐮𝐥𝐢𝐧𝐤 𝐂𝐨𝐧𝐭𝐫𝐨𝐥 𝐁𝐥𝐨𝐜𝐤𝐬


The simulation mainly contains:

  • PV array

  • Irradiance profile generator

  • Boost converter

  • Incremental Conductance MPPT controller

  • PWM generator

  • Lithium-ion battery

  • Battery bidirectional converter

  • Supercapacitor

  • Supercapacitor bidirectional converter

  • DC bus voltage measurement

  • Current measurement blocks

  • Voltage controller

  • Battery current controller

  • Supercapacitor current controller

  • Reference-current filtering

  • SOC measurement

  • DC load

  • Power measurement blocks

  • Simulation scopes


𝐖𝐨𝐫𝐤𝐢𝐧𝐠 𝐒𝐮𝐦𝐦𝐚𝐫𝐲


The complete control process can be understood in six simple stages:

  1. PV generates power according to solar irradiance.

  2. Incremental Conductance MPPT extracts maximum available PV power.

  3. The boost converter transfers PV energy to the 24 V DC bus.

  4. The voltage controller continuously monitors the DC bus.

  5. The battery handles sustained surplus or deficit energy.

  6. The supercapacitor responds rapidly during power transitions.

Together, these controllers maintain stable operation even when PV generation varies significantly.


𝐀𝐩𝐩𝐥𝐢𝐜𝐚𝐭𝐢𝐨𝐧𝐬


This DC microgrid control concept is useful for studying:

  • Renewable-energy-based DC microgrids

  • Solar PV energy-management systems

  • Battery energy-storage control

  • Hybrid battery-supercapacitor storage

  • DC bus voltage regulation

  • Renewable power smoothing

  • Standalone DC power systems

  • Telecom DC power systems

  • Data-center DC distribution concepts

  • DC charging infrastructure

  • Residential DC distribution

  • Laboratory-scale microgrid studies

  • Converter control and power-sharing research

  • MPPT algorithm development

  • Energy-storage coordination studies


𝐖𝐡𝐨 𝐂𝐚𝐧 𝐔𝐬𝐞 𝐓𝐡𝐢𝐬 𝐌𝐨𝐝𝐞𝐥?


The model is particularly suitable for:

  • Electrical engineering students

  • Power electronics learners

  • MATLAB/Simulink users

  • Microgrid researchers

  • Renewable-energy researchers

  • Energy-storage engineers

  • Control-system researchers

  • Engineers studying DC–DC converters

  • Researchers investigating hybrid energy storage

It provides an easy-to-understand environment for learning how renewable generation and multiple storage technologies can be coordinated within a DC microgrid.


𝐊𝐞𝐲 𝐎𝐛𝐬𝐞𝐫𝐯𝐚𝐭𝐢𝐨𝐧𝐬


The simulation demonstrates that:

  • PV output follows changes in solar irradiance.

  • The Incremental Conductance method successfully tracks available PV power.

  • The 24 V DC bus remains well regulated.

  • The 4 W DC load receives stable power.

  • The battery charges when renewable power exceeds load demand.

  • The battery discharges when renewable generation becomes insufficient.

  • The supercapacitor mainly responds during rapid transient conditions.

  • Battery and supercapacitor power sharing changes automatically with operating conditions.

  • Battery SOC reflects alternating charging and discharging periods.

  • Hybrid storage improves the transient behavior of the DC microgrid.


𝐂𝐨𝐧𝐜𝐥𝐮𝐬𝐢𝐨𝐧


The DC Microgrid with PV, Battery & Supercapacitor in MATLAB/Simulink demonstrates a practical coordinated energy-management and control strategy for a renewable DC power system.

The solar PV system operates with Incremental Conductance MPPT to obtain the maximum available solar power under changing irradiance. A lithium-ion battery and 58 F supercapacitor are connected through bidirectional converters to support the common 24 V DC bus.

The battery manages sustained energy surplus and deficit, while the supercapacitor provides fast transient compensation during sudden irradiance variations. As PV generation changes from approximately 10 W down to 1 W and then increases again, the storage system automatically changes between charging and discharging operation while maintaining the 4 W DC load.

Overall, the model provides a clear demonstration of MPPT control, DC bus regulation, bidirectional energy transfer, hybrid energy-storage coordination, transient compensation, and renewable power balancing in a DC microgrid.


Comments


bottom of page