Optimal Management Strategy of a Battery-Based Storage System to Improve Renewable Energy Integration in Distribution Networks