Short-Transient Discrete Time-Variant Filter Dedicated for Correction of the Dynamic Response of Force/Torque Sensors

: The perception of touch opens new perspectives for so-called ’intelligent robotics’. Force/torque sensors are currently a key component of autonomous assembly processes or of the dynamically developing sector of collaborative robots. Response time is a critical parameter of force control, which has a direct effect on impact forces when the robot initiates contact with the environment. This paper indicates parameters of one of commercial force/torque sensors by JR3, in particular, its pre-deﬁned low-pass ﬁlters. Their stationary nature introduces i.e. signiﬁcant delay in the time domain, resulting in a negative impact on the overall dynamics of force control. To remedy the problem, our proposed approach is to employ a novel discrete time-variant ﬁlter with appropriately modulated parameters, owing to which it is possible to suppress the amplitude of the transient response and, at the same time, to increase the pulsation of damped oscillations; this results in the improvement of the dynamic properties in terms of reducing the duration of transients. Differences between a commercial, stationary ﬁlter and the recommended discrete time-variant ﬁlter have been shown experimentally, using a dedicated test environment.


Introduction
Flexible assembly automation using industrial manipulators still represents a small percentage of the entire spectrum of robotic applications [1]. One of the main reasons is the robot's poor ability to adapt to non-deterministic environments [2]. Therefore, intelligent industrial robotic systems are attracting more and more attention [3]. An important component of such solutions is the sensor-layer, which, similarly to human senses, allows the robot to interact with its environment [4]. This paper deals with the problem of force/torque interaction between the industrial robot and its environment, in particular, in its most critical phase, i.e. establishing contact with rigid bodies. It is one of the fundamental problems of force/torque control [5], reducing the quality of automatic assembly processes and decreasing dynamic response of cooperative robots [6].
Using current measurement to estimate the forces acting on the robot's joints is a standard technique used for years [7]. Until recently, this technique was used as protection against collision only, however, it currently finds a much more widespread use. Precise current measurements opened the way to force interactions with the environment, and these, in turn, to the so-called collaborative robotics. Estimation of forces acting at the gripper, determined on the basis of current fluctuations (changes of torques in the configuration space), is not trivial and requires basing on a precise dynamic model [8]. Measurement of forces and torques directly in the Cartesian space, using dedicated 3D force/torque sensors, is an interesting alternative. Regardless of the measurement method used, a significant problem arises, related to the high stiffness of the kinematic chain [9]. Namely, during the robot interaction with a stiff environment, hazardous phenomena, i.e. impulse forces occur, negatively impacting the arm mechanics [10]. One solution is to introduce RCC (Remote Center Compliance) installed directly on the robot [11]. However, the most attractive approach is to avoid manipulating the structure of the robot. Methods of improvement of dynamic properties of force sensors may be helpful in this case, especially in the critical phase of establishing the contact with the environment [12]. This paper describes commercially available filters, used in one of the most commonly known force sensors JR3 [13]. Attention was paid to significant delays in the time domain, a natural property of classical filtration methods, and to their negative impact on the force control dynamics in robotics [14].
An important reference for this paper is the work published in [15]. Commercial filters used for JR3 sensors were analyzed and an alternative method of continuous time-variant filtration, which significantly improves dynamic properties of the sensor in terms of reducing the duration of transients, was proposed. However, the use of continuous time-variant filters leads to a significant limitation in terms of their practical use. This article presents a novel discrete time-variant filter, opening the way to its implementation. An additional chapter on optimizing the time-varying dynamic parameters of the proposed filter has allowed to significantly improve the duration of transients. Based on JR3 sensor experimental environment, the verification testbench has been prepared. Additionally, appropriately selected hardware has enabled the impulse and step responses of the filter under study to be determined and compared.

Properties of Commercial Filters Implemented in JR3 Force/Torque Sensors
Let's look in the datasheet of JR3 force/torque sensor [13]. The decoupled data is passed through cascaded low-pass filters. Each succeeding filter is calculated 1/4 as often, and has a cutoff frequency of 1/4 of the preceding filter. The cutoff frequency of a filter is 1/16 of the sample rate for that filter. For a typical sensor with a sample rate of 8 kHz, the cutoff frequency of the first filter would be 500 Hz. The following filters would cutoff at 125 Hz, 31.25 Hz, 7.81 Hz, etc. It is worth asking at this point what kind of time delay introduce the above filters. The delay is approximately equal to: Delay ∼ = Cuto f f Frequency −1 . Therefore the delays would be respectively: 500 Hz −1 ∼ = 2 ms, 125 Hz −1 ∼ = 8 ms, 31.25 Hz −1 ∼ = 32 ms, and so on. But, how critical is the delay in the force control loop? It probably doesn't take much imagination to understand that every millisecond of delay generates high impulse forces in a collision between two rigid bodies. These impulse forces propagate through the robot's structure, negatively influencing its components (joints, gears, etc.) and life expectancy. A reduction in duration of transients in the filters applied would allow to decrease the strength of the impulse-like forces. In addition, it would allow the speed of the robot in autonomous assembly processes to be safely increased, which would translate into obvious expansion of productivity.
The method of filtering is not clearly presented in the technical documentation created and published by JR3. The type of the applied filter is not disclosed in the published note of the considered sensor. Nevertheless, the presented frequency responses (Figure 1, technical note [13]) allow to determine the type of the applied filter. The ripples presented in the filter stopband and the frequency response steepness in the passband suggest that the JR3 used the type II Chebyshev filter or elliptic filter. After some additional tests and investigations we came to the conclusion that the producer used traditional sixth-order elliptic filters. The necessary theory regarding elliptic filter can be found in [16,17]. One of the identified filter is the elliptic filter with 3 dB cutoff frequency ω c1 = 125 Hz, passband peak-to-peak ripple R p = 0.02 dB, and minimum stopband attenuation R s = 80 dB. The transfer function of the considered elliptic filter can be presented in the following form: H 125Hz (s) = 10×10 −5 s 6 −3.535×10 −16 s 5 +4.576×10 3 s 4 −1.732×10 −8 s 3 +3.225×10 10 s 2 −0.05999s+5.771×10 16 s 6 +1576s 5 +1.975×10 6 s 4 +1.524×10 9 s 3 +8.563×10 11 s 2 +3.07×10 14 s+5.784×10 16 (1) The frequency response of the filter described by (1) is presented in Figure 1. The frequency response depicted in Figure 1 is the same as the frequency characteristic published by JR3 in the technical note [13]. Besides the frequency responses of the considered elliptic filter, Figure 1 presents also its step response and impulse response. It is not difficult to find that the considered elliptic filter is very selective in the transition band. On the other hand, the presented step and impulse response clearly indicate that the transient response of the considered filter is very long. Taking into account the step response of the filter we can observe that the 2% settling time achieves about 28.1 ms and the overshoot reaches 17.94%.

Discrete Time-Varying Filter With Reduced Transient Response
The main problem of the filter applied by JR3 is its long lasting transient response. This problem can be solved by introducing time-varying parameter to the structure of the considered elliptic filter. Such a kind of procedure has been used in some previous works [18][19][20][21]. For example, in [18], a non-stationary filter has been used to suppress the oscillatory response of load cells used. Time-varying filters have been also used in [19] to decrease the transient response of analog phase-compensated lowpass elliptic filters.
Generally, the time-domain properties of continuous-time elliptic filters can be described by two parameters: undamped natural frequency ω n and damping ratio ζ. The general form of the transfer function of continuous-time lowpass elliptic filter can be presented as follows: where ω ni and ζ i are respectively the undamped natural frequency and the damping ratio of the i-th second-order filter section. Coefficients h 0 and k i are positive constants. Parameter h 0 is calculated in order to obtain unity gain |H(jω)| max = 1. In case of the sixth-order elliptic filters with 3 dB cutoff frequencies ω c1 = 125 Hz, ω c2 = 500 Hz, passband peak-to-peak ripple R p = 0.02 dB, and minimum stopband attenuation R s = 80 dB. Dynamical parameters of the two identified sixth-order elliptic filters are presented in Table 1. Taking into account previous works on filters with reduced transient response [18][19][20][21], it was assumed that both the undamped natural frequency and the damping ratio are temporarily varied in time in order to improve time domain response of the elliptic filters considered in this work. Taking into account that time-varying systems cannot be described in the frequency domain we have to move to the time domain. The considered elliptic filter with time-varying dynamic parameters can be presented as a system of second order differential equations with time-varying coefficients: In this mathematical model x(t) and y(t) are respectively the input and output signal of the considered filter. In turn, ω ni (t) and ζ i (t) (i = 1, ..., 3) are respectively the functions of undamped natural frequency and damping ratio, and h 0 (t) is a function of the gain of the filter.
In this paper we investigate the discrete time-varying filtering structure and its capability to reduce the transient state response of the considered sensor. First, let us recall the classical analog representation of the oscillatory system: Using the bilinear transformation in the following form: where t s is the sampling time. We can define the discrete representation of the given structure as follows: After refactoring of the coefficients we can define the digital representation of the oscillatory system in terms of the ω n , ζ and k parameters in the following form: Hd(z) = (k 2 ω n 2 t s 2 + 4)z 2 + (2k 2 ω n 2 t s 2 − 8)z + k 2 ω n 2 t s 2 + 4 (ω n 2 t s 2 + ζω n t s 4 + 4)z 2 + (2ω n 2 t s 2 − 8)z + ω n 2 t s 2 − ζω n t s 4 + 4 The concept of the time-varying coefficients assumes that the parameters of the given structure are being changed in the predefined time frame. Of course one cannot use the transfer function representation for the time-varying systems.
The time-varying IIR filter structure can be presented by the following difference equation: where a i (w) and b i (w) are the time-varying coefficients, y(w) is the output, x(w) is the input, n and m are the numbers of coefficients, i is the auxiliary index, and w is the discrete-time index. One can find more details about discrete time-varying filters along with the discussions about stability of such designs in the following literature [22,23].

Experimental Setup
The JR3 torque/force sensors clearly contributed to the development of commercial robotic systems that interact with the environment. More and more key manufacturers offer an easy way to expand the robot with the sense of touch. Examples include FANUC company, offering 5 force sensors operating in the ranges from 15 to 250 kg [24]. Regardless of the manufacturer, the mechanical design of the sensor is identical and based on a monolithic, aluminium body [25]. A tensometric bridge is laid out on the surface, enclosed inside the sensor structure with an analogue electronic circuit. The sensor often also includes the digital signal processing part, but this is not a rule set in stone. Figure 2 presents the structure of the experimental setup. It uses a JR3 85M35A-140-D 200N12 sensor with analogue outputs and a PC card, installed on QNX computer. The JR3 sensor was attached to a massive steel block in order to ensure high mechanical stiffness.
A big challenge was to develop a methodology for generating a step and impulse forces to ensure that the time responses of the sensor are correctly determined. In an ideal case, the step and the impulse generation should not exceed a single sample time of the sensor. It is known that sample frequency of JR3 sensor is 8 kHz, providing a time window of only 125 µs. Piezoactuators are ideal elements generating step-like forces. An actuator made by PI P-010.10 with the following parameters was used in the experiment: max. stroke: 15 µs, blocking force: 1.8 kN, own mass: 12 g, mechanical stiffness 120 N/µm, capacitance 65 nF. The aforementioned parameters enable generation of force profiles with ultra-low rise times. In this configuration, the actuator can be considered as a force-driven mass-spring system coupled to the mass-spring-damper system (approx. mass: 57 g [26]). The key components, additionally reducing the rise time, included a fast switching MOSFET (IRFBG30 with a low R on -resistance) and a capacitor array charged with a high-voltage amplifier. Figure 3 (on the left) depicts a sharp voltage rise, stabilising after 15 µs. The settling of the actuator voltage indicates the settling of the actuator extension and hence the applied force [27]. The recorded actuator step time of 15 µs is many times shorter than the minimum sample time of the force/torque sensor, offering correct execution of the experiment.  A CO 2 gun with steel-tip projectiles causing very little plastic deformation, was used to determine the force impulses. The low mass of the projectiles (0.6 g) results in a very short contact duration. Despite all measures used, a special experiment was prepared in order to determine the impulse duration. A laser barrier based on the BPW43 photodiode was used, triggered by the projectile just before impacting and released when rebounding. Figure 3 (on the right) allows the traversal time to be read, with a value of ca. 100 µs. Since the optical sensor was located a few cms before the JR3 sensor, the true contact duration is much shorter. Even if we assume that the traversal time is 100 µs, the result is still below the sample time of the JR3 sensor.

Experimental Results
Experimental methods presented in the previous section allowed us to perform practical Hardware-In-The-Loop tests. Based on the QNX real-time operating system, a proprietary driver was developed for the I/O card supplied with the JR3 sensor. In this way it was possible to parameterize the sensor and access its analog outputs. We proposed two main test stages, i.e. the impulse response (CO 2 revolver shot) and step response (piezo actuator) with further three test cases: no filtration and filters with cutoff frequency ω c2 = 500 Hz and ω c1 = 125 Hz. Figure 4 presents impulse and step response of the mentioned sensor in Z-direction without a hardware filter. As one can observe there is some noticable time lag, which can be explained by the obvious inertia exhibited by mechanical components of the sensor, and by that a limited bandwidth. The time delays that one can find in the technical note [13] have been also marked on the following images. Figure 5 presents the impulse and step responses with the 500 Hz cutoff frequency hardware filter and Figure 6 the corresponding characteristics for the 125 Hz case.   In this paper we investigated the possibility of designing the 500 Hz and 125 Hz filters (first and second in the cascade of hardware filters) as digital time-varying structures. As presented in the previous paragraphs, those filters were approximated as a digital 6th order filter in terms of 3 second order sections of the digitalized classical analog oscillatory system. By such approach we obtained a filtering system with parameters that can be subjected to operation of varying them in time to improve the transient time of the structure.
As a first step we proposed to set the behaviour of how the particular parameters change in time to our best knowledge and experience with the time-varying systems. Figure 7 presents the comparison of the impulse and step responses of the time invariant and time-varying systems for the 500 Hz case and Figure 8 for the 125 Hz case.  As one can notice, the step response of the time-varying system achieved better performance in terms of the transient time parameters than its classical counterpart for both the 500 Hz and 125 Hz cases. Table 2 highlights some of the most important parameters of the two given structures and cutoff frequency test cases. In this table one can find RiseTime which is the time it takes for the response to rise from 10% to 90% of the steady-state response, SettlingTime which stands for the time it takes for the error to fall to within 2% of steady-state response, SettlingMin as the minimum value once the response has risen, SettlingMax as the maximum value once the response has risen, Overshoot which is the percentage overshoot and the PeakTime which is the time at which the peak value occurs. Similarly to the step response, one can notice the improvement in the impulse response in favor of time-varying system. Table 3 presents the summary in terms of most important parameters of the impulse response characteristic. In this table one can find Min which stands for minimum value of the response, Max for the maximum value of the response, MinTime is the time at which the minimum value is reached and MaxTime is the time at which the maximum value is reached. As one can notice the time-varying filtering structure proved to be superior in both the step and impulse response considering the transient state. The chosen parameters along with the horizon on parameter change were modeled according to the known relationship between the duration of the transient response and the filter dynamical parameters values. Some examples one can find in [15]. However, the next section proposes a simple iterative optimization algorithm to further improve the time-varying structure and tailor it to the particular needs. All data used in the simulation and experiment, as well as filter models, are included in the Supplementary Materials.

Optimization Routine
To set the right coefficients in the Equation (8), one should start with determining the horizon in which the parameters will vary. In our previous research we found that the horizon value should be considered between the settling time calculated as a 2% border around steady state of the given time invariant systems output signal and 1.5 times that value.
In order to reduce the settling time of the system, we have designed the optimization routine that proposes the sets of coefficienst fullfilling this task. In this paper we assumed that all parameters (k, ω 0 , ζ) of each filter stage can vary in time. As stated earlier the parameters settle down on the values according to the time-invariant design after reaching the defined horizon to preserve the frequency demands of the filtering structure.
The proposed optimization routine assumes two stages. On the first stage the parameters change linearly through a given horizon. The starting value of the linear change is picked randomly in a predefined set and the objective is to reduce the settling time of the time-varying system. As mentioned before, the settling time is calculated as the time needed for the signal to maintain in the 2% boundary around steady state. Additionally, one can choose the number of steps in this stage. Figure 9 presents the first stage of the optimization routine. After the first stage of the optimization routine is finished, the second stage begins. We assumed that the settling time achieved by the linear change of the parameters can be further improved. In our previous research we found that introducing small non linear changes of the parameters often further reduces the settling time of the whole time-varying structure. We introduced the Bézier like curves as the base of such nonlinearity. The freedom they offer in shaping the dynamics of parameter sets proved to be very useful in our case. The mentioned curves are calculated according to the following equation: where n is the degree of polynomial, P(i) is the control point, i is the auxiliary index, and t ∈ [0, 1]. The first control point is the one calculated in the first optimization stage. The last point is given by the final value of the time-invariant design. In this paper we run the random placement of the one middle control point. In this stage one can also choose the number of steps. The aim is the same as before, which is the reduction of the settling time of the system. Figure 10 presents the second stage of the optimization routine. As one can notice, introducing the Bézier curves results in non-linear change of the coefficients in the chosen horizon. In most test cases it allowed additional 10% improvement of the settling time in comparison to first stage optimization alone. As an example, Table 4 shows a parameter comparison using the optimization routine.

Conclusions
Time-variant filters are an interesting alternative to conventional filtration methods. This paper presents a discrete form of a non-stationary filter with modulated parameters based on Bèzier curves. Experimental tests showed a significant improvement of low-pass filter properties in the transition phase, compared to a commercial filter used in a force/torque sensor by JR3. Discretization of the time-variant filter paves a way to its practical implementation.
One should not forget, however, about the most important property of time-variant filters, i.e., that they improve only the transition phase and after this phase, such filters behave as a conventional filter (a prototype they are installed in). Additionally, correct identification of the starting point of filter parameter modulation is important. Thus, they are ideal to solve the fundamental problem of establishing contact between the robot and its rigid environment. This particular event of switching a hybrid position/force control system is determining for effectiveness of force control. Non-stationary filters enable a significant dynamics improvement in autonomous assembly processes, resulting in a significantly shorter cycle time. Additionally, the robot reaction time to collisions with environment may be improved in cooperative robotics, enabling motion speed to be increased without impairment of safety conditions.