Profile generator for reference and for feedforward torque