Aim:-
Week 4 Challenge of Studying Powertrain Blockset and determining results in below given condition.
Objective:-
- What is the difference between mapped and dynamic model of engine, motor and generator? How can you change model type?
- How does the model calculate miles per gallon? Which factors are considered to model fuel flow?
- Run the HEV ReferenceApplication with WOT drive cycle. Change the grade and wind velocity in the environment block. Comment on the results.
- Keeping all other parameters same, compare the simulated results of hybrid and pure electric powertrains.
Solutions :-
1. What is the difference between mapped and dynamic model of engine, motor and generator? How can you change model type?
Powertrain Blockset :-
- Powertrain Blockset provides fully assembled reference application models of automotive powertrains, including gasoline, diesel, hybrid, and electric systems. It includes a component library for simulating engine subsystems, transmission assemblies, traction motors, battery packs, and controller models.
- Powertrain Blockset also includes a dynamometer model for virtual testing.
- Powertrain Blockset provides a standard model architecture that can be reused throughout the development process. You can use it for design tradeoff analysis and component sizing, control parameter optimization, and hardware-in-the-loop testing. You can customize models by parameterizing components in a reference application with your own data or by replacing a subsystem with your own model.
Powertrain Blockset provides two types of models: Mapped and Dynamic.
i. SI ENGINE:-
A spark-ignition engine (SI engine) is an internal combustion engine, generally a petrol engine, where the combustion process of the air-fuel mixture is ignited by a spark from a spark plug.
a) Mapped SI Engines :-
- The Mapped SI Engine block implements a mapped spark-ignition (SI) engine model using power, air mass flow, fuel flow, exhaust temperature, efficiency, and emission performance lookup tables. The block enables you to specify lookup tables for these engine characteristics.
- It represents macro engine behavior as a set of lookup tables for power, air mass flow, fuel flow, exhaust temperature, efficiency, and emission performance engine characteristics. It is for static analysis.
- The lookup tables, developed with the Model-Based Calibration Toolbox, are functions of commanded torque, Tcmd, brake torque, Tbrake, and engine speed, N. If you select Input engine temperature, the tables are also a function of engine temperature, TempEng.
- Mapped Engine can be used when you have engine data from a dynamometer or a design tool like GT-POWER. Also, it is used for quasi steady-state engine simulations.
- Simulation time required for Mapped engines is less as compared to Dynamic Engine models. However, the results given by Mapped engine models is less accurate as compared to Dynamic engine models.
This block can be used for
a)Hardware-in-the-loop (HIL) engine control design
b)Vehicle-level fuel economy and performance simulations



Fig. a: Mapped SI Engine
b) Dynamic SI Engines :-
- Dynamic engine Model decomposes the engine behavior into engine characteristics that are separated into lower-level components. By combining components in this way, the models capture the dynamic effects.
- Dynamic Engine models are used when you need a more detailed dynamic model and have component-level data.
- To analyze the impact of individual engine components on the overall performance, dynamic engine models are used.
- Dynamic engine models are suitable for designing control, estimator, and diagnostic algorithms that depend on dynamic subsystem states. Whereas, Mapped engine models are suitable for analysis and design activities that do not require engine subsystem dynamic characteristics.
- Simulation time taken by Dynamic engine models is more as compared to Mapped Engine models. However, the results given by Dynamic engine models is more accurate as compared to Mapped engine models.

Fig. b: Dynamic SI Engine
Conversion of Mapped SI Engine to Dynamic SI Engine :-
Steps :-
- To change the model from Mapped SI Engine to Dynamic SI Engine, we need to go to Modelling Option. Under Modelling, we have to select Model Explorer.
- From there we can change the type of model we want to use. i.e. (changing Mapped to Dynamic SI Engine) as under and click on Apply.

