Conditional nonlinear optimal perturbation and its applications