OPTIMAL ENERGY COST AND ECONOMIC ANALYSIS OF A RESIDENTIAL GRID