Final Project: Electric Rickshaw modelling
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
Make an excel sheet of all input and assumed data
Electric Rickshaw:
- Electric Rickshaws are eco-friendly battery-operated three-wheelers that have a better economy and lower operational cum maintenance costs. These e-rickshaws does not emit toxic pollutants into the air during operation and hence, does not have any tailpipe. These vehicles have gained popularity amongst Indian rickshaw drivers and commuters.
HOW ELECTRIC-RICKSHAW WORKS:
- E Rickshaw in India are built over tubular chassis, the body is kept light in weight to increase the life and performance of the battery. The main electronic components which make the powertrain are motor, controller, harness, batteries and the throttle. Any mismatch among any of these components is undesirable and may compromise vehicle performance.
- The chassis is the main part which ensures drive quality and safety of the vehicle. It is made of mild steel. These days, most of the locally-made chassis are often built without proper design, leading to an imbalance in the drive, and often causing the vehicle to pivot or topple very easily. The chassis manufactured by a professional E Rickshaw Manufacturer is robust as the design adheres to all quality / technical parameters, which are often ignored by others. The chassis, if inaccurately made, will have handling problems, will be damaged easily, and corrode if not treated for resisting certain chemicals (from the battery or otherwise) or moisture.
- The low weight of a body is desirable, which can be achieved with good product design, quality check, using materials such as F.R.P, aluminium, composite materials, and low-density metals. A very good alternative is F.R.P which is strong, non-conducting, cheap, lightweight, highly durable, resistant to fire, withstands weather and is easily repaired in case of damage. The body is attached to chassis by bolts, and in some cases welded, which is not recommended. The body should be built keeping in mind the quality and design which is aerodynamic and ensures driver safety. Better quality bodies last for years whereas low-quality body will last no longer than 10 to 15 months. In this case, F.R.P is extremely desirable since the life of the body runs in multiple decades. Electrical parts are recommended to be tight, use high-quality couplers to ensure proper connection and insulate connection to prevent water and moisture.
- Usage of high quality electrical components will lower resistance and heat losses and increase efficiency.
- The motor power used in most e rickshaws is 650W to 1250W, the latest government norms allow it to be 650W, most of them run on 850W and higher, which adversely affects the battery life. The controller used is ~ 40A, 48V output, uses 14, 18 or 24 MOSFETs and powers all electric components.
- A good quality controller must be used to increase the performance of the motor and other overheating issues. A controller should be installed with electrical brake cut off, and which usually are removed by common rickshaw mechanics in order to achieve a continuous torque or improper functioning of the brakes.
- The braking system is mechanical drum brakes. Service and maintenance are required for proper vehicle functioning as the improper brake adjustments may heat up the motor and controllers and damage brake shoes. It may also reduce the mileage of the vehicle.
- The batteries used in e rickshaws are lead acid as they provide low-cost alternative. They range from 80A to 120A nowadays. A larger battery with more capacity can be used, but adversely it can increase weight and reduce mileage. To prevent it, the ratio of weight and AH (measure of battery capacity) must be maintained, so we recommend to use not more than 110AH batteries as they exceed 125 kgs. Deep discharge batteries made for electric vehicles may be used depending on the customer’s preference. To maintain long life, a low amperage charger ~10 to 15A should be used, a charger with current and voltage maintained is preferred to prevent bulging and higher cycles.
- Every aspect of an electric vehicle, if engineered, designed and manufactured with quality will improve battery life, vehicle life and contribute to a higher profit over time.
BLOCK DIAGRAM OF ELECTRIC RICKSHAW:

- The key components of electric vehicles are the motor, vehicle body, controller, and battery pack. There are several types of motors used in Electric Vehicles. BLDC motors, Brushed DC motors, and AC Induction Motors are commonly used electric motors.
- The vehicle body includes a gearbox, and tires. Earlier, we used the battery just to start the engine.
- But now we are using the battery as a working power. Combinations of cells will create a module, and many modules will form a battery pack together.
- The motor needs a power supply from the battery to perform operations. Suppose we connect the battery pack directly to the motor. In that case, the motor will run at a rated speed, and speed control is not possible.
- We can control the speed of the motor with the aid of the controller. The controller will operate by taking input from the driver.
SIMULINK MODEL BLOCK OF ELECTRIC RICKSHAW:
Vehicle Body:
- The Vehicle Body block represents a two-axle vehicle body in longitudinal motion. The vehicle can have the same or a different number of wheels on each axle. For example, two wheels on the front axle and one wheel on the rear axle. The vehicle wheels are assumed identical in size. The vehicle can also have a center of gravity (CG) that is at or below the plane of travel.
- The block accounts for body mass, aerodynamic drag, road incline, and weight distribution between axles due to acceleration and road profile. Optionally include pitch and suspension dynamics. The vehicle does not move vertically relative to the ground.
- The block has an option to include an externally-defined mass and an externally-defined inertia. The mass, inertia, and center of gravity of the vehicle body can vary over the course of simulation in response to system changes.

Input Ports of Vehicle Body:
W — Headwind speed, m/s:
- Physical signal input port for headwind speed.
beta — Road incline angle, rad:
- Physical signal input port for road incline angle.
CG — Center of gravity, m:
- Physical signal input port for the center of gravity, in m, of the externally-defined mass relative to the CG of the vehicle body.
M — Mass, kg:
- Physical signal input port for the mass, in kg, of the externally-defined mass.
J — External moment of inertia, kg*m^2:
- Physical signal input port for the moment of inertia, in kg*m^2, of the externally-defined mass.
Output Ports of Vehicle Body:
V — Longitudinal velocity, m/s:
- Physical signal output port for vehicle longitudinal velocity.
NF — Front axle normal force, N:
- Physical signal output port for normal force on the front axle. Wheel forces are considered positive if acting downwards.
NR — Rear axle normal force, N:
- Physical signal output port for normal force on the rear axle. Wheel forces are considered positive if acting downwards.
Conserving Ports of Vehicle Body:
H — Horizontal motion:
- Conserving port associated with the horizontal motion of the vehicle body. Connect tire traction motion to this port.
Vehicle Body Parameters Values given Below:


Tire (Magic Formula):
- Tire with longitudinal behavior given by Magic Formula coefficients.
- The Tire (Magic Formula) block models a tire with longitudinal behavior given by the Magic Formula [1], an empirical equation based on four fitting coefficients. The block can model tire dynamics under constant or variable pavement conditions.
- The longitudinal direction of the tire is the same as its direction of motion as it rolls on pavement. This block is a structural component based on the Tire block.
- To increase the fidelity of the tire model, you can specify properties such as tire compliance, inertia, and rolling resistance. However, these properties increase the complexity of the tire model and can slow down simulation. Consider ignoring tire compliance and inertia if simulating the model in real time or if preparing the model for hardware-in-the-loop (HIL) simulation.

Input Ports of Tire (Magic Formula):
N — Normal force:
- Physical signal input port associated with the normal force acting on the tire. The normal force is positive if it acts downward on the tire, pressing it against the pavement.
M — Magic formula coefficients:
- Physical signal input port associated with the Magic Formula coefficients. Provide the Magic Formula coefficients as a four-element vector, specified in the order [B, C, D, E].
Output Ports of Tire (Magic Formula):
S — Slip:
- Physical signal output port associated with the relative slip between the tire and road.
Conserving Ports of Tire (Magic Formula):
A — Axle:
- Mechanical rotational port associated with the axle that the tire sits on.
H — Hub:
- Mechanical translational port associated with the wheel hub that transmits the thrust generated by the tire to the remainder of the vehicle.
Tire (Magic Formula) Parameters Values given Below:

Inertia:
Ideal mechanical rotational inertia
T=J*dω/dt
where:
-
T is inertia torque.
-
J is inertia.
-
ω is angular velocity.
-
t is time.
- By default, the block has one mechanical translational conserving port. The block positive direction is from its port to the reference point. This means that the inertia torque is positive if inertia is accelerated in the positive direction.
- In some applications, it is customary to display inertia in series with other elements in the block diagram layout. To support this use case, the Number of graphical ports parameter lets you display a second port on the opposite side of the block icon. The two-port variant is purely graphical: the two ports have the same angular velocity, so the block functions exactly the same whether it has one or two ports. The block icon changes depending on the value of the Number of graphical ports parameter.

Conserving Ports of Inertia:
I — Port that connects inertia to the circuit:
- Mechanical rotational conserving port that connects the inertia to the physical network.
J — Second graphical port:
- Second mechanical rotational conserving port that lets you connect the inertia in series with other elements in the block diagram. This port is rigidly connected to port I, therefore the difference between the one-port and two-port block representations is purely graphical.
Inertia Parameters Values given Below:

Simple Gear:
- Simple gear of base and follower wheels with adjustable gear ratio, friction losses, and triggered faults.
- The Simple Gear block represents a gearbox that constrains the connected driveline axes of the base gear, B, and the follower gear, F, to corotate with a fixed ratio that you specify. You choose whether the follower axis rotates in the same or opposite direction as the base axis. If they rotate in the same direction, the angular velocity of the follower, ωF, and the angular velocity of the base, ωB, have the same sign. If they rotate in opposite directions, ωF and ωB have opposite signs.

Simple Gear Parameters Values given Below:

DC Motor:
- DC motor model with electrical and torque characteristics and fault modeling.
- The DC Motor block represents the electrical and torque characteristics of a DC motor using the following equivalent circuit model:

- You specify the equivalent circuit parameters for this model when you set the Model parameterization parameter to
By equivalent circuit parameters. The resistor R corresponds to the resistance you specify in the Armature resistance parameter. The inductor L corresponds to the inductance you specify in the Armature inductance parameter.

Conserving Ports of DC Motor:
+ — Positive terminal:
- Electrical conserving port associated with the DC motor positive terminal.
- — Negative terminal:
- Electrical conserving port associated with the DC motor negative terminal.
C — Motor case:
- Mechanical rotational conserving port associated with the DC motor case.
R — Motor rotor:
- Mechanical rotational conserving port associated with the DC motor rotor.
F+ — Positive field:
- Electrical conserving port associated with the positive field winding.
F- — Negative field:
- Electrical conserving port associated with the negative field winding.
H — 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.
DC Motor Parameters Values given Below:




Mechanical Rotational Reference:
- This block represents a mechanical rotational reference point, that is, a frame or a ground. Use it to connect mechanical rotational ports that are rigidly affixed to the frame (ground).

Temperature 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.

Thermal Reference:
- This block represents a reference point in a thermal network where the temperature is equal to absolute zero.

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 current value.

H-Bridge:
- The H-Bridge block represents an H-bridge motor driver. The block has the following two Simulation mode options:
-
PWM— The H-Bridge block output is a controlled voltage that depends on the input signal at the PWM port. If the input signal has a value greater than the Enable threshold voltage parameter value, the H-Bridge block output is on and has a value equal to the value of the Output voltage amplitude parameter. If it has a value less than the Enable threshold voltage parameter value, the block maintains the load circuit using one of the following three Freewheeling mode options:-
Via one semiconductor switch and one freewheeling diode -
Via two freewheeling diodes -
Via two semiconductor switches and one freewheeling diode
The first and third options are sometimes referred to as synchronous operation.
The signal at the REV port determines the polarity of the output. If the value of the signal at the REV port is less than the value of the Reverse threshold voltage parameter, the output has positive polarity; otherwise, it has negative polarity.
-
-
Averaged— This mode has two Load current characteristics options:-
Smoothed -
Unsmoothed or discontinuous
The
Smoothedoption assumes that the current is practically continuous due to load inductance. In this case, the H-Bridge block output is:VOVPWMAPWM−IOUTRON
where:
-
VO is the value of the Output voltage amplitude parameter.
-
VPWM is the value of the voltage at the PWM port.
-
APWM is the value of the PWM signal amplitude parameter.
-
IOUT is the value of the output current.
-
RON is the Bridge on resistance parameter.
-

