Neural Network-Based Classifier for Collision Classification and Identification for a 3-DOF Industrial Robot

[ad_1]

In this section, the experimental work conducted to design, train, test, and validate the PR-NN is shown in the first subsection. The second subsection shows the results of the processes conducted in the first subsection.

3.1. Experimental Work

As illustrated in [21], a 7-DOF KUKA was configured to act as a 3-DOF robot. A motion was applied on its three active joints to act in the form of sinusoidal motion. The robot used in this experimental work is interactive, so each joint has a torque sensor. After applying motion on the joints, some collisions were applied on the links from different directions (Figure 2). The data collected and recorded from each joint of the robot are the current position θ i ( k ) , the previous position θ i ( k 1 ) , and the angular velocity θ ˙ i ( k ) , and the exerted torque τ ( k ) . While conducting the experiment, the number of samples recorded for each of these data was 70,775 samples. These data were used in our previous work [21] for training an RNN model to estimate torques and determine the torque threshold for each joint. The torque threshold identifies the torque due to collision. When the torque reaches the value of the threshold, it means that a collision has occurred. In this work, the data of the torque were collected from our previous work and classified to train a PR-NN model to classify the collisions. The criteria on which the classification of collision classes occurred are as follows:
  • Class (1): No collisions: this means no collision torques exerted by any joint;

  • Class (2): Collision on Link 1: this means there is collision torque exerted on Joint 1 only;

  • Class (3): Collision on Link 2: this means there are collision torques exerted on Joints 1 and 2;

  • Class (4): Collision on Link 3: this means there are collision torques exerted on Joints 1, 2, and 3.

These samples were distributed into three sets to train, test, and validate the PR-NN model. The distribution is presented in Table 2. The grid search method was applied using MATLAB to fine-tune the parameters. To obtain an effective PR-NN model, the samples were distributed in three sets in which there were no duplicated data among sets.
Based on our previous work [21], the PR-NN proposed in this present work is to be designed to classify collisions according to torque signals received from torque sensors on the robot’s joints. The simplicity of the structure of neural networks (NNs) makes them widely used in the field of robotics control and collision detection and avoidance, e.g., this research [21,23,24,25,26]. Moreover, NNs have the advantage of the ability of generalization and adaptation [27,28,29]. PR-NNs can produce good classification results in different fields like collision detection in robots [14] and the diagnosis of crack faults [30].
Figure 1B shows the structure of a PR-NN, where the structure is illustrated as the following:
Input layer: This involves three inputs. The three inputs are the three torque values exerted by the three joints of the 3-DOF robot (external torque of Joints 1, 2, and 3). These three inputs were obtained from our previous work [21].
The hidden layer: This is a non-linear layer. It is governed by a non-linear function which is the hyperbolic tangent function “tanh”. The best number of hidden neurons in this layer is obtained by a trial and error method. Many trials were carried out. The trials revealed that the best number of hidden neurons is 120 neurons. It is notable that cross-entropy is an indicator of performance. Through probability and error theory, cross-entropy decreases as the likelihood of occurrence of something increases. When cross-entropy decreases, this means that a higher performance of the PR-NN model is achieved. Cross-entropy is a form of loss function that is widely used. It matches the logistic loss applied to the outputs of the NN when using the SoftMax function [31].
The output layer: This is a non-linear layer which has a SoftMax function as the activation function. The SoftMax function is commonly used in artificial NNs when making a multiclass classification. It usually works in the last layer of an NN. The SoftMax function can be defined by the following formula [32]:

s m ( z ) i = e z i j = 1 k e z j

  ,   for   i = 1 , . . , k   and   z = z 1 , , z i R k

For each element “zi” of the input vector “z”, the exponential function is to be applied. In the equation, dividing by the sum of all the exponentials provides normalization for the resulting values. Normalization can guarantee that each element of the output vector sm(z) will not exceed the value of “1”.

After designing the PR-NN model, the next step is to train, test, and validate the model. The MATLAB program was used to execute the processes of this step. The conjugate gradient backpropagation algorithm was used to train the model. This algorithm is a supervised learning algorithm. It has a super-linear convergence rate when dealing with most problems [33]. When comparing this algorithm with a backpropagation algorithm, it can be found that the conjugate gradient backpropagation algorithm is more effective and faster than the backpropagation algorithm [34]. Although the same concepts of the backpropagation algorithm are used for the strategy of general optimization in the conjugate gradient backpropagation algorithm, the last one can effectively define the optimum direction of the search and step size through information arising from the second-order approximation expressed by the following equation:

E w + y E w + E ( w ) T y + 0.5 y T E w y

