Introduction

With the development of intelligent manufacturing technology, industrial robots have become an essential part of any modern automated production line. Due to the excellent precision, repeatability, and flexibility capabilities, industrial robots can do multiple complex jobs such as welding, grinding, sorting, and more [1]. With the development of artificial intelligence technology, industrial robots are also evolving towards predictive maintenance, energy optimization, and quality control [2].

Focusing on the predictive maintenance of industrial robots, AI technology improves machine operability and up-time by predicting the probability of an error occurring before it does. There are two fundamental categories for predictive maintenance: system infrastructure and data analysis [3, 4]. The system infrastructure is used to fit the state of robots by physical formulas, which requires solid theoretical background knowledge with less practical. For example, the Kalman predictor and the particle filter were used to predict the process behavior and scheduling control actions on the sensors in Silicon epitaxial deposition [5]. On the contrary, as IoT, machine Learning, and Big Data technologies develop, we have access to more and more data about the operation of industrial robots. For example, the predictive model was proposed to detect the robot accuracy error based on electricity data analysis [6]. Therefore, we can systematically analyze and process those data to formulate maintenance strategies by building and training predictive models.

However, setting up real-time maintenance plans for those traditional methods has several challenges. First and foremost, due to the enclosed nature of industrial robots, it is challenging to access their running data directly [7]. Specifically, because of the manufacturer’s protection of the equipment, it is difficult to get direct access to the operational status feedback data of the industrial robot joint. Meanwhile, it is tough to install the robot joint torque sensors to obtain the joint torque data and conduct the force test because of the non-open nature of the equipment. Moreover, some predictive models use historical data for predictive analysis, which comes from manual collection and labeling [8]. These manual data will also affect the decrease in predictive performance.

To address these challenges, without external force sensors and operational status feedback data, adopting a convenient and effective method with direct access to the industrial robot’s running data to evaluate the motion state of existing industrial robotic devices in real scenarios will be very meaningful. Nevertheless, it is hard to obtain the velocity, acceleration, and joint torque data of the robot joint directly and use that as control parameters to control industrial robots in real scenarios [9]. Therefore, we need to find an equivalent method to realize the monitoring and prediction of the existing industrial robot’s motion state in real scenarios without considering the robot’s manufacturer, model, and interface.

Owning to the motion state of the joint directly affects the performance of the industrial robot [10], we will explore the industrial robot joint motion state prediction based on the current data of the robot joint in this paper. At present, there are two main research directions; one is the collision detection and fault prediction of robots by core parameters such as motor current [11, 12]; the other is to use deep learning to analyze the key parameters of the robot and develop a robot fault or health state prediction model, to realize the high precision prediction of the positioning error. For example, the running-state feature-recognition model based on LSTM was established to recognize the future running states of industrial robots [8]. In addition, many advanced optimization methods have been proposed for the robot, such as optimal Iterative Learning [13,14,15] and Golden Jackal Optimization [16]. These methods enable the design of robot motion trajectories by controlling the voltage and current of the motors. In contrast, we explore the correlation between current and motion states and optimize the deep learning network in this paper, which is used to reduce the training overhead.

Based on the velocity and force driven by the current of motors, we propose a novel Bayesian optimization framework to predict the joint motion state of industrial robots in this paper. To sum up, our contributions are threefold as follows:

  1. (1)

    We propose a current-based prediction paradigm for robot motion states. We explore the relationship between the load torque of the joint and the three-phase stator currents and establish the equivalent model between the three-phase stator currents and the robot joint motion state. Based on the above principle, we implement an equivalent current-based characterization for robot motion states. To the best of our knowledge, this is the first attempt at industrial robot motion state prediction that has relied only on joint motor current data.

  2. (2)

    Challenged by the enclosed nature of industrial robots, we develop a joint current acquisition platform for industrial robots based on Hall current sensors, which realizes contact-less joint current acquisition and experimental dataset generation according to the positive correlation between stator current and load torque. Since the considered application scenario is very general, the acquisition platform is suitable for motor current acquisition for most robots.

  3. (3)

    We design a novel framework to predict the joint motion state of industrial robots based on LSTM/BiLSTM and Bayesian optimization. The LSTM/BiLSTM modules are used to extract the features of the current data of joints. The Bayesian module is used to adjust the hyperparameters of the LSTM/BiLSTM module, which can effectively improve the efficiency of network training. Experiment results demonstrate our framework can better converge the training process with higher accuracy than classical models such as RNN, LSTM, and BiLSTM.

