Lightning Detection

Since I’ve been very busy lately my good friend Michael Schmidt agreed to do another guest post! Mike has a masters degree in physics from the University of Colorado at Boulder. You can check out Mike’s own blog at duality.io or his personal website Mike’s Personal Website. Without further ado, here’s Mike:

Lightning Detection


 

Currently, in the mid-west of the United States the first thunderstorms of the year have begun. Because I am a giant geek, I love lightning and I think tracking lightning is quite interesting. My personal favorite site is LightningMaps. On LightningMaps website you’ll see Google Maps overlaid with dots representing lightning strikes and circles emanating from them. The circles represent the leading edge of the thunder as it propagates away from the strike. Seeing this I immediately started to wonder how they do this and, appropriately, started to investigate.

Detection

The first step in any scientific endeavor is collecting data (Yes, yes. I Know. The scientific method starts with the generation of a hypothesis but in this case we know what lightning is and we simply want to monitor it). Lightning is a large surge of current, that is electrons, flowing between the Earth and the clouds above or vice-versa. Any time electrons are accelerated they emit photons which we usually see as visible light. In addition to the visible light we see, the lightning emits all sorts of other frequencies which include infrared (aka heat), ultra-violet, and radio waves. You can hear these radio frequencies if you happen to be listening to the radio when lightning strikes. They will sound like static. We can detect these radio waves and keep track of the time we received each burst of radio waves.

Locating

If we have only one radio station detecting these bursts of radio waves, we wouldn’t be able to tell where it came from since we would only be able to tell when we received the signal. Now, if there are two stations we can keep track of the difference in arrival times. We know light travels at a constant speed, c \approx 2.99 \times 10^8 \frac{m}{s} . If the first receiver picks up the lightning strike at t_1 and the second at t_2 we know the distance between the strike and the receiver 1 and the strike and receiver 2 is |t_1 - t_2| . This is known as the time difference of arrival or TDOA. Using this information we can only restrict the possible location of the strike to a hyperbola. A hyperbola is a conic section–a slice of a cone–which is the locus of points for which all points are a constant difference in distance between two fixed points or foci. This is exactly the case we have.

The form of any hyperbola is the following:

    \[\frac{x^2}{a^2} - \frac{y^2}{b^2} = 1\]

When plotted on a graph we see the following:

A Hyperbola
A hyperbola with two foci

We can fit this to the case we have where the two foci represent the locations of the stations and the time difference between arrival is fixed by setting a and b . This gives us both side of the hyperbola but only one side represents the possible locations. The otherside this the set of points where the TDOA is opposite that of what we observe. The plot looks like:

Possible strike locations if only two stations (red) are used. The yellow represents the actual lightning strike.
Possible strike locations if only two stations (red) are used. The yellow represents the actual lightning strike.

If we want to locate the position of the strike we will need a third station. With this third station we can create a second hyperbola which will intersect with the first exposing the location of the strike. In our example the second hyperbola has been drawn and it intersects at the location of the strike.

Two hyperbolas for two different pairs of stations showing the location of a strike.
Two hyperbolas for two different pairs of stations showing the location of a strike.

Solving the Equations

Unfortunately the equations used to describe these hyperbolas don’t lend themselves to a simple solution. There are solutions, for example Ryan Stansifer’s paper from Florida Institute of Technology, but they will fail if there is any error in your measurements. Instead, systems use a method called Gradient Descent. In gradient descent we create an error function which tells us how far off, in some way, from the solution we are and move in the direction which lessens that error. The the case of the lightning strike detector we know the time difference between two sites should be the measured TDOA so we can set the error for two stations to be

    \[err = [ (|\vec{x} - \vec{s}_1| - |\vec{x} - \vec{s}_2| ) - TDOA]^2.\]

Here (|\vec{x} - \vec{s}_1| means the distance between the position x and the first station s_1 . We square whole thing because we need positive and negative error to count against us. For our full error function we take every pair of stations and add up their error. What see what this looks like for our example above for the first pair of stations:

Error for two stations.
Error for two stations (red) for a lightning strike (Yellow)

 

We can see here there is a depression shaped like a hyperbola. This like the case with only two stations above only tells us the strike happened somewhere along that hyperbola.

If we add in the third point and account for its contribution to the error we get the following error plot:

With multiple stations the error function reveals the minimal error around the true location.
With multiple stations the error function reveals the minimal error around the true location.

Now we can find an approximate solution by letting a computer walk downhill and narrow in on the solution. To see this in action see this demo. At some point you tell the program to end when the error gets low enough. This is how sites like http://www.lightningmaps.org/realtime work where this process is repeated for every event they detect.

Hopefully this sheds light on this wonderful tool.

Further Reading

If you’re interested, here are some of Mike’s other guest posts:

  • Mike’s first two guest posts were on probability. In the first post, he describes how probability works. In the second, he covers some more advanced topics like probability distributions.
  • Mike also wrote a wonderful post on parallel computing.
  • Finally, Mike recently wrote a post on the Aharanov Bohm effect.