Friday, April 22, 2011

Long Time, But I Hear You... Differently

It's been a depressingly long time since I got anywhere on anything. However, as of late I redid the SONAR module. The new SONAR module (dubbed SONAR2) splits the frequency band into a hundred different bands. It also uses a more realistic propagation model, pulled from some university web site.

It includes a new waterfall diagram, which is fairly neat. According to the manual for a commercial submarine simulator, targets can be located by watching it's bearing change over time, figuring out the speed from the acoustical profile, combining the two gives distance, which can be a position and direction at a speed. Is there a cooler way to target torpedoes? Here's a screenshot of the new waterfall diagram, showing a ship as a dim thin vertical white band (the background noise is black):

Notice that the frequency profile for the ship is flat, from bottom to top. While the structure is in place for having a finite element analysis for calculating the ship noise profile, I don't actually know how to calculate the noise a propeller makes. It's harder than it sounds. I downloaded a neat little sound analyzer called Praat, which has support for all sorts of spectrograms. It hasn't led me to a solution yet, though. Below is my best attempt to imitate a two bladed helicopter in air using only sums of sines:

I know, it's not the best, but it's not all that bad. It has a mere four sine waves. Below is another audio clip that's a simple linear combination between 60Hz and 120Hz over the course of 30 seconds. To me it sounds like a propeller spinning up... Hopefully it's not just me.:
The second one demonstrates how you can (hopefully) determine speed from the spectrogram. This work is only for the propeller noise, so work will have to be done for the engines, the motors, the generators, arbitrary skin friction noise, and so on. One step at a time, I guess.

But, one step at a time as it may be, I still need to finish the first step. The first sound file is composed of four sines: 60Hz at 5dB, 160Hz at 8dB, 5Hz at 20dB, and 600Hz at -20dB. I pulled these waves from a spectrogram of a helicopter, and I just picked the first four strongest waves that seemed relevant to me at the time, and made up some other ones. In the original, there was a quiet spot at 5Hz. The levels of each of these waves was tweaked later, in Audacity.

One idea (on another note) I had was to run the audio data through Eureqa. Then Eureqa would figure out a set of sums of sines, which can easily converted to a series of frequencies and amplitudes. The problem with this is that it involves crunching millions of numbers in a genetic algorithm evolver - in other words, time and memory. I'm crunching away with the first sound file, my approximation, and it still hasn't gotten anywhere important. I'm using eight cores on this search, so hopefully it finds something. I'll let it run overnight, then check it again.

Another idea I had was to use a computational fluid dynamics program to calculate the fluctuations in water. I downloaded OpenFOAM and played around with it a little, but it seems a little bit low-res. I'm going to play around with it on a more powerful machine later today...

Another idea I had, crazy though it sounds, is that my estimated propeller sounds accurate. If that's true, then I'll just use that, but I don't want to sacrifice accuracy... How does it sound? It doesn't take into account things like the engine, so it should be somewhat heavy on the beat. My theory is that there is a powerful beat every time a blade passes the viewer. As such, in this example, the first audio clip would represent a 2-blade helicopter rotating at 150RPM, or a 5-blade ship rotating at 60RPM. I don't know how I would take into account things like cavitation... But one step at a time.

2 comments:

  1. Did you generate the waveform that you're running through Eurequa? If so, won't it just find the equation that describes what's implemented in the generator?

    ReplyDelete
  2. @Donovan: Yes, I did generate it. I'll admit that it's a waste of 120 core hours so far, but I think that it'll be a good proof of concept. Tonight I'll switch to an actual sound file, since I'm getting good progress on the generated sound.

    ReplyDelete