Project 1
Aim:
The task of this project is 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.
Inputs:
In this project, a typical midsize car with a 1.9L engine and a 4-speed automatic transmission is considered. Data is taken from ADVISOR data base developed by NREL, USA. Transmission shift map and controller is taken from Matlab/Simulink example database.
Objectivies:
a. Tabulate the fuel economy numbers (kmpl) for UDDS and HWFET cycle.
b. Plot the time trace for engine, transmission input, transmission output and wheel speed on one plot.
c. Plot engine torque, engine power, fuel rate and fuel consumption using subplots.
d. Plot accelerator and brake pedal, gear command, vehicle desired and actual speed, vehicle distance using subplots.
e. Plot the engine operating points on the engine fuel map.
f. Write down appropriate brief comments on each of these plots, describing the vehicle behavior throughout the drive cycle.
g. Generate the plots for both drive cycles
Description :
1.The forward based modelling approach is also known has cause-effect,engine to wheel or rear to front method.The direction of calculation is the same as the direction as the direction of positive power flow from engine to wheel.
2.This approach is based on vehicles dynamics equation and the behaviour of each powertrain components their dynamic iteration.
3.Moreever a driver controller is requried to the vehicle to follow a desired speed and set the start of the calculations,The controller is implemented to model the driver that will either push the accelerator or the brake pedal to match the desired speed which enables to study the driver behaviour.The controller is enabled to part the feedback loop that will determine the energy requried to drive the vehicle
Vehicle Energy consumption Estimation Models
Energy Consumption Estimation models are classified has three model
Analyatical Model: This model is the representative of the vehicle behaviour and can be developed in matlab/simulink by creating an vehicle model.They are based on fundamental theortical equations.A model of the vehicle dynamics is built on vehicle dynamics theory to calculate the power requried at the wheels to overcome resistance forces opposed to the vehicle motion.Aerodynamic Drag,Rolling,Inertia,Gradient and Transmission resistances.The power requried derived from the tractive forces expressed as the sum of resistance forces.
Statistical Model: These models are build on real world data analysis to derive emphrical relations between different factors affecting vehicle energy consumption.
Comptutational Model :
There are mainly two kinds of computational models for energy consumption estimation :
Artifical neural networking models and clustering based models:
Conventional Vehicle Modelling:
1.This model includes a driver model that provides input commands acceleration and brake torque depending on the drive cycle and the actual speed of the vehicle.
2.A controller model that controls the engine torque to the desored range and changes the gear command and control brake torque according to the driver input
3.The transmission model that gives the actual speed of the vehicle as feedback to the driver model.The model includes the engine,Transmission,differential,wheel and vehicel dynamics models seperately.
First the initialization file should be loaded in the matlab
%% 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 = 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);
drive sycle select
1- UDDS
2- HWFET
3- FTP
4- US06
5- NEDC
6- WLTP
SiMULINK MODELLING :
1.After loading the matlab initialization file ouput variables are displayed in the workspace,The inbulid simulink file is given and needed to do some changes to get the requried output for the fuel consumption energy.
2.The given subystems are driver,controller and the powertrain .The driver gives the input actual velocity and outputs are acceleration and the brake pedal these ouputs are taken has an input for the controller gives the output has control signals to the powertrain, the cycle goes on.

DRIVER BLOCK :

1.The driver model is a basic PI controller that generates the acceleration and the brake pedal outputs to match the desired and the actual vehicle speeds
2.The PI controller controls the erroe between the requried drive cycle and the actual vehicle speed by providing the acc and the brake pedal outputs.
CONTROLLER BLOCK :

1.The controller block is the brain of the vehicle,representing the electronic control units based on the driver input,it generates the 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.
2.The powertrain contains the engine,transmission and the brake control unit
The control units are
Engine Contol Unit: The Engine control unit compare engine with the maximum torque and the minimum torque curves of the lookup table and gives the requried torque command to the engine block.The throttle input is combined with the ideal throttle and gains with torque output from the lookup tables to estimate torque input requried from the engine.
2.The throttle input,idle throttle and their sum can be scoped under this block.

TRANSMISSION CONTROL BLOCK :
1.The transmission control block controls gear shifting through using the study flow variable.
2.The gear shifting is controlled according to the vehicle speed and throttle input.
3.The gear command is passed to the transmission block to select the desired gear ratio.
BRAKE CONTROL UNIT :
The brake control unit produces the requried braking from the brake pedal input and passes the brake torque to the wheel block in the transmission model.

POWERTRAIN:
The powertrain model includes all the componenets that are requried to convert the power of the engine to vehicle motion.

The powertrain includes the engine,Transmission,Differential,Wheel and vehicle dynamics
Engine BLOCK :
1.Based on the Engine Speed the requried torque from the controller is saturated between maximum curves and the minimum torque curves and passes Engine Torque to the transmission block.
2.The 2D lookup table is used to calculate the fuel rate based on the engine speed and engine torque.The fuel flow rate is then integrated to find the fuel consumption.
3.Estimated fuel rate,Fuel flow consumption,Engine torque and engine speed are passed to matlab workspace using the to workspace block
4.Engine fuel rate and fuel consumption are scoped.

