Challenge

Project 1

Aim :

To Determine the development of a forward energy-based fuel consumption model of a conventional vehicle.

Objectives :

1) Load the Project1 folder as the Current Folder in Matlab.
2) Run the “Project1_InitFile.m” Matlab script.
3) The provided vehicle Simulink model “Project1_VehicleModel.slx” is incomplete. The engine and vehicle dynamics block contents have been deleted. Build the Simulink blocks by referring to the course lecture and example block images provided. You can run the model and analyze the results using a ‘Scope’ for debugging.
4) Add additional ‘To Workspace’ blocks for transferring the desired Simulink vehicle data into the Matlab workspace.
5) Modify the “Project1_ProcessingFile.m” as per the desired plots and required calculations.
6) Write a project report that contains the following:

a. Tabulate the fuel economy numbers (kmpl) for UDDS and HWFET cycle. This forms the baseline numbers for comparing with the future hybrid version.
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

Points To Remember :

Conventional Vehicle :

Conventional vehicle use an internal combustion engine fuel by gasoline or disel to power the wheels. In this heat engine uses the prinicple of heat release through combustion of a fuel with an oxidizer in a combustion chamber to crate expanding gases which pushes against a piston creatinf force and torque output.


In this vehicles engine converts chemical energy stored in the fuel into heat which is used to produce useful work. Typically used fossil fuels are petrol and disel.


The most popular type of engine is used in this system is 4 Stroke reciprocating engine. Engine cylincnder process can be
represented by ideal thermodynamic cycles such as Otto cycle and Disel engine.


Otto cycle is a ideal cycle that describes the cycle process for spark ignited SI engine and the Disel engine is the ideal cycle that describes the cycle process for a compression iginited CI engine.

Engine & performance of a Vehicle :

In this system the power demand on the wheel need to instant supplied by the powertrain. The power train is consisits of an engineconnected to the wheels through a transmission therefore the power comes from the engine through the transmission.

Connventional Powertrain Efficiency :

The engine generates powerr by converting chemical energy stored into the mechanical energy by the process of combustion.
This process of energy conversion also has an efficiency and the energy input is in the form of fuel consumption.
Instantaneous fuel consumption is given as,


mf = Pe/ηe*ηt*QLHV


where,
mf = mass flow rate in(kg)
pe = Power of engine
pt = Power of transmission

nt = Efficiency of transmission
ne = Efficiency of engine
QLHV = lower heating value of fuel


In this system of IC engine if the power at the wheels is zero the engine is idling and still consumes some fuel to over come the engine drag loss and keep it spining this is the idling fuel consumption and know a sidling process.


Above mentioned formula is applicable only when the wheel power is strictly power. When the wheel power is negative either the engine is disenagaged and idling.


The engine is consuming fuel when it is idling but even for engine braking the engine might be consuming some fuel. The fuel
consumption not only depend on the power requirement at the wheels but also is required to generate power to run the various engine and vehicle accesory loads.

System dynamics :

It deals with the modeling of multi domain systems through the use of a unified approach based on a ordinary diffrential and
algebric equation describing the static and dynamic effects.


Each systems has are two generalised variables. They are,


1.Efforts:
It is generalised force variable. Example: torque,force,voltage,heatingvalue.


2.Flow:
It is generalised flow (or) velocity variable. Example: velocity,current,mass flow rate.


3.Power:
It is the product of the effort and flow variable. It is interchangeable between energy domains.


ENERGY BASED MODELS-ELEMENT MODELS:
To models the internal physical properties of the element and the losses there are basically two kinds of approach. They are,


1.MAP BASED MODELS:
Elements are modeled using maps which characterized the relation ship between th einput and output, output and losses, etc...


2.ANALYTICAL MODELS:
Elements are modeled using physical equation that represent the internal dynamics. These are the two extremes most models are a combination of the two with some dynamics models analytically and for some using maps.


FORWARD MODEL:
It is also known as Dynamic Simulation. Dynamic models are useed for detailed simulations. In this model force or torque or power is the input and th evehicle state variable velocity and acceleration are outputs.


The models and simulations are more realisitc due to physical casuality hence the appopriate for control development.

Matlab Code :

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Skill-Lync -> Hybrid Drives Development
% Project 1 - Conventional Vehicle Model
% By - Harshavardhan Pajarla 

%% 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

Tm = 150;
efft = 0.8;
ratio = 2.45;


%%% Vehicle top speed 
Vveh = sqrt((efft*ratio/Rw*Tm - Cr*M*g)*2/rhoa/Af/Cd);
Vveh_kmph = Vveh*18/5;

%%% Power for top speed 
Fload = 1/2*rhoa*Cd*Af*(Vveh+Vwind)^2 + Cr*M*g*cosd(theta) + M*g*sind(theta); % Road load
Pload = Fload*Vveh/1000;

%%% Powertrain Speed 
omegam = ratio*Vveh/Rw; % Motor Speed [rad/s]
omegam_rpm = omegam*30/pi; % Motor Speed [rpm]


%% 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 Engine_data_1_9L_Saturn_95kW
load 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 UDDS.MAT;
    
elseif Drive_Cycle_Select == 2
    load HWFET;
    
elseif Drive_Cycle_Select == 3
    load FTP;
    
elseif Drive_Cycle_Select == 4
    load DUS06;
    
elseif Drive_Cycle_Select == 5
    load NEDC;
    
elseif Drive_Cycle_Select == 6
    load WLTP;
 
end

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

%% 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]
Eng_Fuel_rate = out.Eng_Fuel_rate;
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

%plotting
figure(1)
plot(Time, Trans_In_Spd,'LineWidth',1,'Color','k');
plot(Time, Trans_Out_Spd,'LineWidth',1,'Color','r');
plot(Time, Wheel_Speed,'LineWidth',1,'Color','b');
xlabel('Time[s]')
ylabel('Speed[rpm]')
xlim([0,Time(end)]);
ylim([0,6000]);
legend('Trans Input', 'Trans Output', 'Wheel Speed');
grid on
hold on

%ploting
figure(2)
subplot(2,2,1)
plot(Time, Eng_Trq,'LineWidth',1,'Color','k')
xlabel('Time[s]')
ylabel('Torque[Nm]')
legend('Engine Torque')
grid on
subplot(2,2,2)
plot(Time, Eng_Pwr,'LineWidth',1,'Color','b')
xlabel('Time[s]')
ylabel('Power[kw]')
legend('Engine Power')
grid on
subplot(2,2,3)
plot(Time, Eng_Fuel_rate,'linewidth',1,'Color','r')
xlabel('Time[s]')
ylabel('Fuel Rate[%]')
legend('Engine Fuel Rate')
grid on
subplot(2,2,4)
plot(Time, Eng_Fuel_Consumption,'LineWidth',1,'Color','g')
xlabel('Time[s]')
ylabel('Fuel Consumption')
grid on

%ploting
figure(3)
plot(Eng_Fuel_Consumption,Eng_Fuel_Rate,'Color','r')
xlabel('Fuel Consumption')
ylabel('Fuel Rate[%]')
title('Fuel Economy Vs Fuel Consumption')
grid on

%ploting
figure(4)
subplot(2,1,1)
plot(Time, Acc_pdl,'LineWidth',1,'Color','k')
plot(Time, Brk_pdl,'LineWidth',1,'Color','r')
xlabel('Time[s]')
ylabel('Pedal[%]')
xlim([0, Time(end)]);
legend('Accel','Brake');
title('Accelerattion & Brake Pedal wrt Time')
grid on
hold on
subplot(2,1,2)
plot(Time, Gear_Cmd,'LineWidth',1,'Color','k')
xlim([0, Time(end)]);
xlabel('Time[s]')
ylabel('Gear')
title('Gear command wrt Time')
grid on
hold on

%ploting
subplot(2,1,1)
plot(Veh_Spd,Gear_Cmd,'LineWidth',1,'Color','k')
xlabel('Speed [rpm]')
ylabel('Gear')
title('Gear command wrt vehicle speed')
grid on
hold on
subplot(2,1,2)
plot(Veh_Dist,Gear_Cmd,'LineWidth',1,'Color','r')
xlabel('Distance [kmpl]')
ylabel('Gear')
title('Gear command wrt Distance')
grid on
hold on

%ploting
figure('Name','Engine Operating Points')
grid on
hold 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]')
legend([p1 p3],['Max Curve','Operating Points'])
axis([Eng_map_spd(1)*30/pi Eng_map_spd(end)*30/pi 0 Eng_map_trq(end)]);

Simulink Model :

In this project, a typical midsize car with a 1.9L engine and a 4-Speed automatic transmission is considered. Transmission shift map and controller is taken from MATLAB/Simulink example database.


The model developed has the capability to simulate the vehicle on different drive cycles like UDDS, HWFET, FTP, NEDC, etc...
Project1_IntFile.m is a MATLAB script used to load all the variables required for running the Simulink model and for post-processing.

