A Novel Analytical Approach for Optimal Integration of Renewable Energy Sources in Distribution Systems