1 Introduction

General robots are typically highly rigid owing to the high reduction ratio gear trains of joints. Therefore, most robots are required to have high-speed and precise position control capabilities. This has rendered them to be the preferred equipment in industrial applications over the past decades. However, such robotic systems are unsafe for human operation and are incapable of effective physical interaction with other systems [1]. Consequently, conventional systems are unsuitable for collaborative robotic tasks requiring daily human interaction. However, the general feedback control method using force sensors cannot be employed as a solution since it cannot cope with unprecedented situations, such as sudden impacts and collisions [2]. Therefore, the robot itself should be designed as a flexible system by adding compliant elements, particularly at the joints, and controlled in a feedforward fashion, preparing it to interact as a system with proper intrinsic stiffness. Furthermore, the compliance and stiffness of the system must be adjustable within a certain range to fit different applications. One of the reasons for using VSAs is to embed intrinsic compliant properties in a robot system. Therefore, the feedforward modulation method can provide variable intrinsic stiffnesses to the robot via its VSAs. Hence, the robot can properly react to sudden unexpected interactions. Moreover, it provides a wider bandwidth than feedback control methods since it does not rely on sensors and actuator responses, while a force sensor, in particular, is not required.

Various VSAs have been studied as smart joint mechanisms to realize compliant robot systems [3]. A typical design scheme for controlling the position and stiffness of a joint involves using multiple actuators and spring mechanisms in serial or parallel link manipulators [4]. Other design methods employ independent actuators to control the position and stiffness of the joints independently [5]. The variable stiffness mechanism used in this study, Mechanically Overdamped Actuator with Adjustable Stiffness—MOD-AwAS -, adopts the latter design technique [6], using two motors to control joint motion and stiffness. The joint stiffness can be regulated via a lever mechanism. However, intrinsically this mechanism involves nonlinear torque–angle characteristics with hysteresis, as in most mechanical actuators, including VSAs. When an elastic component or a VSA is installed on a robot joint, the restoring torque model is needed for effective joint torque estimation and control due to an externally applied force. Previous studies have examined the nonlinear torsion model with hysteresis for the harmonic drives which are used in robot systems as conventional gear modules [7,8,9]. The hysteresis model of an elastomer series elastic actuator was proposed in a previous study for humanoid robot applications [10]. Stiffness estimation methods using state observers, such as decoupled impedance observers [11], residual-based estimators, and parameter observers [12], have been investigated with regard to VSAs.

Real-time joint stiffness and deformation data provide the applied torque information of the joint, which is later used to estimate the applied external force on the operational space. A self-sensing VSA method was recently adopted for a human–robot interaction control of a one DOF robot [13]. On the other hand, a conventional multi-DOF manipulator without VSAs, by [14] investigated an external force estimation method using task-oriented dynamics model learning and state observer. This observer-based approach has been applied to dual-arm robot manipulators [15].

This paper proposes a restoring torque model of a VSA based on the shape of a hysteresis loop. Unlike previous studies that utilized hysteresis-based methods with displacement derivatives, the proposed method only uses the deformation measurement instead of its unstable derivative quantities. The difficulty in accurately obtaining the correct velocity and higher derivative values of joint deformation makes it challenging to compare the results with the proposed method. Moreover, the proposed method is examined on serial and parallel planar robots. An algorithm was formulated to estimate the external force applied at the end-effector using the joint torque measurements. Regarding a multi-DOF spring mechanism, the output stiffness in the operational space and the effect of the mechanical structure should be considered comprehensively [16]. The proposed method examines the stiffness model in the operational space and its relation to the stiffness of each joint. The coupling term of the operational stiffness can be controlled by setting the joint stiffness appropriately, particularly in parallel robot systems which have a redundant actuation. Linear programming was implemented during the investigation of suitable joint stiffness values. Furthermore, the proposed method was demonstrated via experiments involving two DOF serial and parallel planar robot systems, where their corresponding results were compared and analyzed.

The main contribution of this paper involves the following:

  • A hysteresis loop model-based estimation of an externally applied torque on VSA joints was performed using displacement quantities and not their derivatives (velocities and accelerations), which are challenging to measure accurately in real-time.

  • An external force in the operational space of the two DOF mechanisms was estimated by using the proposed restoring torque model of the VSA and the kinematic model of the mechanisms.

  • A feedforward modulation algorithm of the intrinsic operational stiffness for two DOF parallel mechanism with VSAs was proposed. A linear programming method was used to tune the joint stiffness values.

