California leads the nation in rooftop solar panels, which means it may soon start leading the nation in the technologies that integrate that solar into the grid -- like batteries, if they can do it at the right price.

That’s the test that Greensmith Energy Management Systems will be taking on a megawatt scale soon. The Bethesda, Md.-based startup makes software and hardware for managing batteries and their connection to the grid, including several solar-balancing projects with the likes of Hawaii Electric Co.,  Carolina utility Progress Energy (now part of Duke Energy), and big Southeast utility Southern Co.

Another, a 50-kilowatt, 82-kilowatt-hour project with solar-rich utility San Diego Gas & Electric, appears to have proven itself ready for a second, bigger phase. Greensmith CEO John Jung told me in an interview last week that the company is now hooking up 1.5 megawatts of grid-balancing lithium-ion batteries, set up in five 300 kilowatt-hour units, for SDG&E some time this fall.

Greensmith will provide the underlying management software, and is in charge of sourcing the batteries and other systems for the project, which hasn’t been officially announced by SD&E, Jung said. While it’s not the biggest grid energy storage project in California, it’s among the biggest specifically aimed at managing solar power fluctuations.

Just how much energy storage California will need to achieve its goal of getting a third of its energy from renewable sources by 2020 is a matter of some debate. The vast majority of that renewable power will come in the form of wind and solar, which are both intermittent in nature.

As these technologies grow into double-digit penetration on the grid, they’re expected to need careful management by utilities seeking to balance them. While weather and load forecasting, smart inverters, demand response and other smart grid-enabled technologies can handle some of the intermittency, much of it must be backed up with real power, either with natural gas-fired peaker plants or with energy storage.

Natural gas is now cheap, and batteries are still too expensive to compete with it, except in a few rare cases where putting in a battery is cheaper than the alternative of, say, building new power lines or commissioning a new coal plant. Wind energy is the biggest user of battery grid storage, whether it’s sodium-sulfur batteries, lithium-ion, flow batteries, Xtreme Power’s solid-state lead-acid battery technology.

But solar power hasn’t seen as much of a corresponding demand for energy storage -- perhaps because so much of it is distributed across millions of rooftops. Still, we’re seeing lots of pilot projects, particularly in California.

One spot with a number of such projects is Sacramento, which just announced a $2 million, 500-kilowatt project for Sacramento Municipal Utility District with inverter maker Satcon, lithium-ion battery maker A123 and solar installer Renewable Energy Services. Silent Power, the Baxter, Minn.-based startup that just landed South Korea’s Hanwha SolarOne as a go-to-market partner, is also working in Sacramento, testing its OnDemandTM Energy Appliance, an inverter module that connects with central utility control systems, in a 15-home pilot with SMUD.

Southern California Edison and Pacific Gas & Electric are also testing energy storage, in the form of both large-scale wind power backup projects and smaller scale, neighborhood energy storage that could be useful in merging solar power with the grid.

Across the U.S., vendors such as A123 Systems, Saft, LG Chem, Kokam, AltairNano and Petra Solar are involved in solar-storage pilots via government programs such as the Department of Energy’s Solar Energy Grid Integration System (SEGIS) program. Similar efforts underway in China and Japan are bringing Asian companies to the fore.

It appears that solar manufacturers may be responding with products ready-built for the market. In Europe, solar-storage combos are being promised by vendors such as SolarWorld, Samsung, BYD, Aleo Solar, centrosolar, Bosch/Voltwerk and Kyocera. We’ve also seen interesting partnerships emerge, such as those between General Electric and Arista, Tesla and SolarCity and Silent Power and Hanwha, to bring battery-backed storage to a grand scale.

What’s the market beyond pilot projects? One test point for that question could come through Greensmith’s new partnership with ZEN Energy Systems. The Australian solar installer is licensing Greensmith’s battery operating system to match up with its own supply of batteries and inverters for both residential and commercial-scale solar installations.

ZEN represents the first of many OEM technology-licensing deals Greensmith is seeking as a technology provider and integrator of others’ batteries and power electronics, Jung said. The startup has raised $6 million to date, and is looking to raise somewhere south of $10 million in a Series B round by year’s end, Jung said.

ZEN is looking at remote communities as early target markets, where high costs of upgrading transmission lines can justify the still-high cost of batteries and the grid management software to put them to most effective use, Jung said. Australia also has a feed-in tariff program that makes solar a more reliable investment, he noted.

In the case of California, the economics are a bit murkier. While lithium-ion, advanced lead-acid and cutting-edge battery technologies may still be too expensive for bulk energy storage on the grid, they may be well-suited to smoothing out the second-by-second ups and downs in solar panel output that can destabilize the grid. Just how much storage is needed for the task, and at what costs compared to the alternatives, may be harder to find out, until it’s really needed.