Project 1
Development of a forward energy-based fuel consumption model of a conventional vehicle.
Aim :-
To compute the fuel economy numbers for the given vehicle (kmpl) on the urban cycle (UDDS) and highway cycle (HWFET). Also, to analyze and understand the vehicle operating points in terms of engine speed, torque, transmission speeds, pedal positions, gear, distance traveled, etc.
Objectives :-
- Tabulate the fuel economy numbers (kmpl) for UDDS and HWFET cycle. This forms the baseline numbers for comparing with the future hybrid version.
- Plot the time trace for engine, transmission input, transmission output and wheel speed on one plot.
- Plot engine torque, engine power, fuel rate and fuel consumption using subplots.
- Plot accelerator and brake pedal, gear command, vehicle desired and actual speed, vehicle distance using subplots.
- Plot the engine operating points on the engine fuel map.
- Generate the plots for both drive cycles.
Given matlab script for loading variables and drive cycle data in workspce to build simulink modle. Drive cycle selection also done in script for building simulink model & plotting results.
Matlab script for initialization.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Skill-Lync -> Hybrid Drives Development
% Project 1 - Conventional Vehicle Model
% By - Vishal Padekar
% 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
%% 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);
Depending upon the variable 'Drive_Cycle_Select' value the drive cycle selection done as shown below
| 1 | UDDS |
| 2 | HWFET |
| 3 | FTP |
| 4 | US06 |
| 5 | NEDC |
| 6 | WLTP |
Simulink Model :-

- Conventional vehicle modle consist of 3 blocks viz, Driver, Controller & Powertrain block.
- For each block simulink screen shot pasted below.
Driver Model :-

- Driver’ block is a basic PI controller that generates accelerator and brake pedal outputs to match the desired and actual vehicle speeds.
- By providing acceleration and brake pedal output to the controller, the PI controller controls the error between the required drive cycle and actual vehicle speed.
Controller :-

- The Controller block is the brains of the vehicle, representing the electronic controls units.
- Based on the driver inputs, it generates desired engine torque, desired transmission gear and desired brake torque.
- These inputs are fed to the ‘Powertrain’ block which represents the drivetrain of the vehicle.
- The Controller consist of various control units viz, Engine control Unit, Transmission control unit & Brake control unit.
1) Engine Control Unit :-

- Used mainly for controlling engine speed & torque generated by comapairing max and min curve with required.
- This is achieve by opening and closing throttle as per requirement.
1.1) Idle speed controller :-

2) Transmission Control Unit :-

- The gear command is passed to the Transmission block to select the desired gear ratio.
2.1) Shift Logic :-

- The transmission control block controls the gear shifting using the study flow Variable chart.
- The Gear shifting is Controlled according to the vehicle speed and throttle input.
3) Brake Control Unit :-

- Brake Control unit Produce required brake torque according to the brake pedal input and passes the brake torque in to the wheel block.
Powertrain :-

- It consists of an Engine connected to the Automatic Transmission through a Torque Converter.
- The output of the transmission is connected to the Differential, which powers the Wheels, that provides the tractive force for vehicle acceleration.
- The longitudinal dynamics of the vehicle along with the road load is represented in the Vehicle Dynamics block.
1) Engine :-

- Based on control singnal engine produces the torque and speed to the vehicle.
- Depending uopn operating points fuel consumption & economy varies.
2) Transmission :-

- The output of the transmission is connected to the ’Differential’, which powers the ‘Wheels’, that provides the tractive force for vehicle acceleration.
2.1) Torque Converter :-

- Torque converter is basiacally coupling device which is coupled & decoupled with engine as per requirement.
- It helps in shifting gear ratios as per requirements.
3) Differential :-

- It transmit power from transmission to wheels.
- It provides power while turning with min friction of wheels with road.
4) Wheels :-

- Vehicle move by means of wheels.
5) Vehicle Dynamics :-

