Sizing of a PV/ battery system is applied for providing power during peak of electricity grid. • The Cost based optimization is applied by the TLBO method. • The COE and the NPC of the system improved by 8.1% and 6.7%, respectively. • Sensitivity analysis ...