Project 1
Q1.Project 1 deals with the development of a forward energy-based fuel consumption model of a conventional vehicle.
Aim : tabulate the fuel economy numbers for UDDS & HWFET cycle. This foems 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 &fuel consumption using subplots.
Plot accelerator and brake pedal ,gear command, vehicle desired &actual speed,vehicle distance using subplots.plot the engine operating points on the engine fuel map.
Appropriate brief comments on each of these plots, describing the vehicle behavior throughout the deive cycle.generate the ployts for both drive cycles.
Theory
Forward modelling approach
The forwaed modelling approach is also know as cause effect, engine to wheel or rear or front method. The direction of calculation is the same as the direction of positive power flow from engine to wheel.
This approach is based on vehicle dynamics equation and the behaviour of each powertrain components and thir dynamic interaction.
Moreover a driver controller is requied to control the vehicke to follow a desird speed and set the start of the calculation. The controller is implemented to model the driver that will either push acceleration or the brake pedal to match the desired speed enables to stdy the driver behaviour.
The controller is used as part of feedback loop that will determine the energy reuired to drive the vehicle.vehicle energy consumption estimation models . energy consumption estimation models can be classified in three main catergories.
Analytical models:
Analytic models are representative of the vehicle behaviour & can be developed in matlab/Simulink by creating a vehicle models.they are based on fundamental theoretical equation.
Models of the vehicle dynamics is built based on vehicle dynamic theory of calculation the power required at the wheels to overcome the resistance forces opposed to the vehicle motion.
Aerodynamic drag,rolling,inertia,gradient and transmission resistance. Power requireds derives from the tractive force expressed as the sum of the resistances force above.
Statistical models:
Statistical models are built based on real world driving data analysis to derive empirical relatioships between the different factore affection vehicle energy consumption.
Computational models:
There are mainly two kids of computional models for energy comsumption estimation. Artificial neural network based model . clustering based models.
Conventional vehicle modelling:
Architecture of the forward conventioal vehicle models presented .

This model includes a driver models that provides input commands acceleration & brake torque depending on the drive cycle & the actual speed of the vehicle.
Control model that controls the engine torque to the desired range &changes the gear command &control brake torque according the drive input.
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 & vehicle dynamic models separately.
VEHICLE MODEL
Pre-processing:
A matlab script has been created to load all the variables needed to run & post process the Simulink model. Drive cycle selection is also done ffrom here. Before running the Simulink vehicle model the script is intialised at matlab to loads all the variables in workspace.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% 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
%% 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);
The drive cycle can be selected from the matlab script, by changing the variable drive cycle .
1.UDDS
2.HWFET
3.FTP
4.USO6
5.NEDC
6.WLTP
SIMULINK MODELLING
The Simulink model for the convection model is created using 3 main sub-blocks for the drive model,control model& powertrain block.
The actual vehicle speed is given as feedback to the driver block & driver block gives the controller block the required acceleration or brake output, while the controller block provides control signals for engine torque ,gear shifting & brake torque to powertrain model.
Driver model:

Driver model is a basic PI controller that generate accelerator & brake pedal output to match the desired & actual vehicle speed.
PI controller controls the error between the required drive cycle & actual vehicle speed by providing acceleration & brake pedal output the controller.
Controller model:

Controller block is the brains of the vehicle,representing the electronic controls units. Based on the driver inputs .its generates desired engine torque,desired transmission gear & desired brake torque. Input are fed to the powertrain block which represents the drivetrain of the vehicle .
Controller consists of an engine control units, a transmission control unit &brake control unit. All control signals can be scoped.
Engine control unit:

Idel speed controller:

Engine control unit compare engine speed with the maximum torque and minimum torque curve of the lookuo table & given the required torque command to the engine block. The throttle input is combined with the idle speed throttle & ging with the torque output from the lookup table to estimate the torqu input. Throttle input idle throttle &their sum can be scoped from thos block.
Transmission control block:

Transmission control block controls the gear shifting using the study flow variable chart.
The gear shifting is controlled according to the vehicle speed & throttle input. Gear command is passed to the transmission block to select the desired gear ratio.

Brake control unit:
Brake control unit produce required brake torque according to brake pedal input & passes the brake torque in the wheel block in the transmission model.

