Final Project: Electric Rickshaw modelling
AIM: 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.
The electric rickshaws are powered by brushless dc motors ranging from 850-1150 watts and mostly produced either in China or India. An electric rickshaw offers a cheaper and eco-friendly transport facility. An illustration of E-rickshaw specifications given.
Software used:
MATLAB R2021a (Simulink)
Objectives:
- 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.
- Results: For any three standard driving cycles show energy consumption, temperature rise of motor and controller.
Battery: The battery of an E-Rickswaw can be charged through the use of ordinary grid electricity at a specialized power station. But aside from the conventional lithium-ion battery technologies, there are also other major battery technologies which can be used for E-Rickswaws.
- Lithium-Ion Batteries : This battery technology gives extra performance and range. However, it also carries the highest price tag. Lithium-ion batteries are lighter than Lead acid and Nickel metal. These are also the batteries used in digital cameras and smartphones.
- Lead Acid Batteries: This battery technology is the most popular. It is also the cheapest among the battery technologies. What’s good about it is it’s 97% recyclable. A lead acid battery consists of a negative electrode made of spongy or porous lead. The lead is porous to facilitate the formation and dissolution of lead. The positive electrode consists of lead oxide. Both electrodes are immersed in a electrolytic solution of sulfuric acid and water.
- Nickel Metal Hydride Batteries: This battery technology provides higher output and better performance but it costs much more than lead-acid batteries. A nickel metal hydride battery is a type of rechargeable battery. The chemical reaction at the positive electrode is similar to that of the nickel–cadmium cell, with both using nickel oxide hydroxide. However, the negative electrodes use a hydrogen-absorbing alloy instead of cadmium
Motor Controller: The motor controller of an electric e- rickshaw administers its complete operation and the distribution of its power at any given moment. It helps monitor and regulates all key performance indications such as the vehicle’s operator, motor, battery, and accelerator pedal. It has a microprocessor which can limit or redirect current. It is used to either improve the mechanical performance of the car or suit the operator’s driving style. There are also more refined controllers which are capable of greater accuracy and thus, higher efficiency.
Electric Motor: The electric vehicle controller is the electronics package that operates between the batteries and the motor to control the electric vehicle's speed and acceleration much like a carburetor does in a gasoline-powered vehicle.
Unlike a gasoline engine with lots of moving parts, a motor only has one moving part. This makes it a very reliable source of motive power. Choosing an electric motor depends on the car’s system voltage. They can be structured to use either AC or DC current. AC motors are less expensive and lighter compared to DC motors. They are also more common and they tend to suffer from less mechanical wear and tear. However, AC technology requires a more refined or sophisticated motor controller.
Steps To Design Electric Vehicle:
- First Select Drive Cycle or Create in Excel Sheet.
- Add Longitudalnal Driver Block.
- Connect Drive Cycles to "VelRef" input of Longitudinal driver.
- Connect H-Bridge in for DC Motor Control.
- This H-Bridge is connected by Controlled PWM Voltage.
- This PWM Connected to battery sourse.
- DC Motor connected by H-bridge and Vehicle Body.
- Nessesory Sensors Connected on each Component for Measurements.
Block Diagram: blocks are Battery, drive cycle, controller, DC Motor, Vehicle body & Transmission system.

Drive cycle is the input data like how a human drive his actual vehicle here FTP75, WOT & Excel (Manually Prepared in Excel sheet) drive cycles are used to make the designed vehicle to give the output how it reacts to the drive cycle. The main objective is to obtain the speed by the driver, to estimate the temperature of Motor and Controller, to estimate the sates of charge (SOC), distance travelled by the vehicle. There is a SOC block that will estimate the state of charge of a battery, distance is calculated by speed and time parameters for all the three Drive cycles.

Simulink Model of Initially the current flows to DC Motor from the battery through the DC-DC power converter to drive the motor. The required voltage will be controlled in the controller. The Controller will follow the given drive cycle reference and run the motor in the required rpm. Then the motor power is transmitted to the wheels of a vehicle through the gear box. and the controller will take the vehicle speed and compare and controlled.
Simulink Model:

Model Details:
Drive Cycle: 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
The Drive Cycle Source block is used to provide the reference speed for the simulation.It generates a standard or user-specified longitudinal drive cycle. Drive cycle is assumed as the driver's input of a vehicle, it replaced how a driver will drive a vehicle. Here I have used three drive cycles which is used to test the vehicle performances. These drive cycle will have high speed, low speed, braking conditions in it. There are different drive cycles like Signal Builder, FTP75 etc., Here in this model I have used FTP 75 & Manually prepared in excel Drive Cycle source.


Vehicle Body & Transmission: Vehicle body is the main supporting structure of a vehicle, to which all other components are attached. Truck uses a separate frame as chassis. Below is Block used to design Vehicle Body:
- Tyres
- Simple Gear
- Vehicle Body Block
- Terminators
- Constant
- Ports
Motor will produce the rotational output which will give to the vehicle body and transmission system. The rotational output is taken by the gear system here to maintain the constant speed throughout the transmission without any loss in speed from the motor to tires. Below is a diagram that is how it is how it inside the vehicle body and transmission system and in the main design, it is referred just only as a transmission system.
Here I created a Rear wheel drive transmission system.

- 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.
- This block basically represents a two-axle vehicle body in longitudinal motion. The block accounts for - body mass,aerodynamic drag,road incline,weight distribution between axles due to accelerationroad profile.
- Here, the connection H is the mechanical translational conserving port hub.
- NF & NR correspond to the output ports for nomral reaction forces on front axle and rear axle wheels respectively. Connection V represents the actual output translational velocity of the vehicle. beta is the road inclination angle & W corresponds to the headwind speed (headwind - direction opposite to that of vehicle). The gross weight is given to be 600 kg.


