Abstract:
A method for measuring the displacement of a planar motor rotor. The measuring method comprises: four magnetic induction intensity sensors are distributed on the planar motor rotor; sampled signals of the four distributed sensors are processed to obtain signals B sx , B cx , B sy  and B cy  and magnetic field reference values B ksx , B kcx , B ksy  and B kcy ; and X-direction displacement and Y-direction displacement can be measured respectively according to inequalities (I) and (II) by judgments, wherein Δ x  and Δ y  are X-direction displacement resolution and Y-direction displacement resolution respectively, and BM is the magnetic induction intensity amplitude of the magnetic field of said planar motor. The method provided by the invention is simple in calculation, can avoid calculation of a transcendental function and solve the quadrant judgment problem, is favorable to real-time high-speed operation and has a high engineering value. 
     
       
         
           
             
               
                 
                   
                      
                     
                       
                         
                           
                             B 
                             ksx 
                           
                           ⁢ 
                           
                             B 
                             cx 
                           
                         
                         - 
                         
                           
                             B 
                             kcx 
                           
                           ⁢ 
                           
                             B 
                             sx 
                           
                         
                       
                       
                         B 
                         M 
                         2 
                       
                     
                      
                   
                   ≥ 
                   
                     Δ 
                     x 
                   
                 
               
               
                 
                   ( 
                   I 
                   ) 
                 
               
             
             
               
                 
                   
                      
                     
                       
                         
                           
                             B 
                             ksy 
                           
                           ⁢ 
                           
                             B 
                             cy 
                           
                         
                         - 
                         
                           
                             B 
                             kcy 
                           
                           ⁢ 
                           
                             B 
                             sy 
                           
                         
                       
                       
                         B 
                         M 
                         2 
                       
                     
                      
                   
                   ≥ 
                   
                     Δ 
                     y 
                   
                 
               
               
                 
                   ( 
                   II 
                   )

Description:
TECHNICAL FIELD 
     The present invention relates to a displacement measuring method for a motor, which is especially suitable for analyzing the magnetic field signals of the planar motor and enabling fine displacement detection of the planar motor. 
     BACKGROUND ART 
     The rotary motor may provide a driving power which can be converted to a planar movement by a mechanism. The mechanism is usually complex and the precision and speed of its transmission are limited for this, which is disadvantageous along with other problems such as frequent calibration, high cost, poor reliability and too big size. The early planar motor is operated by two planar type motors which are directly driven, which structure increases the complexity of the transmission system. In contrast, the planar motor, which can directly utilize electro-magnetic energy to drive the planar movement, has advantages of high concentration of force, low dissipation of heat and high precision etc, thus the inter-mediate transmitting device is saved which was used for converting a rotary movement into a planar movement and into another planar movement. And it becomes possible to integrate the object being controlled with the motor which has advantages such as quick response, good sensitivity, good servo control and simple structure. 
     Signal subdivision has a wide applicability in the fields of machinery and electronics. The magnetic field signals of the planar motor are distributed periodically, and when the signal varies in the one period, a fixed spatial displacement occurs correspondingly. Usually, the measurement circuit performs the measurement for the displacement by counting periods of the signal. When only counting the periods is performed, apparently, the resolution is the displacement corresponding to the one period of the signal. Thus, in order to improve the resolution of the instrument, subdivision must be required. 
     SUMMARY OF THE INVENTION 
     One goal of the present invention is to provide a method for measuring the displacement of the rotor of a planar motor, to measure relative displacements of the rotor and stator of the planar motor in X and Y directions and enable high subdivision of the signal and simple and quick signal processing. 
     To achieve the above-mentioned goal, the technical solution provided by the invention is as follows: 
     1) a magnetic field is generated by a magnetic steel array on the stator of a planar motor and four magnetic induction intensity sensors are disposed on the rotor of a planar motor, the coordinates of the first sensor are (X 1 , Y 1 ), the coordinates of the second sensor are (X 3 , Y 1 ), the coordinates of the third sensor are (X 2 , Y 2 ) and the coordinates of the fourth sensor are (X 4 , Y 2 ); the sampled signals of the first sensor, the second sensor, the third sensor and the fourth sensor are B a , B b , B c  and B d , and the sampled signals B a , B b , B c  and B d  are processed in a signal processing circuit, wherein, the X-direction coordinates X 1 , X 2 , X 3  and X 4  are spaced apart from each other sequentially by a distance of one fourth of the X-direction magnetic field pitch τ x  of the planar motor, and the Y-direction coordinates Y 1  and Y 2  are spaced apart from each other by a distance of one fourth of the Y-direction magnetic field pitch τ y  of the planar motor; 
     2) supposing the X-direction displacement resolution as Δx, and the Y-direction displacement resolution as Δy, the magnitude of the magnetic induction intensity of the magnetic field generated by the magnetic steel array is measured as B M , the X-direction counting unit is initialized to be n x =0, the Y-direction counting unit is initialized to be n y =0, the X-direction magnetic field reference values are initialized to be 
                 B   ksx     =         B     a   ⁢           ⁢   0       -     B     b   ⁢           ⁢   0         2       ,       B   kcx     =         B   co     -     B   do       2       ,         
