Challenge

Project 2

OBJECTIVE:

  • To understand the functionality of a P1 hybrid and be able to model it.
  • To quantify the improvement in fuel economy numbers for the hybrid vehicle (kmpl), compared to the conventional vehicle, on the urban cycle (UDDS) and highway cycle (HWFET).
  • To analyze and understand the vehicle operating points in terms of engine and motor speed, torque, transmission speeds, pedal positions, gear, distance traveled, battery voltage, current, SoC etc.
  • To build the Simulink blocks for Engine, Electric Motor, Battery, Controller and Vehicle Dynamics and add additional ‘To Workspace’ blocks for transferring the desired Simulink vehicle data into the Matlab workspace.
  • To do the necessary changes in the respective blocks to model a P1 Hybrid Electric Vehicle.
  • To tabulate the fuel economy numbers (kmpl) for UDDS and HWFET cycle.
  • To plot various plots as per the requirement for both the drive cycles.

SOLUTION:

P1 ARCHITECTURE (CRANKSHAFT MOUNTED ELECTRIC MACHINE):

  • The P1 architecture, with the electric machine connected directly to the crankshaft, is the solution adopted by Honda on their first-generation Integrated Motor Assist (IMA) technology. The electric motor functions as a generator, during vehicle deceleration, as an engine starter, and as a motor (to assist the engine) during vehicle accelerations.

  • One of the biggest advantages of this solution is that the electric motor can provide higher torque than the BiSG, since there is no belt limitation (due to slip). However, since there is no speed / torque ratio between the electric machine and crankshaft, the torque requirements on the electric motor can be quite demanding.
  • The primary advantage of a P1 mild hybrid architecture, compared with P0, is the removal of the belt drive. This means that the efficiency increases a bit (no more belt losses) and the electric machine torque can be higher in terms of amplitude and response (no more belt slip).
  • The functions (modes) performed by this mild hybrid topology are similar with those of a BiSG (P0), but, overall, P1 configurations have two big disadvantages: higher cost and higher impact on the existing vehicle architecture. Therefore, vehicle manufacturers and system suppliers are not investing in the further development of crankshaft-mounted integrated starter generator solution for MHEV applications.

P1 HYBRID ARCHITECTURE:

TASK:

  • The task of this project is to quantify the improvement in fuel economy numbers for the hybrid vehicle (kmpl), compared to the conventional vehicle, on the urban cycle (UDDS) and highway cycle (HWFET).
  • Also, to analyze and understand the vehicle operating points in terms of engine and motor speed, torque, transmission speeds, pedal positions, gear, distance traveled, battery voltage, current, SoC etc.

STEPS TO BE FOLLOWED:

  • Load the Project2 folder as the Current Folder in Matlab.
  • Run the “Project2_InitFile.m” Matlab script.
  • Copy the Conventional vehicle Simulink model created for Project 1 in this folder.
  • Modify this model into a hybrid vehicle model. The lecture presentations can be used as reference.
  • Battery and Supervisory controller models developed in the assignments can be reused.
  • Add additional ‘To Workspace’ blocks for transferring the desired Simulink vehicle data into the Matlab workspace.
  • Simulate the hybrid model on the desired drive cycles.

SIMULINK MODEL:

DRIVER:

CONTROLLER:

POWERTRAIN:

CASE-1: UDDS DRIVE CYCLE:

MATLAB CODE FOR INITIALIZATION:

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Skill-Lync -> Hybrid Drives Development
% Project 1 - Conventional Vehicle Model
% By - Ullekh Gambhira 

% Description:

%% Initialization File
% Initialization file for loading the variables for the Conventional vehicle simulation model

%% Vehicle Parameters
M = 1500;       % Vehicle weight [kg]
Cr = 0.015;     % Rolling resistance coefficient
Rw = 0.35;      % Rolling radius [m]
Cd = 0.33;      % Drag coefficient
Af = 2;         % Frontal area [m2]
rhoa = 1.225;   % Air density [kg/m3]
Vwind = 0;      % Wind velocity [kmph]
g = 9.81;       % Gravitational acceleration [m/s2]
theta = 0;      % Slope [deg]
myu_road_tire = 1; % Coefficient of friction between tire - road interface

