1 Introduction

Transhumeral amputations (i.e., between the elbow and shoulder) are the second most common type of upper limb amputation, accounting for approximately 16% of all upper limb amputation surgeries [1]. This highlights the importance of developing prostheses concerning not only the hand and wrist, but also the elbow. Most daily tasks require the use of the upper limbs; therefore, the loss of one or both upper limbs can complicate a variety of tasks, which can significantly worsen the quality of life.

If we take the human limb as reference to create a prosthesis as natural as possible, we cannot avoid introducing the concept of variable stiffness, as suggested by Sensinger et al. [2]. In fact, the muscle and bone structure of the human arm allow for stiffness modulation by contracting a pair of agonistic and antagonist muscles. In particular, the alternate muscle contraction leads to the arm motion, whereas the simultaneous contraction leads to stiffness variation [3]. The artificial counterpart of such behavior may be found in variable stiffness actuators (VSAs), which are now extensively studied and employed within the robotic/mechatronic community. In the last decade, several examples of VSAs for robotic manipulators with programmable stiffness have been designed and developed by different research institutes, with the aim of verifying the effectiveness and reliability of the variable stiffness approach (see, e.g., [4,5,6,7]). In particular, Vanderborght et al. [8] comprehensively analyzed VSA uses and possible configurations, starting with an initial distinction between active and passive VSAs. In active VSAs, a motor flanked by a dedicated control system performs the stiffness change based on the signals returned by sensors at the joint. This type of VSA is able to undergo theoretically infinite stiffness changes, and is widely used for industrial [9] and biomedical applications, including in the construction of prostheses [2, 10, 11].

On the other hand, passive VSAs, also named structure-controlled systems, generally rely on the change in geometry of some passive spring whose preload is used to achieve stiffness variations [12,13,14]. In terms of prime movers, either traditional electric motors (see, e.g., [15, 16]) or intrinsically soft actuators may be employed (e.g., McKibben acutuators [17] or dielectric elastomer actuators [18]). In all cases, owing to the presence of one or more inherently compliant or soft transmission, hereafter referred to as compliant transmission element (CTE), passive VSAs present several advantages over their active counterparts. For example, they protect the joint from unexpected impacts by decoupling the joint and motor through the CTE deformation [19], which makes them safer in the event of collisions with things or people. In addition, they maintain the inherent stiffness of the joint even when the motor is deactivated. Finally, since the CTE may be used as an elastic energy buffer to be released as needed, its inclusion may allow to downsize the motors for a given peak-torque requirement.

Owing to the above advantages, passive VSAs are widely used in collaborative robots (i.e., robots designed to work alongside humans) [20,21,22], exoskeletons for the rehabilitation of upper and lower limbs [23,24,25,26], and prosthetic devices [27]. In the latter reference, Lemerle et al. reported the first example of a variable stiffness elbow joint using an antagonistic motor configuration, which is a common architecture discussed in the literature [14, 16, 28]. However, major drawbacks of all VSAs, despite being active or passive or employing traditional or soft prime movers, are (1) a rather complex mechanical design due to the need of a couple of prime movers along with additional compliant components to simultaneously adjust both position and stiffness of the joint; and (2) a more complicated control approach, as compared to traditional, single-motor, servo-systems, especially when dealing with parameter uncertainties or undesired system behaviors to be compensated (such as, for instance, non-negligible damping [27,28,29]). Within this scenario, it is self-evident that any possible solution aiming at system simplification, either at the mechanical design or control level, is welcome and shall be pursued.

Focusing at first on the mechanical design and, in particular on the CTE implantation, a solution possibly leading to part-count reduction may be based on the compliant mechanism concept [30]. In fact, the growing interest on compliant mechanism with localized [31] or distributed [32] compliance is mainly due to the possibility of making simpler and more compact mechanical systems with completely customized characteristics (such as non-linear springs [33, 34], deformable structures employed as rotational/prismatic kinematic pairs [35,36,37], and spatial single-piece mechanisms [38, 39]). Naturally, by relying on the deflection of flexible members for their functioning, the performances of a generic compliant mechanism are heavily dependent on the binomial material-morphology. In particular, at present, complex morphologies may be realized with linear elastic materials (e.g., spring steel) or even with low-cost plastics for additive manufacturing (e.g., polylactic acid — PLA or thermoplastic polyurethane — TPU). In the second instance, it is often the case that the compliant element behaves as expected in quasi-static conditions, though it is highly affected by undesired time-dependent phenomena (e.g., damping) during motion. Therefore, in the hypothesis to resort to CTE morphologically conceived as distributed compliant mechanisms but realized with materials affected by viscoelasicity, the mentioned design philosophy aiming at a simplification of the VSA mechanical structure is achieved at the expense of an undesired behavior in dynamic conditions, thus limiting the joint precision during actual tasks. However, such unwanted behavior can be effectively mitigated/compensated by means of appropriate control strategies. In this context, the technical challenge is to design a variable stiffness device comprising intrinsic compliance while compensating for the disadvantages of viscoelasticity.

Fig. 1
figure 1

Physical prototype of the variable stiffness elbow joint

In light of these considerations, the aim of this study is to develop a novel anthropomorphic variable stiffness elbow joint that can be used as either a human limb prosthesis or a human-like robotic arm, in combination with a robust control strategy to reduce positional error due to CTE hysteresis. This device, shown in Fig. 1, uses two nonlinear CTEs in an antagonistic configuration to achieve a stiffness variation of about 13,500 Nmm/rad. The CTEs, each consisting of an inner and outer ring connected by four slender beams, were designed using a Matlab/ANSYS APDL optimization routine and then prototyped and tested. The experimental results showed good consistency with the finite element analysis (FEA) data, albeit with high hysteresis owing to the internal damping of the material. To overcome this drawback, a mathematical model of the VSA was prepared to develop a robust control strategy. Finally, the joint was fabricated and tested for validation of the model.

The rest of the paper is organized as follows. Section 2 reports the static model of the antagonistic VSA; Sect. 3 describes the design, main features, and capabilities of the presented device; Sect. 4 is dedicated to the design and experimental testing of the CTEs that provide the stiffness variation; Sect. 5 discusses the device model and control strategy; and Sect. 6 presents the experimental results of the physical prototype. Finally, Sect. 7 reports the conclusions of the work.

Fig. 2
figure 2

Schematic representation of an antagonistic VSA

2 VSA static model

In variable stiffness antagonistic devices [14, 15, 40], as schematized in Fig. 2, two actuators are employed for each moving joint, which contribute to the position and stiffness of the joint by acting on the two CTEs that are connected between the motors and moving joint. The torques applied on the inner rings of CTEs by the motors, \(\tau _\alpha\) and \(\tau _\beta\), are given by

$$\begin{aligned} \tau _\alpha = \psi _\alpha (\epsilon _\alpha ) + J_m\ddot{\theta }_\alpha \end{aligned}$$
(1)
$$\begin{aligned} \tau _\beta = \psi _\beta (\epsilon _\beta ) + J_m\ddot{\theta }_\beta \end{aligned}$$
(2)

where \(\epsilon _\alpha = \theta _\alpha - q\) and \(\epsilon _\beta = \theta _\beta + q\) are the angular deflection of the CTEs; \(J_m\) is the inertia of the motor; \(\psi _\alpha = \psi _\alpha (\epsilon _\alpha ) = \psi _\alpha (q, \theta _\alpha )\) and \(\psi _\beta = \psi _\beta (\epsilon _\beta ) = \psi _\beta (q, \theta _\beta )\) are the torques applied by the motors to the moving link through the deflection of the CTEs; \(\theta _\alpha\) and \(\theta _\beta\) are the positions of the motors; and q is the angular position of the moving link. For the static case, \(\ddot{\theta }_\alpha\) and \(\ddot{\theta }_\beta\) both equal zero; therefore, the total torque applied to the joint \(\tau _j\) is equal to

$$\begin{aligned} \tau _j = \tau _\beta -\tau _\alpha = \psi _\beta - \psi _\alpha \end{aligned}$$
(3)

To independently control the position q and stiffness \(k=\frac{\delta \tau _j}{\delta q}\) of the moving joint by guiding the angular positions of the motors (\(\theta _\alpha\) and \(\theta _\beta\)), the torques \(\psi _\alpha\) and \(\psi _\beta\) must be nonlinear functions of the angular deformations \(\epsilon _\alpha\) and \(\epsilon _\beta\).

Assuming a quadratic profile, we can write the torque of the motors and joint as follows:

$$\begin{aligned} \psi _\alpha = a_2\epsilon ^2_\alpha + a_1\epsilon _\alpha \psi _\beta = a_2\epsilon ^2_\beta + a_1\epsilon _\beta \end{aligned}$$
(4)
$$\begin{aligned} \tau _j = [a_2(\theta _\alpha + \theta _\beta ) + a_1][\theta _\beta - \theta _\alpha + 2q] \end{aligned}$$
(5)

where \(a_1\) and \(a_2\) are the first- and second-order coefficients, respectively, of the quadratic torque–deflection profile. The stiffness profile k will then be equal to

$$\begin{aligned} k = 2[a_2(\theta _\alpha + \theta _\beta ) +a_1] \end{aligned}$$
(6)

Equation 6 shows that nonlinear CTEs are essential for achieving stiffness modulation, because linear CTEs would have a zero \(a_2\) coefficient and thus a constant joint stiffness of \(k = 2a_1\).

Fig. 3
figure 3

Previous prototype

Fig. 4
figure 4

VSA CAD overview

Fig. 5
figure 5

Final TPU CTE

3 VSA design overview

This section describes the design of the variable stiffness elbow. To be used as an upper limb prosthesis, this device must be adaptable to replicate the shape and size of the missing limb. The design of the arm presented in this article derives directly from our previous work [41]. Our first prototype of a passive antagonistic variable stiffness joint, shown in Fig. 3, used a pair of acrylonitrile butadiene styrene (ABS) CTEs and achieved a stiffness variation range of 726–1795 N mm/rad. To transition from a variable stiffness joint to a humanoid elbow joint, two major design challenges must be overcome. The first concerns the geometric constraints of the device owing to the need to replicate the human limb as faithfully as possible. The second concerns the physical capabilities of the joint itself and thus the range of motion and stiffness that can be achieved. According to NASA [42], the human upper arm and forearm have approximate dimensions and weights of 180 \(\times\) 100 mm and 1.25 kg and 150 \(\times\) 100 mm and 0.75 kg, respectively. From the perspective of motor skills, an angular range of motion of 0–\(130^{\circ }\) is normally sufficient to perform all necessary daily activities. The main components of the device, as shown in Fig. 4, are as follows:

  • Upper arm: serves as a fixed frame for the DC motors and joint, connected to the upper arm support.

  • Two 24-V Faulhaber 2642W024CR DC motors: equipped with a 23:1 reduction gearbox and a \(0.7^{\circ }\) resolution optical encoder.

  • 512 pulse per revolution rotary encoder: measures the absolute joint position, connected to the forearm support through a 5.4:1 reduction ratio transmission element.

  • Upper arm support: connected to the upper arm and main shaft of the joint.

  • Conical shaft and motor gears with a reduction ratio of 3.5:1: allow the motors to be placed in an upright position with respect to the joint, reducing the width of the device.

  • Two identical CTEs: connected to the shaft gear and forearm support.

  • Forearm support: the moving link of the device, connected to the forearm and supported by the main shaft.

  • Forearm: the output link of the device.

  • Inertial measurement unit (IMU) position sensor: identifies the spatial position of the forearm and, combined with the rotary encoder, the whole device, embedded in the forearm.

The main shaft, motors, IMU sensor, encoder, bearings, motor, and shaft gears were standard parts. All other components were made by additive manufacturing. Specifically, the encoder and forearm transmission gears were fabricated from a thermoset resin (Formlabs Tough 1500) using a Formlabs Form 3 printer; the two CTEs were fabricated from thermoplastic polyurethane (TPU) and all other components were made from polylactic acid (PLA) using an Ultimaker S3 printer.

Table 1 Device datasheet

The final design of the CTE is shown in Fig. 5. It consists of four slender beams with distributed compliance that are connected at either end to the inner and outer rigid rings of the CTE. In this way, when the inner ring rotates, torque is transmitted to the outer ring. Because it would be very difficult to obtain an ideally rigid outer ring in the physical prototype, especially given the dimensions of the beams compared to those of the ring itself, the forearm support was modeled to have a series of protrusions (red filled areas in Fig. 5) that serve as passive contacts to prevent deformation of the outer ring during use. The final parameters of the device and CTEs are listed in Table 1.

4 CTE design and testing

This section presents the design and characterization of the CTEs used to adjust the stiffness of the device. Referring to Fig. 6, the neutral axis of the beam was determined using a series of six points interpolated over a cubic spline. The initial and final points (\(p_\text {in}\) and \(p_\text {fin}\), respectively) were fixed at the inner and outer rings, respectively, and the positions of the remaining four points (\(p_{1\text {--}4}\)) were determined using a Matlab/ANSYS APDL optimization routine, whereby ANSYS was tasked to solve the 1D model of the beam while Matlab managed the optimization procedure in batch.

Fig. 6
figure 6

CTE parameters

Table 2 Optimized shape parameters

The optimization of the beam profile to obtain the desired nonlinear behavior is discussed in more detail in our previous article [41]. An overview of the procedures and tools for designing beam-based compliant mechanisms can also be found in ref. [43]. For the sake of brevity, only the optimal values of this particular profile are given here (see Table 2), and only the dimensions of the beam section were changed to tune the torque performance of the device.

Given the nature of the device, we aimed to maximize the torque response of the planar spring while respecting the maximum stress of the material and the maximum dimensions of the robotic joint.

Fig. 7
figure 7

Equivalent deflection/torque characteristics of beams made from ABS (left) and TPU (right)

Based on the material used in the previous article (i.e., ABS, Young’s modulus E = 1800 MPa, Poisson’s ratio \(\nu\) = 0.35), an optimization procedure was carried out in which the width B of the beam section (see Fig. 6) was fixed at the maximum value allowed by the overall dimensions (10 mm) and the thickness H was varied cyclically to find the configuration with the maximum response, with the only constraint being that the maximum allowable stress of the material (\(\sigma _\text {ABS, max}\) = 42.5 MPa) was not exceeded. The maximum torque determined in this initial optimization was 162.86 N mm for a single beam and 651.44 N mm for the whole spring, corresponding to a value of t = 1.014 mm. Since this value is below that required for a prosthetic arm, another optimization was carried out using TPU (E = 80 MPa, \(\sigma _\text {TPU, max}\) = 8 MPa, values obtained by testing the filament available in the laboratory and maintaining a safety coefficient of 0.5 for \(\sigma _\text {TPU, max}\)) instead of ABS. Using the same optimization procedure, we obtained a maximum torque of 500 N mm for a single beam and 2000 N mm for the whole spring, corresponding to a value of t = 4.35 mm (see Fig. 7). Notably, the maximum torque values are about three times greater than those using ABS, for which a thickness of 29 mm would have been required (compared to the threshold thickness of 10 mm allowed based on the dimensions of the elbow) to obtain the same torque as that obtained with TPU. The optimal CTE was then verified using a 3D FEA simulation, as shown in Fig. 8.

4.1 Experimental evaluation

A prototype of the optimized TPU CTE was fabricated using a fused deposition modeling (FDM) Ultimaker S3 printer and tested with a customized experimental setup comprising a Kollmorgen DC motor, six-axis ATI load cell, and pair of connecting ABS flanges (see Fig. 9).

Fig. 8
figure 8

3D FEA—positive (left ) and negative (right) deflection and stress field

The inner ring of the CTE was connected to the motor flange (black component), while the outer ring was connected to the load cell flange (red component). To control the motor drive and read the torque values captured by the load cell, a real-time LabVIEW script was used with an embedded NI-cRIO controller. A sinusoidal motion law was then imposed on the motor (\(15^{\circ }\) amplitude, 1 Hz frequency) and the corresponding torque/rotation law of the CTE was obtained.

Fig. 9
figure 9

CTE experimental setup

Fig. 10
figure 10

Torque–deflection relationship of the TPU CTE

Fig. 11
figure 11

CTE FEA damping behavior

As shown in Fig. 10, the experimental results were in agreement with those of the FEA analyses, minus possible errors due to the 3D printing process. The torque–deflection relationship curve of the TPU CTE, as mentioned in Sect. 3, has a similar shape to that obtained for the ABS CTE [41]. It is important to note that this curve must be asymmetric to avoid zero stiffness at the minimum point and thus a singularity point in the control. Instead, the symmetry of the system results from the fact that the two CTEs are mounted in an antagonistic configuration.

Dynamic characterization was performed to visualize the effects of the internal damping of the material. There was an evident hysteresis effect in the loading and unloading phases of the spring, especially when compared to the ABS CTE used in the previous work [41]. The damping coefficients of the ABS and TPU CTEs were estimated using Recurdyn software, which is able to reproduce the dynamics of the CTEs under the same conditions as those used in the experimental tests. Damping coefficients of 0.0025 and 0.04 N s/mm were achieved for the ABS and TPU CTEs, respectively. This corresponds to a 16-fold difference; therefore, the effect of damping cannot be neglected for the TPU CTE, as it will have a significant effect on the control of the device (Fig. 11). For this reason, in the following sections, the model of the device is developed with consideration to damping, and a control strategy is proposed to compensate for its effect.

5 Modeling and control

Referring to Fig. 2, the robot dynamic model is composed by the dynamics of 3 rigid bodies (the link and 2 actuators), coupled through elastic transmission elements.

The dynamic model of the system is as follows: whole manipulator can be written by grouping the actuators in two sets, denominated here as \(\alpha\) and \(\beta\), described by two equations, one for each actuators set:

$$\begin{aligned} J_q\,\ddot{q} + b_q\, \dot{q} - \psi _{\alpha } + \psi _{\beta } = \tau _e \end{aligned}$$
(7)
$$\begin{aligned} J_m\,\ddot{\theta }_\alpha + \psi _{\alpha } = \tau _{\alpha } \end{aligned}$$
(8)
$$\begin{aligned} J_m\,\ddot{\theta }_\beta + \psi _{\beta } = \tau _{\beta } \end{aligned}$$
(9)

where q is joint positions, \(J_q\) is the link inertia matrix, \(b_q\) is the joint damping coefficient, \(\theta _\alpha\) and \(\theta _\beta\) are the actuator positions, and \(J_m\) is the diagonal inertia matrix of the actuators, while \(\tau _{\alpha }\) and \(\tau _{\beta }\) are the torques applied by the actuators and \(\tau _e\) is the load torque applied to the link (e.g., the gravity torque acting on the output link).

In case of quadratic transmission elements, such as in [14, 40], the coupling torque between the actuators and the moving link can be expressed as

$$\begin{aligned} \psi _{\{\alpha ,\beta \}} = a_2\epsilon _{\{\alpha ,\beta \}}^2 + a_1 \epsilon _{\{\alpha ,\beta \}} + b_1 \dot{\epsilon }_{\{\alpha ,\beta \}} \end{aligned}$$
(10)

where \(\epsilon\) is the the spring displacement \(\epsilon _\alpha = \theta _\alpha - q\) and \(\epsilon _\beta = \theta _\beta + q\) for the two actuators, respectively, \(a_2\) and \(a_1\) are the quadratic spring coefficients, and \(b_1\) is the transmission elements’ damping factor.

5.1 Feedback linearization

Since we are interested to control both the position and the stiffness of the joint, it is useful to define a new output vector that contains directly this information:

$$\begin{aligned} y_c = \left[ \begin{array}{cc} q~~&k-k_0 \end{array} \right] ^T \end{aligned}$$

where k is the mechanical stiffness of the joint and \(k_0 = 2\,a_1\) is the stiffness value in the equilibrium condition. By assuming \(\theta = (\theta _\alpha - \theta _\beta )/2\) and \(s = \theta _\alpha + \theta _\beta\), it is possible to write

$$\begin{aligned} \begin{aligned} J_q\,\ddot{q} + b_q \dot{q} + k(s) \varphi (q - \theta ) + 2b_1 \dot{\varphi }(q-\theta )&= \tau _e \\ 2 J_m \ddot{\theta } + k(s) \varphi (\theta - q) + 2b_1 \dot{\varphi }(\theta -q)&= \tau \\ J_m \ddot{s} + b_1\dot{s} + \vartheta (q - \theta ,s)&= \tau _k \end{aligned} \end{aligned}$$

where \(\tau = \tau _{\alpha } - \tau _{\beta }\) and \(\tau _k = \tau _{\alpha } + \tau _{\beta }\), \(k(s) >0\) is a strictly positive function representing the generalized joint stiffness, \(\varphi (q - \theta )\) is a odd strictly monotonically increasing functions representing the generalized joint displacement, while \(\vartheta (q - \theta ,s)\) is a function such that \(\vartheta (0,0) = 0\).

In case of transmission elements characterized by the torque displacement relation (10), the following relations hold:

$$\begin{aligned} \begin{aligned} k(s)&= 2(a_2\,s + a_1) \\ \varphi (q - \theta )&= q-\theta \\ \vartheta (q - \theta , s)&= \frac{a_2}{2}\,s^2+ a_1 \,s + 2\,a_2\,(q-\theta )^2 \end{aligned} \end{aligned}$$

By dropping the dependance of k from s and inverting its relation, we obtain

$$\begin{aligned} \begin{aligned} s = \frac{k-2\,a_1}{2\,a_2}&= \frac{k-k_0}{2\,a_2}\\ \vartheta _{k}(q - \theta , k)&= \frac{1}{8\,a_2}\,(k-k_0)^2+ \frac{a_1}{2\,a_2} \,(k-k_0) + 2\,a_2\,(q-\theta )^2 \end{aligned} \end{aligned}$$

It can be also noted that \(\ddot{k} = 2\,a_2 \ddot{s}\).

Since the joint stiffness k is a function of s, that is in turn a function of the actuators configuration, k is in general a function of time, i.e., \(k = k(t)\). Moreover, it is \(k(t) > 0\) for all t, since it has no physical meaning to consider negative stiffness while if the stiffness drops to zero the joint/transmission would lead to an unactuated system.

Taking into account for model uncertainties, the system dynamics can be rewritten as

$$\begin{aligned} \begin{aligned} J_q\,\ddot{q} + b_q \dot{q} + k\,(q - \theta ) + b_\theta (\dot{q} - \dot{\theta })+\eta _q(t)&= \tau _e \\ J_\theta \ddot{\theta } + k (\theta - q) + b_\theta (\dot{\theta }- \dot{q} )+ \eta _\theta (t)&= \tau \\ J_k \ddot{k} + b_k \dot{k} + \vartheta _k(q - \theta ,k) + \eta _k(t)&= \tau _k \end{aligned} \end{aligned}$$

where \(J_\theta = 2J_m\), \(J_k= J_m/(2\,a_2)\), \(b_\theta = 2\,b_1\), and \(b_k = b_1/(2\,a_2)\). Moreover, it is assumed that all the effects due to frictions, dead-zones, non-modeled dynamics, parameters variability, etc., not considered in the other terms of the dynamics, can be collected by introducing the additive functions of time \(\eta _{\{q,\theta ,k\}}(t)\).

Therefore, the controllable input is \(u=[\tau \ \tau _k]^T\), the non-controllable input is \(w=\tau _e\), and the robot state is \(x=[q\ \dot{q}\ \theta \ \dot{\theta }\ k \ \dot{k}]^T\). Considering the new output vector \(y_c\), the input u, and the state vector x, the dynamic model of the VSA joint in the nominal case (i.e., without model uncertainties) can be rewritten in the state space form:

$$\begin{aligned} \dot{x} = f(x) + g(x) u + d(x) w \end{aligned}$$
(11)
$$\begin{aligned} y_c = h(x) \end{aligned}$$
(12)

where \(x\in \mathbb {R}^{6}\), \(u,y_c\in \mathbb {R}^{2}\) and \(w\in \mathbb {R}\). In particular, for the model of the antagonistic actuated joint:

$$\begin{aligned} f(x)=\left[ \begin{array}{c} \dot{q}\\ \left\{ -b_\theta \,(\dot{q} - \dot{\theta }) -b_q\dot{q} -k\,(q-\theta ) \right\} /J_q\\ \dot{\theta }\\ \left\{ - b_\theta \, (\dot{\theta }-\dot{q}) -k\,(\theta -q)\right\} /J_\theta \\ \dot{k}\\ \left\{ -b_k \dot{k} - \vartheta _k(q-\theta ,k) \right\} /J_k\\ \end{array} \right] \end{aligned}$$
(13)
$$\begin{aligned} g(x)=\left[ \begin{array}{cc} 0 &{} 0 \\ 0 &{} 0 \\ 0 &{} 0 \\ J_\theta ^{-1} &{} 0 \\ 0 &{} 0 \\ 0 &{} J_k^{-1} \end{array} \right] , \quad d(x)=\left[ \begin{array}{c} 0 \\ J_q^{-1} \\ 0 \\ 0 \\ 0 \\ 0 \end{array} \right] \end{aligned}$$
(14)
$$\begin{aligned} h(x) = \left[ \begin{array}{c} q \\ k - k_0 \end{array} \right] \end{aligned}$$
(15)

Considering the control input u and the output information \(y_c\), Eqs. (11)–(15) define a square nonlinear system that can be linearized via output feedback if suitable conditions are satisfied [40, 44, 45].

Starting from the analysis on the feedback linearization of antagonistic actuated robots carried out in the previous chapter, we have to check, first of all, some conditions on the relative degrees of the output information. In this preliminary analysis, only the controllable input u of the system is taken into account while the external torque \(\tau _e\) applied to the joint is neglected. In this case, for the output q it is possible to write:

$$\begin{aligned} L_{g_{(\theta ,k)}}L_f^i h_q(x) = 0 \quad ,\quad i=0,1 \end{aligned}$$
(16)
$$\begin{aligned} L_{g_\theta }L_f^2 h_q(x) = \frac{b_\theta }{J_\theta J_q} \end{aligned}$$
(17)
$$\begin{aligned} L_{g_k}L_f^2 h_q(x) = 0 \end{aligned}$$
(18)

while for the output S:

$$\begin{aligned} L_{g_{(\theta ,k)}} h_k(x) = 0 \end{aligned}$$
(19)
$$\begin{aligned} L_{g_\theta } L_f h_k(x) =0 \end{aligned}$$
(20)
$$\begin{aligned} L_{g_k} L_f h_k(x) = \frac{1}{J_k} \end{aligned}$$
(21)

where \(L_f^i h_q(x)\) stays for the i-th Lie derivative of h(x) with respect to the generic function f(x) and \(L_{g_\theta }\) and \(L_{g_k}\) denote the restriction of the Lie derivative respectively to the \(\tau\) and \(\tau _k\) component of the input vector while \(L_{g_{(\theta ,k)}}\) denotes both the cases above mentioned.

If the disturbance input, the external torque applied to the joint, is considered, the relative degrees of the output \(\theta\) can be defined as:

$$\begin{aligned} L_{d} h_q(x) = 0 \end{aligned}$$
(22)
$$\begin{aligned} L_{d} L_f h_q(x) = \frac{1}{J_q} \end{aligned}$$
(23)

while for the output k:

$$\begin{aligned} L_{d} L_f^i h_k(x) = 0, \quad i = [0, \ldots , 2] \end{aligned}$$
(24)

On the basis of this consideration, it is possible to state that the joint position cannot be decoupled from the external torque, while the joint stiffness is not affected by the external torque, since the relative degree of the stiffness w.r.t the control input is lower that w.r.t. the disturbance. The external torque \(\tau _e\) will be neglected in the sequel to simplify the analysis. The problem of feedback linearization under the effects of an external torque will be an object of future research.

5.1.1 Static feedback linearization

From Eqs. (16)–(21), we can state that, considering the controllable input u, the vector relative degree of q is 3 while the one of k is 2. The sum of the vector relative degrees of the output is then not equal to the dimension of the state of the system, so the conditions for the solution of the full feedback linearization problem are not satisfied [44]. Anyway, the system can be partially linearized via static feedback if it is possible to define a nonsingular coordinates transformation from the space of the original state variables to the state space of the partially linearized one [46]. To solve this problem, since the additional entries of the coordinates transformation (the ones that must be added to make the coordinates transformation nonsingular) can be arbitrary chosen, it is convenient, if possible, to make the nonlinear part of the new system independent from the inputs.

The state of the partially linearized system z can be split into the linear part:

$$\begin{aligned} \begin{aligned} z_l =&\left[ z_1 \; z_2\; z_3\; z_4\; z_5\right] ^T\\ =&\left[ q\; \dot{q}\; \ddot{q}\; k - k_0\; \dot{k}\right] ^T \end{aligned} \end{aligned}$$

and its nonlinear part:

$$\begin{aligned} z_n = z_6 \end{aligned}$$

where \(z_6\) will be chosen in suitable way as shown in the sequel. Hence, the overall system state in the new coordinate system is:

$$\begin{aligned} z = \left[ \begin{array}{c} z_l\\ z_n \end{array} \right] \end{aligned}$$
(25)

The dynamics of the partially linearized system can be then written as:

$$\begin{aligned} \dot{z_l} = A z_l + B u_l \end{aligned}$$
(26)
$$\begin{aligned} \dot{z}_n = \eta (z_l,z_n,u_l) \end{aligned}$$
(27)
$$\begin{aligned} y_c = C z_l \end{aligned}$$
(28)
$$\begin{aligned} u_l = \left[ \begin{array}{c} L_f^3 h_q(x)\\ L_f^2 h_k(x) \end{array} \right] + Q(x)u \end{aligned}$$
(29)

in which Q(x) is the so-called decoupling matrix and the matrices A, B, and C are in the Brunowsky canonical form

$$\begin{aligned} \begin{aligned} A&= \left[ \begin{array}{ccc|cc} 0 &{} 1 &{} 0 &{} 0 &{} 0\\ 0 &{} 0 &{} 1 &{} 0 &{} 0\\ 0 &{} 0 &{} 0 &{} 0 &{} 0\\ \hline 0 &{} 0 &{} 0 &{} 0&{} 1\\ 0 &{} 0 &{} 0 &{} 0 &{} 0 \end{array} \right] , \ \ B = \left[ \begin{array}{cc} 0 &{} 0\\ 0 &{} 0\\ 1 &{} 0\\ \hline 0 &{} 0\\ 0 &{} 1 \end{array} \right] , \\ C&= \left[ \begin{array}{ccc|cc} 1 &{} 0 &{} 0 &{} 0 &{} 0\\ 0 &{} 0 &{} 0 &{} 1 &{} 0 \end{array} \right] , \ \ \Phi (x)= \left[ \begin{array}{c} h_q(x)\\ L_f h_q(x)\\ L_f^2 h_q(x)\\ h_k(x)\\ L_f h_k(x)\\ \Phi _6(x) \end{array} \right] \end{aligned} \end{aligned}$$

where Eq. (27) represents the nonlinear part of the system and \(z = \Phi (x)\) represents the coordinates transformation between the original and the partially linearized system. Obviously the term \(L_f^2 h_q(x) = \ddot{q}\) can be expressed in terms of the state vector x by using the second element of Eq. (13), while \(\Phi _6(x)\) must be chosen in such a way to make the coordinate transformation \(\Phi (x)\) nonsingular.

It is important to note that the nonlinear residual part of the system \(\eta (z_l,z_n,u_l)\) is unobservable from the outputs, as can be seen looking at Eq. (28). In particular, the stability of the zero dynamics

$$\begin{aligned} \dot{z}_n = \eta (0,z_n,0) \end{aligned}$$
(30)

is a necessary condition for the controllability with bounded internal state of the overall system [44]. Looking at the first five rows of \(\frac{d \Phi (x)}{d x}\):

$$\begin{aligned} \frac{d \Phi }{dx}= \left[ \begin{array}{cccccc} 1 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0\\ 0 &{} 1 &{} 0 &{} 0 &{} 0 &{} 0\\ -\frac{k}{J_q} &{} -\frac{b_k+b_\theta }{J_q} &{} \frac{k}{J_q} &{} \frac{b_\theta }{J_q} &{} \frac{\theta -q}{J_q} &{} 0\\ 0 &{} 0 &{} 0 &{} 0 &{} 1 &{} 0\\ 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 1 \end{array} \right] \end{aligned}$$

it is clear that the third and the fourth columns are linearly dependent. Therefore, \(\Phi _6(x)\) must be choosen to make this matrix full rank. By choosing \(z_6=\dot{\theta }\)

$$\begin{aligned} \small \frac{d \Phi }{dx}= \left[ \begin{array}{cccccc} 1 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0\\ 0 &{} 1 &{} 0 &{} 0 &{} 0 &{} 0\\ -\frac{k}{J_q} &{} -\frac{b_k+b_\theta }{J_q} &{} \frac{k}{J_q} &{} \frac{b_\theta }{J_q} &{} \frac{\theta -q}{J_q} &{} 0\\ 0 &{} 0 &{} 0 &{} 0 &{} 1 &{} 0\\ 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 1\\ 0 &{} 0 &{} 0 &{} 1 &{} 0 &{} 0 \end{array} \right] \end{aligned}$$
(31)

the state space transformation \(\Phi (x)\) is nonsingular in the whole state space, and in particular in the origin (since k is always positive by assumption). The state space transformation \(\Phi (x)\) is then:

$$\begin{aligned} \begin{aligned} z_1&= q\\ z_2&= \dot{q}\\ z_3&= \left[ -b_\theta \,(\dot{q} - \dot{\theta }) -b_q\dot{q} -k\,(q-\theta ) \right] /J_q\\ z_4&= k \\ z_5&= \dot{k}\\ z_6&= \dot{\theta } \end{aligned} \end{aligned}$$

The state space transformation form the original to the linearized system can be then expressed only by means of the state space information of the original system. The dynamic equations that describe the nonlinear part of the system is then:

$$\begin{aligned} \dot{z}_6 = \left[ - b_\theta \, (\dot{\theta }-\dot{q}) -k\,(\theta -q)+ \tau \right] /J_\theta \end{aligned}$$

Even if the nonlinear residual part of the system depends on the input, it is important to note that the zero dynamics

$$\begin{aligned} \dot{z}_6 = -\frac{b_{\theta }}{J_\theta } z_6 \end{aligned}$$
(32)

is asymptotically stable in the whole state space, so the system can be controlled with bounded internal state.

To define the input of the linearized system, see Eq. (29), the nonlinear terms \(L^3_f h_q(x)\) and \(L_f^2 h_k(x)\) and the decoupling matrix Q(x) must be defined first:

$$\begin{aligned} \begin{aligned} L^3_f h_q(x)&= \frac{(b_\theta +b_q)\left[ b_\theta \,(\dot{q} - \dot{\theta }) +b_q\dot{q} +k\,(q-\theta ) \right] }{J_q^2}+\\&-\frac{k(\dot{q}-\dot{\theta })}{J_q} -\frac{ b_\theta ^2\, (\dot{\theta }-\dot{q}) + b_\theta k\,(\theta -q)}{J_\theta J_q}\\ L_f^2 h_k(x)&= \frac{4\,a_2(q-\theta )(\dot{q} -\dot{\theta })}{J_k} +\frac{k\,\dot{k}}{4\,a_2 J_k}+\\&+ \frac{b_k^2 \dot{k} + b_k\vartheta _k(q-\theta ,k)}{J_k^2} \end{aligned} \end{aligned}$$

By considering Eqs. (17)–(21), the decoupling matrix Q(x) is defined as

$$\begin{aligned} Q(x) = \left[ \begin{array}{cc} \frac{b_\theta }{J_\theta J_q} &{} 0 \\ 0 &{} \frac{1}{J_k} \end{array} \right] \end{aligned}$$
(33)

that is always nonsingular. The control law that allows to obtain the linearized system is then:

$$\begin{aligned} u = Q^{-1}(x) \left( \left[ \begin{array}{c} -L_f^3 h_q(x) \\ -L_f^2 h_k(x) \end{array} \right] + \left[ \begin{array}{c} v_q\\ v_k \end{array} \right] \right) \end{aligned}$$
(34)