and the Y-direction magnetic field reference values are initialized to be
 
                 B   ksy     =         B     a   ⁢           ⁢   0       +     B     b   ⁢           ⁢   0         2       ,       B   kcy     =         B     c   ⁢           ⁢   0       +     B     d   ⁢           ⁢   0         2       ,         
wherein, B a0 , B b0 , B c0  and B d0  are respectively the sampled signals from the first sensor, the second sensor, the third sensor and the fourth sensor when the rotor of the planar motor is at the initial position;
 
     3) the measurement starts, the sampled signals B a , B b , B c  and B d  of the first sensor, the second sensor, the third sensor and the fourth sensor are obtained by sampling, and the sampled signals B a , B b , B c  and B d  are processed in the signal processing circuit to obtain four signals B sx , B cx , B sy  and B cy , wherein 
     
       
         
           
             
               
                 B 
                 sx 
               
               = 
               
                 
                   
                     B 
                     a 
                   
                   - 
                   
                     B 
                     b 
                   
                 
                 2 
               
             
             , 
             
               
                 B 
                 cx 
               
               = 
               
                 
                   
                     B 
                     c 
                   
                   - 
                   
                     B 
                     d 
                   
                 
                 2 
               
             
             , 
             
               
                 B 
                 sy 
               
               = 
               
                 
                   
                     B 
                     a 
                   
                   + 
                   
                     B 
                     b 
                   
                 
                 2 
               
             
             , 
             
               
                 
                   B 
                   cy 
                 
                 = 
                 
                   
                     
                       B 
                       c 
                     
                     + 
                     
                       B 
                       d 
                     
                   
                   2 
                 
               
               ; 
             
           
         
       
     
     4) it is determined by the signal processing circuit that whether the X-direction displacement is generated and whether the Y-direction displacement is generated, 
     a. if the X-direction displacement is generated, then whether the X-direction displacement is forward or backward is needed to be determined further, and if the generated X-direction displacement has a forward direction, then the X-direction counting unit performs n x =n x +1, and if the generated X-direction displacement has a backward direction, then the X-direction counting unit performs n x =n x −1, and the X-direction magnetic field reference values are updated to B ksx =B sx , B kcx =B cx ; thus the X-direction displacement measurement is completed; 
     if the X-direction displacement is not generated, then the X-direction displacement measurement is completed directly; 
     b. if the Y-direction displacement is generated, then whether the Y-direction displacement is forward or backward is needed to be determined further, and if the generated Y-direction displacement has a forward direction, then the Y-direction counting unit performs n y =n y +1, if the generated Y-direction displacement has a backward direction, then the Y-direction counting unit performs n y =n y −1, and the Y-direction magnetic field reference values are updated to B ksy =B sy , B kcy =B cy , and the Y-direction displacement measurement is completed; 
     if the Y-direction displacement is not generated, then the Y-direction displacement measurement is completed directly; 
     5) when the X-direction displacement measurement and the Y-direction displacement measurement are both completed, the X-direction relative displacement of the rotor of the planar motor is calculated as x=n x ·Δx, and the Y-direction relative displacement is calculated as y=n y ·Δy; and 
     6) the steps 3) to 5) are repeated to enable the real-time measurement for the displacement of the rotor of the planar motor. 
     In the above-mentioned technical solution, it is characterized in that, whether the X-direction displacement is generated and whether the X-direction displacement is forward or backward determined in the step 4) are performed as follows, 
     if 
                            B   ksx     ⁢     B   cx       -       B   kcx     ⁢     B   sx           B   M   2            ≥     Δ   x       ,         
