Challenge

Project 1

The development of a forward energy-based fuel consumption model of a conventional vehicle.

Thesis:

Forward-Modelling of Vehicle Approach:

  • This kind of approach is known as the cause-effect, engine-to-wheel or rear-to-front method, the direction of calculation is the same as the direct positive power flow method: power flow is from the engine to the wheel.
  • This approach is based on the vehicle dynamics equation and the behavior of single powertrain components and their dynamic interaction between the wheels.
  • A Driver Controller is required to control the vehicle to follow desired speed and to calculate.
  • The Controller is implemented to model that the driver will either push the accelerator or the brake pedal to match the desired speed which enables to study the braking of the vehicle
  • It also acts as a feedback loop for the vehicle which was used to determine the energy requirements to drive the vehicle.

Convectional Vehicle Modelling:

Basic architecture model of forwarding Vehicle Modeling:

The Simulation Process is been processed in 3 different stages:

  • Pre-processing
  • Simulation
  • Post-processing

Stage 1:

Pre-Processing

In this Stage data which load as a program, it will take as an input program of the vehicles which is used for Post-processing of the Simulation by using the Simulink Model which is already built

Drive Cycle selection is also done from here by choosing the variable in it eg:1 is for UDDS, 2 is for HWFET, and 3 is for FTP.

Before running the Simulink model we have to induce inputs variables to the workspace to use by the Simulink model.

Inputs such as:

Mass of the vehicle (M) in kg

Coefficient of Rolling resistance (Cr)

Rolling Radius (Rw) in m

Drag Coefficient (Cd)

Frontal Area (Af) in m^2

Air density (rhoa) in kg/m^3

Wind Velocity (Vwind) in kmph

Gravitational Force (g) in m/s^2

Slope (theta) in deg

Here the Input Data of the Vehicle Dynamics is Consists of a typical 4-gear vehicle

File Initialization program for the selected drive cycle.

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

Drive Cycle which was used in this program is US-based Vehicles Dynamics

By the Changing the variable input for selecting different Drive_cycle

1 UDDS

2 HWFET

3 FTP

4 US06

5 NEDC

6 WLTP

Simulink Modeling:

The Model of Simulink is for the convection model of the vehicle in which it has been divided into 3 main sub-blocks are:

  • Driver
  • Controller
  • Powertrain

The Actual Vehicle speed is given as feedback to the driver block, and the driver block gives into the controller block in which the acceleration or brake output is connected.

While the controller provides a control signal for engine torque, gear shifting, and brake torque to the powertrain block.

The simulink model link given below.

click here to view the Simulink model

Controller Unit:

The brain of the vehicle unit is the 'Controller' block, which represents the ECU, Transmission Unit, and Basic Control Unit

Based on the Driver Inputs, it generates desired engine Torque, desired transmission gear, and desired brake torque. These will be sent as feedback to the powertrain blocks as input which is represented the drivetrain of the vehicle.

Driver:

In this Driver Block, it is a basic PI controller model that is used to generate accelerator and brake pedal Outputs that are used to match the desired and actual vehicle speeds.

The PI controller controls the error between the required drive cycle and the actual vehicle speed is been provided by the acceleration and brake pedal output of the controller unit.

Controller:

Engine Control Unit:

In this Block, ECU is the main unit that used to run the vehicle

Inputs such as Engine Speed, Maximum Torque Curve, Minimum Torque Curve, Idle Speed Control and the output is Engine Torque.

Transmission Control Unit:

This Control unit has 2 inputs whereas Throttle, Vehicle Speed, and Gear Command as Output.

Has Increasing the Input Throttle speed, Changing of gear commands take place accordingly 1,2,3,4 and vice versa for speed dropping condition.

The Gear command is been created by using the Stateflow block for this simulation.

It is been controlled accordingly by Vehicle Speed and Throttle inputs.

The gear command is been passed to the transmission block to select the desired gear ratio.

Brake Control Unit:

It consists of the basic control unit which requires brake torque according to the brake pedal input and passes the brake torque into the wheel block in the transmission model.

