top of page

MATLAB Implementation of Fuel Cell Battery Driven Electric Vehicle

MATLAB Implementation of Fuel Cell Battery Driven Electric Vehicle


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


Fuel Cell Battery Driven Electric Vehicle


Fuel Cell Battery Driven Electric Vehicle


MATLAB Simulation of Fuel cell Battery driven Electric Vehicle
₹6,000.00₹3,000.00
Buy Now


A fuel-cell electric vehicle combines the high-energy capability of a fuel cell with the fast power support of a battery. This MATLAB/Simulink model demonstrates a 𝗳𝘂𝗲𝗹 𝗰𝗲𝗹𝗹–𝗯𝗮𝘁𝘁𝗲𝗿𝘆 hybrid electric vehicle that drives a BLDC motor under different fuel-pressure conditions.

The model includes:

  • A 24 V fuel-cell source

  • A P&O MPPT controller

  • A DC–DC boost converter

  • A 48 V battery

  • A three-phase voltage source inverter

  • Hall-sensor-based BLDC motor commutation

  • Fuel-cell, battery and motor performance measurements

The simulation also explains how the battery changes between charging and discharging modes when fuel-cell power varies.


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


The proposed electric vehicle powertrain contains two energy sources connected to a common DC bus.

Component

Function

Fuel cell

Supplies the primary electrical power

P&O MPPT controller

Extracts the maximum available fuel-cell power

Boost converter

Increases the fuel-cell voltage to the DC-bus level

Battery

Stores excess energy and supports the motor during low fuel-cell power

Voltage source inverter

Converts DC power into three-phase AC power

BLDC motor

Represents the electric vehicle traction motor

Hall-sensor decoder

Identifies the rotor position for electronic commutation

Measurement system

Records voltage, current, power, speed, torque and SOC

𝐒𝐲𝐬𝐭𝐞𝐦 𝐒𝐩𝐞𝐜𝐢𝐟𝐢𝐜𝐚𝐭𝐢𝐨𝐧𝐬


Fuel-Cell Parameters

Parameter

Value

Rated fuel-cell voltage

24 V

Nominal operating voltage

24.23 V

Nominal operating current

52 A

Nominal power

1.26 kW

Maximum operating voltage

20 V

Maximum operating current

100 A

Maximum power

Approximately 2 kW

Battery and Converter Parameters

Parameter

Value

Fuel-cell-side voltage

Approximately 24 V

Regulated DC-bus voltage

48 V

Battery nominal voltage

48 V

Battery rated capacity

200 Ah

Converter type

DC–DC boost converter

MPPT method

Perturb and Observe

Power switch

MOSFET

Motor type

BLDC motor

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


The complete power flow can be understood through the following stages.


1. Fuel-Cell Power Generation


The fuel cell produces DC electrical power according to the supplied fuel and air pressures. Its voltage and current are continuously measured and provided to the MPPT controller.


2. Maximum Power Extraction


The 𝗣&𝗢 𝗠𝗣𝗣𝗧 algorithm processes the measured fuel-cell voltage and current.

The controller considers:

  • Present fuel-cell voltage

  • Present fuel-cell current

  • Calculated fuel-cell power

  • Change in voltage

  • Change in power

  • Previous duty-cycle value

  • Minimum and maximum duty-cycle limits

  • Duty-cycle step size

The duty cycle is increased or decreased depending on the change in fuel-cell power.


3. Boost Converter Operation


The duty-cycle command is compared with a triangular carrier waveform to generate the PWM switching pulse.

The PWM pulse controls the boost-converter MOSFET so that:

  • Fuel-cell voltage is increased from approximately 24 V to 48 V

  • Maximum available fuel-cell power is transferred to the DC bus

  • Battery charging becomes possible when excess power is available

  • The BLDC motor receives the required operating power


4. Battery Power Support


The 48 V battery is connected to the common DC bus.

The battery performs two major functions:

  • 𝗖𝗵𝗮𝗿𝗴𝗶𝗻𝗴 when fuel-cell generation exceeds the motor demand

  • 𝗗𝗶𝘀𝗰𝗵𝗮𝗿𝗴𝗶𝗻𝗴 when fuel-cell generation is insufficient

This hybrid arrangement helps maintain continuous electric motor operation during changes in fuel availability.


5. BLDC Motor Drive


The voltage source inverter supplies three-phase power to the BLDC motor. The inverter operates as an electronic commutator.

