Across the northern United States and Canada, homeowners are checking their snow blowers, stocking firewood and draining outdoor pipes in preparation for cold weather. For municipalities, though, winter-proofing water mains isn’t so easy—the pipes travel long stretches underground, and this time of year, frozen ground and temperature differentials cause fine cracks to develop into full-blown leaks, often with catastrophic results.

You see news articles from time to time about sinkholes and water main breaks, but the problem is actually far more widespread, insidious and impactful than the odd chasm in a city street.

The American Society of Civil Engineers estimates in its 2017 Infrastructure Report Card that 240,000 water main breaks occur yearly in the U.S., with 2 trillion gallons of treated drinking water escaping. This means 14 to 18 percent of water treated each day is lost, enough to serve 15 million homes. And it’s worsening; a 2018 study from Utah State University found that pipe breaks in the U.S. and Canada have gone up 27 percent in the last six years. Furthermore, the water bills paid by customers aren’t enough to fund the water infrastructure, and the American Water Works Association estimates a $1 trillion price tag to fix it. In many developing nations, the problem is worse; the World Bank’s conservative estimate suggests 35 percent of water put into distribution systems may be lost across the 44 countries they examined. Around $14 billion worth is lost per year around the world.

Counterintuitively, small leaks (less than 10 gallons per minute) aren’t even called leaks, and don’t count toward the ASCE’s number of 240,000. These smaller, hard-to-find cracks are called “potential leaks”—to be called a leak, the crack must be releasing enough water that it wells up visibly from the ground. But potential leaks become leaks, and leaks become breaks, and millions of gallons (and dollars) seep or pour into the ground.

What’s a city to do?

Best practices according to the American Water Works Association start with a water audit, calculating the amount of water that would travel through an ideally efficient system, and comparing it to the amount that actually gets used by consumers, known as “revenue water.”

”Water efficiency is a fairly well-developed segment of the industry, where you’re looking at trying to monitor the performance of your system with respect to revenue and non-revenue water,” says Dennis Mutti, president of C3 Water, which works with municipalities in southwest Ontario to plan and optimize water systems, including potable and waste water.

The result of that audit gives cities some idea how much water is being lost. To mitigate that, they often hire contractors to look for leaks. Conventionally, leak detection involves waiting for that visible evidence, or systematically checking entire systems, opening hydrants or digging up pipes to place auditory sensors on them in hopes of hearing a leak.

Hundreds of miles apart, two different inventors are zeroing in on ever-smaller leaks in two very different ways. One is listening, carefully and with the help of artificial intelligence, for subtle changes in the sound of running water; the other is using a soft robot to carefully feel for the gentle tug made by the pressure differential of a tiny leak. Each has partnered with different municipalities, and each intends to save some part of those millions of gallons from escaping into the ground.

When You Wu was growing up in Shanghai, once a week on Thursdays, his neighborhood would turn off water to its citizens, as a way to conserve and prevent water shortages. “They shut down the water to my community, which affects maybe a quarter million people to a half million people,” says Wu, who moved to the U.S. in 2008 and attended MIT. “I felt like we were great citizens, we were helping the city conserve water. By the time I came to MIT, I realized, wait a second, we are conserving water, but at the same time, 20 to 30 percent of the clean water was lost to leaks in the same system.”

He started messing around with sensors, wondering if there’s a better way to find leaks before they get bad enough to hear—or as some cities do, waiting until the pipes break open entirely. Over six years he worked on the project, founding a company, Watchtower Robotics, after graduation. That company is just now starting pilot programs to deploy Wu’s third prototype, a badminton birdie-shaped soft robot called Lighthouse that slips through the pipes with the flow of the water. As it travels, flex sensors monitor a set of flippers at the base of the robot for the tiny tugs that happen as it passes pressure differentials formed by leaks. Eventually it pops out of a downstream fire hydrant, and operators use the data to calculate where the leak might be. For this process, Wu has obtained 10 patents, and his company licenses them from MIT. The device can detect a leak as small as 1 gallon per minute

In the frozen north—Waterloo, Ontario—a group of researchers are modifying the more traditional method, listening for leaks with the aid of artificial intelligence. Like Watchtower Robotics, the goal is to identify ever-smaller leaks. These are too small to detect via changes in pressure, and hard to discern from background noise, of which there is a lot when you pump a bunch of water through pipes. In fact, it’s not totally accurate to say they’re listening at all. Their device, described in a recent article in Urban Water Journal, is sunk into the water beneath a fire hydrant and uses hydrophonic sensors to monitor vibrations in the water for anything that is out of the ordinary. Via a process called signal spectrum analysis, the AI mathematically deconstructs the signal into components, and compares them to non-leaky vibrations.

“If you look at raw or entire signal, you can’t differentiate between [leaky and non-leaky sounds] very easily,” says Roya Cody, the University of Waterloo PhD student who authored the Urban Water Journal article. “But if you look at the subcomponents, the leak and the ambient cases look very different.”

To train this AI—that is, to give it a baseline for leaking and non-leaking scenarios with which to compare—the researchers built a network of 6-inch diameter PVC pipes in their lab, complete with T-junctions, a fire hydrant and simulated leaks located at various distances from the hydrophone. They connected it directly to the Waterloo municipal water system, which runs at 50 pounds per square inch.

The result is a system that can be implemented permanently, to run in the background and offer alerts when a pipe is compromised; the hydrophones in the hydrants remain there and operate constantly, rather than having to be placed and operated to search for leaks.

Comparing his robot to Waterloo’s AI, Wu points out important different use cases for the technologies. In an urban system, the density of pipes and the complex network lends itself to listening devices, especially with the help of computer intelligence, which can help analyze the data instead of relying just on trained technicians. But move to the suburbs or rural areas, and the long stretches of pipes—sometimes just a few houses over miles of piping—would require too many hydrophones to be practical. His robot shines here; just drop it in a hydrant, and pick it up again, miles down the line.

The inventors are now participating in trials and partnerships to dial in their products and get them ready for market. Mutti’s company is an industrial partner to the University of Waterloo, and helped that lab obtain a strategic grant from the Natural Sciences and Engineering Research Council of Canada to further develop the technology and test it in Guelph, Ontario. Watchtower Robotics, meanwhile, has recently completed its first pilot project in Corydon, Indiana, and is planning two more in Boston and San Antonio. Success for either company will mean fewer catastrophic breaks and fewer people out digging up pipes.

“At the end of the day, each of these breaks that occurs takes real people, often in very unpleasant conditions, to get out, excavate, do a repair, usually in very very short order,” says Mutti. “The more things we can do to make that easier and give them better tools to do that with is a great benefit to not only people paying a water bill, but to society in general.”