An Approach for Cost-Efficient Grid Integration of Distributed Renewable Energy Sources