Final Project: Electric Rickshaw modelling
Create a detailed MATLAB model of an electric rickshaw (three wheel passenger vehicle) as per details below:
Rear wheels driven by PM brushed type motor
Assume efficiency points of motor controller and motor.
AIM
To Create an Electric Rickshaw usng MATLAB-Simulink.
OBJECTIVE
To Create a detailed MATLAB model of an electric rickshaw (three wheel passenger vehicle) as per details below:
- Rear wheels driven by PM brushed type motor
- Assume efficiency points of motor controller and motor.
- For any three standard driving cycles show energy consumption, temperature rise of motor and controller for 100 km constant speed driving at 45 kmph.
ELECTRIC RICKSHAW:
Electric Rickshaw is three wheel battery operated vehicles, which are considered as an upgrade to conventional rickshaws, and economically better than auto rickshaws and other fuel variants, these rickshaws, since are battery powered have zero emission, and is often argued to be much better than other rickshaws as they are considered almost pollution free.
E Rickshaw in India are built over tubular chassis, a body is kept a light in weight in order to increase the life of the battery, the main electronic components that make the drive are motor, controller, harness, batteries and the throttle. The chassis is the main part which ensures drive quality and safety of the vehicle, is made of mild steel. Electrical components used of higher quality will lower resistance and heat losses and increase efficiency.

Vehicle Parameters:


Block Diagram of EV
- Drive Cycle: It is used to input the data into the driver controller.
- Driver Controller: It controls the Acceleration and Deceleration of the vehicle.
- Power Converter: It consists of PWM generator and H-Bridge with Regenerative Braking. The Drive Cycle Acceleration and Deceleration commands are given to PWM generator and PWM generator generates PWM signal whicg is given to H-Bridge which is used to drive the DC Motor.
- Battery: It indicates the charge and discharge condition and the % SOC (State of Charge) variations with respect to the drive cycle.
- Motor: It generates the required power to propel the vehicle.
- Vehicle Body: It indicates the mechanical structure of an EV with Gear and Tyres.
SIMULINK MODEL:

The simulink Model of Electric Rickshaw is constructed using 4 blocks:
1. Vehicle Body Subsystem
2. Motor & Motor Controller
3.Battery Pack Subsystem
4.Driver Subsystem
1. Vehicle Body Subsystem:

The Vehicle Body Subsystem consists of Vehicle Body, Magic Tire and Simple gear. The Vehicle body consists of Vehicle Mass, Aerodynamic Drag Coefficient, Number of wheels per axle, Frontal Area, Air Density and Center of Gravity.
1.1 VEHICLE BODY:

Input Ports:
W = Wind Velocity in m/s
beta = Grade angle in Radians
Output ports:
V = Velocity in m/s
NR = Normal force on Rear Axle (N)
NF = Normal Force on Front Axle (N)
- The Vehicle Body Represents a two-axle vehicle body in longitudinal motion. The block accounts for body mass, aerodynamic drag, road incline, and weight distribution between axles due to acceleration and road profile.
- The vehicle can have the same or a different number of wheels on each axle. Optionally include pitch and suspension dynamics or additional variable mass and inertia. The vehicle does not move vertically relative to the ground.
- Connection H is the mechanical translational conserving port associated with the horizontal motion of the vehicle body. The resulting traction motion developed by tires should be connected to this port.
- Connections V, NF, and NR are physical signal output ports for vehicle velocity and front and rear normal wheel forces, respectively. Wheel forces are considered positive if acting downwards.
- Connections W and beta are physical signal input ports corresponding to headwind speed and road inclination angle, respectively. If variable mass is modeled, the physical signal input ports CG and M are exposed.
- CG accepts a two- element vector representing the x and y distance offsets from vehicle CG to additional load mass CG. M represents the additional mass. If both variable mass and pitch dynamics are included, the physical signal port J accepts the inertia of the additional mass about its own CG.
- The Motor output is connected to the gear and Gera output is connected to the Rear Axle since the E-Rickshaw is Rear wheel driven.



1.2 TIRE (MAGIC FORMULA):

-
Represents the longitudinal behavior of a highway tire characterized by the tire Magic Formula. The block is built from Tire-Road Interaction (Magic Formula) and Simscape Foundation Library Wheel and Axle blocks. Optionally, the effects of tire inertia, stiffness, and damping can be included.
-
Connection A is the mechanical rotational conserving port for the wheel axle. Connection H is the mechanical translational conserving port for the wheel hub through which the thrust developed by the tire is applied to the vehicle. Connection N is a physical signal input port that applies the normal force acting on the tire.
-
The force is considered positive if it acts downwards. Connection S is a physical signal output port that reports the tire slip. Optionally expose physical signal port M by setting Parameterize by to Physical signal Magic Formula coefficients. Physical signal port M accepts a four element vector corresponding to the B, C, D, and E Magic Formula coefficients.
- The Vehicle is Rear Driven 2 wheels per axle (3Wheels).



1.3 SIMPLE GEAR:

-
Simple Gear represents a fixed-ratio gear or gear box. No inertia or compliance is modeled in this block. Simple Gear is used to connect the Motor output to Vehicle Rear Axle. It Transfers the Motor Output Power to the wheels.
-
Conserving Ports:
B = port associated with an input shaft (motor shaft)
F = port associated with the output shaft (axle/ differential)
-
Gear ratio and output direction are modified. Meshing loss is kept constant and gear is having a constant efficiency throughout the simulation.
-
Viscous losses and faults are kept at default conditions.
2. MOTOR & MOTOR CONTROLLER SUBSYTEM (With Temperature Sensor):

The Motor Controller has input of Acceleration and Deceleration Command from driver block. Controlled Voltage Source are used to connect the Acceleration and deceleration to Controlled PWM voltage and H-Bridge Brake. The voltage source converts the signal from driver block into electrical signal. The PWM generates the PWM gate signal at 5000Hz whih is given to H-bridge. The H-Brige acts as motor controller which opeartes in 4 quadrant to control the speed of DC Motor. The H-Bridge output +ve terminal is connected to +ve terminal of DC Motor and -ve terminal of H-bridge, DC Motor PWM are grounded by using Electrical Reference. An Ideal Rotational Motion Sensor is used to measure the Motor RPM. The Motor Output is connected to Vehicle Body Subsystem through Simple Gear. The PWM +ve termonal is connected to the battery pack subsytem through Current Sensor. Voltage Sensor is used to measure the Voltage of Motor and Motor Voltage and Current are multiplied to calculate motor power. The H-Bridge and DC Motor block has temperature port which measures the temperature of the Controller and Motor during its operation. A Temperature Sensor is used to measure the temperature and these temperature is converted from Kelvin to Degree Celsius by subtracting 273.15 from the temperature sensor output.
2.1 DC MOTOR:

- This block represents the electrical and torque characteristics of a DC motor.
- The block assumes that no electromagnetic energy is lost, and hence the back-emf and torque constants have the same numerical value when in SI units. Motor parameters can either be specified directly, or derived from no-load speed and stall torque.
- If no information is available on armature inductance, this parameter can be set to some small non-zero value.When a positive current flows from the electrical + to - ports, a positive torque acts from the mechanical C to R ports. Motor torque direction can be changed by altering the sign of the back-emf or torque constants.
- + = Electrical signal to the motor Positive Terminal
- - = Electrical signal to the motor Negative Terminal
- R = Casing of the Motor connected with the Mechanical Rotational Reference Block
- C = Rotor Case connected to the Mechanical Rotational reference
- The DC Motor parameters are 48V, 10KW, Rated Speed 2800RPM. All other parameters are kept default.

Temperature Parameters of DC Motor:


Thermal mass of the electrical winding, is defined as the energy required to raise the temperature by one degree.The Initial temperature of motor is considered as 298.15K (25 Degree Celsius).
2.2 H-BRIDGE:

The H-Bridge is used to control the Speed of DC Motor depending upon the PWM signal received from Controlled PWM. The H-Bridge input ports has PWM signal, Reference signal, REV and Braking. The H-Bridge has setting that during Braking it can regenerate the energy through regenerative braking and charge the battery pack.
The H-Bridge has 5V PWM signal amplitude input from PWM Generator and it generates 48V DC Supply at ouptut which is connected to DC Motor.





- If the REV port voltage is greater than the Reverse threshold voltage, then the output voltage polarity is reversed.
- If the BRK port voltage is greater than the Braking threshold voltage, then the output terminals are short-circuited via one bridge arm in series with the parallel combination of a second bridge arm and a freewheeling diode.
- Voltages at ports PWM, REV and BRK are defined relative to the REF port. If exposing the power supply connections, the block only supports PWM mode.
2.3 CONTROLLED PWM VOLTAGE:

- This block creates a Pulse-Width Modulated (PWM) voltage across the PWM and REF ports. The output voltage is zero when the pulse is low, and is equal to the Output voltage amplitude parameter when high.
- The Duty cycle is adjusted as per the input received from Driver Block ie Drive Cycle.
- At time zero, the pulse is initialized as high unless the duty cycle is set to zero or the Pulse delay time is greater than zero.The Simulation mode can be set to PWM or Averaged.
- In PWM mode, the output is a PWM signal. In Averaged mode, the output is constant with value equal to the averaged PWM signal.
- The PWM frequency is set to 5000Hz.
- At +ref Acceleration command from Drive Cycle is connected and at -ref Deceleration command from Drive Cycle is connected.
- PWM and REF are directly connected to H-Bridge. Rest of the parametrs are kept default.



2.4 TEMPERATURE SENSOR:

- The Temperature Sensor block represents an ideal temperature sensor, that is, a device that determines the temperature differential measured between two points without drawing any heat.
- Connections A and B are thermal conserving ports that connect to the two points where temperature is being monitored. Port T is a physical signal port that outputs the temperature differential value
- .The block positive direction is from port A to port B. The measured temperature is determined as T = TA – TB.
2.5 CONTROLLED VOLTAGE SOURCE:

- The Controlled Voltage Source block converts a Simulink input signal into an equivalent voltage source.
- In steady state, the Simulink input must be connected to a signal that begins the simulation as a sinusoidal or DC waveform that corresponds to the initial values.
- In above model, 2 Controlled Voltage Source blocks are used, the positive terminal is connceted to the positive reference terminal of the Controlled PWM Voltage block and the negative terminal is connected to the Common Ground.
- -Negative terminal is connected to the Input Port 1which indicates the Acceleration.
- The other block, the positive terminal is connected to the Break Port of H-Bridge block and the negative terminal is connected to the common ground.Physical port is connected to the Input Port 2 which indicates the Deceleration.
2.6 CURRENT SENSOR:

- The Current Sensor is used to measure or sense the current flowing through any device. The Current source is connected in series between 2 blocks.
- The positive and the negative terminals are connected between the H-Bridge and the DC Motor. Connection I is the physical signal output port for the measurement of result current.
2.7 VOLTAGE SENSOR:

- The Voltage Sensor block indicates an ideal voltage sensor,i.e., a device that converts voltage measured across the motor into a physical signal proportional to the voltage.
- The positive and the negative ports are technical conserving ports through which the sensor is connected to the circuit.V port is the physical signal port that measures the result of voltage across the motor.
2.8 PS-SIMULINK CONVERTER:

- The PS-Simulink Convereter is used to convert the input Physical Signal to a Simulink output signal. When Simscape Blocks are used the ouput of these blocks cannot be directly connected to the simulink blocks.
2.9 Electrical Reference:

- The Electrical Reference block represents an electrical ground.
- Electrical conserving ports of all the blocks that are directly connected to ground must be connected to an Electrical Reference block.
3. BATTERY PACK SUBSYSTEM:

The Battery Pack subsystem consists of battery block, controlled controlled source, Power gui Block and Bus selector. the Controlled Current Source receives signal from H-Bridge which is cuurent and these block is connecetd to battery.
3.1 BATTERY:

-
The Battery block Implements a generic battery model for most popular battery types.
-
The Battery Nominal Voltage is 48V and its Ah capacity is 153.54Ah. The Battery total capacity is 7.3KWh. The Initial SOC of Battery is set to 100%.
- The SOC of battery is calculated by using Coulomb Counting Method.


3.2 CONTROLLED CURRENT SOURCE:

- The Controlled Current Souce block represents an Ideal Current Source that is powerful enough to maintain the specified current through it regardless of the voltage accross the source.
- This block is connected across the Battery.
3.3 BUS SELECTOR:

- This block accepts a bus as input which can be created from a Bus Creator, Bus Selector or a block that defines its output using a bus object.
-
The left listbox shows the elements in the input bus. Use the Select button to select the output elements. The right listbox shows the selections.
-
By using the Up, Down, or Remove button to reorder the selections. Check 'Output as virtual bus' to output a single bus.

