Abstract:
A method of correcting the speed of an encoder and an apparatus therefor are provided. The method includes the steps of detecting an electrical signal corresponding to a driving speed of a motor, calculating driving speed values of the motor in sections of the electrical signal, respectively, storing the calculated speed values in the order of calculation, selecting an intermediate speed value among the speed values calculated from the three or more continuous sections, and correcting the driving speed of the motor in accordance with the selected intermediate speed value.

Description:
[0001]     This application claims benefit under 35 U.S.C. § 119(a) of Korean Patent Application No. 2005-45308, filed on May 28, 2005, the entire contents of which are hereby incorporated by reference.  
       BACKGROUND OF THE INVENTION  
       [0002]     1. Field of the Invention  
         [0003]     The present invention relates to a method of correcting a speed of an encoder and an apparatus therefore. More particularly, the present invention relates to a method of correcting a speed of an encoder by selecting an intermediate speed value and an apparatus therefor.  
         [0004]     2. Description of the Related Art  
         [0005]     An optical encoder method is commonly used for detecting a driving speed of a driving shaft such as a motor or a driving speed of the driving shaft of a driven system driven by the motor.  
         [0006]     According to the optical encoder method, a disk along whose circumference a plurality of slits are arranged at regular intervals is fixed to the driving shaft of the motor, and an encoder sensor unit including a light emitting portion and a light receiving portion detects the above-described slits.  
         [0007]     A controlling unit calculates the driving speed of the motor by an electrical signal output from the encoder sensor unit.  
         [0008]     A method of calculating the driving speed of the motor will now be described. The driving speed is calculated through an H level section and an L level section of the electrical signal output from the encoder sensor unit. The position of the encoder sensor unit is set such that a length of the H level section is equal to a length of the L level section.  
         [0009]     However, one difficulty experienced when the driving speed of the motor is detected by such a method, is that in order to make the length of the H level section of the electrical signal output from the encoder sensor unit equal to the length of the L level section of the electrical signal output from the encoder sensor unit, it is required to precisely install the encoder sensor unit, which may require significant effort.  
         [0010]     When the encoder sensor unit is not precisely installed, errors are generated in detecting the driving speed of the motor by the length of the H level section of the electrical signal output from the encoder sensor and the length of the L level section of the electrical signal output from the encoder sensor. In order to solve such a problem, according to a conventional method of correcting the driving speed of the encoder, the sum of the length of the H level section and the length of the L level section is set to one period to measure a corresponding speed.  
         [0011]     However, according to the conventional art, although the slits are arranged at regular intervals to total 360 degrees in manufacturing a wheel encoder, the distance between the first slit and the last slit may not be perfectly uniform. Thus, the speed detected in the corresponding period includes an error value due to a deviation in the distance between the slits.  
       SUMMARY OF THE INVENTION  
       [0012]     Embodiments of the present invention have been developed to solve the above and other problems associated with the related art, and to provide other advantages that will be apparent from the following description. A feature of exemplary embodiments of the present invention is to provide a method of correcting the speed of an encoder by selecting an intermediate speed value and an apparatus therefor.  
         [0013]     In order to achieve the above objects of exemplary embodiments of the present invention, there is provided a method of correcting a speed of an encoder, the method comprising detecting an electrical signal corresponding to a driving speed of a motor, calculating driving speed values of the motor in sections of the electrical signal, respectively, storing the calculated speed values in the order of calculation, selecting an intermediate speed value among the speed values calculated from the three or more continuous sections, and correcting the driving speed of the motor in accordance with the selected intermediate speed value.  
         [0014]     Preferably, in the storing of the calculated speed values, a speed value stored in a second register is stored in a third register, a speed value stored in a first register is stored in the second register, and the selected speed value is stored in the first register.  
         [0015]     Also, in the selecting of the intermediate speed value, a value closest to an average value of the speed values calculated from the three or more continuous sections is selected as the intermediate speed value.  
         [0016]     The sections of the electrical signal may correspond to one period of the electrical signal.  
         [0017]     The sections of the electrical period may correspond to two periods of the electrical signal.  
         [0018]     The electrical signal is preferably generated by rotating a wheel encoder connected to a driving shaft of the motor.  
         [0019]     The electrical signal is may also be generated by linearly driving a strip encoder connected to a driving shaft of the motor.  
         [0020]     The electrical signal is preferably an analog-to-digital converted signal.  
         [0021]     The storing of the calculated speed values is preferably performed by three or more registers.  
         [0022]     The driving speed of the motor is preferably corrected by a motor driver unit that receives the intermediate speed value.  
         [0023]     On the other hand, there is provided an apparatus for correcting a speed of an encoder. The apparatus comprises an encoder sensor unit for detecting an electrical signal corresponding to a driving speed of a motor. A controlling unit calculates driving speed values of the motor from sections of the electrical signal, respectively, to select an intermediate speed value using the speed values selected from the three or more continuous sections. A storage unit stores the selected speed values in the order of calculation, and a motor driver unit corrects the driving speed of the motor in accordance with the selected intermediate speed value.  
         [0024]     Preferably, the storage unit stores a speed value stored in a second register in a third register, stores a speed value stored in a first register in the second register, and stores the calculated speed value in the first register.  
         [0025]     The controlling unit preferably selects a value closest to an average value of the speed values calculated from the three or more continuous sections as the intermediate speed value.  
         [0026]     The sections of the electrical signal may correspond to one period of the electrical signal.  
         [0027]     The sections of the electrical signal may also correspond to two periods of the electrical signal.  
         [0028]     The electrical signal is preferably generated by rotating a wheel encoder connected to a driving shaft of the motor.  
         [0029]     The electrical signal may also be generated by linearly driving a strip encoder connected to the driving shaft of the motor.  
         [0030]     The electrical signal is preferably an analog-to-digital converted signal.  
         [0031]     The storage unit preferably comprises three or more registers. 
     
    
     BRIEF DESCRIPTION OF THE DRAWINGS  
       [0032]     The above aspects and features of exemplary embodiments of the present invention will be more apparent with reference to the accompanying drawings, in which:  
         [0033]      FIG. 1  illustrates the structure of an apparatus for correcting the speed of an encoder according to an exemplary embodiment of the present invention;  
         [0034]      FIG. 2  illustrates an electrical signal output from an encoder sensor unit according to an exemplary embodiment of the present invention;  
         [0035]      FIG. 3A  is a graph illustrating a result of measuring the speeds of a motor by a conventional method of correcting the speed of an encoder;  
         [0036]      FIG. 3B  is a graph comparing the result of measuring the speeds of the motor according to a conventional method with a result of measuring the speeds of a motor according to an exemplary embodiment of the present invention; and  
         [0037]      FIG. 3C  is a graph comparing the result of measuring the speeds of the motor according to a conventional method with a result of measuring the speeds of a motor according to another exemplary embodiment of the present invention. 
     
    
       [0038]     Throughout the drawings, it should be understood that like reference numbers refer to like elements, features and structures.  
       DETAILED DESCRIPTION OF EXEMPLARY EMBODIMENTS  
       [0039]     Exemplary embodiments of the present invention will now be described in greater detail with reference to the accompanying drawings.  
         [0040]      FIG. 1  illustrates the structure of an apparatus for correcting the speed of an encoder according to an exemplary embodiment of the present invention.  
         [0041]     The apparatus for correcting the speed of an encoder according to an exemplary embodiment of the present invention includes a motor  100 , a wheel encoder  110 , an encoder sensor unit  130 , a controlling unit  150 , a storage unit  170  and a motor driver unit  190 .  
         [0042]     Slits  115  are arranged in the wheel encoder  110  at uniform intervals and the storage unit  170  includes n registers  175   a ,  175   b ,  175   c , . . . , and  175   n.    
         [0043]     The motor  100  is typically a DC motor and is driven by the control of the motor driver unit  190 . The wheel encoder  110  is connected to the driving shaft of the motor  100  to be driven by driving the motor  100 . It should be understood that the wheel encoder  110  is merely exemplary and may be replaced by a strip encoder (not shown) or any other suitable encoder device. In this case, the strip encoder is linearly driven by driving the motor  100 .  
         [0044]     Also, the slits  115  are arranged in the wheel encoder  110  (or the strip encoder) at uniform intervals. An electrical signal output from the encoder sensor unit  130  corresponds to H level sections when the encoder sensor unit  130  is positioned on the slits  115  and corresponds to L level sections when the encoder sensor unit  130  is positioned on the parts excluding the slits  115 .  
         [0045]     The encoder sensor unit  130  includes a light emitting portion and a light receiving portion and outputs an electrical signal in order to measure the driving speed of the wheel encoder  110 . The output electrical signal is preferably an analog-to-digital converted signal, although any other suitable arrangements may also be used.  
         [0046]     The controlling unit  150  calculates the driving speed values of the motor from the respective sections of the above-described electrical signal, sequentially stores the driving speed values in the storage unit, selects an intermediate speed value among three or more continuous driving speed values through the stored driving speed values, and transmits the intermediate speed value to the motor driver unit  190 .  
         [0047]     The storage unit  170  stores the driving speed values from the controlling unit  150  and preferably includes three or more registers. According to an exemplary embodiment of the present invention, the storage unit  170  may be included in the above-described controlling unit  150 . An operation principle in the case where the driving speed values calculated from the controlling unit  150  are stored in the storage unit  170 , and the storage unit  170  includes three or more registers will now be described.  
         [0048]     In the case where the speed values are previously stored in first, second, and third registers  175   a ,  175   b , and  175   c , when speed values in a new period are calculated, the speed values stored in the third register  175   c  are deleted, the speed values stored in the second register  175   b  are stored in the third register  175   c , and the speed values stored in the first register  175   a  are stored in the second register  175   b . Next, the driving speed values calculated from the controlling unit  150  are stored in the first register  175   a.    
         [0049]     The motor driver unit  190  receives the intermediate speed value of the continuous three or more driving speed values calculated by the controlling unit  150  and controls the driving speed of the motor  100  using the same.  
         [0050]      FIG. 2  illustrates an electrical signal output from an encoder sensor unit according to an exemplary embodiment of the present invention. Referring to  FIG. 2 , it is possible to determine the driving speeds a, b, and c of the motor  100  calculated by the controlling unit  150  in the respective sections of the electrical signal output from the encoder sensor unit  130 .  
         [0051]     The periods of the electrical signal illustrated in  FIG. 2  correspond to one period of the electrical signal and one period consists of the H level periods  200  and the L level periods  250 .  
         [0052]     However, according to another exemplary embodiment of the present invention, the controlling unit  150  may calculate the driving speed value of the motor in each two periods of the electrical signal. For purposes of describing the operation principle of an exemplary embodiment of the present invention, it is assumed that a&lt;b&lt;c.  
         [0053]     TABLE 1 illustrates a principle in which the driving speed values calculated from the respective sections of the electrical signal are stored in the registers  175   a ,  175   b ,  175   c , . . . , and  175   n  of the storage unit  170 .  
                                                                         TABLE 1                                   Sec-       Sec-   Section                   tion 1   Section 2   tion 3   4   Section 5   Section 6                                    Register 1   A   B   b   B   c   b       Register 2   —   A   b   B   b   c       Register 3   —   B   a   B   b   b       Intermediate   —   B   b   B   b   b       speed                  
 
         [0054]     Hereinafter, the method of correcting the speed of the encoder according to an exemplary embodiment of the present invention will be described with reference to  FIGS. 1, 2  and TABLE 1. In describing the method of correcting the speed of the encoder according to an exemplary embodiment of the present invention, it is assumed that the three registers are included in the storage unit  170 .  
         [0055]     First, when a power source is applied from the outside, the motor  100  starts to be driven by the motor driver unit  190 . The wheel encoder  110  connected to the driving shaft of the motor  100  starts to be driven. At this time, the encoder sensor unit  130  outputs an electrical signal corresponding to the section  1 .  
         [0056]     The controlling unit  150  calculates the driving speed of the motor  100  from the section  1  through the electrical signal of the encoder sensor unit  130  and the speed is a. The controlling unit  150  stores the speed value a calculated from the section  1  in the first register  175   a  in the storage unit  170 .  
         [0057]     While the motor  100  is continuously driven, the encoder sensor unit  130  outputs an electrical signal corresponding to the section  2 . The controlling unit  150  calculates the driving speed of the motor  100  from the section  2  through the electrical signal of the encoder sensor unit  130  and the speed is b.  
         [0058]     The controlling unit  150  stores the speed value a calculated from the section  1  stored in the first register  175   a  in the second register  175   b  and stores the speed value a calculated from the section  2  in the first register  175   a  in the storage unit  170 .  
         [0059]     While the motor  100  is continuously driven, the encoder sensor unit  130  outputs an electrical signal corresponding to the section  3 . The controlling unit  150  calculates the driving speed of the motor  100  from the section  3  through the electrical signal of the encoder sensor unit  130  and the speed is b.  
         [0060]     The controlling unit  150  stores the speed value a stored in the second register  175   b  in the third register  175   c , stores the speed value b stored in the first register  175   a  in the second register  175   b , and stores the speed value b calculated from the section  3  in the first register  175   a  of the storage unit  170 .  
         [0061]     Next, the controlling unit  150  calculates the average value of the speed values a, b, and c stored in the first, second and third registers  175   a ,  175   b  and  175   c  and excludes the respective speed values in the order where the speed value whose difference from the average value is largest is first excluded. As a result, the speed value b stored in the second register  175   b  is left and the value is the intermediate speed value in the sections  1 ,  2 , and  3 .  
         [0062]     The controlling unit  150  transmits the intermediate speed value b to the driver unit  190  and the motor driver unit  190  controls the driving speed of the motor  100  using the intermediate speed value b received from the controlling unit  150 .  
         [0063]     While the motor  100  is continuously driven, the encoder sensor unit  130  outputs an electrical signal corresponding to section  4 . The controlling unit  150  calculates the driving speed of the motor  100  from section  4  through the electrical signal of the encoder sensor unit  130  and the speed is b.  
         [0064]     The controlling unit  150  calculates speed value a stored from the third register  175   c , stores speed value b stored in the second register  175   b  in the third register  175   c , stores speed value b stored in the first register  175   a  in the second register  175   b , and stores speed value b calculated from section  4  in the first register  175   a  in the storage unit  170 .  
         [0065]     Next, the controlling unit  150  calculates the average value of the speed values b, b, and b stored in the first, second, and third registers  175   a ,  175   b , and  175   c . The speed values have no difference from b that is the average value. In this case, b is the intermediate speed value in the sections  2 ,  3 , and  4 .  
         [0066]     The controlling unit  150  transmits the intermediate speed value b to the driver unit  190  and the driver unit  190  controls the driving speed of the motor  100  using the received intermediate speed value b.  
         [0067]     While the motor  100  is continuously driven, the encoder sensor unit  130  outputs an electrical signal corresponding to section  5 . The controlling unit  150  calculates the driving speed of the motor  100  from section  5  through the electrical signal of the encoder sensor unit  130  and the speed is c.  
         [0068]     The controlling unit deletes speed value b stored in the third register  175   c , stores speed value b stored in the second register  175   b  in the third register  175   c , stores speed value b stored in the first register  175   a  in the second register  175   b , and stores speed value c calculated from speed  5  in the first register  175   a  in the storage unit  170 .  
         [0069]     Next, the controlling unit  150  calculates the average value of the speed values c, b, and b stored in the first, second, and third registers  175   a ,  175   b , and  175   c  and excludes the respective speed values in the order where the speed value whose difference from the average value is largest is first excluded. As a result, the speed value b is left and the value is the intermediate speed value in the sections  3 ,  4 , and  5 .  
         [0070]     The controlling unit  150  transmits the intermediate speed value b to the driver unit  190  and the motor driver unit  190  controls the driving speed of the motor  100  using the received intermediate speed value b.  
         [0071]     While the motor  100  is continuously driven, the encoder sensor unit  130  outputs an electrical signal corresponding to section  6 . The controlling unit  150  calculates the driving speed of the motor  100  from section  6  through the electrical signal of the encoder sensor unit  130  and the speed is b.  
         [0072]     The controlling unit  150  deletes speed value b stored in the third register  175   c , stores speed value b stored in the second register  175   b  in the third register  175   c , stores speed value c stored in the first register  175   a  in the second register  175   b , and stores speed value b calculated from section  6  in the first register  175   a  in the storage unit  170 .  
         [0073]     Next, the controller  150  calculates the average value of the speed values b, c, and b stored in the first, second, and third registers  175   a ,  175   b , and  175   c  and excludes the respective speed values in the order in which the speed value is largest from the average value is excluded first. As a result, speed value b is left and the value is the intermediate speed value in sections  4 ,  5 , and  6 .  
         [0074]     The controlling unit  150  transmits the intermediate speed value b to the driver unit  190  and the motor driver unit  190  controls the driving speed of the motor  100  using the received intermediate speed value b.  
         [0075]     Anyone skilled in the art can easily apply the foregoing description to cases in which the numbers of registers in the storage unit  170  are 4, 5, and 6 or more with reference to the case described above in which the number of registers in the storage unit  170  is 3.  
         [0076]     When the number of registers is 5, the intermediate speed value is determined from the average value of the speed values in the three sections excluding the largest value and the smallest value among the speed values calculated from five continuous sections.  
         [0077]     When the number of registers increases, the controlling unit  150  calculates the intermediate speed value of the speed values calculated from several continuous sections so that it is possible to more precisely correct the speed of the motor.  
         [0078]      FIG. 3A  is a graph illustrating a result of measuring the speeds of the motor according to the conventional method of correcting the speed of an encoder.  
         [0079]     Referring to the speeds  300  of the motor according to a conventional method illustrated in  FIG. 3A , the speeds of the motor when encoder counts are 361, 721, and 1081 significantly deviate from the average.  
         [0080]      FIG. 3B  is a graph comparing the result of measuring the speeds of the motor according to a conventional method with a result of measuring the speeds of a motor according to an exemplary embodiment of the present invention. The result of measuring the speeds of the motor according to an exemplary embodiment of the present invention illustrated in  FIG. 3B  is obtained when the number of registers is 3.  
         [0081]     When the speeds  300  of the motor according to a conventional method are compared with the speeds  330  of the motor according to an exemplary embodiment of the present invention as illustrated in  FIG. 3B , it is noted that the degree to which the speeds of the motor according to an exemplary embodiment of the present invention deviate from the average value when the encoder counts are 361, 721, and 1081 is smaller than the degree to which the speeds of the motor according to the conventional art deviate from the average value when the encoder counts are 361, 721, and 1081. Deviation in change in the speeds  330  of the motor according to an exemplary embodiment of the present invention is also smaller than deviation in change in the speeds  300  of the motor according to the conventional method in the other sections.  
         [0082]      FIG. 3C  is a graph comparing the result of measuring the speeds of the motor according to the conventional art with a result of measuring the speeds of a motor according to another exemplary embodiment of the present invention. The result of measuring the speeds of the motor according to the exemplary embodiment of the present invention illustrated in  FIG. 3C  is obtained when the number of registers is 5. The average value of the three speed values excluding the largest value and the smallest value among the speed values calculated from the five continuous sections stored in the registers may be determined as the intermediate speed value for correcting the speed of the motor.  
         [0083]     When the speeds  300  of the motor according to a conventional method are compared with the speeds  360  of the motor according to another exemplary embodiment of the present invention as illustrated in  FIG. 3C , it is noted that the degree to which the speeds of the motor according to another exemplary embodiment of the present invention deviate from the average value when the encoder counts are 361, 721, and 1081 is smaller than the degree to which the speeds  330  of the motor according to an exemplary embodiment of the invention illustrated in  FIG. 3B  deviate from the average value when the encoder counts are 361, 721, and 1081. Deviation in change in the speeds  360  of the motor according to another embodiment of the present invention is also smaller than deviation in change in the speeds  330  of the motor according to an exemplary embodiment of the present invention in the other sections.  
         [0084]     As described above, according to an exemplary embodiment of the present invention it is possible to precisely control the driving speed of the motor by correctly measuring the actual driving speed value of the motor.  
         [0085]     The foregoing embodiment and advantages are merely exemplary and are not to be construed as limiting the present invention. The present teaching can be readily applied to other types of embodiments. Also, the description of the embodiments of the present invention is intended to be illustrative, and not to limit the scope of the claims, and many alternatives, modifications, and variations will be apparent to those skilled in the art.