Electric Rickshaw modelling
AIM:
Create a detailed MATLAB model of an electric rickshaw (three-wheeler passenger vehicle) as per details below:
Rear wheels driven by PM brushed type motor
Assume efficiency points of motor controller and motor
Make an excel sheet of all input and assumed data
ABSTRACT:
In this project, we are going to build the MATLAB model of the ELECTRIC RICKSHAW by using a PM brushed type DC motor and a suitable Lithium-Ion battery for the motor. Before that, we will know about what is Electric RICKSHAW, how it's works and the benefits of EV RICKHAE. Then we make an actual EV RICKSHAW model in SIMULINK with suitable blocks from the powertrain block set. My main motto is to check "how my RICKSHAW performs for any three standard driving cycles showing energy consumption, the temperature rise of motor and controller for vehicle cover around 100 km at constant speed driving 45 kmph. Made a comparison with Mahindra e-RICKSHAW and my Simulink model.
OBJECTIVE:
- To make the simple and low run-time vehicle model using the individual component model.
- To check out performance parameters: Speed, SOC, current, the temperature of motor and H-bridge, etc. with various drive cycles.
- To play with Motor power, vehicle body (Rolling resistance, Air drag, weight) inputs.
- To know the MATLAB model and their configuration to match with the actual vehicle.
METHODOLOGY:
- The electric vehicle consists of a battery, motors, and controller then it generates propulsion power.
- To design any vehicle 1st we have to calculate propulsion power, then the motor is selected.
- Lastly based on the motor rating or operating range and no km/charge we want to depend on everything battery capacity and then battery capacity is selected.
- So the Design flow of vehicle engineer has to be like the following:
1) Identify what amount of propulsion power required.
2) What is the best suitable motor for that propulsion power.
3) Then type of battery and range of battery according to the range.
THEORY:
Electric rickshaws (also known as electric tuk-tuks or e-rickshaws or toto or e-tricycles) have been becoming more popular in some cities since 2008 as an alternative to the auto-rickshaws and pulled rickshaws because of their low fuel cost, and less human effort compared to pulled rickshaws. They are being widely accepted as an alternative to petrol, diesel, CNG auto-rickshaws. They are three-wheelers powered by an Electric motor ranging from 650 to 1400 Watts. They are mostly manufactured in India and China, only a few other countries manufacture these vehicles. Battery-run rickshaws could be a low-emitter complimentary transport for the low-income people, who suffer most from a lack of transport facility if introduced in a systematic manner according to experts.
Design and Construction:
These rickshaws have an M.S(Mild Steel) tubular chassis, consisting of three wheels with a differential mechanism at the rear wheels. The motor is a brushless DC motor manufactured mostly in India and China. The electrical system used in the Indian version is 48V and in Bangladesh is 60V. The body design from the most popular Chinese version is of very thin iron or aluminum sheets. Vehicles made in fiber are also popular because of their strength and durability, resulting in low maintenance, especially in India. The body design is varied from load carriers, passenger vehicles with no roof, to full body with windshield for drivers comfort. It consists of a controller unit. They are sold on the basis of voltage supplied and current output, also the number of MOSFET (metal oxide field-effect transistors) used. The battery used is mostly a lead-acid battery with life of 6–12 months. Deep cycle batteries designed for electric vehicles are rarely used. The weight of the electric car has also been a recurring design difficulty in them.
Below shows the methods followed throughout:

The basic design of E-rickshaw:

PROCEDURE:
1) Identify what amount of propulsion power required
2) What is the best suitable motor for that propulsion power.
3) Then type of battery and range of battery according to the range.
Why we should be required to calculate 1st propulsion power?
The final outcome of the vehicle is propulsion power and therefore the start point should be what is propulsion power on the calculation of proper power, therefore, the study must begin with an estimation of propulsion power.
Why we should Disgne 1st instead of directly build the model of EV?
This mathematical model must be build before making an actual hardware design so this model offers great flexibility in conceptual design modification. For example, If I changed the components, you can do it easily in a mathematical model rather than in actual mode and check its parameters.
This model gives the performance idea with reasonable accuracy and avoided repetitive road tests. Models are very helpful in many situations can be realized safely only in analysis and calculation i.e .. thermal.
Yes, there are limitations of mathematical models also it is really difficult to implement all the aspects involves so those models are with certain assumptions with certain inaccuracies. But more and more aspects you covered the more and more benefit and accuracy will get.
* Now we start to design the model from zero like from Wheel, vehicle body, then we get to the motor, battery and it will be full powertrain.
so we divided our model into some part as below:
1) Wheel and vehicle body (mechanical part).
2) Electric system.
3) Battery System and SOC.
4) Controller.
5) Inputs.
Wheel and vehicle body:
For wheel and vehicle body we have to consider the following parameters
Force acting on the vehicle- 1) To bring the vehicle to accelerate. 2) To maintain that speed.
Where, 1) ψ">ψ= Angle
2) fte">fte= tractive force.
3) frr">frr= Rolling resistance force.
4) fad">fad= Airo dynamic drag force.
5) fhc">fhc= Hill climbing force.
In the above fig.
fte=frr+Fad+Fhc+ae≤rationforce">fte=frr+Fad+Fhc+ae≤rationforcefte=frr+Fad+Fhc+ae≤rationforce
Tow type of acceleration force is their linear acceleration force and angular acceleration force.
Rolling resistance force -
The rolling resistance can be expressed by the generic equation
Fr = c W (1)
where
Fr = rolling resistance or rolling friction (N, lbf)
c = rolling resistance coefficient - dimensionless (coefficient of rolling friction - CRF)
W = m ag
= normal force - or Weight - of the body (N, lbf)
m = mass of body (kg, lb)
ag = acceleration of gravity (9.81 m/s2, 32.174 ft/s2)
Note that the rolling resistance coefficient - c - is influenced by different variables like wheel design, rolling surface, wheel dimensions and more.
The rolling resistance can alternatively be expressed as
Fr = cl W / r (2)
where
cl = rolling resistance coefficient - dimension length (coefficient of rolling friction) (mm, in)
r = radius of wheel (mm, in)
Some typical rolling coefficients:

Aerodynamic drag force:
This force considers the shape drag and skin friction basically for doby of vehicle
This force function of the frontal area, shape, side mirror, ducts, air passage, etc.
fad=12⋅ρ⋅A⋅Cd⋅v2">fad=12⋅ρ⋅A⋅Cd⋅v2fad=12⋅ρ⋅A⋅Cd⋅v2
Where ρ">ρρ= Air density.
A =Frontal area.
Cd= drag coefficient
V= velocity m/s
Hill climbing force:
`F_(hc)=m_(g)
This force Is also represented by using gradeability. Gradeability can overcome by vehicle constant speed. There are two ways 1) degree 2) percentage
The power output by the car's engine goes into the force-directed up the slope. This force is actually static friction exerted on the drive wheels by the road - the road exerts this force F because the engine causes the drive wheels to rotate.
By considering all parameters we can know the design of the vehicle body and Wheel of the rickshaw.
Body:
Wheel:

So we selected the following block for tire and vehicle body:
In the above body and tire model following blocks are used:
1) 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.
A is the mechanical rotational conserving port for the wheel axle
H is the mechanical translational conserving port for the wheel hub through which the thrust developed by the tire is applied to the vehicle.
N is a physical signal input port that applies the normal force acting on the tire.
S is a physical signal output port that reports the tire slip.
So this is a car we need 4 wheel and this tire ports connected to the appropriate signal as mention above.
Following parameters considered for tire:



Now we just take the default values to check how they perform but we can take parameters of the currently existing rickshaws.
2) 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.
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.
V, NF, and NR are physical signal output ports for vehicle velocity and front and rear normal wheel forces, respectively.
W and beta are physical signal input ports corresponding to headwind speed and road inclination angle, respectively.
Following parameters considered for vehicle body:


PS constant:
This block creates a physical signal constant:
y = constant
The Constant parameter accepts both positive and negative values. The block output is a physical signal port.
This PS constant is connected to the Vehicle body port W and delt for we can change the value of angel and wind velocity but we kept this value now zero.

Gear Box:
The block represents an ideal, non-planetary, fixed gear ratio gearbox. The gearbox is characterized by its only parameter, Gear ratio, which can be positive or negative. Connections S and O are mechanical rotational conserving ports associated with the box input and output shaft, respectively. The gear ratio is determined as the ratio of the input shaft angular velocity to that of the output shaft. The block generates torque in a positive direction if a positive torque is applied to the input shaft and the ratio is assigned a positive value.

Electric system:
Depending upon the tractive force, Environmental conditions, type of vehicle application we choose the motor for the vehicle. For that motor, we will decide the controller
In Electric system Included the Motor, H-Bridge, controlled PWM voltage.
As per our Aim, we using the PM brushed DC motor and for that motor, we used DC to Dc converter which is H-bridge. Following is my Electric model used in this EV model:
To build this model we used the following blocks and parameters changed in it:
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 the 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.
Following parameters, we used for this Ev model:
Mechanical consideration:
Temperature Dependence:
Thermal consideration:
Thermal Port:
The block has an optional thermal port, hidden by default. To expose the thermal port, right-click the block in your model, and then from the context menu select Simscape > Block choices > Show thermal port. This action displays the thermal port H on the block icon, and exposes the Temperature Dependence and Thermal Port parameters.
Use the thermal port to simulate the effects of copper resistance losses that convert electrical power to heat. For more information on using thermal ports and on the Temperature Dependence and Thermal Port parameter.
Thermal sensor:
This block measures temperature in a thermal network. There is no heat flow through the sensor. The physical signal port T reports the temperature difference across the sensor. The measurement is positive when the temperature at port A is greater than the temperature at port B.
DC motor with controller:

H-bridge:
This block represents an H-bridge motor drive. The block can be driven by the Controlled PWM Voltage block in PWM or Averaged mode. In PWM mode, the motor is powered if the PWM port voltage is above the Enable threshold voltage. In Averaged mode, the PWM port voltage divided by the PWM signal amplitude parameter defines the ratio of the on-time to the PWM period. Using this ratio and assumptions about the load, the block applies an average voltage to the load that achieves the correct average load current. The Simulation mode parameter value must be the same for the Controlled PWM Voltage and H-Bridge blocks.
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.
The following parameters are selected for H-bridge:

Thermal Port:
The block has an optional thermal port, hidden by default. To expose the thermal port, right-click the block in your model, and then from the context menu select Simscape > Block choices > Show thermal port. This action displays the thermal port H on the block icon, and adds the Temperature Dependence and Thermal Port parameters. These parameters are described further on this reference page.
When the thermal port is visible:
- The heat generated by the bridge on-resistance and freewheeling diodes is added to the thermal port. The thermal port has an associated thermal mass and initial temperature that you can set from the Thermal Port parameters.
- The bridge on-resistance and freewheeling diode resistance become functions of temperature. You can define the values for these resistances and the second measurement temperature from the Temperature Dependence parameters. Resistance is assumed to vary linearly between the two measurement temperatures. Extrapolation is used for temperatures outside of this range, except for when simulating in averaged mode with discontinuous load current characteristics.

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 set by the input value. Right-click the block and select Simscape-Block choices to switch between electrical +ref/-ref ports and PS input u to specify the input value. 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 a value equal to the averaged PWM signal.
Electrical input ports — The block calculates the duty cycle based on the reference voltage across its ref+ and ref- ports. This modeling variant is the default.
PS input — Specify the duty cycle value directly by using an input physical signal port.
Following parameters used in Controlled PWM voltage:



Controlled voltage source:
The block represents an ideal voltage source that is powerful enough to maintain the specified voltage at its output regardless of the current passing through it. The output voltage is V = Vs, where Vs is the numerical value presented at the physical signal port.
Electrical Reference:
Electrical reference port. A model must contain at least one electrical reference port (electrical ground).
Current sensor:
The block represents an ideal current sensor, that is, a device that converts current measured in any electrical branch into a physical signal proportional to the current.
Connections + and - are conserving electrical ports through which the sensor is inserted into the circuit. Connection I is a physical signal port that outputs the current value.
Battery System and SOC:
To need power for motor and other equipment we give battery pack. This battery pack is decided from a rating of the motor and considering another electric load. So we used a Lithium battery:

Implements a generic battery model for the most popular battery types. Temperature and aging (due to cycling) effects can be specified for Lithium-Ion battery type.
The Battery block implements a generic dynamic model that represents the most popular types of rechargeable batteries.
This figure shows the equivalent circuit that the block models.
Mathematical Model:

It consists of the 3 terminal at the input side Ta- Abmiaoint temperature output is the m- Output vector of signals for the battery temperature, state-of-charge, current, voltage, age, maximum capacity, and the ambient temperature and Conserving- + terminal and - terminal.
Battery Parameters:

Powergui:
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
The powergui block also opens tools for steady-state and simulation results analysis and for advanced parameter design.
You need the powergui block to simulate any Simulink model containing Simscape™ Electrical™ Specialized Power Systems blocks. It stores the equivalent Simulink circuit that represents the state-space equations of the model.
When using one powergui block in a model:
- Place the powerguiblock in the top-level diagram for optimal performance.
- Make sure that the block is named powergui.
(SOC) the state of charge estimator:
This estimator includes the above block which explained below:
Rate Transition: Handle data transfer between different rates and tasks.
Gain: Element-wise gain (y = K.*u) or matrix gain (y = K*u or y = u*K). Where we used an 60v battery so our formula is like 1/60*3600)
Discrete-time Integrator: Discrete-time integration or accumulation of the input signal.
Scope: to get the result of SOC, Current.
PS Simulink converter: Converts the input Physical Signal to a Simulink output signal.
Controller:
A PID control for electric vehicles subject to input armature voltage and angular velocity signal constraints is proposed. A PID controller for a vehicle DC motor with a separately excited field winding considering the field current constant was tuned using a controlled invariant set and multiparametric programming concepts to consider the physical motor constraints as angular velocity and input armature voltage. Additionally, the integral of the error, derivative of the error constraints, and were considered in the proposed algorithm as tuning parameters to analyze the DC motor dynamic behaviors. The results showed that the proposed algorithm can be used to generate control actions taking into account the armature voltage and angular velocity limits. Also, results demonstrate that a controller subject to constraints can improve the electric vehicle DC motor dynamic; and at the same time, it protects the motor from overvoltage.

PID controller:

This block implements continuous- and discrete-time PID control algorithms and includes advanced features such as anti-windup, external reset, and signal tracking. You can tune the PID gains automatically using the 'Tune...' button (requires Simulink Control Design).

Saturation:
Limit input signal to the upper and lower saturation values.

We used two saturation one for Acceleration and one for deacceleration.
Inputs:
For the Control and input of hole EV model, we give input which is Drive cycle, Signal Bilder, WOT, etc.

For the selection of these Inputs, we used multiple switches:
Pass through the input signals corresponding to the truncated value of the first input. The inputs are numbered from top to bottom (or left to right). The first input port is the control port. The other input ports are data ports.
CASES:
1) Run the model on default values and get the result.
2) Run the model on FTP75 drive cycle and get the result.
2.1) Run the model with the same Drive cycle default PID gain values and get the result.
2.2) Run the model with the same Drive cycle but new tuned PID gain values and get the result.
2.3) Run the model with the same Drive cycle but new modified PID gain values and get the result.
3) Run the model on WOT and get the result.
4) We want around 100km distance with Constance speed of 45kmph.
4.1) Run the model on only change in the input for the above condition and get the result.
4.2) Run the model on changing all parameters like a battery, Motor parameters, etc.
CASE ONE: Run the model on default values and get the result.
When we run the model on default value consider all default values are which I already uploaded above report.
MODEL WITH DEFAULT VALUES:
Only PID gain values are changed for proper output should follow the input drive cycle:

For this, we are using the FTP75 drive cycle as an input:

Run the model for simulation time 2474sec and get the result:
All comparison of reference speed(red), the Output speed (blue)of the rickshaw, motor speed(black), and gear Speed(brown):
In this graph, we get the reference speed(red), the Output speed (blue)of the rickshaw, motor speed(black), and gear Speed(brown).
As we saw in the result we can check the my all graph is following the reference path as we required.
State of charge result:

For this PID gain values and all other parameters like gear ratio, motor parameters, controller frequency, body mass, etc. our battery sustained great you can see in the graph around 84% battery capacity is available.
After the simulation run for time 2474 model cover the distance of around 4.931km.

The temperature of motor:

Controller Temperature:

Comparison between Gear speed and motor speed:

As we saw in the above comparison we can say that our motor and gear is following the input drive cycle and as our gear ratio is '5' so our motor maximum speed is 420rpm and gear speed is around 84rpm.
CASE 2:
2) Run the model on the FTP75 drive cycle and get the result.
2.1) Run the model with the same Drive cycle default PID gain values and get the result.
2.2) Run the model with the same Drive cycle but new tuned PID gain values and get the result.
2.3) Run the model with the same Drive cycle but new modified PID gain values and get the result.
As we already run the model on FTP75 and got the result now we will run the model on Different PID gain values.
2.1) Run the model with the same Drive cycle default PID gain values and get the result.
In this model we are using the PID values are P=1, I=2, D=0 and run the model and input drive cycle is same as above and all other parameters are also the same.
PID Gain value:
For this, we are using the FTP75 drive cycle as an input:
Run the model for simulation time 2474sec and get the result:
In this graph, we get the reference speed, Output speed of the rickshaw, motor speed, and gear Speed.
As we saw in the result we can check the my all graph is following the reference path as we required.
state of charge (SOC) result:
After the simulation run for time 2474 model cover the distance of around 4.937km
The temperature of motor:

Controller Temperature:

Comparison between Gear speed and motor speed:

As we saw in the above comparison we can say that our motor and gear are following the input drive cycle and as our gear ratio is '5' so our motor maximum speed is 420rpm and gear speed is around 84rpm.
For this PID gain values and all other parameters like gear ratio, motor parameters, controller frequency, body mass, etc. our battery sustained great you can see in the graph around 84% battery capacity is available.
2.2) Run the model with the same Drive cycle but new tuned PID gain values and get the result.
In this model we are using the PID gain values are tuned and run the model and the input drive cycle is the same as above and all other parameters are also the same.
PID Gain value:

RESULT:
In this graph, we get the reference speed, Output speed of the rickshaw, motor speed, and gear Speed.
As we saw in the result we can check the my all graph is following the reference path as we required.
state of charge (SOC) result:

After the simulation run for time 2474 model cover the distance of around 4.937km
The temperature of motor:

Controller Temperature:

Comparison between Gear speed and motor speed:

As we saw in the above comparison we can say that our motor and gear are following the input drive cycle and as our gear ratio is '5' so our motor maximum speed is 420rpm and gear speed is around 84rpm.
For this PID gain values and all other parameters like gear ratio, motor parameters, controller frequency, body mass, etc. our battery sustained great you can see in the graph around 80% battery capacity is available.
2.3) Run the model with the same Drive cycle but new modified PID gain values and get the result.
In this model we are using the PID gain values are assumed and run the model and the input drive cycle is the same as above and all other parameters are also the same.
PID Gain value:

RESULT:
In this graph, we get the reference speed, Output speed of the rickshaw, motor speed, and gear Speed.
As we saw in the result we can check the my all graph is following the reference path as we required.
state of charge (SOC) result:
After the simulation run for time 2474 model cover the distance of around 4.937km
The temperature of motor:

Controller Temperature:

Comparison between Gear speed and motor speed:

As we saw in the above comparison we can say that our motor and gear are following the input drive cycle and as our gear ratio is '5' so our motor maximum speed is 420rpm and gear speed is around 84rpm.
For this PID gain values and all other parameters like gear ratio, motor parameters, controller frequency, body mass, etc. our battery sustained great you can see in the graph around 81% battery capacity is available.
In this graph, we get the reference speed, Output speed of the rickshaw, motor speed, and gear Speed.
Conclusion:
|
Sr. |
P |
I |
D |
SOC |
Top Speed |
Max current |
Distance |
Motor Temp. |
Controller Temp. |
Result |
|
1 |
1 |
1 |
0 |
84 |
25 |
810 |
8.937 |
355.5 |
298 |
Following ref. |
|
2 |
0.100108 |
0.51014 |
0.92347 |
80 |
25.5 |
752 |
4.937 |
384.5 |
298.1 |
Following ref. |
|
3 |
0.910010 |
0.95101 |
0.72347 |
81 |
25.4 |
565.5 |
4.937 |
355 |
298.19 |
Following ref. |
CASE 3:
3) Run the model on WOT and get the result.
As we run the model on the FTP75 input and get them all results for different PID gain values. but now we were being run the model for input wide open throttle (WOT) and check how our model behaves and get the result for WOT input with tuned PID gain value and desirable other parameters.
wide open throttle (WOT):
wide-open throttle (WOT), also called full throttle, is the fully opened state of throttle on an engine (internal combustion engine or steam engine). In an Electric vehicle, WOT condition refers to the initial acceleration or time taken by the vehicle to reach maximum velocity. The maximum velocity in WOT conditions can be obtained by the electric motor characteristics of an electric vehicle.
A model with WOT input and simulation time is 60sec
WOT:

Result:

SOC:

Controller Temperature:

The temperature of motor:

After the simulation run for time 2474 model cover a distance of around 0.1185 km
CASE 4:
We want around 100km distance with Constance speed of 45kmph.
4.1) Run the model on only change in the input for the above condition and get the result.
For requirement meet, we are going to run the model for WOT but this time we give the top speed and second by calculation. By calculation, we get that the top speed is 12.5 mps and the second required is 28600 from this value we will get our requirement 100km distance with Constance speed of 45kmph.
WOT Block:

PID gain value:

Result:

SOC:

motor temperature:

Controller temperature:

After the simulation run for time 28605 model cover a distance of around 99.31 km.

As we can see in SOC, the battery charge only in a reduced manner and it is in negative also that show that battery capacity has to increase. In practical battery may be burned for this condition.
4.2) Run the model on changing all parameters like a battery, Motor parameters, etc.
As we saw in the above result battery SOC is vary the poor so we are going to change the battery capacity 60 to 300 and as per that we also change the motor parameters also.
WOT:
battery parameters:


result:

SOC:
After the simulation run for time 28605 model cover a distance of around 99.31 km.

motor temperature:

As we increase the capacity of the battery and run the motor for simulation time so the motor temperature increases so much and it is very dangerous.
Controller temperature:

Conclusion:
From all the above cases, we understand that whatever be the input we have to set proper PID gain values for proper OUTPUT and also motor load, battery capacity is also important.