Design of an Electric Rickshaw using MATLAB and Simulink
Desig of Electric Rickshaw using MATLAB and Simulink
Simulink model

Design details
1. Drive cycles

Three drive cycles have been taken FTP75, WOT(60kmph) and WOT(80kmph) all three inputs are fed to the system through multipoint switch
2. Power contoller

Parameters
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. If exposing the power supply connections, the block only supports PWM mode.



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.



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.
3. Motor and Transmission

Permanent Magnet 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.



Gear Box

The block represents an ideal, non-planetary, fixed gear ratio gear box. The gear box 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 positive direction if a positive torque is applied to the input shaft and the ratio is assigned a positive value.

4. Vehicle Dynamics

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.


Tyres

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.



5. SOC

Battery (Lithium-ion)

Implements a generic battery model for most popular battery types. Temperature and aging (due to cycling) effects can be specified for Lithium-Ion battery type.


Powergui

Set simulation type, simulation parameters, and preferences.

6. PID Controller

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

the parameters such as gains of PID controller are tunned using PID tunner tool

Saturation

Limit input signal to the upper and lower saturation values.

Results
FTP75
Input speed vs Vehicle speed




WOT 0-60kmph




WOT 0-80kmph




| Parameters | FTP75(2474sec) | WOT 0-60kmph | WOT 0-80kmph |
| Acceleration in sec | 15 | 18 | |
| Contoller Temp in degree celsius at the end of cycle | 26 | 26 | 26 |
| Motor Temp in degree celsius at the end of cycle | 61.85 | 27.6 | 29.35 |
| %SOC at the end of cycle | 82 | 99.6 | 99.4 |
Observations and conclusions
An EV is designed, through Simulink using necessary blocks and the model has been simulated for FTP75 drive cycle and Speed test using WOT for 0 to 60kmph and 0 to 80kmph.
My motor is powerfull enough to drive 300kg vehicle and it easily reached my calculated top speed and the range of my vehicle is 150kms at single charge.
My battery pack deliverys enough voltage to drive the motor and I also observed that the battery is more efficient, just 1% of battery is consumed to reach the top speed of 80kmph.
PID controller is used drive the vehicle where the gains of the PID are tunned so that we have better respose and to reduce overshoot.
In order to say a vehicle to be well designed one, it should have less drag force, i.e, it has tobe designed aerodymaically, as speed is increased by two times then the drag force will be increased by four times.
This is a major disadvantage for aerospace and automobile sectors as the drag force increases with increasing speed, fuel and battery consumption will be high to achieve desired speed and to overcome the drag force acting on them. This could affect the efficiency of the vehicle. Hence the design has to be done with respect to reducing the frontal cross-sectional area by adopting cutting edge technology.
Different fluid medium offers various drag co-efficient to the object, if the drag co-efficient is less then the resistant force or drag force acting on the body is lower and the body is said to be aerodynamically or hydrodynamically well designed.