Archived OpenModelica forums. Posting is disabled.

Alternative forums include GitHub discussions or StackOverflow (make sure to read the Stack Overflow rules; you need to have well-formed questions)


Forgot password? | Forgot username? | Register

Driving cycle in Dymola

Driving cycle in Dymola

Hello everyone!
I'm working on a project that consists of simulating an electric car in Dymola.I decided that my input for the simulation will be the New European Driving Cycle (short NEDC).The NEDC is standardized and we pretty much the curve of it.But I totally ignore how to implement it in Dymola.I've searched in the Dymola documentation and I found an interesting library called VDL comprising driving cycles but the library doesn't seem to be free of charge.So I'm asking for your help,whether t here is another solution implementing the NEDC or any driving cycle in general.
Thank you

Re: Driving cycle in Dymola

You can take it here:
https://dl.dropboxusercontent.com/u/55064681/NEDC.txt

Since cycles are just text files, you can use this example to create your own cycles.

Edited by: ceraolo - Nov-27-16 10:11:07

Re: Driving cycle in Dymola

Hello ceraolo. Thank you for your reply!
I still don't know how to create it concretely in Dymola.I'm done modelling my engine but I ignore how to connect it with the NEDC?
Could you please give me some other tricks
Thanks

Re: Driving cycle in Dymola

Try with the enclosed file "SimpleEV.mo". Load and open model "EVBasic". Double-click on "Driver". There you can select a text file containing the cycle (e.g. the NEDC I supplied). For the model to run the file must be in your default dymola directory.

SimpleEV.zip

Attachments:

Re: Driving cycle in Dymola

Thank you once again ceraolo! It's a very interesting simulation model.I opened your driver submodel which contains the combiTimeTable and I tried to analyze its structure.This is what I've understand so far:
-The combiTimeTable gives us the expected velocity that is converted to m/s.
-The real output at the bottom of the model is meant to hold the real velocity.
-The difference between the two values is computed using feedback and multiplied with the gain coefficient and submitted to a higher limit with the limiter.
If you don't mind, could you explain to me, what is the purpose of multiplying the difference between velocities and limiting it? How did you chose these two parameters (k and ymax)?
I noticed that the output of your driver submodel is in Nm so I suppose it is a couple but what does it stand for?
And finally when simulating your whole model I noticed that the output of the combiTimeTable (here nedc) isn't complete when plotted it goes until 50 km/h as you can see int the attached picture and
https://openmodelica.org/images/agorapro/attachments/5400/mini_screenshot-output-nedc.jpeg
considering the fact that it reaches 120 km/h.It is because the plot displays a small part of the driving cycle or because the file "nedc.txt" isn't read completely ?
Thank you for taking the time to answer my questions

Re: Driving cycle in Dymola


If you don't mind, could you explain to me, what is the purpose of multiplying the difference between velocities and limiting it? How did you chose these two parameters (k and ymax)?
I noticed that the output of your driver submodel is in Nm so I suppose it is a couple but what does it stand for?

Driver+vehicle constitute a speed-regulated electric drive, whose closed-loop regulator is the driver. The vehicle is torque-controlled through driver's command (accelerator and brake pedals). The driver here is a simple proportional feedback controller, whose gain is "gain", and the torque it requests is limited to be a bit more realistic (maximum and minimum torque the power train is able to deliver or absorb).
This is a very preliminary model, that is just to show the first concept of vehicle simulation to my students.


And finally when simulating your whole model I noticed that the output of the combiTimeTable (here nedc) isn't complete when plotted it goes until 50 km/h as you can see

You have to simulate longer to see the rest :-)


Edited by: ceraolo - Dec-07-16 19:09:11

Re: Driving cycle in Dymola

Hello Ceraolo
I have one more question if you don't mind.I'm making progress in my electrical vehicle simulation.I've already modelled my driver using a PID controller whose input is the difference between the desired velocity and the real one so that it tends to zero. Though I still ignore how to chose the parameters of my PID controller and what quantity comes out as output (Force, torque...) provided that I want to transfer the desired torque to my engine.
Thank you very much for helping me

There are 0 guests and 0 other users also viewing this topic
You are here: