# Digital filter simulating hydroacoustic signal distortion

Preambule:
I'm designing a sound model for my small submarine game. Model is running on the server, and I want to present the client with a mono-channel wav-stream from his hydrophone (20kHz discretization should suffice, I target 20Hz-10kHz band). I want that signal to be relatively-realistic. Specifically, I need to account for the fact that water dissipates high frequencies much faster.

Sound model:
I plan to pre-generate (with help of some RNG and IFFT) raw propeller time-domain sound sample from it's intensity spectrum. Then I plan to amplitude-modulate it with shifted shaft rpm x propeller blade count sine wave to get that propeller beat. At this point i need to materialize that signal on the player's sensor. It will probably involve two filters:

• Some filter (wich is the filter in question) wich will account for water dissipating signal energy.
• Bandpass filter, wich corresponds to this particular sensor's sensitivity band.
• Simple amplitude multiplication to account for range, sensor directivity etc.

According to R.J. Urik "Principles of Underwater Sound", on the distance of r meters from the target, band level (dB) in frequency bin f of such sound can be approximated using following formula:

[1]: ResultBL = SourceBL - 10 * log10(r * r) - r * F(f)
or without wave front expansion term (wich is trivial):
[2]: ResultBL = SourceBL - r * F(f)

where F(f) is some smooth monotonic function (big radical with multiple squared frequencies and constants) of frequency.

1. Is it possible to design a time-domain digital filter for given range r, that implements\approximates the signal distortion [2]?
2. What type of filter would you recommend? Problem is not realtime, but calculations should be fast. I'm not limited to causal filters, so I'm sensing something like non-causal IIR?
3. What algorithms are applicable to this problem.
4. If such algorithm involves transfer function, how should I transform\approximate F(f) term in it?
5. Will it be fast? What factors affect it's speed?
6. Will such filter work good in the whole band (20Hz-10kHz)?
7. Will such filter work well on large intensity level variances, e.g. on both very weak and very strong signals?
8. Is such synthesis computationally-expensive?

Thank you.

I wouldn’t bother much with the precise shape of the filter because any real passive sonar will boost the higher frequencies at the receiver and any realistic source levels are going to around 70 years old and most likely a double screw, and aspect dependent. Cavitation is depth dependent. A single pole low pass filter with a corner around 10 Hz is probably ok.

Fidelity is one of those things that can become an obsession. There is ambient noise and self noise associated with hydro acoustic flow. Higher frequencies exhibit hull shading. No one band covers all the signal types of interest.

If you want to be obsessive, look at Mike Porter's Ocean Acoustics web site.

http://oalib.hlsresearch.com/

I'm partial to RAM PE and there at least was a broad band (decomposition of narrow band) demo for the MATLAB version.

There was a video game that came out around 20 years ago that collaborated with a company named SONOLYST. They actually got an Oscar for sound effects for the Hunt for Red October movie.

I like Urick. I actaully meet him a few times and took a week long class from him but you might find Ross a bit more helpful.

Mechanics of Underwater Noise, Ross, D. isbn={9781483160467}, url={https://books.google.com/books?id=sdwgBQAAQBAJ, 2013, Elsevier Science

• I have no illusion about actual source levels, game is fiction. Physical effects during transmission are however important: I cannot pass the same signal to high-frequency and low-frequency hydrophones, the latter one will have an unfair detection range. The same screw must be heard much better on 1kHz than on 2k-10kHz bow hydrophone. Screw count and aspect dependency, as well as all the other stuff, like flow noise are no problem: they are easily approximated. My problem is with diffirential frequency distortion by water, wich I don't know how to perform efficiently. – Boris-Barboris Feb 27 '18 at 16:09
• Themore common term dispersion, see my edits – user28715 Feb 27 '18 at 16:40
• Good links, thank you. Some of the internal links are broken, but I will contact the author. – Boris-Barboris Feb 27 '18 at 16:46
• Urick passed away in 1996, so that's a dead link as well. There is a legend about Urick. He was very interested in deep sound channel (DSC) propagation and a technique to probe the DSC is to use implosive sound sources, typically an explosive. Urick went around the TV repair shops in Silver Springs and purchased burnt out TV picture tubes and used these for impulsive sources. He developed calibration curves for brand, size, and crush depth. – user28715 Feb 27 '18 at 18:17
• @StanleyPawlukiewicz Interesting, others have considered bulbs as excellent implosive sources too. CRTs must implode much more deeply though which makes sense for DSC...not to mention the environmental impact... (Can you perhaps edit the book reference so that it either becomes a link or renders as plain text (code) please?) – A_A Feb 28 '18 at 10:12

In addition to the very good points raised by Stanley Pawlukiewicz, it is indeed a question of level of detail and you are probably looking for a "good enough" approximation.

You can however set up a generative model for the type of sound you are after, with a set of parameters that you could vary to simulate different conditions.

In general, engine sound is integrated impulses. If you obtain a high sampling frequency (undistorted) recording of the exhaust of a motorbike (or car) at idle speed, you will observe that you can actually count the Revolutions Per Minute (RPM) from the sound recording. In fact, you can still get a rather accurate RPM count (for a motorbike) even if you throttle the engine up to moderate RPM where, you can still observe the pulsating output of a piston engine. If you keep throttling the bike to high RPM, the pulses will start merging and the determination of RPM will be very sensitive. If you are recording a car, this limit will be at lower RPM because it has more cylinders and generates more pulses per unit of time.

The sound that reaches your ears from a motorbike or a car is the impulsive noise of the engine filtered by the exhaust.

Jet engines suck in air, ignite it and get an "impulse" of boost by the sudden expansion of the gas. This happens very quickly but essentially, what you hear is filtered by the "flute pipe" around the turbine. This is very obvious in Pulsejets, less obvious in early jets that still had ignition chambers and even less obvious in axial jet's that are essentially large "flutes".

Underwater sound, the sound that reaches a hydrophone would be the sum of the engine noise coupled to the water through the hull of the boat PLUS the sound the screw makes in the water.

A propeller in the water is different than a propeller in the air, because water is (almost) incompressible. Therefore, the propeller doesn't "sound", until it starts cavitating.

Therefore, for general "shipping", what you hear in the water at some range $r$, is mostly engine noise, reduced in amplitude with adapted inverse square law and filtered.

The filter is the combined effect of the way the engine is coupled to the water (through the hull) and the frequency response of sea water for the "channel" the sound travels in.

So, a wooden fishing boat with an inboard engine on rubber buffers sounds differently than a recreational outboard engine craft. The inboard engine "knocks" against larger surface that is coupled to the water. Its low frequency content will be much stronger than high frequencies.

Now, sound propagation in sea water depends on a number of factors, but there are models that can return a "frequency response" based on these factors (for more information please see this link).

So, bringing all this together:

1. Set up a generator of impulses. One impulse for each piston chamber of your engine. The amplitude of the impulse is proportional to the size of the engine, the frequency of the impulses is proportional to the RPM of the engine.

2. Apply the "engine-hull" impulse response. This is what a single impulse would sound like in the water. You might be able to isolate one from existing recordings.

3. Apply the "hull-sea" impulse response. This is what a single impulse would sound like as it travels through the "water channel" from the source to the hydrophone. In shallow water you get a huge amount of reflections and depending on the surrounding environment, you might even hear reflections BEFORE the direct sound. In deep water, sound can be trapped in "channels", which means that at certain positions between source and hydrophone you might not even be able to "listen" to the source. It vanishes.

4. Reduce the amplitude taking into account $r$.

You can work with Finite Impulse Response filters or more complex Digital Waveguide models.

It is probably better to do this offline and blend between files (depending on distance and bathymetry for example) rather than operate the generative model in realtime.

Hope this helps.

• 1). All valid points for simulation, but I just need a game, so I can throw away a lot of complex real effects. It does not to have to be realistic, but it has to be intuitive - non-contradictory with expectations, like propeller beat is there, and high frequencies fade faster than low on the range. 2). Why FIR? I was adwised elsewhere to look at Parks-McClellan, but looking at pictures from mathworks.com/help/signal/ref/firpm.htm, it looks too imprecise. I don't need a causal filter. Are there alternatives? – Boris-Barboris Feb 28 '18 at 15:14
• @Boris-Barboris 1) The effects mentioned here are not complex. 2) The Parks-McClellan algorithm leads to the design of FIR filters (?). – A_A Feb 28 '18 at 15:18
• 2) Yes. I find a lot of info on FIR design, becaues they are popular. However, I am not in need of causal FIR filter per se. I also hear stuff like better IIR performance, as well as better quality. Wich actually goes well with my experience with numerical modelling and ODE solving, where implicit non-causal schemes are generally much better then explicit ones. That makes me seek alternatives to popular FIR methods preemptively. – Boris-Barboris Feb 28 '18 at 15:24
• @Boris-Barboris The criterion for choosing a filter type is not its popularity. To receive answers closer to what you are asking, you need to provide some specifications in terms of cut off frequencies, pass pand width, pass pand ripple, etc. If all you want to do is playback a loop recording that gets low pass filtered at some variable cut off depending on $r$ then you can use something as simple as a modulated sinc filter (to change the cut off in realtime). – A_A Feb 28 '18 at 15:48
• The original question contains all the info. I need a filter for some smooth monotonic frequency response function, key word is "some", filter design method should be able to work with any such smooth monotonic function. No ripple\passband\stopband\cutoff, i need a direct (wich takes a table of frequency:desired-response-magnitude pairs) method, something like matlab's yulewalk, wich I will try as well. – Boris-Barboris Feb 28 '18 at 15:57