A new perturbation method for the diffraction of a plane wave by a grating with periodic imperfections is presented. The originality of the method lies in the fact that the perturbation occurs on a reference profile that is not a plane but a grating. First, the diffraction by a reference grating is treated. At this stage Maxwell's equations are used in covariant form written in a nonorthogonal coordinate system fitted to the surface geometry. Second, the periodic errors are taken into account. The tensorial formalism permits the elaboration of this two-roughness-level model. The grating profile appears only through two fundamental functions. The variations of these functions under the effect of variation in the profile are expanded in power series of the perturbation parameter v1 . v1 represents the maximum of the derivative of the function describing the perturbation. By using this formalism, we determine the efficiencies.