In China they' ve been using this technology for more than 20 years. They've now got 10 million biogas digesters using animal waste. They can be fast-growing trees, grains, vegetable oils, agricultural residues or, as in the case of Brazil, sugar cane. With sugar cane, either the sugar or the bagasse can be used as a source of energy. The bagasse is what's left after you squeeze the cane - and it's very useful as fuel, animal feed, and construction material.
Sugar mills use the bagasse as an energy source, to provide heat during the sugar-producing process.
Imagine a sugar mill that uses the heat for producing sugar, but also feeds electricity to the grid, to the wires of the city. They're doing this in many countries. In Brazil they are also famous for using part of the sugar products to produce alcohol to put in cars. They have six million cars running with a mixture of 25 percent alcohol in their petrol. This has the advantage of reducing pollution and also you don't need to use lead, so you have a lead-free petrol.