US 5341078 A Abstract A sliding mode control method is provided capable of improving the following ability of a control system with respect to a command at the time of change in the operating condition of a machine, and preventing vibration which tends to occur by the action of a spring element of the machine at the time of change in the operating condition. The processor of a servo circuit derives position deviation (ε) and speed deviation (ε) based on a command position (θr) and an actual position (θ), estimates an torsion amount (εn) and torsion speed (εn) by effecting observer processing (Steps 100 to 101), and derives a switching variable (s) (102). The processor derives each of the first to fourth terms of the switching input in dependence on the positive or negative sign of the switching variable, and the positive or negative sign of a corresponding one of the position deviation, the second derivative of the command position, the torsion amount, and the torsion speed (103 to 129), and then derives, on the basis of the switching input derived by adding the four terms together, a torque command (T) sufficient to cause the switching variable to converge on 0 (130, 131). The servo system properly follows the command even when nonlinear parameters associated with the spring element of the machine have varied, thereby preventing vibration of the machine.
Claims(4) 1. A sliding mode control method applied to a machine having an operating section operatively coupled to a servomotor, said method comprising the steps of:
(a) detecting a torsion amount and torsion speed of the operating section with respect to a rotational position and speed of the servomotor; (b) determining a switching variable during sliding mode control based on the torsion amount and the torsion speed; (c) deriving a control output which causes the switching variable to converge toward zero; and (d) controlling the servomotor according to the control output. 2. A sliding mode control method according to claim 1, wherein said step (a) further includes estimating the torsion amount and the torsion speed using an observer which is modeled based on a state equation associated with the machine.
3. A sliding mode control method according to claim 1, wherein said method is applied to the machine which includes:
a speed reducer disposed between the servomotor and the operating section, the speed reducer being operable and generating torsion when the speed reducer rotates the operating section; a first detector detecting and generating a first output representative of a rotational position and speed of the speed reducer on an input side of the speed reducer; and a second detector detecting and generating a second output representative of the rotational position and the speed of the speed reducer on an output side of the speed reducer, and wherein said step (a) further includes detecting the torsion amount and the torsion speed based on the first and second outputs. 4. A sliding mode control method according to claim 1, wherein said switching variable is expressed by the following equation (A):
s=ε+C·ε-K·εn, (A) where s denotes said switching variable, ε denotes a position deviation, ε denotes the first derivative of ε, εn denotes the torsion amount, C denotes a time constant of a servo system, and K denotes a feedback gain, a transfer function of a rotational position θt of the operating section with respect to a position command θr to the servomotor is expressed by the following equation (B): ##EQU9## where Bk and Kc respectively denote a damping term and a spring coefficient of a spring system, Jt denotes an inertia of a load on the operating section, and S denotes a Laplace complex variable, and said method further comprises setting said time constant C to a small value so that the value 1/(S+C) in the equation (B) is approximately equal to a value 1/S at a resonant frequency of the spring system. Description This application is a continuation of U.S. patent application Ser. No. 07/687,902, filed May 24, 1991, now abandoned. 1. Field of the Invention The present invention relates to a sliding mode control method capable of preventing vibration of a machine which tends to occur by an action of a spring element of the machine when the operating condition of the machine changes. 2. Background of the Related Art It is known to effect the feedforward compensating operation of correcting in advance the control output by considering variation in various factors, caused by variation in the machine operating condition and acting as disturbance for the control operation, so as to prevent deterioration in the controllability of a control system which would be otherwise caused when the machine operating condition has largely varied. For example, in a control system for use with a machine which includes a speed reducer disposed between a driving source and a machine operating section and acting as a spring element and a damper element, the viscous friction coefficient and spring coefficient of the speed reducer which nonlinearly vary with variation in the position and speed of the mechanical operating section are determined, and the feedforward compensating operation for acceleration is effected on the basis of the thus determined coefficients. However, according to the conventional method mentioned above, the control performance of the control system is lowered and hence vibration occurs in the machine operating section, if the viscous friction coefficient and spring coefficient cannot be precisely determined. Namely, it is difficult to provide a robust control system. An object of the present invention is to provide a sliding mode control method capable of improving the following ability of a control system with respect to a command at the time of change of the machine operating condition, to thereby prevent vibration of the machine which tends to occur by the action of the spring element of the machine at the time of change of the operating condition. In order to attain the above object, according to the present invention, there is provided a sliding mode control method applied to a machine having an operating section operatively coupled to a servomotor. This method comprises the steps of: (a) detecting the torsion amount and torsion speed of a machine operating section with respect to the rotational position and speed of a servomotor; (b) determining a switching variable in the sliding mode control based on the torsion amount and torsion speed; and (c) controlling the servomotor by deriving a control output causing the switching variable to converge. As described above, according to the present invention, since the switching variable in the sliding mode control is determined based on the torsion amount and torsion speed of the machine operating section with respect to the rotational position and speed of the servomotor; and the control output which causes the switching variable to converge is derived, the following ability of the control system with respect to a command at the time of change of the machine operating condition can be improved, and hence vibration of the machine which may be caused by the action of the spring element of the machine can be prevented. Thus, a robust servo system which is excellent in the controllability at the time of change of the machine operating condition can be provided. FIG. 1 is a schematic block diagram showing a servo system for effecting sliding mode control according to one embodiment of the present invention; FIGS. 2A to 2C are flowcharts showing a sliding mode control process effected by a processor of the digital servo circuit of FIG. 1; FIG. 3 is a block diagram showing, by way of example, a conventional servo system having a feedforward compensating function; and FIGS. 4A-4C illustrate a Robot for use with the sliding control process of the present invention. Referring to FIG. 3, the conventional servo system is used for control of a machine including a spring element and a damper element disposed between a driving source and a machine operating section, for example, for control of a robot 30 including a speed reducer 32 which couples an output shaft 34 of a servomotor 36 to a rotation shaft of one joint 38 on the side close to the distal end of a robot arm, 40 and which functions as a spring element and a damper element as shown in FIGS. 4A-4C. The servo system of FIG. 3 includes a first transfer element 10 associated with a position loop for effecting the proportional control. In this transfer element, a difference (position deviation) ε between an output of a fourth transfer element 16, indicative of an actual position θ, and a command position θr is multiplied by a proportional gain Kp, whereby a command speed is derived. The command position θr is differentiated in the first feedforward term 18 whose output is added to a difference (speed deviation) between the command speed and an actual speed θ, whereby feedforward compensation for speed is performed. In a second transfer element 12 associated with a velocity loop for executing proportional-plus-integral control, a proportional-plus-integral control operation for the sum of the speed deviation and the first feedforward term output is effected with the use of an integration gain of K1 and a proportional gain of K2. Further, in a second feedforward term 20, the output of the first feedforward term 18 is differentiated with the use of a differentiation gain of KF. The gain KF is determined in dependence on the inertia J of a servomotor represented by a third transfer element 14, the spring coefficient of the spring element, and the viscosity coefficient of the damper. An output of the second feedforward term 20 is added to an output of a second transfer element 12, whereby a torque command T is derived. Namely, feedforward compensation for acceleration is executed. Then, a driving current corresponding to the torque command T is supplied to the servomotor, so that the motor rotates at a speed θ. The motor speed θ is integrated in the fourth transfer element 16, so as to be converted into a motor position θ. The spring coefficient and viscosity coefficient nonlinearly vary with variations in position and orientation of the machine operating section, and hence it is difficult to properly or precisely determine these coefficients. On the other hand, if unsuitable spring coefficient and viscosity coefficient are used, the above-mentioned feedforward compensation for acceleration effected on an on-line basis with the use of the linear control technique becomes improper. In this case, the following ability of the servo system with respect to the position command θr at the time of change of the machine operating condition is lowered, thereby causing vibration to occur in the machine. In the following, the sliding mode control method according to one embodiment of the present invention will be explained. The control method of this embodiment is applied to a combination of a servo system and a robot which are respectively similar to the servo system and the robot explained with reference to FIG. 3, and the servo system has functions of feedforward compensation for velocity and acceleration. In the servo system, equation (1) is fulfilled from the torque balancing requirement established between the input and output sides of the servomotor, and equations (2) to (4) are fulfilled between the position deviation ε and the command position θr and actual position θ.
J·θ=T (1)
ε=θr-θ (2)
ε=θr-θ (3)
ε=θr-θ (4) where θ, θr and ε and θ, θr and ε respectively indicate the first and second derivatives of θ, θr and ε. Assuming that the switching variable s and torque command T in the sliding mode control are expressed by equations (5) and (6), respectively, then the Lyapunov function V (≧0) expressed by equation (7) converges to 0 when the differentiation V thereof is negative. In other words, the characteristic of the servo system is converged on the switching plane (s=0).
s=ε+C·ε+D·∫(ε+C·.epsilon.)-K·εn (5)
T=J0·ωc·ε+C·J0·ωc.multidot.ε+T1 (6)
V=(1/2)·s where εn indicates a torsion amount of the distal end of the machine operating section with respect to the rotational position θ of the servomotor (Thus, εn in the following equation (8) indicates a torsion speed of the distal end of the operating section with respect to the motor speed). The torsion amount εn is expressed by, e.g., a value (θ-θt) obtained by subtracting that rotational position θt of the speed reducer 32 on the output side of the speed reducer 32 which is so converted as to correspond to that on the input side of the speed reducer 32 from the rotational position of the speed reducer on the input side thereof, i.e., the motor rotational position θ as shown in FIG. 4C. K indicates a feedback gain, which contributes to suppression of the mechanical vibration as will be described later. Further, C indicates the time constant associated with the position deviation ε and speed deviation ε, and D indicates the time constant associated with the integration element in the third term of equation (5). ωc, J0, and T1 respectively indicate time constant, predicted minimum inertia of a controlled object, and switching input (nonlinear input) mentioned later. In the following, to simplify the explanation, equation (5') obtained by setting D to 0 in equation (5) will be used.
s=ε+C·ε-K·εn (5') The following equation (10) can be obtained by substituting equation (9), derived from equations (1), (4) and (6), into an equation (8) obtained by differentiating both sides of equation (5').
s=ε+C·ε-K·εn (8)
ε=θr-(J0/J)·ωc·ε-C·(J0/J)·ωc·ε-T1/J (9)
s=(C-ωc·J0/J)·ε-(C·ωc.multidot.J0/J)·ε-K·εn-T1/J+θr(10) The following equation (13) expressing the differentiation V of the Lyapunov function can be obtained by substituting equation (12), derived from equations (5') and (10), into an equation (11) obtained by differentiating both sides of equation (7). ##EQU1## Next, the condition satisfying that V<0 is determined. If the constant ωc is so determined as to satisfy the following equation (14), the first term on the right side of equation (13) becomes negative, as shown in equation (15). In equation (14), a symbol Jmax indicates a predicted maximum inertia which varies in dependence on the operating condition.
ωc=C·Jmax/J0 (14) ##EQU2## In this case, when the second term of equation (13) is negative as shown in equation (16), the condition that V<0 can be attained.
-[C Thus, in order to make the sliding mode control characteristic adaptive to variations in system parameters resulting from the convergence of the switching variable of the servomotor control system forming the switching plane (s=0) in the sliding mode control, it is sufficient to control the servomotor by the use of a torque command T corresponding to the switching input T1 which satisfies equation (16). In this embodiment, when the switching input T1 which satisfies the condition that V<0 is determined, the switching input T1 is divided into a first term K1(ε) expressed as a function of position deviation ε, a second term K2(θr) expressed as a function of a second derivative θr of the command position and associated with the feedforward compensation for acceleration, and third and fourth terms K(εn) and K(εn) each expressed as a function of a corresponding one of the torsion amount εn and torsion speed εn, as shown in equation (17).
T1=K1(ε)+K2(θr)+K3(εn)+K4(εn)(17) Then, each of the first term K1(ε), second term K2(θr), third term K3(εn) and fourth term K4(εn) is derived in accordance with a corresponding calculation equation which is determined in dependence on the sign of the switching variable s and the sign of a corresponding position deviation ε, second derivative θr of command position, torsion amount εn, and torsion speed εn. More specifically, equation (16) is fulfilled when s≧0 and if equation (18) is satisfied. Equation (16) is also fulfilled, when s<0 and if expression (19) is satisfied.
T1>-C
T1<-C Therefore, the first term K1(ε) of the switching amount T1 is derived by using equation (20) when s≧0 and ε≧0 or when s<0 and ε<0 and by using equation (21) when s≧0 and ε<0 or when s<0 and ε≧0.
K1(ε)=-C
K1(ε)=-C The second term K2(θr) of the switching input T1 is derived by using equation (22) when s≧0 and θr≧0 or when s<0 and θr<0, and by using equation (23) when s≧0 and θr<0 or when s<0 and θr≧0.
K2(θr)=Jmax·θr (22)
K2(θr)=J0·θr (23) The third term K3(εn) of the switching input T1 is derived by using equation (24) when s≧0 and εn≧0 or when s<0 and εn<0, and by using equation (25) when s≧0 and εn<0 or when s<0 and εn≧0.
K3(εn)=0 (24)
K3(εn)=(J0-Jmax)·C·K·εn(25) The fourth term K4(εn) of the switching input T1 is derived by using equation (26) when s≧0 and εn≧0 or when s<0 and εn<0, and by using equation (27) when s≧0 and εn<0 or when s<0 and εn≧0.
K4(εn)=-J0·K·εn (26)
K4(εn)=-Jmax·K·εn (27) Further, the switching amount T1 for satisfying that V<0 is determined by adding the first to fourth terms K1(ε) to K4(εn) derived as described above, and a torque command T, which is sufficient to make the servo system characteristic adaptive to variations in system parameters including a nonlinear parameter, is calculated by the use of the derived switching amount T1 and in accordance with equation (6). Then, the motor is driven in accordance with the thus derived torque command T. In this case, the Lyapunov's stabilizing condition (V<0) is satisfied, whereby the servo system characteristic converges on the switching surface (s=0). In other words, the response characteristic of the servo system is determined in dependence on the switching variable, so that the control stability of the system can be maintained. Next, the reason why the vibration suppressing effect of suppressing vibration in the machine including the spring element can be obtained by the switching variable s converging toward "0" as described above will be explained. When the switching variable converges to "0", equation (29) is fulfilled in light of equation (5').
0=ε+C·ε-K·εn (29) By substituting the second to fourth equations (2) to (4) into the equation (29), and subjecting the same to the Laplace transform, we obtain
(S+C)·θr=(S+C+K)·θ-K·θt(30) where a symbol S denotes a Laplacean complex variable. The transfer function of the position θt of the distal end of the machine operating section with respect to the rotational position θ of the input side of the speed reducer functioning as the damper element and spring element of the machine is expressed by equation (31).
(θt)/θ=(Bk·S+Kc)/(Jt·S where Bk and Kc respectively denote the damping term and spring coefficient of the spring system having the speed reducer as the main factor and Jt denotes the inertia of the load on the machine operating section side with respect to the speed reducer. From equations (30) and (31), we obtain ##EQU3## When the time constant C of the servo system is set to a small value so that the value (S+C) in equation (32) can be regarded as being equal to a value S at the resonant frequency of the spring system, the transfer function of the position θt of the machine operating section with respect to the position command θr to the servomotor is expressed by equation (33). Equation (33) indicates that the feedback gain K constitutes part of a damping term of a second-order system, and contributes to suppression of the machine vibration. In other words, the vibration suppressing effect can be obtained when the sliding mode control is so effected as to converge the switching variable s to 0. ##EQU4## In this embodiment, an observer for estimating the torsion amount εn and torsion speed εn is employed for detection of these parameters. In the following, to determine a model which constitutes the observer, an associated state equation will be determined. At first, kinematic equations shown in equations (34) and (35) are derived in view of torque balance on the input and output sides of the speed reducer, and equation (36) is derived from equations (34) and (35).
T=Jθ+Bk(θ-θt)+Kc(θ-θt) (34)
0=Jtθt+Bk(θt-θ)+Kc(θt-θ) (35)
T/J=εn+(Bk/J+Bk/Jt)εn+(Kc/J+Kc/Jt)εn(36) Equations (37) and (38) are derived from equations (36) and (34).
εn=-(Bk/J+Bk/Jt)εn-(Kc/J+Kc/Jt)εn+T/J(37)
θ=-(Bk/J)εn-(Kc/J)εn+T/J (38) Assuming that ε
x1=-{(Bk/J)+(Bk/Jt)}x1-{(Kc/J)+(Kc/Jt)}x2+(T/J) (39)
x2=x1 (40)
x3=-(Bk/J)x1-(Kc/J)x2+(T/J) (41) From the equations (39) to (41), we obtain ##EQU5## Further, the state equation indicated by equation (43) can be obtained by simplifying equation (42).
dx/dt=A'x-K'D'x+K'D'x+B'T=(A'-K'D')x+K'y+B'T (43) where ##EQU6## A', B', and D' represent matrices, and K' represents a constant which is so selected that (A'-K'D') becomes stable. In view of equation (33), the model constituting the observer can be expressed by equation (44).
dx/dt=(A'-K'D')x+K'y+B'T (44) where ##EQU7## indicates the estimated value of x, and satisfies the following relation. That is, the torsion amount εn and torsion speed εn can be estimated by means of the observer corresponding to equation (44). ##EQU8## Alternatively instead of the observer, first and second speed detectors may be provided on the input and output sides of the speed reducer. In this case, the torsion amount εn and torsion speed εn are detected on the basis of an output indicative of the rotational position θ and speed θ of the speed reducer on the input side of the speed reducer and supplied from the first speed detector, and an output indicative of the rotational position θt and speed θt of the speed reducer on the output side of the speed reducer and supplied from the second speed detector. Next, with reference to FIG. 1, a digital servo system (software servo) for embodying the above-mentioned sliding mode control will be explained. The servo system includes a digital servo circuit 3 which accommodates therein a digital signal processor (not shown), and a memory for storing preset values of various constants, mentioned later. The digital servo circuit 3 is designed to perform, by means of software processing, position, speed and current control of servomotors (each corresponding to the third transfer element 14 of FIG. 3), not shown, for individual axes of the robot 5. The servo system further includes a shared memory 2, which is formed of a RAM and is arranged to be accessible from the processor (hereinafter referred to as first processor) of the digital servo circuit 3, and from a processor (hereinafter referred to as second processor), not shown, of a host computer, e.g., a numerical control device 1 for distributing a movement command, a current detector (not shown) for detecting an actual driving current flowing in the servomotor, and a servo amplifier (not shown) which responds to the current detector output and the current command supplied from the digital servo circuit 3 to drive the servomotors for the individual axes. Further, the servo system includes pulse encoders (not shown) mounted on the respective servomotors, a feedback signal register 4 for storing, under the control of the processor, the detection result obtained by the current detector and by the pulse encoders, and a manual data input device (not shown) for inputting various constants. In the following, with reference to FIGS. 2A to 2C, the operation of the servo system of FIG. 1 will be explained. When various constants (for example, parameters C and ωc, predicted maximum inertia Jmax, predicted minimum inertia J0, and matrices A', B' and D') required for the sliding mode control and observer processing are inputted via the manual data input device prior to start of the robot operation, these constants are stored into the memory of the servo circuit 3 under the control of the first processor. Alternatively the various constants may be programmed in the robot control program, instead of executing the manual input. During the robot operation, the first processor executes the sliding mode control process shown in FIGS. 2A to 2C at intervals of the same period as a period at which the movement command distribution is executed by the second processor. Namely, in each control cycle, the first processor reads out the command position θr from the shared RAM into which the command position is written at intervals of the movement command distribution cycle by the second processor, and reads out the actual motor position θ from the feedback signal register 4 (step 100). Then, the first processor calculates a position deviation ε(=θr-θ) and speed deviation ε, executes the observer processing corresponding to equation (44) to thereby derive a torsion amount εn and torsion speed εn, and causes registers accommodated in the first processor to store the derived values (step 101). Next, the first processor derives a value of the switching variable s in accordance with equation (5') (step 102), and then determines whether or not the derived value s is positive or "0" (step 103). When it is determined that s≧0, the first processor determines whether or not the position deviation ε is "0" or positive (step 104). If ε≧0, the processor derives the first term K1 of the switching amount T1 in accordance with equation (20), and causes the register R1 provided in the first processor to store the derived value (step 105). On the other hand, if the determination result in the step 104 is negative (ε<0), the processor derives the value K1(ε) in accordance with equation (21), and causes the same to be stored into the register R1 (step 106). In the step 107 following the step 105 or 106, the first processor derives the second derivative θr of the command position. At this time, the first processor derives a difference between the command position θr in the preceding processing cycle and that in the present processing cycle, as the first derivative θr of the command position, derives a difference between the first derivative thus obtained and the first derivative obtained in the same manner in the preceding processing cycle, as the second derivative θr, and then makes a determination as to whether or not the second derivative θr is positive or "0". If the determination result is affirmative (θr≧0), the first processor derives a value of the second term K2(θr) of the switching amount T1 in accordance with equation (22), and stores the same in the register R1 (step 108). If the determination result in the step 107 is negative (θr<0), the processor causes the register R2 to store a value of the second term derived in accordance with equation (23) (step 109). Next, the first processor reads out the torsion amount εn and torsion speed εn from the built-in register (step 110), and determines whether or not the torsion amount εn is positive or "0" (step 111). If εn≧0, the processor derives the third term K3(εn) of the switching amount T1 in accordance with equation (24), and stores the same in the register R3 (step 112). If εn<0, the processor causes the register R3 to store the value K3(εn) derived in accordance with equation (25) (step 113). Further, a determination is made as to whether or not the torsion speed εn is positive or "0" (step 114). If εn≧0, a value of the fourth term K4(εn) of the switching amount T1 derived according to the equation (26) is stored into the register R4 (step 115). On the other hand, if εn<0, a value K4(εn) derived according to the equation (27) is stored into the register R4 (step 116). When the determination result in the step 103 is negative (s<0), the first processor derives a value K1(ε) in accordance with equation (20) or (21) which is selected in dependence on the result of determination, at the step 117 corresponding to the step 104, regarding the sign (positive or negative) of the position deviation θ, and causes the register R1 to store the derived value (steps 118 and 119). Next, the processor causes the register R2 to store a value K2(θr) derived in accordance with equation (22) or (23) selected in dependence on the result of determination, at the step 120, regarding the sign of the second derivative θr (steps 121 and 122). Further, the processor causes the register R3 to store a value K3(εn) derived in accordance with equation (24) or (25) which is selected according to the result of determination, at the step 124, regarding the sign of the torsion amount εn read out in the step 123 (steps 125 and 126). Then, the processor causes the register R4 to store a value K4(εn) derived in accordance with equation (26) or (27) selected according to the result of determination in the step 127 regarding the sign of the torsion speed εn (steps 128 and 129). At the step 130 following the step 115, 116, 128 or 129, the first processor adds together the values of the first to fourth terms of the switching amount T1 respectively read out from the registers R1 to R4, to thereby derive the switching amount T1, and derives the torque command T in accordance with equation (6) (step 131). Then, the processor supplies the current control loop with the derived torque command T (step 132). The servo amplifier operates to supply a corresponding one of the servomotors for the individual axes of the robot 5a with a driving current, which corresponds to the voltage command supplied from the digital servo circuit 3, to thereby drive the corresponding servomotor. For the reason described above, a proper operation amount (torque command T) can be obtained even if the nonlinear system parameters have significantly varied during the robot operation. As a result, the locus precision of the robot can be improved, vibration of the robot caused in the robot operation at a stationary speed can be suppressed, and residual vibration at the time of interruption of the robot operation can be reduced. The many features and advantages of the invention are apparent from the detailed specification and thus is intended by the appended claims to cover all such features and advantages of the invention which fall within the true spirit and scope of the invention. Further, since numerous modifications and changes will readily occur to those skilled in the art, it is not desired to limit the invention to the exact construction and operation illustrated and described, and accordingly all suitable modifications and equivalents may be resorted to, falling within the scope of the invention. Patent Citations
Non-Patent Citations
Referenced by
Classifications
Legal Events
Rotate |