The present application claims the benefit of priority based on Japanese Patent Application No. 2007-058442 filed on Mar. 8, 2007, disclosure of which is incorporated herein in its entirety by reference.
1. Field of the Invention
The present invention relates to a servo controller which is applied to a machine tool for machining a work piece, or a robot, a press machine, an injection molding machine, and the like, that controls a master driving source and a slave driving source in synchronism with each other for performing repeatedly the same machine processing operation such as thread cutting or tapping operation on a work piece.
2. Description of the Related Art
Generally, when an external thread is cut on an outer circumferential surface of a work piece, the thread cutting operation is performed by providing a thread cutting tool with a predetermined cutting depth and moving the thread cutting tool in a relative linear movement in the direction of the axis of the work piece while rotating the work piece chucked on a main spindle. In order to avoid excessive cutting force, the cutting depth is provided to the cutting tool in several divisions, and a complete thread shape is obtained by repeating the cutting operation with a predetermined cutting depth for a predetermined number of passes. When an internal thread is cut on a work piece using a tapping tool, the work piece is secured on a table that is movable in a X-Y direction, and the thread cutting operation is performed by rotating and feeding the tapping tool mounted on the main spindle in the direction of a rotational axis, or by feeding the work piece in the direction of the rotational axis while the tapping tool is being rotated.
The feed rate of a thread cutting tool in the case of cutting an external thread, or the feed rate of a tapping tool in the case of cutting an internal thread, is determined in dependence on the rotational speed of the work piece or the rotational speed of the tapping tool such that threads can be formed continuously at a predetermined pitch. Thus, the movement command (the feed rate) for a cutting tool or a tapping tool to be moved in a linear movement is in a constant ratio to the rotation command (rotational speed) for rotating the work piece or rotating the tapping tool. Therefore, in such a thread cutting operation or a tapping operation, a rotation command and a movement command are given by a numerical controller of a machine tool such that both driving sources (servo motors) drive and operate in synchronism at a constant ratio.
Here, as an example, a case where a thread with a pitch of 1 mm is cut at 6000 min−1 will be explained below. Let the position detecting unit of a feed shaft driven by one of the driving sources be 10000 pulses/mm, and the position detecting unit of the rotational shaft driven by the other of the driving sources be 4096 pulses/rev. In view of the movement command of the feed shaft, 6000 min−1, one revolution takes 10 ms, and the advance of 1 mm means 10000 pulses/10 ms. Thus, the feed rate is 6 m/min. Since the rotational shaft is rotated one revolution, 4096 pulses, in 10 ms, that is 4096 pulses/10 ms. Thus, the ratio of the two driving axes is K=4096/10000. Therefore, in order to cut a thread with a pitch of 1 mm, the movement command for the driving source for driving the feed shaft can be multiplied by 4096/10000 to obtain the movement command for the driving source for driving the rotational shaft.
In Japanese Patent Publication No. 2004-280772, there is disclosed an example of a prior art controller for repeatedly carrying out processing of same shape by operating the driving sources for driving a rotational shaft and a feed shaft in synchronism.
In machine processing of external threads or internal threads, if a plurality of driving sources that are controlled in synchronism have the same servo characteristics, the rotational shaft and the feed shaft have same positional deviation, and thus do not give rise to synchronization error in principle. However, when the moment of inertia of the rotational shaft increases with increasing rigidity of the rotational shaft, or when the rotational shaft is rotated in high speed, the servo characteristics of the rotational shaft may become lower than that of the feed shaft, and this may give rise to a large positional deviation at the time of acceleration or deceleration of the rotational shaft. Although such a synchronization error can be gradually converged to a small value by learning control, the effect of learning control can be achieved only after the position command is repeated many times. Therefore, there was a problem that the effect of learning could not be obtained in the first time control, resulting in a large synchronization error. Thus, each time the position command was altered, an operator performed the learning control several times, and on the basis of the correction data thus obtained, the synchronization error could be reduced. Therefore, in order to reduce the synchronization error when the first control is performed, an extra procedure was required such that the memory of the learning control section was laid aside and was restored when the position command is used next time.
It is an object of the present invention to provide a servo controller that can reduce, when the first control is performed, the synchronization error which may arise between a master driving source and a slave driving source.
In order to attain the above object, in accordance with an aspect of the present invention, there is provided a servo controller that controls a master driving source for driving a driving shaft in synchronism with a slave driving source for driving a driven shaft in a prescribed timing relative to the driving shaft, comprising a position control section that performs position control based on a positional deviation representing a difference between a position command value given to said slave driving source and a feedback value detected by said slave driving source, an operational section that calculates a synchronization error as a difference between a positional deviation on a side of a master driving source and a positional deviation on a side of a slave driving source, and a correction data calculating section that calculates the first correction data for correcting said positional deviation on the side of the slave driving source based on said position command value given to said slave driving source so as to reduce the synchronization error.
In accordance with the construction as described above, since the correction data calculating section calculates the first correction data for correcting the positional deviation on the side of the slave driving source based on the position command value and the first correction data are added to the positional deviation on the side of the slave driving source, the control can be performed such that the synchronization error between the master driving source and the slave driving source may be reduced. Thus, when the first control is performed and the effect of learning cannot be obtained, highly precise and efficient processing can be performed, and reliability of the product quality can be improved. It is also possible to flexibly accommodate to change of the control method.
In the servo controller as described above, it is also possible to provide two such slave driving sources so as to drive a first driven shaft and a second driven shaft in a tandem structure parallel to each other. With such construction, by driving the first feed shaft and the second feed shaft in tandem structure with the two slave driving sources, respectively, the load of each driving source can be reduced so that the tracking control and the stability can be improved. The size of the driving source used can be thereby reduced and beneficial effect can be obtained in terms of economy.
In the servo controller as described above, it is also possible to apply the correction data calculated for one of two driven shafts to the other of the two driven shafts. With such construction, the correction data calculating section can be shared by the two slave driving sources to thereby avoid complication of the structure of the servo controller.
In the servo controller as described above, it is also possible to provide a learning control section that calculates second correction data to be added to the positional deviation on the side of the slave driving source in order to converge the synchronization error to zero by means of learning control. In the correction data calculating section, a transfer function for identifying a linear relation between the position command value given to the slave driving source and the second correction data, can be used to calculate the first correction data from the position command value in order to add the first correction data to the positional deviation on the side of the slave driving source. Thus, although a learning control cannot be used to reduce the synchronization error in the first time control in which no reference data are available, the correction data calculating section can be used to calculate correction data for calculating the positional deviation, so that the synchronization error can be reduced, when the first control is performed.
It is also possible, in the servo controller as described above, to provide a learning control section that calculates second correction data to be added to the positional deviation on the side of the slave driving source in order to converge the synchronization error to zero by means of a learning control. By setting the first correction data calculated by the correction data calculating section as an initial value in an initial value setting division of the learning control section, the second correction data can be calculated from the initial value. By adding the second correction data to the positional deviation on the side of the slave driving source, the synchronization error can be reduced, when the first control is performed.
By storing the command pattern of the position command value and the reference data referenced in calculating the second correction data, it is possible to give the position command value to the correction data calculating section so as to output the reference data and to estimate the synchronization error as the first correction data from the reference data.
In the servo controller as described above, the correction data calculating section may also include a compensator for calculating the first correction data, and an adaptive arithmetic logic unit for iteratively calculating parameters of the compensator from the position command value and the synchronization error. When the first control is performed, it is possible to reduce the synchronization error by determining the correction data using an adaptive algorithm as the adaptive arithmetic logic unit based on the digital filter as the compensator and the parameters and filter coefficients of the compensator and the position command value and the synchronization error.
In the servo controller as described above, the correction data calculating section may also include a compensator for calculating the first correction data, an adjustor for adjusting the output of the first correction data, and an adaptive arithmetic logic unit for iteratively calculating the parameter of the compensator from the position command value, the synchronization error, and the positional deviation. When the first control is performed, it is possible to reduce the synchronization error, and if there is a delay in the synchronization error, to easily adjust the value of the synchronization error, by determining a digital filter as the compensator and the parameters and filter coefficients of the compensator, and, based on the position command value, the synchronization error, and the positional deviation, by determining the correction data using an adaptive algorithm as the adaptive arithmetic logic unit, and adjusting the correction data by using the adjustor to multiply.
In the servo controller as described above, it is also possible to use the driving shaft as the rotational shaft, and the first driven shaft and the second driven shaft as the feed axes. In this way, even if the rotational shaft is likely to be affected by the moment of inertia and to give rise to a large positional deviation, the synchronization accuracy of the synchronous control can be improved.
In the servo controller as described above, it is also possible to provide the operational section in the host controller. By providing the operational section in the host controller, the circuit construction of the servo controller can be simplified.
In the servo controller as described above, the processing may be a tapping operation for forming an internal thread on a work piece. Since the processing that is performed repeatedly is a tapping operation, the synchronization error of the reciprocating rigid tap between the forward rotation and the reverse rotation can be suppressed, and highly precise and efficient processing is possible.
In the servo controller as described above, the processing may be a thread cutting operation for forming an external thread on an outer circumferential surface of a work piece. Since the processing that is performed repeatedly is a thread cutting operation, when a complete thread is formed by a prescribed number of repeated passes, the repeating accuracy for each pass can be improved, so that positional deviation can be suppressed and a thread can be formed with high precision.
The above and other objects, features and advantages of the present invention will become more apparent from the following description of preferred embodiments with reference to appended drawings, in which:
The present invention will be described in detail with reference to drawings showing specific examples of the preferred embodiments thereof.
Thus, as described above, a flow of control of the servo controller is generally the same as the control flow in the conventional servo controller, except that, in the servo controller 1A of the present embodiment, the second correction data are calculated by learning control of the synchronization error between the master side and the slave side, and that means (correction data calculating means) are provided that can reduce the synchronization error, when the first control is performed and the effect of learning is not available.
The host controller 2 has a programmable controller (not shown), an operating panel, peripheral devices, and the like, connected thereto. The shared memory is a memory for delivering the information outputted from the host controller 2 to a processor of the servo controller 1A, or on the contrary, for delivering various information outputted from the servo controller 1A to the host controller 2.
The servo controller 1A having a processor, a ROM, a RAM, and the like, forms a digital servo circuit comprising an operational section 5 for calculating the synchronization error of the pair of servo motors 3, 4, the learning control section 10 for calculating the correction data based on the synchronization error, and a correction data calculating section 11A for calculating the correction data (first correction data) for the first time control in which no effect of learning is available. By providing the servo controller 1A with the learning control section 10, the tracking capability of the feed servo motor 4 relative to the spindle motor 3 is remarkably improved and allows highly precise and efficient processing to be performed. By providing the servo controller 1A with the correction data calculating section 11A, highly precise processing can be performed with small synchronization error, when the first control is performed, in which no effect of learning is available.
The digital servo circuit is comparable to a conventional circuit, and controls the spindle motor 3 for driving the main shaft and the feed servo motor 4 for feeding a cutting tool (not shown) in a direction of the feed shaft, respectively, by position loop control and velocity loop control based on the feedback signal as well as by current loop control based on the current feedback signal from an amplifier 6 of a transistor inverter and the like.
With a machine tool provided with the servo controller having the digital servo circuit, machine processing of an internal thread, for example, can be made on a work piece fastened to a table using a tapping tool chucked by the spindle shaft (not shown). In this processing, the feed servo motor 4 is adapted to be synchronously controlled such that the tapping tool is moved in the direction of feed shaft at a feed rate obtained by multiplying the rotational speed of the spindle motor 3 with the pitch of the thread as a conversion factor.
The control flow of the servo controller 1A controlling the spindle motor 3 and the feed servo motor 4 will be described below in detail with reference to
First, the movement (position) command value per unit time outputted from a host controller 2 is divided at a branch point 7 into two directions, and one movement command value is outputted, after being multiplied with a constant ratio as a conversion factor K, to the main shaft side circuit controlling the spindle motor 3 of the servo controller 1A, and the other movement command value is outputted, as it is, to the feed shaft side circuit controlling the feed servo motor 4 of the servo controller 1A.
In the main shaft side circuit, the positional deviation is obtained by subtracting the position feedback value outputted from the position detector such as a pulse coder for detecting the position of the spindle motor 3 from the movement command value multiplied by the conversion factor (position loop control). Next, in a position control section 20, the positional deviation is multiplied by the position loop gain to obtain the velocity command value. Then, in a velocity control section 21, after the velocity deviation is obtained by subtracting the velocity feedback value outputted from the velocity detector for detecting the velocity of the spindle motor 3 from the velocity command value (velocity loop control), proportional-integral control (PI control) is performed on this velocity deviation to obtain the current command value (torque command). In a current control section 22, the current deviation is obtained by subtracting the current feedback value outputted from the amplifier 6 from the current command value (current loop control), and the spindle motor 3 is driven via the amplifier 6 so as to rotate the work piece via a speed reduction mechanism (not shown).
Also in the feed shaft side circuit, the position loop control, the velocity loop control and the current loop control are performed as in the main shaft side circuit, so as to drive the feed servo motor 4, and a feed screw is rotated via a speed reduction mechanism (not shown) to feed the tapping tool in the direction of the feed shaft.
In an operational section 5, the synchronization error is obtained as the difference between the positional deviation of the main shaft side circuit and the positional deviation of the feed side circuit. The positional deviation of the main shaft side circuit is obtained by multiplying the positional deviation of the spindle motor 3 by a reverse conversion factor (K−1) so that it is expressed in the same unit as the positional deviation of the feed side circuit. By thus expressing the positional deviations of the main shaft side circuit and the feed side circuit in same unit, the synchronization error due to the difference of servo characteristics of the two motors 3, 4 can be obtained.
The learning control section 10 receives the synchronization error from an operational section 7, and based on the synchronization error, calculates the correction data (second correction data) for correcting the positional deviation of the feed servo motor 4. By adding the calculated correction data to the positional deviation at an adding point 8, processing is performed so as to reduce the synchronization error between the two motors 3, 4. Based on the corrected positional deviation, the feed servo motor 4 is driven with the timing in a constant ratio maintained relative to the spindle motor 3.
More specifically, as shown in
The old correction data stored in the memory unit 16 are read out for each predetermined sampling time during the next processing to be moved in the same path as the previous processing, and are added to the synchronization error calculated for the predetermined sampling time by the operational section 5, and after being subjected to filtering processing, are stored in the memory unit 16 as renewed correction data. On the other hand, the old correction data read out from the memory 16 are compensated for the phase delay and gain drop, and added to the positional deviation at the adding point 8. In this way, each time when the machine processing is repeated, the processing is performed such that the synchronization error of the two motors 3, 4 becomes smaller, resulting in high precision processing. Learning control, however, has a problem that the synchronization error cannot be reduced in the first time control.
The correction data calculating section 11A is a means for compensating the first time learning control. In the correction data calculating section 11A, a correction data for reducing the synchronization error of the spindle motor 3 and the feed motor 4 based on the position command value outputted from the host controller 2 are calculated. The position command value inputted and the correction data outputted are related to each other via a transfer function. The transfer function is obtained by identification (estimation) from learning control of the typical past tapping operation. Specifically, let position command value sequence ui for each sampling be an input, and let the correction data sequence yi obtained when the synchronization error converges to zero be an output, then the transfer function G can be identified from the following equation.
y
i
=G·u
i
+H·e
where e is a noise source and H is a noise characteristics.
As identification model, various models can be considered, for example, ARX model, ARMAX model, output error (OE) model, Box-Jenkinds model, state space model, and the like. In the present embodiment, ARX model (autoregressive model with exogenous input) will be described as an example. This model can be represented by the following linear difference equations.
A(z)y1(t)=B(z)u1(t−nk)+e(t)
A(z)=1+a1z+a2z−2++anaz−na
B(z)=b0+b1z−1+b2z−2++bnbz−nb
where na is the number of poles, nb is the number of zeros, and nk is a delay. nk is a pure time delay of the system (dead time). Thus, if there is no dead time in the control system, nk is generally equal to 1. For a system with plural inputs, nb and nk are row vectors. Parameters ai, bj are calculated by using the least square method. Transfer function G=B(z)/A(z) can be estimated in this way.
In
As has been described above, in accordance with the present embodiment, although the learning control alone cannot reduce the synchronization error in the first time control, the correction data calculating section 11A can allows the correction data to be obtained by means of the transfer function upon input of the position command value, so that the synchronization error can be reduce from the first control and highly efficient and precise processing is possible.
Next, a servo controller according to a second embodiment of the present invention will be described with reference to
As shown in
In the correction data calculating section 11B, the correction data obtained by the learning control section 12 when the synchronization error is reduced to 0 by the learning control are stored together with the command pattern of the position command value given to the feed servo motor 4 as the reference data. Based on the reference data, the correction data calculating section 11B estimates the synchronization error from the pattern of acceleration and deceleration of the position command, and outputs this synchronization error to the learning control section. As shown in
As an example, the control flow at the time of tapping command (position command) given by the host controller 2 will be described below. For simplicity, an exemplary case of same tapping operation having different thread length is described. When a typical tapping command is given, it is determined to which region (segment) the command is relevant. Since a command relevant to the first pause region a is given first, the reference data sequence corresponding to the first pause region a is set as the initial value in the learning memory via the initial value setting division 18. Next, the command is watched until the command relevant to the first acceleration region b is given. When the command relevant to the first acceleration region b is given, the reference data sequence for the first acceleration region b is set as the initial value in the learning memory. Next, in the same manner, the command is watched until the command relevant to the first constant velocity region c is given, and when the command relevant to the first constant velocity region c is given, the reference data sequence for the first constant velocity region c is set as the initial value in the learning memory. In the same manner, the reference data sequences are successively set as the initial values until the third pause region i. Thus, the reference data at the time of typical tapping command are set as initial values in the learning memory, so that the correction data can be outputted from the learning control section, and the synchronization error can be reduced, when the first control is performed.
Duplicate explanation of the constituents common to the present embodiment and the first embodiment will be omitted. Also in the present embodiment, as in the first embodiment, the servo controller 1B applicable to a tandem structure may be provided.
Thus, in accordance with the second embodiment, when the command value pattern of the position command value to the feed servo motor 4 is given, the reference data (synchronization error) can be estimated, and the estimated reference data can be provided as the initial value for the learning control, so that the control for reduction of the synchronization error can be performed, when no effect of learning is available.
Next, a servo controller according to a third embodiment of the present invention will be described with reference to
As shown in
Ax(n+1)=Ax(n)+K·u(n)·e(n)
where x is the number of 1˜mth order of the filter, K is a constant, u is the position command and e is the synchronization error. The (n+1)-th filter coefficient can be obtained from the n-th filter coefficient, the position command value and the synchronization error.
The learning controller 22 corresponds to the learning control section 10, 12 in the first and the second embodiments. The correction data calculating section 11D can selectively switch between the adaptive control and the learning control by means of the switch 23. Thus, when the effect of learning cannot be obtained from the learning controller 22, the correction data calculating section 11D can select the adaptive control, and when the effect of learning can be obtained by repeated control, the correction data calculating section 11D can select the learning control.
Next, a servo controller according to a fourth embodiment of the present invention will be described with reference to
The present invention is not limited to the above-described embodiments, but can be implemented in various modifications. For example, also in the third and the fourth embodiments, the servo controller applicable to tandem structure can be provided as in the first embodiment.
Number | Date | Country | Kind |
---|---|---|---|
2007-058442 | Mar 2007 | JP | national |