ii. MOTOR:-
- An electric motor is an electrical machine that converts electrical energy into mechanical energy. Most electric motors operate through the interaction between the motor's magnetic field and electric current in a wire winding to generate force in the form of torque applied on the motor's shaft.
- Electric motors can be powered by direct current (DC) sources, such as from batteries, or rectifiers, or by alternating current (AC) sources, such as a power grid, inverters or electrical generators. An electric generator is mechanically identical to an electric motor, but operates with a reversed flow of power, converting mechanical energy into electrical energy.
a) Mapped Motor :-
- The Mapped Motor block implements a mapped motor and drive electronics operating in torque-control mode. The output torque tracks the torque reference demand and includes a motor-response and drive-response time constant.
- Use the block for fast system-level simulations when you do not know detailed motor parameters, for example, for motor power and torque tradeoff studies. The block assumes that the speed fluctuations due to mechanical load do not affect the motor torque tracking.
- Mapped Motor represent macro motor behavior as a set of lookup tables such as battery voltage, motor speed, motor torque in certain condition.
- In this mode, the motor gets controlled by just the tabulated values of readly available torque and motor shaft spped through the table data. Motor can be parameterised by maximum torque and power or tabulated torque speed envelop. In the output of Mapped motor, we get motor current, motor shaft speed, motor torque and informations about power losses,power details(Mechanical and Electrical).
- Mapped motor model gives result quickly but is not accurate as compared to the results shown by dynamic motor models.

Fig a :- Mapped Motor
b) Dynamic Motor :-
- In Dynamic Motor, the user have the knowledge of input parameter of motor.
- To analyze the impact of individual motor components on the overall performance, dynamic motor models are used.
- Dynamic motor takes time for simulation but give accurate result compared to Mapped motor model. In dynamic motor model, Interior PM Controller, Three Phase Voltage Source Inverter, Interior PMSM is used.


Fig b:- Dynamic Motor
- Here, Interior PM controller is used in dynamic motor model. Interior PM controller implements a torque-based, field-oriented controller for an internal permanent magnet synchronous machine (PMSM) with an optional outer-loop speed controller. The torque control implements strategies for maximizing the torque per amp (MTPA) and weakening the magnetic flux.
- In this, we have to give values for D axis and Q axis inductance values on controller block. This controller controls the speed of the motor based on its field oriented controls.

- Also, Dynamic Interior PMSM motor is used in dynamic motor model. It models the dynamics of a three-phase interior permanent magnet synchronous motor (PMSM) with sinusoidal back electromotive force.
- In this, we can give the motor parameters with their internal parts specification values but not as in mapped motor.
- In Dynamic Interior PMSM motor, we are giving no.of pole pairs(P),stator resistance per phase(Rs), Stator d-axis & q-axis inductance values (Ldq) and also initial current values, initial rotor mechanical positions.
- In dynamic motor model, we can connect the controller with the motor using three-phase voltage source inverter.
- Three-phase voltage source inverter generates line-to-neutral voltage commands for a balanced three-phase load. We can also customize the inverter model by configuring the voltage switching function for continuous voltage or inverter switch input signals. To enable electrical loss calculations suitable for memory optimized code generation, select Enable memory optimized 2D LUT.
- In mapped model, the inverter is inbuilted with standard specification.

CONVERSION OF MAPPED MOTOR TO DYNAMIC MOTOR :-
Steps :-
- To change the model from Mapped motor to Dynamic motor, we need to go to Modelling Option. Under Modelling, we have to select Model Explorer.
- From there, we can change the type of model we want to use. i.e. (changing Mapped to Dynamic motor) as under and click on Apply.



iii. Generator :-
- In electricity generation, a generator is a device that converts motive power (mechanical energy) into electrical power for use in an external circuit. Sources of mechanical energy include steam turbines, gas turbines, water turbines, internal combustion engines, wind turbines and even hand cranks.
- The first electromagnetic generator, the Faraday disk, was invented in 1831 by British scientist Michael Faraday.
- Generators provide nearly all of the power for electric power grids.
- In HEV & EV vehicles, the same motor is used as generator when the motor is in regenerative breaking mode and at that point, motor torque is negative.
a)Mapped Generator :-
- Mapped Generator also have set of values such as battery voltage just like mapped motor but the parameter that will be different is generator speed and generator torque.
- This mapped generator model also takes less simulation time as compared to Dynamic generator model.
- However, the result given by mapped generator was not as accurate as compared to dynamic generator model.
- In mapped model, the inverter is inbuilted with standard specification.



b)Dynamic Generator :-
- In Dynamic Generator model, Interior PM Controller, Three Phase Voltage Source Inverter, Interior PMSM is used.
- Dynamic Generators models are used when you need a more detailed dynamic model and have component-level data.
- Dynamic Generator takes time for simulation but give accurate result compared to Mapped Generator model.
- In Dynamic Generator model, the user have the knowledge of input parameters. In dynamic generator model, we give input of generator torque and generator speed instead of motor speed and motor torque.