%% Powertrain Parameters 
FDR = 3.73;                         % Final Drive Ratio / Diff Ratio
DiffEff = 0.99;                     % Differential efficiency (assumed independent of operating conditions)

NumGear = 4;                        % Number of gears in transmission
TransGear = [1:NumGear];            % Transmission Gears
TransRatio = [3.06, 1.62, 1, 0.7];  % Corresponding Transmission ratios
TransEff = 0.90;                    % Transmission efficiency (assumed independent of operating conditions)

TC_SR = [0, .5, .6, .7, .8, .87, .92, .94, .96, .97, 1];   % Torque Converter Speed Ratio (Matlab default) -> TurbSpd/PumpSpd  
TC_TR = [2.232, 1.5462, 1.4058, 1.2746, 1.1528, 1.0732, 1.0192, 1, 1, 1, 1];   % Torque Converter Torque Ratio (Matlab default) -> TurbTrq/PumpTrq
TC_Cf = 1e-4 * [.72558, .66322, .63463, .59042, .51331, .4144, .29287, .22444, .12186, .04386, 0]; % Torque Converter Capacity Factor (Matlab default) -> PumpTrq/PumpSpd^2 [Nm/rpm^2]

load Vehicle_Data/Engine_data_1_9L_Saturn_95kW
load Vehicle_Data/Trans_Shift_map
load Vehicle_Data/EM_Honda_Insight_10kW
load Vehicle_Data/ESS_NiMH6


ESS_ini_soc = 0.8;
ESS_soc_max = 0.9;
ESS_soc_min = 0.6;


%% Driver Parameters
Kp = 10;                    % P gain for driver PI model
Ki = 1;                     % I gain for driver PI model
Drive_Cycle_Select = 1;     % Drive cycle selection

% Drive cycle values in m/s

if Drive_Cycle_Select == 1
    load DriveCycles/UDDS;
    
elseif Drive_Cycle_Select == 2
    load DriveCycles/HWFET;
    
elseif Drive_Cycle_Select == 3
    load DriveCycles/FTP;
    
elseif Drive_Cycle_Select == 4
    load DriveCycles/US06;
    
elseif Drive_Cycle_Select == 5
    load DriveCycles/NEDC;
    
elseif Drive_Cycle_Select == 6
    load DriveCycles/WLTP;
 
end

time_end = cyc_time(end);
vel_end = cyc_vel(end);



MATLAB CODE FOR POST PROCESSING:

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Skill-Lync -> Hybrid Drives Development
% Project 1 - Conventional Vehicle Model
% By - Ullekh Gambhira 

% Description:
% The following file is to used with the Initialization file and Simulink
% results for post-processing of the data.
% The file is incomplete, has some examples of how the data is imported
% into a readable format, data analysis and plotting examples.
% Based on the project task, use commands in a similar format as given
% below, to analyse the data and generate required plots.
% You can change variable names if desired

%% Post-Processing File
%  File for post-processing the Conventional vehicle simulation model data

%% Renaming variables
Time = out.tout;
Acc_Pdl = out.Acc_Pdl;          % Accelerator pedal [%]
Brk_Pdl = out.Brk_Pdl;          % Brake pedal [%]
Gear_Cmd = out.Gear_Cmd;        % Transmission gear
Trans_In_Spd = out.Trans_In_Spd*30/pi;  % Transmission input speed [rpm]
Trans_Out_Spd = out.Trans_Out_Spd*30/pi;% Transmission output speed [rpm]
Eng_Trq = out.Eng_Trq;          % Engine brake torque [Nm]
Eng_Spd = out.Eng_Spd*30/pi;    % Engine speed [rpm]
Eng_Fuel_Consump = out.Eng_Fuel_Consumption;    % Engine fuel consumption [g]
Veh_Dist = out.Veh_Dist/1000;   % Distance traveled by vehicle [km]
Veh_Spd = out.Veh_Spd*18/5;     % Vehicle speed [kmph]
Wheel_Spd = out.Wheel_Spd*30/pi;% Wheel Speed [kmph]
Eng_Fuel_Rate = out.Eng_Fuel_Rate         % Engine Fuel Rate [g/sec]

Eng_Spd_1 = Eng_Spd.Data(:,1);
Eng_Trq_1 = Eng_Trq.Data(:,1);


%% Data Analysis
Eng_Pwr = (Eng_Spd*pi/30) * (Eng_Trq/1000);   % Engine brake power [kW]
rho_petrol = 0.7197;                    % Density of petrol [kg/L]
kmpl = Veh_Dist(end)/(Eng_Fuel_Consump(end)/1000/rho_petrol);    % Fuel economy [kmpl] 


%% Plotting vehicle characteristics time trace
figure()
subplot(3,1,1)
hold on
grid on
plot(Time, Acc_Pdl, 'linewidth', 1, 'Color', 'black');
plot(Time, Brk_Pdl, 'linewidth', 1, 'Color', 'red');
ylabel('Pedal [%]')
xlim([0, Time(end)]);
legend('Accel','Brake');
subplot(3,1,2)
hold on
grid on
plot(Time, Trans_In_Spd, 'linewidth', 1, 'Color', 'black');
plot(Time, Trans_Out_Spd, 'linewidth', 1, 'Color', 'red');
ylabel('Speed [rpm]')
xlim([0, Time(end)]);
ylim([0, 6000]);
legend('Trans Input','Trans Output');
subplot(3,1,3)
hold on
grid on
plot(Time, Gear_Cmd, 'linewidth', 1, 'Color', 'black');
xlim([0, Time(end)]);
xlabel('Time [s]');
ylabel('Gear');

%% Plotting engine operating points on engine fuel map
figure('Name','Engine Operating Points');
hold on
grid on
title('Engine Operating Points','fontsize',12);
p1=plot(Eng_map_spd*30/pi,Eng_max_trq,'linewidth',2,'color','r');
p2=line([Eng_map_spd(end)*30/pi Eng_map_spd(end)*30/pi],[0 Eng_max_trq(end)]);
set(p2,'linewidth',1,'linestyle','--','color','k');
p3=line([Eng_map_spd(1)*30/pi Eng_map_spd(1)*30/pi],[0 Eng_max_trq(1)]);
set(p3,'linewidth',1,'linestyle','--','color','k');
[c,h] = contour(Eng_map_spd'*30/pi,Eng_map_trq,Eng_fuel_map');
clabel(c,h);
xlabel('Engine Speed [rpm]');
ylabel('Engine Torque [Nm]');
title('Engine Fuel Consumption Map [g/s]');
% p4 = plot(Eng_Spd,Eng_Trq,'.','color','k');
% legend([p1 p4],{'Max Curve','Operating Points'});
axis([Eng_map_spd(1)*30/pi Eng_map_spd(end)*30/pi 0 Eng_map_trq(end)]);


%%

figure(3)

grid on
plot(Eng_Spd, 'linewidth', 1, 'Color', 'black');

hold on
plot(Wheel_Spd, 'linewidth', 1, 'Color', 'red');

hold on
plot(Time, Trans_In_Spd, 'linewidth', 1, 'Color', 'blue');

hold on
plot(Time, Trans_Out_Spd, 'linewidth', 1, 'Color', 'green');

ylabel('Speed [RPM]')
legend('Engine Speed' , 'Wheel Speed' , 'Transmission Input Speed' , 'Transmission Output Speed')



%%

figure(4)


subplot(4,1,1)
grid on
plot(Eng_Trq , 'linewidth', 1, 'color', 'blue')
ylabel('Engine Torque [N-m]')

subplot(4,1,2)
grid on
plot(Eng_Pwr , 'linewidth', 1, 'color', 'green')
ylabel('Engine Power [KW]')

subplot(4,1,3)
grid on
plot(Eng_Fuel_Rate, 'linewidth', 1, 'Color', 'red');
ylabel('Engine Fuel Rate [g/s])')

subplot(4,1,4)
grid on
plot(Eng_Fuel_Consump, 'linewidth', 1, 'Color', 'black');
ylabel('Engine Fuel Consumption [g]')


%%

figure(5)

subplot(3,2,1)
grid on
plot(Time, Acc_Pdl, 'linewidth', 1, 'Color', 'black');
ylabel('Accelerator Pedal [%]')

subplot(3,2,3)
grid on
plot(Time, Brk_Pdl, 'linewidth', 1, 'Color', 'red');
ylabel('Brake Pedal [%]')

