3

Electric Vehicle Simulation in Simulink

 3 years ago
source link: https://matlabhelper.com/blog/simulink/electric-vehicle-simulation-in-simulink/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Electric Vehicle Simulation in Simulink
Need Urgent Help?

Our experts assist in all MATLAB & Simulink fields with communication options from live sessions to offline work.

testimonials

Philippa E. / PhD Fellow

I STRONGLY recommend MATLAB Helper to EVERYONE interested in doing a successful project & research work! MATLAB Helper has completely surpassed my expectations. Just book their service and forget all your worries.

Yogesh Mangal / Graduate Trainee

MATLAB Helper provide training and internship in MATLAB. It covers many topics of MATLAB. I have received my training from MATLAB Helper with the best experience. It also provide many webinar which is helpful to learning in MATLAB.

Read another post

Learn how to create an optimal Electric Vehicle model by using Simulink. Conventional vehicles utilize petroleum-derived fuels to provide good performance and long-range. But conventional vehicles having certain disadvantages such as low fuel economy and exhaust gas emission causing environmental pollution. So, to overcome these disadvantages, electric vehicle technology is useful. In this blog, the modeling of the electric vehicle has been discussed. Real key parameters have been considered to create an optimized model. By comparing the vehicle's actual speed and input drive speed, we examined the electric vehicle's optimal performance. The electric vehicle's energy consumption value is compared based on the battery's initial and final charging. The effect of different parameters on vehicle performance and energy consumption has been examined.

Introduction

The electric vehicle's energy conversion efficiency is more than the energy conversion efficiency of a conventional vehicle. The battery is going to be an efficient source of power. The model simulation will provide batteries' behavior, and we can also observe how breaking will charge the battery.  Making a Simulink model has a lot of advantages. Before going for a real hardware model, we can observe and validate system key parameters inside a simulation to know how the system will function? Below simulation model will give you an idea about how electric vehicle components are arranged and how we can achieve optimal performance?

Block Diagram of the System

There are several components and a vast network of connecting wires in the electric vehicle. In the case of an electric vehicle, the conventional IC engine is replaced by the motor. The working fuel that is the battery pack is supplied to the motor. The below block diagram will show significant components of the Electric Vehicle system.

Block Diagram of the System

The key components of electric vehicles are the motor, vehicle body, controller, and battery pack. There are several types of motors used in Electric Vehicles. BLDC motors, Brushed DC motors, and AC Induction Motors are commonly used electric motors. The vehicle body includes a gearbox, differentials, and tires. Earlier, we used the battery just to start the engine. But now we are using the battery as a working power. Combinations of cells will create a module, and many modules will form a battery pack together. The motor needs a power supply from the battery to perform operations. Suppose we connect the battery pack directly to the motor. In that case, the motor will run at a rated speed, and speed control is not possible. We can control the speed of the motor with the aid of the controller. The controller will operate by taking input from the driver.

Simulink Model

I have divided the entire simulation system into four subsystems. The first subsystem contains the vehicle body. The second subsystem contains the motor and controller circuit. The third subsystem contains the driver input, and the fourth subsystem contains the battery pack.

Vehicle Body Subsystem

First, I've developed a vehicle body subsystem. I have included tires, differential, gearbox, and vehicle body blocks from the Simscape library in the vehicle body subsystem. We can change the block parameters as per our requirements. Connect tires, differential, gearbox, and vehicle body blocks to each other to make the first subsystem.

Vehicle Body Subsystem

Motor Circuit and Controller Subsystem

The motor will take controlled power from the battery and convert electrical energy to mechanical energy. The mechanical energy produced is supplied to the gearbox and mechanical rotational frame. To make the subsystem, I have added the motor circuit and controller block from the Simscape library. I have used a simple DC motor, and to control the DC motor, I have used an H-bridge controller. With the help of an H-bridge controller, I can apply acceleration, deceleration, and breaking. To control the PMW wave, I have added a controlled PWM voltage block. We can change the block parameters as per our requirements.

The below diagram will show connections between each block to make a subsystem.

Motor Circuit and Controller Subsystem

Driver Input Subsystem

Longitudinal driver block from the powertrain block library produces normalized acceleration and braking commands based on reference and feedback speeds. Reference velocity will be given by the built-in drive cycle or we can generate our own signal by using the signal builder block. Feedback speed will be taken from actual vehicle speed. Based on the difference between the reference signal and the actual speed error will be generated. The error produced will result in acceleration or deceleration so that the vehicle's actual speed will try to match the reference speed.

