A Novel Virtual Torque Sensor for Rescue Robots with Harmonic Drives

In this paper, a method is developed for presenting a novel virtual torque sensor based on precise model and position measurements avoids the need of traditional strain gauges and amplifiers. More specifically, the harmonic drive compliance model and the Gaussian process regression (GPR) technique are used together to achieve virtual torque sensor measurement. While the harmonic drive compliance model provides the analytic part, the Gaussian process regression method is used to reconstruct the unmolded part based on motor-side and link-side joint angles as well as motor current. After an automatic offline calibration, the method allows for a lean online implementation. The virtual torque sensor measurement is compared with measurements of a commercial torque sensor, and the results have attested the effectiveness of the proposed method.


I. INTRODUCTION
Joint torque feedback (JTF) is an effective technique for improving the performance of robot motion control [1]- [3], as well as force and impedance control [4]- [7].To implement JTF control schemes, the measurement of robot joint torque is essential.Measurement of robot joint torque with a multi-axis wrist force/torque (F/T) sensor is often inaccurate due to computation delays and model errors [8].While joint torque measurement can readily be obtained from dedicated joint torque sensors, it is often difficult to mount such sensors as additional space and mechanical modification are required at the joints [12].Furthermore, joint torque sensors are usually strain gauge based and suffer temperature effect and amplifier drifts [13], [14], and [15].To avoid these problems, joint torque sensing based on measuring the torsional deformation of the joint are proposed.This joint torque sensing that placed elasticelement in the output transmission line of joint was proposed in [9] by Tsetserukou et al. and its spin-off in [10].In [11], a linear encoder is used to measure the torsional deformation of the additional elastic body.As measurement accuracy is in inverse proportion to sensor stiffness, low sensor stiffness is desirable in order to achieve high measurement resolution, which leads to complicated joint dynamics.As high-resolution absolute position encoders become commercially available.Mounting absolute position encoders at the link-side and motor-side of robotic joints makes it possible to measure the torsional deformation of the joint more accurate.A viable joint torque estimation method is developed by Zhang [16], [17].The technique of virtual torque sensor uses measurements of both the link-side and motor shaft positions along with a proposed harmonic derive compliance model to realize stiff and sensitive torque estimation, obtaining joint torque with minimal mechanical modifications.Analytic models, such as harmonic derive compliance model, are often hard to model sufficiently due to transport error and coupling characteristic which called uncertain part.So the ignoring of the uncertain part is a possible drawback of harmonic derive compliance model for joint torque estimation.For the estimation of joint torque more accurate, one can use a function approximate to the uncertain part in high-dimensional space using regression methods.A powerful regression method for accurate function approximation in high-dimensional space is Gaussian process regression [22].As an alternative, learning the uncertain part from sampled data and achieving virtual torque sensor measurement using both harmonic derive compliance model and regression techniques poses an interesting problem.This work builds up on the previous work reported in [17], aiming to provide improved virtual torque sensor accuracy.A method of virtual torque sensor is developed based on harmonic drive compliance model and extended Gaussian process regression.The proposed method consists of an analytical model based part and a mapping part.
The analytical model based part adopts the algorithm that has been reported in [17].The mapping part is developed by reconstructing the error model between harmonic drive compliance model and joint actual torque based on Gaussian process regression.The error model can be mapped by Gaussian process regression.Then using given samples measurements of both the link-side and motor shaft positions along with the motor current as input, and using the corresponding output harmonic drive compliance model based joint estimated torque and joint actual torque as targets, respectively.Using sampled data, after an automatic offline calibration, the method can then be used for real-time joint torque estimation.As demonstrated with experimental results, the proposed method provides accurate joint torque estimation in comparison with measurements of a commercial torque sensor.
The rest of this paper is organized as follows.The harmonic drive compliance model used to experimentally validate the theoretical developments of this paper is presented in Section II.After a short review of GPR, in Section III, we describe the proposed approach for mapping of the unmolded part.The mapping part is used to estimate the joint torque, then, the accuracy and computation speed for prediction are tested in Section IV.Experimental results using proposed joint torque estimation method are given and discussed in Section V. Concluding remarks are given in Section VI.

II. HARMONIC DRIVE-BASED JOINT MODEL
The goal of the proposed harmonic drive compliance model here, was not to develop a precise model but to generate an appropriate model that adequately reflect the behavior of joint torque.A harmonic drive consists of three main components as shown in Fig. 1.Typically the wave generator (WG) is connected to the motor shaft, the circular spline (CS) is connected to the joint housing, and the flex spline (FS) is sandwiched in between (CS and WG) and connected to the joint output.The WG consists of an elliptical disk (rigid elliptical inner-race), called wave generator plug, and an outer ball bearing.The wave generator plug is inserted into the bearing, thereby giving the bearing an elliptical shape as well.The FS fits tightly over WG; when the WG plug is rotated, the FS deforms and molds into the shape of the rotating ellipse but does not rotate with WG.The wave generator plug is inserted into the bearing, thereby giving the bearing an elliptical shape as well.The FS fits tightly over WG; when the WG plug is rotated, the FS deforms and molds into the shape of the rotating ellipse but does not rotate with WG.The modeling of harmonic drive kinematic can be seen in [13].θ Δ is the total torsional angle of the harmonic drive, f θ Δ is the torsional angle of the flex spline , w θ Δ is wave generator torsional angle, err θ is the kinematic error.
From [13], A model of the compliance of harmonic drive component was proposed by Zhang et al. (2015) [16].One has: tan( ) where f c and f K are known parameters.
From (1), where w c , N , and w K are known parameters.w τ can be calculated by the motor current, approximately.
The joint-deformation angle θ Δ can be defined as where f θ , w θ denote link-side and motor-side angles, respectively.
Kinematic error err θ can be written as 2) sin( 2) where 0 1 1 , , , , , , , ,  2) -( 4) to estimate joint torque.As mentioned in the literature [15] - [16], the maximum difference between the estimated torque and the torque sensor measurement is 1.8245 N•m, about 36% of the total test torque.The RMS level of the difference is 0.445 N•m, about 10% of the whole test torque.The poor accuracy limit the method widely used.The main difference is generated by un-modeling part.Next, we explore a new method using Gaussian process regression based learning algorithm to map the un-modeling part.The overall structure of the torque estimation method proposed in this paper can be shown as in Fig. 2. The method consists of an analytical modeling part and a mapping part.The analytical modeling part is developed by a harmonic drive compliance model as ( 2) -( 4).The mapping part is developed by reconstructing the un-modeling parting from motor current as well as motor-side and link-side joint angles to the torque estimation error.The new method for virtual torque sensor measurement based on harmonic drives compliance model and Gaussian Process Regression, can be described as Eq. ( 6): tan( ) + ( , , ) where ( , , ) = ( ) f + y x ε (7) where ε is Gaussian noise with zero mean and variance 2 n σ .
As a result, the observed targets can also be described as Eq. ( where ( , ) K X X denotes the covariance matrix.
As covariance function, a Gaussian kernel is frequently used as Eq. ( 9): where 2 s σ denotes the signal variance and W are the widths of the Gaussian kernel.
The joint distribution of the observed target values and predicted value for a query point * x is given by Eq. ( 10): The conditional distribution yields the predicted mean value * ( ) f x with the corresponding variance * ( ) (12) with * * = ( , ), ( , ) = k k X x K K X X and α denotes the so-called prediction vector.The hyper parameters of a Gaussian process with Gaussian kernel are  θ σ σ W and their optimal value for a particular data set can be derived by maximizing the log marginal likelihood using common optimization procedures, e.g., Quasi-Newton methods [22].
The major limitation of Gaussian process is the expensive computation of the inverse matrix given by the kernel used to learn the local Gaussian process models, e.g., Gaussian kernel: where k c denotes the center of the k-th local model and W a diagonal matrix represented the kernel width.
Since the hyper parameters of a Gaussian process model can be achieved by likelihood optimization, it is straightforward to adjust the open parameters for the similarity measure.For example, we can subsample the available training data and, subsequently, perform the standard optimization procedure.It should be noted that during online learning, we have to deal with an endless stream of data (e.g., at a 500-Hz sampling rate we get a new data point every 2 ms and have to treat 30 000 data points/min).If one want cope with the real-time requirements, the maximum number of training examples needs to be limited so that the local models do not end up with the same complexity as a standard GPR regression.The localization procedure is summarized in Fig. 3.
( ) , x y y Fig. 3. Partitioning of training data and model learning.
We train the un-modeling part using sampled data from real joint, e.g., test-joint presented in [16] (335720 training points, 3000 test points), as well as a physically realistic simulation (340940 training points, 3000 test points) [24].Fig. 14 show the errors on learning the un-modeling part using sampled data, where the error is computed as The probability ( ) k p x can be interpreted as a normalized distance of the query point x to the local model k where the measure metric k w is used as given in Eq. ( 13).Thus, each local prediction k y , determined using Equation (11) , is additionally weighted by the distance k w between the corresponding center k c and the query point x.The prediction procedure is summarized in Fig. 5.

B. Accuracy for Prediction
To test the prediction accuracy of the learning model, we use two data sets, (i) The gradually changing torque, getting the data from the torque sensor and torque estimation using harmonic drive compliance model (ii) The frequent changing torque, getting the data from the torque sensor and torque estimation using harmonic drive compliance model.The number of local models was defined as M=20.The data comparison of torque sensor and the joint torque evaluation using harmonic drive compliance model show as in Fig. 6 and Fig. 8. Fig. 7 and Fig. 9 denote the prediction accuracy for the error.From Fig. 7 and Fig. 9, we can see that the accuracy of the prediction for the un-modeling part is about 0.1Nm, approximate 1.25% of the maximum joint torque.

C. Computation Speed for Prediction
Beside the accuracy for prediction, reduction of prediction time (i.e., matrix inversion), is also very important due to the need during control cycle.On our current level, the prediction time can be controlled by the number of local models.The comparison of computation speed for prediction is shown in Fig. 10.Here, we use data sets with increasing training examples (5000, 20000, 80000, 320000, and 640000 data points, respectively).Subsequently, using different number of local models, we compute the average time needed to make a prediction for a point.

A. Joint Torque Estimation
This section provides the experimental results of testing the effectiveness of the proposed joint torque estimation method.Experiments were performed, in which the estimated joint torque was compared with the torque measurement from the commercial F/T sensor.The experimental setup used to conduct the experimental verification is shown in Fig. 11.Four different experiments were performed.In the first experiment, the load torque was changed slowly by controlling the test-joint motion with a sinusoidal reference trajectory.The gradually changing load torque was introduced through moving links and joints driven by the test-joint.The torque estimate and the torque sensor output were recorded as a function of time, as depicted in Fig. 12.The maximum difference between the estimated torque and the torque sensor measurement is 0.28 N•m, approximate 2.75% of the maximum joint torque and the RMS level of the difference is 0.08 N•m, approximate 1.62% of the RMS joint torque.In the second experiment, the results of which are depicted in Fig. 13, the load torque was changed rapidly by manually applying external torque in both directions.The maximum difference between the estimated torque and the torque sensor measurement for the second experiment is 0.35 N•m, approximate 3.18% of the maximum joint torque and the RMS level of the difference is 0.125 N•m, approximate 2.53% of the RMS joint torque.In the fourth experiment, frequent payload changes were applied at the link-side of the test-joint.The test-joint was loaded to the rated torque limit of the harmonic drive (16 N•m).The result of this experiment is shown in Fig. 15, where the maximum difference between the estimated torque and the torque sensor measurement for the experiment is 0.58 N•m, approximate 3.87% of the maximum joint torque and the RMS level of the difference is 0.125 N•m, approximate 2.5% of the RMS joint torque.

B. Motion Control With Joint Torque Feedback
In this section, first, we use proposed joint torque estimation model in Section IV for a JTF -based tracking control task [10].Here, the joint torque estimation model is applied for an online prediction of the feedforward The external torque applied to the test-joint, which can be measured by the F/T sensor or estimated based on the proposed torque estimation method.As desired trajectory, we generate a test trajectory which is similar to the one used for learning the joint torque estimation in Fig. 12 shows the desired trajectory and real trajectory for the testjoint, while the position tracking error of the motion control experiment is shown in Fig. 18.During the first 40 s of this experiment, no JTF was provided, while JTF using estimated torque of the proposed method during the subsequent 40 s.The position error when using JTF from F/T sensor is shown in the last 40 s of the experiment time.
The RMS values of the tracking error are 0.15, 0.055, and 0.035 for the cases when no JTF is used, JTF with the torque estimate, and JTF with the torque sensor, respectively.This results show 63% and 77% improvements when using JTF with the torque estimate and the torque sensor readings, respectively.We have successfully demonstrated our approach on the robotic joint with motor current reader, motor-side encoders and link-side encoders.We showed that our method can be used to dramatically improve the efficiency and accuracy of estimating.We believe that the use will allow this approach to be applicable to other robotic systems as well.Furthermore, the estimated torque can find its applications in robotic control algorithms with JTF, as well as in collision detection/avoidance schemes.In the future, we aim to extend our approach to operating more complex manipulator.

Fig. 2 .
Fig. 2. Block diagram of the proposed torque estimation method.

y
the un-modeling part, , , f w m I θ θ denote the link-side joint angles, motor-side joint angles and motor current.III.UN-MODELING PART LEARNING USING GAUSSIAN PROCESS REGRESSIONFor the estimation of joint torque more accurate, ( , , ) Eq. (6) can be learned by the Gaussian process regression (GPR) techniques.Given samples =[ , , ] as targets, respectively.Using sampled data n { , } x y , we would like to reconstruct a function ( ) f x transforming the input vector x into the target value y given by Eq. (7): our algorithm consists out of two stages: (i) clustering of data, i.e., insertion of new data points into the local models, (ii) learning of corresponding local models.Clustering input data can be performed efficiently using a similarity measure between the input point x and the centers of the respective local models.From a machine learning point of view, the similarity or proximity of data points can be defined in terms of a kernel.Kernel functions represent the dot product between two vectors in the feature space and, hence, naturally incorporate the similarity measure between data points.The clustering step described in this section results from the basic assumption that nearby input points are likely to have similar target values.Thus, training points that belong to the same local region (represented by a center) are informative about the prediction for query points next to this local region.So, to reducing this computational cost, we cluster the training data in local regions and, subsequently, train the corresponding Gaussian process models on these local clusters.Clustering input data is efficiently performed by considering a distance measure of the input point x to the centers of all local models.The distance measure k w is root mean squared error (RMSE).Here, partitioning of the training examples for LGP can be performed either in the same input space (where the model is learned) or in another space which has to be physically consistent with the approximated function.In the following, we localize the data depending on the position and partition of training data is performed in a 6-dim space.On our current hardware, a Core Duo at 2GHz, the training time can be controlled by the number of local models M. A large number of local models may provide a smooth approximation but on the other hand increases the prediction time complexity, which will be discussed in the following Section IV.

Fig. 4 .
Fig. 4. The errors on learning the un-modeling part with different local models IV.UN-MODELING PART PREDICTION USING GAUSSIAN PROCESS REGRESSIONA.Prediction for a Query PointThe prediction for a mean value ŷ is performed using weighted averaging over M local predictions k y for a query point x.The weighted prediction ŷ is then given by

Fig. 10 .
Fig. 10.Average time in millisecond needed for prediction of one query point.

Fig. 11 .
Fig. 11.Experimental setup and schematic diagram of virtual torque sensor.

Fig. 12 .
Fig. 12.Estimated torque versus torque measured by F/T sensor (response to slow changes).

Fig. 13 .
Fig. 13.Estimated torque versus torque measured by F/T sensor (response to fast changes).In the third experiment, a 10-N weight is attached to the link by a wire at a distance of 400 mm from the first joint axis.The test-joint is controlled to keep its position constant and the load was released suddenly by cutting the wire.The results of which are shown in Fig.14.This strategy was driven by the intention of verifying the response of the proposed torque estimation method to sudden payload changes.The maximum difference between the estimated torque and the torque sensor measurement for the second experiment is 0.40 N•m, approximate 3.33% of the maximum joint torque and the RMS level of the difference is 0.055 N•m, approximate 0.63% of the RMS joint torque.

Fig. 14 .
Fig. 14.Estimated torque versus torque measured by F/T sensor (response to sudden payload changes).

Fig. 15 .
Fig. 15.Estimated torque versus torque measured by F/T sensor (response to frequent payload changes).

Fig. 17 .
Fig. 17.Trajectory comparison for motion control.Fig. 18.Motion control experimental results.VI.CONCLUSION In this paper, we have proposed a new method for the virtual torque sensor based on harmonic drive compliance model and local Gaussian process regression.An advantage associated with the method using other joint torque sensing is its accuracy.Using the proposed method for the joint torque estimation instead of an additional elastic component does not change the joint dynamics and simplify the joint mechanism design and build.Moreover, adding a link-side position sensor leads to the potential to improve joint control accuracy and reduce the cost of joint torque sensing.