If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Further car simulator questions
Thanks to all the help I got in response to my earlier post "Basics of a
car simulator", I now have something quite similar to a drag racer close to working in my code - i.e. I have most of the longitudinal forces under control. I've adopted the model I was asking about before - a central engine RPM is affected by torque coming from the engine, which is a function of throttle and current RPM, and coming from the tyres, which at each tyre is a function of engine RPM, contact patch velocity and load that involves calculating the slip ratio and plugging that into the Pacekja Magic Formula. Linear force also results from the tyre/ground interaction, accelerating the car body. My problem is that I can't find a thorough discussion of the inherent opposing forces, so I've sort of made them up - and I want to find out how well I've managed that. Firstly there is the obvious air resistance on the car body, which can be modelled as directly proportional to velocity and always acts in the opposite direction. Of course I probably should worry about downforce here as an effect on load, but for now I'm just simulating my cars as bricks. Then I assume there is an analogue to air resistance acting against the engine RPM? But it strikes me that there must also be an ordinary frictional force acting against RPM since all the rotating elements have to be in contact with something. If I apply the approximation for friction that doesn't differentiate between static and moving objects, it seems to me that must produce a reactionary force that simply has a known value and isn't proportional to RPM in any way. So am I right in concluding that the forces that prevent an engine at a certain RPM with no throttle applied spinning forever comprise a part proportional to RPM and a static part? If so, is it common to simulate both of these? -Thomas |
Ads |
#2
|
|||
|
|||
Further car simulator questions
Thomas Harte wrote: > Thanks to all the help I got in response to my earlier post "Basics of a > car simulator", I now have something quite similar to a drag racer close > to working in my code - i.e. I have most of the longitudinal forces > under control. I've adopted the model I was asking about before - a > central engine RPM is affected by torque coming from the engine, which > is a function of throttle and current RPM, and coming from the tyres, > which at each tyre is a function of engine RPM, contact patch velocity > and load that involves calculating the slip ratio and plugging that into > the Pacekja Magic Formula. Linear force also results from the > tyre/ground interaction, accelerating the car body. > Great! Sounds like you're moving right along :-) Speaking of drag racing (shameless plug): http://www.PerformanceSimulations.co.../ToddSim7a.wmv > My problem is that I can't find a thorough discussion of the inherent > opposing forces, so I've sort of made them up - and I want to find out > how well I've managed that. > > Firstly there is the obvious air resistance on the car body, which can > be modelled as directly proportional to velocity and always acts in the > opposite direction. Of course I probably should worry about downforce > here as an effect on load, but for now I'm just simulating my cars as > bricks. > That works. Good to take things one at a time :-) You'll find downforce to be an easy addition anyway, I'm sure. It works just like your aero drag force does, with a coefficient of lift and being dependent on velocity^2. Only difference is it acts in different locations and directions. > Then I assume there is an analogue to air resistance acting against the > engine RPM? > Chances are your model already does this without your knowing it. Just crank up the drag coefficient and/or frontal area. If the acceleration and top speed drop, then you've got this one licked already. > But it strikes me that there must also be an ordinary frictional force > acting against RPM since all the rotating elements have to be in contact > with something. If I apply the approximation for friction that doesn't > differentiate between static and moving objects, it seems to me that > must produce a reactionary force that simply has a known value and isn't > proportional to RPM in any way. > I think you're talking about engine friction here? Anyway, the difference between static/dynamic friction is not used anywhere in my model at all, actually. In general, if you look at scientific studies on friction of two materials pressed together, you'll find that they'll frequently map friction coefficient as a function of sliding speed, temperature, contact pressure, and so forth, so in reality the high school taught notion of static/dynamic friction isn't always very useful, especially under extreme conditions that are found in racing cars. Sounds to me like what you're wanting to do is apply a constant friction torque (not a force of course, as this is a rotating object). You could indeed try this and you'll be fairly close for most rotating objects., i.e., a bearing system. If you used the assertion that there's no difference between static/dynamic friction, then yes, to the first order your assumption is correct. The friction torque would be constant. Generally however, the friction torque in a real rotating system is some function of the loads involved, sliding speed, and material temperatures as well. I.e., in general the friction torque rises fairly noticably as rotational velocity is increased in a bearing system. In general though it seems likely that in the case of a clutch, friction coefficient decreases with increasing sliding speed. The clutch model in Virtual RC Racing initially assumed the friction coefficient in the clutch was constant, but then we went to the track to watch the lead engineer for one of the RC companies and, listening closely to the engine, it seemed this wasn't the case. The clutches in these engines just begin to engage at about 22,000 rpm (the engines run a mind boggling ~48,000 rpm at the top end). These are centrifugal clutches that cause the "clutch plates" to be pressed together with increasing force as rpm rises, so at full throttle the clutch will then slip more with the engine howevering over 30,000 rpm. The engine hovers there at 30,000 rpm for a brief moment, then eventually the car's speed catches up to the engine and the clutch locks. Then of course the rpm rises again. However, if the assumption that the friction coefficient was not a function of sliding speed, the friction torque would stay constant right up until the clutch finally locked, just as you correctly asserted. However, right before the clutch finally locked up, there is a slightly noticable bobble in the engine rpm. It drops just for an instant before it locks. It's very subtle, but it's clearly there if we listened for it. I interpreted this to mean that right before the clutch locked, the friction coefficient in the clutch climbed. I.e., as the relative sliding speeds got smaller, the friction coefficient climbed, and most of this change seemed to happen near 0 sliding speed. So I went back into the model and made friction coefficient a function of sliding speed and suddenly Virtual RC Racing sounded more like the real car with that subtle bobble in the engine rpm right as the clutch engaged. Anyway, that's not entirely off the subject. Engines however are more complicated than this, so moving right along: > So am I right in concluding that the forces that prevent an engine at a > certain RPM with no throttle applied spinning forever comprise a part > proportional to RPM and a static part? If so, is it common to simulate > both of these? > > -Thomas With engines this isn't quite right. There are several components to friction in engines that vary with different things and I think perhaps you're not looking for a full discussion of those at this point. If you're interested, then I'll cover some of that. You might be envisioning the "static part" of engine friction to be a constant torque, which another torque that varies with rpm could then be added to. That's an interesting way to look at it and is the first time I've heard a developer put the question that way. We had a discussion on basically this subject here at ras back in August of 2000 (wow, it's been a long time :-D ) I only know the date because the picture I used to illustrate the point is still sitting on my web site with the date attached! The discussion we had was not on the causes of engine friction, but if I recall correctly, was concerning the "engine braking" effect on handling and how to model that, in addition to getting part throttle torque out of a full throttle power curve like you now are undoubtedly using. The typical approach taken by most developers does not appear to have changed in the past five years. Richard Burns Rally is the only one that immediately comes to mind that I'd strongly suspect, because of their engine simulation, is very likely using a more complete and accurate approach to the problem. Here's how most developers deal with this: http://www.performancesimulations.co.../throttle2.gif This is a graph of torque vs. rpm at several throttle positions. The top curve and bottom curve are 100% and 0% throttle. I know you're not specifically asking about throttling effects here, but bear with me for a moment. The top and bottom curves are taken from an F1 racing game's ini files from back in 2000. I don't recall the title, but I think it was the big EA game. Maybe it was called "F1 2000" :-) Anyway, take a look at that bottom curve. That is indeed the engine friction with all components taken into account. I.e., it includes throttling work, crankshaft bearing losses, valvetrain losses, piston/wall friction, and so on, all of which are functions themselves of rpm and so forth (yet different). The bottom curve is below 0 torque, so of course it's a negative torque that acts to slow down the engine, and if a drivetrain is attached to that, will also act to brake the rear wheels. That is the most common and easy way to deal with the question, "what happens when you close the throttle?" I.e., make two primary torque curves, one at full throttle (from a dyno test), and another one at zero throttle. Unfortunately there are not very many dyno tests published outside of scientific literature that were produced at zero throttle with the engine running. There are some tests for what's called "motored torque" so you might try Googling that and seeing if you come up with something. Motored torque is, however, measured with the engine turned off and generally with the throttles fully open as it's an attempt to measure engine friction directly. So if you find any data, make sure it was taken with the throttles closed (foot off the gas pedal)! Using that would probably be closer than just guessing at what the closed throttle torque curve would look like, so it's better than nothing. The rest of the curves are what you'd get with a simple linear interpolation between the top and bottom curves based on throttle position. Real, part throttle engine curves do not really look like that though, far from it, actually To get some indication of what the part throttle curves might look like, keep in mind that with a car sitting in neutral and the accelerator slightly pressed down, the engine rpm will stabilize at some point. This point is precisely where the part throttle torque curve at that throttle opening percentage or angle crosses 0 torque on the graph. So the torque will rise to some point and drop back to 0 at that rpm. Just something to keep in mind if later you want to get a bit nastier on part-throttle torque stuff. Anyway, taking this approach bypasses the need to try to analyze or break down engine friction into more than one component. I've never heard mass complaints about part-throttle engine behavior in sims. Generally if someone's gas pedal doesn't feel right, they'll just adjust the progressiveness of it in the game's controller setup area and be done with it. Getting much more involved than this requires some serious look into engine operation. If you're interested really in the frictional components, they are sort of all over the place in how they work. For instance: Piston/cylinder wall friction has one component that depends on the mass of the pistons and scales with engine rpm (perhaps ^2, I don't recall off the top of my head). This component isn't effected by what's happening in the cylinder. I.e., it's independent of throttle position or cylinder filling. The second component of this same piston/cylinder wall friction, really the primary contributor usually, is very highly dependent on cylinder pressure. As such, it's highly dependant on throttle position. Cylinder filling/pressure is a function of engine rpm too, so this friction component is a function of throttle position and engine rpm. Valve train friction: This varies considerably with engine rpm. Crankshaft bearing friction: This is a spinning bearing like you'd get with your front wheels. It just sits there and spins. At first glance this might be one of those constant torque things, but measurements show that it also increases with engine rpm almost linearly at some rate. Fan: That big fan on the front of your engine is an enormous power sucker at high rpm. This increases at an ever increasing rate as engine rpm rises. So anyway, the point is, in reality there is not really a "constant torque part" and a separate part that increases with engine rpm that could be added together. You'd most likely be better off with the example covered earlier. Hope that helps and didn't stray too far off your question! Todd Wasson Racing and Engine Simulation Software http://www.PerformanceSimulations.com http://www.VirtualRC.com |
#3
|
|||
|
|||
Further car simulator questions
Something just dawned on me. Going back to the graph that showed the
torque curves at different throttle positions. I said that zero throttle tests with the engine running were rare. Not so! In fact they're really quite common. Chassis dynos are contraptions that you park a car on. They have a set of rollers under the driven wheels. When you hit the gas, the engine/drivetrain accelerates the rollers. Since the roller system's moment of inertia and rotational velocity are known, the torque produced at the wheels can be calculated fairly accurately. Granted, the inertial losses from accelerating the drivetrain are undoubtedly never included in this, but it's good enough for many purposes. A fairly common thing that chassis dyno operators will do is perform what's called a "coast down test." After the engine has reached peak rpm, if I recall correctly, the driver will take his foot off the gas. The whole system slows down and now you have a fairly good idea of what the zero throttle torque curve looks like. I believe generally what these guys will do during a coast down test is shift into neutral to disengage the engine, then let the drivetrain slow down under it's own inertia in an attempt to measure roughly what the drivetrain losses are. This is somewhat silly in a way because the losses are completely different when an engine load is applied, but anyway, that's not the point... Anyway, if you can find some "coast down" tests with the engine still engaged to the drivetrain (not done in neutral or with the clutch pressed in) you'll indeed have a fairly good picture of what the torque curve as measured at the rear wheels looks like. This will be different from what you get at the flywheel, but something is better than nothing. Todd Wasson Racing and Engine Simulation Software http://www.PerformanceSimulations.com http://www.VirtualRC.com |
Thread Tools | |
Display Modes | |
|
|