Enhanced trajectory tracking using optimally combined feedforward plant inversion and feedforward closed loop inversion