SMART CONTROL AND MANAGEMENT FOR A RENEWABLE ENERGY BASED