Author Topic: Is DIY level 3d sonar a thing?  (Read 1033 times)

0 Members and 1 Guest are viewing this topic.

Offline JustMeHereTopic starter

  • Frequent Contributor
  • **
  • Posts: 830
  • Country: us
Is DIY level 3d sonar a thing?
« on: January 20, 2025, 02:53:04 am »
I looked around a few months ago and couldn't find much.  Is 3d DIY level sonar a thing?  I'm looking to make either a surface drone or, perhaps, submersible drone.  The water around here is muddy as heck and sonar is the only real way to see.

My prior research found transducer, but I couldn't figure out if they did 3d work or not. 
 

Offline DTJ

  • Super Contributor
  • ***
  • Posts: 1013
  • Country: au
Re: Is DIY level 3d sonar a thing?
« Reply #1 on: January 20, 2025, 01:36:42 pm »
Not for water but I saw a neat project for cave mapping using LIDAR. Google should find it for you.

It had full details. It may give you some ideas.
 

Offline CaptDon

  • Super Contributor
  • ***
  • Posts: 2252
  • Country: is
Re: Is DIY level 3d sonar a thing?
« Reply #2 on: January 20, 2025, 02:20:09 pm »
There are some fantastic commercial 3D products on the market although the best are very expensive. Realize that looking down from above is only 2D at best. Depth and location along the travel path. From this information a 'side view' model can be constructed. Much like in ultrasound of the human body the technology can use a very narrow beamwidth single beam being scanned from side to side or it can use multiple single beams. Some of the so called 3D sonars use 4 fixed beams synthesized into 6 or more 'apparent' beams. The really fancy stuff has a large amount of narrow beam sensors basically all facing straight down but use phase shift of the driving signal to steer the beam. Again, the beam only returns depth and relative position which is two dimensions. The third view or side view is constructed from the gathered stored information. The hobby side of 3D sonar relies heavily on FPGA data processing / DSP processing. Remember, when you look sideways instead of straight down you are seeing a 'slant range distance' and if you want to create a normalized flat floor plan you have to correct for the viewing angle distance. When looking sideways at an object the 'apparent depth' will be greater than the object's real depth. I forget if the correction is the sine or the cosine of Theta, been a while since I did the math for radar displays. Speaking of multiple steerable beams, check out the Navy 'Diver Denial System'!! It can knock you out and not effect another diver 20 feet away from you.
Collector and repairer of vintage and not so vintage electronic gadgets and test equipment. What's the difference between a pizza and a musician? A pizza can feed a family of four!! Classically trained guitarist. Sound engineer.
 

Offline MarkF

  • Super Contributor
  • ***
  • Posts: 2800
  • Country: us
Re: Is DIY level 3d sonar a thing?
« Reply #3 on: January 20, 2025, 03:17:10 pm »
@CaptDon
  You're forgetting that sound in water does not travel in straight lines as radar transmissions do.  Sound will arrive from three main vertical travel paths: surface duct, direct, and bottom bounce.  The travel paths are determined from the temperature depth profile and the depth of the sonar array.  Many sonar systems use multiple transceivers to form beams pointed in these directions.

Example ray tracing model:
   

In a small lake, a lot of that will go away because the temperature profile will not vary much.  Even still, it isn't a trivial task to just get the data let alone graphing it into some meaningful fashion.

@JustMeHere
  What is it you are trying to see and how big is it?  If all you're interested in is the bottom contour, that would probably be a different approach.  Either way it is going to be expensive...
« Last Edit: January 20, 2025, 03:38:47 pm by MarkF »
 

Offline CaptDon

  • Super Contributor
  • ***
  • Posts: 2252
  • Country: is
Re: Is DIY level 3d sonar a thing?
« Reply #4 on: January 20, 2025, 07:07:09 pm »
Mark, I recall one of our code writers for our FPGA signal processing talking about the temperature gradients and stratified layers bending the beam and even reflecting it like a mirror. I did some abandoned quarry diving where the water had stratified hugely and abruptly. Around 20 feet down was the first temperature division and looking down I could see the sky above exactly as if I were looking up!!! The water above the layer was around 60F. Pushing your hand downward about 1 foot into the stratification revealed the water below to be around 48F. My dive buddy told me the water much farther down was always around 42F even in the dead of winter when the surface had iced over!! That quarry was around 110 feet in the deepest part. The water was crystal clear and reflected sky blue. Vis was at least 50 feet when looking horiztontal. Fun times!!
Collector and repairer of vintage and not so vintage electronic gadgets and test equipment. What's the difference between a pizza and a musician? A pizza can feed a family of four!! Classically trained guitarist. Sound engineer.
 