This paper is organized as follows: Section 1 provides a broad background and related works. Section 2 elaborates on the VSA and its internal kinematics. Section 3 describes the VSA restoring torque model for the real-time estimation of the applied torque. Section 4 explains the developed experimental systems of the two DOF serial and parallel planar robots and the proposed feedforward modulation algorithm of operational stiffness. Lastly, Section 5 provides the experimental results and comparisons, while Section 6 presents the conclusions.

2 The VSA design

2.1 The VSA

The VSA developed during previous research [17, 18] was adopted as an actuator for the robot joint in this paper. It exploits a lever mechanism to transmit the reaction force of a torsion spring to an output axis, while this force is adjusted by changing the pivot position of the lever link, which in turn modifies the output stiffness. As shown by the conceptual diagram in Fig. 1a, the pivot is located near the axis of rotation, indicating that little external force is required to lift the load (representing the output link in the actual robot), illustrating low joint stiffness. However, when the pivot is positioned far from the axis of rotation for high stiffness usage, a substantial external force is required. Consequently, the joint stiffness is controlled by moving the pivot position since it is determined by the ratio of the distance from the pivot to the rotation axis and the distance from the pivot to the loading point of the spring. The concept was embodied by installing the lever mechanism, including the coil spring and pivot, between the output link and output axis of the servo motor for motion control, as shown in Fig. 1b. It consists of three main components, namely the base part, the output link, and the variable stiffness mechanism attached to the output section. A hardened aluminum material was used for the lever link. Furthermore, to minimize friction between the lever link and the pivot, a radial bearing was attached at the pivot axes. The design detail and the parts included in the VSA are displayed in Fig. 2a. Figure 2b and c shows the motion of the torsion spring when an external force was applied to the output link. By installing the lever joint with the torsion spring on the output link, both distances from pivot to main joint and from pivot to lever joint change simultaneously. This provides a compact design able to facilitate significant stiffness value variation with minimal pivot displacement [19].

Fig. 1
figure 1

The MOD-AwAS variable stiffness joint [6]. a Stiffness change with the lever mechanism, b Developed experimental joint system

Fig. 2
figure 2

The structure of the variable stiffness joint [18]. a Parts of the variable stiffness joint, b Spring deformation during joint rotation, c Pivot joint and lever

The base part was installed at the main motor axis to generate the joint motion. A Dynamixel XH540-W150 servo motor manufactured by ROBOTIS Co. Ltd, headquartered in Seoul, Republic of Korea, was employed as the primary motor, while a Dynamixel AX-12A servo motor was used for controlling the pivot position. The rack gear placed on the top of the base plate was constrained by the rack cover, manufactured from a low-friction engineering plastic called Ultra High Molecular Weight (UHMW) Polyethylene. This gear moves linearly by the small servo motor attached beneath the base plate. Since the pivot joint of the lever mechanism was fixed to the rack gear, the output stiffness could be altered according to the pivot position.

The torsion spring placed in the lever mechanism is from Lee Spring®, a company based in the US, NY, Brooklyn, and it has a diameter of 18 [mm], a maximum torque capacity of 978.8 [N-mm] and a maximum deflection of 43 [degrees] [20]. The outside surface of both legs and the circular body of the torsion spring was constrained by a U-shaped stopper, while the end section of each leg was simultaneously restrained by the end portions of the lever link. Since the pivot axis moves inside the groove of the lever link, a bearing was installed at the pivot axis to reduce friction. Although the lever joint moved outward from the centerline of the base plate when an external force was applied to the output link, the pivot is located on the centerline, consequently, it turns the lever link and deforms the spring. The leg on the rotational side of the torsion spring is then pushed inwards by the lever link. However, the opposite leg was fixed by the inner wall of the U-shaped stopper. Hence, the magnitude of the restoring force of the spring transmitted to the output link changes with the position of the pivot shaft, which slides along the groove at the bottom of the lever.

2.2 The internal KINEMATICS of the VSA

The lever mechanism of the VSA forms a one DOF four-bar linkage, as shown in Fig. 3. It consists of four joints, i.e., the main joint, the lever axis, the pivot joint, and the prismatic joint of the groove, where the pivot joint exhibits a linear sliding. The velocity relationship between the main joint angle, \(\phi \), and the lever joint angle,\(\alpha \), which is the same as the deformed angle of the torsion spring, is derived from the closed-loop constraint of the four-bar linkage as:

$$ \left[ {G_{\phi }^{\alpha } } \right] = d_{a} \cos \left( {\alpha + \phi } \right)/q .$$
(1)
Fig. 3
figure 3

