Optimal Design and Techno-Economic Analysis of a Grid-Connected Photovoltaic and Battery Hybrid Energy System