Challenge

Project 1

AIM

To analyse the performance of a conventional vehicle in MATLAB Simulink environment.

CONVENTIONAL VEHICLE MODELLING

Conventional vehicles use an internal combustion engine fueled by gasoline or diesel to power the wheels. Electricity is used for some accessories, but is not used to move the vehicle.

Forward-facing models represent dynamic models with the correct causality. A forward-facing vehicle model features a driver model, which provides torque demand in the form of desired ICE torque and brake torque (positive and negative torque), to meet the speed trace from a drivecycle. The topology of a forward model of a conventional vehciel is shown below

The componenets of the forward model are

  • Drive cycle: It determines the driving velocity of the vehicle at a particular time, it is given in modelling window for testing and analysing the performance of the vehicle under diffrent scenario.
  • Driver model: The driver model analyses the driving condition and produces the required acceleration, brake and gear position for the particular driving cycle.
  • Controller: The controller takes the input command from driver model and converts it into torque request to ICE. It also gives control signal to transmission system which include gears.
  • Plant model: The plant model also known as powertrain, which includes the componenets which are neccessary for the motion of the vehicle. The plant model also includes drivetrain. The controller controls the working of the plant model.

Plant model (Conventional vehicle)

Plant model consist of powertrain model of the vehicle, the componets in the plant model are mainly which are capable of producing and transferring power. The following block diagram shows the plant model of a conventional vehicle.

The conventional engine vehicle model is build using MATLAB Simulink as shown below.

The indepth model of each subsystem are

> Driver model

The driver model converts the input drive cycle into acceleration and brake command to the controller unit.

> Controller unit

The controller unit consist of three controller

  • Engine controller unit (ECU)
  • Transmission controller unit (TCU)
  • Brake controller unit (BCU)

>> Engine controller unit

ECU generates control signal for the Engine, it gives the torque request as the signal to the engine. The torque request is proportional to the accelerartion request from the controller.

>> Transmission control unit

Transmission control unit consist of algorithm, by which it determines the gear position of the transmission system. The gear up shift and down shift is controlled by the TCU by using set of algorithms and conditions,

The maximum no.of gear position it have is 4, based on the velocity of vehicle and throttle response the gear shift occurs.

>> Brake control unit

The conventional engine lack off regenrative braking. The braking is done by mechanical braking using tire friction between wheels and road.

The brake request is send to the tyre, where braking is done.

>Powertrain

The powertrain model consit of all the systems through which power is generated and flow to help the vehicle move. The powertrain model of a conventional vehicle include

  • Engine
  • Transmission
  • Differential
  • Wheels
  • Vehicle Power Dyanamics

>> Engine

The engine intakes fuel and convert the fuel into mechanical power required for the traction of the vehicle. The engine works based on the torque request from the ECU. It checks the torque saturation point based on the dynamic saturation limit of max torque and min torque chara obtained from a Torque-Speed chara.

The fuel consumed is taken from 2-D chara of Speed-Torque chara, based on the speed and torque the fuel consumed is estimated, it gives fuel consumption rate in g/s, on integrating it over time it gves fuek consumed in g.

>> Transmission

The transmission is mainly used to shift gear aup and down and a clutch for isolating the engine from drivetrain during gear shift. The model of transmission is as shown below

The torque converter converts the input torque from the negine into drivetrain torque.

>> Differential

The differential transfer the power from driveshaft to the wheel axle. The differential gear ratio is given by FDR.

>>Wheels

The wheel is the final place of power transfer occur between the road and vehicle. The brake torque and axle torque meets in wheels for a conventional vehicle.

>> Vehicle Dynamics

The all the forces acting on the vehicle are considered in the vehicle dynamic part. It includes the negative resistance force which effects the dynamics of the vehicle. the final output is the actual velocity of the vehicle.

The resistive force which includes

  • Rolling resistance force, Frr = Cr.M.g.Cos(a)
  • Grade resistnace force, Fg = M.g.Sin(a)
  • Air drag force, Fad = 0.5.Af.Cd.V^2
  • Acceleration force, Fa = M.(dV/dt)

