The Lightning Catcher
A team built a network of sensor stations across Moscow that captures every lightning strike — even invisible ones inside clouds — and reconstructs full 3D models of each bolt in near real-time.
The Lightning Catcher
Yes, winter isn't the best time for an article about lightning. But the season is coming! The rainy and stormy season is just 4-5 months away, and there's plenty of work to do.
Has everyone seen lightning? Lightning is beautiful, twisted. Do you know what it really looks like? Sure, people manage to photograph it, but only from one side, and only every other time.
But we've learned to catch every single lightning bolt, and even build a complete 3D model of each one — even lightning invisible inside clouds! Moreover, within 15 seconds of a strike anywhere over Moscow, its coordinates and three-dimensional profile are updated on our website!
What Is Lightning? How Is It Born?
Wikipedia gives the most complete and detailed answer, but here's a brief summary of the essence of lightning, important for the subsequent description:
- Lightning is accompanied by a flash and thunder.
- Lightning is never shorter than several hundred meters and has an average length of 2.5 km.
- Lightning can be ground-to-ground (striking the ground, very rare) and intra-cloud.
And most importantly, how lightning is born:
- "Impact ionization" occurs in a cloud, which serves as the beginning of lightning, and a "leader charge" appears, which will then make its way through the atmosphere, paving the way for the main charge.
- The leader spontaneously selects a point in space located several tens of meters from itself, and flies there at enormous speed, creating a "channel" and emitting a quiet "crack."
- The leader makes the jump and stops at the point it arrived at, waiting there for several microseconds. During this time, a small charge silently passes from the base cloud through all previously created channels, feeding the leader.
- Then it repeats steps 2-3 until it reaches either the ground (which is extremely rare) or another charge concentration in another cloud, where it dissipates its charge.
- As soon as the leader reaches the discharge point, the main charge — which had been waiting in the cloud — rushes through all the channels it created in a fraction of a second, with a current of several hundred thousand amperes, producing a "BOOOOM."
On top of all that, the leader frequently splits into two or three branches, creating more and more offshoots.
The most important takeaway for the following description: lightning makes a sound like "crack-crack-...-crack-crack-BOOM," and the same thing happens with the light emission from lightning.
So Let's Catch It!
"What do you mean, catch it?!" you ask. Well, it's just a nice expression. In reality, the authors wanted to digitize lightning. They can see and hear it from three different locations and use triangulation to reconstruct the entire picture of each lightning bolt — the absolute position of the leader at every moment on a city map, as well as the duration of its stay at each point.
To do this, you need to take a map of Moscow and mark the points where the base-sensor-transmitter stations will be located. The areas of Mitino, Park Pobedy (Victory Park), and Maryina Roshcha were chosen. An excellent triangle! Plus they're all on elevated ground, which is also important.
Base-Sensor-Transmitter Stations
To see and hear lightning, the authors purchased photodiodes and microphones. But not ordinary ones. Lightning in Moscow always means rain. Rain for electronics always means death. So the authors spent considerably more and bought everything waterproof.
Three Raspberry Pi boards were purchased for signal processing. USB modems with mobile internet were used to transmit the signal from each base station to the main computer. Each base was powered by three car batteries.
Each base used 8 photodiodes arranged in a circle, pointing in different directions. The microphone was placed in the center of the circle, pointing upward. The software was programmed so that when a flash appears (it's assumed that the flash will be detected by all base stations simultaneously, marking the start of the countdown), high-frequency recording from the microphone begins.
Setting Up the Base
The authors never thought this would be the hardest part of the project. To place anything at all on the roof of a building, you need an absolutely incredible pile of documents! Expert review permission, management company permission, contracts, conditions — right down to the protocol of a residents' meeting. Faced with all this, the authors decided to go a different route. Posing as pizza delivery people, they went door to door in the neighborhoods near the chosen deployment points, looking for ways to access the rooftops. And lo and behold! Within 500 meters of each point, they found one such entrance in each area. After befriending the doormen, they hauled the equipment onto the rooftops, set it up, and happily ran home...
The First Storm
Never in their lives had the authors waited for a thunderstorm the way they did then. They waited about a month. And then it came. It happened so suddenly and quickly that they didn't even have time to finish grilling their kebabs at a dacha 40 km from Moscow. They had never driven so fast along the shoulder past traffic jams before.
The first signals were terrible. That's understandable — the microphones were configured haphazardly, the board was programmed haphazardly too, because there had been absolutely no way to test the board with the software. But thank God, the storm lasted about 5-6 hours, and there were exactly three authors. Rushing to the points where the bases were located, they started looking for a solution as quickly as possible. Right in the stairwell under the roof, the authors were tuning the equipment. Finally Sergey, one of the authors, configured everything properly and sent over the source code. After compiling and running the program, during the next lightning strike the authors realized that everything was working beautifully! The oscillograms of the recorded sounds were magnificent, especially after applying a median filter.
It's so obvious here that you don't even need to explain where the leader is making its way through the atmosphere and where the main discharge occurs. The other boards produced a completely identical signal with a slight shift in levels and volume! On top of that, the authors discovered that the longer the path the leader jumps across, the quieter the sound. Apparently, when jumping across shorter distances, a significantly larger current flows, and the diameter of heated air is greater, leading to a louder pop. The situation somewhat resembles the tunneling effect.
Look Here — Lightning's About to Appear!
After processing the received oscillograms in software created in Unity3D, the authors got them! Lightning bolts! Of course, not without problems. Let me list the issues:
- They didn't immediately figure out that the center of sound propagation should be not the point where the leader rests, but the middle of the "channel" it creates.
- The sampling frequency, rain noise, and car alarms going off during thunder were very disruptive.
- At one of the three stations, which the authors had placed deep inside a residential block in a mid-rise building, echoes from neighboring buildings and the ground terribly distorted the picture. They had to relocate the station to another building.
- An absolutely precise position of the bases was required; for this the authors needed to make another trip to the bases and record their exact GPS+GLONASS coordinates.
But here's the result!
What's more! The most astonishing thing is that during the next storm, the authors counted 8 visible lightning bolts. But there were 23 flashes with thunder, meaning 15 lightning bolts were inside the cloud, invisible to the human eye. Yet the authors' bases digitized even those! The authors saw invisible lightning. The closer a lightning bolt was to the center of the triangle, the more precisely they could trace it.
Here are a few more images of lightning bolts overlaid on Moscow, seen from above. If you found your house here, don't worry — not a single lightning bolt hit any building.
In Closing
Currently, the authors are preparing a website where all 3D images of lightning will be broadcast in real-time. You'll be able to look at the city from the lightning's location, as well as view the lightning as if from your own window, compare it with real lightning and verify the measurement accuracy. You'll be able to see all lightning bolts, their exact position and exact time of strike, as well as browse previous storms and download your favorite lightning bolt. For now, lightning will only be processed for Moscow, but the team would very much like to expand to other, rainier cities.
Yes, the authors admit that among everything else, wind, temperature fluctuations, and atmospheric pressure variations along the path from the lightning to the microphone were also very disruptive, so they couldn't achieve perfectly automatic digitization. The authors are confident that the processing program has an error margin of 50-100 meters at each point. But these 50-100 meters are still unnoticeable against the overall lightning length of 2,500 meters. It would be desirable to install small weather stations with a barometer, thermometer, and wind vane. On top of that, the microphones turned out to have insufficient sampling rates and produce a lot of noise. Based on their calculations, the authors determined that to locate lightning with an accuracy of 20 meters, at least 4-5 additional stations are needed to refine the results. Plus it would be desirable to place 2 microphones at each station for verification.
UPD1: Many Habr users are asking for more detailed information about the technical side of the project. They will gladly write it up — just need a bit of time.