The following is an excerpt from the GreenBiz State of Green Business Report 2016.

A few solar panels connected to an inverter, plus a battery no bigger than those found inside an electric vehicle. That’s all it takes for a village in Kenya that never before had electricity to light up homes and launch tiny businesses around with refrigrators and computers.

The collection of electrical parts providing the new source of power is called a microgrid. And because of them, rural communities across Kenya — as well as companies and cities around the world — are becoming more self-sufficient and resilient while polluting less. It’s nothing short of an energy revolution.

Microgrids are localized systems that generate and deliver electricity to a defined geographic area, such as a building, campus or neighborhood. They are transforming remote economies in the developing world, as well as businesses, universities and municipalities in the industrialized world. Microgrids can serve as backup power sources to entities also connected to the grid or can be operated independently, allowing homes or businesses to operate off the grid.

Microgrid deployment is a "global phenomenon," according to a 2015 Navigant Research report. It identified 1,437 microgrid projects worldwide representing 13 gigawatts of capacity either operating, proposed or under development. The market for microgrids will soar to $40 billion by 2020, a fivefold increase over seven years, Navigant predicted.

A convergence of technological, economic and environmental forces, each coming to a head over the past year, are pushing microgrid development forward rapidly, as if by gale-force winds.

The rise of battery storage is one of them. Storage effectively eliminates a key barrier to renewable power generation: the intermittent nature of sunshine and wind. Batteries enable a microgrid to store energy tapped during sunny or windy times of the day and save it for use during times when those weather conditions don’t exist.

The so-called Internet of Things, in which devices are connected and able to communicate in real time, is another technology driver. IoT software means that exactly the right amount of energy from the cheapest source can be delivered via microgrids or shifted in split-second response to changes in weather or demand, reacting just like the bigger grid does.

As these technologies have advanced, the costs of solar and wind power have plummeted, making renewables a compelling prospect for electricity buyers. The price of solar has fallen 82 percent per watt in the past six years, while wind power has dropped 61 percent during that time, according to Lazard’s Levelized Cost of Energy Analysis. That makes them price-competitive with — or in some markets cheaper than — fossil-fuel power.

And then there’s resilience. The perceived vulnerability of centralized electrical grids to extreme weather and other disruptive events are making microgrids an attractive option. As hurricanes, floods and other weather calamities become more frequent due to climate change — not to mention the actions of hackers or terrorists — utility power grids appear increasingly susceptible to cascading outages.

After Hurricane Sandy in 2012 knocked out power to much of the northeastern United States, New York, New Jersey and Connecticut began offering multimillion-dollar financing to cities interested in building microgrids as insurance against future power disruptions. Municipalities across the region took the offer, including Hoboken, New Jersey, and Fairfield, Connecticut.

Meanwhile, Tesla’s hometown of Fremont, California, is building a microgrid in part to keep things powered if and when the nearby Hayward fault erupts. So, too, is the city of San Francisco, which hopes a microgrid can provide backup power when the next big earthquake hits. Even in tiny Potsdam, New York, the local utility National Grid is partnering with GE, Clarkson University and the National Renewable Energy Lab to build what could be the nation’s largest municipal microgrid, buffering the town against ice storms and other disruptive weather.

Security is yet another factor. In April 2013, individuals carrying assault rifles broke into a utility substation in San Jose, California, and began shooting at 17 giant transformers that send power to the heart of Silicon Valley. A police response sent the criminals scurrying, and the utility, Pacific Gas & Electric, rerouted power from neighboring substations to prevent a serious outage. But the event was a huge reminder that energy grids can be taken out by troublemakers, or even terrorists.

The event spurred Jon Wellinghoff, then chairman of the Federal Energy Regulatory Commission, to become an advocate of decentralized grids. "The vulnerabilities are extreme, to the extent that we are in a situation where it would not take much to take down our entire grid," Wellinghoff said in an interview at the VERGE 2014 conference in San Francisco. The answer, he said, is dispersing the electricity nodes — and thus the targets — "by having many, many targets ultimately through microgrids."

The U.S. military gets this. It is deploying microgrids at key installations around the world. Defense Department literature describes microgrids as a way to assure uninterrupted power amid extreme weather and security threats. Microgrids are particularly well-suited for military operations because they can operate independently from a central grid, thereby engendering self-sufficiency. And they can vary in size, providing power to an entire military base or an individual camp.

Joining the military is a growing corps of companies, cities and institutions tapping into microgrids to meet economic, environmental and resilience goals. For example, the University of California at San Diego relies on a microgrid to power its 13-acre campus of research labs, hospitals, classrooms, living spaces and a fleet of electric vehicles.

Software manages electrical loads, responding in real time to changes in demand or supply. But microgrid deployment faces challenges, especially in industrialized regions with existing grids. Local utilities sometimes create barriers to microgrids, both for safety reasons and to protect existing monopolies. But even entrenched utilities are seeing the benefits, and many are working with microgrid developers and regulatory bodies to overcome the challenges.

The technology still has a way to go before it is truly plug-and-play, although interoperability is progressing quickly. When GreenBiz first built a microgrid to power the VERGE conference and expo in 2013, getting the various components to "talk" to one another was a formidable challenge. Just two years later, at VERGE 2015, those challenges were far fewer.

The U.S. microgrid market will benefit from legislation passed in 2015 that extended an investment tax credit for renewable and distributed energy resources. The tax credit’s extension suggests 2016 will be a banner year for solar, wind and microgrid installations, which often happen together.

Meanwhile, in Kenya and the rest of the developing world, the opportunity is massive. "What’s maybe most exciting about microgrids is that they could bring energy to 1.3 billion people around the world who don’t currently have electricity. India alone has as many as 400 million people without electricity, partly because of the dysfunction surrounding the design of its electric grid," said the Motley Fool’s Travis Holum.

That’s a $2 trillion electricity market — a power-packed opportunity.