Final Project: Design of an Electric Vehicle
Electric Vehicle:
Electric vehicle (EV) is defined as a vehicle that uses an electric motor for propulsion unlikely to an internal combustion (IC) engine used by conventional vehicles. Electric vehicles use electric power instead of fuels as conventional vehicles would and because of this difference, electric vehicles do not produce any exhaust gases or pollution (Zero emission).
The power needed for the operation of an EV can come from a variety of sources such as batteries, generators, or through a collector system.
Below are the main component of an EV model:
Vehicle Body
Motor nad controller
Power Converters
Batteries
Drive Cycle
Block Diagram:

Complete Vehicle Model Architecture:

Lets discuss all the sub-systems one by one:
1. Drive Cycle:

This is the input where the user defines the driver cycle and defines the behaviour of the vehicle movement for a particular time.
It can generate a standard or user-specified longitudinal drive cycle. The block output is the vehicle longitudinal speed. There aredifferent types of predefined drive cycles or can add in MATLAB workspace variables, including arrays and time series objects orspreadsheets.
In this model we have used FTP75 drive cycle.
2. Driver Controller:
The input from the drive cycle is attached to VelRef port, the feedback is gained from the vehicle body which acts as feedback signal is connected to VelFdbk. The AccelCmd & DecelCmd are the output signal given for accelerating and braking to the vehicle. A terminator block is connected to Info port as we are not using any bus signals for this model. A constant block is attached to the Grade port as road grade angle is 0 in our case, i.e the vehicle is running at a straight road.

Longitudinal driver block: It is a parametric longitudinal speed tracking controller for generating normalized acceleration andbraking commands based on reference and feedback velocities. They use the external actions to input signals that can disable,hold, or override the closed-loop commands determined by the block.
Ports:
VelRef Input port for the reference velocity signal
VelFdbk Input port for the feedback velocity signal
Grade Input port for the gradability to the vehicle (road grade angle)
AccelCmd Output port for the acceleration signal command
DecelCmd Output port for the deceleration or braking signal command
Info Bus signal for Gear, clutch, acceleration, etc.
3. Power Converters
This is the main circuit where the input signals are processed and are sent at the output. The electrical power from the battery source is converted into the mechanical output of the DC motor. It has 3 parts.


In firt part, there are two controlled voltage sources used, one takes the input signals for acceleration from the longitudinal driver's output signal and another is used for deceleration or braking.
In the second part, the circuit consists of a controller and an H-Bridge. The controlled PWM voltage block receives the input signal from the Acceleration's Controlled voltages source and generated modulated width pulses output for the H-Bridge and which is connected to the positive terminal of the block. The PWM signals are received by the H-Bridge connected to the PWM port of it. The other controlled voltage source is connected to the braking port of an H-Bridge. The reverse port is connected to the ground along with the Reference port. Here we have used selected as Average as the simulation mode to reduce the time for the overall operation.
In third part, DC motor receives the input signal from the H-Bridge and in between them is the current sensor. The rotationalmotion signal is sent as an output to the motor shaft. A mechanical rotation reference is connected at the constant port.
H-Bridge:
This block represents an H-bridge motor drive. The block can be driven by the Controlled PWM Voltage block in PWM orAveraged 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 inseries with the parallel combination of a second bridge arm and a free wheeling 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.
PWM- pulse width modulation is the method of reducing average power delivered by an electrical system by effectively chopping it up into discrete parts.
Ports:
PWM Input port for PWM voltage
REF Input port for reference PWM voltage
REV Input port for reverse signal
BRK Input port for brake signal
Parameters:
Here the power supply is keep at internal and simulation mode as Average (for less run time). Regenerative braking is enable for always.

The input thresholds are kept unchanged and in the bridge parameters, the output voltage amplitude is set to 300V and the rest of the parameters are unchanged.

Controlled PWM Source:
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.
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.

Parameters:
The PWM frequency is set to 1000 Hz and the simulation mode is set to average because it also set as same in an H-bridge.

Controlled Voltage Source:
The block represents an ideal voltage source that is powerful enough to maintain the specified voltage at its output regardless ofthe current passing through it. The output voltage is V=Vs, where Vs is the numerical value presented at the physical signal port.

The controlled voltage source block does not have any block parameters of its own. It receives input from the longitudinal driver block and gives output to H-bridge block.
DC Motor:
This block represents the electrical and torque characteristics of a DC motor. It 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. Motortorque direction can be changed by altering the sign of the back-emf or torque constants.

Parameter:
The model parameterization is set as by rated power and rated speed & no-load speed. The rated DC supply voltage is keep as 300 V which is same as H-bridge's output amplitude voltage. The speed values of the motor at no-load and rated speed is 8000 rpm and 5000 rpmsimantenously. And the rated load is at 50 kW (it changes as per the drive cycle). The mechanical and Faults parameter are keepat default.

Battery:

Parameters:
The nominal voltage is set above the DC motor's rated supply voltage and battery charge capacity is keep infinite as there will charging will regenerative braking. Rest other parameters are the default.

Controled Current Source:
The block represents an ideal current source that is powerful enough to maintain the specified current through it regardless ofthe voltage across it. The output current is I = Is, where Is is the numerical value presented at the physical signal port.

Current Sensor:
The block represents an ideal current sensor that is, a device that converts current measured in any electrical branch into aphysical 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.

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

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

Solver Configration:
It defines the solver setting to use for simulation when there is connection between simscape blocks and simulink blocks.

4. Vehicle Body:
This subsystem represents the 4 wheeler vehicle body with the transmission.

A set of four tire block are used - two for the front axle and two for the rear axle and the required connections are made withthe vehicle body block. The normal force signal from the vehicle body block is sent to the normal force input ports of the tires.
The A ports of the tire are the mechanical rotational conserving port and receive mechanical rotational input from the gear box which receives its input from the DC motor.
The H port of the tire is the mechanical translational conserving port for the wheel hub and is connected to the H port of the vehicle body through which the trust developed by the tire is applied to the vehicle.
Here we are not considering any slip, so an terminator block is connected to all the slip port of each tire. Also, grade angle andwind velocity are not considered.
The input is received from the DC motor to the simple gear block which is then transmitted to the wheel considering the inertiacouple at the output shaft.
Vehicle Body:
The block 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.

Parameters:
The weight of the vehicle is considered as 800 kg and rest of the parameters are same as default ones.

Ports:
H It is the mechanical translation converting port associated with the horizontal motion of the vehicle body
NR Signal output port for rear normal wheel forces
NF Signal output port for front normal wheel forces
V Signal output port for vehicle velocity
Beta Signal output port for road inclination angle
W Signal output port for headwind speed
Tire (Magic Formula)
The block 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.

Parameters:
The tire is parameterized by peak longitudinal force and corresponding slip and rest of the parameters are keep as same as default.

Ports:
N Signal input port that applies the normal force acting on the tire
A It is the mechanical rotational conserving port for the wheel axle
S Signal output port that reports the tire slip
H It is the mechanical translational conserving port for the wheel hub
Simple Gear:

Parameter:
In the we have kept gear ratio as 7. The more the gear ratio the better the speed with more traction power. As torque is directly proportional to the speed. The gear ratio is high at the start of the vehicle as it requires more torque and as the speed increases, torques redues and so as the gear ratio. For our application, the range of gear ratio is from 5-10.

Ports:
B Input signal for mechanical rotational conserving port from DC motor
F Output signal for mechanical rotational conversing port after gear reduction
5. SOC (State of Charge)
This will determine the voltage level in the battery at each point of simulation. The output from the current block is received atthe input signal of the block and display the characteristic of the battery voltage consumed for the particular drive cycle.

The sub-block of the SOC contains the Rate transition block, gain block and the discrete time ingegrator. The decrease & increase of the battery voltage is have multiple data point which is handle by the rate transistor. Then this converts these data points and calculate the SOC at each point of the drive cycle. The gain block will calculate the values and display on the scope.
K = 1/(v_rated*time)
where, time is in secs, i.e. 3600 and the multiplication is element-wise.

Rate Transition:

Parameter

Discrete time integrator:
It is the accumulation of the input signals.

Parameter:

6. Output Circuit:
The output of the vehicle body is Velocity which is sent as feedback to the longitudinal driver block and is separately used to calculate the distance travelled by the vehicle through another subsystem - distance calculator.
The velocity signal is first integrated to calculate the distance and then divide by 3600 to convert the distance into km.

Result:
The simulation has run for FTP75 cycle for 2474 seconds.
Speed Trace - It is a plot of the reference speed from the drive cycle and the feedback speed from the vehicle body.
SOC (%) - It is the state of charge of the battery which decreases when the vehicle accelerated and slightly increases when thevehicle decelerates.
Distance Travelled - It is the total distance travelled by the vehicle following a particular drive cycle and its duration.
Plots:
SOC

Speed Trace (Velocity) Plot:

CONCLUSION:
1. In the speed trace (velocity) plots the drive cycles which are observed in this study, the feedback speed plot (yellow colour, PS simulink converter) and the reference speed plot (blue colour, multiport switch) overlap each other almost completely but there are regions where both the speeds are different. It is when the vehicle is decelerating.
2. The reference speed plot falls sharply but the feedback speed does not. This is due to the inertia of the vehicle body. As the inertia of the vehicle body is higher, it takes a longer duration for it to decelerate. That is why the overlapping is not 100%.
3. The battery's state of charge for each drive cycle can be visualized from the SOC plot. As long as the vehicle is accelerating the SOC is decreasing but as soon as the deceleration starts, the SOC plot goes slightly up. This is because the battery is being charged, due to regenerative braking during deceleration.