Fabrication error model and near field beam modulation analysis for phase step diffractive gratings