Fuzzy Energy Management in Grid Connected PV Battery Energy Storage System
Fuzzy Energy Management in Grid Connected PV Battery Energy Storage System
𝐈𝐧𝐭𝐫𝐨𝐝𝐮𝐜𝐭𝐢𝐨𝐧
This MATLAB/Simulink model demonstrates the operation of a grid-connected solar PV system integrated with battery energy storage. A fuzzy logic energy management system coordinates power flow among the PV array, battery, AC load, and utility grid.
Fuzzy Energy Management in Grid Connected PV Battery Energy Storage System

The model is designed to:
Extract maximum available power from the PV array
Maintain the DC-link voltage at 400 V
Control battery charging and discharging
Import power from the grid during an energy deficit
Export surplus PV and battery power to the grid
Maintain stable grid frequency and sinusoidal current
The complete system combines MPPT control, bidirectional converter control, fuzzy energy management, PLL synchronization, current control, and grid-connected inverter operation.
𝐒𝐲𝐬𝐭𝐞𝐦 𝐎𝐯𝐞𝐫𝐯𝐢𝐞𝐰
The simulated system consists of the following major components:
Solar PV array
Boost converter
Incremental Conductance MPPT controller
Battery energy storage system
Bidirectional DC–DC converter
Common 400 V DC bus
Single-phase full-bridge inverter
LCL output filter
Fuzzy logic energy management system
Utility grid and AC load
PLL-based grid synchronization
Current control system
Main System Parameters
Parameter | Value |
Individual PV panel rating | 250 W |
PV panel voltage at maximum power | 30.7 V |
Panels connected in series | 8 |
Parallel PV strings | 2 |
Power per string | 2 kW |
Total PV array power | 4 kW |
Approximate PV string voltage | 245.6 V |
DC-link voltage | 400 V |
Battery voltage | 240 V |
Battery arrangement | 20 × 12 V |
Bidirectional converter switching frequency | 10 kHz |
Inverter and filter design power | 5 kW |
Inverter switching frequency | 7.5 kHz |
Grid voltage | 230 V |
Grid frequency | 50 Hz |
𝐏𝐕 𝐀𝐫𝐫𝐚𝐲 𝐂𝐨𝐧𝐟𝐢𝐠𝐮𝐫𝐚𝐭𝐢𝐨𝐧
The PV array contains 16 solar panels.
Eight panels are connected in series to form one string.
Two identical strings are connected in parallel.
Each panel is rated at 250 W.
One series string produces approximately 2 kW.
Two parallel strings provide a total rated power of 4 kW.
PV Array Summary
Configuration | Calculation | Result |
Power of one series string | 8 × 250 W | 2,000 W |
Total PV array power | 2 × 2,000 W | 4,000 W |
Voltage of one series string | 8 × 30.7 V | 245.6 V |
Total number of panels | 8 × 2 | 16 |
The boost converter raises the PV voltage from approximately 245.6 V to the regulated 400 V DC bus.
𝐖𝐨𝐫𝐤𝐢𝐧𝐠 𝐏𝐫𝐨𝐜𝐞𝐬𝐬
1. Solar Power Generation
The PV array generates power according to the available solar irradiation. Its voltage and current are continuously measured.
2. Maximum Power Point Tracking
The measured PV voltage and current are supplied to the Incremental Conductance MPPT algorithm.
The MPPT controller determines the required duty cycle and sends it to the PWM generator. The resulting gate pulse controls the boost-converter IGBT.
This process performs two functions:
Extracts the maximum available PV power
Boosts the PV voltage to the required DC-link level
3. DC-Link Voltage Regulation
The bidirectional DC–DC converter connects the 240 V battery to the 400 V DC bus.
The measured DC-link voltage is compared with the reference voltage. A PI controller processes the voltage error and produces the converter duty cycle.
The converter then regulates the DC-link voltage by controlling battery power in both directions.
4. Battery Charging and Discharging
The battery supports the system during variations in PV generation and load demand.
The battery charges when surplus power is available.
The battery discharges when PV generation is insufficient and its SoC permits discharge.
The grid can charge the battery when the battery SoC is low.
Battery current changes direction according to the charging or discharging mode.
5. Grid Power Exchange
The full-bridge inverter enables bidirectional power exchange between the DC system and the utility grid.
Surplus DC-side power is exported to the AC side.
Grid power is imported when PV and battery power are insufficient.
The power-flow direction is determined by the fuzzy energy management system.
𝐂𝐨𝐧𝐭𝐫𝐨𝐥 𝐒𝐭𝐫𝐚𝐭𝐞𝐠𝐲
𝐈𝐧𝐜𝐫𝐞𝐦𝐞𝐧𝐭𝐚𝐥 𝐂𝐨𝐧𝐝𝐮𝐜𝐭𝐚𝐧𝐜𝐞 𝐌𝐏𝐏𝐓
The PV boost converter is controlled using the Incremental Conductance MPPT method.
Controller Inputs
PV voltage
PV current
Controller Output
Boost-converter duty cycle
Control Sequence
Measure PV voltage and current.
Estimate the PV operating condition.
Determine the required duty cycle.
Generate the PWM switching pulse.
Control the boost-converter IGBT.
Track the maximum available PV power.
This control method allows the PV system to respond to changing irradiation conditions.
𝐁𝐢𝐝𝐢𝐫𝐞𝐜𝐭𝐢𝐨𝐧𝐚𝐥 𝐂𝐨𝐧𝐯𝐞𝐫𝐭𝐞𝐫 𝐂𝐨𝐧𝐭𝐫𝐨𝐥
The battery converter uses a DC-link voltage control method.
Control Sequence
Measure the DC-link voltage.
Compare it with the 400 V reference.
Process the error using a PI controller.
Generate the required PWM duty cycle.
Control the bidirectional converter switches.
Charge or discharge the battery as required.
This controller helps maintain a stable DC bus even when PV generation changes rapidly.
𝐅𝐮𝐳𝐳𝐲 𝐄𝐧𝐞𝐫𝐠𝐲 𝐌𝐚𝐧𝐚𝐠𝐞𝐦𝐞𝐧𝐭
The fuzzy logic controller determines the inverter current reference based on two operating variables:
PV power
Battery state of charge
Both inputs are converted into per-unit values before entering the fuzzy controller.
Fuzzy Controller Inputs and Output
Signal | Actual Range | Normalized Range |
PV power | 0–4,000 W | 0–1 p.u. |
Battery SoC | 0–100% | 0–1 p.u. |
Current reference | Control-dependent | −1.3 to +1.3 p.u. |
The fuzzy current reference is multiplied by a scaling factor of 10 to obtain the inverter current command.
Input Membership Functions
Input | Membership Levels |
PV power | Zero, Small, Medium, Big |
Battery SoC | Zero, Small, Medium, Big, Very Big |
The fuzzy output represents different levels of grid import and export current.
General Fuzzy Decisions
PV Power | Battery SoC | Current Reference | Operating Decision |
Low | Low | Strong negative | Import power from grid |
Low | Medium | Negative | Grid supports the DC system |
Medium | Medium | Near zero | Balanced power exchange |
High | Medium | Positive | Supply power to AC load or grid |
High | High | Strong positive | Export surplus power to grid |
A negative current reference indicates grid power import, while a positive current reference indicates power transfer from the DC system to the AC side.
𝐈𝐧𝐯𝐞𝐫𝐭𝐞𝐫 𝐂𝐨𝐧𝐭𝐫𝐨𝐥
The grid-connected inverter uses a synchronized current-control structure.
Main Control Steps
Measure the grid voltage.
Process the voltage through a PLL.
Generate a synchronized sinusoidal reference.
Multiply the fuzzy output by the synchronized waveform.
Convert the reference signal into the control frame.
Measure the actual grid current.
Compare the measured and reference currents.
Process the current errors through PI controllers.
Generate inverter modulation signals.
Produce PWM gate pulses for the full-bridge inverter.
This structure controls both the magnitude and direction of grid current.
𝐏𝐋𝐋 𝐚𝐧𝐝 𝐆𝐫𝐢𝐝 𝐒𝐲𝐧𝐜𝐡𝐫𝐨𝐧𝐢𝐳𝐚𝐭𝐢𝐨𝐧
The phase-locked loop tracks the phase angle and frequency of the utility voltage.
The PLL provides:
Grid phase angle
Sine and cosine reference signals
Frequency measurement
Synchronization for inverter current control
Proper synchronization ensures stable operation at the point of common coupling.
𝐋𝐂𝐋 𝐅𝐢𝐥𝐭𝐞𝐫 𝐃𝐞𝐬𝐢𝐠𝐧
An LCL filter is placed between the inverter and the grid to reduce switching harmonics.
The filter is designed using the following system ratings:
Design Parameter | Value |
Rated power | 5 kW |
DC-link voltage | 400 V |
AC voltage | 230 V |
Grid frequency | 50 Hz |
Switching frequency | 7.5 kHz |
The filter contains:
Inverter-side inductor
Grid-side inductor
Filter capacitor
It improves the quality of the current injected into or drawn from the grid.
𝐓𝐞𝐬𝐭𝐞𝐝 𝐈𝐫𝐫𝐚𝐝𝐢𝐚𝐭𝐢𝐨𝐧 𝐏𝐫𝐨𝐟𝐢𝐥𝐞
The system is evaluated under changing solar irradiation to test the response of the MPPT, battery, and energy management controllers.
Operating Interval | Irradiation | Approximate PV Power |
Initial high-irradiation period | 1,000 W/m² | 4,000 W |
Reduced-irradiation period | 500 W/m² | 2,000 W |
Very-low-irradiation period | 10 W/m² | Near zero |
Recovery period | 500 W/m² | 2,000 W |
Final high-irradiation period | 1,000 W/m² | 4,000 W |
The PV power changes according to irradiation while the battery and grid compensate for the resulting power imbalance.
𝐒𝐢𝐦𝐮𝐥𝐚𝐭𝐢𝐨𝐧 𝐑𝐞𝐬𝐮𝐥𝐭𝐬
The simulation scopes display the following variables:
PV voltage
PV current
PV power
DC-link voltage
Battery voltage
Battery current
Battery SoC
Load power
Grid power
Grid voltage
Grid current
System frequency
PV Performance
The PV system follows the irradiation profile:
Approximately 4 kW at 1,000 W/m²
Approximately 2 kW at 500 W/m²
Nearly zero power at 10 W/m²
Recovery to rated power when irradiation returns to 1,000 W/m²
Small initial oscillations can appear while the DC voltage and MPPT controller settle.
DC-Link Performance
The bidirectional converter regulates the common DC bus close to 400 V despite changes in PV power and battery current.
Battery Performance
Battery current changes according to the power balance:
Charging occurs when excess PV or grid power is available.
Discharging occurs when additional DC-side power is required.
SoC increases during charging.
SoC decreases during discharging.
Grid Voltage and Current
The grid voltage and current remain sinusoidal.
Their phase relationship indicates the power-flow direction:
Voltage–Current Relationship | Power-Flow Condition |
Corresponding export phase relationship | Power supplied from the inverter to the grid |
Opposite import phase relationship | Power drawn from the grid |
Small current magnitude | Limited grid power exchange |
Frequency Response
The grid frequency is maintained close to 50 Hz during irradiation changes and power-flow transitions.
𝐋𝐨𝐰-𝐒𝐨𝐂 𝐎𝐩𝐞𝐫𝐚𝐭𝐢𝐨𝐧
A separate operating condition is tested with the battery SoC set to approximately 10%.
Under this condition:
Battery discharge is restricted.
The inverter current reference becomes negative.
Power is imported from the grid.
The battery operates mainly in charging mode.
Grid power supports the load when PV power falls.
The battery SoC gradually increases.
Grid frequency remains close to 50 Hz.
This test demonstrates the ability of the fuzzy controller to protect a low-SoC battery while maintaining system operation.
𝐊𝐞𝐲 𝐅𝐞𝐚𝐭𝐮𝐫𝐞𝐬
4 kW solar PV array with changing irradiation
Incremental Conductance MPPT control
PV boost converter for voltage step-up
240 V battery energy storage system
Bidirectional battery charging and discharging
Regulated 400 V DC link
Fuzzy logic energy management system
PV power and battery SoC-based decision-making
Per-unit input normalization
Bidirectional grid power exchange
PLL-based grid synchronization
Current-controlled full-bridge inverter
LCL filter for harmonic reduction
Grid voltage, current, power, and frequency measurement
Low-battery-SoC operating mode
MATLAB/Simulink-based implementation
𝐀𝐩𝐩𝐥𝐢𝐜𝐚𝐭𝐢𝐨𝐧𝐬
This simulation model is useful for studying:
Grid-connected photovoltaic systems
Battery energy storage integration
Renewable energy power management
Fuzzy logic controller development
Smart-grid power-flow control
Residential solar battery systems
Bidirectional inverter operation
Grid import and export management
DC microgrid control
Energy storage charging strategies
Power-electronic converter control
MPPT algorithm performance
Grid synchronization techniques
Renewable energy teaching and laboratory demonstrations
𝐖𝐡𝐚𝐭 𝐂𝐚𝐧 𝐁𝐞 𝐋𝐞𝐚𝐫𝐧𝐞𝐝
By studying this model, users can understand:
How PV panels are configured to obtain the required power
How a boost converter raises the PV voltage
How MPPT extracts maximum PV power
How a battery is connected through a bidirectional converter
How DC-link voltage is regulated
How fuzzy rules determine grid current reference
How PV power and battery SoC are normalized
How an inverter exchanges power in both directions
How a PLL synchronizes the inverter with the grid
How grid voltage and current indicate import or export operation
How the system responds to rapid changes in solar irradiation
𝐂𝐨𝐧𝐜𝐥𝐮𝐬𝐢𝐨𝐧
The Simulation of Fuzzy Energy Management in Grid Connected PV Battery Energy Storage System demonstrates coordinated operation of a solar PV array, battery storage unit, bidirectional converters, inverter, load, and utility grid.
The Incremental Conductance MPPT controller extracts the available PV power, while the bidirectional converter maintains the 400 V DC-link voltage. The fuzzy logic controller uses normalized PV power and battery SoC to determine whether the system should import power, export power, charge the battery, or support the load.
Simulation results show effective operation under changing irradiation, low battery SoC, and bidirectional power-flow conditions. The model provides a practical platform for students, researchers, and engineers interested in renewable energy integration, intelligent energy management, and grid-connected power-electronic systems.



Comments