Energy management in buildings using photovoltaics (2012)