Offline rhb

  • Super Contributor
  • ***
  • Posts: 3528
  • Country: us
Re: Is DIY level 3d sonar a thing?
« Reply #5 on: January 20, 2025, 07:27:22 pm »
DIY acquisition is NOT a problem.  I have a friend building a submersible which does 3D sonar imaging.  Retired national lab staff “technician”.

3D images require a lot of computing using a lot of data.  There is FOSS, Seismic Unix, capable of doing the heavy lifting.  But be aware that the mathematics get very difficult pretty quickly and the software engineering is “interesting”.  This is based on spending my career in reflection seismology in the oil patch.  How “good” an answer can you afford?  I own a 3D MPI  based Kirchoff pre-stack  time migration code.  Year’s work to write just the numerical engine.  No UI.   Free if anyone wants to spin it up. It has a large test suite, but it is not trivial to set up MPI.

Much depends upon the particular use case.  3D requires multiple sources and receivers in XY.  The literature is vast.  More than a single person can master.  And I’m only considering the low frequency oil exploration part.  The anti-submarine warfare component is equally large and complex.

In any case, to acquire a 3D image both the source and receiver must move in real time and/or be replicated.  It’s fun stuff, but real work.



Have Fun!
Reg

 

Offline MarkF

  • Super Contributor
  • ***
  • Posts: 2800
  • Country: us
Re: Is DIY level 3d sonar a thing?
« Reply #6 on: January 20, 2025, 08:23:08 pm »
@CaptDan, My experience and background is in modelling deep ocean acoustics and sonar systems.  Shallow ocean and shoreline, and small bodies of water is a whole different animal to model.  The propagation in shallow water is significantly different.  And if you're doing active ranging, the reverberation and noise level will have a big impact also.

This subjects quickly evolves in a big can of worms in signal processing techniques.  Not for the weak at heart.
 
The following users thanked this post: rhb

Offline JustMeHereTopic starter

  • Frequent Contributor
  • **
  • Posts: 830
  • Country: us
Re: Is DIY level 3d sonar a thing?
« Reply #7 on: January 21, 2025, 03:51:12 am »
How much data?  For processing power, that could be offloaded to a nearby laptop with a GPU.
 

Offline Marco

  • Super Contributor
  • ***
  • Posts: 7089
  • Country: nl
Re: Is DIY level 3d sonar a thing?
« Reply #8 on: January 21, 2025, 04:34:06 am »
the mathematics

These days doing it from first principle doesn't make much sense any more ... have a good simulator train a neural network :p
 

Online Haenk

  • Super Contributor
  • ***
  • Posts: 1351
  • Country: de
Re: Is DIY level 3d sonar a thing?
« Reply #9 on: January 21, 2025, 12:32:59 pm »
Sound will arrive from three main vertical travel paths: surface duct, direct, and bottom bounce.  The travel paths are determined from the temperature depth profile and the depth of the sonar array. 

If my memory serves me right, you will also have reflections off media density breaks, i.e. from layers of different temperature / saltiness.
 

Offline rhb

  • Super Contributor
  • ***
  • Posts: 3528
  • Country: us
Re: Is DIY level 3d sonar a thing?
« Reply #10 on: January 21, 2025, 02:11:53 pm »
As pointed out by @MarkF who is from the ASW crowd.  It is not for the faint of heart.

Data volume depends on area and depth of investigation.  For a modern Wide Azimuth Survey for offshore, 10-20 TB is the norm.  For surveying a small pond it would be under 1 TB.  Not laptop work unless you are *very* patient.  Data volume depends entirely on required spatial resolution.

J.P. Morgan’s quip that if you have to ask, you can’t afford it applies.  It would take 4000-5000 hrs of seriously hard work to learn the data processing basics.  And AI  won’t help.  Just make things worse.  You actually MUST be able to visualize everything in your head except the *exact* answer. 

FWIW the section of my library devoted to this topic is over 90 ft of shelving and I only have 2-3 ASW books.  This easy if you know how, but learning how is not easy.  And ALL the work is very use case specific.  A pond is very different from the coast of a large body of water at similar distance from shore and depth.  Both are completely different from several thousand feet of water.  Deep ocean acoustics is a vast, insanely complex subject with all the juicy stuff highly classified.  “Principles of Underwater Sound” by  Urick is the classic for sonar.