The second Block of this Vehicle Model is 'Powertrain':

Powertrain:

To move up the vehicle we need a Body structure that is used to move the vehicle in forward and reverse directions as required.

It consists of all components that will convert the Fuel power of the engine for the motion to move the vehicle.

It consists of an Engine, Transmission, Wheels, Differential, Vehicle Dynamics

Engine Model:

Based on the Engine Speed, the required torque from the controller is between Max torque and Min Torque curve and it will transfer the Engine Torque to the Transmission Block.

The 2D lookup table is used to calculate the fuel rate and is then integrated to find the fuel consumption rate of the engine, by using the engine speed and engine torque.

By using the 'To Workspace' block command the estimated fuel flow rate, fuel consumption, engine torque, and engine speed is been passed to the workspace of MATLAB.

To see the output of Engine Flow rate and Fuel Consumption is been scoped.

Transmission Model:

The input of the block is coming from the Engine model named 'Engtrq'.

This input is connected to Torque Converter and this output is connected to a differential which is named 'TransOutTrq'.

Torque Converter:

A torque converter is a type of fluid coupling that transfers rotating power from a prime mover, like an internal combustion engine, to a rotating driven load. In a vehicle with an automatic transmission, the torque converter connects the power source to the load. It is usually located between the engine's flexplate and the transmission. The equivalent location in a manual transmission would be the mechanical clutch.

In this block, the gear selection from the transmission control unit is been multiplied by the engine torque in this block and the engine dynamics of the torque converter are applied in this model.

Differential:

The Transmission output torque is multiplied by the differential ratio and differential eff in these blocks and the torque is transmitted to the wheel as the axle torque.

Wheel Model:

This takes input from brake torque in the control model is been subtracted from the axle torque and divided from the rolling radius to determine the tractive force.

The wheel speed is calculated from the vehicle velocity and saved into the workspace.

Vehicle Dynamics:

This block consists of the longitudinal dynamics of the vehicle which consists of Aerodynamics force, Rolling Resistance Force, Grade Force etc..,

The output of UDDS and HWFET cycles:

UDDS cycles:

UDDS stands for Urban Dynamometer Driving Schedule and refers to a United States Environmental Protection Agency-mandated dynamometer test on fuel economy that represents city driving conditions and is used for light-duty vehicle testing.

Though it was originally created as a reference point for fossil-fueled vehicles, it is also used to give estimates on how many miles an electric vehicle will travel on a single charge

Drive cycles and Actual velocity:

Engine Torque, Brake Torque, Gear Command:

Engine Fuel Consumption, Engine Fuel Rate:

Actual Engine Torque:

Gear Ratio, Transmission Input, Transmission Output:

AeroDynamics, Grade Force, Rolling Resistance force:

Road Load, Tractive Force, Acceleration:

For HWFET Cycles:

The Highway Fuel Economy Test (HWFET or HFET) cycle is a chassis dynamometer driving schedule developed by the US EPA for the determination of fuel economy of light-duty vehicles [40 CFR 600, subpart B]. The HWFET is used to determine the highway fuel economy rating, while the city rating is based on the FTP-75 test.

Drive cycles and Actual velocity:

Engine Torque, Brake Torque, Gear Command:

Engine Fuel Consumption, Engine Fuel Rate:

Actual Engine Torque:

Gear Ratio, Transmission Input, Transmission Output:

AeroDynamics, Grade Force, Rolling Resistance force:

Road Load, Tractive Force, Acceleration:

Stage 3:

POST-PROCESSING:

In this Post-processing, a MATLAB script is created to analyze data and generate plots and for some variables, I have renamed for loaded model and then plotted the results.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% 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_Speed = out.Wheelspd;
Eng_Fuel_Rate = out.Eng_Fuel_Rate;


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

%% Data conversion from double timeseries
%Eng_Spd = Eng_spd.data(:,1);
%Eng_Trq = Eng_trq.data(:,1);
%Eng_pwr = Eng_Pwr.data(:,1);
Eng_fuel_rate = Eng_Fuel_Rate.data(:,1);


