Patent ID: 6897435

Claim:
A method of calibrating an optical encoder, the encoder generating two analog quadrature signals, x, y, the method comprising: a. generating a plurality of digital samples, x i , y i , of the analog signals x, y, i having integer values from one to an integer n larger than one; b. generating a plurality calibrated samples X i , Y i , according to the equation X i =( x i +Ox i +P i ×y i )× Gx i Y i =( y i +Oy i )× Gy i Gx i and Gy i being scaling coefficients, Ox i and Oy i being offset coefficients, and P i being phase coefficients; c. generating a plurality of magnitude M i , and phase, Φ i , samples according to the equations M i =√{square root over (X i 2 +Y i 2 )} Φ i = A ⁢ ⁢ TAN ⁡ [ Y i X i ] , M i and Φ i defining one sample of a phasor V i , according to the equation V i =M i exp( jΦ i ), j being the complex number square root of negative one and where V i may be represented by a line segment having a first end and a second end, the first end lying at an origin of a two-dimensional coordinate system, the coordinate system defining an x axis and a y axis, the origin being located at an intersection of the x axis and the y axis, the second end being displaced from the first end by a length equal to the magnitude M i , in a direction defined by a angle relative to the x axis equal to the phase Φ i ; d. providing initial values for the scaling coefficients, Gx 1 and Gy 1 , the offset coefficients, Ox 1 and Oy 1 , and the phase coefficients, P 1 ; e. adjusting the values of the scaling coefficients, the offset coefficients, and the phase coefficients so that Gx i+1 equals either Gx i or Gx i plus or minus an incremental adjustment, Gy i+1 equals either Gy i or Gy i plus or minus an incremental adjustment, Ox i+1 equals either Ox i or Ox i plus or minus an incremental adjustment, Oy i+1 equals either Oy i or Oy i plus or minus an incremental adjustment, P i+1 equals either P i or P i plus or minus an incremental adjustment; the incremental adjustments being made so that a distance between the second end of a hypothetical phasor V′ i and a circle is less than or equal to a distance between a second end of the phasor V i and the circle, the circle having a pre-determined radius and being centered on the origin, the hypothetical phasor V′ i being determined by the following equations: X′ i =( x i +Ox i+1 +P i+1 ×y i )× Gx i+1 Y′ i =( y i +Oy i+1 )× Gy i+1 M′ i =√{square root over (X′ i 2 +Y′ i 2 )} Φ i ′ = A ⁢ ⁢ TAN ⁡ [ Y i ′ X i ′ ] V′ i =M′ i exp( jΦ′ i ).