then the relative displacement of the rotor of the planar motor in the X-direction is Δx; and if not, then it is considered that the relative displacement in the X-direction is not generated by the rotor of the planar motor;
 
     if B ksx B cx −B kcx B sx ≧0, then the relative displacement of the rotor of the planar motor in the X-direction is in the forward direction; and if not, then the relative displacement of the rotor of the planar motor in the X-direction is in the backward direction. 
     In the above-mentioned technical solution, it is characterized in that, whether the Y-direction displacement is generated and whether the Y-direction displacement is forward or backward determined in the step 4) are performed as follows, 
     if 
                            B   ksy     ⁢     B   cy       -       B   kcy     ⁢     B   sy           B   M   2            ≥     Δ   y       ,         
then the relative displacement of the rotor of the planar motor in the Y-direction is Δy; and if not, then it is considered that the relative displacement in the Y-direction is not generated by the rotor of the planar motor;
 
     if B ksy B cy −B kcy B sy ≧0, then the relative displacement of the rotor of the planar motor in the Y-direction is in the forward direction; and if not, then the relative displacement of the rotor of the planar motor in the Y-direction is in the backward direction. 
     The technical solution provided by the present invention is advantageous in various aspects, that is, the relative displacement of the rotor to the stator in the motor is measured by directly taking the magnetic field in the motor itself as a detection signal for the displacement. In this way, various disadvantages can be avoided such as difficulty in installing the sensors, and the resolution of the measuring system is improved to enable a high subdivision. And the calculations of transcendental functions and quadrant determination are avoided which is good for real-time high speed operation and has a higher engineering value. 
    
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         FIG. 1  is an overall structural schematic diagram showing the method for measuring the displacement of the rotor of a planar motor applied to a moving-coil type planar motor according to the present invention. 
         FIG. 2  is a schematic diagram showing the positions where a first sensor, a second sensor, a third sensor and a fourth sensor are installed on the rotor of a planar motor. 
         FIG. 3  is a flowchart showing the method for measuring the displacement of the rotor of a planar motor according to the present invention. 
     
    
    
     In which,  1 —stator of planar motor;  2 —magnetic steel array;  3 —rotor of planar motor;  4 —first sensor;  5 —second sensor;  6 —third sensor;  7 —fourth sensor;  8 —signal processing circuit. 
     DETAILED DESCRIPTION OF THE EMBODIMENTS 
     In the following, taking a moving-coil type planar motor as an example, the method for measuring the displacement of the rotor of the planar motor of the invention is illustrated in connection with the drawings and embodiments. 
     Referring to  FIGS. 1 and 2 , a sensor arrangement is shown in which the method for measuring the displacement of the rotor is applied to a moving-coil type planar motor. A magnetic field B=B M (sin x+sin y) is generated by a magnetic steel array  2  on a stator  1  of a planar motor, wherein, B M  is the magnitude of the magnetic induction intensity of the magnetic field B generated by the magnetic steel array  2 , x is the X-direction displacement of the rotor of the planar motor, and y is the Y-direction displacement of the rotor of the planar motor. Four magnetic induction intensity sensors are disposed on the rotor  3  of the planar motor, the coordinates of the first sensor  4  are (X 1 , Y 1 ), the coordinates of the second sensor  5  are (X 3 , Y 1 ), the coordinates of the third sensor  6  are (X 2 , Y 2 ) and the coordinates of the fourth sensor  7  are (X 4 , Y 2 ), the sampled signals of the first sensor, the second sensor, the third sensor and the fourth sensor are B a , B b , B c  and B d  respectively, and the sampled signals B a , B b , B c  and B d  are processed in a signal processing circuit  8 , wherein, the X-direction coordinates X 1 , X 2 , X 3  and X 4  are spaced apart from each other sequentially by a distance of one fourth of the X-direction magnetic field pitch τ x  of the planar motor, and the Y-direction coordinates Y 1  and Y 2  are spaced apart from each other by a distance of one fourth of the Y-direction magnetic field pitch τ y  of the planar motor. 
       FIG. 3  is a flowchart for measuring the displacement of the rotor of the planar motor according to the present invention. According to the above-mentioned sensor arrangement, the sampled signals B a , B b , B c  and B d  of the first sensor, the second sensor, the third sensor and the fourth sensor are respectively
 
 B   a   =B   M (sin  x +sin  y )   (1)
 
 B   b   =B   M (−sin  x +sin  y )   (2)
 
 B   c   =B   M (cos  x +cos  y )   (3)
 
 B   d   =B   M (−cos  x +cos  y )   (4)
 
     The B a , B b , B c  and B d  are processed respectively to obtain four signals B sx , B cx , B sy  and B cy , wherein 
     
       
         
           
             
               
                 B 
                 sx 
               
               = 
               
                 
                   
                     B 
                     a 
                   
                   - 
                   
                     B 
                     b 
                   
                 
                 2 
               
             
             , 
             
               
                 B 
                 cx 
               
               = 
               
                 
                   
                     B 
                     c 
                   
                   - 
                   
                     B 
                     d 
                   
                 
                 2 
               
             
             , 
             
               
                 B 
                 sy 
               
               = 
               
                 
                   
                     B 
                     a 
                   
                   + 
                   
                     B 
                     b 
                   
                 
                 2 
               
             
             , 
             
               
                 B 
                 cy 
               
               = 
               
                 
                   
                     
                       B 
                       c 
                     
                     + 
                     
                       B 
                       d 
                     
                   
                   2 
                 
                 . 
               
             
           
         
       
     
     Suppose B sx , B cx , B sy  and B cy  at the time i as B isx , B icx , B isy  and B  icy  respectively. According to the equations (1), (2), (3) and (4), and the definitions of B sx , B cx , B sy  and B cy , B isx , B icx , B isy  and B icy  can be obtained as follows:
 
