Trajectory feedforward and feedback to input ann, output a control function