Race Sim Central
Rec.Autos.Simulators Archive

Sim Experiment- Real time engines part 2

23 posts by 8 people · 03 May 2003 00:46 UTC - 18 May 2003 08:27 UTC

Notable threadTodd Wasson's real-time engine sound simulation

Todd Wasson posted improved samples from his experiment generating engine sound in real time by modelling each cylinder's pressure. Ashley McConnell and others praised the progress though it still sounded somewhat synthetic and lacked bass. Engine control researcher Stefan Larsson discussed combustion pressure modelling and cycle-to-cycle variation, and Todd explained his simplified approach.

With J. Todd Wasson (Performance Simulations)

physics/realism debate

Automated summary.

J. Todd Wasson 03 May 2003 00:46 UTC#69250
Hi guys, Found and fixed a goof up I made that caused the exhaust valve to act as though it was sort of closing and not closing at the same time. This seemed to be the reason for all the static. Second, the amount of cylinder filling is now a function of rpm (volumetric efficiency changes as the engine revs through its range). Sorry, there's no slider controls or anything yet :-) I'd like to get your input on this one! http://performancesimulations.com/files/EngineSoundModel2.zip By the way, I goofed up when compiling a couple of these so the names are switched around on maybe two or three of these. EngineTame.exe is a high revving racing engine (all 5.7 liter V-8's again), for instance. The original EngineTame.exe vanished.. Todd Wasson Racing Software http://PerformanceSimulations.com My car sim http://performancesimulations.com/scnshot4.htm
> > I'd like to get your input on this one! > > http://performancesimulations.com/files/EngineSoundModel2.zip > Hi Todd, Cant believe no one has commented on this. Great piece of work! Its definitely developing into something very nice. There is still something slightly synthetic sounding about it, not sure what it is, but its progressing nicely in the right direction. Keep up the good work! All the best, Ash http://www.siroccoracing.com
I meant to comment... but my line crapped out, and I lost the thread... Outstanding improvement from the first set... Any chance you can vary the tones/pitches for different types of motors... the big V8 sound you seem to have is great though... Rich
Quoted text (18 lines)>> >> I'd like to get your input on this one! >> >> http://performancesimulations.com/files/EngineSoundModel2.zip >> > >Hi Todd, > >Cant believe no one has commented on this. Great piece of work! Its >definitely developing into something very nice. There is still something >slightly synthetic sounding about it, not sure what it is, but its >progressing nicely in the right direction. Keep up the good work! > >All the best, >Ash >http://www.siroccoracing.com > >
Thanks Ash :-) There is a lot to do on it yet that should really transform the sound. Whether it will transform it into something better or worse remains to be seen of course :-) Todd Wasson Racing Software http://PerformanceSimulations.com My car sim http://performancesimulations.com/scnshot4.htm
> > Thanks Ash :-) There is a lot to do on it yet that should reallytransform the > sound. Whether it will transform it into something better or worseremains to
Quoted text (8 lines)> be seen of course :-) > > > Todd Wasson > Racing Software > http://PerformanceSimulations.com > My car sim > http://performancesimulations.com/scnshot4.htm
Thats great news, cant wait to hear part 3!!! :))) All the best, Ash http://www.siroccoracing.com
> Hi guys, > > Found and fixed a goof up I made that caused the exhaust valve to act asthough > it was sort of closing and not closing at the same time. This seemed tobe the > reason for all the static. Second, the amount of cylinder filling is nowa > function of rpm (volumetric efficiency changes as the engine revs throughits > range). > Todd, Excellent work you are doing, any more insight of how you are doing it? I think you said you based it on some papers, any public references to them? The sound is convincing although still a bit synthetic. Cheers and keep up the good work! Tom
Quoted text (8 lines)> > > Todd Wasson > Racing Software > http://PerformanceSimulations.com > My car sim > http://performancesimulations.com/scnshot4.htm >
It does sound nice... The only thing that gets me, though, is there just seems to be a general lack of bass. Having grown up driving 350 Chevy's (5.7L goodness), I can tell you that not a one has that little bass to the sound... I oughta figure this out for myself one of these days, though...so I can figure out what exactly makes my brother's '94 Z28 sound the way it does, so I can make my '70 GMC sound similar, hehe. :D Milhouse "J. Todd Wasson" <[email hidden]> wrote in message news:[email hidden]... > Hi guys, > > Found and fixed a goof up I made that caused the exhaust valve to act asthough > it was sort of closing and not closing at the same time. This seemed tobe the > reason for all the static. Second, the amount of cylinder filling is nowa > function of rpm (volumetric efficiency changes as the engine revs throughits
Quoted text (11 lines)> range). > > Sorry, there's no slider controls or anything yet :-) > > I'd like to get your input on this one! > > http://performancesimulations.com/files/EngineSoundModel2.zip > > By the way, I goofed up when compiling a couple of these so the names are > switched around on maybe two or three of these. EngineTame.exe is a high > revving racing engine (all 5.7 liter V-8's again), for instance. The
original
Quoted text (9 lines)> EngineTame.exe vanished.. > > > Todd Wasson > Racing Software > http://PerformanceSimulations.com > My car sim > http://performancesimulations.com/scnshot4.htm >
"J. Todd Wasson" <[email hidden]> wrote in message news:[email hidden]...
Quoted text (20 lines)> >> > >> I'd like to get your input on this one! > >> > >> http://performancesimulations.com/files/EngineSoundModel2.zip > >> > > > >Hi Todd, > > > >Cant believe no one has commented on this. Great piece of work! Its > >definitely developing into something very nice. There is still something > >slightly synthetic sounding about it, not sure what it is, but its > >progressing nicely in the right direction. Keep up the good work! > > > >All the best, > >Ash > >http://www.siroccoracing.com > > > > > > Thanks Ash :-) There is a lot to do on it yet that should really
transform the > sound. Whether it will transform it into something better or worseremains to > be seen of course :-) > Just ran across this - very nicely done, with some interesting effects, but through my SB Audigy it's still super-static-y. Love to hear what it must sound like clear... Thanks for sharing, SB
Quoted text (9 lines)>Todd, > >Excellent work you are doing, any more insight of how you are doing it? I >think you said you based it on some papers, any public references to them? >The sound is convincing although still a bit synthetic. > >Cheers and keep up the good work! >Tom >
Thanks, Tom :-) The system works basically by modelling all the cylinders individually as the pistons move up and down (connecting rod length effects this too, but I can't hear a difference). The exhaust valve opens and the gases are forced out. What you're actually hearing is the cylinder pressure, not the exhaust tip pressure as you should. I think this is probably why it sounds a little synthetic. For most of the loop the curve is much like a sine wave, but you get a wobble in the waveform when the valve opens. That part wasn't done with any papers, but the vibration in the formula 1 engine sample was inspired by an SAE paper Stefan (last name escapes me at the moment) referred me to after Haqsau asked about it. I don't think that would have dawned on me any time soon, so thanks guys :-) Basically it's letting the engine block shift back and forth randomly a couple degrees as it's spinning (only in the F-1 sample). This causes the sound to change by altering the piston position in an irregular fashion, so I think it would be very cool to tie this into the car's orientation so when you hit a curb or something, you get that little "jumpy" sound as you accelerate away. Of course that would be most noticeable with stiff springs :-) Todd Wasson Racing Software http://PerformanceSimulations.com My car sim http://performancesimulations.com/scnshot4.htm
>It does sound nice... > >The only thing that gets me, though, is there just seems to be a general >lack of bass. Having grown up driving 350 Chevy's (5.7L goodness), I can >tell you that not a one has that little bass to the sound... > Interesting. I get a good amount of bass on the speakers at work. Somebody there has a big subwoofer hooked up to his system, so I'll have to try it on that and see what happens. >I oughta figure this out for myself one of these days, though...so I can >figure out what exactly makes my brother's '94 Z28 sound the way it does, so >I can make my '70 GMC sound similar, hehe. :D > Yes, that would be cool :-) Todd Wasson Racing Software http://PerformanceSimulations.com My car sim http://performancesimulations.com/scnshot4.htm
Quoted text (7 lines)> >I meant to comment... but my line crapped out, and I lost the thread... >Outstanding improvement from the first set... Any chance you can vary the >tones/pitches for different types of motors... the big V8 sound you seem to >have is great though... > >Rich
I've tried a few different types of motors and they sound ok, I guess, but the V8's are my favorite so you'll hear lots of them :-) I set it up like a Harley Davidson early on and it sounded pretty convincing at low speed. (All the pistons fire at the same time, brap brap brap). When I get time (I'm leaving for the Indy 500 in a few days, woohoo!), I'll see if I can post some other engine types. I'm more anxious to get an exhaust system in and see how it sounds. It should really change it a lot, but it might wind up being pretty lousy :-) Todd Wasson Racing Software http://PerformanceSimulations.com My car sim http://performancesimulations.com/scnshot4.htm
Quoted text (9 lines)>Just ran across this - very nicely done, with some interesting effects, but >through my SB Audigy it's still super-static-y. Love to hear what it must >sound like clear... > >Thanks for sharing, > >SB > >
Thanks, Steve. I'll make a point of putting up some that don't have as much static. To me it starts sounding a bit more synthetic without the cycle by cycle variation in cylinder filling (which causes some of the static). Todd Wasson Racing Software http://PerformanceSimulations.com My car sim http://performancesimulations.com/scnshot4.htm
J. Todd Wasson wrote:
Quoted text (7 lines)> The system works basically by modelling all the cylinders individually as the > pistons move up and down (connecting rod length effects this too, but I can't > hear a difference). The exhaust valve opens and the gases are forced out. > What you're actually hearing is the cylinder pressure, not the exhaust tip > pressure as you should. I think this is probably why it sounds a little > synthetic. For most of the loop the curve is much like a sine wave, but you > get a wobble in the waveform when the valve opens.
Nice... Exactly how are modelling the pressure? Template curves or thermodynamics? I am modelling cycle to cycle variations in combustion using inspirations from SAE 2002-01-0371. Here the pressure is modelled using one "compression curve", due to piston compression, and one "expansion curve", due to combustion. p_c(CAD) = p_ivc (V_ivc / V(CAD))^k_c, where k_c is the polytropic coefficient for the compression. p_e(CAD) = p_3 (V_3 / V(CAD))^k_e, where k_e is the polytropic coefficient for the expansion. "3" is the point of highest pressure and lowest volume in the Otto cycle. ^ 3 | ** | * **log10(p) | * ** 4 | 2** ** | ** * | *** | 1 +------------------> log10(V) The total (approximate) pressure curve is then generated using a "pressure ratio function" of your own choice. It is common to use the Wiebe function, but I have been using an ordinary sigmoid: f(x) = 1/(1+exp(k1*(CAD-k2)), (for simplicity). The design variables are p_ivc, p_3, k1 and k2. By adding noise to k1 and k2 it is possible to simulate cycle to cycle variations. k1 will simulate influence on the combustion rate and k2 variations in ignition delay. The total pressure becomes (an interpolation between p_c and p_e)): p(CAD) = f(CAD) * p_e(CAD) + (1 - f(CAD)) * p_c(CAD). > That part wasn't done with any papers, but the vibration in the formula 1 > engine sample was inspired by an SAE paper Stefan (last name escapes me at the > moment) referred me to after Haqsau asked about it. I don't think that would > have dawned on me any time soon, so thanks guys :-) :) > Basically it's letting the engine block shift back and forth randomly a couple > degrees as it's spinning (only in the F-1 sample). This causes the sound to > change by altering the piston position in an irregular fashion, so I think it > would be very cool to tie this into the car's orientation so when you hit a > curb or something, you get that little "jumpy" sound as you accelerate away. > Of course that would be most noticeable with stiff springs :-) How about filtering the pressure? Why not apply a digital filter to the pressure and try to play around with some filter parameters to obtain nice sounds? I don't know, but phasing effects may give a more convincing sound maybe? Try playing around with some discretised analog filters, like Butterworth and such and see what you might come up with. I would recommend you to make prototypes in e.g. Scilab or Octave, which both are free high-level languages for scientific computing. It makes testing much easier! -- /S /* http://www.s2.chalmers.se/~last */ (remove "nospam" from email to reply)
I really got to go back and finish my high school education!!! I was really good with maths and physics, but been away from it so long, you lost me after the first paragraph. I can remember when that used to make sense to me:o))) Steve
Steve Whitty wrote: > I really got to go back and finish my high school education!!! I was really > good with maths and physics, but been away from it so long, you lost me > after the first paragraph. I can remember when that used to make sense to > me:o))) Sorry for that... Engine combustion modelling tends to get complicated quite fast. :P -- /S /* http://www.s2.chalmers.se/~last */ (remove "nospam" from email to reply)
> > I really got to go back and finish my high school education!!! I wasreally > > good with maths and physics, but been away from it so long, you lost me > > after the first paragraph. I can remember when that used to make senseto > > me:o))) > > Sorry for that... Engine combustion modelling tends to get complicated > quite fast. :P > Todd, Stefan, Thx for the explanation, but I don't understand how you do it so fast: at 10000rpm for 12 cyl's that's 150 cycles of 12 cyl's : are you computing pressures for them at every instance and then modelling the vibrations? Or... am I confused ;-) ? Is it the vibrations of the engine or of the air you are modelling? Computing the vibration radiation of an engine block seems like complicated to do in realtime or again... am I confused ? ;-) Cheers, Tom
>From: Stefan Larsson [email hidden] >Date: 5/16/03 1:53 AM Central Daylight Time >Message-id: <ba21s6$pn6$[email hidden]> > >J. Todd Wasson wrote: >For most of the loop the curve is much like a sine wave, but >you >> get a wobble in the waveform when the valve opens. > >Nice... Exactly how are modelling the pressure? Template curves or >thermodynamics? I'm using a very rough approximation for now: Cylinder(CylinderIndex).Pressure = Cylinder(CylinderIndex).Density / StandardDensityCold * 14.696 When the exhaust valve opens, the pressure is effectively increased by a factor of 5 to 7 artificially, so there's not really any work being done anywhere in the system. This keeps things very fast. Unless the exhaust model works as I hope there isn't much point in going with a more complete in-cylinder model with proper thermodynamics, I figure. It's got to stay simple enough to run in real time on my 333Mhz laptop with 3D graphics and physics running on top of it too. I am modelling cycle to cycle variations in combustion
Quoted text (22 lines)>using inspirations from SAE 2002-01-0371. Here the pressure is modelled >using one "compression curve", due to piston compression, and one >"expansion curve", due to combustion. > >p_c(CAD) = p_ivc (V_ivc / V(CAD))^k_c, where k_c is the polytropic > > coefficient for the compression. >p_e(CAD) = p_3 (V_3 / V(CAD))^k_e, where k_e is the polytropic > coefficient for the expansion. >"3" is the point of highest pressure and lowest volume in the Otto cycle. > ^ 3 > | ** > | * ** >log10(p) | * ** 4 > | 2** ** > | ** * > | *** > | 1 > +------------------> > log10(V) > >
I hadn't heard of using charts, that's a neat idea and should be feasible perhaps for a real time system. I'll look into it once the exhaust system is working. I did use those functions in an in-cylinder combustion model experiment several years ago (with the Wiebe function for mass fraction burned you described) and it worked pretty well. This was back in my QBasic days though :-P If I recall correctly, I spent quite a bit of time developing a formula to approximate the variation of the ratio of specific heat capacities throughout the temperature range. Of course, I might have just extrapolated a bunch of data points, I don't remember for sure.
Quoted text (17 lines)>The total (approximate) pressure curve is then generated using a >"pressure ratio function" of your own choice. It is common to use >the Wiebe function, but I have been using an ordinary sigmoid: > >f(x) = 1/(1+exp(k1*(CAD-k2)), > >(for simplicity). > >The design variables are p_ivc, p_3, k1 and k2. By adding noise to >k1 and k2 it is possible to simulate cycle to cycle variations. >k1 will simulate influence on the combustion rate and k2 variations >in ignition delay. > >The total pressure becomes (an interpolation between p_c and p_e)): > >p(CAD) = f(CAD) * p_e(CAD) + (1 - f(CAD)) * p_c(CAD). >
Interesting. I'll archive this and have another look when I get back to (attempting) a more complete engine model (non-real time). For now all the system is doing is randomly altering the cylinder mass from cycle to cycle. It gives a little bit of texture to the sound, but also static if you go too far with it.
Quoted text (23 lines)>> That part wasn't done with any papers, but the vibration in the formula 1 >> engine sample was inspired by an SAE paper Stefan (last name escapes me at >the >> moment) referred me to after Haqsau asked about it. I don't think that >would >> have dawned on me any time soon, so thanks guys :-) > >:) > >> Basically it's letting the engine block shift back and forth randomly a >couple >> degrees as it's spinning (only in the F-1 sample). This causes the sound >to >> change by altering the piston position in an irregular fashion, so I think >it >> would be very cool to tie this into the car's orientation so when you hit a >> curb or something, you get that little "jumpy" sound as you accelerate >away. >> Of course that would be most noticeable with stiff springs :-) > >How about filtering the pressure? Why not apply a digital filter to the >pressure and try to play around with some filter parameters to obtain >nice sounds?
I don't know, but phasing effects may give a more >convincing sound maybe? I'm not sure I'm following you here. Can you elaborate? Try playing around with some discretised >analog filters, like Butterworth and such and see what you might come >up with. I would recommend you to make prototypes in e.g. Scilab or >Octave, which both are free high-level languages for scientific >computing. It makes testing much easier! > I'll take a look, thanks. Although this isn't really too difficult, I think. What's killing me is the exhaust system right now. I'll have to sit down and look at it again when I get some time. Thanks again for sharing! Todd Wasson Racing Software http://PerformanceSimulations.com My car sim http://performancesimulations.com/scnshot4.htm
Quoted text (14 lines)>From: "Tom De Muer" [email hidden] >Date: 5/16/03 2:15 PM Central >> Sorry for that... Engine combustion modelling tends to get complicated >> quite fast. :P >> > >Todd, Stefan, > >Thx for the explanation, but I don't understand how you do it so fast: at >10000rpm for 12 cyl's that's 150 cycles of 12 cyl's : are you computing >pressures for them at every instance and then modelling the vibrations? >Or... am I confused ;-) ? >
The vibrations right now in my system are simply random numbers thrown into the crank every loop. The system is running at 44khz (CD quality sound), so that means I pick a random number 44,000 times per second and add it to the crankshaft rotation. That's not proper really of course; it would be better to calculate the torque as it varies every cycle, then use little springs for the engine mounts and allow it to rock back and forth with the engine inertia. That's a lot of calculations to do 44,000 times/sec though. The exhaust system is first on the to-do list now. If there's enough CPU power left over I might try something like that, but my hunch is that you couldn't hear a difference anyway. Either the engine is vibrating or it's not. You can cheat this way in games. That's why they're fun to write ;-) >Is it the vibrations of the engine or of the air you are modelling? The engine block. All it's doing is adding maybe -2 to 2 degrees every loop to the regular crankshaft position. This goofs up the exhaust profile enough to hear a little wobbling in the tone. Todd Wasson Racing Software http://PerformanceSimulations.com My car sim http://performancesimulations.com/scnshot4.htm
J. Todd Wasson wrote:
Quoted text (7 lines)> When the exhaust valve opens, the pressure is effectively increased by a factor > of 5 to 7 artificially, so there's not really any work being done anywhere in > the system. This keeps things very fast. Unless the exhaust model works as I > hope there isn't much point in going with a more complete in-cylinder model > with proper thermodynamics, I figure. It's got to stay simple enough to run in > real time on my 333Mhz laptop with 3D graphics and physics running on top of it > too.
Wouldn't the pressure decrease when you open the exhaust valve, since the gas expands? Or am I missing something?
Quoted text (9 lines)> I hadn't heard of using charts, that's a neat idea and should be feasible > perhaps for a real time system. I'll look into it once the exhaust system is > working. I did use those functions in an in-cylinder combustion model > experiment several years ago (with the Wiebe function for mass fraction burned > you described) and it worked pretty well. This was back in my QBasic days > though :-P If I recall correctly, I spent quite a bit of time developing a > formula to approximate the variation of the ratio of specific heat capacities > throughout the temperature range. Of course, I might have just extrapolated a > bunch of data points, I don't remember for sure.
You've been into this for a time i guess... I started working on these things in 2000 when I started my PhD-studies in engine control...
Quoted text (9 lines)>>The total pressure becomes (an interpolation between p_c and p_e)): >> >>p(CAD) = f(CAD) * p_e(CAD) + (1 - f(CAD)) * p_c(CAD). > Interesting. I'll archive this and have another look when I get back to > (attempting) a more complete engine model (non-real time). For now all the > system is doing is randomly altering the cylinder mass from cycle to cycle. It > gives a little bit of texture to the sound, but also static if you go too far > with it.
Note that this is a very approximate formulation of the combustion. If you want a better formulation, for off-line purposes, you should use a dynamical combustion model.
Quoted text (9 lines)>>How about filtering the pressure? Why not apply a digital filter to the >>pressure and try to play around with some filter parameters to obtain >>nice sounds? > >>I don't know, but phasing effects may give a more >>convincing sound maybe? > > > I'm not sure I'm following you here. Can you elaborate?
You are not familiar with the concept of filtering? Imagine your top-of-the-line stereo at home. I guess that you might have an "equalizer" on the front panel somewhere. The setting of this sets the frequency properties of an analogue filter which affects the sound in different registers (like removing or enhancing the bass). It is possible to filter signals by quite simple means by designing digital filters. One way of obtaining a better sound could be to first analyse the frequency contents of your synthesized engine sound and also recording the sound of a real muffler at similar conditions (desireable at a constant RPM). Compare the frequency spectra of your synthesized sound and the real muffler sound. It is then possible to try to design a filter that transforms the synthesized spectrum into the spectrum of the muffler using algorithms like the Remez-algorithm (I think it is implemented in Octave and SciLab). I could help you with this if you like. Just hand me a clean recording of a muffler (if it is possible for you to obtain) and a synthesized sound (wav-files) for the same type of engine. This would be known as "black-box modelling" of what happens between the combustion and the muffler. Physical modelling is, most of the time, better due to the deeper understanding of the system it results in.
Quoted text (9 lines)>>Try playing around with some discretised >>analog filters, like Butterworth and such and see what you might come >>up with. I would recommend you to make prototypes in e.g. Scilab or >>Octave, which both are free high-level languages for scientific >>computing. It makes testing much easier! > I'll take a look, thanks. Although this isn't really too difficult, I think. > What's killing me is the exhaust system right now. I'll have to sit down and > look at it again when I get some time.
Hmm... I don't know if phasing effects is interersting. They might be, i.e. different frequencies of pressure waves travel at different speeds through the exhaust system? Synthesizers use filters and phasing to achieve strange sound effects you know... > Thanks again for sharing! No prob... It's an interesting subject! -- /S /* http://www.s2.chalmers.se/~last */ (remove "nospam" from email to reply)
J. Todd Wasson wrote:
Quoted text (11 lines)> The vibrations right now in my system are simply random numbers thrown into the > crank every loop. The system is running at 44khz (CD quality sound), so that > means I pick a random number 44,000 times per second and add it to the > crankshaft rotation. That's not proper really of course; it would be better to > calculate the torque as it varies every cycle, then use little springs for the > engine mounts and allow it to rock back and forth with the engine inertia. > That's a lot of calculations to do 44,000 times/sec though. The exhaust system > is first on the to-do list now. If there's enough CPU power left over I might > try something like that, but my hunch is that you couldn't hear a difference > anyway. Either the engine is vibrating or it's not. You can cheat this way in > games. That's why they're fun to write ;-)
CD Quality = 44.1 kHz? => 44 100 times/sec ;) -- /S /* http://www.s2.chalmers.se/~last */ (remove "nospam" from email to reply)
Quoted text (27 lines)>From: Stefan Larsson [email hidden] >Date: 5/17/03 10:16 AM Central Daylight Time >Message-id: <ba5joc$bl0$[email hidden]> > >J. Todd Wasson wrote: > >> The vibrations right now in my system are simply random numbers thrown into >the >> crank every loop. The system is running at 44khz (CD quality sound), so >that >> means I pick a random number 44,000 times per second and add it to the >> crankshaft rotation. That's not proper really of course; it would be >better to >> calculate the torque as it varies every cycle, then use little springs for >the >> engine mounts and allow it to rock back and forth with the engine inertia. >> That's a lot of calculations to do 44,000 times/sec though. The exhaust >system >> is first on the to-do list now. If there's enough CPU power left over I >might >> try something like that, but my hunch is that you couldn't hear a >difference >> anyway. Either the engine is vibrating or it's not. You can cheat this >way in >> games. That's why they're fun to write ;-) > >CD Quality = 44.1 kHz? => 44 100 times/sec ;)
Floating point round off error ;-) Todd Wasson Racing Software http://PerformanceSimulations.com My car sim http://performancesimulations.com/scnshot4.htm
Quoted text (19 lines)>From: Stefan Larsson >J. Todd Wasson wrote: > >> When the exhaust valve opens, the pressure is effectively increased by a >factor >> of 5 to 7 artificially, so there's not really any work being done anywhere >in >> the system. This keeps things very fast. Unless the exhaust model works >as I >> hope there isn't much point in going with a more complete in-cylinder model >> with proper thermodynamics, I figure. It's got to stay simple enough to >run in >> real time on my 333Mhz laptop with 3D graphics and physics running on top >of it >> too. > >Wouldn't the pressure decrease when you open the exhaust valve, since >the gas expands? Or am I missing something? >
I mean the pressure is effectively increased artificially as though combustion had occured. Of course when the exhaust valve opens the cylinder pressure takes a nose dive.
Quoted text (17 lines)>> I hadn't heard of using charts, that's a neat idea and should be feasible >> perhaps for a real time system. I'll look into it once the exhaust system >is >> working. I did use those functions in an in-cylinder combustion model >> experiment several years ago (with the Wiebe function for mass fraction >burned >> you described) and it worked pretty well. This was back in my QBasic days >> though :-P If I recall correctly, I spent quite a bit of time developing a >> formula to approximate the variation of the ratio of specific heat >capacities >> throughout the temperature range. Of course, I might have just >extrapolated a >> bunch of data points, I don't remember for sure. > >You've been into this for a time i guess... I started working on these >things in 2000 when I started my PhD-studies in engine control... >
I don't have any formal education in this area, I just read a bit here and there.
Quoted text (16 lines)>>>The total pressure becomes (an interpolation between p_c and p_e)): >>> >>>p(CAD) = f(CAD) * p_e(CAD) + (1 - f(CAD)) * p_c(CAD). > >> Interesting. I'll archive this and have another look when I get back to >> (attempting) a more complete engine model (non-real time). For now all the >> system is doing is randomly altering the cylinder mass from cycle to cycle. >It >> gives a little bit of texture to the sound, but also static if you go too >far >> with it. > >Note that this is a very approximate formulation of the combustion. If >you want a better formulation, for off-line purposes, you should use a >dynamical combustion model. >
Oh, ok. Heywood's "Internal Combustion Engine Fundamentals" covers a lot of different methods. I've only experimented with the Wiebe function at this point.
Quoted text (31 lines)>>>How about filtering the pressure? Why not apply a digital filter to the >>>pressure and try to play around with some filter parameters to obtain >>>nice sounds? >> >>>I don't know, but phasing effects may give a more >>>convincing sound maybe? >> >> >> I'm not sure I'm following you here. Can you elaborate? > >You are not familiar with the concept of filtering? Imagine your >top-of-the-line stereo at home. I guess that you might have an >"equalizer" on the front panel somewhere. The setting of this sets the >frequency properties of an analogue filter which affects the sound in >different registers (like removing or enhancing the bass). >It is possible to filter signals by quite simple means by designing >digital filters. One way of obtaining a better sound could be to >first analyse the frequency contents of your synthesized engine sound >and also recording the sound of a real muffler at similar conditions >(desireable at a constant RPM). Compare the frequency spectra of >your synthesized sound and the real muffler sound. It is then possible >to try to design a filter that transforms the synthesized spectrum >into the spectrum of the muffler using algorithms like the >Remez-algorithm (I think it is implemented in Octave and SciLab). >I could help you with this if you like. Just hand me a clean recording >of a muffler (if it is possible for you to obtain) and a synthesized >sound (wav-files) for the same type of engine. >This would be known as "black-box modelling" of what happens between >the combustion and the muffler. Physical modelling is, most of the time, >better due to the deeper understanding of the system it results in. >
Hmmm... Ok. I don't think this is feasible in real time though (on a PC), is it?
Quoted text (27 lines)>>>Try playing around with some discretised >>>analog filters, like Butterworth and such and see what you might come >>>up with. I would recommend you to make prototypes in e.g. Scilab or >>>Octave, which both are free high-level languages for scientific >>>computing. It makes testing much easier! > >> I'll take a look, thanks. Although this isn't really too difficult, I >think. >> What's killing me is the exhaust system right now. I'll have to sit down >and >> look at it again when I get some time. > >Hmm... I don't know if phasing effects is interersting. They might be, >i.e. different frequencies of pressure waves travel at different speeds >through the exhaust system? Synthesizers use filters and phasing to >achieve strange sound effects you know... > >> Thanks again for sharing! > >No prob... It's an interesting subject! > >-- >/S > >/* http://www.s2.chalmers.se/~last */ >(remove "nospam" from email to reply) >
Todd Wasson Racing Software http://PerformanceSimulations.com My car sim http://performancesimulations.com/scnshot4.htm
J. Todd Wasson wrote:
Quoted text (23 lines)>>You are not familiar with the concept of filtering? Imagine your >>top-of-the-line stereo at home. I guess that you might have an >>"equalizer" on the front panel somewhere. The setting of this sets the >>frequency properties of an analogue filter which affects the sound in >>different registers (like removing or enhancing the bass). >>It is possible to filter signals by quite simple means by designing >>digital filters. One way of obtaining a better sound could be to >>first analyse the frequency contents of your synthesized engine sound >>and also recording the sound of a real muffler at similar conditions >>(desireable at a constant RPM). Compare the frequency spectra of >>your synthesized sound and the real muffler sound. It is then possible >>to try to design a filter that transforms the synthesized spectrum >>into the spectrum of the muffler using algorithms like the >>Remez-algorithm (I think it is implemented in Octave and SciLab). >>I could help you with this if you like. Just hand me a clean recording >>of a muffler (if it is possible for you to obtain) and a synthesized >>sound (wav-files) for the same type of engine. >>This would be known as "black-box modelling" of what happens between >>the combustion and the muffler. Physical modelling is, most of the time, >>better due to the deeper understanding of the system it results in. > Hmmm... Ok. I don't think this is feasible in real time though (on a PC), is > it?
It is indeed... The design of the filter is done off-line, but its implementation is definitely possible in real-time, depending on the order of the filter. If you have a filter of order 10 you'll end up with a maximum of approximately 20 multiplications and additions for each iteration... -- /S /* http://www.s2.chalmers.se/~last */ (remove "nospam" from email to reply)

Sponsors

Affiliate Links

Sim Gaming Expo MOZA Racing Sim-Lab Fanatec TrakRacer Asetek Internet Privacy From NordVPN Dreamhost Capital One Credit Card Application Fanatical CDKeys Amazon Amazon UK Project Motor Racing iRacing Get your racing gloves, boots and more from Demon Tweeks. Enlist at Roberts Space Industries, developers of Star Citizen and Squadron 42


Back from the ashes since July, 2019. First created in 2001 with the merger of Legends Central (founded 1999) and simracing.dk.

A site by a sort of sim racer, for sim racers, about racing sims. News and information on both modern and historic sim racing software titles.

All products and licenses property of their respective owners.


Facebook Threads Bluesky Twitter Mastodon Instagram YouTube Tiktok Twitch Reddit Google News Apple News Subscribe via WordPress Flipboard eBay

Race Sim Central © 1999-2026 | Some links pay RSC a commission. Advertising does not equal endorsement.Cookie Policy