Powertrain model”:
Powertrain model includes all the components that convert the power of the engine into vehicle motion.includes engine , transmission,differential, wheel,vehicle body dynamic subsystem.

Engine model:

Based on the engine speed the required torque from the controller is saturated between max torque curve & min torque curve & passes the engine torque to the transmission block.
2D lookup table is used to calculated the fuel flow rata based on engine speed and engine torque . fuel flow rate is than integrated to find the fuel consumption.
Fuel flow rate, fuel consumption,engine torque &engine speed are passed to the matlab pacepacce using the to workspace block.
Engine fuel flow rate & fuel consumption are scoped.
Transmission model:
The engine block is connected to automatic transmission via a torque converter. The output of the transmission is connected to the differential.

Torque converter:
Gear selection from the transmission control units is multiplied by the engine torque in the block & the efficiency engine dynamic of the torque converter are applied in this model.

Differential model:
Transmission output torque is multiplied by the differential ratio &differential efficiency in this blck & torque is transmitted to the wheel as the axle torque.

Wheel model:
The brake torque from the control model is subtracted from the axle torque and from the rolling radius to determine the tractive force.
The wheel speed is calculated from the vehicle velocity &saved in the workspace.

Vehicle dynamics:
Longitudinal dynamic of the vehicle along with the road load is repressnted in the vehicle dynamic block.
Tractive force & road load are used to calculate the vehicle velocity.

Tractive force= M dv/dt + ½ paAfcd(v+vwd)^2+CrMgcostheta+Mgsintheta
Road load= ½ paAfcd(v+vwd)^2+CrMgcostheta+Mgsintheta
pa- air density
Af-frontal area
Cd-darg coefficient
Cr-rolling coefficient
M-mass of vehicle
g-acceleration due to gravity
theta-slope.
Variabole are loaded on the workspace using matlab script, acceleration,velocity &distance travelled are calculated & stored in workspace .
SIMULATION RESULTS
1.UDDS drive cycle
Drive cycle & actual velocity :

Control signal (engine torque, transmission gear & brake torque):

Engine fuel rate & fuel consumption:

Engine torque:

Gear ratio transmission input & output speed:

Different road load:

Tractive force,road load & acceleration:

2.HWFET drive cycle
Drive cycle & actual velocity :

Control signal (engine torque, transmission gear & brake torque):

Engine fuel rate & fuel consumption:

Engine torque:

Gear ratio transmission input & output speed:

Different road load:

Tractive force,road load & acceleration:

MATLAB script:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% 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]
%% 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)]);
2.Fuel economy numbers(kmph) for UDDS & HWFET cycle.
UDDS:

HWFET:

3.the time trace for engine, transmission input, transmission output & wheel speed
UDDS:

HWFET:

Mush of the fluctuating input speed is facilitated by trhe torque converter &transmission input speed fluctuates according to the engine torque required to achive the drive cycle.
Wheel speed & transmission output speed vary according to gear & differential ration.
4.engine torque ,engine power,fuel rate &fuel consumption
UDDS:

HWFET:

The torque requirements of the drive cycle are different, so the fuel flow rate varies & fuel consumption is calculated.
HWFET drive cycle has higher power &torque requirements & less negative torque & power.
5.acceleration and brake pedal gear command , vehicle desired & actual speed,vehicle distance:
UDDS:
Acceleration and brake padals are used more because the drive cycle is not very smooth and gear has to be shifted.
HWFET:
Brake requirement are lower, more accelerator pedals are applied on rge higways drive cycle, gear shifts often occur because the drive cycle is smoother.
Acceleration & brake pedal gear command of the transmission control unit, the required speed of the vehicle actual vehicle speed & actual vehicle distance are plotted.

- the engine operating points on the engine fuel map
UDDS:

HWFET:

The engine operating points are plotted on the fuel map & operating points is under the maximum torque curve.
Conclusion:
The forward energy based fuel consumption model of a conventional vehicle has been succesfully.
Simulated using MATLAB& simlink.
Analyses and undersrand vehicle operationgpoints based in engine speed torque transmission speed pedal position gear & distance travelled.
Post process calculation were performed and the required graphs successfully plotted.
Successfully calculated vehicle fuel efficiency number (kmph) for the given city cycle UDDS *& highway cycle HWFET.