So the 30-megawatt wind farm, which will have enough power to run about 30 Super Wal-Marts, will have Xtreme Power of Austin, Tex., install a 15-megawatt battery.

Computers will work to keep the battery exactly half-charged most hours of the day, said Carlos J. Coe, Xtreme Power’s chief executive. If the wind suddenly gets stronger or falls off, the batteries will smooth out the flow so that the grid sees only a more gradual increase or decrease, no more than one megawatt per minute at some hours of the day.

The Hawaii installation is designed to succeed at a crucial but obscure function: frequency regulation. The alternating-current power system has to run at a strict 60 cycles per second, and the battery system can give and take power on a micro scale, changing directions from charge to discharge or vice versa within that 60th of a second, to keep the pace steady.

The battery system can also be used for arbitrage, storing energy at times when prices are low and delivering it when prices are high. It can hold 10 megawatt-hours, which is as much energy as a 30-megawatt wind farm will produce in 20 minutes if it is running at full capacity. That is not much time, but it is huge in terms of storage capacity.

Neither First Wind nor Xtreme Power would say what the project cost, but publicly disclosed figures put the project in the range of $130 million, with about $10 million for the battery. The Energy Department has provided a $117 million loan guarantee.

Across the country, it is proving hard to predict the cost and the value of power storage to consumers. The electricity stored in off-peak hours could be quite low in cost, and prices at peak hours could be quite high. If the reliance on renewable energy reduces the need to burn coal and natural gas, that would yield an additional advantage.