Challenge

Final Project: Design of an Electric Vehicle

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:

OBJECTIVES:

  • To design an Electric Vehicle in Simulink which uses battery and a DC motor.
  • To prepare a report about the model including the following:
    • System level configurations
    • Model parameters
    • Results
    • Conclusion

THEORY

An electric vehicle (EV) is defined as a vehicle that uses an electric motor or a traction motor for propulsion as opposed to an internal combustion (IC) engine used by conventional vehicles. Electric vehicles use electricity for power instead of fossil fuels as conventional vehicles would and because of this difference, electric vehicles do not produce any exhaust gases or pollution. 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. Batteries fitted in to the body of an EV are capable of high energy densities in order for them to meet the power demands and range requirements. Generators are machines which generate electrical energy from an input of mechanical work and are a part of the electric motor, and they operate during braking to produce the phenomenon of 'regenerative braking'. Collector systems are off-vehicle systems which allow for the charging of an EV from homes or public charging stations. The electricity used for charging in these systems are generated from solar panels which can be used by the grid or by homes of EV owners so that they can charge their vehicles more conveniently. 

EVs are increasing in demand in recent years due to the need to reduce vehicle emissions which are damaging to the environment. Government incentives and private companies are working on schemes to quicken the adoption of electric vehicles. Since EVs do not produce any emissions, they are more environmentally friendly than conventional vehicles are. The generation of the electricity used to charge the vehicles also comes from solar energy (a renewable energy source) and not fossil fuels which makes them sustainable. EVs can meet the same performance standards of conventional vehicles and even surpass that of theirs and this has been seen with the automotive company Tesla. The Tesla Model 3 is the best-selling EV in the world and is capable of a range of approximately 350km on single charge. It also has an acceleration of 0 - 60 mph in 5.6 seconds and a top speed of 130 mph.

EVs offer several advantages over conventional vehicles besides the lack of pollution and lack of need to rely on fossil fuels. One is that, EVs are more efficient meaning that they offer more MPGs (miles per gallon gasoline equivalent), meaning that you will spend lesser on recharging an EV than you would to refuel a conventional vehicle. This because the more efficient the EV is, the more distance you travel with the available energy. In the US, Tesla owners can charge their EVs for free at their private charging stations for life which results in significant savings in fuel. Regenerative braking in EVs adds to their efficiency as the unused energy in braking gets reused purposefully. Another benefit is that EVs have fewer moving/rotating parts and this means lesser maintenance costs than you would have with IC engine vehicles e.g. changing oil, transmission fluid. This, in the long term would give better savings than you would get with conventional vehicles. Lesser moving parts means there is lesser friction between moving parts and hence quieter operation. 

In spite of these feats, it will be difficult for a worldwide adoption of EVs for several reasons. One reason is convenience. In order for EVs to dominate the automotive market, their needs to be more convenient ways for consumers to be able to charge their vehicles. Their needs to be several charging stations on the highways and roads and this can be supported if everyone's homes were generating solar power. It needs to be as easy to charge an EV as it is to fill an IC engine vehicle with fuel at a petrol station. Another reason is the cost of the EVs. EVs are still a relatively new technology and only account for 2-3% of the worldwide market. This is because they cost considerably more than conventional vehicles due to the high cost of batteries and electric components. But, the cost of batteries is getting cheaper over time and manufacturers are developing newer and more efficient batteries. The goal is to produce a 'million mile' battery which, if made will be a revolution in the automotive sector. Another disadvantage is that the components in EVs operate at high voltages and currents and this can be a hazard if the components explode or don't work as they should. 

A compromise between IC engine vehicles and EVs exists as Hybrid Electric Vehicles (HEVs). HEVs combine an IC engine with an electric propulsion system to produce a 'hybrid' between the two different classes of vehicles. The purpose of this is to use the power available from the electric powertrain to improve the fuel economy of the vehicle so that it does not rely solely on the petrol/diesel it uses as fuel. This in turn will also improve the overall performance of the HEV. The IC engine can be used to power the electric motor to charge the battery or use directly in the electric drive motor with a combination of a motor and generator in one. HEVs also implement regenerative braking to recharge their batteries among other features used in EVs. Compared to EVs, HEVs represent more of the automotive market with a 19% market share on all automobiles in the world. This is because HEVs still run-on fossil fuels which is still more convenient as a fuel source in most parts of the world. The all-time bestselling HEV to date is the Toyota Prius. 