Veh_spd = Veh_Spd.data(:,1);
Wheel_speed = Wheel_Speed.data(:,1);
%kmpl = kmpl.data(:,1);

%kmpl = Veh_dist(1:end)/(Eng_fuel_consumption(1:end)/1000/rho_petrol);    % Fuel economy [kmpl]

%% Plotting vehicle characteristics time trace trasmission IN/OUT and wheel
figure(1)
subplot(4,1,1)
hold on
grid on
plot(Time,Eng_spd,'linewidth',1,'color','black');
xlabel('Time [s]')
ylabel('speed [rpm]')
legend('Engine speed')


subplot(4,1,2)
hold on
grid on
plot(Time,Trans_In_Spd,'linewidth',1,'color','black');
xlabel('Time[s]')
ylabel('speed[rpm]')
legend('Transmission Input Speed')

subplot(4,1,3)
hold on
grid on
plot(Time,Trans_Out_Spd,'linewidth',1,'color','red');
xlabel('Time[s]')
ylabel('speed[rpm]')
legend('Transmission Output Speed')

subplot(4,1,4)
hold on
grid on
plot(Time,Wheel_speed,'linewidth',1,'color','blue');
xlabel('Time[s]')
ylabel('speed[rpm]')
legend('Wheel speed');

%% Plotting vehicle characteristics time trace with Engine troque, Engine power, Engine fuel rate, Engine fuel consumption
figure(2)
subplot(4,1,1)
plot(Time,Eng_trq,'linewidth',1,'color','black')
xlabel('Time [s]')
ylabel('Torque [Nm]')
legend('Engine Torque')
grid on

subplot(4,1,2)
plot(Time,Eng_Pwr,'linewidth',1,'color','green')
xlabel('Time [s]')
ylabel('Power [Kw]')
legend('Engine Power')
grid on

subplot(4,1,3)
plot(Time,Eng_fuel_rate,'linewidth',1,'color','c')
xlabel('Time [s]')
ylabel('Fuel Rate [%]')
legend('Engine Fuel Rate')
grid on

subplot(4,1,4)
plot(Time,Eng_Fuel_Consump,'linewidth',1,'color','r')
xlabel('Time [s]')
ylabel('Fuel Consumption')
legend('Engine Fuel Consumption')
grid on

figure(3)
subplot(4,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(4,1,2)
hold on
grid on
plot(Time, Gear_Cmd, 'linewidth', 1, 'Color', 'black');
xlim([0, Time(end)]);
xlabel('Time [s]');
ylabel('Gear');

subplot(4,1,3)
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('Vehicle desired speed','Vehicle actual speed');

subplot(4,1,4)
hold on
grid on
plot(Time,Veh_Dist, 'linewidth', 1, 'Color', 'black');
xlim([0, Time(end)]);
xlabel('Time [s]');
ylabel('Vehicle Distance');



%% 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] = contourf(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)]);


UDDS CYCLES:

Fuel Economy:

Speed of Transmission Inputs, Output,Wheel Speed:

Torque,Power,Engine Fuel Rate,Fuel Consumption:

Accelaeration and brake pedal,Gear Command, Vehicle distance:

Engine Operating Points:

HWFET CYCLES:

Fuel Economy:

Speed of Transmission Inputs, Output,Wheel Speed:

Torque,Power,Engine Fuel Rate,Fuel Consumption:

Accelaeration and brake pedal,Gear Command, Vehicle distance:

Engine Operating Points:

Conclusion:

Hence the forward energy-based fuel consumption model of a conventional vehicle has been successfully simulated using MATLAB and Simulink. Analyses and understands vehicles operating points based on engine speed,Torque,Transmission inputs & output speed, Pedal Positions, gear, and Distance travelled by the vehicle. Post-Porcessing is most efficiently used to calculate the performance and require graph and it is been successfully plotted above. Successfully Calculated vehicle fuel efficiency numbers (kmpl) for the given cycles such as UDDS and HWFET.

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.