subplot(3,2,5)
grid on
plot(Time, Gear_Cmd, 'linewidth', 1, 'Color', 'blue');
ylabel('Gear');

subplot(3,2,2)
grid on
plot(cyc_time,cyc_vel, 'linewidth', 1, 'Color', 'black')
ylabel('Vehicle Desired Velocity [m/s]')

subplot(3,2,4)
grid on
plot(Veh_Spd, 'linewidth', 1, 'Color', 'red')
xlabel('Time [s]')
ylabel('Vehicle Actual Speed [Km/h]')

subplot(3,2,6)
grid on
plot(Veh_Dist, 'linewidth', 1, 'Color', 'blue')
xlabel('Time [s]')
ylabel('Vehicle Distance [Km]')

figure(6)

plot(cyc_time,cyc_vel*(18/5), 'linewidth', 1, 'Color', 'green')
hold on
plot(Veh_Spd, 'linewidth', 1, 'Color', 'red')
ylabel('Vehicle Velocity (Km/h)')
xlabel('Time [s]')
legend('Vehicle Desired Velocity' , 'Vehicle Actual Speed')


%%

EM_spd_R = out.EM_spd*30/pi;

figure(7)

subplot(4,1,1)
grid on
plot(out.Elec_Pwr, 'linewidth', 1, 'Color', 'black')
xlabel('Time [s]')
ylabel('Electric Power [W]')

subplot(4,1,2)
grid on
plot(out.EM_Trq, 'linewidth', 1, 'Color', 'red')
xlabel('Time [s]')
ylabel('Torque [N-m]')

subplot(4,1,3)
grid on
plot(out.EM_spd, 'linewidth', 1, 'Color', 'green')
xlabel('Time [s]')
ylabel('Motor Speed [Rad/s]')

subplot(4,1,4)
grid on
plot(EM_spd_R, 'linewidth', 1, 'Color', 'blue')
xlabel('Time [s]')
ylabel('Motor Speed [RPM]')


%%

figure(8)

subplot(3,1,1)
grid on
plot(out.V_batt, 'linewidth', 1, 'Color', 'black')
xlabel('Time [s]')
ylabel('Battery Voltage [V]')

subplot(3,1,2)
grid on
plot(out.Pack_Current, 'linewidth', 1, 'Color', 'red')
xlabel('Time [s]')
ylabel('Pack Current [A]')

subplot(3,1,3)
grid on
plot(out.soc, 'linewidth', 1, 'Color', 'green')
xlabel('Time [s]')
ylabel('SOC [%]')



PLOTS:

FIGURE-1:

FIGURE-2:

FIGURE-3:

FIGURE-4:

FIGURE-5:

FIGURE-6:

FIGURE-7:

FIGURE-8:

FIGURE DESCRIPTION:

  • FIGURE-1:
    • Figure 1 contains 3 subplots.
    • In the first subplot the Accelerator pedal and Brake pedal application in percentage are plotted for the drive cycle.
    • The accelerator pedal and the brake pedal are applied as per the drive cycle.
    • In the second subplot the transmission input speed and transmission output speed are plotted for the drive cycle.
    • In the third subplot the Gear command from the transmission system is plotted for different speeds of the drive cycle.
  • FIGURE-2:
    • In the figure 2 the Engine fuel efficiency map is plotted in a contour plot.
    • Also, the actual or operating engine torque and engine speed is plotted in the fuel efficiency map.
  • FIGURE-3:
    • In this plot the Engine Speed, Wheel Speed, Transmission Input speed and Transmission Output speed is plotted in a single plot to compare between different component speeds.
  • FIGURE-4:
    • Figure 4 contains 4 subplots.
    • In the first subplot the Engine Torque is plotted for the drive cycle.
    • In the second subplot the Engine Power is plotted for the drive cycle.
    • In the third subplot the Engine Fuel Rate in g/sec is plotted for the drive cycle.
    • In the fourth subplot the Engine Fuel Consumption in g is plotted for the drive cycle.
  • FIGURE-5:
    • Figure 5 contains 6 subplots.
    • In the first subplot the Accelerator Pedal application in percentage is plotted for the drive cycle.
    • In the second subplot the Brake Pedal application in percentage is plotted for the drive cycle.
    • In the third subplot the Gear command as per the speed is plotted for the drive cycle.
    • In the fourth subplot the Vehicle Desired Velocity is plotted for the drive cycle.
    • In the fifth subplot the Vehicle Actual Velocity is plotted for the drive cycle.
    • In the sixth subplot the Total distance covered by the vehicle is plotted for the drive cycle.
  • FIGURE-6:
    • In this plot the Vehicle Desired Velocity and the Vehicle Actual Velocity is plotted in one plot to compare between the desired velocity and the actual velocity and to check whether the vehicle can achieve the desired velocity of the drive cycle.
  • FIGURE-7:
    • Figure 7 contains 4 subplots.
    • In the first subplot Electric Motor Power in Watt is plotted for the drive cycle.
    • In the second subplot Electric Motor Torque in N-m is plotted for the drive cycle.
    • In the third subplot Electric Motor Speed in rad/sec is plotted for the drive cycle.
    • In the fourth subplot Electric Motor Speed in RPM is plotted for the drive cycle.
  • FIGURE-8:
    • Figure 8 contains 3 subplots.
    • In the first subplot Battery Voltage in Volts is plotted for the drive cycle.
    • In the second subplot Pack Current in Amperes is plotted for the drive cycle.
    • In the third subplot SOC in percentage is plotted for the drive cycle.

