Project 2
Answer:-
The hybrid electric vehicle (HEV) P1 reference application represents a full HEV model with an internal combustion engine, transmission, battery, motor, and associated powertrain control algorithms
For the HWFET 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
load Vehicle_Data/EM_Honda_Insight_10kW
load Vehicle_Data/ESS_NiMH6
ESS_init_soc = 0.8;
ESS_soc_max = 0.9;
ESS_soc_min = 0.6;
%% 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);
For the UDDS 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
load Vehicle_Data/EM_Honda_Insight_10kW
load Vehicle_Data/ESS_NiMH6
ESS_init_soc = 0.8;
ESS_soc_max = 0.9;
ESS_soc_min = 0.6;
%% 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);
Modified Processing File for both HWFET & UDDS drive cycle (“Project2_ProcessingFile_calcs.m”)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Skill-Lync -> Hybrid Drives Development
% Project 2 - P1 Hybrid Vehicle Model
% By - Prafful Keshav Sadavarte
% Description: A MATLAB script is Created to analyse data and to generate plots.
% Here we rename the variables loaded from the model,
% do some basic post-process calculations and generate results and plots.
% 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.
% variable names can be changed 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 in (g)
Veh_Dist = out.Veh_Dist/1000; % Distance traveled by vehicle [km]
veh_des_spd = out.veh_des_spd*18/5; % Vehicle desired speed
Veh_Spd = out.Veh_Spd*18/5; % Vehicle speed [kmph]
Wheel_Speed = out.WheelSpd; % Wheel speed [kmph]
Eng_Fuel_Rate = out.Eng_Fuel_Rate; % Engine fuel rate [%]
EM_Speed = out.EMSpd*18/5; % Electric Motor Speed
EM_Power = out.EMPwr; % Electric Motor Power
EM_Torque = out.EMTrq; % Electric Motor Torque
Term_Volt = out.term_volt; % Terminal Voltage of battery
Soc = out.SOC; % State Of Charge
Pack_Current = out.Pack_Current; %Pack current of battery
%% 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]
%Eng_spd = Eng_Spd.Data(:,1); % engine speed
%Eng_trq = Eng_Trq.Data(:,1); % engine torque
%Eng_pwr = Eng_Pwr.Data(:,1); % engine power
%Eng_fuel_rate = Eng_Fuel_Rate.Data(:,1); % engine fuel rate
%Eng_fuel_consumption = Eng_Fuel_Consump.Data(:,1); % engine fuel consumption
%EM_speed = EM_Speed.Data(:,1); % motor speed
%EM_power = EM_Power.Data(:,1); % Motor Power
%EM_torque = EM_Torque.Data(:,1); % Motor Torque
%Pack_current = Pack_Current.Data(:,1); %pack current of battery
%State_of_charge = Soc.Data(:,1); %state of charge
%Term_voltage = Term_Volt.Data(:,1); % terminal Voltage of battery
%% Plotting vehicle characteristics time trace
figure('Name','(plot d) vehicle characteristics time trace')
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, veh_des_spd, 'linewidth', 1, 'Color', 'black');
plot(Time, Veh_Spd, 'linewidth', 1, 'Color', 'red');
ylabel('Speed [rpm]')
legend('Vehicle desired speed','Vehicle actual speed');
subplot(4,1,3)
hold on
grid on
plot(Time, Gear_Cmd, 'linewidth', 1, 'Color', 'black');
xlim([0, Time(end)]);
xlabel('Time [s]');
ylabel('Gear');
subplot(4,1,4)
hold on
grid on
plot(Time,Veh_Dist,'y','linewidth',1); xlabel('Time'); ylabel('vehicle distance (km)')
%% Plotting engine operating points on engine fuel map
figure('Name','(plot e) 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)]);
%% (c) Plotting engine torque, engine power, fuel rate, fuel comnsumption.
figure('Name','(plot c) Engine torque,power,fuel rate, fuel conp.');
subplot(4,1,1)
hold on
grid on
plot(Time, Eng_Trq,'b','linewidth',1); xlabel('Time'); ylabel('Torque')
subplot(4,1,2)
hold on
grid on
plot(Time, Eng_Pwr,'r','linewidth',1); xlabel('Time'); ylabel('Power')
subplot(4,1,3)
hold on
grid on
plot(Time, Eng_Fuel_Consump,'k','linewidth',1); xlabel('Time'); ylabel('Fuel consumption')
subplot(4,1,4)
hold on
grid on
plot(Time, Eng_fuel_rate,'g','linewidth',1); xlabel('Time'); ylabel('fuel rate')
%% (b) Plotting of time trace for engine, transmission input, transmission output and wheel speed
figure('Name','(plot b) Engine torque, Trans. in, Trans. out, wheel speed');
hold on
grid on
plot(Time, Eng_Spd,'r','linewidth',1);
plot(Time, Trans_In_Spd,'b','linewidth',1);
plot(Time, Trans_Out_Spd,'y','linewidth',1);
plot(Time, Veh_Spd,'g','linewidth',1);
xlabel('Time (s)')
ylabel('speed (rpm)')
legend('Engine speed','Trans input spd','Trans output spd','Wheel speed');
%% (f) Plotting of motor speed, torque, motor input power
figure('Name','(plot f) motor speed, torque, motor input power');
subplot(3,1,1)
hold on
grid on
plot(Time, EM_Speed,'r','linewidth',1); xlabel('Time'); ylabel('Motor speed')
subplot(3,1,2)
hold on
grid on
plot(Time,EM_Torque,'b','linewidth',1); xlabel('Time'); ylabel('Motor torque')
subplot(3,1,3)
hold on
grid on
plot(Time,EM_Power,'g','linewidth',1); xlabel('Time'); ylabel('Moter power')
%% (g) Plotting of Pack voltage, current and SoC
figure('Name','(plot g) Pack Voltage, Pack Current, SoC');
subplot(3,1,1)
hold on
grid on
plot(Time,Term_Volt,'r','linewidth',1); xlabel('Time'); ylabel('Terminal Voltage')
subplot(3,1,2)
hold on
grid on
plot(Time,Pack_Current,'g','linewidth',1); xlabel('Time'); ylabel('Pack Current')
subplot(3,1,3)
hold on
grid on
plot(Time,Soc,'b','linewidth',1); xlabel('Time'); ylabel('SOC')
%% (h) Plotting of motor operating points on the motor input power map
figure('Name','(plot h) Motor Operating Points');
hold on
grid on
title('Motor Operating Points','fontsize',12);
p1=plot(EM_map_spd*30/pi,EM_max_trq,'linewidth',2,'color','r');
p2=line([EM_map_spd(end)*30/pi EM_map_spd(end)*30/pi],[0 EM_max_trq(end)]);
set(p2,'linewidth',1,'linestyle','--','color','k');
p3=line([EM_map_spd(1)*30/pi EM_map_spd(1)*30/pi],[0 EM_max_trq(1)]);
set(p3,'linewidth',1,'linestyle','--','color','k');
[c,h] = contour(EM_map_spd'*30/pi,EM_map_trq,EM_inpwr_map');
clabel(c,h);
xlabel('Motor Speed [rpm]');
ylabel('Motor Torque [Nm]');
title('Motor Fuel Consumption Map [g/s]');
p4 = plot(EM_Speed,EM_Torque,'.','color','k');
legend([p1 p4],{'Max Curve','Operating Points'});
axis([EM_map_spd(1)*30/pi EM_map_spd(end)*30/pi 0 EM_map_trq(end)]);
A detailed explanation of a forward energy-based fuel consumption model of a P1 hybrid vehicle follows. This model is based on the conventional vehicle model from Project 1.

Mainly it consists of three blocks
1. Driver block
2. Controller block
3. Powertrain block
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
1. Driver block
It is modeled using a ‘Driver’ block, which is a basic PI controller that generates accelerator and brake pedal outputs to match the desired and actual vehicle speeds. In this we use drive cycles and based on these results of fuel consumption and emissions the vehicle gets certified and it also forms a basis for uniform assessment. It is based on time, and velocity then it all integrates and creates an output acceleration pedal and a brake pedal.

Scope output in Driver Block:-
For the HWFET Cycle

For the UDDS Cycle

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
2. Controller block

The Controller block is the brain of the vehicle, representing the electronic control units. It is based on the driver inputs, it generates desired engine torque, desired transmission gear desired motor torque, and desired brake torque. These inputs are fed to the ‘Powertrain’ block which represents the drivetrain of the vehicle.
Scope output in ControllerBlock:-
For the HWFET Cycle

For the UDDS Cycle

The controller block consists of Five sub-blocks
1. Stateflow for Controlle
2. Engine Control Unit
3. Transmission Control Unit
4. EM Control Unit
5. Break Control Unit
1. Stateflow for Controlle

In this we created four conditions stop, start, drive, and regeneration braking. The initial block represents the stop condition. In which the engine is off. The engine and motor throttle conditions are zero. Then the second block represents the start condition. In mode 1 the electric motor throttle is only used to provide the required torque and power to the vehicle. the engine is off and the engine throttle condition is zero.
State 1 and state 2 are connected using the links i.e. it moves from state 1 to state 2 when acceleration is less than one or SOC is less than the minimum SOC.
State 3 Represents mode 2 i.e. engine is on and the engine throttle is also having a positive value from the driver but the electric motor throttle is zero. It changes from state 2 to state 3 when the engine speed is greater than or equal to the engine idle speed.
state 4 represents regenerative braking which is model 3 In this state the engine is on but the engine throttle is having no input from the driver whereas the electric motor receives negative power due to braking.
The inputs given to the chart are Acceleration, brake, engine speed, vehicle speed, SOC, and clutch lockup.
The output we get from the chart is the mode, engine condition, engine throttle condition, and electric motor throttle condition.
Modification is done in all Unit modeling. they showed in the next figures.
2. Engine Control Unit

In this control model We use engine control unit in that give input Engine speed through creating look up table. in that table we give input Maximum torque and map speed then also create 2nd look up trable in that give input ct torque and map speed then it substracts and multiplied. the engine speed also give to ideal contro speed to integrate from this we meet output of engine required torque.
Scope output in Engine Control Unit:-
For the HWFET Cycle

For the UDDS Cycle

3. Transmission Control Unit

In this unit we create steadfy flow variable state for controlling of gears of vehicle in ascending and descending order concerning time, speed, and distance. and give input to this steady state is vehicle speed in m/s to mph.
4. EM Control Unit

5. Break Control Unit

In this, we calculate brake torque, and then all three control signals output is given to the powertrain.
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
3. Powertrain block

In this model we used map based model to model the fuel consumption of engine. It is based on maximum Torque and minimum torque from 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.
The controller block consists of Eight sub-blocks
1. Engine
2. Electric Machine/Electric Motor
3. Crankhub
4. Transmission
Torque Converter
5. Differential
6. Wheel
7. Vehicle Dynamics
8. Battery Modeling (Estimated storage system)
Terminal Voltage Pack Current
1. Engine

In this model we used map based model to model the fuel consumption of engine. It is based on maximum Torque and minimum torque from 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.
Scope output in Engine Block:-
For the HWFET Cycle


For the UDDS Cycle


2. Electric Machine/Electric Motor

Scope output in Electric Machine/Electric Motor:-
For the HWFET Cycle


For the UDDS Cycle


3. Crankhub

Scope output in Crankhub :-
For the HWFET Cycle

For the UDDS Cycle

4. Transmission

In these model we take engine torque, gear selector from controllerb for transmission of gear ratio. The ratio is multiply by transmission input torque and then the 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. In it basically engine dynamics and that is decoupled.
Torque Converter

Scope output in Transimmision:-
For the HWFET Cycle

For the UDDS Cycle

5. Differential

In this taking input is the transmission output then its going to the differential ratio multiplied the output and input torque then meet axle torque. The axle torque is a lower than the transmission torque and differential ratio.
6. Wheel

In this model we take the axle torque from differentail and brake torque from controller. it is substracts and multiplied rolling radius and velocity then we meet the tractive force from axle and brake torque. and the wheelspeed is meet using velocity.
7. Vehicle Dynamics

In this takes tractive force and road load. It is dictates vehicle speed based on tractive force and road load.
8. Battery Modeling (Estimated storage system)

In this we give input as power then it multiply and give to pack current. then from soc estimation meet output SOC its give to terminal voltage as input and then meet terminal voltage as output.
Terminal Voltage

In this use input SOC it is connected to 1d lookup table 1st table variable interpolated as state of charge and open voltage circuit. In 2nd table variable interpolated as resistance discharge and state of charge and in 3rd table variable interpolated as resistance charge and state of charge. Then it is passed to switch block for controlling the threeshold. then they give voltage limits as max volts and min volts. then meet terminal Voltage.
Scope output in Driver Block:-
For the HWFET Cycle

For the UDDS Cycle

Pack Current

In this we integrate pack current and convert it rad to amp then saturated and meet SOC.
Then we create one coding file for creating plots and to meet all answers. that file shown in next.
Scope output in Driver Block:-
For the HWFET Cycle

For the UDDS Cycle

a. Tabulate the fuel economy numbers (kmpl) for UDDS and HWFET cycles. Compare these numbers with the baseline numbers for the conventional vehicle model from Project 1.

The fuel economy number (kmpl) for the HWFET cycle is 16.1111

The fuel economy number (kmpl) for the UDDS cycle is 12.6428
As we see the fuel economy is high in HWFET compared to UDDS. It is because in urban driving the vehicle encounters more traffic and it has to stop for fever distance and it consumes more fuel at the starting. In HWFET the vehicle encounters no traffic and it moves without use of too much braking so it will have more fuel economy number.
b. Plot the time trace for the engine, transmission input, transmission output, and wheel speed on one plot.
For the HWFET Cycle

For the UDDS Cycle

In this we can see the graph is more fluctuate into UDDS drive cycle compared to HWFET drive cycle. It is because UDDS has more starts and stops and in HWFET less starts and stops.
Braking is high in UDDS compared to HWFET.
c. Plot engine torque, engine power, fuel rate, and fuel consumption using subplots.
For the HWFET Cycle

For the UDDS Cycle

Vehicle cosumed more power in UDDS drive ccycle bacause in urban area the vehicle require many starts and stops so it required more power compred to HWFET.
Engine is high in UDDS drive cycle compred to HWFET drive cycle because the starting from rest the vehicle requires more torque to overcome the static friction.
The fuel rate is high in HWFET drive cycle compared to UDDS drive cycle because it will be in continues movement so it consumes more fuel.
The fuel economy is high in HWFET because In UDDS cycle many starts and stops so more fuel cosumes and the engine is in idle postion.
d. Plot accelerator and brake pedal, gear command, vehicle desired and actual speed, and vehicle distance using subplots.
For the HWFET Cycle

For the UDDS Cycle

e. Plot the engine operating points on the engine fuel map.
For the HWFET Cycle

For the UDDS Cycle

f. Plot motor speed, torque, and motor input power using subplots.
For the HWFET Cycle

For the UDDS Cycle

The fluctuations will be more in UDDS cycle compared to HWFET cycle because UDDS has many starts and stops due to traffic as the purpose of motor in P! hybrid is initiation of crank rotation and they are more in UDDS cycle when compared to HWFET cycle.
If the purpose of the motor is to provide traction then both the cycles wouldb have more flyctuations.
We can observe that the motor power and torque are very high in HWFET at the start and they are almost zero after few seconds but in UDDS it has continuod fluctuations this is because of frequent braking in UDDS.
g. Plot pack voltage, current, and SoC using subplots.
For the HWFET Cycle

For the UDDS Cycle

The pack voltage and current will have more fluctuations in UDDS as compared to HWFET cycle because of the frequent start and stops throughout the drive and the battery has to provide the energgy everytime when the car is starting from the idle position.
SOC decreased in the UDDS cycle wrt time but it has increased in HWFET cycle. It is because in UDDS we have frequent start and stops and battery has to provide the energy has evertytime when the caris starting from the idle position and the SOC decreases but in HWFET cycle The Vehicle will be moving continuously without braking frequently and the alternator is utilised to transfer some engine power to the battery through motor so SOC increase in the HWFET cycle.
h. Plot the motor operating points on the motor input power map, with the motor max motoring and generating torque curves.
For the HWFET Cycle

For the UDDS Cycle

Conclusion:-
The various performance of characteristics and operating points of UDDS drive cycle and HWFET drive cycle are analysed and the graphs are plotted
1. Time trace for engine, Transmission input, Transmission output and wheelspeed with respect to time.
2. Engine torque, Engine power, Fuel rate and Fuel consumption with respect to time.
3. Accelerator and brake pedal, gear command and vehicle desired, actual speed, vehicle distance with respect to time.
4. Engine operating points on the engine fuel map with respect to time.
5. Motor speed, Torque, Motor input power with respect to time.
6. Pack voltage, Current and State of charging with respect to time.
7. The motor operating points on the motor input power map with respect to time.
and also it comparing with HWFET drive cycle and their numbers also compared.