TRANSMISSION BLOCK :
1.The engine block is connected to the automatic transmission via torque converter the output of the transmission is connected to the differential.

torque converter:

1.The gear selection from the transmission control unit is multiplied by the engine torque in this block,and the efficiency and the engine dynamics of the torque converter are applied
2.In the torque converter the turbine and pump speed converted to the turbine and pump torque
DIFFERENTIAL BLOCK :

1.The transmission output torque is multiplied by the differential ratio and differential torque is transmitted to the wheel as the axle torque.
2.The wheel speed multiplied by the differential ratio gives the transmission output speed.
WHEELS :

1.The brake torque from the control model is substracted from the axle torque and divides from the rolling radius to determine the tractive forces.
2.The Wheel speed is calculated from the vehicle velocity and saved in workspace.
VEHICLE DYNAMICS BLOCK :

1.The longitudinal dynamics of the vehicle along with the road load is represented in the vehicle dynamics block.
2.The tractive forces and the road load forces are used to calculate the vehicle velocity
Af -- Frontal Area
Cr --- Rolling Coefficient
M --- Mass
Cd --- Drag Coefficient
g ---- Acceleration due to gravity
theta --- slope
1.The variables are loaded on the workspace using MATLAB script
2.The acceleration,velocity and distace travelled are calculated and stored in workspace
For UDDS cycle :
1.First the initialization file should be runned and select the drive cycle option has 1 and then run the simulation file,finally run the processing file the outputs are obtained in the workspace.
2. This cycle is city based drive cycle hence the fuel efficiency is less when compared with HWFET lets check it with the results obtained.
Road load and Acceleration


Drive cycle of UDDS :
T
Transmission scope :

Pump torque and Turbine Torque :

Pump and Turibine Speed:

Engine Torque Gear Command and Gear Torque Requriments:

Workspace :
The outputs obtained after running the processing file



The Kmpl value of UDDS CYCLE IS 18.61kmpl
POST PROCESSING FILE :
%% 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]
Eng_Fuel_Rate =out.Eng_Fuel_Rate % engine fuel rate
DriveCycle =out.desired % desired Speed
%% 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)]);
%% plot timetrace for engine,transmission input and transmission output and wheel speed on one plot
figure('Name','Tansmission input output and wheel speed')
hold on
grid on
title('Transmission input and output')
plot(Time,Trans_In_Spd,'linewidth',2,'color','red');
plot(Time,Trans_Out_Spd,'linewidth',2,'color','black');
plot(Time,Veh_Spd,'linewidth',2,'color','blue');
xlabel('Time[s]')
ylabel('Speed[rpm]')
legend('Transmission input','Transmission Output','Wheel Speed')
%% Plotting for engine torque and engine power fuel rate and fuel consumption using subplots
figure()
subplot(3,1,1)
hold on
grid on
title('Engine Torque and Power')
plot(Time,Eng_Pwr,'linewidth',1,'color','red')
plot(Time,Eng_Trq,'linewidth',1,'color','blue')
ylabel('Engine')
legend('Power','Torque')
subplot(3,1,2)
hold on
grid on
title('Engine Fuel Consumption')
plot(Eng_Fuel_Consump,'linewidth',1,'color','red')
subplot(3,1,3)
hold on
grid on
title('Engine Fuel Rate')
plot(Time,Eng_Fuel_Rate,'linewidth',1,'color','blue')
%%Plot accelerator and brake pedal, gear command, vehicle desired and actual speed, vehicle distance using subplots.
figure()
subplot(3,1,1)
hold on
grid on
title('Acceleration and brake pedal curve')
plot(Time,Brk_Pdl,'linewidth',1,'color','red')
plot(Time,Acc_Pdl,'linewidth',1,'color','blue')
legend('Brake Pedal','Acceleration Pedal')
subplot(3,1,2)
hold on
grid on
title('Gear command and vehicle desired speed')
plot(Time,Gear_Cmd ,'linewidth',2,'color','yellow')
plot(Time,DriveCycle,'linewidth',2,'color','red')
legend('Gear Command','Vehicle Desired Speed')
subplot(3,1,3)
hold on
grid on
title('Vehicle Speed and Distance')
plot(Time,Veh_Spd,'linewidth',2,'color','blue')
plot(Time,Veh_Dist,'linewidth',2,'color','red')
legend('Actual Speed','Vehicle distance')
Figures :





For HWFET CYCLE :
IT is highway drive cycle so efficiency of fuel consumption is more when compared to UDDS lets check it with the results obtained.
1.In the initialization file the drive cycle 2 should be selected run the init file then run the simulink file and later post processing file should be runned.

Gear Command,Engine Torque Requriments and Brake Torque Requriments

Saturation Limits:

Transmission input output speeds and gear ratios

Pump and Turbine Torque :

Pump and Torque Ratios

Road Load And Acceleration

Drag Force and Rolling Force

Engine Torque Requriments :

WORKSPACE:



The KMPL of HWFET CYCLE IS 34.21 kmpl
Figures:





CONCLUSION :
1.The results obtained are same has predicitaed the efficiency is more for HWFET.
2.Hence kmpl is more for HWFET cycle with 34.2kmpl .