Brake energy Calculation For an EV Drive train Using MATLAB
Calculating Brake Energy For a Drive Cycle using MATLAB
Objective - In this project, we are going to calculate the brake energy for a given drive cycle using a MATLAB program.
Theory - Braking is an essential part of driving a vehicle. A braking operation is the inverse of that of an acceleration operation. By applying the concept of braking a vehicle can be brought down to a halt or can be parked at an inclination without worrying about gravity. The basic working principle of brakes is to reduce the Kinetic energy to zero by applying an external force. generally, the friction force is used to reduce the K.E of the vehicle, by using brake pads and hydraulic calipers.
In order to calculate the Total KE of the vehicle we have to subtract the Final Kinetic energy from the initial one, i.e.
Brake power = `(K.E)i-(K.E)f`
or,
`(1/2)*m*Vi^2-(1/2)*m*Vf^2`
MATLAB program -
% calculating power for braking in a drive cycle
% Defining variables
M = 100; % mass in kilograms
T = DC(:,1); % Time in sec
V = DC(:,2); % velocity in km/h
for i = 1:(length(DC)-1);
if V(i) > V(i+1);
BE(i)= 0.5*M*(V(i)-V(i+1))^2; % brake energy calculation
end
end
fprintf('Total Brake energy is %d',sum(BE));
figure(1)
subplot(2,1,1)
plot(T,V,'linewidth',2,'color','r');
xlabel('Time');
ylabel('Velocity');
title('DriveCycle');
hold on
subplot(2,1,2)
plot(BE,'Linewidth',2,'color','b');
xlabel('Time');
ylabel('Energy');
title('BrakeEnergy')
Results -


2. Why electric motor can’t develop braking torque at a high speed similar to starting? How electric and mechanical brakes are coordinated?
Ans - An electric motor cannot generate high torque during braking is because of the flux weakening effect of the motor. When the electric supply is pulled off from the circuit the electric motor act as a generator and will convert the KE of the vehicle into electrical energy but in the absence of electrical supply in motor, the flux will deplete and hence torque of high value cannot be generated.
In an electric drive 2-types of brakes are used i.e,
- Electrical braking or Regenerative braking
- mechanical braking
In regenerative braking, the KE is converted to electrical energy and is supplied back to the battery of the vehicle. An electric motor can be used as an electric generator if the input supply is turned off and the motor is driven through an external prime mover, In this case, the prime mover is a vehicle shaft that will keep moving for some time even after the power to the motor is off. But the input power of the battery also has some restrictions due to which if the braking power is more than that of battery input power then mechanical braking must be used in order to bring the vehicle to a halt in a given amount of time.
3. Make a MATLAB program that plots the contour of given motor speed, torque, and efficiency values. Attach the code as a .m file attach a screenshot of all the plots
In this project, I have created a Matlab program for different Speeds and Torque values using the contour command.
Different types of losses occur inside a motor i.e,
- Copper losses
- Iron losses
- Winding losses
- Constant motor losses
all these loss values are used to calculate the total input power of the motor
MATLAB CODE -
% plotting for efficiency of motor
clear all
close all
clc
% defining motor speed and torque
w = linspace(0,1200);
T = linspace(0,300);
% defining motor constant
Kc = 0.2 % copper losses
Ki = 0.0008 % iron losses
Kw = 0.00001 % Winding losses
Cml= 20 % Constant motor losses
[X,Y]=meshgrid(w,T);
power_out = (X.*Y); % output power
B = (Y.^2)*Kc;
C = (X.^3)*Kw;
D = X.*Ki;
power_in = power_out+B+C+D+Cml;
Z = power_out./power_in
A = [0.7 ,0.72 , 0.75, 0.77 , 0.80 , 0.83 , 0.85 0.90 0.95]
grid on
contour(X,Y,Z,A);
xlabel('Speed');
ylabel('Time');
hold on
Results -

Model link - https://drive.google.com/drive/folders/1nqh_PiVc8IjCejgXzDk3egZRJslm8vhX?usp=sharing