CASE-2: HWFET DRIVE CYCLE:

MATLAB CODE FOR INITIALIZATION:

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Skill-Lync -> Hybrid Drives Development
% Project 1 - Conventional Vehicle Model
% By - Ullekh Gambhira 

% Description:

%% Initialization File
% Initialization file for loading the variables for the Conventional vehicle simulation model

%% Vehicle Parameters
M = 1500;       % Vehicle weight [kg]
Cr = 0.015;     % Rolling resistance coefficient
Rw = 0.35;      % Rolling radius [m]
Cd = 0.33;      % Drag coefficient
Af = 2;         % Frontal area [m2]
rhoa = 1.225;   % Air density [kg/m3]
Vwind = 0;      % Wind velocity [kmph]
g = 9.81;       % Gravitational acceleration [m/s2]
theta = 0;      % Slope [deg]
myu_road_tire = 1; % Coefficient of friction between tire - road interface

%% Powertrain Parameters 
FDR = 3.73;                         % Final Drive Ratio / Diff Ratio
DiffEff = 0.99;                     % Differential efficiency (assumed independent of operating conditions)

NumGear = 4;                        % Number of gears in transmission
TransGear = [1:NumGear];            % Transmission Gears
TransRatio = [3.06, 1.62, 1, 0.7];  % Corresponding Transmission ratios
TransEff = 0.90;                    % Transmission efficiency (assumed independent of operating conditions)

TC_SR = [0, .5, .6, .7, .8, .87, .92, .94, .96, .97, 1];   % Torque Converter Speed Ratio (Matlab default) -> TurbSpd/PumpSpd  
TC_TR = [2.232, 1.5462, 1.4058, 1.2746, 1.1528, 1.0732, 1.0192, 1, 1, 1, 1];   % Torque Converter Torque Ratio (Matlab default) -> TurbTrq/PumpTrq
TC_Cf = 1e-4 * [.72558, .66322, .63463, .59042, .51331, .4144, .29287, .22444, .12186, .04386, 0]; % Torque Converter Capacity Factor (Matlab default) -> PumpTrq/PumpSpd^2 [Nm/rpm^2]

load Vehicle_Data/Engine_data_1_9L_Saturn_95kW
load Vehicle_Data/Trans_Shift_map
load Vehicle_Data/EM_Honda_Insight_10kW
load Vehicle_Data/ESS_NiMH6


ESS_ini_soc = 0.8;
ESS_soc_max = 0.9;
ESS_soc_min = 0.6;


%% Driver Parameters
Kp = 10;                    % P gain for driver PI model
Ki = 1;                     % I gain for driver PI model
Drive_Cycle_Select = 2;     % Drive cycle selection

% Drive cycle values in m/s

if Drive_Cycle_Select == 1
    load DriveCycles/UDDS;
    
elseif Drive_Cycle_Select == 2
    load DriveCycles/HWFET;
    