CONVERSION OF MAPPED GENERATOR TO DYNAMIC GENERATOR :-
Steps :-
- To change the model from Mapped Generator to Dynamic Generator, we need to go to Modelling Option. Under Modelling, we have to select Model Explorer.
- From there, we can change the type of model we want to use. i.e. (changing Mapped to Dynamic generator) as under and click on Apply.



2. How does the model calculate miles per gallon? Which factors are considered to model fuel flow?
Answer :-
Miles per Gallon (MPG) -
- MPG, or miles per gallon, is the distance, measured in miles, that a car can travel per gallon of fuel.
- It is the fuel economy of vehicle expressed in miles per gallon. It means that higher the MPG of fuel, more efficient will be the vehicle.
- A car's MPG can be inconsistent because it is affected by a number of different factors, so it is difficult to get an accurate measurement. For example, factors like traffic and road conditions can affect MPG in any given context. That's why the EPA (Environmental Protection Agency) runs tests over a standard set of courses, then averages the results to calculate a vehicle's official MPG.
- The EPA gives each vehicle three different MPG ratings as under:
- Highway MPG:- The average a car will get while driving on an open stretch of road without stopping or starting, typically at a higher speed.
- City MPG:- The score a car will get on average in city conditions, with stopping and starting at lower speeds.
- Combined MPG:- A combined average of highway and city MPG.
- Miles and gallons are imperial measurements that are used in the United States. You're unlikely to see these measures in Europe or other parts of the world. Instead, European countries use liters per 100 kilometers, or L/100km, to measure fuel efficiency.
Steps :-
- First open the "Visualization block" and click on the chart of performance calculations. Inside, there is a simulink logic to calculate fuel economy of vehicle in the miles per gallon.


