OPTIMAL CONTROL FRAMEWORK FOR COST EFFECTIVE INTELLIGENT RENEWABLE