Optimal Control Of Distributed Energy Resources In Baseline-Based Demand Response Programs