B isx =B M  sin x   (5)
 
B icx =B M  cos x   (6)
 
B isy =B M  sin y   (7)
 
B icy =B M cos y   (8)
 
     Suppose B sx , B cx , B sy  and B cy  at the time i+1 as B (i+1)sx , B (i+1)cx , B (i+1)sy  and B (i+1)cy  respectively. According to the equations (1), (2), (3) and (4), when the X-direction relative displacement Δ x  of the rotor of the planar motor occurred from the time i to i+1 and the Y-direction relative displacement Δ y  of the rotor of the planar motor occurred from the time i to i+1 are very small, then B (i+1)sx , B (i+1)cx , B (i+1)sy  and B (i+1)cy  are approximated as follows:
 
 B   (i+1)sx   =B   M  sin( x+Δ   x )≈ B   M (sin  x+Δ   x  cos  x )   (9)
 
 B   (i+1)cx   =B   M  cos( x+Δ   x )≈ B   M (cos  x−Δ   x  sin  x )   (10)
 
 B   (i+1)sy   =B   M  sin( y+Δ   y )≈ B   M (sin  y+Δ   y  cos  y )   (11)
 
 B   (i+2)cy   =B   M  cos( y+Δ   y )≈ B   M (cos  y−Δ   y  sin  y )   (12)
 
     The equations (5) to (12) are calculated to obtain: 
     
       
         
           
             
               
                 
                   
                      
                     
                       
                         
                           
                             B 
                             
                               
                                 ( 
                                 
                                   i 
                                   + 
                                   1 
                                 
                                 ) 
                               
                               ⁢ 
                               sx 
                             
                           
                           ⁢ 
                           
                             B 
                             icx 
                           
                         
                         - 
                         
                           
                             B 
                             
                               
                                 ( 
                                 
                                   i 
                                   + 
                                   1 
                                 
                                 ) 
                               
                               ⁢ 
                               cx 
                             
                           
                           ⁢ 
                           
                             B 
                             isx 
                           
                         
                       
                       
                         B 
                         M 
                         2 
                       
                     
                      
                   
                   ≈ 
                   
                     Δ 
                     x 
                   
                 
               
               
                 
                   ( 
                   13 
                   ) 
                 
               
             
             
               
                 
                   
                      
                     
                       
                         
                           
                             B 
                             
                               
                                 ( 
                                 
                                   i 
                                   + 
                                   1 
                                 
                                 ) 
                               
                               ⁢ 
                               sy 
                             
                           
                           ⁢ 
                           
                             B 
                             icy 
                           
                         
                         - 
                         
                           
                             B 
                             
                               
                                 ( 
                                 
                                   i 
                                   + 
                                   1 
                                 
                                 ) 
                               
                               ⁢ 
                               cy 
                             
                           
                           ⁢ 
                           
                             B 
                             isy 
                           
                         
                       
                       
                         B 
                         M 
                         2 
                       
                     
                      
                   
                   ≈ 
                   
                     Δ 
                     y 
                   
                 
               
               
                 
                   ( 
                   14 
                   ) 
                 
               
             
           
         
       
     
     In the application of the real-time measurement for the displacement of the rotor of the planar motor, the left parts of the equations (13) and (14) are calculated from the sampled signals of the first sensor, the second sensor, the third sensor and the fourth sensor; and Δx and Δy are the X-direction displacement resolution and the Y-direction displacement resolution respectively which are set at initialization. During the real-time measurement, whether 
                          B       (     i   +   1     )     ⁢   sx       ⁢     B   icx       -       B       (     i   +   1     )     ⁢   cx       ⁢     B   isx           B   M   2            ≥     Δ   x           
and whether
 
                          B       (     i   +   1     )     ⁢   sy       ⁢     B   icy       -       B       (     i   +   1     )     ⁢   cy       ⁢     B   isy           B   M   2            ≥     Δ   y           
are determined respectively and simultaneously. If
 
                            B       (     i   +   1     )     ⁢   sx       ⁢     B   icx       -       B       (     i   +   1     )     ⁢   cx       ⁢     B   isx           B   M   2            ≥     Δ   x       ,         
then it is considered that the X-direction displacement generated by the rotor is Δx; if not, then it is considered that the X-direction displacement generated by the rotor is less than Δx. If
 
                            B       (     i   +   1     )     ⁢   sy       ⁢     B   icy       -       B       (     i   +   1     )     ⁢   cy       ⁢     B   isy           B   M   2            ≥     Δ   y       ,         
then it is considered that the Y-direction displacement generated by the rotor is Δy; if not, then it is considered that the Y-direction displacement generated by the rotor is less than Δy.
 
     If it is considered that the X-direction displacement is generated by the rotor, then the direction of displacement Δx is needed to be determined further; if B (i+1)sx B icx −B (i+1)cx B isx ≧0, then it is considered the direction of displacement Δx is the forward direction, and at the same time, the X-direction counting unit performs n x =n x +1; and if B (i+1)sx B icx −B (i+1)cx B isx &lt;0, then it is considered that the direction of displacement Δx is the backward direction, and at the same time, the X-direction counting unit performs n x =n x −1. 
     If it is considered that the Y-direction displacement is generated by the rotor, then the direction of displacement Δy is needed to be determined further; if B (i+1)sy B icy −B (i+1)cy B isy ≧0, then it is considered that the direction of displacement Δy is the forward direction, and at the same time, the Y-direction counting unit performs n y =n y +1; and if B (i+1)sy B icy −B (i+1)cy B isy &lt;0, then it is considered that the direction of displacement Δy is the backward direction, and at the same time, the Y-direction counting unit performs n y =n y −1. 
     When the X-direction displacement measurement and the Y-direction displacement measurement are both completed, the X-direction relative displacement of the rotor is calculated as x=n x ·Δx, and the Y-direction relative displacement is calculated as y=n y ·Δy. 
     Additionally, the present invention provides a method for measuring the displacement of the rotor of a planar motor, the method comprising the following steps, 
     1) a magnetic field is generated by a magnetic steel array  2  on a stator  1  of a planar motor and four magnetic induction intensity sensors are disposed on a rotor  3  of the planar motor, the coordinates of the first sensor  4  are (X 1 , Y 1 ), the coordinates of the second sensor  5  are (X 3 , Y 1 ), the coordinates of the third sensor  6  are (X 2 , Y 2 ) and the coordinates of the fourth sensor  7  are (X 4 , Y 2 ), the sampled signals of the first sensor, the second sensor, the third sensor and the fourth sensor are B a , B b , B c  and B d  respectively, and the sampled signals B a , B b , B c  and B d  are processed in a signal processing circuit  8 , wherein, the X-direction coordinates X 1 , X 2 , X 3  and X 4  are spaced apart from each other sequentially by a distance of one fourth of the X-direction magnetic field pitch τ x  of the planar motor and the Y-direction coordinates Y 1  and Y 2  are spaced apart from each other by a distance of one fourth of the Y-direction magnetic field pitch τ y  of the planar motor; 
     2) supposing the X-direction displacement resolution as Δx, and the Y-direction displacement resolution as Δy, the magnitude of the magnetic induction intensity of the magnetic field generated by the magnetic steel array  2  is measured as B M , the X-direction counting unit is initialized to be n x =0, the Y-direction counting unit is initialized to be n y =0, the X-direction magnetic field reference values are initialized to be 
                 B   ksx     =         B     a   ⁢           ⁢   0       -     B     b   ⁢           ⁢   0         2       ,       B   kcx     =         B   co     -     B   do       2       ,         