In this report, I will be modelling an electric vehicle with a DC motor and battery system using the SIMULINK software. The components I will need for my model exist as blocks in the SIMULINK block library. I will be modelling this EV for a drive cycle and measure the velocity characteristics and the current and SOC characteristics of its battery system.

BLOCK DIAGRAM

                     

EV design

Today’s EVs are very different from ICE (internal combustion engine) gasoline-powered vehicles. The new breed of EVs has benefited from a series of failed attempts to design and build electric vehicles using traditional methods of production used by manufacturers for decades.

There are numerous differences in how EVs are manufactured when compared to ICE vehicles. The focus used to be on protecting the engine, but this focus has now shifted to protecting the batteries in manufacturing an EV. Automotive designers and engineers are completely rethinking the design of EVs, as well as creating new production and assembly methods to build them. They are now designing an EV from the ground up with heavy consideration to aerodynamics, weight and other energy efficiencies.

  • The single biggest modification of the car is the underbody. While this structure has been very similar in the past, with EVs there is no engine and there are no exhaust systems needed. There is an aerodynamically designed full belly pan under the EV that contains trays where the battery pack is placed. With more and more variations and shapes of battery packs available for different models, the challenge is to be able to make these variations on one Flexible Manufacturing System (FMS). Since all EV battery cells are quite heavy, flexible robotic lines are necessary.
  • In addition, FMS production lines must accommodate many new robotically performed joining methods. In many instances spot welding is being replaced by an increased use of self-piercing rivets, gluing, sealing, flow drilling, and laser welding — and are specifically chosen depending on the tray used for each particular type of battery cell.
  • The EV’s inner structure is called a “space frame” and is made of strong, lightweight aluminum — and for additional weight-savings, the wheels are also made of aluminum instead of steel. Using manufacturers molds, these aluminum parts are poured at a foundry. In addition, the steering wheel and seat frames are made of magnesium, a strong, lightweight metal. Even the body panels are made of lightweight aluminum, or an impact-resistant composite plastic. Both materials are recyclable, providing long-term disposal advantages.
  • In an effort to reduce weight, the structural frame, seat frames, wheels and body are designed for high-strength, safety — and the lightest possible weight. New configurations have been developed that provide support for the components and protection of the vehicle occupants with minimal mass and use of high-tech materials, including aluminum, magnesium and advanced composite plastics.
  • The windshield is solar glass that keeps the interior from overheating in the sun and frost from forming in winter. Materials that provide thermal conservation reduce the energy drain that heating and air conditioning impose on the batteries.
  • Some features did have to be eliminated or changed while leaving all the comforts drivers find desirable and adding new considerations as well. One feature that was removed because of space restrictions was the spare tire. This was possible because the EV tires contain a sealant to repair any leaks automatically. In addition, the tires are rubber and designed to inflate to higher pressures, so the car rolls with less resistance to conserve energy.
  • An added safety consideration was a pedestrian warning system, because EVs run so quietly that pedestrians may not hear them approach. Driver activated flashing lights and beeps warn pedestrians that the car is approaching. This system works automatically when the car is put in reverse as well.

EV battery

An electric vehicle battery (EVB) is the standard designation for batteries used to power electric motors of all types of EVs. In most cases, these are rechargeable lithium-ion batteries that are specifically designed for a high ampere-hour (or kilowatt-hour) capacity. Rechargeable batteries of lithium-ion technology are plastic housings that contain metal anodes and cathodes. Lithium-ion batteries use polymer electrolyte instead of a liquid electrolyte. High conductivity semisolid (gel) polymers form this electrolyte.

Lithium-ion EV batteries are deep-cycle batteries designed to give power over sustained periods of time. Smaller and lighter, the lithium-ion batteries are desirable because they reduce the weight of the vehicle and therefore improve its performance.

These batteries provide higher specific energy than other lithium battery types. They are typically used in applications where weight is a critical feature, such as mobile devices, radio-controlled aircraft and, now, EVs. A typical lithium-ion battery can store 150 watt-hours of electricity in a battery weighing approximately 1 kilogram.

In the last two decades advances in lithium-ion battery technology has been driven by demands from portable electronics, laptop computers, mobile phones, power tools and more. The EV industry has reaped the benefits of these advances both in performance and energy density. Unlike other battery chemistries, lithium-ion batteries can be discharged and recharged daily and at any level of charge.