The motor-side control system uses:

  • Three Hall-sensor signals

  • Rotor-position decoding

  • Back-EMF state generation

  • Switching truth tables

  • Six inverter gate pulses

The generated pulses control switches Q1 to Q6 of the three-phase inverter.


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


P&O MPPT Control

The P&O MPPT controller continuously searches for the operating point at which the fuel cell delivers maximum power.

Control Parameter

Purpose

Initial duty cycle

Defines the starting converter operating point

Maximum duty cycle

Prevents excessive converter operation

Minimum duty cycle

Maintains safe lower switching limits

Duty-cycle step

Determines tracking speed and steady-state variation

Fuel-cell voltage

Identifies changes in operating condition

Fuel-cell current

Supports real-time power calculation

PWM Generation


The calculated duty cycle is compared with a high-frequency triangular waveform. The resulting PWM pulse controls the MOSFET of the boost converter.

Hall-Sensor Decoder

The BLDC motor provides three Hall signals representing rotor position. These signals are processed through logic gates and a decoder subsystem.

The decoder determines:

  • Phase-A back-EMF state

  • Phase-B back-EMF state

  • Phase-C back-EMF state

  • Correct inverter switching sequence


Electronic Commutation


Each back-EMF signal is compared with zero. The positive, negative and zero states are used to determine the required inverter switch combination.

The resulting gate signals control:

  • Q1 and Q2 for the first inverter leg

  • Q3 and Q4 for the second inverter leg

  • Q5 and Q6 for the third inverter leg

This process maintains the required electromagnetic torque and rotor speed.


𝐎𝐩𝐞𝐫𝐚𝐭𝐢𝐧𝐠 𝐂𝐚𝐬𝐞𝐬


The simulation evaluates the hybrid vehicle under different fuel-cell pressure conditions.

Operating Case

Fuel/Air Pressure

Expected System Behaviour

Case 1

1 atm

Fuel cell supplies high power and charges the battery

Case 2

0.5 atm after 4 seconds

Fuel-cell power reduces and battery charging current changes

Case 3

0 atm

Fuel-cell output becomes insufficient and the battery supplies the motor

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


The model measures the electrical and mechanical responses of the complete vehicle system.

Fuel-Cell Results

The fuel-cell scope displays:

  • Fuel-cell voltage

  • Fuel-cell current

  • Fuel-cell output power

At approximately 1 atm pressure:

  • Fuel-cell voltage reaches nearly 20 V at maximum loading

  • Fuel-cell current reaches nearly 100 A

  • Fuel-cell power approaches 2 kW

When the pressure is reduced to 0.5 atm, the available fuel-cell power decreases.


Battery Results


The battery scope displays:

  • Battery voltage

  • Battery current

  • Battery state of charge

During sufficient fuel-cell generation:

  • Battery voltage remains close to the DC-bus level

  • The battery operates in charging mode

  • Battery SOC gradually increases

During zero fuel-cell pressure:

  • Fuel-cell power becomes insufficient

  • Battery current changes to the discharging region

  • Battery SOC begins to decrease

  • The battery supplies the required motor power

The exact positive or negative sign of battery current depends on the current-direction convention configured in the Simulink battery block.


BLDC Motor Results


The motor-side scopes display:

  • Stator phase current

  • Trapezoidal back EMF

  • Rotor speed

  • Electromagnetic torque

The results indicate that:

  • Rotor speed remains nearly constant

  • Electromagnetic torque remains stable

  • Stator current continues without major interruption

  • The battery compensates for reduced fuel-cell power

  • Vehicle operation continues even when fuel-cell pressure becomes zero


𝐑𝐞𝐬𝐮𝐥𝐭 𝐂𝐨𝐦𝐩𝐚𝐫𝐢𝐬𝐨𝐧

Performance Variable

Normal Fuel Pressure

Reduced Fuel Pressure

Zero Fuel Pressure

Fuel-cell power

High

Reduced

Very low or unavailable

Battery mode

Charging

Reduced charging or support

Discharging

Battery SOC

Increasing

Changes slowly

Decreasing

Motor speed

Maintained

Maintained

Maintained by battery

Motor torque

Stable

Stable

Stable with battery support

Vehicle operation

Fuel cell and battery

Hybrid support

Battery-supported operation