3.4 POWER GUI BLOCK:

- The powergui block allows you to choose one of these methods to solve your circuit.
- Continuous, which uses a variable-step solver from Simulink.
- Discretization of the electrical system for a solution at fixed time steps.Continuous or discrete phasor solution.
4. DRIVER BLOCK:

4.1 DRIVE CYCLE SOURCE:

The Drive Cycle Source generates a standard or user-specified longitudinal drive cycle. A drive cycle is typically represented by a series of data points which plots vehicle speed against time. Driving cycles are produced to assess the performance of vehicles in various ways, including fuel consumption and pollutant emissions. In EV drive cycle is used to find out the Energy Consumption, Range.
1. WLTP CLASS 2:

2. Urban Dynamometer Driving Schedule (UDDS):
The EPA Urban Dynamometer Driving Schedule (UDDS) is commonly called the "LA4" or "the city test" and represents city driving conditions. It is used for light duty vehicle testing. The Drive Cycle max speed is 90kmph and is run for 1369seconds. The distance covered is 11.98km ~12km.
4.2 LONGITUDINAL DRIVER:

- The longitudinal Driver is an inbuilt block provided by the powertrain blocks.
- It is a parametric longitudinal speed tracking controller for generating normalized Acceleration and Braking commands based on reference and feedback velocities,
- The VelFdbk port corresponds to the feedback velocity. The actual velocity output given by the vehicle body is connected here. By comparing the actual (feedback) velocity with the reference velocity, the driver block generates acceleration and braking signals in order to minimise the error between the two concerned velocities.
- Grade corresponds to the grade angle. For this simulation, no inclination is considered and hence, a constant block with value 0 is connected.
- Info gives the output for the bus signal for different block calculations like the difference in reference vehicle speed and vehicle speed, etc.
- AccelCmd & DecelCmd correspond to the acceleration and deceleration commands generated respectively and are connected to the corresponding ports of the Controlled PWM Voltage block Here, the selected control type is Pl. Accordingly, the block implements proportional-integral (PI) control with tracking windup and feed-forward gains.

4.3 MULTIPORT SWITCH:

The Multiport Switch determines which of several inputs to the block passes to the output. The block passes this based on the decision of value of the first input. The first input port is the control input and the remaining inputs are the data inputs.
5. DISTANCE CALCULATOR SUBSYSTEM:

The Feedback velocity fromm Vehicle body block is integrated and divided by 3600 to get the distance covered by vehicle in Km. The Drive Cycle and Vehicle Feedback Velocity is compares and is displayed in Scope.
6. ENERGY CONSUMPTION:

The above subsystem helps to determine the Energy Consumption (Wh/km) approximately. The Motor Power is given as input and a gain block which refers to Inverter and converter efficiency is integrated. The Value found is in Joules so it is futher divided by 3.6*10^6 to convert Joules to KWH. The KWH is divided by Drive Cycle Distance Distance Covered in one cycle to get Wh/Km Consumption.
SIMULATION RESULTS:
Case 1: WLTP Class 2 Drive cycle
a. Drive Cylce Plot

- The above graph compares the Drive Cycle speed with actual vehicle speed.
- The Yellow graph represents Drive cycle and blue graph represents Actual Vehice Velocity.
- The actual vehicle velocity follows 90% of the drive cycle velocity. The Motor used is 10KW so the maxx speed the Vehicle acheives is 62kmph.
b. Battery SOC Plot:

- The above graph represents the Battery State of Charge(SOC).
- The SOC is at 100% at the start of simulation and is reduced to 87.99% after 1477seconds.
- The battery SOC increases when brakes are applied due to regenerative braking.
c. Battery Current plot:

- The above plot shows the battery current variation wrt vehicle speed. The battery Ah is 153Ah and at higher speed the battery discharges at 200A and when vehicle speeed is below 50kmph the battery discharges at less than 1C.
d. Battery Voltage plot:

- The above plot shows the battery voltage variation. The battery Nominal voltage is 48V and at 100% SOC it is 55.87V .
- At the end of drive cycle the Voltage is reduced to 51.91V.
e. Temperature and Energy Consumption Plot:

- The first plot shows the Motor Controller Temeprature graph. The initial temperature of Motor controller is 25°C and after running for one drive cycle the temperature has increased to 65°C.
- The 2nd plot shows the Motor Temperature graph. The initial temperature of Motor is 25°C and after running for one drive cycle the temperature has increased to 56°C.
- The 3rd plot shows the energy consumed by battery. The energy consumption is near to 1000W.