and the Y-direction magnetic field reference values are initialized to be
 
                 B   ksy     =         B     a   ⁢           ⁢   0       +     B     b   ⁢           ⁢   0         2       ,       B   kcy     =         B     c   ⁢           ⁢   0       +     B     d   ⁢           ⁢   0         2       ,         
wherein, B a0 , B b0 , B c0  and B d0  are respectively the sampled signals from the first sensor, the second sensor, the third sensor and the fourth sensor when the rotor of the planar motor is at the initial position;
 
     3) the measurement starts, the sampled signals B a , B b , B c  and B d  of the first sensor  4 , the second sensor  5 , the third sensor  6  and the fourth sensor  7  are obtained by sampling, and the sampled signals B a , B b , B c  and B d  are processed in the signal processing circuit  8  to obtain four signals B sx , B cx , B sy  and B cy , wherein 
     
       
         
           
             
               
                 B 
                 sx 
               
               = 
               
                 
                   
                     B 
                     a 
                   
                   - 
                   
                     B 
                     b 
                   
                 
                 2 
               
             
             , 
             
               
                 B 
                 cx 
               
               = 
               
                 
                   
                     B 
                     c 
                   
                   - 
                   
                     B 
                     d 
                   
                 
                 2 
               
             
             , 
             
               
                 B 
                 sy 
               
               = 
               
                 
                   
                     B 
                     a 
                   
                   + 
                   
                     B 
                     b 
                   
                 
                 2 
               
             
             , 
             
               
                 
                   B 
                   cy 
                 
                 = 
                 
                   
                     
                       B 
                       c 
                     
                     + 
                     
                       B 
                       d 
                     
                   
                   2 
                 
               
               ; 
             
           
         
       
     
     4) it is determined by the signal processing circuit  8  whether the X-direction displacement is generated and whether the Y-direction displacement is generated, 
     a. if the X-direction displacement is generated, then whether the X-direction displacement is forward or backward is needed to be determined further; and if the generated X-direction displacement has a forward direction, then the X-direction counting unit performs n x =n x +1; if the generated X-direction displacement has a backward direction, then the X-direction counting unit performs n x =n x −1, and the X-direction magnetic field reference values are updated to B ksx =B sx , B kcx =B cx ; thus the X-direction displacement measurement is completed; 
     if the X-direction displacement is not generated, then the X-direction displacement measurement is completed directly; 
     b. if the Y-direction displacement is generated, then whether the Y-direction displacement is forward or backward is needed to be determined further, and if the generated Y-direction displacement has a forward direction, then the Y-direction counting unit performs n y =n y +1, if the generated Y-direction displacement has a backward direction, then the Y-direction counting unit performs n y =n y −1, and the Y-direction magnetic field reference values are updated to B ksy =B sy , B kcy =B cy ; thus the Y-direction displacement measurement is completed; 
     if the Y-direction displacement is not generated, then the Y-direction displacement measurement is completed directly; 
     5) when the X-direction displacement measurement and the Y-direction displacement measurement are both completed, the X-direction relative displacement of the rotor is calculated as x=n x ·Δx, and the Y-direction relative displacement is calculated as y=n y ·Δy; and 
     6) the steps 3) to 5) are repeated to enable the real-time measurement for the displacement of the rotor of the planar motor. 
     In the above-mentioned technical solution, it is characterized in that, whether the X-direction displacement is generated and whether the X-direction displacement is forward or backward determined in the step 4) are performed as follows, 
     if 
                            B   ksx     ⁢     B   cx       -       B   kcx     ⁢     B   sx           B   M   2            ≥     Δ   x       ,         
