Six-Axis Force Torque Sensor Model-Based In Situ Calibration Method and Its Impact in Floating-Based Robot Dynamic Performance †

A crucial part of dynamic motions is the interaction with other objects or the environment. Floating base robots have yet to perform these motions repeatably and reliably. Force torque sensors are able to provide the full description of a contact. Despite that, their use beyond a simple threshold logic is not widespread in floating base robots. Force torque sensors might change performance when mounted, which is why in situ calibration methods can improve the performance of robots by ensuring better force torque measurements. The Model-Based in situ calibration method with temperature compensation has shown promising results in improving FT sensor measurements. There are two main goals for this paper. The first is to facilitate the use and understanding of the method by providing guidelines that show their usefulness through experimental results. Then the impact of having better FT measurements with no temperature drift are demonstrated by proving that the offset estimated with this method is still useful days and even a month from the time of estimation. The effect of this is showcased by comparing the sensor response with different offsets simultaneously during real robot experiments. Furthermore, quantitative results of the improvement in dynamic behaviors due to the in situ calibration are shown. Finally, we show how using better FT measurements as feedback in low and high level controllers can impact the performance of floating base robots during dynamic motions. Experiments were performed on the floating base robot iCub.


Introduction
Robots are expected to perform highly dynamical motions. Being able to perform these motions repeatably and reliably is an active research topic. A crucial part of these motions is the interaction of the robot with other objects or the environment. Whenever an interaction happens there exist an exchange of forces. Therefore, knowledge of the forces exchanged at contacts is a fundamental part of endowing robots with the ability to perform dynamical motions. The six-axis force-torque (FT) sensors convey a complete information of a contact force by providing measurements of the three axes of forces and three axes of torques. Robots with their base fixed to the ground have been using FT sensors to measure contact forces since a long time [1][2][3]. Despite being common sensors in many floating base platforms [4][5][6][7][8][9], their potential use in floating base robots has not been full documented. One of the reasons is that the reliability of this sensors may decrease after mounting them [10][11][12][13]. The Model-Based In Situ Calibration Method has shown promising results in the improvement of the The paper is structured as follows: in Section 2, the in situ calibration method is detailed. It also contains a description of the robotic platform and the ways the sensor information is used in such a platform. Section 3 contains the useful tips to better exploit the Model Based in situ calibration method with temperature compensation in a simple way and shows a way to exploit the generic formulation to simultaneously estimate offset and calibration matrix. We also describe two new types of datasets with the aim to discuss how to understand sensor excitation easily. A simple non-intrusive method to exploit the resulting calibration is described. A description of the constant offset hypothesis can be found as well. Section 4 details how the experiments were setup, the datasets used and how the results were validated. In Section 5, the results are used to verify the usefulness of the tips, the constant offset hypothesis and improvements in floating-based robot performance when using the Model-based in situ calibration method with temperature compensation. Conclusions can be found in Section 6.

Background
In this section, the developed in situ calibration method is described in detail. Starting from the general mathematical model of the FT sensor to the problem statement that is solved through the Model-Based in situ calibration method.

Mathematical Model of FT Sensors
There are two physical laws at play in strain gauge force sensors. One is common to all kinds. It is the relationship between the deformation of a spring and forces, it is the Hooke's law of elasticity. ( where f is the force value in N, k is a constant of the material N m −1 and ∆x is the displacement (or strain) in meter. It is valid as long as the material does not reach plastic deformation. Another definition of Hooke's Law is the relationship between engineering stress and engineering strain for elastic deformation [32]. Stress σ (Pa) is expressed in terms of force applied to a certain cross-sectional area A (m 2 ) of an object, For FT sensors A is the cross-section of an internal beam of the FT sensor. Strain is the deformation of a physical body under the action of applied forces. It has no units. Strain is calculated as Using the other definition of Hooke's Law the relationship between stress and strain is: where E is the modulus of elasticity of the material and depends on the kind of stress and strain applied to it. The other principle depends on the type of sensing technology. For semiconductor strain gauges it is the piesoresistive effect. The model is the linear function [15]: where R is the resistance value in Ω, is the strain, S is the gauge factor of the conductor, R o is the resistance with no stress applied in Ω.
Combining both physical effects gives the following transfer function: Therefore the most used model for predicting the force-torque from the raw strain gauges measurements of the sensor is a linear model. The inverse function is: where Considering possible errors during the calibration procedure, linear regression is the most suitable approximation function. Multi-axis force-torque sensors usually contain multiple strain gauges, each of them can be seen as a separate sensor. Because of this, multiple regression is a valid option for this kind of sensor. Therefore, each force axis will be calibrated using the information from all strain gauges, where f i is the force in the i-th axis in N or N m depending on the axis, R m is the digital response of the m-th strain gauge in bit counts, c m is the slope of the linear model of the m-th strain gauge in N/bit and O m is the bias of the m-th strain gauge. The orientation of f i with regards to the m-th strain gauge will change the value of k required. It depends on the strain being normal, shear or a combination of both. As a result, the array of c m coefficients C m and O m will be different for each i-th axis. Taking this in consideration, the approximation function for these sensors for all axes has the following form: where f ∈ R 6 are the 6D forces, C ∈ R 6×m is the calibration matrix in N/bit, r ∈ R m are the raw measurements (sensor's response in bit counts) and o ∈ R 6 is the offset which is also a 6D force vector. Both the calibration matrix C and the offset o are unknown and need to be estimated. This formulation allows to calibrate all axes at the same time although they can be considered independent problems.

The Model-Based In Situ Calibration Method
Calibrating an FT in situ requires a dataset of samples (r i , f i ), i = 1 . . . N obtained from the sensor mounted on the robot. When no contact force is acting on the limb on which the FT sensor is mounted, the expected force-torque applied on the sensor can be computed using the robot model and the instantaneous joints position, velocity and acceleration [33][34][35]. Since reference forces f i are obtained this way, the method is named Model Based In Situ Calibration. The robot parameters are assumed to be known. There are three main components to this method. The first is to formulate the calibration problem decoupling the offset estimation problem from the calibration matrix estimation problem. The second one is to cast the calibration matrix estimation problem as a regularized least square problem, in which the regularization considers the known information of a previous calibration matrix. Lastly, having a way to consider other phenomena that might be creating some drift, the assumption considered is that other phenomena are also linear.

Least Squares Solution
The multiple linear regression problem in Equation (9) can be solved using the least squares technique. The problem is stated as follows: arg min.
where N is the number of data samples in the dataset. The offset is usually estimated separately from the calibration matrix. Because the offset can vary across different experiments due to temperature drift. The offset is removed from the raw measurements separately, and the calibration problem is reduced to: arg min.
wheref i andr i are the reference 6D forces and raw measurements respectively with the offset removed.

Regularization
In ex situ calibration matrix estimation methods, the input data (r i , f i ), i = 1 . . . N are obtained by applying a set of known masses in known locations with the sensor mounted on a workbench. Thus, this kind of ex situ calibration matrix will be referred as Workbench matrix. Assuming the calibration performed on the sensor was correct, the new calibration matrix must be similar to the Workbench matrix. To enforce this assumption, a regularization term to penalize the difference with respect to the Workbench matrix is introduced. The new calibration matrix is obtained through the following optimization problem: (12) where C w ∈ R 6×ρ is the Workbench matrix given by the sensor producer, λ is used to penalize the regularization term and N is the number of data points in the dataset. The regularization is added in order to try to keep the calibration matrix as close to the Workbench matrix, but keeping an improved performance after the sensor is mounted on the robot.
The form of the solution is obtain following these steps: • Consider the Matrix form of the least squares where F ∈ R 6×n is the matrix with the reference 6D forces where each columns isf i , R ∈ R ρ×n where each column isr i . • Given X ∈ R m×n , vec(X) ∈ R nm indicates the column vector attained by stacking the columns of the matrix X. Due to the definition of vec(·), it follows that where ⊗ is the Kronecker product.

•
If we consider that CR = I 6 CR , where I 6 is a 6 by 6 identity matrix, then, using the Kronecker property mentioned in Equation (14), we can put Equation (13) in the column vectorized form: • The minimum of a quadratic form take place when the derivative is equal to 0. Using vector differentiation properties, the solution to Equation (15) can be written as vec(C * ) = (K R K R + λI 6 * 6 ) −1 (K R vec(F ) + λvec(C w )), where K R = (R ⊗ I 6 ). It is important to notice that the size of I multiplying λ should match the length of vec(C w ) which is a * ρ, where a is the number of axis (six-axis for these type of sensors) and ρ is the number of raw signals.

Adding Linear Variables
When considering other phenomena as linear variables the final form of the problem can be expressed as: where C t ∈ R 6×1 are the added linear variables calibration coefficients and t ∈ R n are the added linear variable values. In this case, the problem is not only to estimate the calibration matrix C and the offset o, but also C t which accounts for the temperature changes in the sensor. Given that Cr i + C t t = [ C,C t ][rit ] adding a linear variable can be seen as adding an extra raw signal to the previous described solution. What needs to be done is: • Augment the raw measurements matrix R with the added linear value R a = [R, t], t ∈ R n , in R each column has all the raw measurements of a given raw signal.

•
Augment the Workbench matrix by adding the coefficients regarding the added linear variable C w a = [C w , C t w ], where C t w is the added linear variable value at the time of calibration. If is not available, is recommended to set it as a vector of zeros 0 6×1 .

•
Since C w a ∈ R 6×ρ+1 this should be reflected in L = λ * I 6 * (ρ+1) , if the Workbench coefficients of the added linear variable C t w are not provided, it is suitable to set the last a values in the diagonal(L) to 0. This avoids influencing the coefficients of the added variable with any previous information.

•
The final form of the solution is This formulation allows to easily expand the solution to m number of extra linear variables. The extra linear variable can have its offset removed or not. Assumptions can be made by taking the first value and consider it as the offset of that variable.

Offset Estimation
Two methods are proposed to remove the offset from the estimation problem.

1.
In Situ offset estimation proposed in [10], but instead of accelerometers measurements the force torque reference values estimated with the model of the robot are used.

2.
Centralized offset removal is obtained by removing the mean value from the raw measurements (µ r ) and the reference values (µ f ).
In both cases, we end up with a modified version of the raw data in which the effect of the offset is removed. With a little abuse of notation we have: f i = f i in situ offset estimation f i − µ f centralized offset removal (20) Wherer i andf i are the data used to solve the model-based in situ calibration problem (12). Each offset estimation type is based on a different assumption: 1. physical assumption: mass generates a sphere in the force space when making spherical movements.

2.
mathematical assumption: taking out the mean from the dataset implies no offset in the calibration data.

Calibration Data Set
Two types of datasets that were used previously to calibrate a sensor.
• Grid: moving the legs creating a grid pattern while being on a fixed pole. The contact happens at the waist of the robot. The leg is not bent to avoid changes in the center of mass of the leg during the experiment. • Balancing Support leg: doing an extended one foot balancing demo with widespread leg movements. The contact is on the support leg foot. Either right (BSR) or left (BSL) depending on the support leg.
A calibration dataset could be formed by one of these kinds of dataset or a combination of them.

Previous Results
Previous results showed that the sphere estimation type using the Grid dataset gave the best results when no temperature was taken into account [11]. Adding the temperature required considering more than one dataset to incorporate multiple temperatures. It was proven that adding the temperature led to a further increase in performance. Mixing types of datasets gave better results [14]. The in situ offset estimation type with temperature was shown to be better, followed closely by the centralized offset removal with or without temperature, using the same λ value.
In those tests, no temperature offset was considered. The validation datasets were collected the same day in between the calibration datasets. The results shown were about the external force estimation, but how this affects robot performance was not presented.

Experimental Platform
The experimental platform is the floating base robot iCub. It is a child-sized humanoid robot originally developed during the RobotCub European Project for research in embodied cognition [36] by the iCub Facility at the Italian Institute of Technology.
It has 53 degrees of freedom (DoF), weighs around 33 kg and is 104 cm tall. The DoFs are distributed as in the following way: six for each leg, three for the torso, six for the head and eyes, seven for each arm and nine for each hand. One additional servo motor is used to open and close the eyelids. For the calibration, only a subset of 32 DOFs (legs, torso, arms, and neck) are used. The version of iCub used is known as 2.5. It has Brushless Direct Current electric motor (BLDC) with an Harmonic Drive transmission, making them suitable for joint torque control.
More details on the actuation and mechanics of the iCub 2.5 can be found in [4]. An image of the robot is presented in Figure 1.
The iCub has various sensors including inertial measurement units (IMU), force-torque (FT) sensors, cameras, microphones, joint encoders and tactile sensor arrays, that cover the surface of the robot. Six custom-made six-axis FT sensors [37]) are placed as shown in Figure 1. Only the force-torque sensors mounted on the legs and feet have temperature sensors. These sensors use silicon strain gauge technology. The interface to interact with the iCub is through Yet Another Robot Platform (YARP). More specifically, YARP supports building a robot control system as a collection of programs communicating in a peer-to-peer way, with an extensible family of connection types (tcp, udp, multicast, local, MPI, mjpg-over-http, XML/RPC, tcpros, ...) that can be swapped in and out.

Force-Torque Sensing in the ICub
The force-torque sensing has five main uses in the iCub:

•
To estimate the FT sensors offset before experiments.

•
As a threshold to know if a stable contact has been established between the robot and the ground.

•
To give the feedback to the low-level joint torque controller.

•
To estimate dynamical quantities used by high-level controllers, such as the center of pressure (CoP) and the zero moment point (ZMP).

•
To give feedback to high-level controllers.

To Estimate the FT Sensors Offset before Experiments
A typical sequence before using the robot, involves removing the offset when only one contact with the environment exists. This offset estimation requires the information from the mass vector. This can be imposed in a known robot configuration or measured using an IMU. This offset is then subtracted from the measurements. There are three possibilities to estimate the offset:

•
The robot is hanging from the torso and mass is measured with IMU.

•
The robot is standing on one leg and the mass is measured using IMU.

•
The robot is standing on one leg and the mass is imposed to be acting in the axis normal to the ground.

As a Threshold
The simplest use is as a threshold. When the load on the sensors reaches a chosen value, the controllers change state assuming a stable contact has been achieved. The chosen value can be a percentage of the total body weight of the robot. Example of applications are balancing [38] and standing up [39].

To Calculate Dynamic Quantities
The forces acting on a moving robot can be separated into two categories: forces exerted by contact and forces transmitted without contact (mass and, by extension, inertia forces). The CoP is linked to the former, and the ZMP to the latter. Nonetheless, it has been shown that both points coincide [40]. Therefore, is possible to use the contact force information to calculate dynamic quantities such as the ZMP and by extension affect the estimation of the center of mass (CoM).
The CoP is defined as the point where the resultant force can be exerted with a zero resultant moment. When the contact is with a flat ground the CoP and ZMP, can be calculated as : where P CoP = P ZMP is the CoP (ZMP), s τ is the torque measurement of the FT sensor at the ankle and s f is the vertical force measurement of the FT sensor at the ankle.
Using the linear inverted pendulum model constraining the height of the CoM to be constant (P CoG z ), the CoM dynamics can be estimated from the ZMP with the following equation: The FT sensor measurements have a direct impact on the estimation of the ZMP and as a consequence in estimation of the CoM. This information is used in a walking controller [41].

As Feedback for Joint Torque Controller
The scheme of this controller can be seen in Figure 2. Description of the variables in the scheme can be found in Table 1. It is a PID controller with friction compensation. The feedback values are the estimated joint torques using the measurements from the FT sensor [35].

As Feedback for Jerk Controller
A recent method for exploiting force-torque sensing is to use the estimated contact force as feedback to a high-level jerk controller of floating base systems with contact-stable parametrised force feedback [42].
The momentum rate-of-change equals the summation of all the external wrenches acting on the robot. In a multi-contact scenario, the external wrenches reduce to the contact forces plus the mass force: where H ∈ R 6 is the robot's momentum, A k ∈ R 6×6 is the matrix mapping the k-th contact wrench to the momentum dynamics, I o C k ∈ R 3 is the origin of the frame associated with the k-th contact, and I o CoM ∈ R 3 is the CoM position.
By considering the invertible parametrization f k = φ(ξ k ), it is possible to ensure the friction cone constraints while avoiding to use inequality constraints. The mentioned controller uses the following optimisation problem: subject to: where K d , K p , K i ∈ R 6×6 are symmetric and positive definite matrices, H d is the reference momentum, X is the adjoint transformation matrix from the contact to the base of the robot [43] and u is the control input. The contact forces are calculated using the FT measurement. In this controller, the FT sensor measurements are directly used as feedback since they affect directly the computation of the momentum rate-of-change.

How to Better Exploit the Model Based In Situ Calibration Method
One of the aims of the paper is to provide useful tips to use the calibration method more effectively. The effectiveness of this tips is shown using real robot experiments.

New Offset Estimation
From the resulting generic formulation to add linear variables, described in Section 2.2.3, it is possible to formulate the problem in a way that the offset does not have to be removed from the calibration data before computing the least squares solution. This offset estimation type is named one shot estimation. It estimates the offset as another set of coefficients of the calibration matrix by adding a linear variable in which the reference values are all 1. Contrary to the other two offset estimation types it makes no assumptions and allows the least squares to simultaneously solve the offset with the calibration matrix.

Understanding Sensor Excitation
Based on availability and excitation of the sensor, two more types of datasets were studied.

•
Balancing Non-Support leg: doing an extended one foot balancing demo with widespread leg movements. The contact is on the other leg foot. Either left (BNSL) or right (BNSR) depending on the support leg. • Z-Torque: doing movements designed to generate torques around the z axis, while the robot is on a fixed pole.
After adding this two dataset types the resulting 3D force space and 3D torque space with all types of datasets are depicted in Figure 3. Studying the results of these new types of datasets allows to understand how the calibration results are affected by the excitation of the sensor represented in the 3D force space and 3D torque space.
(a) Data set types in force 3D space (b) Data set types in torque 3D space 1 / 1 Figure 3. Images of the all the dataset types considered for calibration in their respective 3D space.

The Constant Offset Hypothesis
Considering that most of the drift is assumed to be caused by temperature, it follows that by properly compensating the temperature drift, the offset of the sensor itself should be time invariant. This can be proven by using the offset estimated at the time of the calibration and applying it on some other time while the sensor is subjected to different temperatures.

Exploiting Model-Based In Situ Method in a Robot
The result from the Model-based in situ calibration is a new calibration matrix. It is when using this calibration matrix that the improved measurements are obtained. Therefore, the new calibration matrix should be used somehow by the robot to obtain the improved measurements and better dynamic performance as a consequence.

Secondary Calibration Matrix
It is possible that is not easy to change the current calibration matrix of the sensor. In these cases, the proposed solution takes the form of a secondary calibration matrix. The secondary calibration matrix is the required transformation of the current calibration matrix to the new calibration matrix. It requires the knowledge of the current calibration matrix used by the sensor. It is calculated as follows: Before using the values obtained through force-torque sensing, they can be corrected by pre-multiplying with the secondary calibration matrix. This way the measurements used by the robot are the same as if the sensor was calibrated using the in situ calibration matrix.

Adding the Temperature and Offset
The contribution of the temperature can be added separately. In case no temperature calibration is available, these coefficients are loaded as zeros by default. This is helpful in cases where temperature measurements are available for some but not all sensors.
Instead of estimating the offset before the experiment, the offset estimated by the calibration method can be used by summing the offset after the new calibration matrix and temperature compensation is applied.

Methodology
The improvement in the measurements among the different estimation types is compared among the different kinds of possible calibration datasets to select the best way to improve the FT sensor performance. For comparison, results using the Workbench matrix are included as an estimation type in its own. At a first stage, the different dataset types were compared on their own. To further test the robustness of the in situ estimation, a different set of calibration and validation datasets were collected.

Data Sets Used
The validation datasets were taken on two different days, both different from the day the calibration datasets were collected. This was done to test the robustness to possible different ambient conditions. The datasets and their temperatures are showen in Table 2. The calibration datasets were grouped into: • noTz, as indicated by name none of the Z-torque datasets were included. • onlySupportLegs, from the balancing datasets, only the support leg was included. All other dataset types were included. • AllGeneral, all dataset types were included.
The reasoning behind this arrangement of datasets is to see what combination of datasets provides the best results. Since it was proven before that Grid and Balancing together improve the calibration, the variables to test are the inclusion of Z-torque and non-support leg datasets.

Defining Estimation Types
Each strategy of offset estimation is considered an estimation type. Including temperature as a linear variable (wT) or not (nT) in the estimation are also considered different estimation types. If the temperature is considered, it is possible to take the first value as an offset (rTO) or not (dTO). Considering the three offset removal possibilities, adding the temperature as a linear variable to each of them and the temperature offset option results in the following nine estimation types: The logic behind the estimation type names can be seen in Figure 4.

Evaluation Description
The evaluation could be roughly divided in three parts: one to observe the results of each estimation type, another to check the expected improvement on the robot of the generated calibration matrices and a third to verify the impact of using the contributions in a real robot. The sensor to calibrate is located near the hip of the left leg of an iCub robot.

Estimation Type Validation
To understand better the behavior of the estimation types three comparisons are done. The first uses the mean square error (MSE) calculated between the force-torque data using the new calibration matrix and the model-based estimated data. A lower value would indicate a better fitting of the data. Mean Square Error (MSE) of each axis is calculated as follows: where f r i is the 6D force reference vector andf c i is the 6D force vector obtained using the estimated calibration matrix of each estimation type. A second way is to compute the mean of the absolute value of the difference between matrices. This is to get a general idea of how much the calibration matrices differ one from the other. The third way is looking at the offset values. This is to see how the different estimation types affect the estimation of the offset. Although there is no ground truth for the offset to serve as a comparison, similarity in the offset values might indicate a general idea of what the true offset might be.

External/Contact Force Estimation Validation
The selection of the best calibration matrix is done using the contact force validation described in a previous work [11]. It emulates the contact force estimation algorithm in an offline environment. This form of evaluation permits to check the performance of the mean value of magnitude of the force or the value of each axis over a set of validation experiments. This is relevant since there is no guarantee that a λ value or the same type of estimation gives the best results in all axes. The reason is that each axis can be seen as a separate problem.

Impact on Robot Behavior Evaluation
In most cases the dynamic behaviors of iCub are obtained through high-level controllers. They contain many tuning parameters that affect the behavior of the robot. The measurements of the sensor are used mainly in an indirect way by the high-level controllers. Therefore, finding quantitative measures of the improvement in the dynamic motions of the iCub caused by the in situ calibrated sensor is a challenging. Nonetheless, from the uses of the FT sensor on iCub, three quantitative methods were used:

•
Contact force values when switching contact.

•
Accepted gains values used in the low-level controller.

•
Simultaneous online comparison of force torque measurements performance using different offsets.

Contact force values when switching contact
The test performed consist in switching from single support to double support. If the offset is calculated with the robot standing on one foot the sequence is: • Single support → double support → other single support.
Instead if the offset is calculated with the robot in the air the sequence is: • Double support → single support → double support → other single support.
Since the robot is standing on flat ground it is expected that the only force acting on the robot feet is mass on the z axis. With no other force acting on the robot the forces in x and y should cancel each other in double support or be 0 when on single support. With this as a ground truth, is possible to evaluate the estimated contact forces at the feet when switching.

Accepted gains values used in the low-level controller
The robot was tuned to the maximum gain value in which the robot is able to perform the balancing demo in a satisfactory way. Beyond a certain value, the robot is observed to vibrate and fall. For this test, the high level gains of the controller are kept the same and only the low-level controller gains are changed. A higher gain value indicates that the robot is able to rely more on the measurements of the sensor as feedback. Thus, being able to use higher gains is better if it does not introduce unstable behaviors.

Simultaneous online comparison of force torque measurements performance using different offsets
For this experiment the offsets used were estimated with a month difference with respect to the experiment date. The comparison between the expected FT value and the actual value obtained after applying both the offset and the secondary calibration matrix correction. Three different offsets where used: • offset noTemp : is the estimated offset from the best calibration matrix without temperature one month before experiments. • offset temp : is the estimated offset from the best calibration matrix using temperature one month before experiments. • online: is the offset calculated on the online on the robot the day of the experiment when the robot was just turned on. The temperature was 26 • C. It uses the same secondary calibration matrix as the one from offset noTemp .
Three simultaneous estimation applications are launched. One for each type of offset used. The ground truth is calculated offline in the sections of the experiments in which there was only one contact with the environment. Multiple experiments were performed on the robot in the span of three hours to allow the FT sensors to heat up.

Estimation Types Behavior
To verify the behavior of the estimation types only the results from a single calibration dataset is showed. The one selected is the onlySupportLegs dataset. Nonetheless, the results extend to the other two calibration datasets.

MSE Error
The MSE error of each estimation type is shown in Table 3. This value is linked to the calibration dataset in which the calibration matrix was estimated and is affected by the number of calibration points. Although the value can not be compared among datasets, the tendencies are similar. One of them is how the MSE drops by taking temperature into account. For sphere types (SnTdTO, SwTdTO and SwTrTO), removing the temperature offset further reduces the error while for the centralized (CnTdTO, CwTdTO and CwTrTO) and OneShot (OnTdTO, OwTdTO and OwTrTO) types there seems to be no benefit. It can be observed that the fitting from the centralized and OneShot types are identical. For the calibration datasets considered, the Centralized/OneShot types give better results in general. The only exceptions appear in the noTz calibration dataset. In this dataset the sphere types have an slight advantage in three axis: f x , τ x and τ z . Table 3. Mean Square Error on same Calibration dataset.  Table 4, shows a comparison between the different estimation types including the Workbench matrix. In general, the highest values are obtained when comparing with the Workbench matrix. From these, the most different matrices are the ones obtained not considering temperature. Sphere type with no temperature (SnTdTO) is the most different of all with respect to the Workbench matrix.
Is possible to see that the resulting calibration matrix from centralized types is the same as the one obtained through One shot types. The calibration matrix does not change between using the temperature offset (CwTrTO) or not (CwTdTO) for the centralized types. Taking into account the λ values and looking at the difference with respect to the Workbench matrix as shown in Figure 5. The effect of the regularization parameter becomes clear. The higher the value the smaller the difference with respect to the Workbench matrix.
Is worth noticing that taking into account the temperature makes the matrix more similar to the Workbench matrix even for λ = 0. Since the new calibration matrix is expected to be relatively close to the Workbench matrix, this similarity even when no penalization is used can be interpreted as a sign of better calibration. Considering this it can be seen that the sphere estimation types benefits from adding the temperature and even more from taking out the temperature offset. The centralized types benefit from adding the temperature, even if there seems to be no added benefit from considering the temperature offset.

Offset Comparisons
The estimated offsets can be seen in Table 5. It shows that taking into account the temperature offset changes the results of the offset estimation. The estimated offsets without temperatures are not very different between them. Something similar can be seen for the offset obtained considering the temperature offset. In contrast, the offset including temperature, but neglecting the temperature offset, has considerably different behavior between the sphere and the other types.
The estimate offset varies more on the Centralized and Oneshot types. Is noteworthy that the fitting of the data is equal even if the offsets are different as seen from the MSE error in Table 3. The temperature coefficients and the calibration matrix are the same. What changes is the contribution from temperature. It seems that the offset estimation of the Centralized/OneShot types collects both the force-torque offset and the temperature offset into the force-torque offset if no temperature offset is explicitly removed. Therefore using the temperature offset might facilitate to gauge the offset purely in terms of forces with not temperature influence. Table 5. Offsets for a calibration dataset for each estimation type.

Contact Force Validation
This validation was performed twice. One using only the calibration matrices estimating the offset in a few of the samples and the other using also the estimated offsets. The results of the contact force validation are shown in Tables A1 and A2. From the evaluation of the estimation types behavior is clear that the Centralized types and the Oneshot types give the same result. Because of this only the Sphere types and the OneShot were considered.

Using Only Estimated Calibration Matrices
In this case, the offset is calculated taking some samples of the test experiments in which is known the robot is on one foot and not moving or moving slowly. The offset calculation includes not only the forces but also the temperature if coefficients are available.
The best result is achieved by OwTdTO and OwTrTO with 5.498 N with λ = 1000 as the average magnitude of the contact force. In general, better results are achieved by including the temperature and using the OneShot estimation types. The results with the SwTrTO are also close to the best result. The SwTdTO type in noTz dataset has the worst performance. The error is reduced greatly by removing the temperature offset, as seen from the fact that SwTrTO has a consistently lower value than SwTdTO in each dataset. Therefore removing the temperature offset is relevant for the sphere types. The added benefit of the previous calibration matrix information seems more relevant for estimation types that do not consider the temperature. It is also possible to appreciate that increasing λ is beneficial up to a certain point after which it increases the error. This is expected since the Workbench is considered to be correct when the sensor was unmounted, so becoming similar to it has benefits. On the other hand, the mounting changed the effectiveness of it, so being to close has lower performance. This is quite clear in Figure 6. The contact force magnitude of the new calibration matrices is a considerable lower than the Workbench for all the validation datasets.  Table A1.

Using Also Estimated Offsets
When using the estimated offset, the best result is obtained by OwTrTO with λ 100 on the calibration dataset AllGeneral, Table A2. A graphic representation of the results can be seen in Figure 7. The average magnitude of the external force is 5.8647 N which is close to the one obtained estimating the offset on the validation dataset. It hints that the estimated offset can be replace the offset calculated before the experiment.  Table A2.

Analysing Dataset Types
Grouping the results by dataset, the calibration datasets can be ordered from best to worst in the following order: AllGeneral, onlySupportLegs and noTz. The behavior of a group of results by dataset is clear using the pallets of colors in Figures 6 and 7. There is a big improvement when adding the Z-Torque dataset and just a small improvement from adding the Balancing Non-Support Leg on top of that. Showing that the Z-Torque gives relevant new information to the calibration dataset, while the Balancing Non-Support Leg adds few more information. Therefore, for the considered dataset types the optimal combination is composed of Grid, Z-Torque, Balancing Support Leg. The Balancing Non-Support Leg can be considered optional and not strictly required. The fact that the best results not using the estimated offset is without using the Balancing Non-Support Leg dataset reinforces the previous statement. It can be seen that adding the temperature creates a clear difference in the results of a dataset. It almost divides each different calibration set results in two.
These results are congruent with the space each dataset covers in the forces and torques 3D space. In Figure 3, is possible to see that Balancing Non-Support leg is more or less contained between the Grid and Balancing Support Leg. The other three dataset types are clearly different among them. Therefore is possible to use that graphical representation to gauge the expected usefulness of a dataset. Table 6 shows the best results by axis and the performance of the Workbench matrix. From the difference in the results with respect to the Workbench is possible to see that the most affected axis by the mounting are f x and f y . Is possible to see that f z , τ x and τ y , actually perform better using the estimated offset. The fact that only the f y and f z get better results in both cases taking into account the temperature might imply these are the axis mainly affected by the temperature drift. Figures 8 and 9 show the axes that improved the most and the least respectively by the calibration procedure. Although the variation in lambda value is big, looking at Figures 8 and 9 it can be seen that the difference among the best solutions is small.

Observed Improvements in Floating Based Robots
By improving the measurements of the six-axis FT sensor through in situ calibration, it was possible to see improvements in the behavior of the floating base robot iCub.

Contact Force Coherence When Switching Contact
Results are shown in Tables 7 and 8. It can be observed that using the in situ calibrated sensors, reduces the error in the contact forces and is more coherent when switching from a contact to another. This behavior can also be observed in the attached video. The red lines are the estimated values for the external force. There is a smoother transition in the length of the lines during the switching of double support and single support when using the new calibration matrix. Also the contact forces remain close to the expected values during the execution of the demo. This observed by how small the red lines are on the parts of the robot not in contact. Table 7. Offset estimated while hanging using IMU. The balancing demo [38] was observed to have oscillations of the robot when reaching the different pre-defined position tasks. After the six-axis FT measurements were improved, it was feasible to increase the gains of the low-level controller between 10 and 15 units depending on the joint. In some joints, this signified a 50% increase. It was observed that the movements of the robot seemed more defined and there were clearly fewer oscillations and less time required to switch to the next position task. Moreover, it was clear that the same gains without the in situ estimated matrix make the robot fail immediately. Thanks to the reliability of the measurements, the feedback of the low-level controller is more useful to control the robot creating a faster convergence to the desired value. This can be observed in the attached Video S1.

Simultaneous Online Comparison of Force Torque Measurements Performance Using Different Offsets
Based on the resulting coefficients of the temperature, C t = [ f x −0.0933, f y 0.2048, f z 1.3342, τ x −0.0155, τ y 0.0027, τ z 0.0039] , it can be seen that the most affected axis is the force on z.
The comparison for f z axis is shown in Figure 10. The online offset is close to the estimated value only at 26.6 • C. This temperature is similar to the temperature when the offset was estimated. The average temperature at the sensors after a a few mins is around 36.2 • C. At this temperature, the offset estimated without temperature has very similar results as the one with temperature. When the robot reaches 43.5 • C only the offset computed with temperature is still close to the estimated value as it has been for all the temperatures. Therefore, the need to re-estimate the offset before every experiment disappears.

Allow the Use of FT Measurements as High Level Controller Feedback
Besides the quantitative evaluations of performance, an important qualitative behavior was observed when the measurements were used in high level controllers. During the experiments for the jerk control of floating base systems with contact-stable parametrised force feedback, it was observed that without the secondary calibration matrices the error in the estimated external forces was so big that the controller was unable to perform the experiments. Using the secondary calibration matrices reduced the error to ±2.5N [42]) in the worst case. The error was low enough to successfully perform the experiments by using the regularization term.

Comparison with Other Methods
Compared to other in situ calibration methods [10], the Model based in situ calibration method avoids the need to install other sensors or specialized structures on the robot to perform the calibration. This avoids effort and possible human errors introduced in the estimation of the position of the other sensors with respect to the FT sensor.
In the previous Model Based formulation without temperature [11], less amount of data was used to calibrate the sensor. When considering only one type of dataset for calibration, the sphere types outperform the centralized ones. If more than one type of dataset was to be combined, it needed to be collected immediately one after the other for having the assumption of same offset still valid for both datasets. It was observed that even after the sensors were calibrated the offset estimated during calibration not suitable to use on the robot. The reason was that the measurements would drift and the estimated offset would not be valid after a short time. This was resolved by introducing the temperature as linear variable [14]. In the previous paper of model-based in situ calibrations with temperature compensation, results showed that the sphere types still had a certain advantage over centralized types. In those experiments, the amount of data used in calibration had less types of datasets equivalent to the noTz dataset here. By including the new types of datasets better results were obtained. Also, the one shot gave better performance than the sphere type. This shows a correlation between estimation type and types of calibration data used. The experiments described here show that datasets for calibration can be taken in different days in different conditions. This makes the data collection less restrictive despite the need for more data types. In the previous validation dataset, the offset was estimated at the beginning of the datasets. This is similar to the performance of the online estimated offset. This masked the difference in performance of the centralized offset with temperature and without. In here, the benefits of the method are further highlighted by showing the impact in the performance of floating base robots due to better FT measurements and the advantages of using the temperature are extended.

Conclusions
The developed algorithm has been proven to improve the measurements of the sensor and the dynamic behavior of a floating base robot. It successfully accounts for temperature drift and can be extended to account for other lineal phenomena, allowing controllers to reliably use the sensor measurements as feedback, be it directly or indirectly.
The new offset formulation is shown to give identical results as the centralized offset with the added benefit that the offset and calibration matrix are estimated simultaneously. The graphic representation of the sensor excitation in the 3D force and torque space has proven useful to provide intuitive insight into the comprehensive excitation of the sensor. In the Figure 3, it is evident to see that Z-Torque type of dataset provides new information. It is also visible that the Balancing Non-Support Leg gives redundant information. This was confirmed when looking at the results grouping by a calibration dataset. Considering it is possible to generate random movements of the robot and then evaluate if the dataset provides new useful data, this avoids the need to carefully design the joint trajectories for the calibration data. Since the approach is model-based, robot simulations can easily provide this graphic sensor excitation representation. The use of the secondary matrix allows a simple non-intrusive way to provide the improved measurements to the robot. It was shown that by adding the temperature we are able to use the offset of the sensors as a constant. This proves that the drift is mainly generated by the temperature. Furthermore, using offsets that were estimated a month in advance proves the robustness of the estimation of both calibration matrix and offset. It also demonstrates a higher reliability of the sensor measurements. The possibility to use a constant offset eliminates the need to estimate the offset before every experiment. This is especially useful for floating base robots that have a harder time anticipating the exact time of contact. It minimizes the preparation steps for using the robot and allows to do longer experiments without the need to stop. The improvement in robot performance is clear from the contact force coherence when switching or the fact that low and high-level controllers are able to perform better when using the FT measurements after in situ calibration.
The relationship between the regularization parameter and performance is clearly shown. This may allow to further refine and guide the selection of regularization parameters. The comparison with previous results suggests that the relevance and impact of each offset estimation strategy may be linked to the amount of data available. For small amounts of data, the physical assumption gives the highest improvements. With bigger amounts of data having no assumptions to estimate more accurately the calibration. The loss of effectiveness when using the physical assumption could be related to the fact that it does not consider temperature at all for offset estimation.
As future work, ways to account for nonlinearities will be explored. Studying the dynamical response of the sensor is also interesting and might provide further improvements in the performance of the sensor.