1. Field of the Invention
The present invention relates to a displacement detecting method, a correction table making method, a motor control apparatus, and a processing machine which correct displacement information to improve detection accuracy.
2. Description of the Related Art
The applicant is developing a galvano motor which is used for a processing machine such as a laser processing machine, a laser trimming machine, and a laser repair machine. An incremental encoder is adopted to the galvano motor as a highly accurate angle detector. The applicant is considering an electric dividing means of an encoder signal.
Conventionally, the electric division was performed on the assumption that two-phase analog sine wave signal and cosine wave signal which have the same values of the amplitude and offset and have the phases differing by 90 degrees from each other are outputted. The electric division might be performed after correcting the output signal from the encoder so that the output signal is close to the above assumption.
As an electric dividing method, a method of using a resistance division as disclosed in Japanese Patent Laid-Open No. H02-138819, and a method of using tan−1 (arc tangent) as disclosed in Japanese Patent Laid-Open No. H06-58769 are known.
As described above, conventionally, the corrections of the amplitude, the offset, and the phase were performed on the assumption that the output signal from the encoder is a sine wave signal. However, the encoder output signal contains a harmonic component and a nonlinear component, and it is not an ideal sine wave signal. Therefore, even if the encoder output signal is corrected, the signal after the correction is not an ideal sine wave signal to be exact. As a result, when performing the electric division, an error was caused.
Furthermore, a scale pitch of the encoder is processed so as to be arranged at equally-spaced intervals, but actually, a process error is generated.
The present invention provides a displacement detecting method, a motor control apparatus, and a processing machine, which correct a detection error caused by a harmonic component contained in an encoder output signal or a process error of a scale pitch to improve detection accuracy.
A displacement detecting method as one aspect of the present invention includes the steps of driving a moving part using a drive unit, detecting a displacement amount of the moving part using a displacement detector, correcting the displacement amount using a displacement correction table so that a displacement velocity of the displacement amount detected by the displacement detector is constant, and detecting a displacement amount corrected by the displacement correction table as the displacement amount of the moving part.
A method for making a correction table as another aspect of the present invention includes the steps of driving a moving part using a drive unit, detecting a displacement amount of the moving part using a displacement detector, calculating a displacement velocity of the displacement amount using a differentiator, and making a displacement correction table configured to correct the displacement amount so that the displacement velocity of the displacement amount detected by the displacement detector is constant.
A motor control apparatus as another aspect of the present invention includes a moving part, a drive unit configured to supply a drive torque to the moving part, a displacement detector configured to detect a displacement amount of the moving part, and a controller having a displacement correction table configured to correct the displacement amount so that a displacement velocity of the displacement amount detected by the displacement detector is constant. The controller controls the drive unit using a displacement amount corrected by the displacement correction table.
A processing machine as another aspect of the present invention includes the motor control apparatus.
Further features and aspects of the present invention will become apparent from the following description of exemplary embodiments with reference to the attached drawings.
Exemplary embodiments of the present invention will be described below with reference to the accompanied drawings. In each of the drawings, the same elements will be denoted by the same reference numerals and the duplicate descriptions thereof will be omitted.
First, as one example of a processing machine in the present embodiment, the configuration of a laser processing machine will be described.
The laser processing machine 100 of the present embodiment is provided with two motor control apparatuses 200a and 200b. Each of the motor control apparatuses 200a and 200b is provided with a mirror and a rotary motor. The rotary motor is provided so as to rotationally drive the mirror. The mirror is rotationally driven by the rotary motor so as to change its direction.
Thus, the laser processing machine 100 changes the direction of each mirror using the two rotary motors to be able to change a travelling direction of laser light L. As described later, the rotary motor is provided with an encoder for detecting its rotation displacement amount. The encoder is used for precisely detecting the rotation displacement amount of the rotary motor to be able to precisely control the travelling direction of the laser light L.
The laser light L emitted from a laser oscillator 105 is irradiated on a laser processed surface 106 via the mirrors of the motor control apparatus 200a and 200b. As a laser processed surface 106 to be processed, a wide range of materials such as a metal, a glass, or a plastic can be selected.
As described above, the laser processing machine 100 can precisely control the travelling direction of the laser light L by rotating the mirrors of the motor control apparatuses 200a and 200b. Therefore, even if the laser processed surface 106 is not flat, the laser processed surface 106 can be processed with high accuracy.
Next, a configuration of a motor control apparatus used for the laser processing machine 100 will be described.
A motor control apparatus 200 of the present embodiment is provided with an optical encoder for detecting a rotation displacement amount of a rotary motor 104. The encoder is constituted by a scale 201 including a rotary slit disk and a fixed slit disk and a sensor unit 202 including a light emitting element (a light emitting diode) and a light receiving element (a photodiode). The rotary slit disk rotates in accordance with the rotation of the rotary motor 104, and the fixed slit disk is fixed. The encoder has a structure where the rotary slit disk and the fixed slit disk are arranged between the light emitting element and the light receiving element.
The rotary slit disk and the fixed slit disk are provided with a lot of slits. Light of the light emitting element transmits or is shielded in accordance with the rotation of the rotary slit disk. The fixed slit disk has a plurality of separated fixed slits in order to make an output signal of the encoder be a plurality of phases. Therefore, a plurality of light emitting elements and light receiving elements are also provided.
As shown in
As a result, as shown in
In
The detection principle of an encoder is not limited to the optical one, but other types of encoders such as a magnetic encoder can also be adopted.
Next, a displacement detecting method and a motor control apparatus in embodiment 1 of the present invention will be described.
The control block in
Reference numeral 1 denotes a drive unit (a drive torque generator). The drive unit 1 supplies a predetermined torque 2 to a moving part 3 (a rotary motor) based on an output signal from an upper controller (not shown). The moving part 3 of the present embodiment represents position response which has a transfer function of 1/s2 with respect to the drive torque 2 (torque command) inputted from the drive unit 1.
The moving part 3 is displaced by a predetermined rotational angle when the drive torque 2 is inputted. In this case, a displacement amount 4 of the moving part 3, i.e. an actual rotational angle of the moving part 3 is defined as θm.
Reference numeral 5 denotes a displacement detector which detects the rotational angle θm (the displacement amount 4) of the moving part 3. As a displacement detector 5, for example an encoder is used, but it is not limited to this. The displacement detector 5 detects the displacement amount 4 of the moving part 3 to output the detected angle θm′ (the displacement amount 6).
However, a signal (a sine wave signal) outputted from the displacement detector 5 contains a harmonic component or a nonlinear component. When an encoder is used as the displacement detector 5, a scale of the encoder may include a process error. Therefore, the detected angle θm′ (the displacement amount 6) of the moving part 3 obtained by the displacement detector 5 strictly differs from the actual rotational angle θm (the displacement amount 4) of the moving part 3. In other words, there is an error between the actual rotational angle θm (the displacement amount 4) of the moving part 3 and the detected angle θm′ (the displacement amount 6) of the moving part 3 detected by the displacement detector 5. In order to improve the detection accuracy of the displacement detector 5, as described later, the detected angle θm′ (the displacement amount 6) needs to be corrected so that the error with respect to the detected angle θm′ (the displacement amount 6) is reduced.
Reference numeral 7 denotes a differentiator which is provided to obtain a rotational velocity 8 (a displacement velocity) of the moving part 3. The differentiator 7 calculates a temporal differentiation value (dθm′/dt) of the detected angle θm′ (the displacement amount 6) detected by the displacement detector 5. The temporal differentiation value calculated by the differentiator 7 corresponds to the rotational velocity 8 (the displacement velocity) of the moving part 3. Reference numeral 9 denotes a storage unit. The storage unit 9 stores the rotational angle θm′ (the displacement amount 6) and the rotational velocity 8 calculated by the differentiator 7.
Reference numeral 10 denotes a displacement correction table making unit. The displacement correction table making unit 10 makes a displacement correction table from data (a rotational angle θm′ (a displacement amount 6) and a rotational velocity 8) stored in the storage unit 9. The displacement correction table corrects the detected angle θm′ (the displacement amount 6) detected by the displacement detector 5 so that the rotational velocity 8 (the displacement velocity) calculated by the differentiator 7 is constant. Thus, the displacement correction table performs a correction so that the detected angle θm′ (the displacement amount 6) detected by the displacement detector 5 is equal to the actual rotational angle θm (the displacement amount 4) of the moving part 3. The displacement correction table is provided in a controller (not shown).
Next, a displacement detecting method in the present embodiment will be described in detail.
An Error that an Encoder Signal Containing a Harmonic Component Causes to Angle Detection
First, in the present embodiment, an error that an encoder signal containing a harmonic component causes to angle detection will be described.
In the present embodiment, the encoder (the displacement detector 5) outputs each of two-phase sine wave signals by 140000 periods per one rotation of the rotary motor (the moving part 3). When the rotational angle of the rotary motor is defined as θm [rad], the phase angle θe [rad] of the encoder is represented as following expression (1).
θe=140000×θm (1)
Two-phase signals Asig and Bsig of the encoder which outputs an ideal sine wave signal is obtained by following expressions (2) and (3).
The two-phase signals Asig and Bsig of the encoder usually contain a harmonic component. Therefore, an encoder signal containing third-order and fifth-order harmonic components as represented by following expressions (4) and (5) will be considered.
Next, the encoder signal containing a harmonic component is assumed to be an ideal sine wave signal, and an error generated when the electric division is performed by tan−1 (arc tangent) is considered. In this case, using following expression (6), a phase angle θe′ of the encoder can be obtained from the encoder signal containing the harmonic component.
In the embodiment, the encoder signal has a periodic function, and therefore, the angle θe of the encoder can be considered in a range of −Π≦θe≦Π. In this case, as shown in
Next, a method for correcting angle detection in the present embodiment will be described. In the embodiment, a correction procedure will be described referring to a specific example.
First, a torque is applied to the moving part (the motor) to drive the moving part. In the present embodiment, as a torque supplied to the moving part, the waveform shown in
In
In the present embodiment, one period of the velocity unevenness is assumed to be between 100 [msec] and 111.56 [msec], and the detected angle is corrected so that the velocity unevenness during this time is equal to zero. The detected angle after the correction is defined as θm″.
The linear approximation is performed by selecting two points in one period of the velocity unevenness that is a correction time and by calculating the tilt at the two points. For example, in the present embodiment, a temporal differentiation value (a tilt of a straight line) is calculated using two detected angles θm′ at 100 [msec] that is a start time of the correction time and at 111.56 [msec] that is a finish time of the correction time.
Next, the correction procedure in the present embodiment will be described.
First, at Step S1, the moving part 3 (motor) is driven using a drive unit 1 based on a command of an upper controller. Next, at Step S2, as a response in driving the motor, the detected angle θm′ (the displacement amount 6) of the motor using the displacement detector 5 is detected. Furthermore, a temporal differentiation value (a displacement velocity) of the detected angle θm′ (the displacement amount 6) is calculated using the differentiator 7.
At Step S3, the range of the velocity unevenness of the rotational velocity (the displacement velocity), i.e. correction range, is determined. The range of the velocity unevenness of the rotational velocity (the correction range) is appropriately determined in accordance with a kind of the moving part 3 (the motor) to be used, or the like.
At Step S4, the detected angle θm″ after the correction is calculated from the detected angle θm′ before the correction so that the velocity unevenness of the rotational velocity is equal to zero in the range of the velocity unevenness determined at Step S3. In other words, the detected angle θm′ is corrected so that the temporal differentiation value (the displacement velocity) of the detected angle θm′ (the displacement amount 6) is constant. The relation between the detected angle θm′ before the correction and the detected angle θm″ after the correction is maintained as a displacement correction table made by a displacement correction table making unit 10. The displacement correction table of the present embodiment is made as described above.
In the displacement detecting method of the present embodiment, the displacement amount (the detected angle θm″) corrected using the displacement correction table is detected as a displacement amount 4 (a rotational angle θm) of the moving part 3. The correction procedure shown in
A Detection Error Before and after Correcting the Angle Detection
Next, a detection error before and after correcting the angle detection in the present embodiment will be described.
As shown in
As described above, according to the present embodiment, an angle detection error for the encoder signal containing a harmonic signal can be reduced. The correction method of the detected angle in the present embodiment is performed repeatedly by changing an initial position of a moving part (a motor). Therefore, the detected angle can be corrected in the wide range.
Next, embodiment 2 of the present invention will be described.
In the present embodiment, a model of a moving part where the position response for the torque command of the rotary motor is 1/(s2+s+100) is considered. This model adds a model of a viscosity and a spring system to the model of embodiment 1. The model of the viscosity is reflected by “s” of the denominator in the above expression, and the model of the spring system is reflected by “100” of the denominator in the expression.
First, a method for correcting angle detection in the present embodiment will be described.
Also in the present embodiment, the correction is performed by the same procedure as that of embodiment 1. First, similarly to embodiment 1, the waveform shown in
In the present embodiment, the initial position of the moving part 3 (the motor) is set to 0 [rad].
In
In order that the velocity unevenness of the rotational velocity is equal to zero, in the present embodiment, as shown in
The relation between the detected angle θm″ after the correction and the detected angle θm′ before the correction in
A Detection Error Before and after Correcting Angle Detection
Next, a detection error before and after correcting angle detection in the present embodiment will be described.
As shown in
As described above, according to the present embodiment, an angle detection error for the encoder signal containing a harmonic signal can be reduced. The correction method of the detected angle in the present embodiment is performed repeatedly by changing an initial position of a moving part (a motor). Therefore, the detected angle can be corrected in a wide range.
Next, embodiment 3 of the present invention will be described.
In the embodiment, the case where a process error in a scale pitch of an encoder is generated will be considered. Similarly to embodiments 1 and 2, a rotary motor is used as a moving part, and a rotary encoder (an angle detector) is used as a displacement detector. The encoder outputs a sine wave two-phase signal by 140000 periods per one rotation of a motor.
When the rotational angle of the motor is θm [rad], a phase angle θe [rad] of the encoder is represented by following expression (7).
θe=140000×θm (7)
Two-phase sine wave signals Asig and Bsig of the encoder are represented by following expressions (8) and (9).
However, when a process error in the scale pitch is generated, the relation of above expression (7) is not satisfied and a precise position can not be detected.
In the present embodiment, a detection correcting procedure in the case where a process error in a scale pitch is generated will be described.
An Error that an Encoder Signal Containing a Scale Process Error Provides in Detecting an Angle
First, an error that an encoder signal containing a scale process error provides in detecting an angle will be described. In the present embodiment, the scale of the encoder is configured so as to satisfy following expressions (10) and (11) with respect to a rotational angle of a motor.
When the range of the rotational angle of the motor is (−ø/140000)×1.2≦θm<0, the phase angle θe′ [rad] of the encoder is represented by the following expression (10).
When the range of the rotational angle of the motor is 0≦θm<(ø/140000)×0.8, the phase angle θe′ [rad] of the encoder is represented by the following expression (11).
In this case, a process error which satisfies the relation of expressions (10) and (11) is generated in the scale of the encoder of the present embodiment. It is assumed that the process error is not generated in the range other than the above range. When it is assumed that the scale of the encoder is ideal one, the rotational angle θm′ of the motor is obtained by expression (12) using an encoder signal θe′.
As shown in
Next, a method for correcting angle detection in the present embodiment will be described.
The correction in the present embodiment is performed by the same procedure as that of embodiment 1. In the present embodiment, a waveform shown in
When focusing on the rotational velocity in
In order that the velocity unevenness of the rotational velocity is equal to zero, in the present embodiment, as shown in
The relation between the detected angle θm″ after the correction and the detected angle θm′ before the correction shown in
A Detection Error Before and after Correcting Angle Detection
Next, a detection error before and after correcting angle detection will be described.
As shown in
As shown in
As shown in
As described above, according to the present embodiment, an angle detection error for an encoder signal containing a scale process error can be reduced. Furthermore, in the present embodiment, even if the scale pitch of the encoder is heterogeneous, a displacement correction can also be performed by setting a range of an angle or a position containing the heterogeneity.
In a positioning apparatus (a motor control apparatus) of a galvano motor using the correction method in each of the above embodiments, or in a laser processing machine and a processing machine using the motor control apparatus, the division accuracy of the encoder can be easily improved compared with a conventional one.
Therefore, according to each of the above embodiments, the velocity unevenness of the displacement velocity (temporal differentiation of measured position response) of the displacement amount detected by the encoder can be suppressed. As a result, the precise displacement detection can be performed without depending on the amplitude or offset of the outputs signal from the encoder, the phase difference of the two-phase signal, the harmonic component, or the pitch error of the encoder scale.
Therefore, according to each of the above embodiments, a displacement detecting method, a motor control apparatus, and a processing machine which correct the detection error caused by a harmonic component contained in an encoder output signal, a process error of the scale pitch, or the like to improve the detection accuracy can be provided. A method for making a correction table can also be provided.
As a result, the performance of the machine can be improved and the quality of the processed object or worked object can be improved.
While the present invention has been described with reference to exemplary embodiments, it is to be understood that the invention is not limited to the disclosed exemplary embodiments. The scope of the following claims is to be accorded the broadest interpretation so as to encompass all such modifications and equivalent structures and functions.
For example, in each of the above embodiments, a rotary motor (a rotational mechanism) is used as a moving part, but instead of this, a translatory mechanism can also be used. Furthermore, as a drive unit of the moving part, an actuator such as a motor or a piezo, or a hand of a human can be used.
In each of the above embodiment, an encoder is used as a displacement detector, but instead of this, a capacitance sensor or a PSD (Position Sensitive Detector) can also be used. According to the capacitance sensor or the PSD, a linearity correction of the displacement detection can be performed.
This application claims the benefit of Japanese Patent Application No. 2008-153727, filed on Jun. 12, 2008, which is hereby incorporated by reference herein in its entirety.
Number | Date | Country | Kind |
---|---|---|---|
2008-153727 | Jun 2008 | JP | national |