The drive cycle selection is also done there.

Driver Model :

It is modeled using a Driver block which is a basic PI contoller that generates acclerator and brake pedal outputs to match the desired and actual vehicle speed.


In this we use drive cycles for based on these fuel consumption and emissions the vehicle gets certified and it also forms a basis of uniform assessment. It is based on time velocity then its all integrate and creates output accleration pedal and brake pedal.

Output Scope in Driver Model :

Drive Cycle Vs Velocity :

Stuaration Vs Gain :

Control Model :

The control block is the brain of the vehicle which represents The electronic controls units. It is based on the driver inputs, it
generates desired engine torque, desired transmission gear and desired brake torque. These inputs are fed io the powertrain block which represents the drivetrain of the vehicle.

Output Scope in Control Model :

1. Engine Control Unit :

In this control model we use engine control unit in that give input engine speed through creating lookup table. In that we given a input Maximum torque and map speed then also create 2nd lookup table in that we given input ct torque and map speed then it subtrats and multiplied. The engine speed is also give to ideal control speed to integrate from this we meet output of engine required torque.

Output Scope in ECU :

2. Transmission Control Unit :

In this unit we create steady flow varibale state for controlling of gears of vehicle as in ascending and decending order with
respect to time,speed,distance and we give input to this steady state is vehicle speed to m/s to mph.

3.BRAKE CONTROL UNIT :

In this we calculate the brake torque and then all three control signals output is give to powertrain.

Output Scope in BRAKE CONTROL UNIT :

POWERTRAIN:
The powertrain is components that converts the engine's power into movement. This includes the engine, transmission, driveshaft, diffreantial, axles. Basically anything from the engine through to the rotating wheels.


1.ENGINE:
In this model we used map based model to the fuel consumption of engine. It is based on maximum torque and minimum torque form the controller and then it saturated torque and give output then saturated torque and speed map give fuel consumption takes the speed and torque then the output goes into saturated then its integrated.

Output Scope Of Engine :

2.TRANSMISSION :

In this model we take engine torque, gear selector form controller for transmission of gear ratio. The ratio is multiply by
transmission input torque and then transmission efficiency positive torque and negative torque gives transmission input speed. In this case torque converter connects the engine to transmission it is part of transmission.

OUTPUT FROM SCOPE IN DRIVER MODEL:(Transmission in speed, gear ratio, diffrential ratio)

3.DIFFERENTIAL:

In this input is the transmission output then it is going to diffrential ratio multiplied the output and input torque then meet axle torque. The axle torque is a lower than the transmission torque and diffrential ratio.

OUTPUT FROM SCOPE IN Diffferential :

4.WHEELS:

In this model we take the axle torque form the diffrential and brake torque form controller. It is subtracts and multiplied rolling
radius and velocity then we meet the tractive force from axle and brake torque and the wheel speed is meet using velocity.

OUTPUT FROM SCOPE IN WHEELS :

5.VEHICLE DYNAMICS:

In this we take tractive force and road load. It is discrates vehicle speed based on tractive force and road load.
The dynamic equation for calculation is,

Ftrac = M(dVveh/dt) + 1/2*rho*Af*Cd*(Vveh+Vwind)^2 + Cr*Mgcos() + Mgsin()
Ptrac = pw = MV(dv/dt) + 1/2 * rho * Af * Cd * V^3 + CrMgV
Ew = ki ∫v(dv/dt).dt + ka∫v^3.dt + kr∫Vdt


where,
Rho = Airdensity(kg/m^3)
Af = Frontal Area(m^2)
Cd = Drag Coefficient
Vveh = Velocity of vehicle(m/s^2)
Vwind = Velocity of wind(m/s^2)
Cr = Rolling resistance coefficient
M = Mass(kg)
g = Gravity


Then we calculated and integrate then we meet accleration of vehicle and velocity of vehicle it mean vehicle distance and vehicle speed.

OUTPUT FROM SCOPE IN DRIVER MODEL: (Road load, Acceleration, Tractive force)

OUTPUT FROM SCOPE Of Final Velocity :

Plots :

Transmission Input,output,Wheel Speed:

Subplots:

Engine Torque,Power,Gear cmd Wrt To Time :

Gear cmd Wrt To Vehicle Speed :

Engine Fuel Consumption Map :

Transmission Torque converter speed variation :

Trq ratio, Pump Trq


Pump Trq, Turbine Trq :

Conclusion:

Thus the development of a forward energy-based fuel consumption model of a conventional vehicle is determined sucessfully.

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.