I've often wondered if it would be possible to model an engine at a simple
level in real time. What if you modelled eight (or whatever) pistons actually
moving up and down in the cylinders, forcing air through the exhaust system to
produce sound dynamically in real time?
I decided to go ahead and give it a shot and see what it would sound like.
What you're listening to in the samples below are various 5.7 liter V-8 engines
with no exhaust headers (basically eight very short straight pipes):
http://performancesimulations.com/files/EngineSoundModel.zip
Physically based sound has been done before, of course. There was the Stacatto
engine demo, which took an approach like this, but it's interesting how
different this sounds. There is a lot of room for other stuff to be put in
(I've got plenty of ideas). Keep in mind this is a relatively simple model :-D
This might not run right on super fast computers. A friend of mine had
problems on his 2.5Ghz system, but it ran fine on a couple of 1.1Ghz system at
work as well as my 333Mhz laptop.
Anyway, let me know what you think!
Todd Wasson
Racing Software
http://PerformanceSimulations.com
My car sim
http://performancesimulations.com/scnshot4.htm
excellent work, some of the sounds were pretty darn convincing... I am very
partial to the low rumble one I think it was file 12 or 13. Very big blockish.
Don't try to run 2 of them at the same time though... mega crash.... ;-)
Rich
Well that was a an interest play. Sounds pretty damn good to me. Doing
sound this way would eliminate the looping wav files heard in other games.
With thius you could easily develop a single cyclinder miss or like wise.
Cya
Nigel
J. Todd Wasson <[email hidden]> wrote in message
news:[email hidden]...
> I've often wondered if it would be possible to model an engine at a simple
> level in real time. What if you modelled eight (or whatever) pistonsactually
> moving up and down in the cylinders, forcing air through the exhaustsystem to
> produce sound dynamically in real time?
>
> I decided to go ahead and give it a shot and see what it would sound like.
> What you're listening to in the samples below are various 5.7 liter V-8engines
> with no exhaust headers (basically eight very short straight pipes):
>
> http://performancesimulations.com/files/EngineSoundModel.zip
>
> Physically based sound has been done before, of course. There was theStacatto
> engine demo, which took an approach like this, but it's interesting how
> different this sounds. There is a lot of room for other stuff to be putin
> (I've got plenty of ideas). Keep in mind this is a relatively simplemodel :-D
>
> This might not run right on super fast computers. A friend of mine had
> problems on his 2.5Ghz system, but it ran fine on a couple of 1.1Ghzsystem at
Quoted text (11 lines)
> work as well as my 333Mhz laptop. > > Anyway, let me know what you think! > > > Todd Wasson > Racing Software > http://PerformanceSimulations.com > My car sim > http://performancesimulations.com/scnshot4.htm >>Well that was a an interest play. Sounds pretty damn good to me. Doing
>sound this way would eliminate the looping wav files heard in other games.
>With thius you could easily develop a single cyclinder miss or like wise.
>Cya
>Nigel
Thanks, Nigel. Actually I do have misses already in there, but it's not in any
of the examples you heard. Next will be to model the rest of the exhaust
system so you have resonances based on pipe lengths that will effect each
cylinder as rarefraction and compression waves travel between the cylinders,
helping or hindering cylinder filling depending on the exhaust configuration.
I think you should be able to actually hear when the engine reaches peak torque
this way. Right now there is no sound at all for 25% of each piston's travel.
I.e., when the exhaust valve shuts, the sound stops. With the pipes in there
the waves will continue bouncing around, producing some interesting changes
throughout the speed range.
Also, the cylinder filling is a bit random now, but should really change with
engine speed of course as it follows the torque curve. That should really
transform the sound as you rev up through the rpm's :-)
This will probably be in my demo, scheduled to be released in 2413 ;-)
Todd Wasson
Racing Software
http://PerformanceSimulations.com
My car sim
http://performancesimulations.com/scnshot4.htm
>excellent work, some of the sounds were pretty darn convincing... I am very
>partial to the low rumble one I think it was file 12 or 13. Very big
>blockish.
Thanks :-) I like the sound of big, crackly racing engines the most too.
>Don't try to run 2 of them at the same time though... mega crash.... ;-)
>
Hehe :-) Yes, that doesn't work very well!
Todd Wasson
Racing Software
http://PerformanceSimulations.com
My car sim
http://performancesimulations.com/scnshot4.htm
The guys working on Live for Speed have nothing on you man. This sounds
so much better than their "staccato" type sound engine. Maybe you
should give them a call?
Steve
Mach42
J. Todd Wasson wrote:
Quoted text (32 lines)
>>Well that was a an interest play. Sounds pretty damn good to me. Doing >>sound this way would eliminate the looping wav files heard in other games. >>With thius you could easily develop a single cyclinder miss or like wise. >>Cya >>Nigel > > > > Thanks, Nigel. Actually I do have misses already in there, but it's not in any > of the examples you heard. Next will be to model the rest of the exhaust > system so you have resonances based on pipe lengths that will effect each > cylinder as rarefraction and compression waves travel between the cylinders, > helping or hindering cylinder filling depending on the exhaust configuration. > I think you should be able to actually hear when the engine reaches peak torque > this way. Right now there is no sound at all for 25% of each piston's travel. > I.e., when the exhaust valve shuts, the sound stops. With the pipes in there > the waves will continue bouncing around, producing some interesting changes > throughout the speed range. > > Also, the cylinder filling is a bit random now, but should really change with > engine speed of course as it follows the torque curve. That should really > transform the sound as you rev up through the rpm's :-) > > This will probably be in my demo, scheduled to be released in 2413 ;-) > > > Todd Wasson > Racing Software > http://PerformanceSimulations.com > My car sim > http://performancesimulations.com/scnshot4.htm >>The guys working on Live for Speed have nothing on you man. This sounds
>so much better than their "staccato" type sound engine. Maybe you
>should give them a call?
>
>Steve
Wow. Thanks, Steve :-) Think I'll go post this in their forum and see what
happens.
Todd Wasson
Racing Software
http://PerformanceSimulations.com
My car sim
http://performancesimulations.com/scnshot4.htm
Are you going to model engine vibration too? To me this is the
characterstic that really sets the sound of a V8 apart from a V12, for
example. The vibration orders are the thing that is really different,
otherwise it's all just rpm x no. of cylinders. Plus I have noticed that on
race broadcasts you can really hear some harsh engine vibration on decels,
which is something that I feel is missing from all the sims I have ever
played. Seems like most sims use the same noise for accel and decel, but
maybe filter it a bit and add backfire to the decels. It should be more
different than that.
"J. Todd Wasson" <[email hidden]> wrote in message
news:[email hidden]...
>
>
> Thanks, Nigel. Actually I do have misses already in there, but it's notin any
> of the examples you heard. Next will be to model the rest of the exhaust
> system so you have resonances based on pipe lengths that will effect each
> cylinder as rarefraction and compression waves travel between thecylinders,
> helping or hindering cylinder filling depending on the exhaustconfiguration.
> I think you should be able to actually hear when the engine reaches peaktorque
> this way. Right now there is no sound at all for 25% of each piston'stravel.
> I.e., when the exhaust valve shuts, the sound stops. With the pipes inthere
> the waves will continue bouncing around, producing some interestingchanges
> throughout the speed range.
>
> Also, the cylinder filling is a bit random now, but should really changewith
Quoted text (12 lines)
> engine speed of course as it follows the torque curve. That should really > transform the sound as you rev up through the rpm's :-) > > This will probably be in my demo, scheduled to be released in 2413 ;-) > > > Todd Wasson > Racing Software > http://PerformanceSimulations.com > My car sim > http://performancesimulations.com/scnshot4.htm >Quoted text (11 lines)
>Are you going to model engine vibration too? To me this is the >characterstic that really sets the sound of a V8 apart from a V12, for >example. The vibration orders are the thing that is really different, >otherwise it's all just rpm x no. of cylinders. Plus I have noticed that on >race broadcasts you can really hear some harsh engine vibration on decels, >which is something that I feel is missing from all the sims I have ever >played. Seems like most sims use the same noise for accel and decel, but >maybe filter it a bit and add backfire to the decels. It should be more >different than that. > >J. Todd Wasson wrote:
> http://performancesimulations.com/files/EngineSoundModel.zip
>
> Physically based sound has been done before, of course. There was the Stacatto
> engine demo, which took an approach like this, but it's interesting how
> different this sounds. There is a lot of room for other stuff to be put in
> (I've got plenty of ideas). Keep in mind this is a relatively simple model :-D
Nice! From my first impression the sound would need some low-pass
filtering...
You know, I've been using commercial software that produces worse sound
than that of your prototype, GT-Power...
http://www.gtisoft.com/
They give you the opportunity to even model the sound based on the
layout of the muffler. But it sound verrrry synthetic.
What is your model based on? A first order simple thermodynamic ODE
coupled to a stiff crankshaft which is represented
by a second degree ODE which basically is Newton's equations, but for
rotation? Or is it even simpler?
From my own experience in modelling performed in scope of my own
research in engine control I could advise you to use a parametric
pressure model which probably will speed up your simulations a bit... It
is described in SAE Technical Paper 2002-01-0371, written by Lars
Eriksson and Ingemar Andersson. You could then try to model the rest of
the dynamics in pipes and such by formulating differential equations and
then discretizing these ending up with a computationally efficient
recursion algorithm... It might work very nice indeed!
/Stefan Larsson
http://www.s2.chalmers.se/~last
(remove nospam in e-mail to reply)
Absolutly Awesome,wow the hairs on the back of my head stood up,fantastic
can't wait to hear this sound in a sim.regards
skell
"J. Todd Wasson" <[email hidden]> wrote in message
news:[email hidden]...
> I've often wondered if it would be possible to model an engine at a simple
> level in real time. What if you modelled eight (or whatever) pistonsactually
> moving up and down in the cylinders, forcing air through the exhaustsystem to
> produce sound dynamically in real time?
>
> I decided to go ahead and give it a shot and see what it would sound like.
> What you're listening to in the samples below are various 5.7 liter V-8engines
> with no exhaust headers (basically eight very short straight pipes):
>
> http://performancesimulations.com/files/EngineSoundModel.zip
>
> Physically based sound has been done before, of course. There was theStacatto
> engine demo, which took an approach like this, but it's interesting how
> different this sounds. There is a lot of room for other stuff to be putin
> (I've got plenty of ideas). Keep in mind this is a relatively simplemodel :-D
>
> This might not run right on super fast computers. A friend of mine had
> problems on his 2.5Ghz system, but it ran fine on a couple of 1.1Ghzsystem at
Quoted text (11 lines)
> work as well as my 333Mhz laptop. > > Anyway, let me know what you think! > > > Todd Wasson > Racing Software > http://PerformanceSimulations.com > My car sim > http://performancesimulations.com/scnshot4.htm >J. Todd Wasson wrote:
> Hmm.. Hadn't thought of engine vibration. Not really sure how to do it off
> the top of my head. This is pretty CPU hungry as it is and will get a lot
> worse with the whole exhaust system in there, but I'll think about it.
You could maybe get some modelling inspiration from SAE Technical Paper
2000-01-0560: "Torque Estimation and Misfire Detection using Block
Angular Acceleration", by Jeffrey K. Ball et al.
/Stefan Larsson
http://www.s2.chalmers.se/~last
(remove nospam in e-mail to reply)
Quoted text (10 lines)
>Nice! From my first impression the sound would need some low-pass >filtering... >You know, I've been using commercial software that produces worse sound >than that of your prototype, GT-Power... > >http://www.gtisoft.com/ > >They give you the opportunity to even model the sound based on the >layout of the muffler. But it sound verrrry synthetic. >>Absolutly Awesome,wow the hairs on the back of my head stood up,fantastic
>can't wait to hear this sound in a sim.regards
>skell
Thanks! :-)
Todd Wasson
Racing Software
http://PerformanceSimulations.com
My car sim
http://performancesimulations.com/scnshot4.htm
J. Todd Wasson wrote:
But it might be more accurate for engineering... I haven't got the
opportunity to compare with an engine that corresponds to the model.
I've noticed a difference in approach between "gaming industry" and
engineering.
Ok, I'm thinking in a very different way... Since I am working with
dynamic systems every day it is natural for me to formulate everything
as large models an then trying to simplify them using different
model reduction methods. My idea was to simulate the engine as a
simple system and just coupling the sound directly to the engine RPM.
The engine dynamics would then be incorporated in the simulation of the
engine as a whole.
88 kHz might be a bit high for physical simulations... But it might be
possible to approximate the pressure variation in the cylinder using a
cosine function, or even a quadratic function like x^2. I've already
tried to play a sequence of synthesized pressures two years ago, but it
didn't sound very good. Sounded much like playing abs(cos(x)).
I think you should go for the full model and then simplify it by trying
to get a grip of which components that matter.
Yep... It's like numerical integration, but more general. If you
formulate a linear continous differential system you can discretize it
by e.g. first Laplace transform it and the apply a discretization
transform into the Z-transform. Yes, I know it sounds horrible, but it
is actually quite simple once you understand the what's behind the
nomenclature.
By "recursive" I don't mean recursive in code, but in the algorithm...
Like: y(k+1) = a0 * y(k) + a1 * y(k-1) + a2 * y(k-2) + ...,
which will be calculated once for every iteration.
It will depend on old values which already has been calculated which
makes it efficent. The coefficients a0, a1, ... can be dependent of
different states in the engine, like RPM, pressure an so forth...
> If I'm missing your point though, please expand on it. Your thoughts on this
> are interesting, and I appreciate your compliments!
My point is that if you first formulate the physical system as a large
system of differential equations (which is the hardest part) it is then
quite simple to reduce it all into a couple of cryptic recursive
equations as the one above that has to be calculated often enough. :)
There are many known powerful methods for doing this.
Hmm... I made a quick search in the SAE Digital Library and found:
SAE 2000-25-0255, Interactive vehicle interior sound simulation.
SAE 1999-01-1809, A sound simulation technique used for the predicition
of passenger compartment noise.
SAE 968054 , Simulation and sound quality evaluation of car
interior noise for JARI driving simulator.
SAE 951755 , Numerical simulation of exhaust flows and tailpipe
noise of a small single-cylinder diesel engine.
etc. etc...
There seems to be a lot of literature on this subject. It appears
that most of the simulation techniques are based on simulation of
the flow of gas in the pipes. 1-D models seems to be sufficient.
Some even includes Helmholtz resonance simulation (resonances in
the intake pipes due to valve opening and closing if I remember
right).
Well, this do seem as a really interesting subject indeed! But I have
to get back to work now. :(
--
/S
/* http://www.s2.chalmers.se/~last */
(remove "nospam" from email to reply)
Quoted text (8 lines)
>>They give you the opportunity to even model the sound based on the >>layout of the muffler. But it sound verrrry synthetic. > > Interesting. I think it would be pretty simple to include a basic muffler > model (at least a vibrating muffler anyway). I wonder how that would sound. > This isn't a 3D system though like the gti software most likely is, so it's > interesting that you find it sounding better even though it's far simpler, > probably.Quoted text (12 lines)
> Simpler. Volume changes in the cylinder are controlled directly by engine > speed, which itself is artificially changed in the demos. The acceleration you > hear is constant through each gear and really just a special effect more than > anything else in those demos. For driving sims, however, you should be able to > simply feed the engine RPM directly into the sound function and let it do its > thing. That's of course a function of all the car's setup parameters and so > forth. The engine inertia, gearing, rotational acceleration is all part of the > vehicle model, not the engine sound system. Basically, you say "for the next > period of time where the sound buffer is being filled, spin the engine at xxx > rpm and let it accelerate at xxx rpm/sec^2." > > The actual acceleration would be handled in the vehicle model.Quoted text (10 lines)
> Thanks for the tip. I'll look into that. I have to keep in mind here though > that those demos are running at over 88,000 hz and are done for eight > cylinders. That's going to be at least 176,000 * number_of_operations per > second per cylinder and per tube section, so the feasibility of having it run > in real time with graphics and so on for a driving sim is yet to be seen. The > current version would run just fine, I think. The full blown version of what > I've got in mind would probably be great for a Playstation 3 or other rumored > multi-processor systems possibly in planning, but it might need to be > simplified a bit for PC games (which would still be beefed up from what you > heard.)Quoted text (9 lines)
>>You could then try to model the rest of >>the dynamics in pipes and such by formulating differential equations and >>then discretizing these ending up with a computationally efficient >>recursion algorithm... It might work very nice indeed! > > I have no idea how to formulate a differential equation, let alone discretize > it. I'd have to look that up in a dictionary to even know what you meant ;-) > At least, if I've done it before, I didn't know that's what I was doing :-) > Sort of like numerical integration, I guess...Quoted text (7 lines)
> I'm not sure if this is the place for a recursive algorithm though because the > number of nodes in the mesh might have to remain small. As it is, the demos > only have 8 control volumes and 8 boundaries to an infinite volume constant > pressure zone (one for each cylinder). What you're effectively hearing is the > sound at the exhaust valve rather than at the end of any of the > not-yet-implemented pipes. I've got a plan though for that already as far as > linking pipes and so forth is concerned.Quoted text (12 lines)
>J. Todd Wasson wrote: > >> Hmm.. Hadn't thought of engine vibration. Not really sure how to do it >off >> the top of my head. This is pretty CPU hungry as it is and will get a lot >> worse with the whole exhaust system in there, but I'll think about it. > >You could maybe get some modelling inspiration from SAE Technical Paper >2000-01-0560: "Torque Estimation and Misfire Detection using Block >Angular Acceleration", by Jeffrey K. Ball et al. > >/Stefan LarssonJ. Todd Wasson wrote:
> Excellent paper! Thanks a lot. I went ahead and threw in some random
> vibration after reading it (yes, it sparked some ideas and inspiration; quite a
> lot actually :-D). I'm running this on my laptop both with and without
> mediocre quality headphones, so haven't heard what it sounds like on actual
> speakers. Is there any bass to this at all?
Nice to be able to help!
> I think I got rid of the static problem. Seems that the exhaust valves were
> not closing correctly. They sort of were and were not at the same time ;-)
>
> http://performancesimulations.com/files/ENGIN~18.EXE
It gets better and better! It is starting to sound very convincing,
but still a bit synthetic. I guess you need some "slower" dynamics
(variations) incorporated too? Keep up the good work!
--
/S
/* http://www.s2.chalmers.se/~last */
(remove "nospam" from email to reply)


