I used the Longitudinal block and Signal Builder block to create the Drive Input Subsystem. The diagram below shows the connection between the blocks.

Driver Input Subsystem

Battery Pack subsystem

The battery pack will provide power to the motor. Calculation of State of Charge (SOC) would give us information about how much we can drive before recharging and how much time we can use an existing battery. I have used a lithium-ion battery to check the SOC percentage directly. Battery charging and discharging we can examine with the help of SOC. The below diagram will show connections between each block to make a subsystem.

Battery Pack subsystem

Overall Model

Add powergui block to Simulation. Add scope and display block to examine outputs and behavior of the Electric Vehicle model. With the help of the signal builder block, I have created a reference signal. The reference signal and actual speed on the same graph will explain how the feedback loop is working. We can also calculate the average speed of the electric vehicle. With the SOC graph's help, we can analyze battery charging and discharge during deacceleration and acceleration command, respectively.

The below diagram will show the overall Electric Model that I have used to examine the vehicle's SOC percentage and average velocity.

Overall Simulink Model

MH Quiz Contest - Jan'21

Online MCQ Quiz on MATLAB & Python. 

Special Prize applicable till 31st January 2021. Hurry up!

Results

First, with the aid of the signal builder block, I have created reference speed. I have selected a top speed of 100 kilometers per hour. I've been simulating the model for 1,000 seconds. The speed increases for the first 400 seconds. The speed remains constant for the next 200 seconds, and the speed decreases for the remaining 400 seconds. The below Image will display the reference signal that I generated with the signal builder block's aid.

Generated Input Signal

Suppose we look at the graph of the SOC percentage. In that case, the battery will be discharged non-linearly for the first 400 seconds, discharged linearly for the next 200 seconds. For the remaining 400 seconds, the battery will be charged and discharged according to feedback.

Graph of SOC %

The below graph will show how the vehicle's actual speed is following the reference speed of the input drive cycle.

Actual Speed and Reference Speed on the same Graph

Suppose we calculate the average speed for 1,000 seconds. In that case, it is approximately equal to the average speed that we got on the graph.

Conclusion

We have examined the SOC percentage and speed graph. The SOC percentage graph indicates that the battery is discharged when there is an acceleration command. The battery is charged when there is a deceleration command. The Speed graph shows that the actual speed tries to meet the reference speed by considering feedback. The model shows that the electric vehicle has traveled approximately 14 kilometers in 1,000 seconds. If we measure the average speed, the vehicle will travel approximately 50 kilometers per hour. This measured average speed is approximately equal to the average speed found on the graph. Here are some applications from this blog:

  • Conventional fuel has a high calorific value than batteries. Still, the battery conversion efficiency is more than conventional fuel. If we use hybrid technology, it would have a lot of potential and efficiency.
  • In the future, we can make electric vehicles powered by solar energy.
  • If we can replace current fuel-based transport with electrified transport, this would create an enormous advantage for the ecosystem.
  • Ultra-charging stations and the battery processing technology will have many advantages. It will have a significant effect also on the development of electric vehicles.

Loved the Blog? Gives us your valuable feedback through comments!

Thank you for reading this blog. Do share this blog, if you found it helpful. If you have any query, post it in the comments or get in touch with us by emailing your questions to [email protected]. Follow us on LinkedInFacebook and Subscribe to our YouTube Channel. We have expanded the traditional classroom teaching to meet the needs of today's learners. Our experts assist in all MATLAB & Simulink fields with communication options from live sessions to offline work with Pricing suitable for everyone. You can get offline help via email or opt for online zoom meetings with one-click content sharing, real-time co-annotation, and digital whiteboard.

If you are looking for one-time expert help, you can go ahead with Pay As You Go Plan. If your task is research-oriented like thesis support or paper implementation and you have a proper timeline, our recommendation would be Research Assistance, a monthly plan with a steady reduction of 10% of the expert fee up to six months of subscription. We also offer Corporate Assistance for requirements with annual validity. The minimum expert booking time is 1 hour under the Pay As You Go plan. You can book 5/10/20 hours under the Research Assistance plan. You will get expert help for the time you book only after you have an active order.

If you are looking for an expert's help and ready for the paid service, share your requirement with necessary attachments & inform us about any Service preference along with the timeline. Once evaluated, we will revert back to you with more details and the next suggested step.

Education is our future. MATLAB is our feature. Happy MATLABing!


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK