Abstract:
A method for detecting a fault in a robot joint includes the steps of: performing a first torque measurement at the robot joint to thereby obtain a first set of torque values; calculating a first distribution characteristic reflecting a distribution of the first set of torque values; performing a second torque measurement at the robot joint to thereby obtain a second set of torque values; calculating a second distribution characteristic reflecting a distribution of the second set of torque values; and comparing the first and the second distribution characteristics to determine whether a fault is present or not. A difference in the distributions of torque measurements is a robust fault indicator that makes use of the repetitive behavior of the system.

Description:
FIELD OF THE INVENTION 
       [0001]    The present invention relates to a method for detecting a fault in a robot joint. 
       BACKGROUND OF THE INVENTION 
       [0002]    In the manufacturing industry making use of industrial robots, preventive scheduled maintenance of the robots is a common approach used to improve equipment safety, reliability, availability and maintainability. This setup delivers high availability, reducing operational costs (e.g. small downtimes) with the drawback of high maintenance costs since unnecessary maintenance actions might take place. Condition based maintenance, “maintenance when required”, can deliver a good compromise between maintenance costs and operational costs, reducing the overall costs. The extra challenge of condition based maintenance is to define methods to determine the condition of the equipment. Preferably, this should be done automatically. 
         [0003]    Conventionally in robotics, condition monitoring and fault detection methods are mainly considered in the time-domain, the use of nonlinear observers being a typical approach in many of the known methods. It is known for example to diagnose the condition of an industrial robot by monitoring friction in the robot joints. Since friction does not only depend on wear but also other phenomena such as speed, load and temperature, this approach assumes a known friction model taking these factors into account. In practice it is, however, difficult to construct an accurate friction model which can describe the effects of speed, load, temperature and wear. 
         [0004]    A desire remains to provide a more robust condition monitoring method for an industrial robot. 
       SUMMARY OF THE INVENTION 
       [0005]    One object of the invention is to provide a more robust method for detecting a fault in a robot joint. 
         [0006]    The invention is based on the realization that condition monitoring of industrial robots can make a direct use of the repetitive behavior of the system when the monitored quantity is suitable. A difference between distributions of torque measurements taken under recurring conditions is found out to be such suitable quantity. 
         [0007]    According to a first aspect of the invention, there is provided a method for detecting a fault in a robot joint. The method comprises the steps of: performing a first torque measurement at the robot joint to thereby obtain a first set of torque values; calculating a first distribution characteristic reflecting a distribution of the first set of torque values; performing a second torque measurement at the robot joint to thereby obtain a second set of torque values; calculating a second distribution characteristic reflecting a distribution of the second set of torque values; and comparing the first and the second distribution characteristics to determine whether a fault is present or not. A difference between distributions of two torque measurements is found out to be a good fault indicator for machine parts executing repetitive tasks. 
         [0008]    According to one embodiment of the invention, the first distribution characteristic comprises a first distribution function, and the second distribution characteristic comprises a second distribution function. The method further comprises the step of calculating a difference between the first and the second distribution functions to thereby obtain a first difference to determine whether a fault is present or not. A difference between distribution functions from two torque measurements is found out to be a good fault indicator for machine parts executing repetitive tasks. 
         [0009]    According to one embodiment of the invention, the method further comprises the steps of: performing a third torque measurement at the robot joint to thereby obtain a third set of torque values; calculating a third distribution function reflecting a distribution of the third set of torque values; calculating a difference between the second and the third distribution functions to thereby obtain a second difference; and calculating a sum of the first difference and the second difference to determine whether a fault is present or not. A sum of differences between two pairs of distribution functions from torque measurements is found out to be a good fault indicator for machine parts executing repetitive tasks. 
         [0010]    According to one embodiment of the invention, the first and second distribution functions are kernel density estimators, and the first difference is calculated using a distance measure such as Kullback-Leibler distance. A difference between kernel density estimators from two torque measurements is found out to be a good fault indicator for machine parts executing repetitive tasks. 
         [0011]    According to one embodiment of the invention, the method further comprises the step of, before calculating the first and second distribution characteristics, eliminating from the first and the second sets of torque values those values that are obtained at a joint speed under a first threshold value and/or at a joint speed over a second threshold value to thereby obtain a first set of filtered torque values and a second set of filtered torque values. By filtering out torque values obtained at low and/or high joint speeds, an even better fault indicator is achieved since an optimal region for wear monitoring is concentrated in a narrow joint speed range. 
         [0012]    According to one embodiment of the invention, the method further comprises the steps of: calculating a mean value of the first set of filtered torque values to thereby obtain a first distribution mean value; calculating a mean value of the second set of filtered torque values to thereby obtain a second distribution mean value; and calculating a difference between the first and the second distribution mean values to determine whether a fault is present or not. A mean value is a distribution characteristic that is found out to provide a good fault indicator according to the method of the present invention. 
         [0013]    According to one embodiment of the invention, the first measurement is performed during a first task executed by the robot joint, and the second measurement is performed during a second task executed by the robot joint, the first task being executed earlier than the second task. In order to provide a fault indicator according to the present invention, the torque measurements need to be performed at different times. 
         [0014]    According to one embodiment of the invention, the first and the second tasks are identical. In order to provide a fault indicator according to the present invention, the torque measurements need to be performed during comparable robot movements. 
         [0015]    According to one embodiment of the invention, the first task is executed when the robot joint is new or it is otherwise known that a fault is not present. This assumption facilitates the detection of the fault indicator. 
         [0016]    According to one embodiment of the invention, the first and the second sets of torque values are weighted by means of a weighting vector. By this measure the fault indicator can be further amplified. 
         [0017]    According to one embodiment of the invention, the first and the second distribution functions are weighted by means of a weighting function. By this measure the fault indicator can be further amplified. 
         [0018]    According to one embodiment of the invention, the weighting function has joint speed as an input. Joint speed is found out to have a strong impact on the torque measurement results, and this impact can be reduced by an appropriate weighting function taking the joint speed into account. 
         [0019]    According to one embodiment of the invention, the first torque measurement is performed at a first joint temperature, and the second torque measurement is performed at a second joint temperature, the first joint temperature being identical with the second joint temperature. Joint temperature is found out to have a strong impact on the torque measurement results, and this impact can be reduced by performing the measurements in comparable temperature conditions. 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         [0020]    The invention will be explained in greater detail with reference to the accompanying drawings, wherein 
           [0021]      FIG. 1  shows a schematic illustration of an industrial robot, 
           [0022]      FIGS. 2   a - 2   f  show some kernel functions and their respective Fourier transforms, 
           [0023]      FIGS. 3   a - 3   b  show measured torque signals and their respective kernel density estimators for a tested robot joint, 
           [0024]      FIGS. 4   a - 4   d  show friction curves and three different fault indicators according to the invention for a tested robot joint, 
           [0025]      FIGS. 5   a - 5   b  show worst case estimates for an average distance and a total variability between two sets of data as a function of joint speed φ, and the respective optimal weights for a tested robot joint, and 
           [0026]      FIGS. 6   a - 6   b  illustrate an improved probability of fault detection P d  with weighted data. 
       
    
    
     DETAILED DESCRIPTION OF THE INVENTION 
       [0027]    Referring to  FIG. 1 , an industrial robot can be described as a multi body dynamic mechanism by 
         [0000]      τ= M (φ){umlaut over (φ)}+ C (φ,{umlaut over (φ)})+ Dφ+τ   g (φ)+τ s (φ)+τ f  ({dot over (φ)}, τ m , T, w),   (1)
 
         [0000]    where τ is torque at a robot joint, φ is an angular joint position of the robot joint, M(φ) is an inertia vector, C(φ,{dot over (φ)}) relates to speed dependent terms (e.g. Coriolis and centrifugal), D is a damping vector, τ g (φ) is a gravity-induced torque, τ s (φ) is a nonlinear stiffness. The function τ f ({dot over (φ)}, τ m , T, w) contains the joint friction components and is dependent on joint speed {dot over (φ)}, the load torque τ m  caused by the manipulated load, the joint temperature T and the wear level w. 
         [0028]    The deterministic input of interest is the wear level w, which is zero when the robot is new and increases with time/usage. When the wear level w exceeds a predetermined threshold value, it is considered as a fault. Since from equation (1) it is obvious that the torque T is affected directly by the wear level w, the torque τ is apparently a quantity of interest and is to be measured. The remaining variables, the joint position φ and its derivatives, the load torque τ m  and the joint temperature T, are considered as disturbances. In order to be able to exclude the effects of these disturbances, it may be advantageous to measure especially the joint position/speed φ/{dot over (φ)} and the joint temperature T as well. 
         [0029]    The torque τ is measured during a task           executed by the robot, and a set of N measured torque values is obtained to constitute an N-dimensional torque vector, 
         [0000]      τ j =[τ 1   j , . . . , τ N   j ] T ,
 
         [0000]    where τ i   j  denotes an individual torque value. A task           comprises a known movement or a sequence of movements of the robot joint at which the measurement is performed, the angular position φ of the robot joint changing in a known manner during a task          . The measurement is repeated M times, during execution of M tasks          , whereby the measurement data constitutes an N×M torque matrix, 
         [0000]        T   M =[τ 0 , . . . , τ j , . . . , τ M−1 ],
 
         [0000]    where τ 0  is a nominal torque vector representing data with zero wear level w. 
         [0030]    According to one embodiment of the invention, for the purpose of monitoring the torque τ to detect changes in wear level w, the following assumptions are taken: 
         [0031]    Assumption 1: Regularity of τ j  if no fault. It is considered that the measured torque τ j  change only slightly along j, unless in the presence of a nonzero wear level w j . 
         [0032]    Assumption 2: Faults are observable. Changes on wear level w j  affect the measured torque τ j . 
         [0033]    Assumption 3: Nominal data is available. At j=0, wear level w 0 =0, and the nominal torque vector τ 0  is always available. 
         [0034]    According to one embodiment of the invention, the nominal torque vector τ 0  (always available from Assumption 3) is compared against the remaining torque vectors τ j . While Assumption 2 is necessary, Assumption 1 ensures that two given torque vectors τ j  and τ l  are comparable and might differ significantly only if there is a fault. 
         [0035]    The effects of the angular position φ, its derivatives, and the load torque τ m  are defined by the task          . Therefore, if two torque vectors τ j  and τ l  are obtained from two identical tasks          , these disturbances are not an obstacle to satisfy Assumption 1. If also the joint temperature T is identical during the two identical tasks          , then the torque vectors τ j  and τ l  satisfy the Assumption 1 and the framework is valid. The joint temperature T is however the result of complicated losses mechanisms in the robot joint and heat exchanges with the environment and might cause the Assumption 1 not to be satisfied. The effect of the joint temperature T on the torque τ is in fact comparable to that caused by the wear level w. The problem of robust monitoring of the wear level w is therefore challenging. 
         [0036]    The torque vectors τ j  need to be characterized in an appropriate way in order to render two torque vectors τ j  and τ l  comparable for the purpose of detecting a fault in the robot joint. There are several ways to characterize a torque vector τ j . It could be represented by a single number, such as its mean, peak, range, etc. Summarizing the whole torque vector τ j  into a single quantity might however hide many of the torque vector&#39;s τ j  features. A second alternative would be to simply store the whole torque vector τ j  and try to monitor the difference τ 0 −τ j , but this requires that the torque vectors τ 0  and τ j  are synchronized, which is a limitation in many applications. Sometimes, looking at the data spectra is helpful, but this type of analysis requires the data to be ordered. 
         [0037]    The alternative according to the present invention is to consider the distribution of the torque vector τ j , which does not require ordering or synchronization and reveals many of the torque vector&#39;s τ j  features. 
         [0038]    Because the mechanisms that generate the torque vector τ j  are considered unknown, the use of a nonparametric estimate of the distribution {circumflex over (p)}(•) of the torque vector τ j  is a suitable alternative. Such estimate can be obtained with the use of kernel density estimators, 
         [0000]        {circumflex over (p)}   j (τ)= N   −1  Σ i=1   N    k   h (τ−τ i   j ),   (2)
 
         [0000]    where k h (•) is a kernel function, satisfying k h (•)≧0 and that integrates to 1 over          . The bandwidth h&gt;0 is a smoothing parameter and τ includes the domain of T M . From the definition, it follows that ∫ {circumflex over (p)}(τ)dτ=1, that is, the distribution is normalized to 1. 
         [0039]    The operation according to the equation (2) can be rewritten as the convolution 
         [0000]        {circumflex over (p)}   j (τ)= N   −1  ∫ −∞   ∞  Σ i=1   N   δ( x−τ   i   j ) k   h (τ− x ) dx,    (3)
 
         [0000]    where δ(•) is the Dirac delta. Using the convolution theorem, the kernel density estimator can be seen as a filter in the frequency domain, controlling the smoothness of the estimated distribution. It is typical to choose kernel functions with a low pass behavior, where the bandwidth parameter h controls its cutoff frequency. Typical kernel functions (left column) and their Fourier transforms (right column) are shown in  FIG. 2 . 
         [0040]      FIG. 3  shows results of a wear test (Wear Test 1) performed at a robot joint with the objective of studying the wear effects. During the test, the joint temperature T is kept constant and torque vectors τ j  corresponding to the torque signals shown in  FIG. 3   a  are obtained from identical tasks           so that Assumption 1 is satisfied. The measurement is repeated for identical tasks           executed regularly a total of M=33 times yielding a torque matrix T M =[τ 0 , . . . , τ j , . . . , τ M−1 ]. The tests are executed until the wear levels are considered significant, so that maintenance should be performed. The torque signals corresponding to the torque vectors τ 0 , τ 1  and τ 33  are shown in  FIG. 3   a , and the corresponding kernel density estimators are shown in  FIG. 3   b . The torque vectors τ 0  and τ 1  are considered to represent a new and a substantially new robot joint, respectively, while the torque vector τ 33  represents a robot joint with increased wear level w. The kernel density estimators are close to identical for the torque vectors τ 0  and τ 1 , and differ considerably from the kernel density estimators of the torque vector τ 33 . The results according to  FIG. 3  show that Assumptions 1 and 2 are valid, and that it is possible to detect a fault by monitoring the changes in the kernel density estimators. 
         [0041]    In statistics and information theory, the Kullback-Leibler divergence (KLD) is one of the methods used to measure the difference between two probability distributions. For two continuous distributions on x, p(x) and q(x), it is defined as 
         [0000]    
       
         
           
             
               
                 
                   
                     D 
                     KL 
                   
                   ( 
                   
                     
                       
                         p 
                          
                         
                            
                           q 
                           ) 
                         
                       
                       = 
                       
                         - 
                         
                           
                             ∫ 
                             
                               - 
                               ∞ 
                             
                             ∞ 
                           
                            
                           
                             
                               p 
                                
                               
                                 ( 
                                 x 
                                 ) 
                               
                             
                              
                             log 
                              
                             
                                 
                             
                              
                             
                               
                                 q 
                                  
                                 
                                   ( 
                                   x 
                                   ) 
                                 
                               
                               
                                 p 
                                  
                                 
                                   ( 
                                   x 
                                   ) 
                                 
                               
                             
                              
                             
                                
                               x 
                             
                           
                         
                       
                     
                     , 
                   
                 
               
               
                 
                   ( 
                   4 
                   ) 
                 
               
             
           
         
       
     
         [0000]    wherein q(x)&gt;0 for any x such that p(x)&gt;0. The KLD satisfies D KL (p ∥ q)≧0 (Gibbs inequality), with equality if and only if p(x)=q(x). The KLD is in general not symmetric, D KL (p ∥ q) ≠ D KL (q ∥ p). The quantity 
         [0000]      KL(p ∥ q)         D KL (p μ q)+D KL (q ∥ p),   (5)
 
         [0000]    known as the Kullback-Leibler distance (KL distance), is however symmetric. Although the KL distance is defined for probability functions, it can also be used for kernel density estimators since they are normalized to 1. The torque vectors τ j  can consequently be characterized with the help of a KL distance in order to render two torque vectors τ j  and τ l  comparable for the purpose of detecting a fault in the robot joint. From Assumption 3 it follows that nominal data is available, so that the nominal torque vector τ 0  is known and {circumflex over (p)} 0 (τ) can be evaluated. The quantities KL({circumflex over (p)} 0  ∥ {circumflex over (p)} j ) can therefore be used as a fault indicator. 
         [0042]    Using the torque matrix T M =[τ 0 , . . . , τ j , . . . , τ M−1 ] obtained from the Wear Test 1, the respective kernel density estimators are computed, resulting in [{circumflex over (p)} 0 (τ), . . . , {circumflex over (p)} j (τ), . . . , {circumflex over (p)} M−1 (τ)], wherein {circumflex over (p)} 0 (τ) represents a new fault free robot joint. The quantities KL({circumflex over (p)} 0  ∥{circumflex over (p)} j ) are computed for j=1, . . . , M−1. As shown in  FIG. 4   b , these quantities show a clear response to the increased wear level w and can therefore be used as a fault indicator. For an illustration of the wear behavior during the experiments, the friction curves in the joint were estimated using a dedicated experiment at each execution of a task           and are shown in  FIG. 4   a.    
         [0043]    The above example illustrates how the basic framework according to the invention can be successfully used to monitor a robot joint that operates in a repetitive manner. The regularity requirement according to Assumption 1 is, however, limiting in many practical applications. Further embodiments of the invention are therefore adopted with the aim of relaxing the Assumption 1. 
         [0044]    Since KL({circumflex over (p)} j−1  ∥ {circumflex over (p)} j ) measures the difference between the kernel density estimators of consecutive torque vectors τ j−1  and τ j , the sum of these increments over 1, . . . , j gives the accumulated changes up to j, which is related to a fault and can therefore be used for monitoring. 
         [0045]    Because of measurement noise, the increments KL({circumflex over (p)} j−1  ∥ {circumflex over (p)} j ) will also have a random behavior when there is no fault. The simple summation of the increments will therefore behave like a random walk and drift away. An alternative is to use a cumulative sum (CUSUM) algorithm, defined as 
         [0000]        g   j   =g   j−1   +s   j −ν  (6)
 
         [0000]        g   j =0 if  g   j &lt;0   (7)
 
         [0046]    The test statistic g j  adds up the signal to be monitored s j , which in the context presented here is s j =KL({circumflex over (p)} j−1  ∥{circumflex over (p)} j ). To avoid positive drifts, a subtracted drift parameter ν is included in the equation (6). Negative drifts are avoided by resetting g j  according to equation (7) if the outcome of equation (6) is negative. The resulting quantity g j  is suitable for condition monitoring and does not require assignment of a nominal data, that is, Assumption 3 is relaxed. The drift parameter can be chosen as 
         [0000]      ν=κσ+μ,   (8)
 
         [0000]    where μ and σ are the mean and the standard deviation of the increments KL({circumflex over (p)} j−1  ∥ {circumflex over (p)} j ) under no fault, and κ is a positive constant. 
         [0047]    The Wear Test 1 is considered again. Instead of using KL({circumflex over (p)} 0  ∥ {circumflex over (p)} j ) as a fault indicator, the increments KL({circumflex over (p)} j−1  ∥ {circumflex over (p)} j ) are computed and the CUSUM algorithm is used. The drift parameter is chosen according to equation (8), with κ=3 and μ and σ estimated from the first 5 sequences. The resulting quantities are shown  FIGS. 4   c  and  4   d , which show a clear response to the increase of the wear level w. 
         [0048]    Let            j  denote the task under which a torque vector τ j  is generated. Assumption 1 requires the whole torque matrix T M  to have been generated under the same task           to be comparable. The alternative solution of monitoring the accumulated consecutive increments KL({circumflex over (p)} j−1  ∥{circumflex over (p)} j ) requires, in principle, that only            j−1  and            j  are the same, thereby relaxing Assumption 1. 
         [0049]    Since the behavior of the increments might differ depending on the task          , special care should be taken when monitoring their accumulated changes. If the CUSUM algorithm is used, the drift parameter ν can be set differently according to the executed task, that is, ν will be a function of          . 
         [0050]    An alternative to achieve robustness to disturbances is to consider weighting the raw data according to prior knowledge of the fault and disturbances. Defining a weighting vector Ω ∈            N , the weighted torque data can be written as 
         [0000]        τ   j =Ω ∘ τ j ,   (9)
 
         [0000]    where ∘ is the Hadamard product (element-wise multiplication). The idea is to choose the weighting vector Ω to maximize the sensitivity to faults while increasing the robustness to disturbances. 
         [0051]    Considering the basic framework presented above, a natural criterion for weighting vector Ω would be to choose it such that KL({circumflex over (p)} j (Ω)∥ {circumflex over (p)} 1 (Ω)) is maximized when τ j  represents a fault free robot joint and τ l  represents a faulty robot joint, and it is minimized in case τ j  and τ l  both represent a fault free or faulty robot joint. A general solution to this problem is however difficult since it depends on how {circumflex over (p)} j (Ω) was computed (e.g. the kernel function chosen). In the following, simpler criteria are used in a compromise of explicit solutions. As it will be shown, the results are directly related to linear discriminant analyses. 
         [0052]    Consider that the torque matrix T M  is available and the fault status (present or not) is known for each torque vector τ j , and the fault status is the same for each element in each torque vector τ j . The data representing a fault free status are said to belong to the class C 0 , with M 0  observations, while the data representing a faulty status belong to class C 1 , with M 1 =M−M 0  observations. Applying the weighting vector Ω to the torque matrix T M  yields 
         [0000]        T   M           [  τ   0 , . . . ,  τ   M     0     +1 , . . . ,  τ   M     1     +M     0   ],   (10)
 
         [0000]    and the objective is to choose Ω such that the separation between the classes is maximized. A simple criterion is to consider the difference between the classes&#39; means  m . The kth class mean  m   k  over all M k  observations is 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       m 
                       _ 
                     
                     k 
                   
                    
                 
               
               
                 
                   ( 
                   11 
                   ) 
                 
               
             
           
         
       
     
         [0053]    The distance between the means of classes C 0  and C 1  is proportional to 
         [0000]        m   1 −  m   0  ∝ Ω T (m 1 −m 0 )   (12)
 
         [0054]    This problem is equivalently found in linear discriminant analyses. Constraining Ω to unit length in order to achieve a meaningful solution, it is easy to see that the optimal choice is to take Ω ∝(m 1 −m 0 ). 
         [0055]    A criterion based only on the distance between the classes&#39; means  m  does not consider the variability found within each class C 0 , C 1 , for instance caused by disturbances. An alternative is to consider maximum separation between the classes&#39; means  m  while giving small variability within each class C 0 , C 1 . Considering a measure of variability for each class C 0 , C 1  as the mean of variances for each ith component, 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       s 
                       _ 
                     
                     k 
                   
                    
                 
               
               
                 
                   ( 
                   13 
                   ) 
                 
               
             
           
         
       
     
         [0000]    where S k  is a diagonal matrix with diagonal elements given by s i   k . Defining the total within class variation as Σ k    s   k , the following criterion can be used when two classes are considered 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       
                         
                           ( 
                           
                             
                               
                                 m 
                                 _ 
                               
                               1 
                             
                             - 
                             
                               
                                 m 
                                 _ 
                               
                               0 
                             
                           
                           ) 
                         
                         2 
                       
                       
                         
                           
                             s 
                             _ 
                           
                           1 
                         
                         + 
                         
                           
                             s 
                             _ 
                           
                           0 
                         
                       
                     
                     ∝ 
                     
                       
                         
                           
                             Ω 
                             T 
                           
                            
                           
                             ( 
                             
                               
                                 m 
                                 1 
                               
                               - 
                               
                                 m 
                                 0 
                               
                             
                             ) 
                           
                         
                          
                         
                           
                             ( 
                             
                               
                                 m 
                                 1 
                               
                               - 
                               
                                 m 
                                 0 
                               
                             
                             ) 
                           
                           T 
                         
                          
                         Ω 
                       
                       
                         
                           
                             Ω 
                             T 
                           
                            
                           
                             ( 
                             
                               
                                 S 
                                 1 
                               
                               + 
                               
                                 S 
                                 0 
                               
                             
                             ) 
                           
                         
                          
                         Ω 
                       
                     
                   
                   , 
                 
               
               
                 
                   ( 
                   14 
                   ) 
                 
               
             
           
         
       
     
         [0000]    which is a special case of the Fisher criterion. It can be shown that solutions for this problem satisfy 
         [0000]      Ω ∝(S 1 +S 0 ) −1 (m 1 −m 0 ).   (15)
 
         [0056]    That is, each weight ω i  is proportional to the ratio between the average changes m i   1 −m i   0  and the total variability found in the data s i   1 +s i   0 . 
         [0057]    Notice however that the solutions according to the equations (12) and (15) require the data to be synchronized, which is difficult in many practical applications. In case this is possible (for instance using simulations), the result of such analyses might reveal some useful pattern of the weights ω i . For instance, if the weights ω i  are strongly correlated to measured data, an approximate function can be used to describe the weights ω i  depending on the data, e.g. ω i =h(τ i   j ) for a continuous function h(•). 
         [0058]    To illustrate the ideas presented hereinbefore, a simulation study is carried out. A task           is simulated M=M 1 +M 0  times under different conditions, forming a torque matrix T M , with M 1 =M 0 =100. A realistic friction model is used that represents the effects of the wear level w and joint temperature T. 
         [0059]    The two sets of data are generated with the following settings 
         [0000]      τ i   :w= 0, T˜             [ T , T +Δ   T   ], i ∈ C   0    (16a)
 
         [0000]      τ l   :w=w   c   ,T˜             [ T , T +Δ   T   ], l ∈ C   1    (16b)
 
         [0000]    where i ∈ C 0  corresponds to the first M 0  simulations and l ∈ C 1  the remaining ones, w c =35 is a wear level considered critical to generate an alarm. The unit of the wear level w can be considered to be percentage %, where 0% represents a new robot joint, and 100% represents a totally worn out robot joint. Here, the joint temperature T is considered random, with uniform distribution given by  T =30° C. and Δ T =40° C. This assumption is carried out for analyses purposes. 
         [0060]    Worst case estimates, average distance m i   1 −m i   0  closest to zero and largest total variability s i   1 +s i   0 , respectively, are displayed as a function of the joint speed {dot over (φ)} in  FIG. 5   a .  FIG. 5   b  presents the ratio for such worst case estimate, which is considered as the optimal weights according to equation (15). As it can be seen, the optimal weights present a strong correlation with joint speed {dot over (φ)}, which is not a surprise since the effects of wear level w and joint temperature T depend on the joint speed {dot over (φ)} as established before. The optimal region for wear monitoring is concentrated in a narrow speed range. The solid line in  FIG. 5   b  is a function approximation of the optimal weights given by 
         [0000]      ω({dot over (φ)})=sech(β{dot over (φ)})tan  h (α{dot over (φ)})   (17)
 
         [0000]    with α=1.45×10 −2  and β=4.55×10 −2 . Effectively, the optimal weighting function selects a joint speed region that is more relevant for robust wear monitoring. 
         [0061]    The performance improvements achieved using the weighting function can be illustrated by considering the detection of an abrupt change of the wear level w from 0 to w c . Considering a data set generated according to equations (16a) and (16b), a pair (τ m , τ n ) is given, and the objective is to decide whether the pair is from the same class or not, that is, the two hypotheses            0 ,            1  are considered 
         [0000]                  0 :m, n ∈ C 0  or m, n ∈ C 1    (18a)
 
         [0000]                  1 :m ∈ C 0 , n ∈ C 1  or m ∈ C 1 , n ∈ C 0    (18b)
 
         [0062]    In view of the framework presented hereinbefore, this problem is analyzed by computing the distribution of KL({circumflex over (p)} m  ∥ {circumflex over (p)} n ) for each hypothesis. 
         [0063]    The overlap of these distributions gives a probability of false alarm P f , and a probability of fault detection P d  (the problem is a binary hypothesis test). The procedure is repeated for different values of Δ T , with and without the use of the weighting function. For the fixed P f =0.01,  FIG. 6   a  presents the achieved P d  as a function of Δ T . Notice that the use of the weighting function considerably improves the robustness to temperature variations, but for too large Δ T  it becomes difficult to distinguish the effects. 
         [0064]    A similar study can be performed to illustrate how w c  affects the performance. For the fixed Δ T =25° C., data are generated according to equations (16a) and (16b) for different values of w c . Similarly, the hypotheses distributions are computed.  FIG. 6   b  presents P d  as a function of w c  for the fixed P f =0.01. The improvements achieved using the weighted data are obvious. 
         [0065]    The invention is not limited to the embodiments shown above, but the person skilled in the art may modify them in a plurality of ways within the scope of the invention as defined by the claims. Thus, the invention is not limited to detecting faults in robot joints, but may also be applied to any machine parts executing repetitive tasks.