Challenge

Final Project: Design of an Electric Vehicle

Aim:

To Create a MATLAB model of an Electric car.

Objectives:

1. System level configurations

2. Model parameters

3. Results

4. Conclusion

Software used:

  • MATLAB R2020a - Simulink

Bolck Diagram of an EV:

In the designed EV main 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 drive cycle is introduced to to make the designed vehicle to give the output how it reacts to the drive cycle. The main object to design the EV is to obtain the speed by the driver, to estimate the state 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.

MATLAB Model of an Electric car:

Initially the current flows the to DC Motor from the battery through the DC-DC power converter to drive the motor. The required voltage will controlled in the controller. The Controller will fallow 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 compair and controlled.

Model parameters:

Motor & Control system:

Motor:

Motor type: 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.

TheMotor controller will get input from the longitudinal driver. Its tasks are to control the speed of the motor and drive according to the input of the driver. Majorly motor controlled we designed had two main parts named PWM voltage generator and H-Bridge.

Input1 is getting from the accelmd of a longitudinal driver and it is given to a controlled voltage source block where it is input to the controlled PWM voltage. Controlled PWM voltage will generate a PWM signal in such a way that H-bridge will generate the required voltage to operate the DC motor for the given driver input. PWM voltage block negative reference and REF are grounded and REF of H-bridge respectively. H-bridge is a motor controller that has IGBT components aligned in the shae of H and will operate only two at a time respectively to the input of the signal from the PWM block. When decelaration occur this H-bridge will give an output from the positive and negative terminals of it. These negative & positive terminals are later connected to the DC motor and battery. All these components are the simscape electrical components so they need a connection to the solver configuration block which helps to solve the simulation.

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 80AH capacity.

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

The battery has a positive and vegative terminal which is given the voltage-controlled source where the battey consumption is controlled by the motor controller and then it is given to the SOC block.

State of charge:

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 present and the entire system is shown below.

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.

Drive Cycle:

Drive cycle is assumed as the driver's input of a vehicle, it replaced how a driver will drive a vehicle. These drive cycles are standard drive cycle 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 WOT, FTP75 etc., Here in this model I have used FTP 75 Drive Cycle source.

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.

Driver Controller:

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.

Drive cycle is connected to a longitudinal driver, it has six ports namely nelocity reference, velocity feedback, grade, info, Acceleration, Deceleration.

VelRef is given by the drive cycle data and VelFdbk is given by the output of the motor. These two will get compare and the acceleration or deceleration output will be given to the motor controller. Accelcmd is given the PWM generator block and deccelcmd is given to the regenerative port of the h-bridge which uses to generate regenerative braking. Info is used to get any other data from a longitudinal driver block. The grade is to give the input of gradeability to the driver block. This block helps to generate regerate the driver's conditions of the vehicle using the driver cycle block.

  • I used default parameters and control type PI

Controlled PWM Voltage 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. 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.

Power Converter:

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.

Vehicle Body & Transmission:

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 Front wheel drive transmission system.

The gear output is given to axels of front tires, in the circute it is shown that gear is connected to front wheels and front tires are connected to rear tires, thus vehicle moves forward. N is the normal force caused by the tires and it is given to the vehicle body normal force port. The vehicle body has an H-Hub, S- Tire slip, N- Normal force, A- axel connection, wind velocity, inclination angle. The tires hub is connected as a common node to the vehicle body. The vehicle body wind velocity is connected to a constant block and the beta-inclination angle is connected to another constsnt block where we can assign wind velocity and inclination angle as per requirement. Velocity is the output port where we can get at which speed the vehicle is moving. The velocity is taken out to the get the distance travelled and stse of charge.

Results:

Distance Travelled:

The distance obtained for a given FTP75 drive cycle with 80Ah battery capacity is able to cover 11.14 km distance.

State of charge:

The state of charge represents the battery capacity left for the vehicle and it is showed by the below graph.

Speed travelled:

The speed travelled by the vehicle is shown in orange line ans the actual reference drive cycle is in the blue line.

From the obtained vehicle speed performance we can conclude that vehicle has attend its maximum speed and there is a delay in the deceleration and the acceleration.

Conclusion:

Hence, The Electric vehicle is created by MATLAB Simulink.

EV has obtained an output according to the FTP75 drive cycle and it can tested for any drive cycle by selecting in the drive cycle block. It has travelled 11.14km by the present 80AH battery capacit if we increase the battery capacity to higher levels we can travel more distance but in the real time this should be done by considering the space and cost.

7 comments
  1. 17fe1a0273 Sai Sudheer NeelamCan we connect a solar panel to the system and will we get the same results as of this. If so , then how to configure those parameters of the solar panel.
  2. Gannoji Srikanth CharyYes, we can also use solar panel too. we can use photovoltaic array block from the simulink library and will specify the Irradiance and temperature parameters.
  3. 17fe1a0273 Sai Sudheer NeelamOkay thank you.
  4. Hubert GtCan you please explain which blocks did you use in SOC subsystem?
  5. Sanjay Ksir, can u pls explain backward facing model and forward facing model of an EV ? is there any sources to design both models . can u pls provide any reference sir?
  6. Swapnil SarwadeI have problem in SOC modelling , can u send matlab stimulation file
  7. Nickcan i get this final model files? thank you
Your portfolio, next

Ship work like this
in your own course.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.