Add control function and calculate vf with vi, a, t