Related works

The motor current of the joint, as one of the essential parameters of industrial robots, has been widely used by many scholars in recent years in research on the evaluation of the working state of robots. Kai Xu et al. [17] proposed a detection procedure for bolt loosening of industrial robot joints based on motor current signature analysis. Aivaliotis et al. [18] proposed a method to limit the force of the manipulator by detecting collision with its surroundings without using external sensors. They compared the predicted nominal current with the actual motor current, which the robot controller continuously measured. In addition, it has achieved better performance in six-degree-of-freedom industrial robots. Bonci et al. [19] proposed a predictable detection method for Cartesian Robots fault, which introduced a proper fault index to detect the functionality state of transmission by monitoring the motor current. This method extended the range of steady states by overcoming the limits of frequency-domain analysis, and it can help Cartesian Robots autonomously understand faults under safe working conditions. Wahrburg et al. [20] proposed a Kalman filtering to parameterize a disturbance observer to estimate the force and torque of Cartesian Robots. This method relies only on the current, angle, and speed signals, which do not require additional sensors. Park et al. [21] designed SVM and CNN detection methods that require only motor current measurements at the joint actuators together with a robot dynamics model to estimate the external joint torques caused by collisions. However, the above works used simple learning methods to conduct analyses such as industrial robotic arms collision and fault detection based on motor currents and auxiliary external sensors. A question worth investigating is how to correlate motor currents with the motion states of industrial robots for modeling and predictive analysis with less external sensor assistance or even relying on currents alone.

Data-driven [22,23,24] refers to solving problems or making decisions using large amounts of data, while deep learning is one of a data-driven approach. Deep learning [25, 26] extracts more valuable features from big data by building a deep network with multiple hidden layers. Therefore, deep learning has rich application scenarios in industrial robots. For example, Kato et al. [27] visualized the servo information of an industrial robot and then used a convolutional neural network to predict the localization error with high accuracy. Li and Fei introduced an extended short-term memory network optimized deep fusion neural network to enhance the research on predictive modeling of mining robot maintenance [28]. Zhao et al. [29] used LSTMs to monitor machine health for the first time. Xiao et al. [30] introduced a health assessment and state prediction method combined with the hidden Markov model and LSTM, which can achieve real-time assessment and remaining functional life prediction for robot mechanical joints. Xiao et al. [31] also proposed a metric learning method to learn the similarity measurement method of the industrial robot monitoring data. However, the above works only used physical data, such as position, torque, acceleration, and speed, to train their networks. At the same time, it could lead to bias in prediction performance.

Although the above-related works have effectively contributed to the research on monitoring the working conditions of industrial robots, there are challenges in running data acquisition and robot motion state prediction, etc. Determining the relationship between the robot’s motion state and running data is also challenging. We should explore a paradigm from robot measurable data to operational state prediction that can inform the predictive maintenance of robots. We must also realize the online acquisition of quantifiable data to obtain this paradigm. Inspired by the three-phase PMSM idealized assumption [32,33,34], we will establish a device for contact-less industrial robot motor current acquisition, thus constructing a complete framework from joint motor current acquisition to robot motion state prediction.

In this paper, we use the robot’s joint motor current data and the deep learning neural network model to research the prediction of the robot’s joint motion states. To realize non-contact robot joint motion state prediction, we design a device for real-time acquisition of joint motor currents. We use the non-contact Hall current sensors to capture the current, which overcomes the difficulty of the parameters of industrial robots not being open to the public. We utilize the device to construct the current datasets under different joint motion states. Finally, we compare the prediction effects of the proposed Bayesian optimization prediction framework with the hand-tuned RNN [35], LSTM [36], and BiLSTM models [37].

Joint motion state prediction network for industrial robots

Current-based prediction principle for robot joint motion

The joint system is the key component in the motion control of industrial robots. The drive system of each robot joint consists of a servo system, a gearbox, and a load [38]. Motors and servo drives form the servo system. The servo drives use the vector control method to achieve closed-loop control. The motors are the power elements of the joints. There are three main types of joint systems: pneumatic, hydraulic, and motor-drive. The type of joint studied in this paper is permanent magnet synchronous motor-driven (PMSM). PMSM is characterized by a high degree of control, maintenance-free, structural stability, high efficiency, and high output density [39, 40]. According to the different mounting positions of permanent magnets on the iron crystal core, PMSMs can be classified into three types: spoke, embedded, and surface-mounted [41]. Most of the industrial robot servo systems use surface-mounted permanent magnet synchronous motor-driven (SPMSM), which have a uniform air gap magnetic field and approximately the same inductance coefficients in the AC and DC axes  [42, 43]. SPMSM has a simple manufacturing process and can be controlled with high precision.

