Wired Science TeachersWired Science Teachers

Michael Lampert
Michael Lampert

teaches MicroElectronics, Astronomy and Physics at West Salem High School in Salem, Oregon.

Jerone Mitchell
Jerone Mitchell

teaches AP Computer Science, AP Statistics, and Pre-AP Computer Science at W. T. White High School in Dallas, TX.

Brian McCombs
Brian McCombs

is the Mathematics Chairman at Theodore Roosevelt High School in Kent, Ohio.

Sharon Radford
Sharon Radford

teaches Introductory and Advanced Placement Biology at Paideia School in Atlanta, Georgia.

William Church
William Church

teaches Physics, Physical Science, and Robotics in Littleton, NH.

PBS Teachers
01.09.08

In Your Classroom: "ShotSpotter"

Jerone Mitchell by Jerone Mitchell     Department: In Your Classroom

The "ShotSpotter" segment in episode five was a fascinating one, in that it is an excellent example of Math, Physics, and Technology in action.  The "ShotSpotter" technology is becoming increasingly embraced; an example of this is an interesting video news story on the city of San Francisco showing how they used this technology.

One interesting part of the news story is how many pieces of it can be adapted to the classroom and how it can provide fun learning opportunities.

The first aspect to consider is how ShotSpotter determines whether a sound is a gun going off or a more mundane event, such as a firecracker or a gun backfiring.  The key is in how the sounds "look."  Many recording programs offer a visual representation of what a sound "looks like." You can download and install a basic version of Audacity, a free sound editing program.  You can find a tutorial on how to use the program here.

Simply plug a microphone into your computer and record a sound. Notice how the sound has a specific shape within Audacity. It is this shape that is analyzed to determine what kind of sound you have.  Begin by creating the classic "glass xylophone" (i.e. glasses filled to different lengths with water), and record the various notes created.

Afterwards, record a handclap.  Compare and contrast first the glass xylophone notes and the clap, then compare and contrast the various glass xylophone notes with each other.  You'll note that, if you zoom in enough on the signal, all of the sounds are periodic -- they repeat themselves.  However, the glass xylophone sounds tend to "linger."  They repeat for a longer amount of time than the handclap.  Similarly, the patterns generated by the various glasses will be similar, but differ in terms of how "fat" or "slender" the signal is.  By analyzing the shape of signals, we can determine what kinds of sound were recorded.

Once there are microphones set up, we can model the sort of estimations and calculations that ShotSpotter uses to determine where a sound comes from.  Obviously we will not be able to be as exact as ShotSpotter, but we can come close. In order to do this, one must first refresh themselves in basic trigonometric functions; a primer on basic trigonometry is available on You Tube.

Begin by setting up four different microphones in a square with exactly 14.14 feet on each side of the square.  We are doing this so that the "center" of the square will be approximately ten feet away from each microphone.  If we know how far away a sound source is from the microphone, we can calculate the amount of time it will take for sound to reach that microphone.  We know that sound travels at 1,130 feet per second, so a simple ratio will tell us that it should take a sound approximately .00885 seconds to go from the middle of the square to each microphone, and, in concept, each microphone will receive the sound simultaneously.

The first thing we will do is "calibrate" our ShotSpotter model.  Try to start all four microphones recording at the same time.  This will be nearly impossible to do, so we will use the knowledge we have to adjust for starting at different times.  Zoom in on the time in your recording software until you can see seconds measured in at least the ten-thousandths place (four decimal digits).  If we make a sound from the center position and take note of when that sound is first recorded in the microphone, we can adjust all calculations accordingly.  For example, let's say the first microphone noted the sound at 3.112 seconds, the second noted the sound at 3.312 seconds, the third noted the sound at 3.512 seconds, and the fourth noted the sound at 3.712 seconds.  We could consider the first microphone our "zero" time, and know that we need to subtract .2 seconds from any measurement we get from the second mic, .4 from the third, and .6 from the fourth.  Throughout our model, do NOT stop the recordings, as we would need another set of calibration calculations in that scenario.

Now, place some sort of sound source along the outsides of the square ten feet from each microphone.  For example, one sound source may be ten feet away from the microphone on the upper left hand corner, thus making it 4.14 feet away from the microphone at the upper right hand corner.  By placing the sound source on the border, we create right triangles between the sound source and the microphones (for example, the upper right microphone, the lower right microphone, and the sound source all form a right triangle) and we can easily calculate distances.  For example, we can use the Pythagorean Theorem to determine that the distance from the sound source to the lower left triangle is 17.32 feet (the square root of 10 squared plus 14.14 squared).  Similarly, we know that the distance between the sound source and the lower right microphone is 14.73 feet (the square root of 4.14 squared plus 14.14 squared).

Because we now know the distances, we can calculate how long a sound would take to reach the microphones.  Using our ratio (sound travels 1130 feet in a second), we know that it will take .00366 seconds for the sound source we labeled above to reach the upper right microphone, .01305 seconds to reach the lower right microphone, and .01533 seconds to reach the lower left microphone.  Set up seven other sound sources, two on each side of the square with each exactly ten feet from a corner.  Our trigonometry rules will tell us that the time needed for each source will involve the same calculations as the one described above; you are simply plugging in different numbers for different microphones.

Now we can experiment.  Have all participants close their eyes and activate a sound source (either one of the eight on the outside or the one in the middle).  The students should guess where the sound is coming from first, and then note what time the microphones noted the sound.  From there, they should be able to look at the differences between when the microphones noted the sound to calculate which source was used.  Note that there will be some slight derivations each time through; this is due to the fact that we used some estimation on our lengths.  However, things should in general line up closely enough to allow the microphones to confirm the students' intuition.

A more advanced class can utilize the same experiment, except with sound sources that do not make perfect right triangles with the microphones.

Additional WIRED Science Video Segments
Don't forget to check out our Video Section for other segments from WIRED Science that you can use in your classroom.

Tags:

CommentsComments

0 Comments

+ Add Comment

Post your comment





Type the characters you see in the picture above.