Here are 2 DSP books:

An Introduction to Digital Signal Processing
John H. Karl
Academic Press 1989

Geophysical Data Analysis
Robinson & Treitel
Prentice-Hall 1980

Robinson & Treitel introduced DSP to the world in the ‘50 and ‘60s.  Robinson was the first person to ever do it in the summer of 1952 with a desk calculator.  Karl is not as purely seismic and is my first choice for a noob.

Have Fun!
Reg
 

Offline MarkF

  • Super Contributor
  • ***
  • Posts: 2800
  • Country: us
Re: Is DIY level 3d sonar a thing?
« Reply #11 on: January 21, 2025, 02:53:28 pm »
“Principles of Underwater Sound” by  Urick is the classic for sonar.


+1
A haunt from the past...
The defacto bible for those interested in sonar systems.
Read it many times during my 15 years in the ASW industry.

Even still, it will leave you wanting for more when it comes to implementation.
 

Offline rhb

  • Super Contributor
  • ***
  • Posts: 3528
  • Country: us
Re: Is DIY level 3d sonar a thing?
« Reply #12 on: January 21, 2025, 04:13:34 pm »
Urick only explains the subject with a very broad brush.  The devil is in the details of correctly indexing in M different N dimensional arrays.   As noted, things change dramatically with frequency and resolution.

My favorite figure in Urick is the WW II era SOFAR recording showing a truncated exponential.

DSP requires about 30-40 semester hours of crushing math and even then you’ll wish you’d taken more math courses.  But it is pure magic to behold the results.

AI doesn’t stand a chance in DSP.  Too many permutations of method to consider in N dimensions.  It takes human inspiration.  Usually in the form of rearranging the data into a different order, making some changes and then rearranging it yet again.  I took two 3 hr courses in Integral Transforms and that only scratched the surface. 3-4 hrs was common for a single homework exercise.

FWIW My BA is English lit.  Quite a climb to research level wave propagation problems.  But loved every minute of it my whole life.  The wave equation is awesome because it appears in so many contexts.


Have Fun!
Reg
 

Offline Marco

  • Super Contributor
  • ***
  • Posts: 7089
  • Country: nl
Re: Is DIY level 3d sonar a thing?
« Reply #13 on: January 21, 2025, 04:52:09 pm »
AI doesn’t stand a chance in DSP.  Too many permutations of method to consider in N dimensions.

It's the other way around, first principles doesn't stand a chance to compete when there are this many unknowns and complex priors.

When things get this complex, the optimization problem is also a search among the possible space of the real situations and finding the most probable one. It's an ill posed problem, for those AI excels. Those WiFi room radars would be pretty much impossible from first principle. Of course you do need a really good simulation first.
« Last Edit: January 21, 2025, 05:30:23 pm by Marco »
 

Offline zapta

  • Super Contributor
  • ***
  • Posts: 6316
  • Country: 00
Re: Is DIY level 3d sonar a thing?
« Reply #14 on: January 21, 2025, 06:21:08 pm »
The temperature gradient and the change in sound speed are probably not relevant for a short range DIY sonar.
 

Offline zapta

  • Super Contributor
  • ***
  • Posts: 6316
  • Country: 00
Re: Is DIY level 3d sonar a thing?
« Reply #15 on: January 21, 2025, 06:30:03 pm »
Probably you will need more than one hydrophone.  A common way it to have a few arranged in a line or a grid or a cylinder, and using beam forming to create 'virtual beams' that simulate a directional hydrophone in a specific direction.

Beam forming is is relatively simple, where that sample from each hydrophone are delayed and summed using weights.

The difficult part in this project is not necessarily the computations by the logistic around the hardware and the testing (you cannot test at home in a barrel of water).

Have you consider to do the same but for air? The logistic is much simpler. You can feed N low cost I2S microphones to a DSP or FPGA, collect sample data, and experiment with algorithms offline. I think that there is an open source project in that direction, implementing a 'acoustic camera'.
 

Offline rhb

  • Super Contributor
  • ***
  • Posts: 3528
  • Country: us
Re: Is DIY level 3d sonar a thing?
« Reply #16 on: January 21, 2025, 07:50:00 pm »
@marco  The mathematical explanation is to be found in

