Optimal Scheduling of Energy Storage System for Self