Conserving Ports of H-Bridge:
+ — Positive load connection port:
- Electrical conserving port associated with the positive load connection.
- — Negative load connection port:
- Electrical conserving port associated with the negative load connection.
V+ — Positive supply connection:
- Electrical conserving port associated with the positive electrical supply connection.
V- — Negative supply connection:
- Electrical conserving port associated with the negative electrical supply connection.
PWM — Pulse-width modulated signal:
- Electrical conserving port associated with the pulse-width modulated signal. The voltage is defined relative to the REF port.
REF — Reference:
- Electrical conserving port associated with the floating zero volt reference.
REV — REV:
- Electrical conserving port associated with the voltage that controls when to reverse the polarity of the H-Bridge block output. The voltage is defined relative to the REF port.
BRK — BRK:
- Electrical conserving port associated with the voltage that controls when to short circuit the H-Bridge block output. The voltage is defined relative to the REF port.
H — 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.
H-Bridge Parameters Values given Below:





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. 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 value equal to the averaged PWM signal.

Controlled PWM Voltage Parameters Values given Below:



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.

Solver Configuration:
- Each physical network represented by a connected Simscape™ block diagram requires solver settings information for simulation. The Solver Configuration block specifies the solver parameters that your model needs before you can begin simulation.
- Each topologically distinct Simscape block diagram requires exactly one Solver Configuration block to be connected to it.

Electrical Reference:
- Electrical reference port. A model must contain at least one electrical reference port (electrical ground).

Simulink-PS Converter:
- The unit expression in 'Input signal unit' parameter is associated with the Simulink input signal and determines the unit assigned to the Physical Signal.

Longitudinal Driver:
- The Longitudinal Driver block implements a longitudinal speed-tracking controller. Based on reference and feedback velocities, the block generates normalized acceleration and braking commands that can vary from 0 through 1. You can use the block to model the dynamic response of a driver or to generate the commands necessary to track a longitudinal drive cycle.

Input Ports of Longitudinal Drier:
VelRef — Reference vehicle velocity:
- Reference velocity, vref, in m/s.
VelFdbk — Longitudinal vehicle velocity:
- Longitudinal vehicle velocity, U, in the vehicle-fixed frame, in m/s.
Grade — Road grade angle:
- Road grade angle, θ or γ, in deg.
Output Ports of Longitudinal Drier:
Info — Bus signal
AccelCmd — Commanded vehicle acceleration:
- Commanded vehicle acceleration, yacc, normalized from 0 through 1.
DecelCmd — Commanded vehicle deceleration
- Commanded vehicle deceleration, ydec, normalized from 0 through 1.
Longitudinal Driver Parameters Values given Below:

Battery:

- The Battery block implements a generic dynamic model that represents most popular types of rechargeable batteries.
- This figure shows the equivalent circuit that the block models.

- To represent the temperature effects of the lithium-ion battery type an additional discharge curve at ambient temperature which is different from the nominal temperature and the thermal response parameters are required.
Battery Parameters Values given Below:

Controlled current Source:
- Converts the Simulink input signal into an equivalent current source. The generated current is driven by the input signal of the block.
- You can initialize your circuit with a specific AC or DC current. If you want to start the simulation in steady-state, the block input must be connected to a signal starting as a sinusoidal or DC waveform corresponding to the initial values.

Vehicle Body Transmission system:

- As we know transmission is the main part of the vehicle which is used to supply the propulsion powers from the motor and the battery to the wheels.under transmission the number of components comes which are wheels,gearbox,throttle,power input etc.
- In this transmission system blocks used are Tire and vvehicle Body. There are 3 tire blocks used as 3 wheels of the rickshaw and here we have connected the gearrbox with the rear wheel to make it a rear wheel drive.
- The vehicle body block is been connected to these wheels by all thee input and output ports.In vehicle body block we have connected as ps constant block to beta and wind velocity as we have assumed both as zreo and hub motor port is also connected with the wheels H port.
DC Motor system:

