Diffractive properties of DMD gratings and its new application in tunable fiber lasers