Power Management in PV Wind Battery DC Microgrid in MATLAB
Power Management in PV Wind Battery DC Microgrid in MATLAB
𝐈𝐧𝐭𝐫𝐨𝐝𝐮𝐜𝐭𝐢𝐨𝐧
Renewable-energy-based DC microgrids are becoming increasingly important for integrating solar PV, wind energy, battery storage, and DC loads into a common power network.
Power Management in PV Wind Battery DC Microgrid

This MATLAB/Simulink model demonstrates the complete operation of a PV–Wind–Battery DC Microgrid with intelligent power management. The main objective is to maintain the DC bus voltage at approximately 400 V while continuously balancing the power generated by the PV and wind sources with the load demand.
The system includes:
Solar PV generation with Incremental Conductance MPPT
Wind generation using a PMSG
Wind-side P&O MPPT
AC–DC rectification for the wind generator
DC–DC boost converters
Battery energy storage
Bidirectional battery converter
DC-bus voltage regulation
Dynamic renewable-source variations
Charging and discharging power management
The model is useful for students, researchers, and power electronics engineers who want to understand renewable DC microgrid control using MATLAB/Simulink.
𝐒𝐲𝐬𝐭𝐞𝐦 𝐎𝐯𝐞𝐫𝐯𝐢𝐞𝐰
The complete DC microgrid contains three main energy sources and one DC load.
Component | Main Function |
Solar PV | Supplies renewable DC power |
Wind PMSG | Generates variable-frequency AC power |
Rectifier | Converts PMSG AC output into DC |
Wind Boost Converter | Raises rectified voltage to the DC-bus level |
PV Boost Converter | Boosts PV voltage and performs MPPT |
Battery | Stores or supplies energy depending on power balance |
Bidirectional Converter | Controls battery charging and discharging |
DC Bus | Common power-link maintained near 400 V |
DC Load | Consumes approximately 3 kW |
The power-management system automatically determines whether the battery should charge or discharge according to the instantaneous PV power, wind power, and load demand.
𝐌𝐚𝐢𝐧 𝐒𝐲𝐬𝐭𝐞𝐦 𝐏𝐚𝐫𝐚𝐦𝐞𝐭𝐞𝐫𝐬
The major values discussed in the MATLAB model are summarized below.
Parameter | Approximate Value |
Wind generation rating | 3000 W |
Wind converter input voltage | 250 V |
Wind converter output voltage | 400 V |
Wind-side switching frequency | 5 kHz |
PV power rating | 2000 W |
PV operating voltage | 245–250 V |
PV converter output voltage | 400 V |
Battery configuration | 20 × 12 V |
Battery nominal voltage | 240 V |
Battery converter output | 400 V |
Battery converter switching frequency | 10 kHz |
DC load power | 3000 W |
DC-bus reference voltage | 400 V |
These ratings are used to select the converter components and establish the operating limits of the DC microgrid.
𝐖𝐢𝐧𝐝 𝐄𝐧𝐞𝐫𝐠𝐲 𝐂𝐨𝐧𝐯𝐞𝐫𝐬𝐢𝐨𝐧 𝐒𝐲𝐬𝐭𝐞𝐦
The wind section uses a Permanent Magnet Synchronous Generator (PMSG).
The energy conversion sequence is:
Wind Turbine → PMSG → Rectifier → Boost Converter → 400 V DC Bus
Wind-side operation
The wind turbine drives the PMSG.
The PMSG produces three-phase electrical power.
A rectifier converts the generated AC voltage into DC.
The resulting DC voltage is approximately 250 V.
A boost converter increases this voltage to the required 400 V DC bus.
The converter is controlled using a Perturb and Observe MPPT algorithm.
Rectifier voltage and current are continuously measured for MPPT operation.
The wind generation shown in the simulation is approximately 2.7–2.8 kW during normal operation.
𝐏&𝐎 𝐌𝐏𝐏𝐓 𝐟𝐨𝐫 𝐖𝐢𝐧𝐝 𝐏𝐨𝐰𝐞𝐫
The wind boost converter uses the Perturb and Observe (P&O) method to obtain maximum power from the wind generation system.
The controller continuously observes:
Rectifier voltage
Rectifier current
Present power
Previous power
Present voltage
Previous voltage
Duty cycle
The controller determines whether the operating point is moving toward or away from the maximum-power point.
Depending on the observed variation:
The duty cycle is increased, or
The duty cycle is decreased, or
The previous duty cycle is maintained.
Duty-cycle limits are also applied so that the converter operates within its safe control range.
This process executes continuously during simulation and allows the wind converter to track its maximum available power.
𝐒𝐨𝐥𝐚𝐫 𝐏𝐕 𝐒𝐲𝐬𝐭𝐞𝐦
The solar PV array is connected to the common DC bus through a DC–DC boost converter.
The approximate PV-side voltage is around 245–250 V, whereas the required DC-bus voltage is 400 V.
The PV conversion path is:
Solar PV → Boost Converter → 400 V DC Bus
The converter performs two important tasks:
Voltage boosting
Maximum power extraction
The PV system uses an Incremental Conductance MPPT algorithm.
𝐈𝐧𝐜𝐫𝐞𝐦𝐞𝐧𝐭𝐚𝐥 𝐂𝐨𝐧𝐝𝐮𝐜𝐭𝐚𝐧𝐜𝐞 𝐌𝐏𝐏𝐓
The Incremental Conductance controller measures the instantaneous PV voltage and current.
The algorithm stores and updates quantities such as:
Previous PV voltage
Previous PV current
Previous PV power
Present PV voltage
Present PV current
Present PV power
Previous duty cycle
Present duty cycle
The controller determines whether the PV array is operating:
Before the maximum-power point
At the maximum-power point
After the maximum-power point
Based on this operating condition, the converter duty cycle is adjusted.
Duty-cycle boundaries are checked before the final switching command is sent to the PWM generator.
This allows the PV array to continue extracting maximum available power even when solar irradiance changes.
𝐁𝐚𝐭𝐭𝐞𝐫𝐲 𝐄𝐧𝐞𝐫𝐠𝐲 𝐒𝐭𝐨𝐫𝐚𝐠𝐞
The model uses approximately 20 series-connected 12 V batteries, giving a nominal battery-bank voltage of about 240 V.
The battery connects to the 400 V DC bus through a bidirectional DC–DC converter.
The battery is not simply a backup source. It acts as the main balancing element of the microgrid.
Battery operating modes
Power Condition | Battery Operation |
Renewable power > load demand | Charging |
Renewable power ≈ load demand | Minimum battery contribution |
Renewable power < load demand | Discharging |
PV generation falls sharply | Battery increases discharge support |
PV and wind produce excess energy | Battery absorbs available surplus |
Therefore, the direction of battery current changes automatically according to the renewable generation and load requirement.
𝐁𝐢𝐝𝐢𝐫𝐞𝐜𝐭𝐢𝐨𝐧𝐚𝐥 𝐃𝐂–𝐃𝐂 𝐂𝐨𝐧𝐯𝐞𝐫𝐭𝐞𝐫
The battery converter enables power transfer in both directions.
During discharge
Battery → Bidirectional Converter → DC Bus → Load
The converter raises the battery-side voltage from approximately 240 V toward the 400 V DC-bus level.
During charging
PV/Wind → DC Bus → Bidirectional Converter → Battery
Excess renewable power is transferred back into the battery.
This bidirectional operation is essential because renewable generation continuously varies with environmental conditions.
𝐃𝐂-𝐁𝐮𝐬 𝐕𝐨𝐥𝐭𝐚𝐠𝐞 𝐂𝐨𝐧𝐭𝐫𝐨𝐥
One of the most important objectives of the model is maintaining the common DC bus close to:
𝐕𝐝𝐜 ≈ 𝟒𝟎𝟎 𝐕
The actual DC-bus voltage is compared with the 400 V reference.
The resulting voltage error is processed through a controller to generate the required converter command.
The control path is essentially:
DC-Bus Voltage Measurement → Reference Comparison → PI Control → Duty Cycle → PWM Generator → Bidirectional Converter
When renewable generation changes, the battery converter quickly adjusts its power so that the DC-bus voltage remains almost constant.
𝐏𝐨𝐰𝐞𝐫 𝐌𝐚𝐧𝐚𝐠𝐞𝐦𝐞𝐧𝐭 𝐒𝐭𝐫𝐚𝐭𝐞𝐠𝐲
The power-management concept is based on balancing:
PV generation + Wind generation + Battery contribution → Load requirement
The controller continuously evaluates the source and load conditions.
Operating Situation | Expected Response |
High PV + high wind | Battery can charge |
Low PV + sufficient wind | Wind supplies most of the load |
Low PV + insufficient wind | Battery discharges |
PV power becomes nearly zero | Battery supplies the renewable-power deficit |
Renewable generation increases again | Battery discharge reduces or charging begins |
Load remains constant | Battery compensates for source variations |
This strategy keeps the load supplied even when renewable power changes rapidly.
𝐒𝐢𝐦𝐮𝐥𝐚𝐭𝐢𝐨𝐧 𝐓𝐞𝐬𝐭 𝐂𝐨𝐧𝐝𝐢𝐭𝐢𝐨𝐧𝐬
The PV irradiance is intentionally varied to verify the response of the energy-management system.
Solar Irradiance | Approximate PV Power |
1000 W/m² | 2000 W |
500 W/m² | 1000 W |
10 W/m² | Nearly 0 W |
This test clearly demonstrates how the battery compensates when solar generation decreases.
𝐒𝐢𝐦𝐮𝐥𝐚𝐭𝐢𝐨𝐧 𝐑𝐞𝐬𝐮𝐥𝐭𝐬
The MATLAB/Simulink results show the dynamic behavior of the complete microgrid.
1. PV voltage
PV voltage changes according to the irradiance and MPPT operating point.
Despite large changes in solar conditions, the PV converter continues adjusting its operating point.
2. PV current
The current decreases significantly when solar irradiance is reduced.
At very low irradiance, PV current approaches a very small value.
3. PV power
The results show approximately:
2 kW at 1000 W/m²
1 kW at 500 W/m²
Nearly 0 kW at very low irradiance
This confirms the expected variation of solar power.
𝐖𝐢𝐧𝐝 𝐏𝐨𝐰𝐞𝐫 𝐑𝐞𝐬𝐮𝐥𝐭
The wind generation remains approximately around:
2.7–2.8 kW
after the initial transient.
The wind-side P&O MPPT controller continuously adjusts the boost-converter operating point to extract the available wind energy.
Minor variations visible in the waveform are associated with MPPT operation and converter dynamics.
𝐁𝐚𝐭𝐭𝐞𝐫𝐲 𝐂𝐡𝐚𝐫𝐠𝐢𝐧𝐠 𝐚𝐧𝐝 𝐃𝐢𝐬𝐜𝐡𝐚𝐫𝐠𝐢𝐧𝐠
The battery waveform clearly demonstrates the purpose of the power-management controller.
When sufficient PV and wind power are available:
Battery → Charging Mode
When PV power decreases and the renewable sources cannot completely satisfy the load:
Battery → Discharging Mode
For example, when PV generation falls close to zero, wind generation alone may provide roughly 2.7 kW while the load requires around 3 kW.
The battery then provides the missing power.
As renewable generation changes again, battery power automatically changes direction or magnitude.
𝐃𝐂-𝐋𝐨𝐚𝐝 𝐑𝐞𝐬𝐮𝐥𝐭
The DC load is approximately:
3 kW
Even though PV power changes significantly, the DC load continues receiving the required power because the wind source and battery compensate for the renewable-energy variations.
The load results demonstrate:
Stable DC-bus voltage
Approximately constant load current
Approximately constant load power
Effective source-power sharing
Smooth battery compensation
𝐃𝐂-𝐁𝐮𝐬 𝐕𝐨𝐥𝐭𝐚𝐠𝐞 𝐑𝐞𝐬𝐮𝐥𝐭
The simulation shows that the DC bus settles near the required:
400 V
There may be small transient disturbances when source power changes, but the battery voltage-control loop brings the DC bus back to its reference value.
This is an important indication that the energy-management and bidirectional converter control are working correctly.
𝐏𝐨𝐰𝐞𝐫 𝐅𝐥𝐨𝐰 𝐄𝐱𝐚𝐦𝐩𝐥𝐞
A simplified operating example is shown below.
Source / Load | Example Power |
Wind generation | ~2800 W |
PV generation | ~2000 W initially |
DC load | ~3000 W |
Battery | Charges or discharges according to power difference |
When both renewable sources generate sufficient power, surplus energy can charge the battery.
When PV power decreases, the battery automatically changes its operating condition to maintain the required load power.
𝐂𝐨𝐧𝐭𝐫𝐨𝐥 𝐒𝐭𝐫𝐚𝐭𝐞𝐠𝐲 𝐒𝐮𝐦𝐦𝐚𝐫𝐲
Subsystem | Control Technique | Main Objective |
Wind PMSG | P&O MPPT | Maximum wind-power extraction |
Wind Boost Converter | MPPT-based duty control | Boost voltage toward DC-bus level |
Solar PV | Incremental Conductance MPPT | Maximum PV-power extraction |
PV Boost Converter | MPPT-based PWM | Boost PV voltage to DC bus |
Battery | DC-bus voltage control | Maintain approximately 400 V |
Bidirectional Converter | PI/PWM control | Battery charging and discharging |
DC Bus | Voltage regulation | Stable common DC voltage |
𝐖𝐨𝐫𝐤𝐢𝐧𝐠 𝐏𝐫𝐨𝐜𝐞𝐬𝐬
The complete model operation can be understood in the following sequence:
Wind energy drives the PMSG.
PMSG AC output is converted into DC using a rectifier.
The wind boost converter increases the rectified voltage to the DC-bus level.
P&O MPPT extracts maximum available wind power.
The solar PV array supplies power through another boost converter.
Incremental Conductance MPPT tracks maximum PV power.
Both renewable sources feed the 400 V DC bus.
The DC load continuously draws approximately 3 kW.
The controller evaluates the difference between generation and demand.
The battery charges when excess renewable power is available.
The battery discharges when renewable power is insufficient.
The bidirectional converter regulates the common DC-bus voltage.
𝐊𝐞𝐲 𝐅𝐞𝐚𝐭𝐮𝐫𝐞𝐬
PV–Wind–Battery hybrid DC microgrid
400 V regulated DC bus
3 kW wind generation system
2 kW solar PV system
3 kW DC load
PMSG-based wind-energy conversion
Wind-side rectifier and boost converter
P&O MPPT for wind generation
Incremental Conductance MPPT for solar PV
Bidirectional battery converter
Automatic battery charging and discharging
Dynamic solar irradiance testing
Renewable-source power balancing
DC-bus voltage regulation
Complete MATLAB/Simulink implementation
Source, battery, load and DC-bus waveform analysis
𝐀𝐩𝐩𝐥𝐢𝐜𝐚𝐭𝐢𝐨𝐧𝐬
This MATLAB model is useful for studying:
Renewable-energy DC microgrids
PV and wind hybrid generation
Battery energy-storage control
DC distribution networks
Hybrid renewable power systems
PMSG-based wind generation
MPPT controller development
Bidirectional converter control
Energy-management strategies
DC-bus voltage regulation
Renewable power-sharing analysis
Battery charging and discharging behavior
𝐖𝐡𝐚𝐭 𝐂𝐚𝐧 𝐁𝐞 𝐋𝐞𝐚𝐫𝐧𝐞𝐝 𝐟𝐫𝐨𝐦 𝐓𝐡𝐢𝐬 𝐌𝐨𝐝𝐞𝐥?
By studying this simulation, users can understand:
How PV and wind sources are integrated into one DC bus.
Why separate MPPT techniques are required for different renewable sources.
How a PMSG-based wind generation system connects to a DC microgrid.
How DC–DC boost converters interface renewable sources.
How a battery balances renewable-power fluctuations.
How bidirectional power flow is achieved.
How a DC bus can be maintained near a fixed voltage.
How irradiance variation affects PV power.
How battery power changes according to generation and load demand.
How different source powers combine to satisfy a constant DC load.
𝐀𝐝𝐯𝐚𝐧𝐭𝐚𝐠𝐞𝐬 𝐨𝐟 𝐭𝐡𝐞 𝐏𝐫𝐨𝐩𝐨𝐬𝐞𝐝 𝐏𝐨𝐰𝐞𝐫 𝐌𝐚𝐧𝐚𝐠𝐞𝐦𝐞𝐧𝐭
The system offers several important advantages:
Better utilization of renewable energy
Reduced impact of intermittent PV generation
Continuous load-power support
Stable DC-link operation
Automatic source-power balancing
Effective battery utilization
Maximum renewable-power extraction
Smooth transition between battery charging and discharging
Independent MPPT control for PV and wind sources
Easy analysis of different renewable operating conditions
𝐂𝐨𝐧𝐜𝐥𝐮𝐬𝐢𝐨𝐧
The Power Management in PV Wind Battery DC Microgrid in MATLAB model demonstrates an effective method for integrating solar PV, wind generation, battery storage, and a DC load through a regulated common DC bus.
The P&O MPPT controller extracts available power from the PMSG-based wind generation system, while the Incremental Conductance MPPT controller tracks maximum power from the solar PV array.
When renewable generation exceeds the load demand, the battery absorbs the surplus energy. When generation becomes insufficient, the battery automatically supplies the required deficit.
Simulation results demonstrate that the system can maintain the DC bus close to 400 V, keep the 3 kW DC load supplied, and dynamically manage battery charging and discharging during variations in solar generation.
Overall, the model provides a clear MATLAB/Simulink platform for understanding renewable energy integration, MPPT control, bidirectional conversion, battery energy management, and DC microgrid power balancing.



Comments