top of page

⚡🚗 MATLAB Simulation of a Battery-Driven Electric Vehicle with Regenerative Braking

A complete walkthrough of motoring and regenerative operation using a bidirectional DC-DC converter

Electric vehicles (EVs) rely heavily on intelligent power management techniques to maximize battery life, recover kinetic energy, and improve driving efficiency. One such essential technique is regenerative braking, where the vehicle’s electric motor operates as a generator during deceleration and sends energy back to the battery.

Battery driven Electric vehicle with regenerative Braking operation in MATLAB
₹6,000.00₹3,000.00
Buy Now

🔋 System Overview

The simulation model is built for a battery-powered electric vehicle, consisting of:

  • Battery Pack — 60 V, 400 Ah, initial SOC = 50%

  • Bidirectional DC-DC Converter — operates in buck mode (motoring) and boost mode (regeneration)

  • DC Motor — Rated at 240 V, 5 HP, 1700 RPM

  • Speed Control Loop — PID controller + PWM generator

  • Load Torque — 10 N·m applied on the shaft

The combination of PID control, bidirectional converter operation, and dynamic load behavior allows the system to transition smoothly between motoring and regenerative modes.

⚙️ How the Control System Works

🔸 1. Speed Measurement & PID Control

The motor speed is continuously measured and compared with a reference speed.The PID controller processes the error and generates a duty cycle signal.

🔸 2. PWM Generator

The duty cycle drives the PWM generator, which produces switching pulses for the two MOSFETs in the bidirectional DC-DC converter.

🔸 3. Motoring Mode (Forward Operation)

When the EV accelerates:

  • Battery supplies power to the motor

  • Current flows from the battery → converter → motor

  • Motor torque is positive

  • SOC gradually decreases

The system behaves like a buck converter, stepping down voltage to match motor requirements.

🚗 Forward Motoring Operation – Simulation Results

  • Reference Speed: 120 rad/s

  • Actual Speed: Tracks the reference with high accuracy

  • Battery Current: ~27.5 A (discharging)

  • Motor Current: ~11 A

  • Electromagnetic Torque: Maintained around 10–11 N·m

  • Battery SOC: Slowly decreases since the battery powers the motor

The motor maintains steady operation under constant load without speed variation.

🔄 Regenerative Braking Operation – How It Happens

In regenerative braking, the DC motor operates as a generator.This occurs when we reduce the reference speed from:

  • 120 rad/s → 50 rad/s at 2 seconds

  • Transition performed over 0.05 s to simulate a quick braking action

🔧 What changes during regeneration?

✔️ Motor Current Becomes Negative

  • Current shifts from +11 A to approximately –20 A

  • Indicates that energy is flowing back into the battery

✔️ Electromagnetic Torque Reverses

  • Torque changes from +11 N·m to –20 N·m

  • Negative torque = braking/energy recovery

✔️ Battery Current Becomes Charging Current

  • Battery current shifts from +27.5 A (discharging) to –18 A (charging)

  • Confirms energy recovery during braking

✔️ Battery SOC Increases

  • SOC curve rises

  • Demonstrates stored energy gained from regenerative braking

✔️ Battery Voltage Rises Slightly

  • Due to charging action and reverse power flow

These behaviors match real-world EV regenerative braking where braking torque is directly converted into electrical energy for storage.

📈 Detailed Observations from Simulation

  1. Speed Drops Smoothly as the controller adjusts duty cycle.

  2. Converter Reverses Power Flow, operating as a boost converter during regeneration.

  3. Battery Starts Charging automatically during the braking window.

  4. The System Stabilizes Quickly, maintaining the new reference speed (50 rad/s).

This demonstrates accurate bidirectional converter functionality and effective PID speed control.

🚘 Why Regenerative Braking Matters

Regenerative braking offers:

  • Higher energy efficiency

  • Extended driving range

  • Reduced mechanical brake wear

  • Improved thermal performance

  • Enhanced energy recovery during downhill or deceleration

The presented MATLAB model serves as a practical teaching and research tool for EV drivetrain studies.

🏁 Conclusion

This MATLAB simulation illustrates how a battery-driven electric vehicle transitions between motoring and regenerative braking modes using a bidirectional DC-DC converter. The model clearly shows how electrical energy is consumed and recovered based on speed commands, torque behavior, and battery dynamics.

bottom of page