Generating needs-led electricity with biogas plants