PDA

View Full Version : FSAE car simulator



Szabi
02-18-2009, 01:53 AM
Hi!

Does somebody made a car simulator, that can be driven with an FFB steering wheel?

I am actually working on it in Matlab. I use a simplified full multibody car model. Simplification is needed because of the real-time running. I would like to speed up the simulation but without using xPc target.
Has someone experience using external simulation mode in simulink?

The second problem is that the car falls over at 1x m/s^2 lateral acceleration, even the Cg is on the ground.

Here are a video from the simulator:
http://www.youtube.com/watch?v=1bnv_ty8BRc

If somebody worked on a similar project, please reply!


Szabi
BME Formula Racing Team

Szabi
02-18-2009, 01:53 AM
Hi!

Does somebody made a car simulator, that can be driven with an FFB steering wheel?

I am actually working on it in Matlab. I use a simplified full multibody car model. Simplification is needed because of the real-time running. I would like to speed up the simulation but without using xPc target.
Has someone experience using external simulation mode in simulink?

The second problem is that the car falls over at 1x m/s^2 lateral acceleration, even the Cg is on the ground.

Here are a video from the simulator:
http://www.youtube.com/watch?v=1bnv_ty8BRc

If somebody worked on a similar project, please reply!


Szabi
BME Formula Racing Team

The_Man
02-18-2009, 04:12 AM
These might help..

http://alexandria.tue.nl/repository/books/612358.pdf
http://alexandria.tue.nl/repository/books/626941.pdf

A couple of papers I came across when I was trying to do something similar. The models in these papers are implemented using Simulink.

Your simulation seems to we working pretty well actually.
Just exactly how complex a model have you implemented?

Mahek Mody
IIT Bombay Racing

DonMolina
02-18-2009, 06:02 AM
Or you can always use Live for Speed (www.lfs.net) that has an old FSAE car, and is probably the best wide range commercial racing simulator out there.

But I guess it would only help for driver's practice. Testing the car with a simulator...

Well, good luck with that one!

Szabi
02-20-2009, 03:20 AM
Thank you for the papers, I will read them.

The car in the model has rigid front and rear axle. I would like to implement the real suspension of our car, but this will slow down the
running. I'm thinking about how to use lookup tables instead of the bodies, that represents the A-arms.

I use the TNO Delft tyre block with some old TTC parameters. It works well, but the curves does not match exactly with the TTC data.

I know LFS, it's a really good game. But the FSAE car in it is very different from our car, and I can not adjust all the parameters, that I want. Anyway I'm not sure that any PC simulator can help the drivers in practice. I'm working on it because we can use it on exhibitions and shows. And it is real fun to drive http://fsae.com/groupee_common/emoticons/icon_smile.gif

Szabi
BME Formula Racing Team

exFSAE
02-20-2009, 05:53 AM
If you use the TTC data, particularly older stuff, your grip levels will be way too high and the car will flip.

Your core model is built in what, Simulink? If so that's probably why it runs so slow.

The_Man
02-20-2009, 07:07 AM
If not Simulink.. What do you suggest?

exFSAE
02-20-2009, 03:06 PM
Should have said.. if you're running it in the Simulink environment I'd imagine it would run very slow.

If you can compile it down, and/or run it from the Matlab "core" I think that speeds things up.

And of course make sure all your mathematic operations are the most computationally efficient. There are things you can do real easily with how you set up block diagrams that make them crappy to compute.

Sounds like the car model itself is pretty sketchy if it flips with the CG at ground level...

Szabi
02-27-2009, 03:11 AM
It runs in Simulink. I tried to compile it with
ctrl+b, and the compiled model is done. I would like to use xPc target to run the simulation in real time, but the boot disks does not worked. The PC gave an error message, that this is not a system disk. In dosloader mode I have some memory allocation problems. So the xpc kernel does not run http://fsae.com/groupee_common/emoticons/icon_frown.gif

Is there any other toolbox that allows to run the simulink models in external mode?

Does somebody know what is the friction correction factor for the older TTC data?
I guess it is between 0.4-0.5.

Szabi
BME Formula Racing Team

jjs
02-27-2009, 06:05 AM
rFactor is great simulation and is highly customizable. You can create your own car and put in all the suspension points for your car, CG, moments of inertia for individual parts. It models the suspension movement real time with accurate camber change, toe change, etc... Tire data can be entered and tweaked. The best way to do it, is to not start a car from scratch but start with the F3 car that is in game, and modify the suspension data and car parameters from there to match your FSAE car, that way you can have a running FSAE car in game without actually having to model the graphics of your car. You can also model the engine, put in the torque curve and lots of other engine parameters, even heat exchange characteristics, and fuel economy. Once the car works well dynamically, you can then start work on modeling the car graphically if you want, or you can just let look like the F3 car. The game has great physics and FFB and feels more "real" than LFS in my opinion.

It takes a lot of work, and you'd need to research for a few days to get the hang of what files modify what and it takes a LOT of tweaking, but there is plenty of information and tutorials on the net if you just google search that will get you started.

exFSAE
02-27-2009, 07:46 AM
IMO the FFB in rFactor is kinda crap, probably a function of the kinda lame tire model. However, it is pretty nice in that you can edit so much.

LFS does have a ready set FSAE car in it, and cone courses. You can make your own cone courses as well. In theory you could map out a competition course, even cone-by-cone if you wanted, throw together a quick course in LFS, and drive the hell out of it in the back of your trailer before enduro. But, you can't adjust as much.

iRacing IMO has the most impressive physics model, but no good for FSAE at the moment.

In any event I wouldn't use any of them much for trying to do car setup other than gear ratios, but it would be pretty good for getting a feel for the pace of the courses and what kind of lines to take. Since the driver is inevitably the biggest variable anyway, it's probably worth it just for that.

Jevon
02-27-2009, 10:37 PM
<BLOCKQUOTE class="ip-ubbcode-quote"><div class="ip-ubbcode-quote-title">quote:</div><div class="ip-ubbcode-quote-content">Is there any other toolbox that allows to run the simulink models in external mode? </div></BLOCKQUOTE>

Try looking into the Real-Time Windows Target (http://www.mathworks.com/products/rtwt/) toolbox.

Also I have used xPC Target extensively and I don't think that you will be able to display your simulation on the target PC. You will have to send the results back to your host PC to handle the graphics. It may be a pain but could reduce some CPU load as the computations and graphics would be handled by different computers. I can try to answer any specific questions you have about xPC target, feel free to ask. Anyways, try Real-Time Windows Target as it should do what you need.

Does your target PC have a floppy drive? I have had good luck using BootFloppy for the target boot mode and have ran into issues trying to get DOSLoader to work.

Jevon

Szabi
03-02-2009, 03:42 AM
thank you for the post, I will try Real-Time Windows Target.

Yes, my target PC also has a floppy drive.
I have some idea now how to solve the problems,
but I have't got any time to try them yet.

Szabi
BME Formula Racing Team