There are technologies that support the creation of other types of lighter weight, reliable, cost-effective batteries — and research continues to reduce the number of batteries needed for today’s EVs. Batteries that store energy and power the electric motors have evolved into a technology of their own and are changing almost every day.

Traction system

EVs have electric motors, also referred to as the traction or propulsion system — and have metal and plastic parts that never need lubrication. The system converts electrical energy from the battery and transmits it to the drive train.

EVs can be designed with two-wheel or all-wheel propulsion, using either two or four electric motors respectively. Both direct current (DC) and alternating current (AC) motors are being used in these traction or propulsion systems for EVs. AC motors are currently more popular, because they do not use brushes and require less maintenance.

EV controller

EV motors also include a sophisticated electronics controller. This controller houses the electronics package that operates between the batteries and the electric motor to control the vehicle speed and acceleration, much like a carburetor does in a gasoline-powered vehicle. These on-board computer systems not only start the car, but also operates doors, windows, air conditioning, tire-pressure monitoring system, entertainment system, and many other features common to all cars.

The controller regulates energy flow from the battery to the motors and allows for adjustable speed. Specially designed Silicon-Controlled Rectifiers (SCRs) are used for this controller. They allow full power to go from the battery to the motor but in pulses, so the battery is not overworked, and the motors are not underpowered.

The controller transforms the battery’s direct current (DC) into alternating current (AC) and regulates the energy flow from the battery. The controller will also reverse the motor rotation — putting the vehicle in reverse — and converting the motor to generators, so that the kinetic energy of motion can be used to recharge the battery when the brake is applied.

EV brakes

Any type of brake can be used on EVs, but regenerative braking systems are preferred in electric vehicles. Regenerative braking is a process by which the motor is used as a generator to recharge the batteries when the vehicle is slowing down. These braking systems recapture some of the energy lost during braking and channel it back to the battery system.

During regenerative braking, some of the kinetic energy normally absorbed by the brakes and turned into heat is converted to electricity by the controller — and is used to re-charge the batteries. Regenerative braking not only increases the range of an electric vehicle by 5 to 10%, but it also has proven to decrease brake wear and reduce maintenance cost.

EV chargers

Two types of chargers are needed. A full-size charger for installation in a garage is needed to recharge EVs overnight, as well as a portable recharger. Portable chargers are quickly becoming standard equipment from many manufacturers. These chargers are kept in the trunk so the EVs’ batteries can be partially or completely recharged during a long trip or in an emergency like a power outage. In a future issue we will further detail the types of EV charging stations such as Level 1, Level 2 and Wireless.

Software used - MATLAB R2021b

Electric car is a vehicle that is fully or partially propelled by electric motors, using energy stored in rechargeable batteries.

  • The first practical electric cars were produced in the 1880s. Electric cars were popular late 19th century and early 20th century.
  • Innovation and advanced development in the internal combustion engines (ICE) and mass production of cheaper gasoline vehicles has led to a decline in the use of electric vehicles.
  • Different types of electric cars changed and are developed continuously giving users and potential users choices. Today the world is increasingly familiar with the terms BEV, HEV, PHEV and FCEV.

How does an electric car work?

  • When pedal of the car is pressed then, controller takes and regulates electrical energy from batteries and inverters.
  • With the controller set, the inverter then sends a certain amount of electrical energy to the motor (according to the depth of pressure on the pedal).
  • Electric motor converts electrical energy into mechanical energy. Rotation of the motor rotor rotates the transmission. So the wheels turn and then car moves.

Types of electric cars -

  1. Battery electric vehicle (BEV)
  2. Hybrid electric vehicle (HEV)
  3. Plug - in Hybrid electric vehicle (PHEV)
  4. Fuel cell electric vehicle (FCEV)

         

1. BEV - 

  • It is also called as, All - electric vehicle (AEV), runs entirely on a battery and electric drive train.
  • These types of electric cars do not have an ICE. Energy is stored in a large battery pack that is charged by plugging into the electricity grid.
  • The battery pack, in turn, provides power to one or more electric motors to run the electric car.

Architecture and components of BEV - 

    

 Components of BEV - 

  • Electric motor
  • Inverter
  • Battery
  • Control module
  • Drive train

Working principle of BEV -

  • Power is converted from DC battery to AC for the electric motor.
  • The accelerator pedal sends a signal to the controller which adjusts the vehicle speed by changing the frequency of the AC power from the inverter to the motor.
  • The motor connects and turns the wheels through a cog.
  • When the brakes are pressed or the electric car is decelerating, the motor becomes an alternator and produces power which is sent back to the battery.

Examples - Volkswagen e - Golf, Tesla model 3, BMW i3, chevy bolt, chevy spark, Nissan LEAF, Ford Focus Electric, Hyundai Ioni, Karma Revera.

2. HEV -

  • This type of hybrid cars is often called as standard hybrid or parallel hybrid.
  • HEV has both an ICE and an electric motor.
  • In this types of electric cars, internal combustion engine gets energy from fuel, while the motor gets electricity from batteries.
  • The gasoline engine and electric motor simultaneously rotate the transmission, which drives the wheels.
  • The difference between HEV compared to BEV and PHEV is where the batteries in HEV can only charge by the ICe, the motion of the wheels or a combination of both.
  • There is no charging port, so that the battery cannot be recharged from outside of the system.

Architecture and main components of HEV - 

   

Components of HEV -

  • Engine
  • Electric motor
  • Battery pack with controller and Inverter
  • Fuel tank
  • Control module

Working principle of HEV -

  • Has a fuel tank that supplies gas to the engine like a regular car.
  • It also has a set of batteries that run an electric motor. Both the engine and electric motor can turn the transmission at the same time.

Examples - Honda Civic Hybrid, Toyotas Prius Hybrid, Honda Civic Hybrid, Toyota Camry Hybrid.

3. Plug - in Hybrid Electric Vehicle (PHEV) -

  • PHEV is a type of hybrid vehicle that both an ICE and a motor, often called as series hybrid. This type of electric cars offers a choice of fuels.
  • This type of electric cars is powered by a conventional fuel (such as gasoline) or an alternative fuel (such as bio - diesel) and by a rechargeable battery pack.
  • The battery can be charged up with electricity by plugging into an electrical outlet or electric vehicle charging stations. (EVCS).
  • PHEV typically can run in at least two modes - All electric mode, in which the motor and battery provide all the car's energy.
  • Hybrid mode, in which both electricity and gasoline are employed.

       

Components of PHEV - 

  • Electric Motor
  • Engine
  • Inverter
  • Battery
  • Fuel tank
  • Control module
  • Battery charger(if onboard model)

Working principle of PHEV -

  • PHEVs typically startup in all electric mode and operate on electricity until their battery pack is depleted.
  • Some modelsshift to hybrid mode when they reach highway cruising speed, generally above 60 - 70 miles per hour.
  • Once the battery is empty, the engine takes over and the vehicle operates as a conventional, non-plug-in hybrid.
  • In addition to plugging into an outside electric power source, PHEV batteries can be charged by an combustion engine or regenerative braking.
  • During braking, the electric motor acts as generator, using the energy to charge the battery. The electric motor supplements the engine's power as a results smaller engine can be used, increasing the car's fuel efficiency without compromising performance.

Examples - Porsche Cayenne SE - hybrid, Chevy vott, Chrysler Pacifica, Ford C - max energy, Ford fusion Energi, Mercedes C350e, Mercedes S550e etc.

4.  Fuel cell Electric Vehicle (FCEV) -

  • Fuel cell electric vehicles (FCEVs), also known as fuel cell vehicles (FCVs), or zero emission vehicle, are types of electric cars that employ fuel cell technology to generate the electricity required to run the vehicle.
  • In this type of vehicles, the chemical energy of the fuel is converted directly into electric energy.

        

Components of FCEV -

  • Electric motor
  • Fuel cell stack
  • Hydrogen storage tank
  • Battery with converter and controller

Working principle of FCEV -

  • The working principle of a fuel cell electric car is different compared to that of a plug - in electric car.
  • This type of electric cars is because the FCEV generates the electricity required to run this vehicle on the vehicle itself.

Examples - Toyota Mirai, Hyundai Tuscon FCev, River simple rasa, Honda clarity fuel cell, Hyundai Nexa.

COMPONENTS OF EV VEHICLE

Electric vehicles consist of an electric motor that is powered by a battery pack. The main advantage of electric vehicles is that they emit zero emissions and are eco-friendly. They also do not consume any fossil fuels, hence use a sustainable form of energy for powering the car. The main components of electric vehicles are:

  1. Traction battery pack
  2. DC-DC Converter
  3. Electric motor
  4. Power inverter
  5. Charge Port
  6. Onboard charger
  7. Controller
  8. Auxiliary batteries
  9. Thermal system (cooling)
  10. Transmission
 

1.Traction battery pack

Traction battery pack is also known as Electric vehicle battery (EVB) . It powers the electric motors of an electric vehicle. The battery acts as an electrical storage system. It stores energy in the form DC current. The range will be higher with increasing kW of the battery. The life and operation of the battery depends on its design. The lifetime of a traction battery pack is estimated to be 200,000 miles.

2. DC-DC Converter

The traction battery pack delivers a constant voltage. But different components of the vehicle has different requirements. The DC-DC convertor distributes the output power that is coming from the battery to a required level. It also provides the voltage required to charge the auxiliary battery.

3.Electric motor

Electric traction motor is the main component of an electric vehicle. The motor converts the electrical energy into kinetic energy. This energy rotates the wheels. Electric motor is the main component that differentiates an electric car from conventional cars. An important feature of an electric motor is the regenerative braking mechanism. This mechanism slows down the vehicle by converting its kinetic energy into another form, and storing it for future use. There are basically two types of motors DC and AC motors.

4.Power Inverter

It coverts DC power from the batteries to AC power. It also converts the AC current generated during regenerative braking into DC current. This is further used to recharge the batteries. The inverter can change the speed of the

5. Charge Port

The charge port connects the electric vehicle to an external supply. It charges the battery pack. The charge port is sometimes located in the front or rear part of the vehicle

6.Onboard charger

Onboard charger is used to convert the AC supply received from the charge port to DC supply. The on-board charger is located and installed inside the car. It monitors various battery characteristics and controls the current flowing inside the battery pack.

7.Controller

Power electronics controller determines the working of an electric car. It performs the regulation of electrical energy from the batteries to the electric motors. The pedal set by the driver determines the speed of the car and frequency of variation of voltage that is input to the motor. It also controls the torque produced.

8.Auxiliary batteries

Auxiliary batteries are the source of electrical energy for the accessories in electric vehicles. In the absence of the main battery, the auxiliary batteries will continue to charge the car. It prevents the voltage drop, produced during engine start from affecting the electrical system.

 

9. Thermal system(cooling)

The thermal management system is responsible for maintaining an operating temperature for the main components of an electric vehicle such as, electric motor, controller etc. It functions during charging as well to obtain maximum performance. It uses a combination of thermoelectric cooling, forced air cooling, and liquid cooling.

10. Transmission

It is used to transfer the mechanical power from the electric motor to the wheels, through a gearbox. The advantage of electric cars is that they do not require multi-speed transmissions. The transmission efficiency should be high to avoid power loss.

  • System level configurations and   Model parameters

BLOCK DIAGRAM

The block diagram for an Electric vehicle which uses a battery and a DC motor is shown below,

   

Now let us look at each of the blocks used to create this MATLAB model.

  • Drive cycle data

For this we have used Drive cycle source block.

                       

The block parameters for this block is as shown below,

                                  

This block will help us in inputting the drive cycle data, whether it is built in or custom made by the user. That is we can use custom made drive cycle data in excel sheet using this block.

For this model we have used FTP 75 drive cycle,  which is built-in in this block.

  • Longitudinal driver

This block is used to create a longitudinal speed-tracking controller and it is based on reference and feedback velocities, the block generates normalized acceleration and braking commands that can vary from 0 through 1. We can use this block to model the dynamic response of a driver or to generate the commands necessary to track a longitudinal drive cycle.

                                

The block parameters is as shown below,

                             

  • Power control unit subsystem

This subsystem has the blocks which are used to create the voltage signals to control the motor speed as per the input drive cycle data.

                             

THE LINK SHOWS THE EV SIMULINK MODEL

https://drive.google.com/file/d/1Ej96yXs3Scyw1QBMh--1J7gNgmmYD_tW/view?usp=sharing

                        

This subsystem is connected to the longitudinal driver block output ports namely acceleration command and deceleration command.

This subsystem will convert this acceleration and deceleration command into voltage signals using two controlled voltage source block, controlled PWM voltage block, a H-bridge and a current sensor.

  • Controlled voltage source block

The block parameters are shown below,

                         

This block is used to maintain the specified voltage at its output regardless of the current flowing through the source.

  • Controlled PWM voltage block

The block and its parameters are as shown below,

                                              

                                           

This block is used to create the pulse-width modulated (PWM) voltage.

Electrical input ports:- The block calculates the duty cycle based on the reference voltage across its ref+ and ref- ports. This modeling variant is the default.

The value of the Output voltage amplitude parameter determines amplitude of the output voltage.

  • H-bridge block

This block is used to change the polarity of the voltage applied across the DC motor so as to run the motor in forward and reverse direction as per the input command.

The block and its parameters are shown below,

                                                   

                                 

                                 

                                    

  • Current sensor block

This is used to measure the current flowing through the H-bridge.

The block and its parameters is shown below,

                                    

  • DC motor

To convert the electrical energy to mechanical energy we use motors. In this electric vehicle model we have used DC motor. This motor can act as a generator also in case of regenerative braking.

The motor block and its parameters are shown below,

                                                                      

                                                    

                                                        

This block represents the electrical and torque characteristics of a DC motor.

  • Battery subsystem

In this subsystem we have a battery block, a controlled current source block and a Goto block.

                                  

  • Battery block

This battery block represents a simple battery model. The block models the battery as a series internal resistance and a constant voltage source.

The block and its parameters are shown below,

                                                                      

                                             

 All other parameter sections are kept at default values.

  • Controlled current source block

This block gives a constant current output regardless of the voltage across it.

The block and its parameters are shown below,

                                                   

                                                      

  • Goto block

It is used to pass values to the ‘From block’ so that this value can be accessed from anywhere in the Simulink diagram. This input can be a real or complex valued signal or vector of any data type. This ‘From block’ and ‘Goto block’ allows us to pass a signal from one block to another without actually connecting them.

The block diagram & parameters of Goto block is shown below,

                          

  • State of charge calculation subsystem

The block diagram of the subsystem is as shown below,

                          

The input for this is from the current sensor.

Now this is connected to the rate transition block. This handles the transfer of data between blocks operating at different rates. The block and its parameters are shown below,

                      

Then a gain block is connected to it. This gain will multiply the value of k=1A⋅sec , where A⋅sec is the ampere second value of the battery.

In this case the battery capacity is in A⋅hr , which is ampere hour.

To convert ,

A⋅sec=A⋅hr⋅(3600)

Then to add all these values with respect to time , we have used a Discrete-time integrator. This block will accumulate the input signal. The block and its parameters are shown below,

Now this summed value is subtracted from 1, which will give us the remaining State of Charge. To convert this to percentage, we have multiplied by 100 using another gain block.

Also, a Goto block is used here to get SOC values.

The output from this subsystem is connected to a display block, which will display the Battery Percentage as shown below,

  • Vehicle body subsystem

This subsystem represents the body of a vehicle. The block diagram for this subsystem is shown below,

https://drive.google.com/file/d/1Ej96yXs3Scyw1QBMh--1J7gNgmmYD_tW/view?usp=sharing

The input to this subsystem is the mechanical rotational conserving port of the DC motor block.

This is connected to the single speed gear box of gear ratio 3.7. This block and its parameters are shown below,

The inertia acting on the shafts is given using a Inertia block. This block and its parameters are shown below,

Now the simple gear is connected to all four wheels, representing an All-wheel Drive vehicle. The tires are represented using tire (magic formula) block. This block and its parameters are shown below,

The simple gear is connected to the axle port of the tire block.

Now to represent the vehicle body we have used the vehicle body block . This block and its parameters are shown below,

Now to the front and rear normal forces ports represented by NF & NR respectively of the vehicle body we have connected the four tire. Two at NF and two at NR ports. This represents the front 2 tires and the rear 2 tires.

Also, the mechanical translational conserving port for the wheel hub represented by ‘H’ in tire block is connected to the port ‘H’ in the vehicle body block which represents the mechanical translational conserving port associated with the horizontal motion of the vehicle body.

To the gradient and wind speed ports of the vehicle body block, we have connected physical signal constant block.

The output from the vehicle body is the velocity of the vehicle in m/s. This output is connected to the Goto block with tag ‘vfd’.

Now coming back to the longitudinal driver block, the VelFdbk input to this block is given using the ‘From block ‘with tag ‘vfd’. This is the output from the vehicle body block.

Where can Matlab be used in EV

Designing an EV is an elaborate process as it involves a lot of different sub-systems, and in order to maximize the performance of an EV, a lot of parameters and testing need to be done. The MATLAB Simulink and Sims cape provide features to design and simulate essential Electric Vehicle use cases. The 7 most important use cases for Matlab are:

  • Tune regenerative braking algorithms
  • Explore electric powertrain architectures
  • Modify a suspension design
  • Optimize vehicle performance
  • Develop active chassis controls
  • Validate ADAS algorithms
  • Test using hardware-in-the-loop (HIL)

Electric Vehicle Model

We have modeled a simple EV power train and simulated it with actual forces and resistance the vehicle has to endure in real world scenarios. We have coupled it with blocks such as vehicle body, tires, etc, in order to include data such as wheel friction, air resistance, rolling resistance, etc. Since we are only testing how we can utilize this software to simulate different scenarios, we avoided using data from a specific vehicle.

Signal Editor

The scope can have multiple inputs, and the real-time output is displayed when the simulation starts. The drive cycle which is available in the default setting is an ftp75 which is a mandatory dynamometer test used as an industry standard. The high and low velocity makes it a good drive cycle to check the parameters of the drivetrain. The FTP75 drive cycle is shown below:

But we will be using ECE Extra-Urban Driving cycle since it is just a 400 s drive cycle with smoother accelerations. The below image shows how the velocity of the vehicle will be changing wrt time. The above image shows the speed, acceleration, and gear change wrt time. The bottom graph shows the real-time output during our simulation.

The below images are taken during the matlab simulation that shows the current used by the motor over time. The first image above shows how the current increases as the motor start, this image is provided in order to show the MATLAB’s capability and processing prowess,  the time duration between each spike is just 0.001 seconds or 1 millisecond. The graph in the bottom shows a current vs time graph over a period of 120 seconds. It shows how the value of current slowly decreases when the vehicle is moving at a constant rate. 

The signal editor block is used for designing signals. The signal can be used in a user-defined manner. We can use the signal editor block to feed any customizable data showing the speed of the vehicle to the longitudinal driver block.

Note: We have not used the signal editor block, but you can use the signal editor block in place of a Drive cycle source.

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 the specified speed and time tolerances.

Longitudinal Driver Block 

The Longitudinal Driver block acts as an actual driver who interprets the vehicle speed command from a reference signal. The block is capable of taking feedback velocity of the vehicle and changing the speed by giving output signals, it can decide when the vehicle needs to be accelerated and when the break needs to be applied. There are also options to control the gear.

Simulink-PS/ PS-Simulink Converter 

There are physical signals (PS) and Simulink Signal and we can’t use the Physical signals and Simulink signals interchangeably, thus require Simulink-PS Converter or PS-Simulink Converter depending on the input and output.

For eg. the acceleration command and break commands coming out from the driver block are Simulink signals which need to be converted into signal commands. For that, we utilize Simulink to PS converter.

Controlled Voltage Source

The Controlled Voltage Source block is used to give a constant voltage output. It has 2 electrical conserving ports and a physical signal port. The output from the controlled voltage source is fed to the controlled PWM voltage source.

Controlled PWM  Voltage Source

This block is used for providing a controlled PWM voltage output. The PWM signal is used for controlling the speed of the traction motor. The duty cycle is given by:

where

Vref is the reference voltage across the ref+ and ref- ports.

Vmin denotes the minimum reference voltage.

Vmax denotes the maximum reference voltage.

H-Bridge Motor Driver

The H-bridge block is used to drive a motor. It has 2 modes an average mode where the block is used to apply an average voltage and the PWM mode where the motor is driven when the input voltage is above an enabled threshold voltage. The H-bridge block has 2 output ports, a positive and a negative port which is directly connected to the motor that has to be controlled. There is also a REV port. When the reverse threshold voltage is lower than the REV port voltage, the polarity of the motor is reversed, and if the BRK port voltage is greater than the value of breaking threshold voltage, it indicates that the vehicle is in breaking condition.

Motors

For traction motor, we are using a simple DC motor, but we can also use any other type of motor such as an Induction motor, PMSM, SRM, etc.

Subsystem

When working with bigger models, it is always a good idea to create a sub-system in order to declutter the whole model and to group components into a single block. You can easily create a subsystem by selecting the required components and pressing Ctrl+G or right-clicking on the selected blocks and then pressing on Create System from Selection from the drop-down menu which appears.

The EV model is a combination of both electrical and mechanical parts. The mechanical parts in the system include tires, vehicle body, transmission gears, and the motor. The 4 tires and the vehicle body are formed into a subsystem to separate the mechanical component from that of electrical components. The image of the subsystem is attached below.

https://drive.google.com/file/d/1Ej96yXs3Scyw1QBMh--1J7gNgmmYD_tW/view?usp=sharing

The different components of our electric vehicle’s body, which let us feed physical forces experienced by the vehicle are used in the subsystem, the different blocks are explained below:

Vehicle Body 

The vehicle body block represents a dual axel vehicle or a 4-wheeler. We can set parameters such as the weight distribution, mass, road incline, aerodynamic drag, etc. There are a total of 6 ports, W, V, H, NR, NF, and beta. The ports W and beta are physical signal input ports which are for wind speed and inclination of road respectively. Connections to V, NF, and NR are physical signal output ports for the velocity of the vehicle, Front axle, and rear axle normal forces and the H is for the horizontal motion and the tire is connected to this port.

Tire (Magic formula) 

We have selected the tire(Magic formula). As can be seen in the sub-system, we have connected the hub of all 4 tires with the vehicle body’s hub. The tire (Magical Formula) is a tire block with longitudinal behavior. We are using it in a constant condition. We have connected the S with a terminator block, the S determines the slip of the tire. N is connected with the NR and NF ports of the vehicle block while the H, which is for the hub is connected to the H of the vehicle body. The A is the axel connection and is connected with the motor’s output shaft.

Terminator Block

The terminator block is used to terminate a physical connection. It is a good practice to terminate any unused connection as it makes it clearer to understand and also terminates the port, hence, when a subsystem block is connected these ports are not visible on the sub-system.

PS-Constant Block 

We can not use a regular constant block for providing physical signals, thus a physical signal block is used. This block is used for creating a physical signal constantly.

Simple Gear

This block is used for giving a fixed gear ratio. This is a mechanical component and can be avoided, but it gives users the ability to adjust vehicle speed wrt the rpm of the motor.

Testing and Simulation

After designing the circuit, all that is left is testing the circuit. We usually need to put scopes at any point in the circuit to measure the desired parameters. The scope module looks like the one shown below.

T

A Solver Configuration is added to ensure proper solving of the mathematical equations by the model.

  • Scopes are connected to analyze different outputs such as the SOC of the battery, the reference velocity & the actual velocity of the vehicle and the distance covered by the vehicle during the total run

https://drive.google.com/file/d/1FdVobMhzsEwLynP8Ln8EbMhLxXY4uYd3/view?usp=sharing

The blue line is a graph of the drive cycle source and the yellow line shows the corresponding velocity graph

https://drive.google.com/file/d/1V9KHSoLaS0cup0nR2lvTbGxI96Cj7JwI/view?usp=sharing

the yellow line shows the distance covered by the electrical car

3) SOC calculation:

the change of SOC is given below 

https://drive.google.com/file/d/1fLWYTt4dqp-ELBL1d-IHJDsxFx8ELjga/view?usp=sharing

the change of battery current is given below

https://drive.google.com/file/d/1CIR4Wad02qMMBaB2GLQqNNCo28N91TAd/view?usp=sharing

 REFRENCES 1)https://youtu.be/tM9Akdo8QeA

                    2)https://youtu.be/xmdUFEfiAKk

CONCLUSION:

The MATLAB model of an electric car which uses a battery and a DC motor has been successfully made by choosing suitable blocks from Powertrain block set and following conclusions has been drawn from the results.

From the input vs output velocity graph, we can see that the EV model that we designed have traced the FTP 75 drive cycle very closely. Only when the speed suddenly drops to 0 in the FTP 75 drive cycle, the model takes time to catch up. On all other occasions the model traced the drive cycle closely.

Now looking at the SOC graph we can see that almost 50% of the battery capacity is used for completing this drive cycle. And also, we can see sudden spikes in that graph, these spikes represent the regenerative braking region. During which the SOC value increases.

And from the Current variation graph, we can see that the maximum current value during normal driving is around 300A and during regenerative braking the maximum current value reached is near to 150A.

from the above model and from the assumed parameters we found that the velocity of an electric vehicle is 35.96 km and the distance covered by the electric vehicle is 8:121 km and also the variation of SOC and the battery current and battery voltage is also studied.

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.