𝐊𝐞𝐲 𝐅𝐞𝐚𝐭𝐮𝐫𝐞𝐬


  • MATLAB/Simulink implementation of a 𝗳𝘂𝗲𝗹-𝗰𝗲𝗹𝗹 electric vehicle

  • Hybrid fuel-cell and battery energy supply

  • P&O MPPT-based maximum power extraction

  • DC–DC boost conversion from approximately 24 V to 48 V

  • Battery charging and discharging analysis

  • Hall-sensor-based BLDC motor commutation

  • Six-switch voltage source inverter

  • Fuel-pressure variation analysis

  • Battery SOC monitoring

  • Fuel-cell voltage, current and power measurement

  • Motor current, back EMF, speed and torque monitoring

  • Continuous motor operation during fuel-cell power loss


𝐀𝐝𝐯𝐚𝐧𝐭𝐚𝐠𝐞𝐬


  • Improved power availability through two energy sources

  • Continuous vehicle operation during low fuel supply

  • Better fuel-cell energy utilization through MPPT

  • Battery charging during excess fuel-cell generation

  • Reduced dependency on the fuel cell during transient conditions

  • Stable BLDC motor speed and torque

  • Simple electronic commutation using Hall sensors

  • Clear visualization of energy flow in MATLAB/Simulink


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


This simulation model is suitable for studying:

  • Fuel-cell electric vehicles

  • Hybrid electric vehicle energy management

  • Battery-supported traction systems

  • BLDC motor drive control

  • Fuel-cell MPPT techniques

  • DC–DC boost-converter control

  • Electronic commutation methods

  • Battery SOC and current analysis

  • Alternative-energy transportation systems

  • Fault and fuel-pressure variation studies


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


The model is useful for:

  • Electrical engineering students

  • Power electronics learners

  • Electric vehicle researchers

  • MATLAB and Simulink users

  • Motor-drive engineers

  • Fuel-cell system developers

  • Renewable-energy researchers

  • Control-system engineers


𝐋𝐞𝐚𝐫𝐧𝐢𝐧𝐠 𝐎𝐮𝐭𝐜𝐨𝐦𝐞𝐬


After studying this model, users can understand:

  • Fuel-cell operation at nominal and maximum operating points

  • P&O MPPT implementation for fuel-cell systems

  • Boost-converter duty-cycle control

  • Battery charging and discharging behaviour

  • Hybrid source power balancing

  • Hall-sensor signal decoding

  • BLDC motor electronic commutation

  • Inverter gate-pulse generation

  • Fuel-pressure effects on fuel-cell power

  • Battery support during fuel-cell power interruption

𝐅𝐀𝐐


What is the main purpose of the battery?

The battery stores excess fuel-cell energy and supplies the BLDC motor when fuel-cell power is insufficient.

Why is a boost converter required?

The boost converter increases the fuel-cell voltage from approximately 24 V to the 48 V DC-bus level.

Which MPPT method is used?


A 𝗣𝗲𝗿𝘁𝘂𝗿𝗯 𝗮𝗻𝗱 𝗢𝗯𝘀𝗲𝗿𝘃𝗲 MPPT method is used to extract maximum power from the fuel cell.

What happens when fuel-cell pressure becomes zero?

The fuel-cell power reduces significantly, and the battery changes to discharging operation to maintain the motor load.

Which motor is used in the model?

A BLDC motor is used as the electric vehicle traction motor.

How are the inverter switches controlled?

The Hall-sensor signals are decoded into back-EMF states, which are then used to generate six inverter switching pulses.

Which outputs are available for analysis?

Fuel-cell voltage, current and power; battery voltage, current and SOC; motor current, back EMF, rotor speed and electromagnetic torque are available.

𝐂𝐨𝐧𝐜𝐥𝐮𝐬𝐢𝐨𝐧


The MATLAB implementation of a fuel-cell battery-driven electric vehicle demonstrates an effective hybrid energy-management structure. The fuel cell acts as the primary energy source, while the battery stores excess power and supports the BLDC motor during reduced or unavailable fuel-cell generation.

The P&O MPPT-controlled boost converter extracts the available fuel-cell power and regulates the voltage to the 48 V DC-bus level. Hall-sensor-based electronic commutation ensures proper BLDC motor operation. Simulation results confirm that the battery can maintain motor speed and torque even when fuel-cell pressure is reduced to zero.

This model provides a practical platform for understanding 𝗳𝘂𝗲𝗹-𝗰𝗲𝗹𝗹 EV operation, battery power balancing, MPPT control, DC–DC conversion and BLDC motor-drive performance.


bottom of page