Two-scale command shaping for feedforward control of nonlinear systems