A Mathematical Introduction to Compressive Sensing
Foucart and Rauhut 2013

but

A Wavelet Tour of Signal Processing
Mallat 3rd ed

is essential preparation for Foucart and Rauhut.  If you don't understand Mallat, you can't  grasp Candes and Donoho, the originators of compressive sensing.  Candes and Donoho are the first major mathematical advance in DSP since Wiener's classified ONR report in 1940.  The key paper being Donoho 2004-9 which proves that a sparse L1 solution, if it exists, is L0 optimal.  That's right, a practical solution to an NP-hard problem!  it's also the basis of the Netflix prize solution.  It's also oil industry super-major research team territory. I don't think any of them still exist.  So don't go there unless you've got a seriously strong stomach for math.

For the DIY approach.   A UMV craft  can collect coincident source and receiver data.  A 3D image of the bottom sediments to a depth of several feet can be obtained quite easily, albeit very slowly as you have to go back and forth in a systematic fashion.  That is classic basic 3D. 

Build a quiet differential GPS guided marine drone with a commercial *recording* fish finder/depth sounder on it.  Collect some data.   I'll supply the 3D imaging software and people to help with the processing. 

FWIW  I maintained  the Seismic Unix processing package for 15 years and contributed several programs besides fixing bugs in that and another 2.5 million lines of code.  So I am "qualified" as they say in the Navy.

If you want a low cost way to scan ponds and quarries for cars and such this is very doable.  Collect the data and I'll arrange the rest.  The first 3 iterations are hard.  After that it's easy.

Have Fun!
Reg
 

Offline Marco

  • Super Contributor
  • ***
  • Posts: 7089
  • Country: nl
Re: Is DIY level 3d sonar a thing?
« Reply #17 on: January 21, 2025, 08:40:09 pm »
solution, if it exists

It does not without vastly oversimplifying the problem.

Once you start including all the non idealities which make the true problem ill posed, it's not a question of solving, it's a question of searching and using statistical priors. It's pretty much impossible to write code to do that, but you can train a neural network to try to do it.

AI is the future for all these kinds of problems. You can just throw a million simulations at it with varying noise sources, bubbles, silt, temperature layers etc and train it to give a best effort guess. To the horror of applied mathematicians :)

PS. The winning Netflix prize solution used an unholy mixture of predictors, analytical and trained, with ensemble learning to bring it together. Or in other words, overwhelmingly AI. If they did it again, there would be nothing analytical left in the solution. Finding optimal solutions to ill posed problems is becoming an issue of architecture search more than anything else.
« Last Edit: January 21, 2025, 09:15:45 pm by Marco »
 

Offline zapta

  • Super Contributor
  • ***
  • Posts: 6316
  • Country: 00
Re: Is DIY level 3d sonar a thing?
« Reply #18 on: January 22, 2025, 03:06:08 am »
AI is the future for all these kinds of problems. You can just throw a million simulations at it with varying noise sources, bubbles, silt, temperature layers etc and train it to give a best effort guess. To the horror of applied mathematicians :)

Machine learning transfer the difficulty from the algorithm to the dataset collection.  Last year I experimented with an array of 13 I2S microphones to detect the direction sounds. Built a rig to collect thousands of samples from different directions and used it to train a model that achieved average error of less that 1deg, but this was with a specific sound (a  short burst of 3Khz) in a specific room (my office). Extending the dataset to arbitrary sounds and arbitrary rooms and acoustics was pretty much uncrackable from logistic perspective.

BTW, I tried several models, with and without feature extractions, the ones that worked the best involved computing FFT of a few tens of samples (sampling rate 32K) and feeding the amplitude and phase of each bin after some normalization. I was surprised by the accuracy of the results.
 

Offline Marco

  • Super Contributor
  • ***
  • Posts: 7089
  • Country: nl
Re: Is DIY level 3d sonar a thing?
« Reply #19 on: January 22, 2025, 04:52:29 pm »
Synthetic is the way to go.
 

Offline rhb

  • Super Contributor
  • ***
  • Posts: 3528
  • Country: us
Re: Is DIY level 3d sonar a thing?
« Reply #20 on: January 23, 2025, 01:46:46 pm »
the mathematics

These days doing it from first principle doesn't make much sense any more ... have a good simulator train a neural network :p

ROFL!