Internal model of the VSA

Here, \(p\) denotes the distance between the main joint and the lever axis, and \(q\) signifies the distance between the pivot joint and the lever axis. Another distance quantity, shown in Fig. 3, is \({d}_{a}\), representing the actual distance between the joint and the pivot axis. The numerator of Eq. (1) is related to how far the pivot joint is located from the main joint, thus it coincident with \({d}_{a}\) when both joint angles are zero, while the denominator denotes the length of the lever arm of the torsion spring. The stiffness of the main joint, \({k}_{\phi }\), generated by the torsion spring, \({k}_{\alpha }\), is expressed as:

$$ k_{\phi } = \left[ {G_{\phi }^{\alpha } } \right]^{2} k_{\alpha } . $$
(2)

Particularly in the initial condition, both angles, \(\phi \) and \(\alpha \), of the main and the lever joints are zero, the stiffness relationship between the main joint and the torsion spring is given as

$$ k_{\phi } = \left( {\frac{{d_{a} }}{q}} \right)^{2} k_{\alpha }. $$
(3)

Therefore, the joint stiffness can be modulated via the pivot position. When the pivot position is close to the axis of the main joint, i.e., a smaller \({d}_{a}\) and a larger \(q\), the joint becomes softer according to the distance ratio from the pivot to the main and lever joints. Contrarily, when the pivot position is close to the lever joint, i.e., far from the axis of the main joint, with a larger \({d}_{a}\) and a smaller \(q\), the joint becomes stiffer since it requires a significant amount of force to deflect the spring. Both distances from pivot to main joint and from pivot to lever joint change simultaneously because the pivot moves between both joints. Therefore, the output stiffness can be changed significantly with a small value of pivot displacement.

The position of the pivot axis is represented by the parameter, \(d\) [mm], denoting the relative displacement with respect to the minimum distance \({d}_{0}\) = 9.6 [mm] between the main joint and the pivot axis. Here, \({d}_{a}\) signifies the actual distance between the joint and the pivot axis, and is expressed as follows:

$$ d_{a} = { }d_{0} + d. $$
(4)

It ranges from 9.6 to 27.6 [mm]. Figure 4 shows the joint stiffness changes in relation to the pivot axis position and displays two curves due to the hysteresis characteristics of the VSA. The upper curve depicts the stiffness measured when an external force is loaded, while the lower curve denotes the values measured when the external force is released.

Fig. 4
figure 4

The change in joint stiffness according to the actual pivot position, \({d}_{a}\) (Solid line: maximum value, dashed line: minimum value)

3 The restoring torque model of the VSA for real-time torque estimation

3.1 Hysteresis model

The restoring torque of the VSA does not change linearly with torsion deformation as expected instead it exhibits a nonlinear change due to hysteresis. This is caused by the friction in the lever mechanism and the torsion spring of the VSA. Previous research [17] has shown a VSA hysteresis model developed based on Noori's algorithm [21], as shown in Eq. (5).

$$ \dot{z} = \frac{1}{{\sqrt {2\pi \xi } }}{\text{exp}}\left( {\frac{{ - z^{2} }}{{2\xi^{2} }}} \right)\left[ {AL\dot{U} - \left( {\beta \left| {{ }\dot{U}} \right|z + \gamma \dot{U}\left| z \right|} \right)} \right] $$
(5)

Where, \(z\) denotes the hysteresis component,\(U\) is the velocity quantity, and \(\xi \) signifies the viscosity damping coefficient. \(A\), \(\beta \), and \(\gamma \) are the parameters for controlling the shape of the hysteresis loop. \(L\) is a function of hysteresis and velocity that represents the sudden torque decrease during the external force removal from the output link. It is expressed as:

$$ L = {\text{exp}}\left( {l_{e} \left[ {z - \left\{ {A\dot{U} + l_{n} \left( {sign\left( {\dot{U}} \right)} \right)} \right\}} \right]^{2} } \right) .$$
(6)

Where, \({l}_{n}\) \(\mathrm{and}\) \({l}_{e}\) are the parameters affecting the shape of the hysteresis model at around (0,0), and the shape of the two loops of the hysteresis model.

An experimental system with a torque sensor and a magnetic encoder was developed for VSA analysis, as displayed in Fig. 5. A force-torque sensor, DynPick from WACHO-TECH Inc. (a company based in Tokyo, Japan), was used to measure the torque applied on the rotating shaft. In addition, to measure the rotation angle of the output link, an AMS AS5048A magnetic encoder with a 14-bit resolution was employed. The elastic properties of the system were investigated during the experiments by measuring the rotation angle of the joint and the restoring torque generated on the rotation axis. The restoring torque represents the quantity related to the reaction force generated by the deformation of the torsion spring inside the system.

