A judge on Friday approved bankrupt flywheel company Beacon Power’s plan to sell its primary working asset to try to pay back its $43 million federal loan. But unless the market for what that asset does gets more lucrative soon, the odds are that the government won’t be making back all the money it loaned out.

That’s the sad fact borne out by filings and statements that have emerged from the Tyngsboro, Mass.-based company since its bankruptcy filing last month. It’s the second company after Solyndra to take Department of Energy loan backing and then go bankrupt.

While the DOE has little hope to see much of the $535 million it loaned Solyndra, the fact that its Beacon loan was backed by a money-generating asset -- the company's 20-megawatt facility in Stephentown, N.Y. -- had given hope that the DOE might see some of its money back.

But according to the company’s latest quarterly report, while Beacon spent about $69 million to build the Stephentown facility, and had formerly marked its value at $41.9 million, its book value had fallen to about $12.6 million, or roughly one-fifth its construction cost, as of Sept. 30, 2011.

Part of that steep devaluation is based on the threat that Beacon won’t be able to stay intact as a company and keep running the plant to its most productive potential. But also important is the fact that NYISO, New York’s grid operator, has seen prices for frequency regulation fall ever since the Stephentown plant opened in January of this year.

Between January and September of 2011, the average price per megawatt-hour for frequency regulation fell from $20.34 to $10.51, or almost by half. It’s dangerous to use month-to-month prices to judge future prices, since they fluctuate so much. But Beacon’s own calculations show that so-called 12-month average prices, which smooth out these fluctuations, have also fallen 18 percent from June 2011 to September 2011, from $18.95 to $15.61.

Beacon saw $1.16 million in revenues from its frequency regulation services in the first nine months of this year, compared to $341,000 in the first nine months of 2010. But that increase doesn’t look very good when you recall that Beacon was only supplying about 3 megawatts of regulation service in 2010 and was ramped up to a full 20 megawatts by mid-2011.

Indeed, rapid changes in market prices for green energy are a danger for DOE-loan-winning companies, whether they be in solar or energy storage, Energy Secretary Stephen Chu told reporters after his Friday testimony before Congress.

What does all this mean for Beacon’s odds of getting a decent bid for its Stephentown facility? Right now, company executives are depending on a new federal rule that will require grid operators to pay more for “fast” response power than for slow, fossil-fueled power. Beacon CEO Bill Capp has said that rule could double the revenues per megawatt-hour that Beacon earns on its services.

Whether a potential buyer of Beacon’s Stephentown facility agrees is an open question, of course. Friday’s bankruptcy court agreement calls for a sale by January 30, 2012, while the Federal Energy Regulatory Commission’s new ruling isn’t set to start forcing changes within markets until mid-2012.

As Beacon put it in its third-quarter report: “We are unable to assess whether the recent pricing trend in New York is reflective of a temporary or a permanent change in the pricing structure.” The FERC order “should have a significant positive impact on our regulation revenue.  However, should frequency regulation pricing remain at current levels in New York, it is unlikely that we would be able to pay the [DOE] loan,” the report stated.

Beacon also got permission on Friday to keep spending the roughly $3 million in DOE loan money remaining to keep operating while it seeks to find investors to help it reorganize. But if the company can’t pull that off, a wholesale liquidation may be in the works -- and Beacon also got permission on Friday to keep selling other parts of the company over the coming months.

What else does Beacon have to offer? Overall, Beacon reported $72 million in assets and $47 million in debts in its bankruptcy filing. The company did land a $24 million smart grid demonstration grant to help it build a second 20-megawatt flywheel farm, though it hasn’t raised financing for that project yet. Beacon also got a $2.8 million grant from DOE’s ARPA-E program in September last year to develop more efficient flywheels, and is doing wind power and hydropower backup tests in California.

Beacon also has a 1-megawatt project under development in Montana to supply backup power to NorthWestern Energy, and has said its partners could buy out the project for about $4 million. But earlier this year, Beacon dismantled its flywheel operations at its Massachusetts headquarters, which provided as much as 3 megawatts in 2010, in order to use the flywheels for New York and Montana.