Fig: Miles per Gallon Conversion Block
Explanation :-
- The energy consumption in HEV vehicle consist of both battery power and fuel. So, both Fuel volume flow and battery power port is added. However before adding them, we have to convert to the same unit m3gal.
- Since, the battery power is in W. Hence, we converting the battery power from W to kW by dividing the battery power by constant block of 1000 value. Further, as per US EPA standards, 33.7 kilowatt hours of electricity is equivalent to one gallon of gasoline, hence, we need to divide it by factor of 33.7 to convert the output in terms of kWh/USgal equivalent. Further, we know that 1h=3600sec, hence we are dividing by 3600 to convert the output in the terms of kWs/USgal.
- Further, we know that (1gallon=0.003785411784m3)`. So, we multiply the output of that using Gain Block by factor of 0.00378541. Now the unit of Fuel energy and battery energy used is same. Then, fuel volume flow and Battery power is added using addition block. Thereafter, the output was integrated with integrator block and further the output was converted to L by multiplying with gain block of 1000 value.(1m3=1000L)
- Then, Vehicle speed was taken into account. First square block has been used and then square root has been used to get only positive value of vehicle speed as vehicle is moving forward. Then, integrator block has been used to get the distance covered in m. Then, output is converted into 100 km terms by using gain block of 11000100value. Further, this value of (1100km) is divided from litre (L). In this way, fuel efficieny of L100kmis calculated`.
- For calculating the miles per gallon (MPGE), we are integrating the vehicle speed, then distance in meter has been calculated. Then, we have to convert m to miles. Hence, it is multiplied by factor of 0.000621371 by using gain block.
- After addition of fuel volume flow & battery power using addition block, total volume of fuel is measured in m3.Further, we have to convert this volume in m3→USgallon. Hence, the `output of fuel volume is multiplied by factor of 264.172. Then, we can divide the total mile covered by vehicle by total gallon of fuel to get fuel economy in terms of Miles per gallon equivalent (MPGE).
The factors that are affecting fuel economy are:-
- Vehicle Speed.
- Fuel Volume Flow.
- Battery Power.
- Vehicle Load.
- Weather/ Environmental condition.
- Hill climbing angle.
- Drive Cycle.
Vehicle speed & Fuel flow:-
- Vehicle speed is an important factor while considering the fuel consumption at that particular time, so to determine the fuel consumption throughout the
drive cycle.
- To convert speed to distance we can Integrate with time and we are doing the same of converting the velocity to get distance covered by integrating.
Then, the Fuel flow is expressed as the mass flow rate (i.e) the amount of fuel at each moment in Kg/Sec.
Factors to be considered while modelling the fuel flow are :-
The only factors considered while modelling the fluid flow are fuel consumption and fuel economy.
1) Fuel Economy :- It is being calculated depends on the total distance covered by the vehicle per volume of fuel.
2) Fuel Consumption :- It depends on the type of reference model. For example in conventional and hybrid models, we have to consider the fuel as a physical quantity and calculate its volume from the mass flow rate by integrating wth the time interval. When it comes to pure EV model, we have to consider the batteries electrical energy as the source of fuel. The batteries power is converted to energy (kWhr) per gallons of gasoline fuel equivalent, then to the repective volumetric form.
3. Run the HEV ReferenceApplication with WOT drive cycle. Change the grade and wind velocity in the environment block. Comment on the results.
The block diagram of HEV is as follow. This is the Series Parallel arrangement.

Fig: Block Diagram of HEV Powertrain
We will open the HEV model and the model is as under;

Fig: Model of HEV Powertrain
- We have selected drive cycle as WOT (Wide Open Throttle) condition. After selecting the WOT condition, we have kept default WOT condition for zero grade angle and zero wind velocity as under;

- After simulating the model for 30 sec as the same was mentioned in WOT condition and we got the results as under;

Fig: Simulated result of HEV Powertrain in default WOT condition
Explanation from the graph :-
- From the above graph, it's been observed that the battery as a pure source of power is used to meet the demands required.The engine was not required.
- In the second graph, the top speed of motor was approximately 9000 rpm reached in approximately 6 seconds. As engine & the generator is not running, hence their RPM is also at 0. In the third graph, it can be observed that the motor torque was clocked at 300 N-m in that time. However, engine torque and generator torque is zero because only motor is sufficient enough to produce required torque for the particular load condition.
- In wide open throttle condition (WOT condition) of above case, it has been observed that vehicle obtained the maximum velocity in approximately 17 sec. During acceleration(5-17 sec), it has been observed that battery current required is more. The same has been observed from the battery current graph. During acceleration, we observed that battery SOC(%) is decreasing rapidly as motor is running at very high rpm & high torque.
- Thereafter, vehicle runs in constant power region till 20 sec.The same can be verified from the second graph in which it has been observed that motor speed is constant during that time. Since, constant power is required for motor to run the vehicle, hence battery SOC(%) is decreasing slowly as compared to WOT accelerating condition in which rate of discharge was very steep.
- During deacceleration(20-24 sec), it has been observed that motor speed(rpm) started decreasing. In the third graph, we observed that motor torque is negative and due to regenerative braking, it is charging the battery. The same can be observed that battery SOC graph where it has been found that during deacceleration, there is an slight increase in SOC(%) of the battery.
- Since, the vehicle is deaccelerating, hence the battery current required is gradually decreasing and then it goes in negative value. The same can be observed from the battery current graph.
- During that deaccelerating period, US fuel economy of vehicle (MPGE) is also increasing.
- US fuel economy of vehicle (MPGE) recorded in this drive cycle is 15.95 as HEV vehicle is running on electric motor only.
- Battery SOC(%) of vehicle was dropped from (80% to 71.9%) during entire drive cycle.
MPGE Result of entire drive cycle :-

Battery SOC(%) of entire drive cycle :-

DURING ACCELERATION :-
1) Motor Speed during Acceleration :-

2) Motor Torque during Acceleration :-

3) Battery Current during Acceleration :-

4) Battery SOC during Acceleration :-

DURING DEACCELERATION :-
1) Battery Current during deacceleration :-

2) MPGE during deacceleration :-

3) Battery SOC(%) during deacceleration :-

Thereafter, we change the wind velocity and grade angle as under;

Output Results :-

Explanation :-
- After taking into consideration the effect of grade angle and wind velocity, we observed from the first graph that actual maximum velocity achieved by HEV vehicle is approximately 8 mph. During accleration phase of WOT condition, we observed that vehicle achieved that velocity in 20 sec.
- During acceleration, motor speed was reached approximately around 9000 rpm in 6 seconds. At that time, motor torque of 300 N-m was clocked.Since, the vehicle demanded instant torque and the same demand was fulfilled by motor only. During acceleration period of WOT condition, we observed that due to requirement of high power, higher battery current of 500 A is being used by motor. The same has been observed from battery current graph.
- During acceleration, it has been observed that battery SOC(%) is decreased rapidly as motor is running at very high speed and high torque to meet the requirement. The same has been observed from Battery SOC graph.
- During acceleration, only motor is active to meet the required power. Hence, we observed that there is an increase in US fuel economy (MPGe).
- During deacceleration(20-21)sec, we observed that vehicle velocity is dropping as motor speed started to decrease due to braking. The above model is designed in such way that if SOC(%) goes below 70%, engine will start to meet the requirement.The same can be seen from Engine speed graph. Since the vehicle is based on series parallel combination of Hybrid Electric Vehicle, additional engine torque gets transferred to generator torque as vehicle do not require additional torque to move forward as vehicle is deaccelerating.Hence, the generator torque is negative. The same can be observed from the third graph of motor torque, generator torque and engine torque.
- Since this additional engine torque gets transferred to generator torque, then generator is charging the battery. Also, battery is charging due to regenerative braking effect during deacceleration.However, the rate of discharge of battery is more as compared to rate of charging, hence net SOC(%) during deacceleration is decreasing slightly.
- The vehicle comes to rest after 21 sec. The same has been observed from velocity graph. Since, the vehicle is at rest, motor speed is also at 0 rpm. However, engine is still running and engine speed is at around 4000 rpm and engine torque clocking at around 160 N-m. Since, the vehicle is at rest, this additional engine torque is transferred to generator to charge the battery. The same has been observed from SOC(%) graph where battery SOC(%) is increasing. Since, the fuel is being utilised to charge the battery, hence US fuel economy(MPGE) of vehicle drops below 1. Also, we observed that battery current is negative which clearly indicates that battery is charging.
- US fuel economy of vehicle (MPGE) recorded in this drive cycle is 0.82 as HEV vehicle is running on both electric motor and engine.
- Battery SOC(%) of vehicle was dropped from (80% to 71.8%) during entire drive cycle.
US Fuel Economy (MPGE) of entire drive cycle :-

Battery SOC(%) of entire drive cycle :-

ACCELERATION :-
1) Actual velocity achieved by vehicle during acceleration :-

2) Motor speed during acceleration :-

3)Battery current during acceleration :-

4)US fuel economy MPGE during acceleration :-

5) Battery SOC(%) during acceleration :-

DEACCELERATION :-
1) Motor Speed during deacceleration :-

2) Engine Speed during deacceleration :-

3) Generator Speed during deacceleration :-

4) Motor Torque during deacceleration :-

5) Engine Torque during deacceleration :-

6) Generator Torque during deacceleration :-

7) Battery Current during deacceleration :-

8) Battery SOC(%) during deacceleration :-

9) Fuel economy (MPGE) during deacceleration :-

Conclusion :-
- Taking into consideration of HEV reference model for Wide open throttle condition (without grade angle & wind velocity) and (with grade angle & wind velocity), we conclude that actual velocity achieved by vehicle with grade angle & wind velocity is less as compared to the vehicle without considering grade angle & wind velocity.
- Also, we observed that fuel economy (MPGE) of HEV vehicle significantly dropped after considering grade angle & wind velocity parameters.
- Hence, we can say that as soon as grade angle & wind velocity increases, velocity of the vehicle decreases & more power is required. Due to requirement of more power, more fuel is being utilised which in turns affecting fuel economy (MPGE).
- Battey SOC(%) is less in HEV vehicle with consideration of grade angle & wind velocity parameters as compared to HEV vehicle without consideration of grade angle & wind velocity parameters. Because, only for few seconds, battery current was negative in case of HEV vehicle with consideration of grade angle & wind velocity parameters as compared to HEV vehicle without consideration of grade angle & wind velocity parameters.
- In HEV vehicle with consideration of grade angle & wind velocity, engine is also started when battery SOC(%) goes below threshold value to meet the required load.
4. Keeping all other parameters same, compare the simulated results of hybrid and pure electric powertrains.
PURE ELECTRIC VEHICLE:-
A battery electric vehicle (BEV), pure electric vehicle, only-electric vehicle or all-electric vehicle is a type of electric vehicle (EV) that exclusively uses chemical energy stored in rechargeable battery packs, with no secondary source of propulsion (e.g. hydrogen fuel cell, internal combustion engine, etc.)
The block diagram for the Electric powertrain is as follow:

Fig: Block Diagram of EV Powertrain
Here the battery powers the motor to propel the vehicle.
The model of the electric powertrain is as follow:

Fig: Model of EV Powertrain
Keeping the parameter of last used WOT condition and environment condition as same as used in hybrid powertrain, the result are as follow for electric powertrain.

Output Result of EV Vehicle :-

Explanation :-
- During acceleration, actual velocity achieved by EV vehicle is approximately 8 mph. The vehicle took (5-20)sec to reach that velocity. Since, due to effect of grade angle and wind velocity, vehicle did not achieve the required velocity. The same has been observed from the trace velocity graph.
- During accleration of WOT condition, we observed that motor speed was recorded approximately around 4000 rpm. Torque of approximately 280 N-m was clocked at 6 sec due to high power demand because of grade angle and wind velocity. From 7 sec till 20 sec, we observed that constant motor torque of 180 N-m was clocked as vehicle was accelerating. During acceleration(5-20 sec), battery current of approximately 220 A is being utilised. It indicates that battery current is being utilised by the motor and battery will discharge. Due to this, there is a significant drop in battery SOC(%).The same has been observed from the graph.
- During deacceleration, motor speed (rpm) gradually decreasing. Also, there is a drop in motor torque as vehicle is deaccelerating. Also, battery current started droping and further it goes in negative value due to regenerative braking which indicates that battery is charging. However, the battery current is very low negative value in pA. It indicates that rate of discharge is more as compared to rate of charging. Hence, there is slight decrease in battery SOC(%) during deacceleration.
- US Fuel economy (MPGE) recorded for entire drive cycle is 1.9
- Battery SOC(%) of entire drive cycle decreased from 80% to 78.6%.
Fuel Economy (MPGE) of entire drive cycle :-

Battery SOC(%) of entire drive cylce :-

During Acceleration :-
1) Actual Velocity durign acceleration :-

2) Battery SOC(%) during acceleration :-

3) Battery current during acceleration :-

4) Motor Speed during acceleration :-

5) Motor Torque during acceleration :-

6) Fuel Economy (MPGE) during acceleration :-

During Deacceleration :-
1) Battery Current during deacceleration :-

2) Battery SOC(%) during deacceleration :-

3) Motor Speed during deacceleration :-

4) Motor Torque during deacceleration :-

5) Fuel Economy during deacceleration :-

Comparision of HEV vehicle & EV vehicle with consideration of grade angle & wind velocity is as under :-
- The Trace Velocity graph for HEV and EV powertrain is similar.
- The peak RPM of motor in EV is less than HEV. There is huge fluctuation in the values of RPM of motor in HEV. Incase of EV, the RPM magnitude is smooth from the moment go.
- The same is true for torque. The peak torque of motor in EV is less than HEV. There is huge fluctuation in the values of torque of motor in HEV at the onset, but thereafter motor torque goes to zero as motor stopped as battery SOC(%) goes below threshold value. Thereafter, engine torque is used to meet the required load. Hence, there is a flucutation in the values of engine torque at around 160 N-m then the graph smoothens as vehicle is deaccelerating and this additional engine torque is getting transferred to generator torque for charging the battery. Incase of EV, the torque magnitude is smooth from the beginning.
- The SOC(%) at the end of HEV ride (means when vehicle comes to rest) is increased by almost 2% where it increases just slightly in EV. So, regenrative braking leading to increase in SOC(%) is better in HEV than EV.
- The current requirement is HEV vehicle reaches nearly 500 A whereas it is 225 A for EV vehicle. The current is negative for more time in HEV than in EV powertrain, this atttributes to more increase in battery SOC(%) because of better regenerative braking in HEV vehicle.
- The fuel economy (MPGE) for EV is 1.9 whereas it is just 0.8 for HEV. So, the economy of EV is better than HEV. The decline in fuel economy can be attributed to engine.