This paper introduces the principle and methods of using a cross diffraction grating as a 2D displacement sensor. According to the characteristic that second-order diffraction beams will produce a phase shift with the grating's motion and grating diffraction beams' tracing, the arrangement of the light routine is designed to form interference strips by congregating them. Based on arrangement of the light routine and some knowledge including the properties of light travel and reflection, the principle of vertex coordinate transformation and the solution for the intersection point of a line and plane, the direction and allocation of all diffraction beams are deduced. As a result, the relationship model between the diffraction beam (direction and position of the projective point on a detector) and the grating deflection around the X,Y, and Z axes and translation along the Z axis is built. The projective point and interference stripes' shape are simulated by Matlab and the sources of influencing the stripes' quality are analysed: for interference strips with relative X motion, the direction undergoes a great change when rotating around the X axis, the stripes' space is changed dramatically for deflection around the Z axis, direction and the space is hardly changed with movement along the Z axis and rotation around the Y axis. At the end, this paper discusses the qualitative relation between measurement error and abnormal translation or deflection of the grating.