Based on the three-phase PMSM idealized assumption [32,33,34], we investigate the relationship between the three-phase rotor current and the joint load torque of an industrial robot. Given a three-phase permanent magnet synchronous motor with three-phase input currents \(\left\{ i_a, i_b, i_c \right\} \), the current \(i_d\) and the current \(i_q\) are obtained after the Claker inversion as Eq. (1):

$$ \begin{aligned} \left( \begin{matrix}i_d \\ i_q\end{matrix} \right) =\begin{pmatrix} \cos \theta _r \& \cos (\theta _r-\frac{2\pi }{3} ) \& \cos (\theta _r-\frac{4\pi }{3} )\\ -\sin \theta _r \& \sin (\theta _r-\frac{2\pi }{3} ) \& \sin (\theta _r-\frac{4\pi }{3} ) \end{pmatrix}\left( \begin{matrix}i_a \\ i_b \\ i_c\end{matrix}\right) \nonumber \\ \end{aligned}$$
(1)

where \(\theta _r\) is the rotor pole axis position, \(i_q\) is the current component perpendicular to the rotor magnetic field, and \(i_d\) is the current component parallel to the rotor magnetic field.

The electromagnetic torque \(T_e\) and load torque \(T_L\) of a three-phase PMSM motor are defined as shown in Eqs. (2) and (3). The \(L_d\) and \(L_q\) in Eq. (2) are the d and q axial components of the stator inductance, and \(n_p\) is the number of pole pairs of the motor. The \(\Psi _f\) in Eq. (2) is the magnetic chain of permanent magnets. The \(\omega \) in Eq. (3) is the angular velocity of the rotor current, and the \(\omega _m\) is the mechanical angular velocity of the rotor. The B in Eq. (3) is the coefficient of friction, and the J is the rotational inertia:

$$\begin{aligned} T_e=\frac{3}{2} n_p\left[ \Psi _f i_q+\left( L_d-L_q \right) i_d i_q \right] \end{aligned}$$
(2)
$$\begin{aligned} T_L=T_e-\frac{J}{n_p} \frac{\textrm{d} \omega }{\textrm{d} t} -B\omega _m \end{aligned}$$
(3)

As known from Eq. (2), the electromagnetic torque \(T_e\) is proportional to the currents \(i_d\), \(i_q\). From Eq. (3), the load torque \(T_L\) is proportional to the electromagnetic torque \(T_e\). Therefore, the Assumption 1 is formulated in this paper.

Assumption 1

The load torque \(T_e\) is positively related to the three-phase stator currents \(\left\{ i_a, i_b, i_c \right\} \).

The Assumption 1 means that the robotic arm moves at a constant speed, and the load on the arm increases due to mechanical aging, external forces, and other factors. In order to maintain a steady speed, the arm requires a higher triple stator current input, which increases the electromagnetic torque of the arm. According to the Assumption 1, we propose a current-based Assumption 2 for robot joint motion prediction.

Assumption 2

The state of robot joint motion positively correlates with three-phase stator currents \(\left\{ i_a, i_b, i_c \right\} \).

The Assumption 2 means that we can predict robot joint motion by monitoring the robot’s three-phase stator currents \(\left\{ i_a, i_b, i_c \right\} \) of the robot.

Joint motion prediction framework for robots

Fig. 1
figure 1

The framework to predict the motion state of the robot joints, which can dynamically select deep learning models such as RNN, LSTM or BiLSTM

The Assumptions 1 and 2 establish that we can use stator currents as the core parameters to predict the motion state of the robot joints. Therefore, we propose a BiLSTM-based joint motion prediction network for robots in this section. We first propose a novel framework to predict the motion state of the robot joints, which applies to current prevalent time-series prediction models. We also introduce the RNN, LSTM, and BiLSTM models into the framework. The framework is described as Fig. 1. The raw data of the motor currents of the four robot joints are processed by median-average filtering [44] and fed into the proposed framework’s input layer. The input layer’s dimension is four, representing four columns of current data. The hidden layers are the RNN/LSTM/BiLSTM layers and the fully connected layers, which process the time-series data of four joint currents. The number of the RNN/LSTM/BiLSTM layers can be adjusted according to the current experimental results. The output layer indicates the prediction value of robot joints. For example, the output is the predicted value of the current at the next moment in the joint motor current regression prediction model. The output is the classification of the joint motion state in the joint motion state prediction model. In other words, the proposed framework can be applied to prediction and classification applications. We define the prediction framework as Eq. (4):