The global error function is expressed in Equation (1), where it is presented for each point E(w + y) using the Taylor expression. In this equation, w represents the weight vector. E(w) varies depending on the weights and biases connected with the NN. E(w) can also be the standard least square function or it can be any other appropriate error function.

The training occurs using the data mentioned in Table 2. Many experiments were conducted to train the PR-NN model, using many different hidden neurons as shown in Table 3. The table shows the cross-entropy resulting from using different hidden neurons. The lowest cross-entropy (closer value to zero) achieves the highest performance. By the completion of training process, the testing and validation processes occur. The numbers of samples used to test and validate are shown in Table 2. The results are presented in the next section.

3.2. Experimental Results

In this section, the results of the training, testing, and validation of the PR-NN model are presented.

After conducting many trials to train the PR-NN model, the best performance was accomplished through the following parameters:

(1)

The number of hidden neurons, at which the lowest cross-entropy is achieved, is 120;

(2)

The number of iteration/epochs at which the training process ended and the lowest cross-entropy was achieved is 232 epochs;

(3)

The lowest cross-entropy achieved is 0.00026922;

(4)

The time of training is about 19 s. It does not matter what time spent is to complete the training process. The process was accomplished offline. Thus, the prominent issue is to produce a PR-NN model achieving a higher performance.

Figure 3 shows the behavior of the PR-NN model during the training process. It also shows the behavior of the testing and validation processes. The figure reveals that the lowest value of cross-entropy was obtained at 0.00026922 (remarkably close to zero), where the best performance was achieved. Appendix A shows the resulting cross-entropy of other training trials using different numbers of neurons, showing that all of them achieved higher cross-entropy values. Figure 4 presents an error histogram for the PR-NN while in training, testing, and validation. It shows that the values of the error between the predicted values and true targets in all samples are remarkably close to zero. These results reveal that the PR-NN model was trained effectively.
The receiver operating characteristics (ROC) graph has the property of organizing the classifier model and visualizing its performance [35]. The ROC is usually used to measure the relative difference between the true positive rate and the false positive rate [36]. It is memorable that the true positive rate is that rate at which classifier model obtains [positive] for those observations that are truly positive, whereas the false positive rate is that rate at which classifier model obtains [positive] for those observations that are truly negative [14]. Thus, the optimum classification occurs in the case at which the true positive rate is “1” while the false positive rate is “0”. Figure 5 shows the ROC for the proposed PR-NN model, and Figure 6 shows a magnified view for the vertical axis. The figure reveals that the optimum case is achieved in the training process in Figure 5a. The true positive rate is “1” while the false positive rate is around “0”.
As mentioned, the proposed PR-NN model was tested and validated by using data different than those used to train the model. The resulting ROC curve of validation is presented in Figure 5b. It can be clearly seen that the true positive rate is “1” while the false positive rate is around “0”. This shows that the PR-NN model was doing well during the validation process. The resulted ROC curve of testing is presented in Figure 5c. As in training and validation, the true positive rate is “1” while the false positive rate is around “0”. Figure 5d shows the resulting ROC curve for the entire dataset collected (training, testing, and validation data). The resulting ROC curve shows that the true positive rate is “1” while the false positive rate is “0”. This clearly indicates that the true positive rate is “1” while the false positive rate is around “0”.

A confusion matrix can be defined as a collection of predicted information and actual known classification data which is executed in a particular system. Data estimated and obtained for this system are evaluated for the analysis of the performance of the system. While predictive analysis is in progress, a confusion matrix, in the form of a square matrix, is created. The matrix contains positive and negative rates (both true and false).

Individually, the corresponding rates of all these cases are computed [37]. Using positive and negative rates, the accuracy/effectiveness, specificity, sensitivity, precision, negative predictive value, and null error rate are evaluated.
The specific layout of the confusion matrix table allows statistical classification and visualization of the performance of the applied algorithm [38]. The layout of the confusion matrix table is shown in Table 4. Each row in the table represents an instance of predicted values, whereas the column represents the actual values, or vice versa. The confusion matrix contains four major cells/areas. These cells/areas are:
  • True positive (TP) cell: both the actual value and the predicted value are positive;

  • True negative (TN) cell: the actual and predicted values are both negative;

  • False positive (FP) cell: the actual value is negative, but the model predicted value is positive;

  • False negative (FN) cell: the actual value is positive, but the model predicted value is negative.

In Figure 7, the confusion matrix reveals the effectiveness of the proposed PR-NN during the process of training, testing and validation. It is very notable that the MATLAB program rounds the values up, so it calculates and shows some values of effectiveness as 100% when they were not exactly 100% but around 100%. The confusion matrices present four cases:
  • Case (1): No collisions detected on any link;

  • Case (2): Collisions detected on Link 1;

  • Case (3): Collisions detected on Link 2;

  • Case (4): Collisions detected on Link 3.