elseif Drive_Cycle_Select == 3
    load DriveCycles/FTP;
    
elseif Drive_Cycle_Select == 4
    load DriveCycles/US06;
    
elseif Drive_Cycle_Select == 5
    load DriveCycles/NEDC;
    
elseif Drive_Cycle_Select == 6
    load DriveCycles/WLTP;
 
end

time_end = cyc_time(end);
vel_end = cyc_vel(end);



MATLAB CODE FOR POST PROCESSING:

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Skill-Lync -> Hybrid Drives Development
% Project 1 - Conventional Vehicle Model
% By - Ullekh Gambhira 

% Description:
% The following file is to used with the Initialization file and Simulink
% results for post-processing of the data.
% The file is incomplete, has some examples of how the data is imported
% into a readable format, data analysis and plotting examples.
% Based on the project task, use commands in a similar format as given
% below, to analyse the data and generate required plots.
% You can change variable names if desired

%% Post-Processing File
%  File for post-processing the Conventional vehicle simulation model data

%% Renaming variables
Time = out.tout;
Acc_Pdl = out.Acc_Pdl;          % Accelerator pedal [%]
Brk_Pdl = out.Brk_Pdl;          % Brake pedal [%]
Gear_Cmd = out.Gear_Cmd;        % Transmission gear
Trans_In_Spd = out.Trans_In_Spd*30/pi;  % Transmission input speed [rpm]
Trans_Out_Spd = out.Trans_Out_Spd*30/pi;% Transmission output speed [rpm]
Eng_Trq = out.Eng_Trq;          % Engine brake torque [Nm]
Eng_Spd = out.Eng_Spd*30/pi;    % Engine speed [rpm]
Eng_Fuel_Consump = out.Eng_Fuel_Consumption;    % Engine fuel consumption [g]
Veh_Dist = out.Veh_Dist/1000;   % Distance traveled by vehicle [km]
Veh_Spd = out.Veh_Spd*18/5;     % Vehicle speed [kmph]
Wheel_Spd = out.Wheel_Spd*30/pi;% Wheel Speed [kmph]
Eng_Fuel_Rate = out.Eng_Fuel_Rate         % Engine Fuel Rate [g/sec]

Eng_Spd_1 = Eng_Spd.Data(:,1);
Eng_Trq_1 = Eng_Trq.Data(:,1);


%% Data Analysis
Eng_Pwr = (Eng_Spd*pi/30) * (Eng_Trq/1000);   % Engine brake power [kW]
rho_petrol = 0.7197;                    % Density of petrol [kg/L]
kmpl = Veh_Dist(end)/(Eng_Fuel_Consump(end)/1000/rho_petrol);    % Fuel economy [kmpl] 


%% Plotting vehicle characteristics time trace
figure()
subplot(3,1,1)
hold on
grid on
plot(Time, Acc_Pdl, 'linewidth', 1, 'Color', 'black');
plot(Time, Brk_Pdl, 'linewidth', 1, 'Color', 'red');
ylabel('Pedal [%]')
xlim([0, Time(end)]);
legend('Accel','Brake');
subplot(3,1,2)
hold on
grid on
plot(Time, Trans_In_Spd, 'linewidth', 1, 'Color', 'black');
plot(Time, Trans_Out_Spd, 'linewidth', 1, 'Color', 'red');
ylabel('Speed [rpm]')
xlim([0, Time(end)]);
ylim([0, 6000]);
legend('Trans Input','Trans Output');
subplot(3,1,3)
hold on
grid on
plot(Time, Gear_Cmd, 'linewidth', 1, 'Color', 'black');
xlim([0, Time(end)]);
xlabel('Time [s]');
ylabel('Gear');

