Optimal sizing and life cycle assessment of residential photovoltaic energy systems with battery storage