$$\begin{aligned} y=Linear(Dropout(PReLU(Layer(f(x)))) \end{aligned}$$
(4)

where the x denotes the input joint motor current data, and the f is the median man filtering. The Layer represents the selected neural networks RNN, LSTM, or BiLSTM. The PReLU is the activation function; PReLU avoids the case where the gradient is 0 [45]. The Dropout layer reduces model overfitting by not relying too much on local features. The Linear is the full connected layer, and y is the output prediction result.

The regression prediction model and the classification prediction model have different loss functions. The regression model uses the MSE loss function [46] (Eq. (5)), which is used to calculate the error between the predicted value and the actual value. The classification model uses the cross-entropy loss function [47] (Eq. (6)), which is used to measure the difference between the predicted label and the true label:

$$\begin{aligned} MSELoss(x_i,y_i)=(x_i-y_i)^{2} \end{aligned}$$
(5)

where the \(x_i\) is the actual value, and the \(y_i\) is prediction value.

$$\begin{aligned} CrossEntropyLoss(p,q)=-\sum _{i=1}^{n}p(x_i)\log _{}{q(x_i)} \end{aligned}$$
(6)

where the \(p(x_i)\) is the true probability distribution of random variable x, and the \(q(x_i)\) is the approximate probability distribution of random variable x.

Bayesian optimization for joint motion prediction

Deep learning models must adjust numerous hyperparameters to achieve convergence in the training process. The manual adjusting of hyperparameters in traditional training has many accidental factors, making it challenging to consider all the relevant influencing factors and historical performance. In addition, it is often difficult to get the optimal hyperparameter after spending a lot of time. To address this problem, we use the Bayesian optimization [48, 49] to minimize the size of hyperparameter for the proposed robot joint motion prediction framework, which can adaptively select RNN, LSTM, and BiLSTM model as the hidden layer. The optimized models are denoted as BO-RNN, BO-LSTM, and BO-BiLSTM.

Inspired by Refs. [49, 50], the Bayesian optimization for the joint motion prediction model is defined as Eq. (7).

$$\begin{aligned} z^*={\text {arg min}} f(z), z\in Z \end{aligned}$$
(7)

where f(z) is objective function of Bayesian optimization, z is a set of hyperparameters in the domain, and Z is the decision space. The output of Eq. (7), denoted as \(z^*\), is the set of hyperparameters in Z space that leads to an optimal solution of the objective function f(z).

The processing of Bayesian optimization for our prediction model is defined in Fig. 2. We process the collected joint motor data first. We divide the prepossessed data into a training set and a validation set. Then, we use the Bayesian optimization method to adjust and optimize the hyperparameters in the model training. We will stop the training and optimizing process when the maximum number of iterations is reached. We feed the validation set into the prediction network with Bayesian optimization. Finally, we will complete the regression prediction of joint motor currents and classification prediction of joint motion states for four-axis industrial robots.

Given a specific example, when regression prediction of the current of joint motor “\(\#4\)” under our self-constructed joint motion state S1 dataset, the spatial extent of the hyperparameter domain using the Bayesian optimization method is shown in Table 1.

Fig. 2
figure 2

The flow chart of Bayesian optimization for joint motion prediction

Experiments

In this section, we first designed a contact-less current acquisition device to capture the robot joint motor current based on the proposed paradigm. Then, we obtained the experimental dataset for the prediction framework using the robot joint motor current acquisition device. Furthermore, to validate and test the supposition more effectively, we defined six states of operation of a four-axis robot to characterize the velocity of each robot joint under different external forces. Next, we conduct the joint motor current regression prediction and comparison experiments under different operation states based on the collected motor current data. Finally, We discuss the performance of the proposed prediction framework compared with existing deep learning methods.

Contactless current acquisition device for industrial robot joint motor

We first design a current acquisition device for industrial robot joints based on our proposed current-based prediction paradigm for robot joint motion. The Hall current sensors have the advantages of non-contact measurement, high accuracy, wide band, and good linearity [51, 52]. The device uses the non-contact Hall sensor to capture the robot’s joint current. There are two types of Hall current sensors: open loop and closed loop. In order to select the proper sensor for our experiment, we compared four commonly used Hall current sensors as Table 2. The closed-loop Hall current sensor adopts the zero-flux principle, which provides better response time, bandwidth range, accuracy, and linearity performance. From the consideration of frequency range and accuracy, we adopt the ZQM10ZYX22T24 sensor as the core device for the current acquisition.

Table 1 The hyperparameter domain of Bayesian optimization
Table 2 Comparison of commonly used Hall current sensors

The current acquisition device is described as Fig. 3. We program the robot body to design the planned motion trajectory by the demonstrator. The Hall current sensor is installed at the location of the motor power line, which will transmit the captured analog signals of the 4-joint motor currents to the programmable logic controller (PLC). We use the PLC to process and convert the captured analog signals to digital signals. Finally, we store the digital current signals in the computer.

Fig. 3
figure 3

The current acquisition device for industrial robot joint motor

Experiment settings

Fig. 4
figure 4

Demonstration of current filtering using anti-pulse interference average

Testing environments. To ensure that the paradigm and framework can be effectively reproduced and validated, we describe the test environment in more detail:

  1. (1)

    The SCARA four-axis robot was employed as the testing platform, which has three revolute and one prismatic DOF.

  2. (2)

    The length of our self-constructed dataset was 10,000, the sample frequency of which was 20 Hz. At the same time, the dataset was divided into 8000 entries for training and 2000 for testing.

  3. (3)

    We train and validate the proposed framework with PyTorch 1.8.1 and NVidia P1000 GPU.

Dataset. In this paper, we evaluate our method on the self-constructed dataset captured from our contact-less current acquisition device of industrial robot joint motor. We collect the current data of the four joint motors under different motion states, changing by the speed of the joint’s motion and the external force of the robot joints. We apply some reaction forces of motion on the \(\#2\) and \(\#4\) joints to simulate different states of the robot arm motion. Three obstruction cases are set up for the robot joints during low-speed motion. We describe the three cases as follows:

  1. (1)

    No reaction force.

  2. (2)

    The reaction force on the \(\#2\) joint of robot.

  3. (3)

    The reaction force on the \(\#4\) joint of robot.

where the preceding number indicates the robot’s state under different reaction forces, the self-constructed dataset of different joint motion states is described as Table 3. The “S1”–“S6” in Table 3 represent the joint motor current data sets under six states. The “V = 3%” and “V = 6%” indicate that the actual joint motion speeds are 3% and 6% of the maximum joint motion speed.

Table 3 The self-constructed dataset of different joint motion states

Data filtering. Electromagnetic interference sources such as IGBTs, DC/DC modules, and associated cables are built into the electrical cabinet. As a result, the Hall current sensors installed in the cabinet are subject to electromagnetic interference. We should filter the collected joint current data appropriately. Inspired by Ref. [53], we use the anti-pulse interference average filtering method to process our dataset, combining median and arithmetic mean filtering. This filtering method is defined as follows:

$$\begin{aligned} Y=\frac{ {\textstyle \sum _{i=1}^{N}}x_i-x_{min}-x_{max} }{N-2} \end{aligned}$$
(8)

where Y is the average value after excluding the max and min values in the sample, and N is the number of sampling, generally set in the range of \(3-14\). \(X_i\) represents the i-th sampling value, \(x_{min}\) is the min value after the N sampling, and \(x_{max}\) is the max value after the N sampling, respectively. Figure 4a, b shows the comparison before and after motor current filtering for the \(\#2\) and \(\#4\) joints. In the comparison, we set the sampling times as \(N=4\), \(N=8\) and \(N=12\). The comparison results show that as the value of N increases, the joint motor current data’s filtering effect improves. Therefore, we select the filtering data as our experimental data when \(N=12\).

Evaluation metrics. We evaluate the performance of motor current regression prediction by the following metrics: “RMSE”, “MAE” and “\(R^2\)”. Noted that the lower values of “RMSE” and “MAE” indicate better prediction performance. On the other hand, the “\(R^2\)” is used to denote the degree of model fitting, which measure the interpretability of the regression model. The closer the “\(R^2\)” value is to 1, the better the prediction of the model. In addition, the “accuracy” is used to evaluate the performance of robot joint motion state classification prediction. We also calculate the “Incorrect prediction rate” of industrial robots at different motion speeds, which is used to illustrate the performance of the proposed framework for prediction in various states.

Baseline. We evaluate our proposed joint motion prediction framework with RNN [35], LSTM [36], and BiLSTM models [37]. In comparison, the models after Bayesian optimization are denoted as BO-RNN, BO-LSTM and BO-BiLSTM, respectively.

Joint motor current regression prediction analysis

Under the joint motion state “S1”, we first conduct the experiments with the joint \(\#4\) motor current as the prediction target. The hyperparameter combination of the proposed BO-RNN, BO-LSTM, and BO-BiLSTM models by Bayesian optimization is shown in Table 4. As can be seen from Table 4, the number of iterations of the BO-LSTM and Bo-BiLSTM networks are reduced to 21 and 31 with respect to the traditional LSTM and BiLSTM networks, respectively. In addition, the reductions are \(47.50\%\) and \(22.5\%\), respectively. The results mean that our proposed framework can effectively reduce the number of training times. In other words, our framework reduces the overall training overhead.

Table 4 Hyperparameter combination of the current prediction for the joint \(\#4\) motor by Bayesian optimization in “S1” state

We first validate that the Bayesian-optimized neural network model has more vital learning and accurate prediction abilities. After manual parameter tuning with the Bayesian optimization-based method, we compare the RNN, LSTM, and BiLSTM classical network models. The prediction comparison on the joint \(\#4\) motor current is shown in Fig. 5. Figure 5a is the comparison with six models. We also compare LSTM and BO-LSTM separately, as shown in Fig. 5b. From Fig. 5, the overall trend of the predicted values of the six prediction models compared with the actual values is consistent. However, the Bayesian-optimized BO-RNN, BO-LSTM, and BO-BiLSTM regression prediction models provide better predictions at the peaks and troughs of the motor current curves with smaller deviations. The prediction curves generated by our BO-RNN, BO-LSTM, and BO-BiLSTM models are better fitted to the actual value curves.

Fig. 5
figure 5

The current prediction comparison between our framework with the classical network models on the joint \(\#4\) motor

In order to further evaluate the performance of the Bayesian-optimized prediction models, the performance of the six prediction models is compared using RMSE, MAE, and \(R^2\) as the evaluation metrics, as shown in Table 5. As seen from Table 5, the Bayesian-optimized models’ prediction performance is further improved compared to the hand-tuned models on the joint \(\#4\) motor current. The BO-LSTM model has the best prediction performance with the smallest RMSE and MAE, while the RMSE of BO-LSTM is 0.0022 lower than BO-RNN’s. In addition, the MAE of BO-LSTM is 0.0565 lower than that of BO-RNN. It indicates that the error between the actual and predicted values by BO-LSTM is the smallest. In addition, BO-LSTM has the largest \(R^2\) value, which is an improvement of 0.004 over BO-RNN. This conclusion indicates that BO-LSTM is the best fit. The same conclusion also appears between BO-LSTM and BO-BiLSTM, which suggests that BO-LSTM has the best prediction performance.

Table 5 The performance comparison between our Bayesian-optimized prediction models with the classic models on the joint \(\#4\)

To further verify the prediction effect of our Bayesian-optimized framework on the time-series data of the joint motor currents, we also conduct the following experiments with the joints \(\#1-3\). We first calculate the prediction evaluation metrics before and after Bayesian-based optimization on deep models such as RNN, LSTM, and BiLSTM. A comparison of the motor currents prediction performance of joint \(\#1-3\) with six regression prediction deep models is shown in Table 6.

Table 6 The performance comparison between our Bayesian-optimized prediction models with the classic models on the joints \(\#\)1–3

As can be seen from Table 6, the BO-RNN, BO-LSTM, and BO-BiLSTM models have better prediction performance than the hand-tuned parameterized CNN and other models for regression prediction of motor currents form joints \(\#1-3\). Among them, BO-LSTM performs best on joint \(\#2\) with the smallest RMSE and MAE values. Relatively, BO-LSTM has the largest \(R^2\) value. Similarly, BO-BiLSTM achieves the best performance on joints \(\#1\) and \(\#3\). In the above analysis, our proposed framework with Bayesian optimization is further improved regarding regression prediction performance.

Joint motion state prediction analysis with different velocities

In this section, we discuss the performance of joint motion prediction under different velocities. There are three states with different velocities: no external force, external force on the joint \(\#1\), and external force on the joint \(\#2\). In addition, there are also two types of velocities: \(V=3\%\) and \(V=6\%\).

We compare the prediction accuracy with different external forces, and the results are shown in Table 7. The motion states in Table 7 have been defined in Table 3. The comparison results verify that the Bayesian optimization-based framework best predicts motion state. In order to better evaluate the performance of our framework and verify the recognition ability of the Bayesian optimized for different motion states of the joints, we conduct comparative testing of motion state prediction. We compare the number of incorrectly predicted samples between LSTM and BO-LSTM under S1, S2, and S3 joint motion states. The comparison is shown in Table 8. From Table 8, our BO-LSTM model has a significantly lower number of wrong predicted samples, which can more accurately discriminate the motion state of the joints and has a strong prediction performance.

Table 7 Comparison of joint motion state prediction accuracy with different external forces (\(\%\))
Table 8 Comparison the number of incorrectly predicted samples between LSTM and BO-LSTM under S1, S2 and S3 joint motion states

To further validate the novelty of the proposed framework, we give the confusion matrices of joint motion state S1 and S4 prediction corresponding to the six prediction models, as shown in Fig. 6. The results also show that our Bayesian-optimized deep framework performs better than the traditional deep models.

Fig. 6
figure 6

The confusion matrices of joint motion state S1 and S4 prediction corresponding to the six prediction models

This paper further explores the prediction performance of the model at different speeds and under different joint forces. Based on the Bayesian optimization method, the hyperparameter combinations of the prediction network models are obtained with \(V=3\%\) and \(V=6\%\) two motion speeds, as shown in Table 9. We can see that the optimal learning rate, the number of hidden layers, and the optimizer corresponding to the models change significantly with the speed changes. For example, when the speed is \(V=3\%\), the hidden layer of Bo-BiLTSM is reduced from 256 to 107, and the epoch is reduced from 40 to 25. The results demonstrate that our optimization framework can significantly reduce the training overhead.

Table 9 The hyperparameter combinations of the prediction network models with \(V=3\%\) and \(V=6\%\)
Table 10 Comparison of joint motion state prediction accuracy with different speeds (\(\%\))
Fig. 7
figure 7

The confusion matrices of joint motion states \(\left\{ S4,S5,S6 \right\} \) prediction corresponding to the traditional depth prediction models and our Bayesian optimization models

We will also further discuss the variation in the prediction ability of the model under different hyperparameter combinations. From Table 3, depending on the various speeds, we divide the joint motion states into two categories, \(\left\{ S1, S2, S3 \right\} \) and \(\left\{ S4, S5, S6 \right\} \). We first compare the motion state prediction accuracy between the traditional prediction models and the Bayesian optimization-based prediction models at different speeds, which is described in Table 10. From the comparison results, it can be seen that our proposed Bayesian optimization framework has a significant improvement in motion state prediction accuracy relative to the traditional depth prediction models. Our BO-LSTM model also achieves the highest prediction accuracy relative to other Bayesian optimization models. The average prediction accuracy of BO-LSTM is improved by \(5.42\%\) relative to BO-RNN. It is also enhanced by \(0.09\%\) over BO-BiLSTM. We also generate the confusion matrices of joint motion states \(\left\{ S4, S5, S6 \right\} \) prediction corresponding to the traditional depth prediction models and our Bayesian optimization models, as shown in Fig. 7. All the experimental results demonstrate that our proposed Bayesian optimization framework further improves the accuracy of robot motion state prediction through hyperparameter selection. At the same time, based on the Bayesian optimization framework, we also verify that the proposed BO-LSTM can better predict the robot motion state.

Conclusions

In this paper, we proposed a novel Bayesian optimization prediction framework for the four-axis industrial robot joint motion state. We first formulated two assumptions, which are used to demonstrate that it is possible to analyze the joint current data to obtain the motion state of the robot. Then, the proposed framework used the RNN, LSTM, and BiLSTM to extract the features of the industrial robots. To further optimize the training process of the framework, we used Bayesian optimization to minimize the size of the hyperparameter. We also designed a current acquisition device to get the current data of the robot joint motor, which used the non-contact Hall sensor. We used the device to construct a dataset for the four-axis industrial robot. We evaluated the proposed framework on the self-construct dataset. The experiment results show that the proposed framework is applicable to predict the joint motion state under various conditions.