Figure 7a presents the effectiveness of the proposed PR-NN during the training process. The PR-NN model correctly classified non-collision in 54,695 samples of a total of 54,711 samples. From this, the sensitivity of the model to classify non-collision is 99.97%, which is around 100%. The PR-NN model correctly classified 382 collision samples on Link 1 of a total of 390 samples. From this, the sensitivity of the model to classify collisions on Link 1 is 97.9%. The PR-NN model correctly classified 751 collision samples on Link 2 of a total of 753 samples. From this, the sensitivity of the model to classify collisions on Link 2 is 99.7%. The PR-NN model correctly classified 764 collision samples on Link 3 of a total of 765 samples. From which, the sensitivity of the model to classify collisions on Link 3 is 99.9%. The effectiveness overall of the PR-NN model while training processes is about 100%.
Figure 7b presents the effectiveness of the proposed trained PR-NN during the validation process. As mentioned in Table 2, other data rather than those used to train the model, were used to validate the proposed PR-NN mode. The PR-NN model correctly classified non-collision 6876 samples of a total of 6877 samples. From this, the sensitivity of the model to classify non-collisions is 99.98% which is around 100%. The PR-NN model correctly classified 42 collision samples on Link 1 of a total of 42 samples. From this, the sensitivity of the model to classify collisions on Link 2 is 100%. The PR-NN model correctly classified 72 collision samples on Link 2 of a total of 72 samples. From which, the sensitivity of the model to classify collisions on Link 2 is 100%. The PR-NN model correctly classified 87 collision samples on Link 3 of a total of 87 samples. From this, the sensitivity of the model to classify collisions on Link 3 is 100%. The effectiveness overall while validation is about 100%.
Figure 7c presents the effectiveness of the proposed trained PR-NN during the testing process. Referring to Table 2, amount of data rather than those used to train and validate the model, were used to test the proposed PR-NN mode. The PR-NN model correctly classified non-collision 6852 samples of a total of 6854 samples. From which, the sensitivity of the model to classify non-collisions is 99.97% which is around 100%. The PR-NN model correctly classified 62 collision samples on Link 1 of a total 64 of samples. From this, the sensitivity of the model to classify collisions on Link 1 is 96.9%. The PR-NN model correctly classified 73 collision samples on Link 2 of a total of 73 samples. From this, the sensitivity of the model to classify collisions on Link 2 is 100%. The PR-NN model correctly classified 87 collision samples on Link 3 of a total of 87 samples. From this, the sensitivity of the model to classify collisions on Link 3 is 100%. The effectiveness overall while testing is about 99.9%.
Finally, as shown in Figure 7d, all data collected to train, validate, and test the proposed PR-NN model were used to test the PR-NN model. The PR-NN model correctly classified 68,423 samples of a total of 68,442 samples of non-collision cases. From this, the sensitivity of the model to classify non-collisions is 99.97% which is around 100%. The PR-NN model correctly classified 486 collision samples on Link 1 of a total 4of 96 samples. From this, the sensitivity of the model to classify collisions on Link 1 is 98%. The PR-NN model correctly classified 896 collision samples on Link 2 of a total of 898 samples. From this, the sensitivity of the model to classify collisions on Link 2 is 99.8%. The PR-NN model correctly classified 938 collision samples on Link 3 of a total of 939 samples. From this, the sensitivity of the model to classify collisions on Link 3 is 99.9%. The effectiveness overall while this final stage is 99.95% which is about 100%.
The results of training, testing, and validation indicate and promise that the trained PR-NN model will show a high performance when testing it using different data. This is effectively achieved when different data collected of the robot moving, containing collisions, were classified using the proposed trained PR-NN model. Figure 8 shows how the signals generated by the PR-NN model are based on the torque signals that the model receives. The collected data were fed to the proposed PR-NN model, and the output was observed. The data fed were torque signals received from the robot on which the model had been trained. This robot is a KUKA robot on which an RNN model was trained, in our previous work [21], to predict and estimate the threshold of collision torque on each joint. The signals are transmitted from torque sensors on the three joints. The effectiveness of the proposed PR-NN model will become obvious when observing the behavior of the torque signals and detecting the response of the PR-NN model when the torque signal exceeds the torque threshold. Excess torque via the threshold means that a collision occurs at this torque value. The optimal behavior by the PR-NN model is to generate a signal having a value of “1” when the torque signal excess the torque threshold, i.e., when detecting a collision. Figure 7 shows clearly that in most collision cases, the PR-NN model indicates the collision and produces an output signal, colored by red on the graph, having the value of “1”.

[ad_2]

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More