- The Dc motor output terminals are connected in other parameters R terminal is connected in simple Gear system block Input terminal of the B is connected and Gear block output terminal F is connected input of the vehicle Body terminals.
- Motor C terminal is connected in Mechanical Rotational reference. Temperature Sensor block are used sensing the temperature of the Dc motor.PS-Simulink converter is used to the convert the physical signal to simulink signal and thermal reference are useing.
Motor Controller system:

- This motor controller system contains H-bridge and a Controlled PWM voltage block.H-bridge block is used to the supply power from the battery to the dc motor.H-bridge has 4 switches that give the controlled DC voltage supply to the DC motor and we can also control the supply of voltage.
- Here we have enabled the thermal output of the H-bridge controller to get the temperature output of the controller while the vehicle is in motion.In H-Bridge we have control on PWM voltage Reverse and Braking effect also.
- As below we can see block parameters, for simulation mode we have two options internal and external as we choose internally we have a choice of PWM mode and averaged mode.
- In PWM mode the simulation time increases drastically as if the simulation time is of 5secs then PWM mode is effective but as now our simulation time is in mins or hours so here averaged mode is been chosen as it is faster compared to PWM mode.
- Also we have to change the output voltage amplitude to the voltage we have supplied to the DC motor.As from the controlled PWM vlotage block which is connected to the input PWM pin in the H-bridge block.
- This block will apply pulses and based on these pulses from the fixed battery voltage variable output voltage will be available to the motor torque are changed.
- so basically this subsystem will control the power supply to the DC motor using the following blocks.
Steps for enabling thermal output of H-Bridge:
- First select the block and right click on the block we will get multiple options from which we have to select simscape block choices show thermal port.

SOC Calculation:
- here in this subsystem there is the number of blocks used are rate transition gain, constant,sum,Discrete time integrator,etc.
- rate transition block takes input from the controlled current source block as soc input signals and do a sampling of the signals and gives to gain block.
- gain block multiplies the sampling signal with the rated voltage and gives it to the Discrete-time integrator block.Discrete-time integrator block integrates the signal and adds it to the constant given and supply is to the gain block again.
- Gain block multiplies it with the 100 and gives it to the SOC output.

Battery pack system:
- Here we have used a lithium-ion battery block to give the current and voltage supply to the rickshaw.A controlled current source block is used so that there is no excessive load on the battery if there is achange in speed or torque value.
- we have a bus selector block that takes the battery performance and gives us its SOC state current Discharge and voltage supplied by the dattery.

Input Drive Cycle Source is FTP75:
- Generates a standard or user-specified longitudinal drive cycle. The block output is the vehicle longitudinal speed. You can import drive cycles from:
- - Predefined sources
- - Workspace variables, including arrays and time series objects
- - mat, xls, xlsx, or txt files
- Use the fault tracking parameters to identify drive cycle faults within specified speed and time tolerances.


COMPLETE SIMULINK MODEL:

OUTPUT RESULTS:
For FTP75 Drive Cycle:
- By running the vehicle with FTP75 Drive cycle for 2474 see the distance traveled is 6.874 .The gear ratio in the simple gearbox is kept at 4.

Input speed and Vehicle Speed:

- As we can see we got the velocity profile almost completely following the drive cycle data with the maximum speed reaching UP to 20km/hr.
DC Motor and H-Bridge Temperature:


- The Temperature of the moto is increased to 323.8degree celcius ,the Temperature of the controller is 356.2degree celcius with 20000 as the thermal mass given both to the motor and the H-bridge.
SOC(state of charge):
- The state of charge for the barrery drop to 22% of its 100% value for the complete drive cycle.it covered a distance of 6.874km with a 22% charge remaining in the battery charge is 78%.
