top of page

Energy Management in PV Wind Diesel Generator Battery System in MATLAB

7 minutes ago
6 min read

Energy Management in PV Wind Diesel Generator Battery System in MATLAB


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

The PV–Wind–Diesel Generator–Battery Energy Management System in MATLAB/Simulink demonstrates coordinated power management among renewable energy sources, battery storage, a diesel generator, and electrical loads.


Energy Management in PV Wind Diesel Generator Battery System

Energy Management in PV Wind Diesel Generator Battery System in MATLAB
₹12,000.00₹6,000.00
Buy Now


The system is designed to study battery charging and discharging under two operating conditions:

  • Case 1: Varying solar irradiation condition

  • Case 2: Varying load condition

The battery reference current is automatically generated according to the selected operating case. A bidirectional converter then controls the battery power flow.

This MATLAB/Simulink model is useful for understanding hybrid renewable energy systems, battery energy management, PV control, DFIG wind generation, diesel generation, and grid-side inverter control.

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

The complete hybrid system consists of:

  • Solar PV generation

  • Battery energy storage system

  • Bidirectional battery converter

  • DC-link

  • Three-phase inverter

  • LC filter

  • Transformer

  • DFIG-based wind generation

  • Diesel generator

  • Three-phase loads

  • Energy management controller

  • PV MPPT controller

  • Inverter current controller

Main System Ratings

Component

Value / Description

Solar PV rated power

2 MW

Wind generation

3 MW

Diesel generator

5 MW

System line voltage

400 V

Grid frequency

50 Hz

Case selection

0 = Case 1, 1 = Case 2

Case 2 PV irradiation

1000 W/m²

First load switching time

4.6 s

Second load switching time

9.2 s

Simulation duration

14 s

𝐒𝐨𝐥𝐚𝐫 𝐏𝐕 𝐒𝐲𝐬𝐭𝐞𝐦

The solar PV array has a rated power of approximately 2 MW.

The PV block provides important electrical characteristics such as:

  • Maximum power

  • Open-circuit voltage

  • Voltage at maximum power point

  • Current at maximum power point

  • PV voltage

  • PV current

  • PV power

The PV characteristics can also be observed for different irradiation and temperature conditions.

The measured PV voltage and PV current are supplied to the MPPT controller for determining the required operating reference.

𝐁𝐚𝐭𝐭𝐞𝐫𝐲 𝐄𝐧𝐞𝐫𝐠𝐲 𝐒𝐭𝐨𝐫𝐚𝐠𝐞 𝐒𝐲𝐬𝐭𝐞𝐦

The battery is connected to the common DC-link through a bidirectional DC–DC converter.

The bidirectional converter allows energy transfer in both directions:

  • During excess generation, the battery operates in charging mode.

  • During insufficient generation or increased demand, the battery operates in discharging mode.

The model measures:

  • Battery current

  • Battery voltage

  • Battery power

  • Battery state of charge

These signals help analyze the battery response during different operating conditions.

𝐄𝐧𝐞𝐫𝐠𝐲 𝐌𝐚𝐧𝐚𝐠𝐞𝐦𝐞𝐧𝐭 𝐂𝐚𝐬𝐞𝐬

Two operating cases are implemented in the energy management controller.

Operating Case

Case Selector

Main Input

Battery Control Objective

Case 1

0

PV generation / irradiation variation

Charge or discharge according to available PV power

Case 2

1

Load power variation

Charge or discharge according to load demand

A switching block selects the appropriate battery reference current according to the case selector.

𝐂𝐚𝐬𝐞 𝟏 – 𝐕𝐚𝐫𝐲𝐢𝐧𝐠 𝐒𝐨𝐥𝐚𝐫 𝐈𝐫𝐫𝐚𝐝𝐢𝐚𝐭𝐢𝐨𝐧

In Case 1, the main objective is to investigate battery operation when the solar irradiation changes.

The controller measures the PV current and generates a suitable battery current reference.

The general operating principle is:

  • High PV generation → Battery charging

  • Low PV generation → Battery discharging

Therefore, the battery absorbs excess solar energy during high-generation periods and supports the system during low-generation periods.

The load configuration remains fixed during this operating case.

𝐂𝐚𝐬𝐞 𝟐 – 𝐕𝐚𝐫𝐲𝐢𝐧𝐠 𝐋𝐨𝐚𝐝 𝐂𝐨𝐧𝐝𝐢𝐭𝐢𝐨𝐧

Case 2 investigates the response of the energy management system to changes in electrical load demand.

For this condition, solar irradiation is maintained at approximately 1000 W/m².

The load power is measured and converted into the required reference signal for the battery controller.

The general operating strategy is:

  • Higher load demand → Battery discharging

  • Lower load demand → Battery charging

This allows the battery to support the common bus whenever load demand increases.

𝐋𝐨𝐚𝐝 𝐒𝐰𝐢𝐭𝐜𝐡𝐢𝐧𝐠 𝐒𝐭𝐫𝐚𝐭𝐞𝐠𝐲

Three loads are connected to the system.

Two loads are controlled through circuit breakers to create load variations during Case 2.

Time

Switching Operation

0 to 4.6 s

First controlled load remains disconnected

After 4.6 s

First controlled load is connected

0 to 9.2 s

Second controlled load remains disconnected

After 9.2 s

Second controlled load is connected

During Case 1, these controlled loads are maintained according to the fixed load configuration.

This arrangement creates clear changes in power demand for testing the battery energy management strategy.

𝐁𝐚𝐭𝐭𝐞𝐫𝐲 𝐂𝐨𝐧𝐯𝐞𝐫𝐭𝐞𝐫 𝐂𝐨𝐧𝐭𝐫𝐨𝐥

The selected battery reference current is compared with the measured battery current.

The resulting current error is processed through a PI controller.

The controller generates the required duty-cycle command, which is supplied to the pulse generator.

The generated switching pulses are applied to the two semiconductor switches of the bidirectional converter.

This control determines whether the battery operates in:

  • Charging mode

  • Discharging mode

Thus, the battery power flow automatically changes according to solar generation or load demand.

𝐏𝐕 𝐌𝐏𝐏𝐓 𝐚𝐧𝐝 𝐃𝐂-𝐋𝐢𝐧𝐤 𝐂𝐨𝐧𝐭𝐫𝐨𝐥

The PV system uses an MPPT controller based on measured:

  • PV voltage

  • PV current

The MPPT controller generates the required reference voltage.

This reference is compared with the measured DC-link voltage.

The voltage error is processed by the DC-link PI controller to generate the d-axis reference current.

This reference current becomes part of the inverter control system.

𝐆𝐫𝐢𝐝-𝐒𝐢𝐝𝐞 𝐈𝐧𝐯𝐞𝐫𝐭𝐞𝐫 𝐂𝐨𝐧𝐭𝐫𝐨𝐥

The inverter connects the DC system to the AC side through an LC filter and transformer.

The control system measures three-phase inverter voltage and current.

These three-phase signals are transformed into the dq reference frame.

The controller uses:

  • d-axis current reference

  • q-axis current reference

  • Actual d-axis current

  • Actual q-axis current

  • PI current regulators

  • Feed-forward compensation

The resulting dq control voltages are converted back into three-phase reference signals.

These reference signals are processed by the pulse generation system to produce the inverter switching pulses.

The inverter therefore manages the power transfer between the DC-link and the AC system.

𝐖𝐢𝐧𝐝 𝐄𝐧𝐞𝐫𝐠𝐲 𝐒𝐲𝐬𝐭𝐞𝐦

The wind generation system is rated at approximately 3 MW and uses a Doubly Fed Induction Generator (DFIG) configuration.

The DFIG consists of:

  • Wind turbine model

  • Drive train

  • Wound-rotor induction generator

  • Rotor-side converter

  • Grid-side converter

  • DC-link between converters

  • Speed regulation

  • Pitch control

The stator is directly connected to the common AC bus.

The rotor is interfaced through power electronic converters. This converter arrangement allows the rotor-side electrical power to be processed before being supplied back to the common coupling point.

The wind generation section therefore contributes renewable power to the complete hybrid system.

𝐃𝐢𝐞𝐬𝐞𝐥 𝐆𝐞𝐧𝐞𝐫𝐚𝐭𝐨𝐫

A 5 MW diesel generator is also connected to the common bus.

The diesel generator model includes both continuous and discrete configurations.

Its controller supports two main operating modes:

Control Mode

Controlled Quantities

PQ Control

Active power and reactive power

PV Control

Active power and voltage

The demonstrated configuration uses the PV control mode.

The diesel generator model also contains generator and prime-mover-related control sections to regulate system operation.

It provides additional generation support to the hybrid power system.

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

The overall energy-management sequence can be understood as follows:

  1. Solar PV, wind generation, and diesel generation supply the common electrical system.

  2. PV voltage and current are continuously measured.

  3. The selected operating case determines the battery reference-current calculation.

  4. In Case 1, battery control depends mainly on PV generation.

  5. In Case 2, battery control depends mainly on load demand.

  6. The battery current controller controls the bidirectional converter.

  7. Excess generation charges the battery.

  8. Insufficient generation or increased load demand causes battery discharge.

  9. The inverter controller maintains controlled power transfer between the DC and AC sections.

  10. System quantities are monitored through multiple Simulink scopes.

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

The model is simulated for 14 seconds.

Different scopes are provided for observing the major system variables.

PV Results

The PV scope can display:

  • Irradiance

  • PV power

  • PV voltage

  • PV current

These signals show the response of the solar PV system to changes in irradiation.

Battery Results

The battery scope monitors:

  • Battery current

  • Battery voltage

  • Battery state of charge

  • Battery power

These results help identify battery charging and discharging operation.

Load Results

The load scope provides information such as:

  • Three-phase load voltage

  • Three-phase load current

  • Load power

  • THD-related response

The Case 2 results clearly demonstrate the system response when additional loads are connected at 4.6 s and 9.2 s.

Wind Results

The wind-generation scope can be used to observe the contribution of the DFIG-based wind energy system to the common bus.

𝐊𝐞𝐲 𝐅𝐞𝐚𝐭𝐮𝐫𝐞𝐬

  • 2 MW solar PV generation

  • 3 MW DFIG wind generation

  • 5 MW diesel generator

  • Battery energy storage with bidirectional converter

  • Two energy-management operating cases

  • Irradiation-based battery control

  • Load-based battery control

  • PV MPPT

  • DC-link voltage regulation

  • dq-axis inverter current control

  • Feed-forward compensation

  • Dynamic load switching

  • Battery SOC monitoring

  • Three-phase voltage and current analysis

  • MATLAB/Simulink-based integrated hybrid energy system

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

This model can support the study of:

  • Hybrid renewable energy systems

  • Renewable energy integration

  • Battery energy management

  • Microgrid power management

  • PV–wind hybrid systems

  • Diesel-supported renewable systems

  • Battery charging and discharging control

  • Bidirectional DC–DC converters

  • DFIG wind energy conversion

  • Inverter control

  • DC-link voltage regulation

  • Variable generation and variable load analysis

𝐂𝐨𝐧𝐜𝐥𝐮𝐬𝐢𝐨𝐧

The Energy Management in PV Wind Diesel Generator Battery System in MATLAB provides a complete simulation framework for studying coordinated operation of renewable generation, battery storage, diesel generation, and changing electrical loads.

The two operating cases make the system particularly useful for understanding how a battery can support a hybrid power network under both changing solar irradiation and changing load demand.

With a 2 MW PV system, 3 MW DFIG wind system, 5 MW diesel generator, bidirectional battery converter, MPPT control, DC-link regulation, and inverter control, the model demonstrates the main control concepts required for hybrid energy management in MATLAB/Simulink.


Comments


bottom of page