For WLTP Class 2 Drive Cycle the Vehicle has covered a distance of 14.11km in 1477 seconds and the max velocity acheieved is 62kmph. The Wh/Km Consumption is 59.16. The SOC has dropped to 87.99% from 100%.
Case 2: UDDS Drive Cycle
a. Drive Cycle Plot

- The above graph compares the Drive Cycle speed with actual vehicle speed.
- The Yellow graph represents Drive cycle and blue graph represents Actual Vehice Velocity.
- The actual vehicle velocity follows more than 90% of the drive cycle velocity. The max velocity acheieved is 62kmph and the drive cycle max speed is 90kmph.
b. Battery SOC Plot:

- The above graph represents the Battery State of Charge(SOC).
- The SOC is reduced to 89.56% from 100% after completion of one drive cycle. The increase in SOC refers to charging of battery.
c. Battery Current plot:

- The positive current indicates that battery is discharging and negative current indicates the battery is charging. At start of the drive cycle the Battery discharges at 250A since motor is consuming more power to propel the vehicle from rest position.
d. Battery Voltage plot:

- The above plot shows the variation of battery voltage wrt to vehicle speed.
e. Temperature and Energy Consumption Plot:

- The first graph shows the temperature plot of Motor Controller ie H-Bridge. The initial temperature is 25°C and after one driving cycle the temperature has rised to 86°C.
- The 2nd plot shows the Motor Temperature graph. The initial temperature of Motor is 25°C and the temperature has increased to 72°C.
- The 3rd plot shows the energy consumed by battery. The energy consumption is near to 800W.

For UDDS Drive Cycle the Vehicle has covered a distance of 12.15km in 1369seconds and the max velocity acheieved is 62kmph. The Wh/Km Consumption is 68.28. The SOC has dropped to 89.56% from 100%.
Case 3: For Travelling 100Km at constant speed of 45kmph.
Here a WOT drive cycle is selected to apply constant speed of 45kmph.
By using formula `Speed = (Distance)/(Time)` the time required is calculated.
Converting Speed and Distance to SI Unit.
Speed = `45*(5/18)` = 12.5m/sec
Distance = 100*1000 = 100000m
Time = `100000/12.5` = 8000seconds.


a. Drive Cycle Plot:

- The Vehicle Speed follows the Reference Speed at 45kmph constant speed. The drive cycle is run for 8100seconds to cover a distance of 100km.
b. Battery SOC Plot:

- The SOC Plot is decreasing linearly as the vehicle is going at constant velocity of 45kmph. The SOC has reduced to 28.74%.
c. Battery Current plot:

- The Battery current consumption is high ieabove 250A since at start motor draws large amount of current and once the vehicle speed settles at 45kmph the battery discharges at constant current of 50A. Since no brakes are applied during first 8000seconds the current stays at 50A. At end of drive cycle when speed is reduced from 45kmph to 0kmph at that instant the current is in negative direction as regenerative braking occurs.
d. Temperature and Energy Consumption Plot:

- The first plot shows the motor controller H-Bridge temperature graph. The Initial temperature is 25°C and the temperature has risen to above 120°C.
- The 2nd plot reprensts the DC Motor operating temperature. The temperature has risen to 110°C from 25°C.
- The Energy consumption for the drive cycle is 5.5KW.

When vehicle runs at constant speed of 45kmph for 8100seconds it covers a distance of 100.1Km and SOC is reduced to 28.74% and Wh/Km consumption is 44.8.
Comparison of Results of 3 Drive Cycles:

CONCLUSION:
- A Simulink Model of E-Rickshaw is built by using PM brushed type motor and Speed of vehicle is compared with different drive cycles to find max velocity, Distance Covered SOC Remaining, Energy Consumption.
- Also the temperature of Motor Controller and Motor is measured.
- The temperature of Motor Controller and Motor is high since in above model no cooling method is used but in Real World vehicle cooling technique is used such as air cooled to keep the temperature of Motor and its Controller under limit so temperature will not increase as it has incresed in above simulink model.
- Vehicle is runned at constant speed of 45kmph to travel 100Km and its Energy Consumption, Motor Controller Temperature and Motor Temperature are measured.