The model is given as

The total resistance force is subtracted from the tractive force, and divide by the mass of vehicle to get acceleratioj of the vehicle. On integrating the acceleration we get velocity of the vehicle.

MATLAB SIMULATION

For MATLAB simultion in Simulink, the init files are needed to load into the workspace. It can be done suing the file "Project1_InitFile.m" attached with this. in that we have different drive cycles.

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

1 - UDDS

2 - HWFET

3 - FET

4 - US06

5 - NEDC

6 - WLTP

After selecting loading the init file with required drive cycle, simulate the model in simulink window.

After simulation for analysing the result use the anlaysing mscript file "Project1_ProcessingFile.m", attached with this

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% 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]
Eng_Fuel_Rate = out.Eng_Fuel_Rate;      % Engine fuel rate [g/s] 
Veh_Dist = out.Veh_Dist/1000;   % Distance traveled by vehicle [km]
Veh_Spd = out.Veh_Spd*18/5;     % Vehicle speed [kmph]
Des_Spd = cyc_vel*18/5;         % Desired vehicle speed [kmph]
Wheel_Spd = Trans_Out_Spd/FDR;  % Wheel speed in [rpm]

%% 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('Name','Vehicle Characteristics')
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');
title("Acceleration and Brake command");
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');
title("Transmission input and output speed")
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');
title("Gear position");

%% 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 Operating Points');
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)]);

%% Plotting engine, transmission inut, transmission output and wheel speed
figure("Name","Speed at different stages")
subplot(4,1,1)
plot(Time,Eng_Spd,'linewidth', 1);
ylabel("Speed [rpm]");
title("Engine Speed");
subplot(4,1,2)
plot(Time,Trans_In_Spd,'linewidth', 1);
ylabel("Speed [rpm]");
title("Transmission input Speed");
subplot(4,1,3)
plot(Time,Trans_Out_Spd,'linewidth', 1);
ylabel("Speed [rpm]");
title("Transmission output Speed");
subplot(4,1,4)
plot(Time,Wheel_Spd,'linewidth', 1);
ylim([0,1000]);
xlabel('Time [s]');
ylabel("Speed [rpm]");
title("Wheel Speed");

%% Plotting engine torque, engine power, fuel rate and fuel consumption
figure()
subplot(4,1,1)
hold on
grid on
plot(Time, Eng_Trq, 'linewidth', 1, 'Color', 'red');
title("Engine Torque");
ylabel('Torque [Nm]')
xlim([0, Time(end)]);
subplot(4,1,2)
hold on
grid on
plot(Time, Eng_Pwr, 'linewidth', 1, 'Color', 'blue');
title("Engine Power");
ylabel('Power [W]')
xlim([0, Time(end)]);
subplot(4,1,3)
hold on
grid on
plot(Time, Eng_Fuel_Rate, 'linewidth', 1, 'Color', 'magenta');
title("Engine Fuel consumption rate");
ylabel('Fuel rate [g/s]')
xlim([0, Time(end)]);
subplot(4,1,4)
hold on
grid on
plot(Time, Eng_Fuel_Consump, 'linewidth', 1, 'Color', '#006400');
title("Engine Fuel Consumption");
xlabel('Time [s]');
ylabel('Fuel [g]');
ylim([0,800]);
xlim([0, Time(end)]);

%% Plotting desired velocity vs actual velocity
figure("Name","Actual velocity vs Desired velocity");
plot(cyc_time,Des_Spd,'linewidth', 1, 'Color', 'blue');
hold on
plot(Time,Veh_Spd,'linewidth', 1, 'Color', 'red');
legend('Desired velocity','Actual velocity');
title("Desired velocity vs Actual velocity");
xlabel('Time [s]');
ylabel("Velocity [m/s]");
xlim([0, Time(end)]);

After running the above MATLAB script file required results can be obtained.

Lets consider two cases with drive cycle as UDDS and HWFET.

CASE 1: UDDS drive cycle

