1. Technical Field
The present disclosure relates to an encoding system and method for a motor.
2. Description of Related Art
An encoder is a device that converts motion into a sequence of digital pulses. By counting a single bit or by decoding a set of bits, the pulses can be converted to relative or absolute position measurements. Encoders are manufactured as absolute encoders, which produce a unique digital word corresponding to each rotational position of a shaft of a motor, and incremental encoders, which produce digital pulses as the shaft rotates, allowing measurement of a relative position of the shaft. The incremental encoder's production of digital pulses of a relative position of the shaft can adversely affect precision of position measurement.
Referring to
The absolute encoder 60, the converter 10, the offset adjuster 20, the amplitude adjuster 30, the storage system 40, and the display 50 are connected in series. The converter circuit 70 is connected between the absolute encoder 60 and the storage system 40. The processor 40 is connected to the storage system 40.
The absolute encoder 60 outputs encoding waveforms according to rotation of the motor 2. In one embodiment, the absolute encoder 60 may output two sine/cosine waveforms every time that the motor 2 rotates. In one example, a first sine wave 620 and a second sine wave 621 may be outputted by the absolute encoder 60 every time the motor 2 rotates.
Referring to
Referring to
The amplitude adjuster 30 adjusts the maximum amplitude of each of the first and second sine waves 620, 621 to one unit, the unit being a standard of measurement. In one example, one unit may denote 5 mm and two units may denote 10 mm.
The converter circuit 70 converts the first and second sine waves 620, 621 to a first digital pulse 622 and a second digital pulse 623 correspondingly, and transmits the first and second digital pulses 622 and 623 to the storage system 40. It may be understood that the first digital pulse 622 and the second digital pulse 623 may be rectangular waveforms of the first and second sine waves 620, 621, respectively.
Referring to
The space determination unit 41 determines an amplitude Sin β1 of the first sine wave 620, an amplitude Sin β2 of the second sine wave 621 received by the storage system 40 at one time, and calculates an amplitude difference |Sin β1|−|Sin β2| between absolute values of the amplitudes Sin β1 and Sin β2, to ascertain the space that is a coordinate point of the amplitudes Sin β1 and Sin β2 at a time located according to Table 1, as stored in the data processing unit 42. Relationships of the amplitudes Sin β1, Sin β2, the first space A, the second space B, the third space C, and the fourth space D are shown in
The data processing unit 42 stores a plurality of functions: formula (1), formula (2), formula (3), and formula (4) as shown in Table 2. Each function corresponds to a space in Table 1.
The data processing unit 42 calculates angles α and θ according to the plurality of formulae in Table 2, and obtains a value of L according to formula (5):
L=N/2π×θ (5),
wherein N denotes a definition, namely 360 degrees divided into N parts, showing precision of the encoding system 1. In the embodiment, N is equal to about 2000.
Referring to
The combination unit 43 combines the first digital pulse 622 and the second digital pulse 623 from the converter circuit 70 into a combined digital pulse 624.
The position processing unit 44 records a pulse number M of the combined digital pulse 624 between the first time P and the second time Q, determines the values of L of the first and second times P, Q as LP and LQ correspondingly, and determines a value S according to formula (6):
S=L
Q
+Z×R−L
P (6)
wherein Z denotes a number of integrated sine waves between the first and second times, and P, Q, R denote a wavelength of the first sine wave 620, and R=N/2π×2π=N. Z is equal to [M/4], and [M/4] denotes an integer of M/4. It may be understood that an integrated first sine wave 620 can be converted to four pulses, such that the number of the sine waves between the first and second times P, Q is M/4, namely the number Z of integrated sine waves is [M/4].
Referring to
In step S1, the converter 10 determines amplitudes of the first and second sine waves 620, 621 at every time, and transmits the amplitudes to the offset adjuster 20.
In step S2, the converter circuit 70 converts the first and second sine waves 620, 621 to first and second digital pulses 622, 623 respectively, and transmits the first and second digital pulses 622, 623 to the storage system 40.
In step S3, the offset adjuster 20 determines whether the centerlines of the first and second sine waves 620, 621 are located on a same line. If the centerlines of the first and second sine waves 620, 621 are not located on a same line, the flow moves to step S4. If the centerlines of the first and second sine waves 620, 621 are located on a same line, the flow moves to step S5.
In step S4, the offset adjuster 20 adjusts the centerlines of the first and second sine waves 620, 621 to be located on a same line, constructs a coordinate system of amplitudes of the first and second sine waves 620, 621, and transmits the amplitudes of the first and second sine waves 620, 621 after being adjusted at every time to the amplitude adjuster 30. The coordinate system is divided into four spaces, and the flow moves to step S6.
In step S5, the offset adjuster 20 constructs a coordinate system of amplitudes of the first and second sine waves 620, 621, and transmits the amplitudes of the first and second sine waves 620, 621 at every time to the amplitude adjuster 30. The coordinate system is divided into four spaces, and the flow moves to step S6.
In step S6, the amplitude adjuster 30 determines whether a maximum amplitude of each of the first and second sine waves 620, 621 is one unit. As mentioned above, one unit may denote 5 mm. If the maximum amplitude of each of the first and second sine waves 620, 621 is not one unit, the flow moves to step S7. If the maximum amplitude of each of the first and second sine waves 620, 621 is one unit, the flow moves to step S8.
In step S7, the amplitude adjuster 30 adjusts the maximum amplitude of each of the first and second sine waves 620, 621 to one unit, and transmits the first and second sine waves 620, 621 to the storage system 40. The flow moves to step S9.
In step S8, the amplitude adjuster 30 transmits the first and second sine waves 620, 621 to the storage system 40.
In step S9, the space determination unit 41 determines which space is a coordinate point of the amplitudes Sin β1 and Sin β2 of the first and second sine waves 620, 621 at a time located according to Table 1 stored in the data processing unit 42.
In step S10, the data processing unit 42 determines angles α and θ according to the plurality of formulae in Table 2 of the first and second sine waves 620, 621 at every time, determines a plurality of values of L according to the formula (5) to draw the sawtooth wave 444, and determines the values of LP and LQ at the first time P and the second time Q correspondingly.
In step S11, the combination unit 43 combines the first digital pulse 622 and the second digital pulse 623 into the combined digital pulse 624.
In step S12, the position processing unit 44 records the number of integrated digital pulses M of the combined digital pulse 624 between the first time P and the second time Q.
In step S13, the position processing unit 44 determines the value S according to formula (6). According to characters of the absolute encoder 60 and the value S, an angle to which the motor 2 has rotated between the first time P and the second time Q is obtained. For example, if N is equal to about 2000, S is equal to about 1000 and the angle to which the motor 2 has rotated between the first time P and the second time Q is equal to (S/1000)*10°.
In step S14, the result output unit 45 outputs the value S and the angle to which the motor 2 has rotated to the display 50 to show the result.
One example of how to determine the rotational angle the motor 2 has rotated between the first time P and the second time Q is disclosed below. Referring to
The amplitude of the first sine wave 620 at the second time Q is about −1, and the amplitude of the second sine wave 621 at the second time Q is about 0. The space determination unit 41 determines that the coordinate point (0, −1) of the amplitudes of the second and first sine waves 621, 620 at the second time Q is located at the second space B according to Table 1. The data processing unit 42 determines that the angle θ is equal to about 3π/2 according to the formula (2) in Table 2, and the value of L at the second time Q is LQ=N/2π×θ=2000/2π×3π/2=1500 according to the formula (5).
The position processing unit 44 records that there are 3 pulses in the combined digital pulse 624 between the first time P and the second time Q, namely, M is equal to 3. According to the formula (6), the value S is S=1500+[¾]×2000−0=1500. As a result, the motor 2 has rotated 15 degrees, between the first time P and the second time Q.
In the embodiment, because the centerlines of the first and second sine waves 620, 621 are adjusted by the offset adjuster 20, and the amplitudes of the first and second sine waves 620, 621 are adjusted by the amplitude adjuster 30, the processor 80 processes the first and second sine waves 620, 621 more conveniently. In other embodiments, the offset adjuster 20 and the amplitude adjuster 30 can be canceled. In addition, the position processing unit 44 can determine the number of cycles of the first sine wave 620 between the first time P and the second time Q, via the time between the first time P and the second time Q being divided by a cycle time of the first sine wave 620 or the second sine wave 621. As a result, the first digital pulse 622, the second digital pulse 623, and the combined digital pulse 624 can be omitted, as can the converter circuit 70.
The foregoing description of the exemplary embodiments of the disclosure has been presented only for the purposes of illustration and description and is not intended to be exhaustive or to limit the disclosure to the precise forms disclosed. Many modifications and variations are possible in light of the above. The embodiments were chosen and described in order to explain the principles of the disclosure and their practical application so as to enable others of ordinary skill in the art to utilize the disclosure and various embodiments and with various modifications as are suited to the particular use contemplated. Alternative embodiments will become apparent to those of ordinary skills in the art to which the present disclosure pertains without departing from its spirit and scope. Accordingly, the scope of the present disclosure is defined by the appended claims rather than the foregoing description and the exemplary embodiments described therein.
Number | Date | Country | Kind |
---|---|---|---|
200910301525.8 | Apr 2009 | CN | national |