Real-time tuning of PID controller based on optimization algorithms for a quadrotor