Fig. 5
figure 5

The experimental system for the applied torque and angle of deflection measurements

In [17], the parameter adjustment of the proposed hysteresis model via simulation confirmed that the resultant shapes of the graphs matched the experimental results. As an example, the measurement results at \(d=15\)[mm] were compared with the computational results of the hysteresis model, as shown in Fig. 6. The solid red line represents the measured values, while the blue dashed line was constructed from the computational results of the model equations. The computational results of the proposed hysteresis model almost fit the experimental data, although some errors were evident.

Fig. 6
figure 6

A comparison between the measured (solid line) and computed torque values (dashed line) of the hysteresis model in Eq. (5) when d = 15 [mm]

Next, the application of the VSA in an actual robot system was investigated by estimating the real-time torque based on the previously formulated hysteresis model. The velocity calculated from the angle measurements of the encoder was used as the input value of the computational hysteresis model. The real-time computational results from the experimental data, when \(d\) was set to 15 [mm], are shown by the graph in Fig. 7. A substantial deviation was evident between the estimated and actual values during the experiment. This was caused by the acceleration component in the model equation since a stable acceleration measurement cannot be obtained from a digital encoder in general. Various studies are available involving the denoising and error correction of the estimated velocity obtained from an encoder-based position measurement [22, 23]. However, such methods require additional calculation, rendering the system complicated and unsuitable for this research. Therefore, another technique was developed for hysteresis modeling, primarily using position measurements, which is explained in the next section.

Fig. 7
figure 7

A comparison between the measured (red line) and estimated torque values (blue line) of the hysteresis model in Eq. (5) when d = 15 mm

3.2 Restoring torque model of the VSA

A typical restoring torque model for an actuator system with hysteresis properties can be computed as a function of velocity [24,25,26]. However, in the case of generic robotic joints employing a digital position sensor such as an incremental encoder, stable velocity measurements and its derivatives are challenging to achieve, as explained above. Therefore, such models cannot be used for a VSA with hysteresis characteristics, especially in real-time applications. To resolve this problem, a new modeling algorithm was proposed to estimate the restoring torque of a VSA based on angular position measurements. The torque measurement graph showed that even if the loaded external torque was varied, the graph shape retained a specific form that could be divided into four separate segments, as shown in Fig. 8. These consist of two linear lines of external loading and unloading torque states and two curves denoting transition states from external torque loading to unloading and vice versa.

Fig. 8
figure 8

The proposed restoring torque model of the VSA with hysteresis

This model was formulated mathematically, as shown in the following equation, where the applied torque, \({\tau }_{e}\), is estimated with the deformation angle, \(\phi \).

$$ \tau_{e} = A_{s} (\phi - a)^{n} + b. $$
(7)

Here, \({A}_{s}\) denotes the stiffness of the joint and \(n\) dictates the hysteresis loop form. They were determined according to the pivot axis position and friction properties of the variable stiffness mechanism. These values could be changed continuously using an approximation function of the pivot position, \(d\). Furthermore, \(a\) and \(b\) represent the parameters utilized to ensure the continuity of the hysteresis loop by compensating for \({\tau }_{e}\) and \(\phi \). Both parameters determine the vertices of the power functions to achieve a proper hysteresis loop.

The detailed values, which were decided experimentally, are given in Table 1. While an external force is being applied on the output link and released manually, the deflection angle of the main joint and the applied torque are measured with the magnetic encoder and the force-torque sensor simultaneously. For each pivot position, experiments of rotating the output link back and forth randomly were carried out several times. Then, the parameters were obtained from the saved values of the angle and the torque obtained during the experiments. For cases 1 and 3, during applying and releasing an external force, the basic parameters for the hysteresis loop form, \({A}_{s}\) and \(n\), were estimated from the slope of reflection angle versus restoring torque graph. Then the other parameters, \(a\) and \(b\), are decided to ensure continuity of the hysteresis loop when the rotating direction of the joint is changed.

Table 1 The parameters of the restoring torque model and MAE