%% Plotting engine operating points on engine fuel map
figure('Name','Engine Operating Points');
hold on
grid on
title('Engine Operating Points','fontsize',12);
p1=plot(Eng_map_spd*30/pi,Eng_max_trq,'linewidth',2,'color','r');
p2=line([Eng_map_spd(end)*30/pi Eng_map_spd(end)*30/pi],[0 Eng_max_trq(end)]);
set(p2,'linewidth',1,'linestyle','--','color','k');
p3=line([Eng_map_spd(1)*30/pi Eng_map_spd(1)*30/pi],[0 Eng_max_trq(1)]);
set(p3,'linewidth',1,'linestyle','--','color','k');
[c,h] = contour(Eng_map_spd'*30/pi,Eng_map_trq,Eng_fuel_map');
clabel(c,h);
xlabel('Engine Speed [rpm]');
ylabel('Engine Torque [Nm]');
title('Engine Fuel Consumption Map [g/s]');
% p4 = plot(Eng_Spd,Eng_Trq,'.','color','k');
% legend([p1 p4],{'Max Curve','Operating Points'});
axis([Eng_map_spd(1)*30/pi Eng_map_spd(end)*30/pi 0 Eng_map_trq(end)]);


%%

figure(3)

grid on
plot(Eng_Spd, 'linewidth', 1, 'Color', 'black');

hold on
plot(Wheel_Spd, 'linewidth', 1, 'Color', 'red');

hold on
plot(Time, Trans_In_Spd, 'linewidth', 1, 'Color', 'blue');

hold on
plot(Time, Trans_Out_Spd, 'linewidth', 1, 'Color', 'green');

ylabel('Speed [RPM]')
legend('Engine Speed' , 'Wheel Speed' , 'Transmission Input Speed' , 'Transmission Output Speed')



%%

figure(4)


subplot(4,1,1)
grid on
plot(Eng_Trq , 'linewidth', 1, 'color', 'blue')
ylabel('Engine Torque [N-m]')

subplot(4,1,2)
grid on
plot(Eng_Pwr , 'linewidth', 1, 'color', 'green')
ylabel('Engine Power [KW]')

subplot(4,1,3)
grid on
plot(Eng_Fuel_Rate, 'linewidth', 1, 'Color', 'red');
ylabel('Engine Fuel Rate [g/s])')

subplot(4,1,4)
grid on
plot(Eng_Fuel_Consump, 'linewidth', 1, 'Color', 'black');
ylabel('Engine Fuel Consumption [g]')


%%

figure(5)

subplot(3,2,1)
grid on
plot(Time, Acc_Pdl, 'linewidth', 1, 'Color', 'black');
ylabel('Accelerator Pedal [%]')

subplot(3,2,3)
grid on
plot(Time, Brk_Pdl, 'linewidth', 1, 'Color', 'red');
ylabel('Brake Pedal [%]')

subplot(3,2,5)
grid on
plot(Time, Gear_Cmd, 'linewidth', 1, 'Color', 'blue');
ylabel('Gear');

subplot(3,2,2)
grid on
plot(cyc_time,cyc_vel, 'linewidth', 1, 'Color', 'black')
ylabel('Vehicle Desired Velocity [m/s]')

subplot(3,2,4)
grid on
plot(Veh_Spd, 'linewidth', 1, 'Color', 'red')
xlabel('Time [s]')
ylabel('Vehicle Actual Speed [Km/h]')

subplot(3,2,6)
grid on
plot(Veh_Dist, 'linewidth', 1, 'Color', 'blue')
xlabel('Time [s]')
ylabel('Vehicle Distance [Km]')

figure(6)

plot(cyc_time,cyc_vel*(18/5), 'linewidth', 1, 'Color', 'green')
hold on
plot(Veh_Spd, 'linewidth', 1, 'Color', 'red')
ylabel('Vehicle Velocity (Km/h)')
xlabel('Time [s]')
legend('Vehicle Desired Velocity' , 'Vehicle Actual Speed')


%%

EM_spd_R = out.EM_spd*30/pi;

figure(7)

subplot(4,1,1)
grid on
plot(out.Elec_Pwr, 'linewidth', 1, 'Color', 'black')
xlabel('Time [s]')
ylabel('Electric Power [W]')

subplot(4,1,2)
grid on
plot(out.EM_Trq, 'linewidth', 1, 'Color', 'red')
xlabel('Time [s]')
ylabel('Torque [N-m]')

subplot(4,1,3)
grid on
plot(out.EM_spd, 'linewidth', 1, 'Color', 'green')
xlabel('Time [s]')
ylabel('Motor Speed [Rad/s]')

