Abstract:
Beginning with a successive commanded end-effector destination shift, the method of the invention, which includes a calculation corresponding to a special algorithm of inverse kinematics using the Jacobi Matrix in the control of a manipulator, effects an optimization of weighted criteria (energy criteria, acceleration criteria and reference-position criteria) in a real-time cycle while reliably maintaining all path limitations and resulting in an optimized acceleration behavior. The method of the invention can be used in interactive path guidance of a manipulator and/or as a modular component of a superordinate task, such as for force-control objectives.

Description:
FIELD OF THE INVENTION 
     The present invention relates to a method of command control for a manipulator, based on end-effector destination shifts (Δx d ) commanded by a programmer or a superordinate task with the aid of a manual control ball or the like, in combination with a calculation of articulation position values according to an algorithm of inverse kinematics. 
     REVIEW OF THE RELATED TECHNOLOGY 
     Methods of command control of a manipulator based on end-effector destination shifts, in combination with a calculation according to an algorithm of inverse kinematics using the Jacobi Matrix, are known from Siciliano, B., Sciavicco, L.: “Modeling and Control of Robot Manipulators,” McGraw-Hill Companies (1996), pp 95 to 101, and from Vukobratovic, M., Kircanski, N.: “Kinematics and Trajectory Synthesis of Manipulation Robots,” Springer-Verlag, Tokyo, 1986, pp 105 to 122. 
     In this context, a method of inverse kinematics is obtained for kinematically non-redundant manipulators, albeit in a partial space of the working area that contains non-singular positions. Since singular configurations, i.e., articulator positions in which the Jacobi Matrix experiences a reduction in priority, do occur in practice, this method has only limited application, because the operation being performed with the manipulator (interactive path guidance, force control) must be aborted or delayed when a singular configuration (singularity) is approached. 
     In this context, a method is known that includes a calculation of a generalized inverse of the Jacobi Matrix. This method possesses a few advantageous properties, but is also associated with a number of disadvantages. For example, a smoothness of the calculated articulation path and low wear of the robot drive are attained through minimization of the local articulation position offset Δq (local energy criteria). In addition, the spacing between the articulation positions and the physical articulation stops is taken into consideration through the optimization of global criteria in the zero space of the Jacobi Matrix. Disadvantages of this method are that it cannot guarantee that path limitations will be maintained with physical articulation stops, and unstable behavior occurs in singular robot positions due to a (generalized) inversion of the Jacobi Matrix, and inefficient robot path courses are possible when conflicting local and global criteria exist. 
     In another known method, in which a calculation of the transposed Jacobi Matrix is performed, the commanded end-effector destination is attained iteratively corresponding to a representation of reverse kinematics as an optimization problem. An advantageous feature of this method is a stable behavior in singular robot positions, because the Jacobi Matrix is not inverted. 
     However, there is no guarantee that path limitations can be maintained through physical articulation stops and maximum articulation speeds. Superordinate heuristics must be constructed to meet these requirements, which then results in errors in the real end effector position compared to the desired end effector position. Inefficient path courses result in the form of interference movements of the end effectors, because the Cartesian linear movement commanded by the manual control ball cannot be transferred exactly to the end effector of the manipulator. 
     Moreover, the robot drive is subjected to high material wear due to abrupt passage through singular robot positions and because of a generally insufficiently smooth articulation path, since neither the weighted local articulation position offset nor the local articulation speed offset (local energy and acceleration criteria) have been optimized. A further negative consequence is a low convergence speed, i.e., a reduced ability to operate in real time, because no practical optimum strategy is known for determining the positively-defined Cartesian stiffness matrix. 
     DE 33 44 633 C2 describes a real-time control in which the redundant articulations that are not necessary for the movement of an end effector are noted for calculating the articulation speed, which simplifies the calculation of the inverse Jacobi Matrix. This type of calculation is performed for at least one of the articulation combinations. The speeds for each articulation are then determined through averaging of the calculated articulation speeds. A weighting of the articulation speeds thus takes place in this prior art. 
     U.S. Pat. No. 5,430,643 also describes a real-time method, in which the inverse Jacobi Matrix is calculated. The method known from this U.S. patent document also takes into consideration weight values for the articulation speeds, as well as path limitations for at least a graphic simulation of the robot&#39;s movements. 
     The German patent application 197 03 915.4 and U.S. application Ser. No. 08/017,485 propose a method in which an interactive path guidance of a kinematically redundant manipulator can be performed efficiently, with the advantage of an accordingly less complex and thus more user-friendly parametrization. The only disadvantage of this method is that it is not suitable for force control purposes since no uniform measurement exists to indicate which percentage of the desired end-effector destination shift can be attained; also, the method places a lower priority on attaining the best possible end-effector destination shift. 
     SUMMARY OF THE INVENTION 
     It is an object of the invention to provide a method of inverse kinematics command control for an interactive path guidance, and/or as a modular component of a superordinate task (e.g., force control) of a manipulator with an optimized acceleration behavior, with which path limitations can be reliably maintained through physical articulation stops and maximum allowable articulation speeds to ensure the accuracy of the determined solution with respect to the allowable path limitations, and with which the stress on the manipulator drive device is kept to a minimum by optimizing the acceleration behavior of the articulation axes. 
     In accordance with the invention, which relates to a method of command control for a manipulator of the above type, this object is accomplished in that 
     a new articulation position (q i+1 ) of the manipulator is calculated, beginning with a commanded end-effector destination shift and the current actual value (q i ) of the articulation position of the manipulator, 
     with consideration of a quality function (f(q) ) to be minimized, which is parametrized by non-negative weighting values (aα j , β j , γ j ), 
     and with consideration of path limitations through physical articulation stops (q min , q max ), maximum articulation speed ({dot over (q)}max), maximum articulation acceleration ({umlaut over (q)}max) in an environment of physical articulation stops, and the kinematic equation, which is represented by the Jacobi Matrix (J (q)), which articulation position predetermines the new values for the articulation regulators, with the quality function (f(q)) being the sum of energy criterion, reference-position criterion, acceleration criterion and an additional criterion, 
     the energy criterion being calculated from 
     
       
         (q−q i ) t diag(a j )(q−q i ) 
       
     
     the reference-position criterion being calculated from 
     
       
         (q−q ref ) t diag(β j j)(q−q ref ), 
       
     
     the value q ref  being a predetermined articulation position value that is determined such that the sequence of calculated articulation position values (q i ) runs near this reference position value; 
     the acceleration criterion being calculated from 
     
       
         (q−2q i−1 ) t diag(γ j )(q−2q i +q i−1 ), 
       
     
     and 
     the additional criterion from −p, with the scalar parameterp satisfying the kinematic equation p·Δx d =J(q i (q−q i ) and the inequality 0≦p≦1; p·100 being the attained percentage of the commanded end-effector destination shift (Δx d ), 
     beginning with an articulation-position value q i  as the starting point, an allowable optimization vector is determined on the basis of the quality function with respect to all active secondary conditions that indicate which path limitations have been attained, and this vector is scaled according to the inactive secondary conditions that indicate which path limitations have not been attained; 
     the scaled optimization vector is added to the articulation position value calculated in the previous iteration step; 
     and the optimum quality of these articulation-position values is evaluated based on the quality function and the secondary conditions activated in the newly-calculated articulation position. 
     The method according to the invention may be used in the interactive path guidance of the manipulator based on end-effector destination shifts commanded by an operator with the aid of a manual control ball (space mouse) or the like. 
     The method according to the invention may, however, also be used as a modular component of a superordinate task, with end-effector destination shifts commanded by the superordinate task. A superordinate task may, for instance, be one of the type posed by force-control objectives. 
     The method of the invention results in low wear of the manipulator drive through minimization of the local articulation-position offset Δq and the local articulation-speed offset (energy criteria and acceleration criteria). “Narrow” articulation paths around a reference position (e.g., zero position) are attained, resulting in a reversible behavior of the manipulator movement. 
     This specifically serves to prevent the manipulator roller axes from twisting increasingly during the performance of the commanded manipulation until they come to rest against the end stop, rendering a continued performance of the manipulation task impossible. 
     Articulation stops are advantageously mostly avoided or approached gently or with low wear. This behavior is caused by a delay effect of the robot axes, which acts proportionally to the distance from the reference position, and by explicit acceleration limitations. In addition, a stable behavior results for singular robot positions, because the Jacobi Matrix is not inverted. 
     Another advantage is the occurrence of efficient path courses through the exact transfer of the Cartesian linear movement commanded by the manual control ball to the end effector of the manipulator. In addition, path limitations are reliably maintained through physical articulation stops and maximum articulation speeds. 
     Since this results in a restriction of the number of solutions, i.e., in a limited number of allowable articulation positions, a high convergence speed is attained with a gain in real-time operability. In addition, the attained percentage of the desired end-effector destination shift is calculated. Singularities can be approached in a stable manner and/or passed through; as a result it also is not necessary to limit the working space. 
     A Cartesian end-effector destination shift Δ c , commanded at a time T i  can be commanded by the operator and/or by a superordinate task (e.g., force control) in the form of a 6-dimensional increment vector. Alternately, the increment vector may also be determined by evaluating the difference between absolute end-effector coordinates. 
    
    
     BRIEF DESCRIPTION OF THE DRAWING FIGURES 
     In the appended drawings: 
     FIG. 1 is a schematicized illustration of an input/output flux of reverse kinematics in the real time grid; 
     FIG. 2 shows, in the form of a block diagram, an algorithm of inverse kinematics used in the method of command control of a manipulator according to the invention, and 
     FIG. 3 shows the application of the method of the invention for the command control of a manipulator within the frame of the performance of a superordinate task, such as a force control. 
    
    
     DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT 
     The present invention is a method for transforming the input commands to a robot (or “manipulator”), preferably via Jacobian matrix methods. The invention also contemplates an apparatus for transforming the input commands, which may be interposed between an actuator and the robot. The actuator may any sort, e.g. a mouse or joystick, a recorder with a recorded sequence of commands to be output to the calculating unit, a second programmed computer, and so on. 
     The apparatus, which acts as a calculating unit, in most cases will be a microprocessor, computer, etc., but may be an analogue computer or other device which can carry out the method of the invention. The present invention also includes a combination of actuator, calculating unit, and robot. 
     FIG. 1 is a time graph showing the notation used for the inputs and outputs to the calculating unit of the present invention. The horizontal axis represents time. Calculation inputs are generically denoted x and results or outputs corresponding to robotic position are generically denoted q, with superscripts showing the corresponding instant of time. FIG. 1 shows that the calculations are preferably not continuous but incremental. The method calculates over the time interval a next q i+1  from the preceding q i . 
     A robot&#39;s manipulator will ordinarily have six degrees of freedom in space (three of translation and three of rotation). According to the particular geometry of the robot&#39;s limbs, rotators, etc., there will be several different sets of actuators and sensors associated with respective dimensions. The notation of FIG. 1 represents only one of several dimension, i.e. angles or directions, in which the manipulator can move. 
     It is to be noted that motion in any one of the six directions is likely to cause motion in at least one of the others, and these motions are interrelated according to the geometry of the robot. For example, an angular changes at a “elbow” will cause a “hand” to translate through an arc. If the input device or instruction set has a different geometry from the robot—for example, the input device has three levers for three directions in space but the robot has a single extendable arm—then the end-effect destination shift commands will need to be converted into manipulator articulation positions by the use of matrix methods. Thus matrix methods must be used in the present equation. 
     FIG. 2 is a flowchart schematically illustrating the method of the invention. Aside from the input from the actuator, i.e. Δx d , the calculation process also takes into account parameters shown in the box at left. 
     One of these parameters is a limit on the input, Δx max , which cuts off large commands, i.e. in case of a sudden joystick lurch or the like. 
     Other parameters limit the motion of the robot: displacement or angle limits are denoted by q min  and q max , and maximum robot change rates and acceleration q max  and q max . In FIG. 3 these are shown as “Path limitations”. 
     Still other parameters α, β, and γ are described as “algorithm parameter weightings” in FIG.  3 . These weighting values are preferably non-negative, and are used to minimize a “quality function” f(q). The quality function incorporates criteria based on energy, reference position, acceleration, and a scalar parameter p. 
     In the method according to the invention, a commanded end-effector destination shift Δx c : =(Δx t , Δx r ) is specified with the use of the Jacobi Matrix of kinematics at a time T i , said end-effector destination shift being commanded by the operator with the aid of a space mouse or control ball in the form of a 6-dimensional increment vector. Δx t  ε  3  or Δx r  ε  3  always denote the translational or rotational portion of the commanded end-effector destination shift, whereas Δx t   max  or Δx r   max , respectively, each define the maximum (scalar-value) translational or rotational Cartesian position offset of the end effector per sampling time ΔT. 
     The desired Cartesian translational or rotational end-effector destination shift Δx t   d  or Δx r   d  per sampling time ΔT is defined as follows:          Δ                   x   t   d       :=     {               Δ                   x   t               if             Δ                   x   t              ≤     Δ                   x   t   max                   Δ                   x   t                 Δ                   x   t              Δ                   x   t   max               otherwise                       Δ                   x   r   d       :=     {           Δ                   x   r               if             Δ                   x   r              ≤     Δ                   x   r   max                   Δ                   x   r                 Δ                   x   r              Δ                   x   r   max               otherwise                                      
     The value |x| of a vector x is determined here and hereinafter by its Euclidian norm               x        :=       (       ∑   i          x   i   2       )         ,                          
     The desired end-effector destination shift is explained by Δx d : =(Δx t   d , Δx r   d ). The energy criteria, reference-position criteria and acceleration criteria can be suitably weighted according to the prevalent problem-specific requirements by allocating three positive numerical values α j , β j , γ j  to each axis j, which are predetermined by the operator, the value α j  serving in the weighting of an energy criterion that evaluates the difference between two adjacent, calculated articulation positions of axis j; and the value β j  serving in the weighting of a criterion that evaluates the deflection of the articulation position q j  from a reference value q ref,j , which is also predetermined by the operator, and the value γ j  serving in the weighting of a criterion which evaluates the acceleration behavior in the form of an articulation speed offset of the articulation axis q j . The articulation speed offset of the articulation axis q j  is predetermined by the operator, just like the physical articulation stops q min , q max  of the manipulator, which relate to path limitations, and the articulation speed limitations {dot over (q)} max  and the articulation acceleration limitations {umlaut over (q)} max . Since the method according to the invention is intended to optimize weighted criteria in the real-time cycle while guaranteeing that all path limitations are maintained, an allowable optimum articulation position offset Δq i  is calculated for a desired end-effector destination shift Δx d   i  at the time T i−1  during the time interval ΔT, with the algorithm of inverse kinematics that progresses during an initialization phase and a subsequent optimization phase. The current desired value is provided to the articulation regulators from q soll   i+1 :=q soll   i +Δq i , with the articulation positions being shifted accordingly by the articulation regulators with q soll   i  during the time period ΔT. Allowable articulation position offset is understood to mean that the articulation position value that has been updated with Δq satisfies the physical articulation stops q min , q max  corresponding to q min ≦q soll +Δq max , and Δq satisfies the articulation speed limitations {dot over (q)} max  corresponding to |Δq i |≦{dot over (q)} max ΔT. As a result, the limitations of the articulation accelerations are maintained reliably during the approach of articulation positions to the physical articulation stops. The type of optimum quality of Δq i  can be determined by the operator through the quality-criterion weighting α, β, γ. As a result, the sampling time ΔT corresponding to ΔT≧max (Δt q , Δt r ) is dimensioned such that the computation time Δt q  for calculating an optimum allowable articulation position offset Δq and the adjustment time Δt r , which the regulators require for adapting the axial positions to the desired values q soll , lie within the time span ΔT. 
     An algorithmic description of the method of the invention follows. 
     J i , i=1, . . . , ndof denote the columns of the Jacobi Matrix of kinematics in the point q i  of the current articulation position of the manipulator, ndof denotes the number of articulations and ε i :={dot over (q)} max   i ΔT denotes the maximum allowed articulation position offset per sampling time ΔT. With          y   i     :=       Δ                   q   i         ɛ   i                              
     and J ε :=(J 1 ε 1 , J 2 ε 2 , . . . , J ndof ε ndof ), the incremental kinematic equation is as follows: 
     
       
         pΔx d =J ε y.  (1) 
       
     
     Because of the path limitations, the following box limitations result for y:          y   min   i     :=     max        (       -       bnd   Low                i         ɛ   i         ,         q   min   i     -     q   soll   i         ɛ   i         )                   y   max   i     :=     min        (       -       bnd   Up                i         ɛ   i         ,         q   max   i     -     q   soll   i         ɛ   i         )         ,                  bnd   Low                i       :=     min        (       ɛ   i     ,                q   min   i     -     q   soll   i                   q   ¨     max   i        Δ                   T   2         ɛ   i         )                   bnd   Up                i       :=       min        (       ɛ   i     ,                q   max   i     -     q   soll   i                   q   ¨     max   i        Δ                   T   2         ɛ   i         )       .                            
     Further define:            y   ref   i     :=         q   ref   i     -     q   soll   i         ɛ   i         ,                  y   acc   i     :=       Δ                     q   _     i         ɛ   i         ,                          
     with Δ{overscore (q)} i  denoting the recently calculated increment of the i-th articulation axis. 
     So that all path limitations can be met, according to the kinematic equation (1), the desired end-effector destination shift is subjected to a centric extension described in the form of a scalar: 
     
       
         0≦p≦1. 
       
     
     The value p is maximized with the method of the invention such that all path limitations are maintained, with p·100 being the attained percentage of the desired end-effector destination shift. 
     Define the limitation vector b:=0, 0, 0, 0, 0, 0, y min , 0,−y max , −1) ε  2n+6 , the parameter vector x: =(y,p) to be determined and the matrix of the gradients of all secondary conditions A ε  2n+6,n  with n: =ndof+1:              A   :=       (             J   ɛ     ,             -   Δ                     x   d                 I   n                           -     I   n                         )     .             (   2   )                                
     Here I n  ε  n,n  indicates the unit matrix. Furthermore, α i , i=1, . . . , 2n+6 indicate the lines of A. 
     The weights α, β, γ of the criteria define the Cholesky factor of the Hesse matrix from the scaled sum of the criteria in the form of the diagonal matrix Λε  n,n . These criteria are the energy criterion (q−q i ) t diag(α j ) (q−q i ), the reference-position criterion (q−q ref ) t diag (β j ) (q−q ref ), with the value q ref  being a predetermined articulation position value which is determined such that the sequence of the calculated articulation position values (q i ) runs near this reference position value; the acceleration criterion (q−2q i +q i−1 ) t diag(γ j ) (q−2q i +q i−1 ) and the additional criterion from −p, whereby the scalar parameter p satisfies the kinematic equation pΔx d =J(q i )(q−q i ) and the inequality 0≦p≦1; p·100 being the attained percentage of the commanded end-effector destination shift (Δx d ). The main diagonal elements of the above-mentioned diagonal matrix are:          Λ     i   ,   i       :=           2        (       α   i   scal     +     β   i   scal     +     γ   i   scal       )                       for                 1     ≤   i   ≤     n   -   1             and           Λ     n   ,   n       :=   0         with             α   i   scal     :=       α   i          1   ndof         ,                  β   i   scal     :=       β   i            ɛ   i       ndof        (       q   max   i     -     q   min   i       )             ,                  γ   i   scal     :=       γ   i            1     3      ndof       .                                
     The base structure of the special method according to the invention, which utilizes an inverse kinematics for command control, is illustrated schematically in FIG. 2 
     An algorithm used in the method of the invention for the inverse kinematics is described in more detail below, in conjunction with FIG.  2 . In the used algorithm of inverse kinematics, first an initialization phase is performed, which is configured as follows: Counting index: k=0; Starting value x k =(y k , p k )=0; k max&gt;2; Initialize with m k : =7 the matrix of the gradients of the active secondary conditions {circumflex over (A)} t  ε  m     k,     n :              A   ^     t     :=     (             J   ɛ     ,             -   Δ                     x   d                 0   ,                      1           )       ;                          
     initialize the index quantity J k : =(j k   1 , j k   2 , . . . , j k   2n+6 ) to characterize the active, singular and inactive secondary conditions:          j   k   i     :=     {           n   +   6             for                                i     =   7               i   -   1               for                                i     =   8     ,   …   ,     n   +   6               i         otherwise   ;                                    
     initialize the orthogonal triangular factorization of {circumflex over (A)}: 
     
       
         (r k , J k , Y k , Z k , L k , S k ):=Φ 0   A ({circumflex over (A)},m k , J k ); 
       
     
     initialize the orthogonal regular triangular factorization of {overscore (Z)}:=ΛZ k : 
     
       
         (Q k   z ,R k   z ):=Φ 0   z ({overscore (Z)}r k ): 
       
     
     initialize the gradient vector of the quality function f(q)                  g   0     ∈       ℜ   n     :     g   k         :=                2        (         β   1   scal          (       y   k   1     -     y   ref   1       )       +       γ   1   scal          (       y   k   1     -     y   acc   1       )       +                                      α   1   scal          y   k   1       ,   …   ,         β   ndof   scal          (       y   k   ndof     -     y   ref   ndof       )       +                                        γ   ndof   scal          (       y   k   ndof     -     y   acc   ndof       )       +       α   ndof   scal          y   k   ndof         ,     -   1       )     ,                                
     The following abbreviated form is used for g k : 
     
       
         2(β i   scal (y k   i −y ref   i )+γ i   scal (y k   i −y acc   i )+α i   scal y k   i −1), 
       
     
     In the used algorithm of inverse kinematics, an optimization phase is next, which is constructed as follows: 
     Calculate the direction of optimization d k : 
     
       
         R k   z d aux =−Q k   z Z k g k . 
       
     
     From this, determine d aux  through reverse substitution. 
     
       
         R k   z d z =Q k   z d aux . 
       
     
     From this, determine d z  through reverse substitution. Define the direction of optimization: 
     
       
         d k :=Z k d z . 
       
     
     Determine the maximum step width s k  and the index j k   i0  of the limiting secondary condition:          s   k     :=     {           min   j                   {                     b   j     -       a   j   t          x   k             a   j   t          d   k                       with                   a   j   t          d   k       &lt;   0                                and                   ∀     i   &gt;       m   k                   with                 j           =     j   k                i                            }                     =:              b   j0     -       a   j0   t          x   k             a   j0   t          d   k                       with                   j   k   0       :=   j0                ;                          1             if                   a   j   t          d   k       ≥   0     ,                  ∀     i   &gt;       m   k                   with                 j         =     j   k                i                                          
     (In the event of ambiguity, select the j 0  having the smallest index i 0 ). 
     III. Check for optimum quality and update all matrix and index values. 
     (a) If s k &lt;1 (secondary condition j k   0  has become active): 
     i. If m k &lt;n (there are still inactive secondary conditions): 
     x k+1 =x k +s k d k , x k+1 =(Y k+1 , P k+1 ); g k+1 =2(β i   scal (y k+1   i −y ref   i )+γ i   scal (y k+1   i −y acc   i )+α i   scal y k+1   i −1). 
     Update matrix factorization and index quantity: (r k+1 , m k+1 , J k+1 , Y k+1 , Z k+1 , L k+1 , S k+1 ):=Φ +   A (i 0 , r k , m k , J k , Y k , Z k , L k , S k ). 
     Check x k+1 , for optimum quality: 
     If Z k+1   t g k+1 =0 and λ k+1 =LLS(r k+1 , m k+1 , g k+1 , Y k+1 , L k+1 )≧0 then: go to step IV. 
     Otherwise: k=k+1 (increase iteration index) 
     If k&gt;k max: go to step IV. 
     Otherwise: Determine the orthogonal, regular triangular factorization of 
     {overscore (Z)}:=ΛZ k+1 : 
     (Q k+1   z ,R k+1   z ):=Φ z ({overscore (Z)},r k+1 ) 
     Go to Step I. 
     ii. If m k =n (corner of allowable range is attained, exchange of active secondary conditions is necessary):            x     k   +   1       =       x   k     +       s   k          d   k           ,                    x     k   +   1       =     (       Y     k   +   1       ,     P     k   +   1         )       ;               g     k   +   1       =     2        (           β   i   scal          (       y     k   +   1     i     -     y   ref   i       )       +       γ   i   scal          (       y     k   +   1     i     -     y   acc   i       )       +       α   i   scal          y     k   +   1     i         ,     -   1       )                 λ   k     =       LLS        (         r     k   +   1            m     k   +   1         ,     g   k     ,     Y   k     ,     L   k       )       .                            
     Release a direction having the highest optimization potential:            λ   k   j0     :=       min   j          λ   k   j         ;                          
     Update matrix factorizations and index quantity: 
     {tilde over (r)} k ,{circumflex over (m)} k ,{tilde over (J)} k ,{tilde over (Y)} k ,{tilde over (Z)} k ,{tilde over (L)} k , {tilde over (S)} k )=Φ −   A (j 0 ,r k ,m k ,J k ,Y k ,Z k ,L k ,L k , S k ) 
     Activate secondary condition j k   i0 . 
     Update matrix factorizations and index quantity: 
     (r k−1 ,m m   k+1 ,J k+1 ,Y k+1 ,Z k+1 ,L k+1 ,S k+1 ):=Φ +   A (i 0 ,{tilde over (r)} k ,{tilde over (m)} k ,{tilde over (J)} k ,{tilde over (Y)} k ,{tilde over (Z)} k ,{tilde over (L)} k ,{tilde over (S)} k ). 
     Examine x k+1  for optimum quality: 
     If Z k+1   t g k+1 =0; and λ k+1 =LLS(r k+1 ,m k+1 ,g k+1 ,Y l+1 ,L k+1 )≧0 
     then: go to step IV. 
     Otherwise: k=k+1 (increase iteration index) 
     If k&gt;k max: go to step IV. 
     Otherwise: Determine the orthogonal, regular triangular factorization of 
     {overscore (Z)}:=ΛZ k−1 : (Q k+1   z ,R k+1   z ):=Φ z ({overscore (Z)},r k+1 ). 
     Go to Step I. 
     If s k =1 (no new active secondary condition). 
     x k+1 =x k +d k , x k+1 =(Y k+1 , P k+1 ); 
     g k+1 =2(β i   scal (y k+1   i −y ref   i )+γ i   scal (y k+1   i −y acc   i )+α i   scal y k+1   i −1); 
     Update matrix factorizations and index quantity: 
     (r k+1 , m k+1 , J k+1 , Y k+1 , Z k+1 , L k+1 , S k+1 ):=(r k , m k , J k , Y k , Z k , L k , S k ). 
     Check x k+1  for optimum quality: 
     If Z k+1   t g k+1 =0; 
     and λ k+1 =LLS(r k+1 , m k+1 , g k+1 , Y k+1 , L k+1 )≧0 
     then: go to step IV. 
     Otherwise: Release a direction having the highest optimization potential: 
     λ k   j0 := j   min λ k   j ; 
     Update matrix factorizations and index quantity: 
     (r k+1 , m k+1 , J k+1 , Y k+1 , Z k+1 , L k+1 , S k+1 ):=Φ −   A (j 0 , r k , m k , J k , Y k , Z k , L k , S k ) 
     −k=k+1 (increased iteration index) 
     If k&gt;k max: go to Step IV. 
     Otherwise: Determine the orthogonal, regular triangular factorization of 
     {overscore (Z)}:=ΛZ k+1 : 
     (Q k+1   z , R k+1   z ):=Φ z ({overscore (Z)},r k+1 ). 
     Go to Step I. 
     IV. Solution x k+1  is determined. Stop! 
     End of algorithm of inverse kinematics. 
     Definition of the finction LLS: 
     λ=LLS(r, m, g, Y, L). 
     λ=0, i=r+1, . . . , m; 
     λ nL :=(λ r+1 , . . . , λ m ); 
     L t λ L =y t g. 
     From this, determine λ L  ε  r  through reverse substitution. Define the output value of the function: 
     λ:=(λ L , λ hL ). 
     With l eq :=1+max l ≦ i ≦ m |λ(i)|, set the components of λ that are among the secondary conditions of Equation (1) at the value l eq . End of function LLS. 
     Definition of the function Φ + : 
     ({overscore (r)}, {overscore (m)},{overscore (J)},{overscore (Y)},{overscore (Z)},{overscore (L)},{overscore (S)})=Φ +   A (i 0 ,r,m,J,Y,Z,L,S). 
     Activate secondary condition j i0 , The condition is applied that α j0  with j 0 : =j i0  designate the j i0 -th line of A. Define Q t :=(Y, Z) and form {overscore (α)}:=Qα j0 . Partition {overscore (α)}=:({overscore (α)} y ,{overscore (α)} z ) with {overscore (α)} y  ε  r  and {overscore (α)} z  ε  n−r . Determine the householder reflection {tilde over (H)} ε  n−r,n−r  so that |{overscore (α)} z |e 1 ={tilde over (H)}{overscore (α)} z , with e 1 :=(1, 0, . . . , 0)ε  n−r . Define the unitary transformer: H ε  n,n  according to:        H   :=     (             I   r     ,         0             0   ,           H   ~           )                            
     Define the unitary transformer: 
     {overscore (Q)}:=HQ; 
     Update indices:          r   _     :=     {         r           if                          a   _     z            =   0               r   +   1           otherwise   ;                                    
     {overscore (m)}:=m+1; 
     Exchange secondary conditions: 
     If {overscore (r)}≠r, then            j   _     i     :=     {           j   i0             if                 i     =     r   _                 j     m   _               if                 i     =   i0               j     r   _                 if                 i     =     m   _       ,               j   i         otherwise                                  
     otherwise            j   _     i     :=     {           j   i0             if                 i     =     m   _                 j     m   _               if                 i     =   i0               j   i           otherwise   ;                                    
     {overscore (J)}:=({overscore (j)} 1 , . . . , {overscore (j)} 2n+6 ). 
     Update matrix factorizations. 
     {overscore (Y)} is the partial matrix of {overscore (Q)} t  that includes columns 1 through {overscore (r)} of Q{overscore (Q)} t . 
     {overscore (Z)} is the partial matrix of {overscore (Q)} t  that includes columns {overscore (r)}+1 through n of {overscore (Q)} t .            L   _     :=     (           L   ,         0               a   _     y                  a   _     z                )       ;             S   _     :=     {           (     S   ,       a   _     y       )               if                   r   _       =   r                          S         otherwise   .                                    
     End of the function Φ + . 
     Definition of the function Φ.: 
     ({overscore (r)},{overscore (m)},{overscore (J)},{overscore (Y)},{overscore (Z)},{overscore (L)},{overscore (S)})=Φ −   A (i 0 ,r,m,J,Y,Z,L,S). 
     Inactivate secondary condition j i0 . 
     If j 0 &gt;r: (Eliminate singular, active secondary condition) Update indices: 
     {overscore (r)}:=r; 
     {overscore (m)}:=m−1; 
     Exchange secondary conditions:            j   _     i     :=     {             j   i0             if                 i     =       m   _     +   1                 j       m   _     +   1               if                 i     =   j0               j   i         otherwise         .                              
     {overscore (J)}:=({overscore (j)} 1 , . . . , {overscore (j)} 2n+6 ). 
     Update matrix factorizations: 
     {overscore (Y)}:=Y; 
     {overscore (Z)}:=Z; 
     {overscore (L)}:=L; 
     {overscore (SL)}:=(S 1 , . . . ,S j0−r−l ,S j0−r+1 ,S m−r ), 
     where S i  denote the columns of S. 
     If j 0 ≦r: (Eliminate regular active secondary condition) {tilde over (R)} results from R:=L t  through striking of the j 0 -th column. The elements of {tilde over (R)} that occur at the locations (j 0 ,j 0 +1), (j 0 +1, j 0 +2), . . . , (r,r+1) are canceled through left manipulation with a sequence of unitary elimination matrices {tilde over (E)} j0,j0+1 , . . . , {tilde over (E)} r−1,r  εIR r,r . Define linear transformers: 
     {circumflex over (R)}:={tilde over (E)} r−1,r {tilde over (E)} r−2,r−1 . . . {tilde over (E)} j0,j0+1 {tilde over (R)}; 
     {circumflex over (S)}:={tilde over (E)} r−1,r {tilde over (E)} r−2,r−1 . . . {tilde over (E)} j0,j0+1 S;            E     i   ,     i   +   1         :=     (               E   ~       i   ,     i   +   1         ,         0           0         I     n   -   r             )       ;                          
     Q t :=(Y,Z); 
     {overscore (Q)}:=E r−1,r E r−2,r−1 . . . E j0,j0+1 Q; 
     If the last line of {circumflex over (S)} is zero, or if r=m: 
     Update indices: 
     {tilde over (r)}:=r−1; 
     {overscore (m)}:=m−1; 
     Exchange secondary conditions:            j   _     i     :=     {             j   i0             if                 i     =       m   _     +   1                 j     i   +   1                 if                 i     =   j0     ,   …   ,     m   _                 j   i         otherwise         .                              
     {overscore (J)}:=({overscore (j)} 1 , . . . , {overscore (j)} 2n+6 ). 
     Update matrix factorizations: 
     {overscore (Y)} is the partial matrix of {overscore (Q)} t  that includes columns 1 through {overscore (r)} of {overscore (Q)} t . 
     {overscore (Z)} is the partial matrix of {overscore (Q)} t  that includes columns {overscore (r)}+1 through n of {overscore (Q)} t . 
     If r&lt;m, strike the last line of {circumflex over (S)} and {circumflex over (R)}. Set: 
     {overscore (L)}:={circumflex over (R)} t    
     {overscore (S)}:={circumflex over (S)}; 
     Otherwise (convert singular, active secondary condition into a regular, active secondary condition): 
     Determine the element of the last line of {circumflex over (S)} with the smallest index l0 such that: 
     {circumflex over (S)} r,i0 ≠0. 
     Exchange column l0 with column 1 of {circumflex over (S)}. Define linear transformer: 
     {overscore (R)}:=({circumflex over (R)}, {circumflex over (S)} l0 ), 
     where {circumflex over (S)} l0  denotes the l0th column of {circumflex over (S)}. 
     Update indices: 
     {overscore (r)}:=r; 
     {overscore (m)}:=m−1; 
     Exchange secondary conditions:            j   ^     i     :=     {               j   j0             if                 i     =       m   _     +   1                 j     i   +   1                 if                 i     =   j0     ,   …   ,     m   _                 j   i         otherwise         .                  j   _     i       :=     {             j   ^         r   _     +   l0   -   1               if                 i     =     r   _                   j   ^       r   _               if                 i     =       r   _     +   l0   -   1                   j   ^     i         otherwise                                      
     {overscore (J)}:=({overscore (j)} 1 , . . . , {overscore (j)} 2n+6 ). 
     Update matrix factorizations: 
     {overscore (Y)} is the partial matrix of {overscore (Q)} t  that includes columns 1 through {overscore (r)} of {overscore (Q)} t . 
     {overscore (Z)} is the partial matrix of {overscore (Q)} t  that includes columns {overscore (r)}+1 through n of {overscore (Q)} t . 
     {overscore (L)}:L={overscore (R)} t ; 
     {overscore (S)}:=({circumflex over (S)} 2 , . . . , {circumflex over (S)} l0−1 , {circumflex over (S)} 1 , {circumflex over (S)} l0+1 , . . . , {circumflex over (S)} m−r ), 
     where {circumflex over (S)} 1  denotes the columns of {circumflex over (S)}. 
     End of function Φ. 
     Definition of the function Φ 0   A : 
     ({overscore (r)},{overscore (J)},{overscore (Y)},{overscore (Z)},{overscore (L)},{overscore (S)})=Φ 0   A ({circumflex over (A)},m,J). 
     1. Define: 
     A 0 :={circumflex over (A)}, i:=0. 
     2. Define the following matrix recursion: 
     A i+1 L=H i A i , i≧0. 
     The unitary transformer H i  ε  n,n  is explained as follows:          H   i     :=       (           I   i         0             0   ,             H   ~     i           )     .                            
     The householder reflection {tilde over (H)} i  ε  n−i,n−1  is defined such that: 
     |{tilde over (α)} k0   i |e 1 ={tilde over (H)} i {tilde over (α)} k0   i , 
     with e 1 :=(1, 0, . . . , 0) ε  n−i . Here the vectors {tilde over (α)} k   i  ε n−i , k=1, . . . , n−i indicate the columns of the matrix {tilde over (A)} i  ε  n−i,m−1 :          A   i     :=     (           *   ,         *             *   ,             A   ~     i           )                            
     Moreover, 1≦k 0 ≦n−i is the smallest index with {tilde over (α)} k0   i ≠0. If no such k 0  exists, then go to step III; otherwise go to step IV. 
     3. Define indices: 
     {overscore (r)}:=i; 
     {overscore (J)}:=({overscore (j)} i , . . . , {overscore (j)} 2n+6 ). 
     Define matrix factorizations: 
     {overscore (Q)}:=H {overscore (r)}−1 H {overscore (r)}−2  . . . H 0 ; 
     {overscore (Y)} is the partial matrix of {overscore (Q)} t  that includes columns 1 through {overscore (r)} of {overscore (Q)} t . 
     {overscore (Z)} is the partial matrix of {overscore (Q)} t  that includes columns {overscore (r)}+1 through n of {overscore (Q)} t . 
     T is the matrix that results from the striking of lines +1 through n from A i+1 . 
     Define {overscore (L)} ε  {overscore (r)},   {overscore (r)}  and {overscore (S)}ε  {overscore (r)},m−   {overscore (r)}  according to: 
     ({overscore (L)} t ,{overscore (S)}):=T. 
     Stop: function Φ 0   A  has been performed completely! 
     4. Exchange column i+k 0  with column i+1 in A i .            j   _     k     :=     {           j     i   +   k0               if                 k     =     i   +   1                 j     i   +   1               if                 k     =     i   +   k0                 j   k         otherwise                                  
     Set j k : ={overscore (j)} k ∀k, increase the counting index i=i+1 and go to Step II. 
     End of function Φ 0   A . 
     Definition of the function Φ 0   Z : 
     (Q z , R z ):=Φ 0   z ({overscore (Z)},r). 
     Determiine the QR triangular factorization of {overscore (Z)}:            Q   z          Z   _       =       (           R   z             0         )     .                            
     Here Q z  ε  n,n  designate a unitary matrix, and R z  ε  r,r  an upper triangular matrix. 
     End of function Φ 0   z .