Challenge

Final Project: Design of an Electric Vehicle

AIM: Create a MATLAB model of electric car which uses a battery and a DC motor. Choose suitable blocks from Powertrain block set. Prepare a report about your model including following:

An Electric Vehicle (EV) is a vehicle that uses one or more electric motors or traction motors for propulsion. An electric vehicle may be powered through a collector system by electricity from off-vehicle sources or may be self-contained with a battery, solar panels, fuel cells or an electric generator to convert fuel to electricity. EVs are not limited to road but rail vehicles, surface and underwater vessels, electric aircraft and electric spacecraft also.

Components of an Electric Vehicles: EVs have no need for the fuel engine. An electric powered car has three primary components - Battery, motor controller, and the electric motor.

Battery: The battery of an electric car 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 electric cars.

  • 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 car 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.

Simulink Model Of Electric Vehile:

Objectives:

  1. System level configurations & Model parameters: Here, system level component discrive. Its component, Parameters, Blocks etc.

Vehicle Body: 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

  • 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 1200 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 4 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.

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

The connection R represents the Rotor (rotational output) while the connection C is for the Casing (stationary). Thus, the R port is connected to the input of the vehicle subsystem created earlier. The C port is connected to a mechanical rotational reference. The + and - terminals of the motor are connected to the motor controller. If these terminals are directly connected to a battery, the required DC motor will run on the rated capacity of the battery. This will eventually result into no control over the DC motor and the vehicle will run at top speed throughout the simulation.Thus, a motor controller is very much needed.

H-Bridege: 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.

Block of 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 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.

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.

Block of Controlled PWM:

The PWM & REF connections are for the corresponding ports on the H-Bridge circuit. The 2 reference inputs correspond to the throttle inputs given by the driver. The block generates corresponding pulse width as per the accelerations and brakes apllied by the driver himself. Here, the PWM frequency is 1000 Hz. Also, the simulation mode is Averaged as that in the H-Bridge circuit. 0V for 0% duty cycle and 5V for 100% duty cycle. Accordingly, the output voltage amplitude becomes 5V.

Longitudinal Driver: A parametric longitudinal speed tracking controller for generating normalized acceleration and braking commands based on reference and feedback velocities.

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

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. Here, the selected drive cycle is the standard FTP75.

Battery: A battery is a source of electric power consisting of one or more electrochemical cells with external connections for powering electrical devices.

  • To model the Battery pak, a simple Battery block is used. This is because, if the generic battery block is used instead, the simulation will run for a much longer time.
  • Here, the selected option for Battery Charge Capacity is Finite. Accordingly, the block models the battery as a series internal resistance plus a charge-dependent voltage source.
  • If the chosen option had been Infinite, the voltage source would have been constant.
  • Also, the self-discharging of the battery and the battery dynaics are disabled.
  • The Battery Nominal Voltage is given as 400V.The Ampere-hour rating is assumed to be 50.
  • The rest all paramaters are left with their default values.
  • To ensure the battery supplies current as per the requirements of the motor controller and not the rated current, a Current Sensor & Controlled Current Source pair is connected.

Solver Configuration: Defines solver settings to use for simulation.

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

  • Scope Results:

First Graph is showing velocity of vehicle Which folloes the drive cycle which is just below by name of 'Multiport Switch'.

As can be seen from the above picture, the actual velocity of the vehicle differs from the reference drive cycle velocity.This is because the chosen battery capacity and motors are not able to propel the speed upto the required extent. If a battery of higher capacity is chosen, the actual velocity will tend to match with the reference velocity.Also, it may be noted that in certain regions, despite the drive cycle showing small decelerations, the vehicle actually is accelerating with decreasing magnitudes. Reason being the same.

  • This is the graph of current, which indicates the current demand by vehicle according to Drive cycle.

  • This Graph is Showing Longitudinal drivers 'Accelaration' graph which can be controlled by driver.

Distance Covered: It may be noted that, since, the reference velocity of the drive cycle never becomes negative (i.e. there is no backward motion of the vehicle), the distance is increasing throughout.The total distance covered by the vehicle is about 5.54 km.

  • 4. Conclusion: The model was succesfully ran for simulation under the standard FTP75 drive cycle. The results have been properly analyzed. how to model an EV and carry out a real time simulationhow a motor controller works and what role it plays in the control of the electric motorhow to calculate the SOC of the batterydifferent powertrain blocks provided by simulink which can be used to simulate a vehicle model.

This Model is based on few standered parameter, to calculate this in real time need to change few parameter only and add different drive cycle, wind velociy, gradient etc. By changing parameters we can create new vehicles also.

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.