The measured and estimated torque values of the model are depicted in Fig. 9a, where the solid red line denotes the measured value from the torque sensor, and the solid blue line signifies the estimated value by the proposed algorithm. The enlarged graph, exhibiting four cases of application and release of an external load at different times, is depicted in Fig. 9b. The measured and estimated torque values for a wide range of stiffness values are displayed in Fig. 9c. The estimated results corresponded well with the measured value, although some errors were evident during the transition from application to release states. The errors mainly occurred when the spring in the lever deformed to an extent close to the angle limits. In other words, the peaks near the end of the loading curves were caused when the joint angle exceeded the mechanical limitation. The Mean Absolute Error (MAE) per each \(d\) value is shown in Table 1.

Fig. 9
figure 9

A comparison between the measured and estimated values of the restoring torque of the variable stiffness joint

4 Planar robot mechanisms with VSA joints

4.1 Kinematic model

A two DOF planar robot mechanism with a VSA was developed for the experiments. The kinematic model is depicted in Fig. 10, where the serial robot is composed of only two links, link 1 and link 2, while two more links, link 3 and link 4, are added for the parallel robot structure. The forward kinematics of the left chain of the parallel structure, namely the serial robot, was presented as:

$$ x = {\text{L}}_{1} C_{1} + {\text{L}}_{2} C_{1 + 2} , $$
(8)
$$ y = {\text{L}}_{1} S_{1} + {\text{L}}_{2} S_{1 + 2} , $$
(9)
$$ {\Phi } = \theta_{1} + \theta_{2} . $$
(10)

Where, \({S}_{i}\) and \({C}_{i}\) represent \(\mathrm{sin}{\theta }_{i}\) and \(\mathrm{cos}{\theta }_{i}\), respectively. The forward kinematics of the right chain was given as:

$$ x = {\text{L}}_{3} C_{3} + {\text{L}}_{4} C_{3 + 4} + {\text{L}}_{5} C_{3 + 4 + 5} + {\text{L}}_{{\text{b}}} , $$
(11)
$$ y = {\text{L}}_{3} S_{3} + {\text{L}}_{4} S_{3 + 4} + {\text{L}}_{5} S_{3 + 4 + 5} , $$
(12)
$$ {\Phi } = \theta_{3} + \theta_{4} + \theta_{5} . $$
(13)
Fig. 10
figure 10

The kinematic models of a serial and b parallel planar robots

The velocity relationship of both chains was expressed as:

$$ \dot{u} = \left[ {{}_{1}^{ } G_{\theta }^{u} } \right]{}_{1}^{ } \dot{\theta } = \left[ {{}_{2}^{ } G_{\theta }^{u} } \right]{}_{2}^{ } \dot{\theta }. $$
(14)

Where, the left subscript denotes the number of each chain of the robot. Choosing joints \({\theta }_{1}\) and \({\theta }_{2}\) as the independent joints, \({\theta }_{a}\), and joints \({\theta }_{3}\), \({\theta }_{4}\), and \({\theta }_{5}\) as the dependent joints, \({\theta }_{p}\), Eq. (14) can be expressed as:

$$ \dot{\theta }_{p} = \left[ {{}_{2}^{ } G_{\theta }^{u} } \right]^{ - 1} \left[ {{}_{1}^{ } G_{\theta }^{u} } \right]{}_{1}^{ } \dot{\theta } = \left[ {G_{a}^{p} } \right]\dot{\theta }_{a} . $$
(15)

According to the duality relationship between the velocity and force vector, the relationship of the operational force and joint torque vectors of the serial robot is described as:

$$ \tau_{sA} = \left[ {{}_{s}^{ } G_{A}^{u} } \right]^{T} F. $$
(16)

Here,

$$ F = \left( {\begin{array}{*{20}c} {f_{x} } & {f_{y} } \\ \end{array} } \right)^{T} \;{\text{and}}\;\tau_{sA} = \left( {\begin{array}{*{20}c} {\tau_{1} } & {\tau_{2} } \\ \end{array} } \right)^{T} . $$

Where, \({\left[{{}_{s}{}G}_{A}^{u}\right]}\) is composed of the 1st and 2nd rows of the Jacobian of the left chain, \(\left[{{}_{1}{}G}_{\theta }^{u}\right]\), and \({\tau }_{s}\) is the torque vector of the serial robot with VSAs at both joints. Consequently, the output force can be calculated from the joint torque measurements using the following equation:

$$ F = \left[ {{}_{s}^{ } G_{u}^{A} } \right]^{T} \tau_{sA} . $$
(17)

Similarly, the force relationship between the independent and dependent joints is represented by:

$$ \tau_{a} = \left[ {G_{a}^{p} } \right]^{T} \tau_{p} . $$
(18)

Then, the effective load referenced to the independent joints is expressed as:

$$ \tau_{a}^{*} = \tau_{a} + \left[ {G_{a}^{p} } \right]^{T} \tau_{p} . $$
(19)

In the case of the parallel robot, where only the first four joints were actuated with joint positions \({\theta }_{1}\), \({\theta }_{2}\), \({\theta }_{3}\), and \({\theta }_{4}\), the effective load referenced to the independent joints was given as:

$$ \tau_{a}^{*} = \left[ {{}_{p}^{ } G_{a}^{A} } \right]^{T} \tau_{pA} . $$
(20)

Here,

$$ \left[ {{}_{p}^{ } G_{a}^{A} } \right]\; = \;\left[ {\begin{array}{*{20}c} I \\ {\left[ {G_{a}^{p} } \right]_{{\left( {1,2:} \right)}} } \\ \end{array} } \right], $$
(21)

and

$$ \tau_{pA} = \left( {\begin{array}{*{20}c} {\begin{array}{*{20}c} {\tau_{1} } & {\tau_{2} } \\ \end{array} } & {\begin{array}{*{20}c} {\tau_{3} } & {\tau_{4} } \\ \end{array} } \\ \end{array} } \right)^{T} . $$

Subsequently, the force relationship between the output force vector, \(F\), and the joint vector with four actuators, \({\tau }_{pA}\), is given as:

$$ F = \left[ {{}_{p}^{ } G_{u}^{A} } \right]^{T} \tau_{pA} , $$
(22)

where,

$$ \left[ {{}_{p}^{ } G_{u}^{A} } \right]\; = \;\left[ {{}_{p}^{ } G_{a}^{A} } \right]\left[ {G_{u}^{a} } \right] .$$
(23)

4.2 Stiffness model

The relationship between the stiffness matrices defined in the operational and joint spaces of the serial robot is presented as:

$$ \left[ {K_{uu} } \right] = \left[ {{}_{s}^{ } G_{u}^{A} } \right]^{T} \left[ {{}_{s}^{ } K_{AA} } \right]\left[ {{}_{s}^{ } G_{u}^{A} } \right]. $$
(24)

Where, the stiffness matrices in the operational and the joint spaces are defined as:

$$ \left[ {K_{uu} } \right] = \left[ {\begin{array}{*{20}c} {k_{xx} } & {k_{xy} } \\ {k_{xy} } & {k_{yy} } \\ \end{array} } \right], $$
(25)
$$ \left[ {{}_{s}^{ } K_{AA} } \right] = \left[ {\begin{array}{*{20}c} {k_{A1} } & 0 \\ 0 & {k_{A2} } \\ \end{array} } \right]. $$
(26)

In the case of parallel robot system, the relationship between the stiffness matrices defined in the operational and the joint spaces is given as:

$$ \left[ {K_{uu} } \right] = \left[ {{}_{p}^{ } G_{u}^{A} } \right]^{T} \left[ {{}_{p}^{ } K_{AA} } \right]\left[ {{}_{p}^{ } G_{u}^{A} } \right], $$
(27)

where,

$$ \left[ {_{p}^{{}} K_{{AA}} } \right] = \left[ {\begin{array}{*{20}c} {k_{{A1}} } & 0 & 0 & 0 \\ 0 & {k_{{A2}} } & 0 & 0 \\ 0 & 0 & {k_{{A3}} } & 0 \\ 0 & 0 & 0 & {k_{{A4}} } \\ \end{array} } \right] .$$
(28)

4.3 The feedforward modulation of operational stiffness

By setting up the stiffness of the VSAs with the appropriate values for the desired operational stiffness, the output stiffness of the system can be modulated in a feedforward way. For the parallel robot system, the following equation was derived by rearranging Eq. (27),

$$ \left( {\begin{array}{*{20}c} {\begin{array}{*{20}c} {k_{xx} } \\ {k_{xy} } \\ \end{array} } \\ {k_{yy} } \\ \end{array} } \right)\; = \;\left[ S \right]\left( {\begin{array}{*{20}c} {k_{A1} } \\ {k_{A2} } \\ {k_{A3} } \\ {k_{A4} } \\ \end{array} } \right). $$
(29)

In a vector form, the above equation is rewritten into.

$$ K_{U} = \left[ S \right]K_{A} , $$
(30)

where \({K}_{U}\), the operational stiffness vector, and \({K}_{A}\), the joint stiffness vector, denote the left-hand side term and the second term of the right-hand side terms of Eq. (29). The relationship between both stiffness vectors, \(\left[S\right]\), depends on the end effector Jacobian of the parallel link mechanism.

The goal here is to search for joint stiffness values, \({K}_{A}\), which yield a zero-coupled operational space stiffness value, \({k}_{xy}\), while maintaining the desired values of the other two terms within an estimated permissible range. First, the permissible range of the operational space stiffness value was determined by substituting the minimum and maximum values of the joint space stiffness (\({K}_{A\_min}\) and \({K}_{A\_max}\)), obtained from experimental measurements, into Eq. (29). The resultant minimum and maximum operational stiffness ranges were denoted as \({k}_{uu\_min}\) and \({K}_{uu\_max}\), which were assigned the values of the 0% and 100% of the allowed operational stiffness range. These values helped us in selecting desired operational stiffness values. Next, to solve Eq. (30), a desired operational stiffness value,\({K}_{U}^{dsr}\), was selected. This value was chosen in such a way that its coupling term was set to zero, while its other two terms were selected from the previously calculated range. As a final resolution, it was formulated into a constrained linear least-squares problem, as depicted below:

$$ \mathop {\min }\limits_{{K_{A} }} \frac{1}{2}\left\| {\left[ A \right]K_{A} - K_{U}^{dsr} } \right\|_{2}^{2} . $$
(31)

Here, \({K}_{A\_min} \le {K}_{Ai}\le {K}_{A\_max}\), where \({\Vert \bullet \Vert }_{2}^{2}\) denotes the squared Euclidean norm. A "lsqlin" MATLAB solver was used to resolve the above problem (31). A corresponding residual error of 6.218 × \( {10}^{-16}\) was obtained.

5 Experimental works

5.1 Experimental system

The experimental setup of the planar robot mechanism with variable stiffness joints is shown in Fig. 11. This mechanism consists of four active joints with a VSA and a free joint (joint 5) that connects the two arms. Each active joint has two servo motors for joint motion and joint stiffness control. Furthermore, the deformation of each active joint was measured using an AMS AS5048A magnetic encoder. The schematic diagram of the hardware control configuration is shown in Fig. 12, where an Open CM9.04C microcontroller was used to manage the motion and stiffness control of all the motors. An Arduino MEGA microcontroller was employed as an interface between the magnetic encoder and the computer. A force sensor attached at the endpoint of link 2 was used to measure the actual external force applied to the mechanism. All devices were connected to a laptop computer to record the measured data, while the commands and programs were written back to the robot system. Finally, the measured external and the estimated forces, calculated from the joint torques by the proposed algorithm, were compared.

Fig. 11
figure 11

Parallel robot system with variable stiffness joints

Fig. 12
figure 12

A schematic representation of the experimental system

5.2 Experimental method

The external force applied at the end effector was estimated using the joint restoring torque measurement obtained from the restoring torque model of the VSA. The torque estimation of each joint was computed after the force-torque sensor attached at the end effector was manually moved. This was followed by the computation of the magnitude of the externally applied force. Experiments were conducted for both the serial and parallel robot systems displayed in Fig. 13. 150 [mm] long perpendicular guide frames were installed in the operational space to generate a linear motion during the manual motion. The end effector was then moved by hand from position ① to ② in the y-direction and from position ① to ③ in the x-direction, respectively.

Fig. 13
figure 13

Experimental system for reaction force estimation. a Serial robot, b Parallel robot

5.3 External force estimation of the serial robot

An experiment was conducted to estimate the external force on the serial robot. The joint stiffness of each joint was set to a specific fixed value (via the pivot axis position), and the external force was applied manually. Then, the applied force estimation was calculated from the applied torque measurement of each joint, using Eq. (17).

The experimental results of the external force estimation in the x- and y-directions are shown in Figs. 14 and 15, respectively. The red lines denote the measured values, and the blue lines signify the estimated values from the proposed method. Both graphs manifest close similitude, clearly showing the hysteresis properties due to the VSA. However, a force is present in the x-direction during the motion in the y-direction, depicted as a vertical spike near x = 0.1[mm] in Fig. 14. A similar result is observed in the y component of the force near y = 0.245[mm] in Fig. 15. This is ascribed to the coupling term that exists in the stiffness matrix of the operational space of the robot.

Fig. 14
figure 14

The experimental results of the reaction force estimation of the serial robot while moving in the x direction

Fig. 15
figure 15

The experimental results of the reaction force estimation of the serial robot while moving in the y direction

5.4 External force estimation of the parallel robot

