Adaptive control for autonomous underwater vehicles