Tuesday, May 8, 2012

We Should Have Studied Dolphins in High School Math

When I look back at my educational career, it's really striking how poor of a student I was.  That is, I was a pretty mediocre student in the "hard" sciences until I took Marine Biology class during my senior year of college.  Most of the time, I think I was just really bored.  It wasn't always because the material wasn't challenging or useful (although sometimes this was the case). It was often because I had no idea what the point of it was.  OK, so in physics we could calculate where a ball would land based on the angle and force.  I only played baseball when forced to in gym class, and when I did I had no control over the force and angle of my wild swings.  I didn't have a home catapult, and I just didn't get how this stuff could really matter to ME.

It wasn't until I got really interested in marine biology, and specifically whale and dolphin bioacoustics, that I started seeing how amazing and cool math & physics can be.  If you read my blog, you know that bioacoustics is the study of the sounds of living things.  Whales and dolphins use sound to communicate and find food underwater, so even if you can't see them, you can very often hear them.  Some whales, such as beaked whales, are actually easier to find by listening than by looking with your eyes.  In addition, sound travels further underwater than light, so people at the surface can even hear whales that are thousands of feet underwater, or even hundreds of miles away. We can use these sounds to track the location of the animal, and we can do it using high school math.  Super cool.

Why didn't we do this in my high school trigonometry class?

It's really pretty simple.  First, you need something in the water making a sound.  Let's say... a whale.


Then you'll need a boat and something to record the sound.  We're going to use a hydrophone array, which is made up of three underwater microphones (hydrophones) strung in a line, with 15 meters between each hydrophone.  



When the whale makes a sound, it travels in a straight line through the water* to each hydrophone, arriving at the closer hydrophones sooner and arriving at the further hydrophones last.  Let's say the sound arrives at our recordings at time 0 for hydrophone 1, 0.006 seconds for hydrophone 2, and 0.0007 seconds for hydrophone 3.



How on earth do we figure out the distance to a whale when all we know is the difference between when we heard it on hydrophones 1, 2, and 3?  Easy - there's a simple equation for that!


The sound speed in water is 1500 m/s (which is why I put the hydrophones 15 m apart - to make the math easier).



We've replaced some of the words with numbers, something I HATED in high school.  Oh wait, I still hate it, so I'll just explain what the equations mean: The time difference between hydrophone 1 and 2 (t21) is equal to the difference between the distance between the whale and hydrophone 1 and the distance between the whale and hydrophone 2 (d2-d1) divided by the speed of sound.  Holy mother of god, this is just geometry!  I could have been doing this when I was 15! Some of you over-achiever types probably took geometry in 8th grade, so you could have done this when you were 14. Not me!

With a little algebraic rearrangement (which I am not going to bore you with, since you can look it up here), we get:

**


Sx and Sy are the x and y locations of the whale. C the speed of sound in salt water, 1500 m/s.  dh is the distance between the hydrophones, which in this case is 15 m, and all the ts refer to the time difference between the hydrophones (the small numbers tell you which two hydrophones: t21 is the difference between the arrival at hydrophone 2 and 1, etc).  All you have to do now is plug in the numbers. Edited 5/12/2012: To make it even easier, I've provided a spreadsheet here.


**


Then you can graph the location of the whale (-16.7, ±241.7), along with the locations of your hydrophones at (0, 0), (0, 15), and (0, 30).  I've just made designated hydrophone 1 at (0, 0) to make things easy, but in real life you'd have a GPS on the boat and you'd have to add the length of the hydrophone cable to the location of the boat's gps.



You might notice something funny about this equation - it actually gives two solutions - one on either side of the line of hydrophones.  That's a big problem with using three (or four, five, etc.) hydrophones in a row - you're not really sure what side of you the whale's on.  The reason for this is that there are two possible solutions for Sy. However, you can figure out which side the whale is on by turning the boat.  The location that stays in relatively the same place regardless of where the hydrophones are is the correct one.  Other ways to fix the left-right ambiguity? Make your hydrophones into a 2D shape (hard to do when dragging them behind a boat because 2d shapes are not very streamlined)*** or use DIFAR.

I wish I had done this kind of math in high school - it is totally within the realm of a high school student!  I think I might have paid better attention to something cool like finding whales.  On the other hand, maybe not.  That boy across the room WAS pretty dreamy.  Not all kids will be interested enough in whales and dolphins to get interested in math and physics, but the cool thing about math and physics is that, regardless of what you're into, I bet it applies.  From video games to raising miniature ponies, there's math in there somewhere.  Sometimes it just takes the right spark to get people interested.

P.S. If I made any mistakes above, please call me out.  Like I said, I didn't do so well in math class.  Also, if you're interested in a copy of the xcel spreadsheet with the equations already in it, shoot me a message and I'll send you a copy.




* This isn't always the case - sometimes the sound bounces off the bottom or the surface to get to the hydrophone, but I'm ignoring those cases here for simplicity.

** Edit: May 9, 2012. I made a HUGE mistake the first time I posted this and completely ignored the equation for t1 (I thought t1 was a typo for t12).  This is now fixed.

*** Edit: May 8, 2012.  Changed "3D" to "2D" because of a comment from Sam Denes. I had thought a straight line was already 2D, but apparently a straight line is 1D and adding another point off the line makes something 2D.

Note: I got to talk to a bunch of high school math teachers about this math.  Recap here.

 

3 comments:

  1. I believe that this should be forwarded to the math instructors at you high school. Maybe it will give them an idea to get current students interested in math. I remember just enough math to follow you very clear examples.
    I still don't know how the use math, but I do use arithmetic.

    ReplyDelete
  2. Isn't the whale in a 3D space (i.e. it has a depth)? In that case, the solution space should be a semicircle going through the points you have in the second to last figure and orthogonal to the axis of the hydrophones.

    ReplyDelete
    Replies
    1. That is true, You'd need a 3-D array with hydrophones at different depths to find the depth of the whale. In many cases (although definitely not for deep-diving whales), the depth of the whale is a relatively minor contribution to error in localization, so you can ignore it. I guess you could think of the calculated location as being the end point along a line along the surface under which the whale could possibly be (with limits at the water surface and the ocean floor). Since the usual application for these arrays is during surveys where you're actively trying to find an animal, this is still helpful because you know to look somewhere on a line between the ship and the point.

      This is really just an illustration of cool ways in which you can use simple math in the real world, so I've simplified it a bit and made assumptions (such as the whale is at the surface of the water) to make it more user-friendly.

      Delete

What do you think?