Optimal Demand Response Models with Energy Storage Systems in Smart Grids