then the relative displacement of the rotor in the X-direction is Δx; and if not, then it is considered that the relative displacement in the X-direction is not generated by the rotor;
 
     if B ksx B cx −B kcx B sx ≧0, then the relative displacement of the rotor in the X-direction is in the forward direction; and if not, then the relative displacement of the rotor in the X-direction is in the backward direction. 
     In the above-mentioned technical solution, it is characterized in that, whether the Y-direction displacement is generated and whether the Y-direction displacement is forward or backward determined in the step 4) are performed as follows, 
     if 
                            B   ksy     ⁢     B   cy       -       B   kcy     ⁢     B   sy           B   M   2            ≥     Δ   y       ,         
then the relative displacement of the rotor in the Y-direction is Δy; and if not, then it is considered that the relative displacement in the Y-direction is not generated by the rotor;
 
     if B ksy B cy −B kcy B sy ≧0, then the relative displacement of the rotor in the Y-direction is in the forward direction; and if not, then the relative displacement of the rotor in the Y-direction is in the backward direction. 
     Embodiment 
     The said magnetic field pitch τ x =τ y =35.35 mm, the said X-direction displacement resolution Δx=15 μm, the said Y-direction displacement resolution Δy=15 μm, and the magnitude of the magnetic induction intensity of the magnetic field generated by the magnetic steel array is measured as B M =80 mT. 
     1) a magnetic field is generated by a magnetic steel array  2  on the stator  1  of a planar motor and four magnetic induction intensity sensors are disposed on the rotor  3  of the planar motor; the coordinates of the first sensor  4  are (X 1 , Y 1 ), the coordinates of the second sensor  5  are (X 3 , Y 1 ), the coordinates of the third sensor  6  are (X 2 , Y 2 ) and the coordinates of the fourth sensor  7  are (X 4 , Y 2 ), the sampled signals of the first sensor, the second sensor, the third sensor and the fourth sensor are B a , B b , B c  and B d , respectively, and the sampled signals B a , B b , B c  and B d  are processed in a signal processing circuit  8 , wherein, the X-direction coordinates X 1 , X 2 , X 3  and X 4  are spaced apart from each other sequentially by a distance of 8.8375 mm, and the Y-direction coordinates Y 1  and Y 2  are spaced apart from each other by a distance of 8.8375 mm; 
     2) supposing the X-direction displacement resolution as Δx=15 μm, the Y-direction displacement resolution as Δy=15 μm, the magnitude of the magnetic induction intensity of the magnetic field generated by the magnetic steel array  2  is measured as B M =80 mT, the X-direction counting unit is initialized to be n x =0, the Y-direction counting unit is initialized to be n y =0, the X-direction magnetic field reference values are initialized to be 
                 B   ksx     =         B     a   ⁢           ⁢   0       -     B     b   ⁢           ⁢   0         2       ,       B   kcx     =         B   co     -     B   do       2       ,         
