METHOD OF SERVOMOTOR CONTROL

Abstract: A method of controlling a servomotor capable of easily introducing a sliding mode control by utilizing a conventional linear control technique. A phase plane in the sliding mode is treated as in the linear mode, and the torque instruction τ0 thus determined is added to a switch input τ1 to obtain a corrected torque instruction τ. The switch input τ1 is determined in accordance with a sign representing positive or negative of the torque instruction τ0, a position error ε determined during the computation process of the torque instruction τ0 and signs representing positive or negative of various data such as an integration value of a velocity loop.

Description: This invention relates to a method of controlling a servomotor for driving various machines such as a robot and a machine tool, and more particularly, to a sliding mode control. A variety of sliding mode control techniques are used for controlling servomotors in various machines to improve disturbance suppressing ability and achieve good follow-up with respect to commands. Such sliding mode control techniques are disclosed, for example, in Unexamined Japanese Patent Publications No. 2-297611 and No. 3-118618, the latter corresponding to EP-A-0 446 362 relevant under Article 54(3)EPC. These proposed sliding mode control techniques, however, have no relevance to P control (proportional control) for a position loop or to PI control (proportional-plus-integral control) for a speed loop, which have conventionally been employed for controlling servomotors. Thus, conventional linear control techniques elaborated for the P and PI controls cannot be utilized at all for the control of a servomotor. Thus, the application of the sliding mode control has been hindered mainly due to that the selection of various parameters is so time consuming and some other reasons. The object of this invention is to permit easy introduction of sliding mode control, and to utilize conventional linear control techniques. According to this invention, the phase surface of the sliding mode is set to be in proportion to a mode of obtaining a torque command when carrying out a proportional control for a position loop and a proportional-plus-integral control for a speed loop, and a switching input is added to the torque command obtained by a linear control process including the position loop process according to the proportional control and the speed loop process according to the proportional-plus-integral control, to obtain a corrected torque command. The servomotor is controlled in accordance with the corrected torque command. The phase surface of the sliding mode is made to be equivalent to the mode of obtaining a torque command by a linear control in which the position loop is subjected to proportional control and the speed loop is subjected to proportional-plus-integral control. Thus, by adding the switching input to the torque command obtained by the linear control process, a torque command for the current loop is obtained, and the sliding mode control can be easily applied. Brief Description of the Drawings FIG. 1 is a block diagram illustrating a servomotor control method according to one embodiment of this invention; FIG. 2 is a block diagram of a principal part of a servomotor control unit for carrying out the control method illustrated in FIG. 1; FIG. 3 is part of a flowchart showing a feedforward process, position loop process, speed loop process, and sliding mode process, which are executed by a processor of a digital servo circuit shown in FIG. 2; and FIG. 4 and FIG. 5 are individually the subsequent part of the flowchart shown in FIG. 3. Preferred Mode of Carrying Out the Invention First, a phase surface (switching surface) Suf is defined as expressed by the following equation (1): Suf = ε + Kp · ε + (K1/K2) · ∫( ε + Kp · ε) In equation (1), Kp is a position gain of a position loop according to P control, and K1 and K2 are an integral gain and a proportional gain, respectively, of a speed loop according to PI control. ε represents a position deviation, while ε ˙ represents the derivative of the position deviation, i.e., a speed deviation. In the following, symbols with one dot given above denote first-time derivatives, and symbols with two dots given above denote second-time derivatives. For the Liapunov function V, the following formula (2) is defined: V = (1/2) · Suf 2 The derivative of the Liapunov function V is given by the following equation (3): V = S u f · Suf If a servomotor is supplied with such an input that the resulting value of equation (3) is always negative, then the Liapunov function V is always positive, and the derivative thereof is negative, showing a monotonic decrease, so that the Liapunov function V and the phase surface Suf converge to the minimum value "0." Accordingly, the responsiveness converges to Suf = 0 and varies functionally, without being influenced by inertia or disturbance. Here, the input to the servomotor is defined as expressed by the following equation (4): τ = K2 · { ε + Kp · ε + (K1/K2) · ∫( ε + Kp · ε )} + τ1 = K2 · ( ε + Kp · ε ) + K1 · ∫( ε + Kp · ε ) + τ1 In equation (4), τ1 is a switching input. Given that a move command and a position feedback quantity are d and , respectively, the following equations (5) hold: FIG. 1 shows a block diagram for obtaining the servomotor input τ in equation (4) on the basis of equations (5). As seen from FIG. 1, the servomotor input τ is equal to the sum of the switching input τ1 and an output (torque command τ0) of a conventional linear control in which the position and speed loops are subjected to P control and PI control, respectively. In FIG. 1, Kt/(J·S) is the transfer function of the servomotor; Kt is the torque constant of the servomotor; J is the inertia; and S is the Laplace operator. It is assumed that the controlled system is given by equation (6) below. In equation (6), A is the coefficient of kinetic friction; Gr is a gravity term, and τd is an expected disturbance. Differentiating both sides of equation (1) provides equation (7). Substituting equations (5) for equation (6), followed by rearrangement, provides the following equation (8): Then, when equation (4) is substituted for equation (8), equation (9) below is obtained: Substituting equation (9) for equation (7), followed by rearrangement, provides equation (10). Then, when equation (1) is solved for the derivative term of the position deviation, the following equation (11) is obtained: ε = Suf - Kp · ε - (K1/K2) · ∫( ε + Kp · ε) Substituting equation (11) for equation (10), followed by rearrangement, provides the following equation (12): From equation (12), the derivative of the Liapunov function is given as follows: Consequently, in order for the derivative of the Liapunov function to be always negative, the following formulas (14) and (15) need to hold: Kp + (K1/K2) - (K2/J) < 0 From formula (14), Kp < (K2/J) - (K1/K2) Given that the variation range of the inertia J of the controlled system is Jmin ≦ J ≦ Jmax (Jmin and Jmax are expected minimum and maximum inertias, respectively), in order for formula (14') to always hold, the value of Kp must be smaller than the minimum value of the right side. Accordingly, the position gain Kp of the position loop and the integral and proportional gains K1 and K2 of the speed loop need be selected in order for the following formula (16) to hold: Kp < (K2/Jmax) - (K1/K2) Here, it is assumed that the switching input τ1 can be expressed using terms related to ε, ∫(ε ˙ + Kp · ε), d,  ˙, Gr and τd, as shown in the following equation (17): From equation (17), formula (15) can be rewritten into the following formula (18): In order for formula (18) to hold at all times, the terms related to ε, ∫(ε ˙ + Kp · ε ), d,  ˙, Gr and τd must individually be negative. That is, the elements L1(ε), L2(∫(ε ˙ + Kp · ε)), L3( d), L4( ˙), L5(Gr) and L6(τd) of the switching input need to be determined as follows: (1) When Suf ≧ 0, I) for L1(ε), Kp 2 · ε + {L1(ε)/J} > 0 need to hold, i.e., L1(ε) > -Kp 2 · J · ε , and, for this formula to hold at all times in the range Jmin ≦ J ≦ Jmax, the following conditions need be fulfilled: if ε ≧ 0, L1(ε) = -Kp 2 · Jmin· ε if ε < 0, L1(ε) = -Kp 2 · Jmax · ε The individual elements of the switching input are determined in a similar manner. II) For L2(∫(ε ˙ + Kp ε)), if ∫( ε + Kp · ε) ≧ 0, L2 (∫( ε + Kp · ε)) = -Jmin · {Kp + (K1/K2)} · (K1/K2) · ∫( ε + Kp · ε) if ∫( ε + Kp · ε ) < 0, L2 (∫( ε + Kp · ε )) = -Jmax · {Kp + (K1/K2)} · (K1/K2) · ∫( ε + Kp · ε ) III) For L3( d), IV) For L4( ), if  ≧ 0, L4(  ) = Amax ·  if  < 0, L4(  ) = Amin ·  V) L5(Gr) = Grmax VI) L6(τd) = τdmax (2) When Suf < 0, I) for L1(ε), if ε ≧ 0, L1(ε) = -Kp 2 · Jmax · ε if ε < 0, L1(ε) = -Kp 2 · Jmin· ε II) for L2(∫(ε ˙ + Kp · ε)), if ∫( ε + Kp · ε) ≧ 0, L2 (∫( ε + Kp · ε )) = -Jmax · {Kp + (K1/K2)} · (K1/K2) · ∫( ε + Kp · ε) if ∫( ε + Kp · ε) < 0, L2(∫( ε + Kp · ε)) = -Jmin · {Kp + (K1/K2)} · (K1/K2) · ∫( ε + Kp · ε) III) for L3( d), IV) for L4( ˙), if  ≧ 0, L4(  ) = Amin ·  if  < 0, L4(  ) = Amax ·  V) L5(Gr) = Grmin VI) L6(τd) = τdmin In the above formulas (19) to (30), Jmax and Jmin are expected maximum and minimum inertias, respectively, of the controlled system; Amax and Amin, expected maximum and minimum coefficients of kinetic friction, respectively; Grmax and Grmin, expected maximum and minimum gravities, respectively; and τdmax and τdmin, expected maximum and minimum disturbances, respectively. The switching input τ1 is determined in the aforementioned manner, and is added to the torque command obtained by ordinary linear control (involving position loop control based on P control and speed loop control based on PI control) so that the derivative of the Liapunov function can always be kept negative, whereby a stable control system converging to the switching surface can be obtained. As seen from equation (1) and FIG. 1, the value of the switching surface Suf can be obtained by dividing the torque command τ0, obtained by the linear control, by the proportional gain K2 of the speed loop. Thus, the sign, positive or negative, of the switching surface Suf is dependent on the sign of the torque command value obtained by the linear control, and parameters determining the values of the individual terms of the switching input τ1 are derived during the linear control processing. FIG. 2 is a block diagram of a principal part of a servomotor control unit for carrying out the method of this invention. Referring to FIG. 2, a common memory 21 receives various commands for a servomotor 24, from an host CPU 20, and transfers them to the processor of a digital servo circuit 22. The digital servo circuit 22 comprises, in addition to the processor, a ROM, a RAM, etc., and the processor executes processing for controlling the position, speed, and current of the servomotor 24. A servo amplifier 23 comprises a transistor inverter or the like, and drives the servomotor 24 in accordance with the signal from the digital servo circuit 22. A position/speed detector 25 detects the rotational position and speed of the servomotor 24, and feeds back signals representing the detected position and speed to the digital servo circuit 22. The above-described configuration is similar to that of a well-known digital servo circuit used for controlling servomotors in a robot, machine tool or the like. FIGS. 3 to 5 illustrate a flowchart for a feedforward processing, position loop processing, speed loop processing, and sliding mode processing which are executed by the processor of the digital servo circuit 22 in this embodiment. The processor executes the processing shown in FIGS. 3 to 5 at predetermined intervals of time (position/speed loop processing period). First, in Step S1, a move command d for each present position/speed loop is obtained based on the move command supplied from the host CPU 20 via the common memory 21, and the outputs of position and speed feedback values from the position/speed detector 25 are read. Then, in Step S2, a value obtained by subtracting the position feedback value  from the move command d is added to the value in a register R(ε), which stores the position deviation ε, to thereby obtaining a position deviation ε of the relevant cycle. Subsequently, in Step S3, the value in a register R(d), which stores the move command of the preceding cycle, is subtracted from the move command d to obtain a feedforward quantity  ˙d (speed of the move command d) (differential of the move commend in FIG. 1). Then, in Step S4, the value in a register, which stores the feedforward quantity of the preceding cycle, is subtracted from the feedforward quantity  ˙d to obtain an acceleration d of the move command. In the following Step S5, the move command d obtained in Step S1 and the feedforward quantity  ˙d obtained in Step S3 are stored in the register for storing the move command and the register for storing the feedforward quantity respectively for use in the subsequent cycle. Then, in Step S6, a value Vd is obtained by adding the feedforward quantity  ˙d to the product of the position gain Kp and the position deviation ε, which has been obtained in Step S2, and then by subtracting the speed feedback value  ˙, which has been read in Step S1, from the previously obtained summation value. In Step S7, the value Vd is added to the value in an accumulator I to obtain an integral value (integration in the speed loop process shown in FIG. 1). In Step S8, the product of the value in the accumulator I and the integral gain K1 is added to the product of the value Vd and the proportional gain K2, to obtain a torque command τ0 according to linear control (processing according to the position loop P control and speed loop PI control using conventional feedforward). The position gain Kp, the integral gain K1, and the proportional gain K2 are set in advance as parameters to satisfy the relationship expressed by formula (16), and the maximum and minimum values such as Jmax and Jmin of inertia, the maximum and minimum values Amax and Amin of kinetic friction coefficient, the maximum and minimum values Grmax and Grmin of the gravity term, and the expected maximum and minimum values τdmax and τdmin of disturbance are also set as parameters. These parameters are stored in a memory of the digital servo circuit. In Step S9, it is judged whether the torque command τ0 has a value greater than or equal to "0." The sign of the torque command τ0 is identical with that of the switching surface Suf as mentioned above, and thus the sign of the switching surface Suf can be judged in accordance with the sign of the torque command τ0. If the torque command τ0 is "0" or a positive value, the individual terms of the switching input τ1 are determined in the following manner, as shown in formulas (19) to (24). First, if the position deviation ε, obtained in Step S2, has a value greater than or equal to "0," "-Kp 2 · Jmin · ε" will be stored in a register L1, and, if the position deviation ε is negative, "-Kp 2 · Jmax · ε" will be stored in the register L1 (Steps S10 to S12). That is, the processing represented by formulas (19) will be executed. Subsequently, if the integral value obtained in Step S7 and stored in the accumulator I has a value greater than or equal to "0," "-Jmin · {Kp + (K1/K2)} · (K1/K2) · (value of the accumulator I)" is stored in a register L2, and, if the integral value stored in the accumulator I is negative, "-Jmax · {Kp + (K1/K2)} · (K1/K2) · (value of the accumulator I)" is stored in the register L2 (Steps S13 to S15). That is, the processing represented by formulas (20) is carried out. Further, in Steps S16 to S18, it is judged whether the acceleration obtained in Step S4, which is the second-time derivative of the move command, has a value greater than or equal to "0," and if the value of the acceleration is "0" or more, the product of the acceleration value and the maximum inertia value Jmax is stored in a register L3; if the acceleration value is negative, the product of the acceleration value and the minimum inertia value Jmin is stored in the register L3. This processing is equivalent to that represented by formulas (21). Then, in Steps S19 to S21, it is judged whether the speed feedback has a value greater than or equal to "0," and, if the speed feedback value is "0" or more, the product of the speed feedback value and the maximum friction coefficient Amax is stored in a register L4; if the speed feedback value is negative, the product of the speed feedback value and the minimum friction coefficient Amin is stored in the register L4. This processing is equivalent to that represented by formula (22). Further, in Step S22, "Grmax" is stored in a register L5, and, in Step S23, "τdmax" is stored in a register L6 (processing expressed by formulas (28) and (29)). In Step S24, the values stored in the individual registers LI to L6 are added together to obtain a switching input τ1, and then, in Step S25, the thus-obtained switching input τ1 is added to the torque command τ0, which is obtained in Step S8 by the linear control processing, thereby obtaining a corrected torque command τ. The torque command τ is outputted to a current loop in Step S26, and the processing for the relevant position/speed loop processing period is ended. If it is judged in Step S9 that the torque command τ0 based on the linear control is negative, the program proceeds from Step S9 to Step S27. In the subsequent Steps S27 to S40, the judgement and processing represented by formulas (25) to (30) are executed to obtain values of the individual terms of the switching input τ1, and the values obtained are stored in the registers L1 to L6. After executing Step S40, the program returns to Step S24, and, in Steps S24 to S26, the values stored in the registers L1 to L6 are added together to obtain a switching input τ1; the switching input τ1 is added to the torque command τ0, which is obtained by the linear control process, to obtain a torque command τ; and the obtained torque command is outputted to the current loop, as described above. The aforementioned processing is executed for each position/speed loop processing period. Now, how to execute the bang-bang control (method of controlling a servomotor only by means of a ± maximum current thereof by adjusting the driving current to ± maximum current) will be described. In this case, the switching input τ1 is set to a value equal to the absolute value of a maximum torque τmax that the servomotor can output, with a sign (positive or negative) thereof set to that identical with the sign of the switching surface Suf, i.e., the sign of the output τ0 of the linear control. This procedure can remarkably simplify the processing. More specifically, in Step S9, the sign of τ0 is read instead of executing Steps S10 to S40, the read sign is attached to the maximum torque τmax to obtain a switching input τ1, and the output τ0 of the linear control is added to the switching input τ1, with the result to be used as a torque command τ for the current loop. In the above embodiment, feedforward control is used for the linear control, but this invention can be applied to an ordinary control not based on feedforward control such as a P control for position control and a PI control for speed control. In such cases, when obtaining the value Vd, which is inputted to the speed loop for processing the integral and proportional terms, the value (ε) obtained by differentiating the position deviation ε is replaced by the negative speed feedback value (-). That is, an ordinary speed deviation is used for the value Vd. Thus, the term of function L3 is omitted, switching input also varies correspondingly. According to this invention, sliding mode control can easily be applied without substantially modifying conventional linear control, whereby the disturbance suppressing ablity can be improved. Furthermore, since conventional linear control is used, various linear control techniques developed so far can be utilized.

Claims: A method of controlling a servomotor in a sliding mode, comprising the steps of: calculating a servomotor torque command (τ0) for carrying out a proportional control for a position loop and a proportional-plus-integral control for a speed loop; setting a phase surface of the sliding mode to be in proportion to the torque command (τ0) obtained by a position loop processing according to the proportional control and a speed loop processing according to the proportional-plus-integral control; adding a switching input (τ1) to the torque command to obtain a corrected torque command (τ); and driving the servomotor in accordance with the corrected torque command (τ). A method according to claim 1, wherein the switching input (τ1) has individual gains thereof set in such a manner that a relationship of Kp < (K2/Jmax) - (K1/K2) is satisfied, where Kp is a position gain of the position loop, K1 is an integral gain of the speed loop, K2 is a proportional gain of the speed loop, and Jmax is a maximum inertia of a controlled system, so that the derivative of a Liapunov function can always be negative, and is determined in accordance with signs of respective values of the torque command (τ0), position deviation (ε), integral (I) of the position deviation and a speed deviation, acceleration ( d) of a move command, and speed feedback ( ˙), which are obtained by the position loop process according to the proportional control and the speed loop process according to the proportional-plus-integral control. A method according to claim 2, wherein, provided that the controlled system is expressed as where J is an inertia, A is a coefficient of kinetic friction, Gr is a gravity term, and τd is an expe-cted disturbance, and that the switching input (τ1) is expressed as respective values of elements L1(ε), L2{∫(ε + Kp · ε)}, L3( d), L4( ˙), L5(Gr) and L6(τd) of the switching input are set such that a relationship of is satisfied. A method according to claim 1, wherein the switching input (τ1) has individual gains thereof set in such a manner that a relationship of Kp < (K3/Jmax) - (K1/K2) is satisfied, where Kp is a position gain of the position loop, K1 is an integral gain of the speed loop, K2 is a proportional gain of the speed loop, and Jmax is a maximum inertia of a controlled system, and is given as a value which is a combination of an absolute value of a maximum torque (τmax) that the servomotor can output, and a positive or negative sign identical with that of the torque command (τ0), which is obtained by the position loop process according to the proportional control and the speed loop process according to the proportional-plus-integral control.

Inventors: KATO TETSUAKI, KATO, TETSUAKI, KATO, TETSUAKI, 8-101, FANUC MANSION HARIMOMI
Applicants: FANUC LTD, FANUC LTD.
Application year: 1992
Main classification: G05B19
IPC codes: G05B19, G05B13, G05D17, G05D3