Abstract:
A predictive repetition control method for a servo motor and an apparatus therefor, which can converge a positional deviation relative to a command, repeated at intervals of a predetermined period, to zero even if the command contains an asynchronous component which is not synchronous with the predetermined period. A repetitive controller 5 and an invert system feedforward controller 6 for a control object 4 are arranged in parallel in a servo control system of the servo motor. The feedforward controller 6, including a FIR digital filter, receives a future command P whose degree of advancement corresponds to an order N of the control target. Coefficients of the filter are automatically determined based on the command P to be inputted and a positional deviation ε so that the feedforward controller 6 itself functions as an invert system. A transfer function of the feedforward controller 6 functions as a reciprocal of a transfer function of the control object, and hence a transfer function of an output ω for the command P becomes &#34;1&#34;, whereby the positional deviation is theoretically eliminated to become extremely small.

Description:
BACKGROUND OF THE INVENTION 
     1. Field of the Invention 
     The present invention relates to control for a servo motor employed for a machine tool or the like, more particularly, to a predictive repetition control method and an apparatus therefor which provides a servo motor control capable of responding with high accuracy to a command repeatedly supplied at intervals of a predetermined period even if the command contains an asynchronous component. 
     2. Description of the Related Art 
     Generally, a servo motor for controlling a machine tool is controlled so that a deviation between a move command (for example, speed or position) as a commanded input and a move amount (for example, actual speed or actual position) as an output of the servo motor is made zero. In such a servo motor control, where the input command is repeatedly supplied at intervals of a predetermined period and in the same pattern, repetitive control (or learning control) is employed to converge the control deviation to zero for accurate motor control and improving machining accuracy. 
     FIG. 5 (Prior Art) is a block diagram showing, by way of example, a principal part of servo motor control to which the aforementioned repetitive control is applied. 
     In FIG. 5, r is a speed command; E is a speed deviation between the speed command r and an actual speed ω; numeral 30 is a speed loop transfer function which includes an integrator for detecting a positional deviation and executes PI (Proportional Integration) control, etc., in a conventional manner. Furthermore, in this example, a repetitive controller 20 for executing repetitive control (or learning control) is added. The controller 20 comprises a bandpass limit filter 21, a delay element 22 for storing one-period data which is repeatedly supplied at intervals of a predetermined period M, and a dynamic characteristic compensation element 23 for compensating a phase delay of the control object and lowering of gain. 
     At intervals of a predetermined sampling period t, the repetitive controller 20 adds data Em, delivered from the delay element 22 at the sampling time preceding by one period M, to the speed deviation E, performs the processing of the bandpass limit filter 21, and stores the resultant data in the delay element 22. The delay element 22, which has Q (=M/t) memories, is designed to store each sampling data of one period M, and output the oldest data at each sampling time. That is, at each sampling time, the delay element stores the input data in the memory of &#34;0&#34;th address, and outputs data stored in the (Q-1)th address, with data in each address being shifted to the next address. As a consequence, the delay element 22 can output sampling data delayed by one period M. Therefore, when a speed command r is supplied at intervals of the period M and in the same pattern, the speed deviation E and the delay element 22 are added together, and thus, data located at the same position on the pattern of the speed command r is stored as correction data. 
     Moreover, the output of the delay element 22 is supplied to the dynamic characteristic compensation element 23, where a phase delay and fall of the gain of the control object are compensated. Then, the delay element output is delivered as an output y of the repetitive controller 20. Further, the output y is added to the speed deviation E, and, in accordance with thus added data, the speed loop processing is carried out. 
     As a result, when the speed deviation E has a large value at the preceding sampling period (a sampling period immediately before a certain sampling period) while the identical pattern processing is repeated at intervals of the predetermined period M, a large output y is delivered from the repetitive controller 20 in the current sampling period, and is added to the speed deviation. Therefore, the speed deviation to be supplied to the speed loop processing varies largely, and an actual speed ω responsive to thus supplied speed deviation also varies largely, whereby the speed deviation E is corrected to be rapidly converged to zero, and this enables the motor control with high accuracy (See Japanese Laid-open Patent Publication No. H2-307104, Patent Applications Nos. H1-314154 and H2-124254). 
     If a command of a type shown in FIG. 5, which is to be repeated at a predetermined period, contains a frequency f=k/M (k=0, 1, 2, . . .), i.e., a component synchronized with the command, highly accurate response can be obtained by the repetitive control. If an asynchronous component (a frequency f=k/M, where a value of k is not an integer) is contained in the command, a command pattern differs by respective periods M, and so it is difficult to make the deviation zero. 
     SUMMARY OF THE INVENTION 
     An object of the present invention is to provide a predictive repetition control method and apparatus designed to converge the control deviation to zero in response to the command to be repeated at intervals of predetermined period, which are capable of converging the control deviation to zero even in response to such a command as contains an asynchronous component not synchronized with the predetermined period. 
     A first aspect of the present invention relates to a servo motor control method for controlling a servo motor in accordance with a move command repeatedly supplied at intervals of a predetermined period. The control method comprises the steps of: providing a feedforward controller as an inverse system for a control object; inputting to the feedforward controller a future move command whose degree of advancement is determined in accordance with the order of the control object; and adding an output from the feedforward controller to a move control output calculated on the basis of the move command, to accomplish the aforementioned object. Moreover, a repetitive controller is added to further reduce a positional deviation, thereby enabling highly accurate servo motor control. In addition, the feedforward controller comprises a FIR-type digital filter whose coefficients are automatically determined by means of adaptive control based on a future move command inputted to the feedforward controller and a positional deviation between the move command and a position feedback amount, so that the feedforward controller can function as an inverse system for the control object. 
     A second aspect of the present invention relates to a servo motor control apparatus for controlling a servo motor in accordance with a move command repeatedly supplied at intervals of a predetermined period, which comprises: a delay element means for receiving a move command P to generate an output y delayed from the move command by N sampling time periods, which are determined by an order N obtained by identifying a control object G 0  ; a feedback detecting means for determining a feedback amount ω associated with a moving amount of the servo motor; a feedback control means for generating a first control output v on the basis of the output p from the delay element means and the feedback amount ω from the feedback detecting means; a feedforward control means for receiving the move command P to generate a second control output u as a transfer function Z -N  /G 0  which functions as an inverse system for the control object; and a moving amount control means for controlling the moving amount of the servo motor on the basis of the first and second control outputs. 
     The feedforward controller is a transfer function of the inverse system of the control object, so that the product of the output of the feedforward controller and the transfer function of the control object is about &#34;1,&#34; and thus the move command and the moving amount of the servo motor are almost equal to each other, whereby the positional deviation becomes extremely small. 
     According to the present invention, by arranging an inverse system feedforward controller in parallel, the positional deviation can be made extremely small to enable a highly accurate servo motor control in response to a repetitive command generated at intervals of a predetermined period, even if the repetitive command contains an asynchronous frequency component. 
     Furthermore, a coefficient of the invert system feedforward controller is automatically determined, so that the composition of the controller can be made simple. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 1 is a block diagram showing a principal part of predictive repetition control according to an embodiment of the present invention; 
     FIG. 2 is a configuration diagram of an inverse system controller employed in a predictive repetition apparatus according to the embodiment; 
     FIG. 3 is a block diagram of a digital servo device for carrying out a predictive repetition control method according to the embodiment; 
     FIGS. 4 (A) and (B) are flowcharts of procedures to be processed by a processor of a digital servo circuit according to the embodiment; 
     FIG. 5 (Prior Art) is a block diagram showing, by way of example, a principal part of servo motor control to which conventional repetitive control is applied; 
     FIG. 6 is a schematic view exemplarily showing machining performed in accordance with a repetitive command supplied at intervals of a predetermined period and containing an asynchronous component generated at another period; 
     FIG. 7 is a diagram showing a result of simulation according to a conventional servo motor control; 
     FIG. 8 is a diagram showing a result of simulation according to a conventional repetitive control shown in FIG. 5; 
     FIG. 9 is a diagram showing a result of simulation according to a predictive repetition control provided with the repetitive controller and inverse system feedforward controller of the present invention; and 
     FIG. 10 is a diagram showing a result of simulation according to the predictive repetition control, in which only the inverse system feedforward controller 6 of the present invention is added. 
    
    
     DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS 
     FIG. 1 is a block diagram showing a servo motor control system according to an embodiment of the present invention. 
     P is a move command supplied at intervals of a predetermined sampling period t for position and speed control of a servomotor. The command P is repeated by a short period M as shown in FIG. 6, and is a command asynchronous with the period M for repeating a determined pattern by a period L. 
     An element 1 is a delay element, and generates an output p, which delays an input signal P by N sampling time periods determined depending on an order N, which is obtained by identifying a control object G 0 . An element 2 is an integrator; K of an element 3 is a position gain; and G 0  of an element 4 is a transfer function of the control object, which includes a speed controller, servo motor, etc., and performs well-known PI (Proportional integration) control or the like. Further, numeral 5 denotes the same repetitive controller as the conventional repetitive controller shown in FIG. 5, and includes a bandpass limit filter FL, and a delay element D for storing data of one repetitive period M for the command P. That is, the repetitive controller has M/t=m pieces of memories. Further included in the repetitive controller is a dynamic characteristic compensation element G X  for compensating the characteristic of the transfer function G 0  of the control object. Numeral 6 denotes an inverse system feedforward controller, which inputs the command P and adds its output u to a speed command v for the servo motor. 
     A command p delayed from the command P by N periods is obtained by the delay element 1, and a deviation is determined by calculating the difference between the command p and a feedback amount ω indicative of a moved amount of the servo motor during the sampling period t. Further, a positional deviation ε is determined by integrating the deviation by the integrator 2. The positional deviation ε is supplied to the repetitive, controller 5. 
     For every predetermined sampling period t, the data d from the delay element D, which lags behind the sampling period by one period M, is added to the positional deviation ε for the bandpass limit filter processing, and stored in the delay element D. On the other hand, the output d from the delay element D is processed by the dynamic characteristic compensation element G X , and is added to the positional deviation ε as a correction amount y. As a consequence, the positional deviation ε relative to a frequency spectrum of the period M is corrected so as to become zero, and the speed command v is determined by multiplying the corrected positional deviation (ε+y) by the position gain K. 
     Meanwhile, the command P, as a future command, is inputted to the invert system feedforward controller 6. Thus inputted command is advanced by N sampling periods, because the command p is delayed by the N sampling periods by the delay element 1. 
     As shown in FIG. 2 in detail, the invert system feedforward controller 6 includes a FIR (Finite Impulse Responsive) type (non-recurrent type) digital filter of an N order. That is, there are provided N pieces of memories as delay elements Z -1 . In each sampling period t, the command P is stored in a first memory, and the command stored in each memory is shifted from left to right in FIG. 2, so that the commands P between a sampling point preceding the current sampling point by N sampling periods and the current sampling point are stored therein. In every sampling period t, the command P for the sampling time is multiplied by a coefficient W 0  ; a command preceding by sampling period and stored in the first memory is multiplied by a coefficient W 1  ; a command preceding by N-th sampling periods and stored in the N-th memory is multiplied by a coefficient W N  ; and the thus multiplied values are added together to be outputted as an output u. That is, a transfer function IS of the invert system feedforward controller 6 is given as follows: ##EQU1## 
     Moreover, coefficients W i  (i=0˜N) are determined so as to become a reverse system of the control object G 0 , and the transfer function IS of the reverse system feedforward controller 6 is so determined as to fulfill the following relationship. 
     
         IS=(Z.sup.-N /G.sub.0) 
    
     As a consequence, the moving amount ω of the servo motor can be determined by the equation ω=IS·G 0  ·P, and p=Z -N . Therefore, an equation ω=IS·G 0  ·(p/Z -N )=p can be obtained. Therefore, we can notice that the positional deviation ε becomes extremely small. The small positional deviation ε is further corrected by an ordinary position loop and repetitive control processing to become an extremely small value, whereby highly accurate servo motor control can be achieved. The coefficients W 0  to W N  are automatically determined by an adaptive algorithm to which the steepest descent method is applied, as will be described later. 
     FIG. 3 is a block diagram showing an embodiment of servo motor control applicable to a machine tool in carrying out the present invention. 
     In FIG. 3, reference numeral 10 denotes a numerical control unit for controlling the machine tool; 11, a common memory which receives the positional command. etc. outputted from the numerical control unit to the servo motor of the machine tool, and transmits it to a processor of a digital servo motor circuit 12; and 12, the digital servo motor circuit having the processor for executing the processing shown in FIG. 1 for the servo motor 14, as well as speed and current control processes. Reference numeral 13 denotes a servo amplifier including a transistor inverter, etc.; 14, a servo motor; and 15, a pulse coder which generates a determined number of feedback pulses per one rotation of the servo motor, and outputs the pulses to the digital servo circuit 12. Further, the digital servo circuit 12 includes by a processor, ROM, RAM, etc. The arrangement mentioned above has been well known as a digital servo circuit in a servo motor control for a machine tool, and thus its details are omitted here. 
     When the machine is started after the order N, obtained by identifying the control object G 0 , is set, the processor of the digital servo circuit 12 starts the processing shown in FIGS. 4 (A) and (B). The processor determines a move command P for each sampling period t on the basis of the move command transmitted from the numerical control unit 10 through the common memory 11 (step S1), executes a delay processing of the N sampling periods to determine a command p (step S2), and adds a value, which is to be obtained by substracting a feed back amount ω representing a moving amount of the servo motor during the sampling period t from the command p, to a register for storing the positional deviation ε in order to determine the positional deviation ε for the relevant sampling period (step 3). 
     Sequentially, it is determined whether or not a flag F is &#34;1&#34; (step S4). Since the flag F is initially &#34;0&#34;, the sequence advances to step S5 where &#34;1&#34; is reduced from a counter CNT. Incidentally, a number Q obtained by dividing the predetermined period M by the sampling period t is initially set in the counter CNT. Further, it is determined whether or not an absolute value of the positional deviation ε determined at step S3 is larger than the maximum value εmax (initially, εmax=0) of the positional deviation stored in the register (step S6), and, if an absolute value of the detected positional deviation ε is larger than the maximum value, the value is stored in the register as εmax (step S7). While, if the absolute value of the positional deviation ε is smaller than the maximum value, the sequence advances to step S8 without varying the value of εmax of the register. The procedure of step S8 is a method for determining coefficients W 0  to W N  for the N-th FIR type digital filter in accordance with the adaptive algorithm using the steepest descent method, in which a value, obtained by multiplying the positional deviation ε determined at step S3 by a command P i  preceding by i sampling periods and stored in a command stack and a constant τ as a time constant, is added to coefficients W i  (i=0 to N) preceding by one sampling period and stored in the register R (W i )c, thereby determining each coefficient W i . That is, each coefficient W i  is determined by performing the following calculation. Incidentally, the coefficients W 0  to W N  are initially set to &#34;0&#34; or an approximate value calculated so as to become Z -N  /G 0  with reference to the identified transfer function G 0  of the control object. 
     
         W.sub.i =R(w.sub.i)=ε·P.sub.i ·τ(i=0 to N, P0=P) 
    
     Thus determined respective coefficients W i  are stored in the respective registers R (W i ) (step S9), and the output u of the invert system feedforward controller 6 is determined by executing the digital filter processing shown in FIG. 2 using the determined respective coefficients W i . That is, the output u is obtained by the following calculation (step S10). 
     
         u=W.sub.0 ·P+W.sub.1 ·P.sub.1 +W.sub.2 ·P.sub.2 +. . . +W.sub.N ·P.sub.N 
    
     Next, the command stack is shifted (step S11). That is, P N-1 , P N-2 , . . . P 1 , P are stored as P N , P N-1 , . . . P 2 , P 1 , respectively. 
     Then, it is determined whether or not the counter CNT is &#34;0&#34; (step S12). Since the counter is not &#34;0&#34; initially the sequence advances to step S17 where a speed command v is determined by multiplying the positional deviation ε, determined at step S3, by the position gain K. Further, a corrected speed command v is determined by adding the output u of the reverse system feedforward controller 6, determined at step S10, to the speed command v (step S18). The speed command is transferred to a speed loop processing stage for execution. Subsequently, procedures of steps S1 through S12, S17 and S18 are executed for every sampling period, and, when a value of the counter CNT becomes &#34;0&#34; (step S12), a value Q (=M/t) obtained by dividing the predetermined period M by the sampling period t is set to the counter CNT (step S17). Further, it is determined whether or not the maximum positional deviation εmax in one period M (sampling repeated Q times) is smaller than a predetermined setting value εs (step S14), and if not small, the sequence advances to step S16 where the register for storing the positional deviation εmax is set to &#34;0,&#34; and then, the sequence advances to step S17. Thereafter, the procedures mentioned above are repeated for every sampling period. 
     Further, the above procedures are repeated for every sampling period, and, when εmax becomes smaller than the setting value εs, the sequence advances to step S15 where the flag F is set to &#34;1&#34;. When the flag F is set to &#34;1&#34;, procedures of steps 1 through 4 are executed, and the sequence advances from step S4 to step S19 in the next and subsequent sampling periods. Procedures of steps S5 through S9 are not executed, and, therefore, the values of coefficients W 0  through W N  of the digital filter will not be changed. In the step S19, calculation of the repetitive controller 5 for the period M, in which commands are repeated in a conventional manner, is carried out to determine a correction value y. Further, a corrected positional deviation ε is determined by adding the positional deviation ε to the correction value y (step S20). Then, the sequence advances to step 10 wherein an output u of the reverse system feedforward controller 6 is determined on the basis of the fixedly determined coefficients W 0  through W N . Next, the command stack is shifted (step S11). In step S12 the counter CNT is set to &#34;Q&#34; when the flag F is set to &#34;1&#34;, and the counter will not be decremented thereafter, so that &#34;Q&#34; will be maintained. Therefore, the sequence advances from step S12 to S17. The output u of the invert feedforward controller 6 determined at step S10 is added to a value obtained by multiplying the positional deviation ε by the position gain K to determine a speed command v (steps S17 and 18). Thus determined speed command v is used for the speed loop processing. Subsequently, the aforementioned procedures of steps S1 through S4, S19, S20, S10 through S12, S17 and S18 are executed for every sampling period, whereby speed command v for the speed loop processing is determined. 
     In the foregoing embodiment, an example of control wherein a positional control loop provided with the repetitive controller 5 has been shown. However, almost the same effect can be obtained even when the repetitive controller is omitted. If the repetitive controller is not provided, however, the accuracy is slightly lowered than a case in which the controller is provided. In the case where no repetitive controller 5 is provided, it is not necessary to execute steps S19 and 20 in the procedures shown in FIGS. 4 and 5, so that the sequence advances from step S4 to step S10. 
     FIG. 6 shows an example of machining which is performed in accordance with a command including an asynchronous component of a period L to be repeated at intervals of period M. More specifically, employed in this machining example is a gradually variable profile command P(t) with which the difference between the major and minor axes of an elliptic section is gradually varied within a range from 1 mm to 1.4 mm. In this case, one rotation of a workpiece 40 is set to 40 msec, while a tool shaft makes two reciprocations (or moves along a path of the major axis--the minor axis--the major axis--the minor axis--the major axis) during one rotation of the workpiece, and therefore, a repetitive period M of the tool shaft is 20 msec. A profile variable period L is set to 3.2 msec. Therefore, the profile command P(t) for the tool shaft is given as follows: ##EQU2## 
     Simulations of machining using the profile command P(t) were executed with respect to a conventional servo motor control system, a servo motor control system to which a repetitive control system is applied, a system provided with the repetitive controller of the present invention, and a predictive repetition control system with no repetitive controller. FIG. 7 shows the result of simulation associated with the conventional servo motor control system. In this case, the maximum value of the positional deviation ε is 420 μm. FIG. 8 shows the result of simulation associated with the conventional repetitive control system shown in FIG. 5, in which the maximum value of the positional deviation ε is 8.0 μm. FIG. 9 shows the result of simulation associated with the predictive repetition control provided with the repetitive controller 5 and the inverse system feedforward controller 6 of the present invention. In this case, the maximum value of the positional deviation ε is 1.5 μm. This indicates that the positional deviation can be reduced to an extremely small value. 
     Moreover, FIG. 10 shows the result of simulation, effected under the identical conditions with those of the embodiment of the present invention provided only with the inverse system feedforward controller 6 without including the repetitive controller 5. In this case, the maximum value of the positional deviation ε is 4 μm. Therefore, the positional deviation ε becomes smaller compared with the case shown in FIG. 7 associated with the conventional control system and with the case shown in FIG. 8 provided only with the repetitive controller, although it becomes larger compared with the case shown in FIG. 9 provided with the repetitive controller 5.