[LAD] Car engine sound emulation for future electic cars. ideas ?

David Olofson david at olofson.net
Sat Aug 2 02:32:23 UTC 2008


Hi there! Long time no see, etc... :-)

On Saturday 02 August 2008, Benno Senoner wrote:
[...]
> The sound generator should in theory take only one input variable,
> the motor's RPM (which can expressed as 0..100%) and then generate
> a sound with a frequency proportional to the RPM.

I think it'll need at least two parameters: rpm and throttle position. 
Even at a fixed rpm, an engine produces different (and usually much 
more) sound when you "step on it". Extremely tuned engines (long 
intake/exhaust overlap for maximum breathing at high rpms) also tend 
to sound pretty aggressive when engine braking in a certain rpm 
range.

There is another problem, though: Electric cars tend to have very few 
gears (commonly only one!), as they don't really need any, thanks to 
the extremely wide power band of electric motors. This makes it 
pretty hard to come up with a realistict combustion engine sounds, as 
it's not just the sound that's missing; it's the entire driving 
style!

I suppose you could just fake it by simulating shifts based on the 
speed and torque, but obviously, the sound cannot match the driving 
exactly. Well... Unless you simulate the whole thing; gears, clutch, 
narrow powerband and all - which, of course, would be entirely 
possible to do. :-)

(And here I've spent countless hours mating a real Ford Duratec V6 
engine with a Honda S2000 6-speed gearbox with an aluminum flywheel 
and a ceramitallic clutch in between... Oh, well. ;-)


As to the actual sound synthesis, I think the best bet would be a 
combination of methods. For a realistic sound, you *will* need 
multisampling (unless you go for physical modelling), because most of 
what makes up the characteristic sound of a properly built engine 
(including intake and exhaust) is resonances that stay at fixed 
frequencies, or change only slightly with the exhaust gas 
temperature. (Temperature changes the speed of sound, which becomes a 
pretty significant factor with the temperatures we're talking about 
here. That's part of the reason why it's so hard to calculate optimal 
headers, BTW...)

I've been thinking one might simulate an engine by modelling the 
headers and exhaust pipes as a number of resonant filters, and 
exciting that modell with noise bursts similar to what you hear from 
some old aircraft engines, which tend to have very, very 
short "stacks". You'd run the noise bursts as granular synthesis 
based on rpm, while tuning the exhaust resonances based on simulated 
exhaust gas temperature; that is, basically, higher frequencies when 
more power is produced.

Oh, don't forget that you'll need to decide how many cylinders you 
want, and give each one a unique sound (slight differences in 
amplitude and exhaust resonances; smaller differences for finely 
tuned engines), or it'll sound like a one cylinder engine reving 
insanely high! :-)

Also, typical american V8 engines (with 180° cranks, as opposed to the 
flat crank you'd find in a Ferrari V8) are pretty special, as they 
don't fire in a steady "every other bank" pattern, like most other V 
engines do. They sort of run as if each bank had two small cylinders 
and one large cylinder. You *can* make them run "properly", with a 
smooth, clean sound, but that requires a classic "180° exhaust 
system" (looooong tubes all around the engine; no good for high 
revs), or you need to turn the heads around so you can build a 
miniature 180° system between the heads. The latter can be seen on 
some old F1 cars, but I don't actually know where 180° systems are 
used. Low rev offroad applications...?


//David Olofson - Programmer, Composer, Open Source Advocate

.-------  http://olofson.net - Games, SDL examples  -------.
|        http://zeespace.net - 2.5D rendering engine       |
|       http://audiality.org - Music/audio engine          |
|     http://eel.olofson.net - Real time scripting         |
'--  http://www.reologica.se - Rheology instrumentation  --'



More information about the Linux-audio-dev mailing list