How do you think simulators work?  I worked on every type of  acoustic/elastic simulation code that exists.  They are ALL wrong in different ways.  Choosing which to use is a key questions.  BTW simulators calculate outputs from first principle.  The fundamental problem is computing the terms of the wave equation.

It’s rather bizarre that people who have NEVER done something claim people who DID it for 30 years are wrong.

As for the OP’s question,  3D is very possible, but it is not real time.  That is not possible for lack of a way to cover the entire surface  with sources and receivers at one instant.  Just moving the data to disk for processing would take hours if you had such a sensor.  And then you have to do all that math.

A 3D survey of a small pond is about a week full time for an experienced processor with abundant computing resources.

Bye,
Reg

 

Offline LaserSteve

  • Super Contributor
  • ***
  • Posts: 1378
  • Country: us
Re: Is DIY level 3d sonar a thing?
« Reply #21 on: January 23, 2025, 03:11:28 pm »
You realize that for good mapping you need a transducer capable of switching between transmit and receive very quickly?  That a single frequency transducer has a "return time" delay, meaning that you have to wait for the reverbations of the  previous pulse to dissipate before you can launch energy again? This is cured with specially designed pseudo-random tone sequences etc?   You need own ship motion to make life easy on the computations, and you need to know own ship's position very accurately.

There is big difference between collision avoidance, fish finding, mapping, and submerged target ID on the pond floor.  Side Scan comes to mind.,

How Shallow, How Deep? What resolution?

The towed behind the boat, RF linked, low cost fishing sonars have been discussed on EEVBLOG, you might want to start there...

A lesson learned on a six to thirty-six foot deep water reservoir when fishing as a college student, was that a old rotary style Humminbird flasher sonar was great in the vertical plane, unless you where getting echos off the hull in shallow water that bounced back to the floor, and back off the boat hull.  However, what happens  if you turn that fat cone beam sideways and try to range the massive dam less then 100 feet away, in 36 foot deep water?  Well, the range only display showed everything possible except the dam, which from the radar based model in my mind, should have been the dominant path. Instead, lake floor bounces to the dam were shown, and many, many, of them. The radar model failed miserably if I tilted the transducer.  Big lake, soft muddy bottom, few obstructions or rocks, and I've seen it drained. It's just  muddy plain where I ran my "test".  Rip-Rap rocks along the base of the dam did a great job of scattering the direct return.

Own Ship Motion simplifies your problem.   Arrays simplify your problem.  Having a good navigation fix, priceless.

What do you want to really do? Defining the problem is important.

What I started with on the lake that day  was this:

http://www.seekic.com/uploadfile/ic-circuit/2009723225737217.gif , which is a spining disk with a neon as indicator.

That was 35 years ago, consumer sonars have improved greatly.

LM1812 is very obsolete, but had my attention as a kid. The data sheet is worth looking at.


Steve








« Last Edit: January 23, 2025, 04:21:38 pm by LaserSteve »
"When in doubt, check the Byte order of the Communications Protocol, By Hand, On an Oscilloscope"

Quote from a co-inventor of the PLC, whom i had the honor of working with recently.
 

Offline Marco

  • Super Contributor
  • ***
  • Posts: 7089
  • Country: nl
Re: Is DIY level 3d sonar a thing?
« Reply #22 on: January 23, 2025, 06:33:11 pm »
How do you think simulators work?

Ignoring numerical instability there are unique solutions in simulation. The simulator has a god's eye view, the problem is not ill posed. It can still be a shitty simulation, but at least it gives an unique solution.

The inverted problem working from observations to determine the real environment has no unique solution. There is only a probability space, the problem is ill posed. AI is simply much better at these kinds of problems, analytical solutions need to make so many simplifications they are only accurate for toy situations.

30 years ago you couldn't get petaop/s at a couple 10s of Watts, the solution space has changed.
« Last Edit: January 23, 2025, 06:48:26 pm by Marco »
 

Offline zapta

  • Super Contributor
  • ***
  • Posts: 6316
  • Country: 00
Re: Is DIY level 3d sonar a thing?
« Reply #23 on: January 23, 2025, 07:15:39 pm »
You realize that for good mapping you need a transducer capable of switching between transmit and receive very quickly?  That a single frequency transducer has a "return time" delay, meaning that you have to wait for the reverbations of the  previous pulse to dissipate before you can launch energy again?

It depends. CTFM sonars for example transmit and receive continuously on separate hydrophones.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf