A novel approach in Optimal trajectory identification for Autonomous driving in racetrack