and the Y-direction magnetic field reference values are initialized to be
 
                 B   ksy     =         B     a   ⁢           ⁢   0       +     B     b   ⁢           ⁢   0         2       ,       B   kcy     =         B     c   ⁢           ⁢   0       +     B     d   ⁢           ⁢   0         2       ,         
wherein, B a0 , B b0 , B c0  and B d0  are respectively the sampled signals from the first sensor, the second sensor, the third sensor and the fourth sensor when the rotor of the planar motor is at the initial position;
 
     3) the measurement starts, the sampled signals B a , B b , B c  and B d  of the first sensor  4 , the second sensor  5 , the third sensor  6  and the fourth sensor  7  are obtained by sampling, and the sampled signals B a , B b , B c  and B d  are processed in the signal processing circuit  8  to obtain four signals B sx , B cx , B sy  and B cy , wherein 
     
       
         
           
             
               
                 B 
                 sx 
               
               = 
               
                 
                   
                     B 
                     a 
                   
                   - 
                   
                     B 
                     b 
                   
                 
                 2 
               
             
             , 
             
               
                 B 
                 cx 
               
               = 
               
                 
                   
                     B 
                     c 
                   
                   - 
                   
                     B 
                     d 
                   
                 
                 2 
               
             
             , 
             
               
                 B 
                 sy 
               
               = 
               
                 
                   
                     B 
                     a 
                   
                   + 
                   
                     B 
                     b 
                   
                 
                 2 
               
             
             , 
             
               
                 
                   B 
                   cy 
                 
                 = 
                 
                   
                     
                       B 
                       c 
                     
                     + 
                     
                       B 
                       d 
                     
                   
                   2 
                 
               
               ; 
             
           
         
       
     
     4) it is determined by the signal processing circuit  8  whether the X-direction displacement is generated and whether the Y-direction displacement is generated, 
     a. if 
                            B   ksx     ⁢     B   cx       -       B   kcx     ⁢     B   sx         6400          ≥   15     ,         
then the relative displacement of the planar motor in the X-direction is 15 μm, and whether the X-direction displacement is forward or backward is determined further, if B ksx B cx −B kcx B sx ≧0, then the X-direction displacement is in the forward direction, and the X-direction counting unit performs n x =n x +1, and if B ksx B cx −B kcx B sx &lt;0, then the X-direction displacement is in the backward direction, and the X-direction counting unit performs n x =n x −1, and the X-direction magnetic field reference values are updated to B ksx =B sx , B kcx =B cx ; thus the X-direction displacement measurement is completed;
 
     if 
                            B   ksx     ⁢     B   cx       -       B   kcx     ⁢     B   sx         6400          &lt;   15     ,         
then the X-direction displacement measurement is completed directly;
 
     b. if 
                            B   ksy     ⁢     B   cy       -       B   kcy     ⁢     B   sy         6400          ≥   15     ,         
then the relative displacement of the planar motor in the Y-direction is 15 μm, and whether the Y-direction displacement is forward or backward is determined further, if B ksy B cy −B kcy B sy ≧0, then the Y-direction displacement is in the forward direction, and the Y-direction counting unit performs n y =n y +1, and if B ksy B cy −B kcy B sy &lt;0, then the Y-direction displacement is in the backward direction, and the Y-direction counting unit performs n y =n y −1, and the Y-direction magnetic field reference values are updated to B ksy =B sy , B kcy =B cy ; thus the Y-direction displacement measurement is completed;
 
     if 
                            B   ksy     ⁢     B   cy       -       B   kcy     ⁢     B   sy         6400          ≥   15   &lt;   15     ,         
then the Y-direction displacement measurement is completed directly;
 
     5) when the X-direction displacement measurement and the Y-direction displacement measurement are both completed, the X-direction relative displacement of the rotor is calculated as x=15*n x , and the Y-direction relative displacement is calculated as y=15*n y ; and 
     6) the steps 3) to 5) are repeated to enable the real-time measurement for the displacement of the rotor of the planar motor. 
     Through the above-mentioned steps, a method for measuring the displacement of the rotor of the planar motor is provided, the relative displacements of the rotor and the stator in the X-direction and the Y-direction are measured respectively, enabling high subdivision to signals and simple and fast processing for signals.