- The longitudinal dynamics of the vehicle along with the road load is represented in the Vehicle Dynamics block.
- Road Load = 1/2[rho_a * Af * Cd * (Vveh-Vwind)^2 + Cr * Mg * Cos(theta) + Mg * sin(theta).
Script for plotting graph & loading variable from simulink model.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Skill-Lync -> Hybrid Drives Development
% Project 1 - Conventional Vehicle Model
% By - Vishal Padekar
% 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_Rate = out.Eng_Fuel_Rate; % Engine fuel rate in[gkW]
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]
Whl_Spd = out.Whl_Spd*30/pi; % Wheel speed [rpm]
Desired_spd = out.Desired_Velo*18/5; % Desired Speed [Kmph]
%% 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]
%% Display Fuel Economy of the Cycle
fprintf('Fuel Economy = %2.2fKmpl',kmpl);
%% Plotting vehicle characteristics time trace
%%Plotting transmission input, transmission output and wheel speed
figure(1)
hold on;
grid on;
plot(Time, Trans_In_Spd, 'linewidth', 1, 'Color', 'black');
plot(Time, Trans_Out_Spd, 'linewidth', 1, 'Color', 'red');
plot(Time, Whl_Spd, 'linewidth', 1, 'Color', 'blue');
xlabel('Time [s]');
ylabel('Speed [rpm]');
xlim([0, Time(end)]);
legend('Trans Input','Trans Output','Wheel Speed');
%% Ploting engine torque, engine power, fuel rate and fuel consumption
figure(2)
subplot(411);
hold on;
grid on;
plot(Time, Eng_Trq, 'linewidth', 1, 'Color', 'black');
xlabel('Time [s]');
ylabel('Torque [Nm]');
xlim([0, Time(end)]);
subplot(412);
hold on;
grid on;
plot(Time, Eng_Pwr, 'linewidth', 1, 'Color', 'black');
xlabel('Time [s]');
ylabel('Power [KW]');
subplot(413);
hold on;
grid on;
plot(Time, Eng_Fuel_Rate, 'linewidth', 1, 'Color', 'black');
xlabel('Time [s]');
ylabel('Engine Fuel rate');
subplot(414);
hold on;
grid on;
plot(Time, Eng_Fuel_Consump, 'linewidth', 1, 'Color', 'black');
xlabel('Time [s]');
ylabel('Fuel Consumption [g]');
%% Ploting accelerator and brake pedal, gear command, vehicle desired and actual speed, vehicle distance
figure(3)
subplot(411);
hold on;
grid on;
plot(Time, Acc_Pdl, 'linewidth', 1, 'Color', 'black');
plot(Time, Brk_Pdl, 'linewidth', 1, 'Color', 'red');
xlabel('Time [s]');
ylabel('Pedal [%]')
xlim([0, Time(end)]);
legend('Accel','Brake');
subplot(412);
hold on;
grid on;
plot(Time, Gear_Cmd, 'linewidth', 1, 'Color', 'black');
xlabel('Time [s]');
ylabel('Gear');
subplot(413);
hold on;
grid on;
plot(Time, Veh_Spd, 'linewidth', 1, 'Color', 'red');
plot(Time, Desired_spd, 'linewidth', 1, 'Color', 'black');
xlabel('Time [s]');
ylabel('Speed [Kmph]');
legend('Actual speed','Desired speed');
subplot(414);
hold on;
grid on;
plot(Time, Veh_Dist, 'linewidth', 1, 'Color', 'black');
xlabel('Time [s]');
ylabel('Distance [Km]');
%% Test Results
Avg_speed = sum(Veh_Spd)/length(Veh_Spd);
Max_Speed = maxk(Veh_Spd,1);
table(Avg_speed,Max_Speed,kmpl,'VariableNames',{'Average Speed [kmph]','Maximum Speed [kmph]','Fuel Economy [kmpl]'})
%% Plotting Drive Cycle
figure(4)
hold on
grid on
plot(cyc_time, cyc_vel, 'linewidth', 1, 'Color', 'black');
xlabel('Time [s]')
ylabel('Velocity [Mph]')
title('Drive Cycle')
%% 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)]);
a. Tabulate the fuel economy numbers (kmpl) for UDDS and HWFET cycle.
1) UDDS Cycle -

2) HWFET Cycle -

- HWFET drive cycle is more fuel efficient due to less braking & ideling time as comapred to UDDS cycle.
b. Plot the time trace for engine, transmission input, transmission output and wheel speed on one plot.
1)UDDS Cycle :-

2) HWFET Cycle -

- UDDS cycle having more fluctaitin transmission input & output speed as comapred to HWFET cycle.
- Resulting in more fluctation in wheel speed for UDDS cycle.
- HWFET cycle is smoother than UDDS cycle.
c. Plot engine torque, engine power, fuel rate and fuel consumption using subplots.
1)UDDS Cycle :-

2) HWFET Cycle -

- HWFET cycle required constant torque and power requirement ande less negative power and torque requirement.
- UDDS has fluctuating positive and negative power requirment due to sudden braking and idelling losses.
- Engine fuel rate is more fluctuating in UDDS cycle as comapred to HWFET cycle.
- Fuel cosumption increases with time in drive cycle, but after ceretain time period fuel consumption increases slowly in HWFET as comapred to UDDS.
- HWFET cycle is more fuel efficient than UDDS cycle.
d. Plot accelerator and brake pedal, gear command, vehicle desired and actual speed, vehicle distance using subplots.
1)UDDS Cycle :-

2) HWFET Cycle -

- In UDDS cycle accelerator & brake pedal are used more due to cycle is not smoother whreas in HWFET cycle accelerator used efficiently and brake pedal used less due to smother cycle.
- In UDDS cycle more gear shift required compared to HWFET cycle.
- In HWFET cycle speed increases with time constnatly and after certain time it remains constant with low fluctuations. In UDDS cycle fluctuation in speed increse is more.
- Distance covered in HWFET cycle is more due to less braking & engine idelling as comapared to UDDS cycle.
e. Plot the engine operating points on the engine fuel map.
1)UDDS Cycle :-

2) HWFET Cycle -

- Both cycle engine operation point below max torque curve with some fluctuations.
- Mostly engine operating in UDDS at 1000rpm to 4000rpm & in HWFET at 1500rpm to 3000rpm.
- Torque requirment is more in UDDS cycle than HWFET cycle.
f. Generate the plots for both drive cycles
1)UDDS Cycle :-

2) HWFET Cycle -

- In UDDS cycle more fluctuation in velocity due to braking & idelling losses.
- IN HWFET cycle velocity constnt with rare fluctuations.