The same method used for the serial robot was employed here to estimate the external force of the parallel robot. The applied force at the endpoint of the robot was estimated using Eq. (22) according to the applied torque measurement of the four VSAs. The experimental results for the x- and y-direction movements are shown in Figs. 16 and 17, respectively. The estimation results are similar to the serial robot, with the hysteresis characteristics of the system depicted clearly. In addition, although a spike force occurred due to the coupling stiffness term, its magnitude was smaller than that of the serial robot. This indicates that the stiffness characteristics in the operational space of the parallel robot are more isotropic than that of the serial robot.

Fig. 16
figure 16

The experimental results of the reaction force estimation of the parallel robot while moving in the x direction

Fig. 17
figure 17

The experimental results of the reaction force estimation of the parallel robot while moving in the y direction

5.5 Reducing the couple term effect on the external force of the parallel robot

The experiment involving external force estimation of the parallel robot was conducted using the decoupled solution of operational stiffness. The stiffness values of the parallel mechanism joints were set to the newly determined joint stiffness. As shown by the corresponding results in Figs. 18 and 19, the outliers around the origin resulting from the coupled operational space stiffness term were significantly reduced compared to the previous experimental results. As explained in Section IV subsection C, a linear programming solver, lsqlin, from MATLAB was used. First, the matrix \(\left[A\right]\) was obtained from the Jacobian and kinematics of the system, which was later used for calculating the minimum and maximum ranges of the operational stiffness matrix. In addition, the range of the joint stiffness values was computed experimentally, and the results are shown below.

$${K}_{A\_min}= \left[\begin{array}{c}\begin{array}{c}0.258\\ 0.175\\ 0.258\end{array}\\ 0.183\end{array}\right] [Nm/rad]$$

and

$$ K_{A\_max} = \left[ {\begin{array}{*{20}c} {\begin{array}{*{20}c} {50} \\ {50} \\ {60} \\ \end{array} } \\ {50} \\ \end{array} } \right]\left[ {Nm/rad} \right]. $$

Using these results, the estimated acceptable range values for the operational stiffness column vector is:

$${K}_{U\_min}=\left[\begin{array}{c}18.30\\ 8.806\\ 18.12\end{array}\right] [N/m]$$

and

$$ K_{U\_max} = \left[ {\begin{array}{*{20}c} {4006.6} \\ {1840.7} \\ {4600.3} \\ \end{array} } \right] \left[ {N/m} \right]. $$
Fig. 18
figure 18

The experimental results of the decoupled reaction force estimation of the parallel robot while moving in the x direction

Fig. 19
figure 19

The experimental results of the decoupled reaction force estimation of the parallel robot while moving in the y direction

Next, the desired, \({K}_{U}^{dsr}\) was chosen at different percentages from the above range with the assumption that \({K}_{U\_min}\) and \({K}_{U\_max}\) corresponded to 0% and 100% of the acceptable operational stiffness range, respectively. Consequently, three values at 12.5%, 25%, and 37.5% were selected for comparison and analysis while setting the middle component (coupling term) to zero. The corresponding external force estimation results are shown in Figs. 20 and 21, while more detail is provided in Table 2. It was clear that the spikes were almost reduced to zero.

Fig. 20
figure 20

The experimental results of the decoupled reaction force estimation of the parallel robot while moving in the x direction

Fig. 21
figure 21

The experimental results of the decoupled reaction force estimation of the parallel robot while moving in the y direction

Table 2 The MAE of the uncoupled external force estimation

6 Conclusions

A real-time estimation algorithm for an externally applied torque on VSA joints is proposed. It employs a hysteresis loop model with only displacement quantities and not their derivatives. Experiments show that the proposed method yields excellent results that correspond well with the measured values in all stiffness configurations. In addition, the external forces of serial and parallel planar robots containing VSAs are estimated according to the estimated joint torque values and the force relationship between the joint and operational spaces. This study verified that the proposed algorithm can be used for a real-time estimation of an external force in serial and parallel robots. However, due to the coupled stiffness term, the estimated external force exhibited an irregular shape at its origin. To correct this irregularity, a parallel mechanism with a redundant actuation scheme was utilized. Linear programming was used to determine the suitable joint space stiffness values utilized to eliminate the effect of the coupling term, which was confirmed via the developed parallel robot mechanism. Consequently, the capability of the VSA in both feedforward stiffness modulation and external force estimation was demonstrated.

This method can be extended into multi-DOF and spatial mechanisms as well. However, the mechanical structures, especially a closed chain structure, may render the system bulkier and more complex as the DOF increases. Similarly, more errors may be introduced into the estimation calculations.