where \(v=\left[ v_q~~ v_k \right] ^T\) is the new input of the system. Note that this control law is static, since it can be be computed directly from the system state information x and from the new reference input v. The dynamics of the system Eqs. (26)–(29) is, in the z coordinates:

$$\begin{aligned} \dot{z_l} = A z_l + B v \end{aligned}$$
(35)
$$\begin{aligned} \dot{z}_n = \eta (z_l,z_n,v) \end{aligned}$$
(36)
$$\begin{aligned} y_c = C z_l \end{aligned}$$
(37)

By recalling the definition of the matrices A, B, and C, it is possible to write:

$$\begin{aligned} \left[ \begin{array}{c} q^{[3]}\\ \ddot{k} \end{array} \right] = \left[ \begin{array}{c} v_q\\ v_k \end{array} \right] \end{aligned}$$
(38)

An important point to note is that if the damping coefficient of the transmission elements \(b_\theta\) tends to zero (considering also the case in which \(b_\theta\) can be neglected), the control law Eq. (34) becomes ill conditioned and the zero dynamics Eq. (32) is not exponentially stable anymore.

Due to the structure of the matrices A, B, and C, the system described by Eqs. (35) and (37) is completely controllable and observable, while Eq. (36) represents its unobservable part. This implies that the state \(z_l\) can be estimated by means of an asymptotic state observer and of the change of coordinates \(\Phi (x)\) or, since the position of each rigid body is directly measurable, the velocities can be estimated in many ways, e.g., by means of state variable filters or adaptive windowing algorithms [47].

For the control of the partially linearized system, an outer control loop can be used to solve the problem of simultaneous decoupled stiffness and position trajectory tracking. From Eq. (38), applying the control laws:

$$\begin{aligned} \begin{aligned} v_q&= q_d^{[3]} + K_{2_q}[\ddot{q}_d-L_f^2 h_q(x)] + K_{1_q} [\dot{q}_d-L_f h_q(x)] +\\&+ K_{0_q} [q_d- h_q(x)] \end{aligned} \end{aligned}$$
(39)
$$\begin{aligned} v_k = \ddot{k}_d + K_{1_k}[\dot{k}_d- L_f h_k(x)] + K_{0_k}[k_d- h_k(x)] \end{aligned}$$
(40)

where \(K_{2_q}\), \(K_{1_q}\), \(K_{0_q}\), \(K_{1_k}\), and \(K_{0_k}\) are such that

$$\begin{aligned} \lambda ^3 + \lambda ^2 K_{2_q} + \lambda K_{1_q} + K_{0_q} = 0 \end{aligned}$$
(41)
$$\begin{aligned} \lambda ^2 + \lambda K_{1_k} + K_{0_k} = 0 \end{aligned}$$
(42)

are Hurwitz polynomials, the convergence to zero of the tracking error is ensured. If the desired trajectories \(q_d\) is continuous together with its derivatives up to 3th and \(k_d\) is continuous together with its fist derivative, also the asymptotic trajectory tracking is achieved. The control law in Eqs. (39) and (40) is equivalent to a static state feedback plus feedforward in the state space of the linearized system:

$$\begin{aligned} v = v_d + K (z_d - \Phi _{(q,k)}(x)) \end{aligned}$$
(43)
$$\begin{aligned} v_d = \left[ \begin{array}{cc} q_d^{[3]}&\ddot{k}_d \end{array} \right] ^T, \quad z_d = \left[ \begin{array}{ccccc} q_d&\dot{q}_d&\ddot{q}_d&k_d&\dot{k}_d \end{array} \right] ^T \end{aligned}$$
(44)
$$\begin{aligned} K = \left[ \begin{array}{ccccc} K_{0_q} &{} K_{1_q} &{} K_{2_q} &{} 0 &{} 0\\ 0 &{} 0 &{} 0 &{} K_{0_k}&{} K_{1_k} \end{array} \right] \end{aligned}$$
(45)

and \(\Phi _{(q,k)}(x)\) stays for the restriction of the coordinate transformation to the state component \(z_l\):

$$\begin{aligned} \Phi _{(q,k)}(x) = z_l = \left[ \begin{array}{c} q\\ \dot{q}\\ \left\{ -b_\theta \,(\dot{q} - \dot{\theta }) -b_q\dot{q} -k\,(q-\theta ) \right\} /J_q\\ k \\ \dot{k}\\ \end{array} \right] \end{aligned}$$
(46)

The matrix K can be also obtained via direct eigenvalues assignment or through the solution of the CARE equation with an opportune choice of the weight matrices.

5.1.2 Dynamic feedback linearization

Since the sum of the relative degrees of the inputs is not equal to the dimension of the state space of the system, to achieve full state linearization and to solve the problem of a vanishing damping factor \(b_\theta\), a dynamic feedback compensator must be designed.

By choosing, for the linearized system, the new state vector:

$$\begin{aligned} z=\left[ q ~~ \dot{q} ~~ \ddot{q} ~~ q^{[3]} ~~ k - k_0 ~~ \dot{k} \right] ^T \end{aligned}$$
(47)

the dynamics of the linearized system can be then written as:

$$\begin{aligned} \dot{z} = A z + B u_l \end{aligned}$$
(48)
$$\begin{aligned} y_c = C z \end{aligned}$$
(49)
$$\begin{aligned} u_l = \left[ \begin{array}{c} L_f^4 h_q(x)\\ L_f^2 h_k(x) \end{array} \right] + \left[ \begin{array}{c} q_1\\ 0 \end{array} \right] \dot{u}_q + \left[ \begin{array}{c} r_1\\ 0 \end{array} \right] u_q + \left[ \begin{array}{c} 0\\ \frac{1}{J_k} \end{array} \right] u_k \end{aligned}$$
(50)

where

$$\begin{aligned} q_1 = \frac{b_\theta }{J_\theta J_q}, \quad r_1 = -\frac{b_\theta (b_\theta +b_q)}{J_q^2J_\theta } + \frac{k}{J_qJ_\theta } - \frac{b_\theta ^2}{J_qJ_\theta ^2} \end{aligned}$$

while the matrices A, B and C change in:

$$\begin{aligned} A = \left[ \begin{array}{cccc|cc} 0 &{} 1 &{} 0 &{} 0 &{} 0 &{} 0\\ 0 &{} 0 &{} 1 &{} 0 &{} 0 &{} 0\\ 0 &{} 0 &{} 0 &{} 1 &{} 0 &{} 0\\ 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0\\ \hline 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 1\\ 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0 \end{array} \right] , \ \ B = \left[ \begin{array}{cc} 0 &{} 0\\ 0 &{} 0\\ 0 &{} 0\\ 1 &{} 0\\ \hline 0 &{} 0\\ 0 &{} 1 \end{array} \right] , \ \ \end{aligned}$$
(51)
$$\begin{aligned} C = \left[ \begin{array}{cccc|cc} 1 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0\\ 0 &{} 0 &{} 0 &{} 0 &{} 1 &{} 0 \end{array} \right] \end{aligned}$$
(52)

The expression of \(L^4_f h_q(x)\) is not reported for brevity, since it can be derived by computing the Lie derivative of \(L^3_f h_q(x)\) with respect to f(x), but it is important to note that, also in this case, it is an algebraic function of the system state x. Moreover, note that if the coefficient \(b_\theta\) vanishes in Eq. (50), it is possible to show that the case of static feedback linearization with no damping in the transmission elements is recovered. The coordinates transformation between the original and the linearized system is then:

$$\begin{aligned} \Phi (x)= \left[ h_q(x)\;L_f h_q(x)\;L_f^2 h_q(x)\;L_f^3 h_q(x)\;h_k(x)\;L_f h_k(x)\right] ^T \end{aligned}$$
(53)

Now, by defining the dynamic compensation law:

$$\begin{aligned} \dot{u}_q = \frac{1}{q_1}\left[ -L_f^4 h_q(x)- r_1 u_q + v_q\right] \end{aligned}$$
(54)
$$\begin{aligned} u_k = J_k \left[ -L_f^2 h_k(x) + v_k \right] \end{aligned}$$
(55)

we obtain the fully linearized system

$$\begin{aligned} \dot{z} = A z + B v \end{aligned}$$
(56)
$$\begin{aligned} y_c = C z \end{aligned}$$
(57)

that, together with Eq. (54), give the whole dynamics of VSA joint plus the dynamic controller. By recalling the definition of the matrices A, B, and C in Eq. (51), it is possible to write:

$$\begin{aligned} \left[ \begin{array}{c} q^{[4]}\\ \ddot{k} \end{array} \right] = \left[ \begin{array}{c} v_q\\ v_k \end{array} \right] \end{aligned}$$
(58)

The zero dynamics of the system is now inside the controller:

$$\begin{aligned} \dot{u}_q = \frac{r_1(0)}{q_1} u_q = -\frac{2\,b_\theta +b_q}{J_q} u_q \end{aligned}$$
(59)

Hence, the zero dynamics of the system is clearly asymptotically stable. Also in this case, an outer control loop can be used to achieve trajectory tracking. By posing \(v=[v_q~~ v_k]^T\), the control law:

$$\begin{aligned} v = v_d + K [z_d - \Phi (x)] \end{aligned}$$
(60)
$$\begin{aligned} v_d = \left[ q_d^{[4]}\quad \ddot{k}_d\right] ^T \end{aligned}$$
(61)
$$\begin{aligned} z_d = \left[ q_d \quad \dot{q}_d \quad \ddot{q}_d \quad q_d^{[3]} \quad k_d \quad \dot{k}_d\right] ^T \end{aligned}$$
(62)
$$\begin{aligned} K = \left[ \begin{array}{cccccc} K_{0_q} &{} K_{1_q} &{} K_{2_q} &{} K_{3_q} &{} 0 &{} 0 \\ 0 &{} 0 &{} 0 &{} 0 &{}K_{0_k} &{} K_{1_k} \end{array} \right] \end{aligned}$$
(63)

6 Elbow joint physical prototyping

A physical prototype of the device was produced by additive manufacturing and tested to verify its functionality. Figure 12 shows the actual change in stiffness of the joint with a 1-kg weight attached to the end of the forearm section. Stiffness values of 15 830 and 2417 N mm/rad were achieved in the maximum and minimum stiffness configurations, respectively.

Fig. 12
figure 12

Device subjected to 1 kg load in the maximum (left) and minimum (right) stiffness configurations

Fig. 13
figure 13

Joint position setpoints

Fig. 14
figure 14

Stiffness setpoints

Fig. 15
figure 15

Stiffness errors

Fig. 16
figure 16

Stiffness errors during sine motion

Fig. 17
figure 17

Sine position errors

Fig. 18
figure 18

Step position error

To validate the control algorithm presented in Sect. 5, the physical prototype used in the previous work [41] (see Fig. 3) was subjected to further experimental tests to compare the results. In particular, the errors related to the position and stiffness of the joint were compared in the following cases: (a) static feedback control without damping; (b) static feedback control with damping; and (c) dynamic feedback control with damping. All three cases were considered by providing the joint with both a sinusoidal and stepwise position setpoint (Fig. 13) and a stepwise stiffness adjustment (Fig. 14) evaluated both individually (Fig. 15) and during sine motion (Fig. 16).

Figures 17 and 18 reveal that the positional error was considerably reduced when moving from case a (static feedback without damping) to cases b and c (static and dynamic feedback with damping, respectively), which take the damping of the material into consideration. This demonstrates the need for a dynamic feedback linearization algorithm that explicitly considers the viscoelasticity of the CTEs.

7 Conclusion

This article reports the design of a variable stiffness elbow joint using a pair of motors and two nonlinear CTEs with an antagonistic configuration. The design of the device, which features a reduced number of components and is suitable for 3D printing prototyping, matches the appearance of a human upper limb so that it can be used as a prosthesis or as a component of a humanoid robot. The CTEs, consisting of two rigid rings connected by four beams with distributed compliance, were designed to have nonlinear characteristics and provide maximum variation in stiffness while remaining within the defined maximum dimensions of the device. Subsequent FEA and experimental tests confirmed the design values. Non-negligible hysteresis was present, which was counteracted by a robust control strategy that was experimentally verified using a simplified setup. Future work will extend the experimental testing of the final device both in the laboratory and in situations of normal daily use. In addition, a control system using electromyography signals will be implemented for use by amputees.