For loading HWFET drive cycle, edit the "Drive_Cycle_Select = 2;" in the init file. Now run the init model, and simulate the model.

For analysing the result run the "Project1_processing.m" file, the following results are obtained.

a. Accelerator and brake pedal, gear command

b. Time trace for engine, transmission input, transmission output and wheel speed on one plot.

In seperate plot

c. Engine torque, engine power, fuel rate and fuel consumption using subplots.

d. Engine operating points on the engine fuel map.

Observation:

  • The engine operating points at different times are shown in black mark.
  • The operating points are wide in range, due to lots of starts and stops in the drive cycle.

e. Desired velocity vs actual velocity

Case 2: HWFET drice cycle

For loading UDDS drive cycle, edit the "Drive_Cycle_Select = 1;" in the init file. Now run the init model, and simulate the model.

For analysing the result run the "Project1_processing.m" file, the following results are obtained.

a. Accelerator and brake pedal, gear command

b. Time trace for engine, transmission input, transmission output and wheel speed on one plot.

In seperate plot

c. Engine torque, engine power, fuel rate and fuel consumption using subplots.

d. Engine operating points on the engine fuel map.

Observation:

  • The black marks indicates the engine operating points at different time.
  • The operating points range is narrow due to loess stop and go.

e. Desired velocity vs actual velocity

OBSERVATION AND COMPARISON:

  • Drive cycle
    • Cycle Duration Max speed Average speed Distance
      UDDS 1372s 91.25kmph 31.5kmph 12.07km
      HWFET 765s 96.5kmph 77.7kmph 16.45km
  • Acceleration, Brake and Gear command
    • In UDDS drive cycle, the vehicle on a average runs most in 2nd gear while in HWFET its in 3rd and 4th gear.
    • There is lots of acceleration and brake in UDDS cycle, while HWFET cycle have very less brake commands.
  • Engine, Transmission input and Transmission output and Wheel speed.
    • The engine and transmission input speed [rpm] have good dynamic response, it will accelerate and deccelerate quickyl as shown in the figure.
    • The transmission output and wheel speed [rpm] dynamic response is low, because the inertia of the vehicle body as body of vehicle directly interacts with the wheel and transmission output. The transmission system seperates the engine and transmission output and thus the body interaction is not directly occurs to the engine speed.
    • The wheel speed is less compare to the transmission output because of differential gear ratio.
    • The variation of angular velocity of the system in UDDS cycle is gigh and in HWFET is low.
    • The angular velocity fluctuates between 0 and high intermittently, and thus avaerage angualr speed is less in UDDS even both have nearly same highest engine speed.
  • Engine torque, power, fuel rate and fuel consumption.
    • The maximum engine torque and power is required in UDDS cycle than HWFET cycle.
    • The fuel rate is maximum for UDDS cycle nearly 4.2g/s, while HWFET max fuel rate required is 3g/s.
    • The fuel consumption is more for UDDS cycle than HWFET cycle.
    • Cycle kmpl
      UDDS 12.924
      HWFET 15.805
    • In terms of mileage HWFET gives more mileage than UDDS, because UDDS cycle is urban type HWFET is highway.
  • Operating points
    • With same engine in different drive cycle, the operating point of engine has wide range in UDDS cycle than HWFET which have narrow range.
    • Thus the engine operates at good efficiency during constant speed or speed within a range.

CONCLUSION:

A conventional vehicle has been modelled using MATLAB Simulink, the model is used to analyse the engine, powertrain and vehicle performance. The following conclusion can be made

  • The engine operating point is wide for UDDS cycle compred to the HWFET cycle.
  • The fuel economy of vehicle in UDDS cycle is 12.924kmpl while for HWFET is 15.805kmpl. The HWFET has good fuel economy than UDDS cycle.
  • The engine average rpm of the vehicle is good for HWFET cycle compared to UDDS cycle.
  • The speed variation between desired and actual for both cycles are very less, it shows the vehicle is able to produce enough torque and power to meet both the drive cycles.
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.