- Tyre: 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.
- The N port of the tire corresponds to the Normal Reaction acting on it. The A port corresponds to the Mechanical Rotational conserving port for the wheel axle. Thus both the wheels on the same axle should form a connection through their respective A ports. Connection H corresponds to the Mechanical Translational conserving port for the wheel hub through which the thrust developed by the tire is applied to the vehicle. Thus, all the 3 wheels form a connection through their respective H ports and this is in turn connected to the translational hub of the vehicle body. The connection S represents the output port for slip of the tire.
- Velocity thresold is 0.1 m/s and Rolling resistance is not taken into count. Radius is 0.3 m.

- Simple Gear: Represents a fixed-ratio gear or gear box. No inertia or compliance is modeled in this block. You can optionally include gear meshing and viscous bearing losses. Here No losses taken into count.
-
Represents a fixed-ratio gear or gear box. No inertia or compliance is modeled in this block. You can optionally include gear meshing and viscous bearing losses.Connections B (base) and F (follower) are mechanical rotational conserving ports. Specify the relation between base and follower rotation directions with the Output shaft rotates parameter. Optionally include thermal effects and expose thermal conserving port H by right-clicking on the block and selecting Simscape block choices to switch between variants.
Output shaft rotates in in same direction of input shaft.Base is connected to the Motor shaft and the follower is connected to the Rear wheel derive.


Wheels: 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.

Battery: The battery is required to power the controller and motor. The controller uses the battery power according to produce the input given by the motor to obtain maximum speed. The battery is also used to power every electrical component in the vehicle. The battery has two stage one is charging and another one is discharging state. The battery is of 75Ah capacity. The Nominal voltage of battery is 330 V & Initial SoC is of 100%. The battery as a series internal resistance plus a charge-dependent voltage source defined by:
`V = (Vnom*SoC)/(1-beta*(1-SoC))`

where SoC is the state of charge and Vnom is the nominal voltage. Coefficient beta is calculated to satisfy a user-defined data point [AH1,V1].
The battery has a positive and negative terminal which is given the voltage-controlled source where the battery consumption is controlled by the motor controller and then it is given to the SOC block.


State of charge (SoC): SoC is the percentage or level of battery presents after certain travel or consumption of battery charge by the vehicle. In the designed vehicle battery charge or SOC is calculated by the giving it to the rate transition and then to gain where 1/(nominal battery capacity) then to a discrete-time integrator and it will get minus from the 1 as it is considered a 100% of battery and it is multiplied with 100 to get percentage of battery.
The majority of blocks are simscape blocks where physical to simulink converter is used to convert the physical signal from simscape block to simulink signal.
Controller:

Controlled PWM: 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. Select Simulation mode as Averaged.




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.



- 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 enabled 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.
- Connection REF is for the reference input. This combined with the PWM connected will form the pulse input for the H-Bridge. Here, the REF input is connected to the Electrical Reference (ground).
- Connection REV corresponds to the reverse motion of the motor which essentially means, the backward motion of the vehicle.Here, the backward motion of the vehicle is not accounted for and so, the port is connected to the electrical reference.
- Connection BRK is for the braking of the vehicle.Since, the PWM mode results in a huge amount of simulation time, Averaged mode is selected for this simulation.Load current characteristics are considered to be smoothed here. Also, the regenerative braking is anabled for the simulation. This means, when the vehicle starts decelerating, corresponding amount of charge will be fed back to the battery.
- Accordingly, the BRK input is connected to a Controlled Voltage Source. This will generate emf corresponding to the intensity of brakes applied and fed the power back to the battery.
Longitudinal Driver:

- The 'VelRef' port is the reference velocity port where the input drive cycle data is fed.
- 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 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.

Solver Configuration:
- The system is ran for simulation for 2474 s which is the total time for which the input drive cycle is defined.
- A Solver Configuration is added to ensure proper solving of the mathematical equations by the model.
- Scopes are connected to analyze different outputs, the reference velocity & the actual velocity of the vehicle and the distance covered by the vehicle during the total run.
- The 2 velocities are first converted from m/s to kmph values. For this, simple Gain blocks are used.
- The distance is calculated by simply time-integration of the vehicle velocity.

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. NO faults taken into account.
Simulink provides an inbuilt bodel block for DC motor which converts electrical input into mechanical rotational output.
Note : Here, the blue colour corresponds to the electrical side of the motor and the green colour corresponds to the mechanical side.Here, the motor field type is kept as Permanent magnet and the model parameterization is done by rated load and speed. The armature inductance and the mechanical parameters are given their default values.
DC Motor Block.



Result:
- For FTP75 Drive Cycle:

Distance Tavelled by Vehicle is:

- The actual Speed is approximately followed the 90% of reference Drive cycle.
- Energy consumed by the battery is `approx 250 Wh at the end of the cycle.
- The SoC% of the battery is reduced to `approx 99%`.
- The Temperature of Motor is increased to `500 K.`
- For manul Excel sheet:

Distance Tavelled by Vehicle is:

Conclustion:
- Here I have compromised with the temperature of Motor and controller to achieve vehicle speed is near to reference speeds. Since I haven’t used any cooling system in the model. In the real time application, the motor temperature is less than 1000C.
- In the real time application, the motor, battery & controller temperature is controlled by air cooling. Hence, the temperature of this components is not increased to this extent.
- Hence, Created a MATLAB model of an Electric Rickshaw (three wheel passenger vehicle) by using Li-ion battery, PM Brushed DC Motor.
- Detremined the variations of Temperature of Motor and controller, SoC% and Energy consumed by the by vehicle for all the three Reference Drive cycles (i.e.; FTP75, WOT, Manually prepared).
- This Battery powered Rickshaw will be the most popular mode of transport in the future as can be saw from present.