Final Project: Design of an Electric Vehicle
*MODEL FILE HAS BEEN GIVEN BELOW FOR SIMULATION AND METHODS , REUSLTS ARE GIVEN BELOW*
ELECTRIC VEHICLE – MODELLING AND SIMULATIONS
The Electric Vehicle developed by the motor, battery, controller, converters, and wheels.
The motor connected to the differential of the wheels.
In this basic configuration of EV, the four wheels are used. Two wheels are connected in the front portion called front wheel drive.
Rest of two wheels connected at the rear portion of the drive, so it is called real wheel drive.
Both the ends wheels are connected through the differential.
The differential is provided the balancing to the rear and front wheel drive system.
The differential portion represents a gear mechanism that allows the driven shaft to spin at different speeds.
The fidelity of the gear model improved by specifying the parameters of the differential gear system like gear inertia, meshing, and viscous losses.
A battery pack is used as the source of the electric vehicle model.
A lithium-ion battery fixed in the modeling of Electric Vehicle (EV) which provides input supply both the motors connected across the front and rear end of the mode

Blocks used to make EV model :
- Drive Cycle Source
- Longitudinal Driver
- Controlled Voltage Source
- Controlled PWMVoltage
- H- Bridge
- Current Sensor
- DC Motor
- Simple Gear
- 4 Tyres
- Vehicle Body
- Battery
- Controlled Current Source
Drive cycle sourse:
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.

- Determining The Drive Cycle for the engine to run for given time
- Two Drive are,
- FTP75and Wide Open Throttle (WOT)
- Where the time for running the drive cycle is 2747 sec.
- Lonitudinal Driver:(Acts as Driver of vehicle)The block generates normalized acceleration and braking commands that can vary from 0 through 1.
LONGITUDINAL DRIVER:
A parametric longitudinal speed tracking controller for generating normalized acceleration and braking commands based on reference and feedback velocities.
Use the external actions to input signals that can disable, hold, or override the closed-loop commands determined by the block. The block uses this priority for the input commands: disable, hold, override.
It is Speed Tracking Block which uses a PI controller to reduce the error between Reference velocity and output velocity and gives Accleration and brake commands to Motor through H-bridge.
All Parameters are set as default.
Grade is set as zero so, there is no gradeability in Vehicle.


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.

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.

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.
- 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. I
- f variable mass is modelled, 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.



- References:
- Electrical Reference : Gives the Nuetral Point to the electrical Circuit.
- Mechanical Rotational Reference: This Block is considered as a rigid base (ground/frame) point of mechancial body.
- Current Sensor: Sense the current taken by DC Motor and gives the feedback to Battery.
- Controlled current Source :Maintain required amount of current to flow from the battery which is sensed from current sensor
. - Controlled Voltage Source: Maintain Required amount of voltage to be maintain across DC motor which takes voltage level signal from driver.

- PWM: 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 Freewheeling diode
- H-Bridge: The H-Bridge b
- BATTERY:
- This block models a battery.
- If you select Infinite for the Battery charge capacity parameter, the block models the battery as a series internal resistance and a constant voltage source.
- If you select Finite for the Battery charge capacity parameter, the block models 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].
- SOC ESTIMATOR CIRCUIT:

- RESULT:
- VEHICLE SPEED:
- The reference speed value & feedback value of drive cycle is plotted.
We have taken drive cycle ftp75, according to that drive cycle reference the velocity command is plotted

- ACCELERATION COMMAND FROM DRIVE CYCLE:
- From the acceleration command of drive cycle, the graph is plotted.
- Here throttle input form longitudinal driver model block is taken.

- DC-MOTOR LOAD CURRENT:
- Now, as the throttle input is given, the dc motor will give machinal output, with reference to electrical input supply.
- To generate some RPM, it will require current according to load.
- The same current drawn by motor graph is plotted.

- SOC %:
- As we know, the main power source is battery for motor.
- Battery provides necessary power required by motor at every stage of propulsion.
- Now according to usage of battery, its state of charge is decreased.
- That decrease in SOC is plotted.

- DISTANCE TRAVELLED:
- 188 km
- Using the basic formula of distance and velocity , we have integration of velocity and obtained the total distance travelled in 2474 seconds.