subplot(4,1,4)
grid on
plot(EM_spd_R, 'linewidth', 1, 'Color', 'blue')
xlabel('Time [s]')
ylabel('Motor Speed [RPM]')


%%

figure(8)

subplot(3,1,1)
grid on
plot(out.V_batt, 'linewidth', 1, 'Color', 'black')
xlabel('Time [s]')
ylabel('Battery Voltage [V]')

subplot(3,1,2)
grid on
plot(out.Pack_Current, 'linewidth', 1, 'Color', 'red')
xlabel('Time [s]')
ylabel('Pack Current [A]')

subplot(3,1,3)
grid on
plot(out.soc, 'linewidth', 1, 'Color', 'green')
xlabel('Time [s]')
ylabel('SOC [%]')



PLOTS:

FIGURE-1:

FIGURE-2:

FIGURE-3:

FIGURE-4:

FIGURE-5:

FIGURE-6:

FIGURE-7:

FIGURE-8:

FIGURE DESCRIPTION:

  • FIGURE-1:
    • Figure 1 contains 3 subplots.
    • In the first subplot the Accelerator pedal and Brake pedal application in percentage are plotted for the drive cycle.
    • The accelerator pedal and the brake pedal are applied as per the drive cycle.
    • In the second subplot the transmission input speed and transmission output speed are plotted for the drive cycle.
    • In the third subplot the Gear command from the transmission system is plotted for different speeds of the drive cycle.
  • FIGURE-2:
    • In the figure 2 the Engine fuel efficiency map is plotted in a contour plot.
    • Also, the actual or operating engine torque and engine speed is plotted in the fuel efficiency map.
  • FIGURE-3:
    • In this plot the Engine Speed, Wheel Speed, Transmission Input speed and Transmission Output speed is plotted in a single plot to compare between different component speeds.
  • FIGURE-4:
    • Figure 4 contains 4 subplots.
    • In the first subplot the Engine Torque is plotted for the drive cycle.
    • In the second subplot the Engine Power is plotted for the drive cycle.
    • In the third subplot the Engine Fuel Rate in g/sec is plotted for the drive cycle.
    • In the fourth subplot the Engine Fuel Consumption in g is plotted for the drive cycle.
  • FIGURE-5:
    • Figure 5 contains 6 subplots.
    • In the first subplot the Accelerator Pedal application in percentage is plotted for the drive cycle.
    • In the second subplot the Brake Pedal application in percentage is plotted for the drive cycle.
    • In the third subplot the Gear command as per the speed is plotted for the drive cycle.
    • In the fourth subplot the Vehicle Desired Velocity is plotted for the drive cycle.
    • In the fifth subplot the Vehicle Actual Velocity is plotted for the drive cycle.
    • In the sixth subplot the Total distance covered by the vehicle is plotted for the drive cycle.
  • FIGURE-6:
    • In this plot the Vehicle Desired Velocity and the Vehicle Actual Velocity is plotted in one plot to compare between the desired velocity and the actual velocity and to check whether the vehicle can achieve the desired velocity of the drive cycle.
  • FIGURE-7:
    • Figure 7 contains 4 subplots.
    • In the first subplot Electric Motor Power in Watt is plotted for the drive cycle.
    • In the second subplot Electric Motor Torque in N-m is plotted for the drive cycle.
    • In the third subplot Electric Motor Speed in rad/sec is plotted for the drive cycle.
    • In the fourth subplot Electric Motor Speed in RPM is plotted for the drive cycle.
  • FIGURE-8:
    • Figure 8 contains 3 subplots.
    • In the first subplot Battery Voltage in Volts is plotted for the drive cycle.
    • In the second subplot Pack Current in Amperes is plotted for the drive cycle.
    • In the third subplot SOC in percentage is plotted for the drive cycle.

CONCLUSION:

  • In this project we learnt how to model a P1 Hybrid Electric Vehicle.
  • We modelled the Engine block, Controller block, Battery block, Electric Motor block and the Vehicle Dynamics block using Simulink to complete the conventional vehicle model.
  • We plotted various plots as per requirement in the Matlab in the Post Processing script to study the behaviors of the vehicle.
  • The fuel economy numbers in kmpl are computed and tabulated for both the drive cycle and is attached in form of excel sheet.
Your portfolio, next

Ship work like this
in your own course.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.