1 Introduction

Robotic manipulation systems are very popular in different types of applications [1, 2], mainly in industry; however, nowadays other areas such as medical services are taking advantage of these systems in human–robot interaction tasks [3]. Among the main medical applications are rehabilitation and assistance due to the repetitive nature of the therapies, and because the recovery progress of a patient is directly related to the quality and quantity of the repetitions carried out during the therapy process [4].

Furthermore, research into the design of control algorithms for robot manipulators has been in constant development during recent decades. However, many of these control algorithms assume that robotic actuators can provide any force/torque value, which is impossible in practice since actuators can only supply up to a maximum torque value and generate movement up to a maximum speed [5]. In human–robot interaction tasks, if the actuators operate outside such limit values, the robot could harm the human user or itself. Therefore, for reliable and safe human–robot interaction, it is important to design control schemes that ensure closed-loop stability and the generation of bounded control actions considering the saturation effect of actuators.

In order to solve this problem, various control structures with bounded actions have been proposed, such as output feedback proportional–integral–derivative (PID)-type schemes for global position stabilization, saturating PD\(+\) control schemes for trajectory tracking, saturating PD-type controllers, among others [5,6,7]. These control schemes have been efficiently used for unconstrained motion tasks; nevertheless, most of the robotic systems used in medicine are in direct contact with a patient [8,9,10]; therefore, constrained motion control techniques are required to regulate human–robot interaction.

One of the main techniques to regulate the constrained motion of robot manipulators is impedance control. This methodology relates position and velocity errors to contact forces to generate adequate interaction dynamics by changing the mechanical impedance of the manipulator and its environment [11]. Recently, some advanced impedance-based schemes such as hybrid position/impedance control, variable impedance control for physical human–robot interaction, or inverse reinforcement learning controllers have been proposed [12,13,14]. Similarly, various adaptive impedance control schemes have been proposed for interaction tasks where there is parametric uncertainty [15], such as reinforcement learning control [16], visual guidance control [17], discontinuous force-based control [18], iterative control and kinesthetic teaching [19], and finite-time control [20, 21]. However, despite its adequate performance, these schemes do not address the actuator saturation effect and some omit the stability analysis or do not guarantee global closed-loop stability. Other proposals such as [22,23,24] avoid actuator saturation and consider bounded velocity and acceleration, respectively; however, the structure of such control schemes does not guarantee the generation of directly bounded actions, but rather limits the range of selection of control gains to achieve it, and this may compromise or limit the correct performance of the system. Early interaction control approaches that ensure the generation of bounded actions have made use of generalized saturation functions but have focused on addressing the problem of regulation (position control) through stiffness control [25, 26], while our proposal addresses the tracking or motion control (position and velocity control) in constrained space by using impedance control.

Most of the force/impedance control schemes are task-space (Cartesian) controllers and use force/torque sensors to estimate external forces and torques due to the robot–environment interaction; nevertheless, this entails a mapping from joint space to Cartesian space and may cause singularities. In order to work in joint space and avoid singularities in human–robot interaction tasks, we can employ the electromyographic signal (EMG) to reflect the user’s muscle activation and movement intention [27]. This signal has been effectively used in impedance control schemes as in [28] where the EMG is employed to estimate impedance parameters and a force/torque sensor is needed for calibration purposes, while in [29] the EMG is used to estimate human force, but a force sensor is also used to train an artificial neural network. Recently, in [30] the authors proposed a sensor-less impedance controller by using extended Kalman filters; however, these EMG-based controllers do not allow the generation of bounded control actions.

As far as we know, and from the literature review carried out, control schemes proposed for human–robot interaction tasks do not consider the physical limits of the actuators and a stability analysis is seldom included. Most controllers work in Cartesian space, so they are sensitive to singularities and require force/torque sensors or estimators that measure user intent in a more natural way. To overcome these limitations, we present a joint-space impedance controller with bounded actions that makes use of EMG to estimate the user’s joint torque during human–robot interaction. It should be noted that the proposed scheme combines the main features of the schemes presented in [7, 31, 32], including a nonlinear PD+ structure based on generalized saturation functions for impedance control and external torque compensation based on EMG and the Hill muscle model. The correct performance of the proposed control scheme is supported by a stability analysis in the Lyapunov sense and numerical simulation results in human–robot interaction tasks.

2 Preliminaries

2.1 Notation and Definitions

Let \(A \in \mathbb {R}^{n \times m}\) and \(y\in \mathbb {R}^n\), while \(A_i\) is the ith row vector of matrix A, \(A_{ij}\) is the element of matrix A located in the ith row and the jth column, and \(y_i\) represents the ith element of vector y. The origin of \(\mathbb {R}^n\) is denoted by \(0_n\), and the \(n\times \ n\) identity matrix is represented as \(I_n\). The Euclidean norm of vectors and the induced norm of matrices are denoted by \(\Vert y\Vert =y^Ty\) and \(\Vert A\Vert =\lambda _\mathrm{max}\{A^TA\}\), respectively, where \(\lambda _\mathrm{max}\{{A}^TA\}\) is the maximum eigenvalue of matrix \(A^TA\).

Let \(\mathcal{C}^k(\cdot )\) be the set of k-times continuously differentiable functions. Now, let \(\zeta :\mathbb {R}\longmapsto \mathbb {R}\) be a continuously differentiable scalar function and \(\varphi :\mathbb {R}\longmapsto \mathbb {R}\) be a locally Lipschitz, continuous, scalar function, both vanishing at zero, i.e., \(\zeta \left( 0\right) =\varphi \left( 0\right) =0\). In addition, \(\zeta ^\prime \) represents the derivative of \(\zeta \) with respect to its argument, i.e., \(\zeta ^\prime \left( \varsigma \right) =\partial \zeta \left( \varsigma \right) /\partial \varsigma \). While the upper right-hand derivative of \(\varphi \) is given by \(D^+\varphi \left( \varsigma \right) =\lim \sup _{h\rightarrow 0^+}{[\varphi (\varsigma + h)-\varphi (\varsigma )]/h}\), \(\forall \varsigma \in \mathbb {R}\), thus \(\varphi \left( \varsigma \right) =\int _{0}^{\varsigma }{D^+\varphi \left( r\right) \mathrm{d}r}\) [33].

Definition 1

A nondecreasing Lipschitz continuous function \(\sigma : \mathbb {R} \rightarrow \mathbb {R}\) bounded by \(M > 0\) is a generalized saturation function (GSF) if

  1. (a)

    \(\varsigma \sigma (\varsigma ) > 0, \forall \varsigma \ne 0.\)

  2. (b)

    \(|\sigma (\varsigma )| \le M, \forall \varsigma \in \mathbb {R}\).

  3. (c)

    In addition, if \(\sigma (\varsigma ) = \varsigma \) when \(|\varsigma | \le L\), for some \(0 < L \le M\), then \(\sigma \) is a linear generalized saturation function (L-GSF) for (LM).

Furthermore, the function \(\sigma \) satisfies the following properties for a constant \(k > 0\) [34, 35]:

  1. 1.

    \(\lim _{|\varsigma |\rightarrow \infty } D^+ \sigma (\varsigma ) = 0\).

  2. 2.

    \(\exists \sigma '_M \in (0,\infty )\) : \(0 \le D^+ \sigma (\varsigma ) \le \sigma '_M, \forall \varsigma \in \mathbb {R}\).

  3. 3.

    \(\frac{\sigma ^2(k\varsigma )}{2k\sigma '_M} \le \int _{0}^{\varsigma } \sigma (k r) \mathrm{d}r \le \frac{k \sigma '_M \varsigma ^2 }{2}, \forall \varsigma \in \mathbb {R}\).

  4. 4.

    \(\int _{0}^{\varsigma } \sigma (k r) \mathrm{d}r > 0, \forall \varsigma \ne 0\).

  5. 5.

    \(\int _{0}^{\varsigma } \sigma (k r)\mathrm{d}r \rightarrow \infty \) as \(\varsigma \rightarrow \infty \).

  6. 6.

    If \(\sigma \) is strictly increasing, then

    1. a.

      \(\varsigma [ \sigma (\varsigma + \eta ) - \sigma (\eta ) ] > 0, \forall \varsigma \ne 0, \forall \eta \in \mathbb {R}\).

    2. b.

      \(\bar{\sigma } (\varsigma ) = \sigma (\varsigma + a) - \sigma (a)\) is a strictly increasing generalized saturation function (SI-GSF), for any constant \(a \in \mathbb {R}\) and bounded by \(\bar{M} = M + |\sigma (a)|\).

  7. 7.

    If \(\sigma \) is a linear saturation for (LM), then, for any continuous function \(\nu : \mathbb {R} \mapsto \mathbb {R}\) such that \(|\nu (\eta )| < L, \forall \eta \in \mathbb {R}\), it holds that \(\varsigma [ \sigma (\varsigma + \nu (\eta )) - \sigma (\nu (\eta )) ] >0, \forall \varsigma \ne 0, \forall \eta \in \mathbb {R}\).

2.2 Dynamic Model of Robot Manipulators

The Euler–Lagrange dynamical equation in joint space for robot manipulators, with n degrees of freedom, is given by

$$\begin{aligned} H(q)\ddot{q}+C(q,\dot{q})\dot{q}+F\dot{q}+g(q)=\tau -\tau _e \end{aligned}$$
(1)

where \(q\in \mathbb {R}^n\), \(\dot{q}\in \mathbb {R}^n\), and \(\ddot{q}\in \mathbb {R}^n\) are the joint position, velocity, and acceleration vectors, respectively. \(H(q)\in \mathbb {R}^{n\times n}\), \(C(q,\dot{q})\in \mathbb {R}^{n\times n}\), and \(F\in \mathbb {R}^{n\times n}\) are matrices of inertia, centripetal, and Coriolis and viscous friction torques, respectively. Finally, \(g(q)\in \mathbb {R}^n\), \(\ \tau \in \mathbb {R}^n\) and \(\tau _e \in \mathbb {R}^m\) are vectors of gravitational, control, and external interaction torques, respectively.

The following properties of the dynamic model (1) are useful for further analysis [36].

Property 1

H(q) and F are positive definite symmetric matrices, even F is diagonal.

Property 2

For some constants \(\mu _M\ge \mu _m>0\), H(q) satisfies \(\mu _mI_n\le H(q)\le \mu _MI_n\), \(\forall q\in \mathbb {R}^n\).

Property 3

For robots with only revolute joints, H(q) is bounded on \(\mathbb {R}^{n\times n}\) in such a way that \(\left\| H_i(q)\right\| \le \mu _{Mi}\), \(\forall q\in \mathbb {R}^n\) and nonnegative constants \(\mu _{Mi}\), \(i=1,\ldots ,n\).

Property 4

\(C(q,\dot{q})\) and \({\dot{H}}(q,\dot{q}) \triangleq \frac{dH(q)}{dt}\) satisfy \({\dot{q}}^T\left[ {\dot{H}}(q,\dot{q})-2C(q,\dot{q})\right] \dot{q}=0\) and actually \({\dot{H}}(q,\dot{q})=C(q,\dot{q})+C^T(q,\dot{q})\), \(\forall (q,\dot{q}) \in \mathbb {R}^n \times \mathbb {R}^n\).

Property 5

The matrix \(C(q,\dot{q})\) satisfies \(C(w, x+y)z = C(w, x)z + C(w, y)z\) and \(C(x,y)z=C(x,z)y\), \(\forall w,x,y,z \in \mathbb {R}^n\).

Property 6

For some constant \(k_c\ge 0\), \(C(q,\dot{q})\) satisfies \(\Vert C(x,y)z\Vert \le k_c \Vert y\Vert \Vert z\Vert \), \(\forall x,y,z\in \mathbb {R}^n\). In addition, there are nonnegative constants \(k_{ci}\) such that \(|C_i(x,y)z| \le k_{ci} \Vert y\Vert \Vert z\Vert \), \(i=1,\ldots ,n\), \(\forall x,y,z\in \mathbb {R}^n\)

Property 7

For some constants \(f_M\ge f_m>0\), F satisfies \(f_m\Vert x\Vert ^2 \le x^TFx \le f_M\Vert x\Vert ^2\), \(\forall x\in \mathbb {R}^n\). In addition, as F is a diagonal matrix, there are nonnegative constants \(f_{Mi}\) such that \(|F_i x| \le f_{Mi}\Vert x\Vert \), \(i=1,\ldots ,n\), \(\forall x\in \mathbb {R}^n\).

Property 8

For robots with only revolute joints, g(q) is bounded on \(\mathbb {R}^n\) in such a way that \(\left| g_i(q)\right| \le B_{gi}\), \(\forall q\in \mathbb {R}^n\) and nonnegative constants \(B_{gi}\), \(i=1,\ldots ,n\).

Property 9

The left-hand side of the dynamic model (1) is linear with respect to its parameters; therefore, it can be rewritten as

$$\begin{aligned} H(q,\theta )\ddot{q}+C(q,\dot{q},\theta )\dot{q}+F(\theta )\dot{q}+g(q,\theta )=Y(q,\dot{q},\ddot{q})\theta \end{aligned}$$
(2)

where \(Y(q,\dot{q},\ddot{q})\in \mathbb {R}^{n\times p}\) is a regression matrix and \(\theta \in \mathbb {R}^p\) is a constant vector of robot parameters. Now, let \(\theta _{Ml} > 0\) be an upper bound of \(|\theta _l|\), i.e., \(|\theta _l|\le \theta _{Ml}\) \(\forall l \in \{1, ..., p\}\), \(\theta _M\triangleq (\theta _{M1}, ..., \theta _{Mp})^T\), and \(\Theta \triangleq [-\theta _{M1},\theta _{M1}] \times \cdots \times [-\theta _{Mp},\theta _{Mp}]\), also let \(\mathcal{X}\) and \(\mathcal{Y}\) be compact subsets of \(\mathbb {R}^n\); by Properties 2, 6, 7, and 8, there are constants \(B_{Di}>0\) such that \(\left| Y_i(w,x,y)z\right| \le \ B_{Di}\), \(\forall \ w\in \mathbb {R}^n\), \((x,y) \in \mathcal{X} \times \mathcal{Y}\) and \(\forall \ z\in \Theta \).

Assumption 1

For robots with bounded inputs, each element of vector \(\tau \) is bounded by \(T_i>0\), i.e., \(\left| \tau _i\right| \le T_i\), \(i=1, \ldots , n\). Assume that

$$\begin{aligned} \tau _i=T_i\mathrm{sat}\left( \frac{u_i}{T_i}\right) \end{aligned}$$
(3)

where \(\mathrm{sat}(\cdot )\) is the standard saturation function, i.e., \(\mathrm{sat}(\varsigma )=\mathrm{sign}(\varsigma ) \mathrm{min}\{|\varsigma |,1\}\) and \(u_i\) denotes the ith control signal.

2.3 External Interaction Torque Model

In order to model the torques generated by human–robot interaction, the Hill-type muscle model is considered. Hill’s model allows us to relate the muscle activity represented by the electromyographic signal (EMG) to the muscle forces/torques generated in a certain joint.

The EMG must be processed and conditioned before use within Hill’s model. First, the signal amplitude (aEMG) must be obtained and at least the following elements are required: a) high-pass filter with cutoff frequency between 10 and 30 Hz, b) rectifier, and c) low-pass filter with cutoff frequency between 2 and 10 Hz. Next, the maximum voluntary contraction (MVC) of the user must be obtained and the aEMG using the MVC value is normalized [32].

Assume that m muscles are involved in the generation of the ith joint torque, then the aEMG of each of these muscles (\(a_{EMGj}\)) is used to obtain the muscle activation given by

$$\begin{aligned} a_j(t)=\frac{\mathrm{e}^{k_{Aj} a_{EMGj}(t)}-1}{\mathrm{e}^{k_{Aj}}-1} \end{aligned}$$
(4)

where \(j \in \{1, ..., m\}\), \(-3 \le k_A < 0\) represents the nonlinearity between neuronal and muscular activation. According to Hill’s model, the muscle–tendon force is obtained as

$$\begin{aligned} f_{MTj}=[f_{MAj}+f_{MPj}]\cos {\theta _j} \end{aligned}$$
(5)

where \(\theta _j\) is the pennation angle of jth muscle fibers and

$$\begin{aligned} f_{MAj}= & {} f_{Aj} f_{Vj} f_{M0j} a_j(t) \end{aligned}$$
(6)
$$\begin{aligned} f_{MPj}= & {} f_{Pj} f_{M0j} \end{aligned}$$
(7)

are the components of active and passive muscle force, respectively, with \(f_{M0j}\) being the jth maximum (optimal) isometric force and, according to [32],

$$\begin{aligned} f_{Aj}= & {} \left\{ \begin{array}{lr} h_{0j}+h_{1j} l_j+h_{2j} l_j^2, &{} \text {for } 0.5 < l_j \le 1.5\\ 0, &{} \mathrm{otherwise} \end{array} \right. \end{aligned}$$
(8)
$$\begin{aligned} f_{Vj}= & {} 1 \end{aligned}$$
(9)
$$\begin{aligned} f_{Pj}= & {} \mathrm{e}^{10 l_j-15} \end{aligned}$$
(10)

where \(l_j\) represents the jth normalized muscle length and \(h_{0j}\), \(h_{1j}\), and \(h_{2j}\) are constant parameters that are chosen according to the force–length curve adjustment algorithm [37].

Finally, the joint torque is given by

$$\begin{aligned} u_{ei} = \sum _{j=1}^m f_{MTj}r_j \end{aligned}$$
(11)

where \(i \in \{1, ..., n\}\) and \(r_j\) is the moment arm of jth muscle.

Assumption 2

The muscle torques are bounded and can be modeled using GSFs in such a way that

$$\begin{aligned} \tau _{ei} = \sigma _{e_i}(u_{ei}) \end{aligned}$$
(12)

where \(\sigma _{ei}\) are linear SI-GSFs bounded by \((L_{ei}, M_{ei})\), \(\forall i \in \{1, ..., n\}\).

3 Impedance Control with Bounded Actions

3.1 Definition of the Control Problem

The impedance control approach presented in this paper corresponds to a generalization of motion control in joint space by choosing a desired trajectory \(q_d(t) \in \mathbb {R}^n\) while respecting the following dynamic relationship:

$$\begin{aligned} q-q_d=\mathcal{F}(s)\tau _e \end{aligned}$$
(13)

where

$$\begin{aligned} \mathcal{F}(s)=[H_E s^2 + D_E s + K_E]^{-1} \end{aligned}$$
(14)

with \(H_E=\mathrm{diag}[h_{E1},...,h_{En}]\), \(D_E=\mathrm{diag}[d_{E1},...,d_{En}]\), and \(K_E=\mathrm{diag}[k_{E1},...,k_{En}]\) being positive definite matrices of inertia, damping, and stiffness, respectively, and s representing the Laplace complex variable. Then, the impedance error in joint space can be defined as

$$\begin{aligned} \bar{\xi }\triangleq \bar{q}-q_e \end{aligned}$$
(15)

where \(\bar{q}=q-q_d \in \mathbb {R}^n\) is the position error and \(q_e=\mathcal{F}(s)\tau _e\) represents an adjustment to the position or path to follow due to robot–environment interaction.

Assumption 3

The reference trajectory to be tracked \(q_d\) belongs to \(Q_d \triangleq \left\{ q_d \in \mathcal{C}^2(\mathbb {R}_+;\mathbb {R}^n): \Vert \dot{q}_d(t)\Vert \le B_{dv}, \Vert \ddot{q}_d(t)\Vert \le B_{da}, \forall t \ge 0 \right\} \)

Assumption 4

The vector \(q_e\) and its time derivatives \(\dot{q}_e\) and \( \ddot{q}_e\) are bounded; then, there are nonnegative constants such that \(|q_{ei}|\le B_{epi}\), \(\Vert q_e\Vert \le B_{ep}\), \(|\dot{q}_{ei}|\le B_{evi}\), \(\Vert \dot{q}_e\Vert \le B_{ev}\), \(|\ddot{q}_{ei}|\le B_{eai}\) and \(\Vert \ddot{q}_e\Vert \le B_{ea}\), respectively, and satisfying that

$$\begin{aligned} k_{Ei}\ge & {} M_{ei}/B_{epi} \end{aligned}$$
(16)
$$\begin{aligned} h_{Ei}\ge & {} B_{eai}/B_{evi} \end{aligned}$$
(17)
$$\begin{aligned} d_{Ei}\ge & {} 1.25 k_{Ei} h_{Ei} \end{aligned}$$
(18)

The control problem addressed in this paper is to achieve an adequate robot–environment interaction while tracking a time-varying trajectory without exceeding the maximum torque limits of robot actuators. Therefore, the goal of our impedance control approach consists of designing u in such a way that

$$\begin{aligned} \lim _{t \rightarrow \infty } \bar{\xi }= & {} 0 \end{aligned}$$
(19)
$$\begin{aligned} \tau _i< & {} T_i \end{aligned}$$
(20)

\(\forall t \ge 0\), \(i=1, ..., n\).

3.2 Saturating Impedance Controller

In order to control the robot–environment interaction while respecting the saturation limits of the robotic system and operating directly in the joint space to avoid singularities, the following impedance control scheme is proposed:

$$\begin{aligned} u=-s_P(K_P\bar{\xi })-s_D(K_D \dot{\bar{\xi }})+Y(q,\dot{q}_h, \ddot{q}_h)\theta + \tau _e \end{aligned}$$
(21)

where, according to Property 9,

$$\begin{aligned} Y(q,\dot{q}_h, \ddot{q}_h)\theta= & {} H(q,\theta )\ddot{q}_h+C(q,\dot{q}_h,\theta )\dot{q}_h\nonumber \\&+F(\theta )\dot{q}_h+g(q,\theta ) \end{aligned}$$
(22)

with \(\dot{q}_h=\dot{q}_d+\dot{q}_e\) and \(\ddot{q}_h=\ddot{q}_d+\ddot{q}_e\); \(K_P=\mathrm{diag}[k_{P1},...,k_{Pn}]\); and \(K_D=\mathrm{diag}[k_{D1},...,k_{Dn}]\) being positive definite matrices of proportional and derivative gains, respectively, while \(s_P(x)={(\sigma _{P1}(x_1),...,\sigma _{Pn}(x_n))}^T\) and \(s_D(x)={(\sigma _{D1}(x_1),...,\sigma _{Dn}(x_n))}^T\) with \(\sigma _{Pi}(\cdot )\) and \(\sigma _{Di}(\cdot )\) being continuously differentiable GSFs bounded by \(M_{Pi}\) and \(M_{Di}\), respectively. In addition,

$$\begin{aligned} \left\| s_D(K_D \dot{\bar{\xi }})\right\| \le \kappa \left\| \dot{\bar{\xi }}\right\| \end{aligned}$$
(23)

where \(\kappa =\max _i\{\sigma '_{DiM}k_{Di}\}\).

In addition, according to Property 9 and Assumptions 14, and considering a robot manipulator with actuators to ensure that \(|Y_i(q,\dot{q}_h, \ddot{q}_h)\theta + \tau _{ei}|< T_i\), the controller (21)–(22) produces bounded actions if \(M_{Pi}\) and \(M_{Di}\) satisfy

$$\begin{aligned} M_{Pi} + M_{Di} < T_i - B_{Di} - M_{ei} \end{aligned}$$
(24)

\(\forall i=1, ..., n\), where

$$\begin{aligned} B_{Di}=\mu _{Mi}B_{ha}+k_{ci}B_{hv}^2+f_{Mi}B_{hv}+B_{gi} \end{aligned}$$
(25)

with \(B_{ha}=B_{da} + B_{ea}\) and \(B_{hv}=B_{dv} + B_{ev}\).

3.3 Closed-Loop Analysis

By combining the robot model (1), the environment model (12), and the control scheme (21)–(22), the closed-loop dynamics (with abuse of notation) can be represented as

$$\begin{aligned}&\frac{d}{dt}\left[ \begin{array}{c} \bar{\xi } \\ \dot{\bar{\xi }} \end{array} \right] \nonumber \\&\quad = \left[ \begin{array}{c} \dot{\bar{\xi }} \\ H^{-1}(q)\left\{ -s_P(K_P\bar{\xi })-s_D(K_D \dot{\bar{\xi }}) -[C(q,\dot{q})\right. \\ \left. +C(q,\dot{q}_h)]\dot{\bar{\xi }} - F\dot{\bar{\xi }}\right\} \end{array} \right] \end{aligned}$$
(26)

where Property 5 has been considered. Now, under stationary conditions \(\dot{\bar{\xi }}=\ddot{\bar{\xi }}=0_n\) we obtain that

$$\begin{aligned} -s_P\left( K_P\bar{\xi }\right)= & {} 0_n \end{aligned}$$
(27)

Then, \(\bar{\xi }=\dot{\bar{\xi }}=0_n\) is the unique equilibrium vector.

3.4 Lyapunov Stability Analysis

In order to analyze the stability of closed-loop equilibrium vector, consider the following scalar candidate function:

$$\begin{aligned} V(t,\bar{\xi },\dot{\bar{\xi }})&= \frac{1}{2}{\dot{\bar{\xi }}}^TH(q)\dot{\bar{\xi }}+\int _{0_n}^{\bar{\xi }}{s_P^T\left( K_P r \right) \mathrm{d}r}\nonumber \\&\quad \,+\epsilon \dot{\bar{\xi }}^TH(q)s_P\left( K_P\bar{\xi }\right) \end{aligned}$$
(28)

where \(\int _{0_n}^{\bar{\xi }}{s_P^T\left( K_P r \right) \mathrm{d}r}=\sum _{i=1}^n \int _{0}^{\bar{\xi }_i}{\sigma _{Pi}\left( k_{Pi} r_i \right) \mathrm{d}r_i}\). To demonstrate that this candidate function is positive definite and decreasing, the function (28) is rewritten as

$$\begin{aligned} V(t,\bar{\xi },\dot{\bar{\xi }}) = V_0(t,\bar{\xi },\dot{\bar{\xi }})+(1-\alpha )\int _{0_n}^{\bar{\xi }}{s_P^T\left( K_P r \right) \mathrm{d}r} \end{aligned}$$
(29)

where

$$\begin{aligned} V_0(t,\bar{\xi },\dot{\bar{\xi }})&= \frac{1}{2}{\dot{\bar{\xi }}}^TH(q)\dot{\bar{\xi }}\nonumber \\&\quad +\alpha \int _{0_n}^{\bar{\xi }}{s_P^T\left( K_P r \right) \mathrm{d}r} +\epsilon \dot{\bar{\xi }}^TH(q)s_P\left( K_P\bar{\xi }\right) \end{aligned}$$
(30)

with \(0<\alpha <1\). Then, according to Definition 1 and Property 2, \(V_0(t,\bar{\xi },\dot{\bar{\xi }})\) is lower-bounded by

$$\begin{aligned} W_0(\bar{\xi },\dot{\bar{\xi }})= & {} \frac{1}{2}\mu _m \Vert \dot{\bar{\xi }}\Vert ^2 + \frac{\alpha }{2\beta _P}\Vert s_P\left( K_P\bar{\xi }\right) \Vert ^2\nonumber \\&-\epsilon \mu _M \Vert s_P\left( K_P\bar{\xi }\right) \Vert \Vert \dot{\bar{\xi }}\Vert \nonumber \\= & {} \frac{1}{2}\left[ \begin{array}{c} \Vert s_P\left( K_P\bar{\xi }\right) \Vert \\ \Vert \dot{\bar{\xi }}\Vert \end{array} \right] ^T\left[ \begin{array}{cc} \alpha /\beta _P &{} -\epsilon \mu _M \\ -\epsilon \mu _M &{} \mu _m \end{array} \right] \nonumber \\&\times \left[ \begin{array}{c} \Vert s_P\left( K_P\bar{\xi }\right) \Vert \\ \Vert \dot{\bar{\xi }}\Vert \end{array} \right] \end{aligned}$$
(31)

where \(\beta _P=\max _i\{\sigma '_{PiM}k_{Pi}\}\) and with

$$\begin{aligned} 1> & {} \alpha > \frac{\epsilon ^2}{\epsilon _1^2} \end{aligned}$$
(32)
$$\begin{aligned} \epsilon _1= & {} \sqrt{\frac{\mu _m}{\mu _M^2\beta _P}} \end{aligned}$$
(33)

if \(\epsilon <\epsilon _1\), \(W_0(\bar{\xi },\dot{\bar{\xi }})\) is positive definite. Also, note that \(W_0(0_n,\dot{\bar{\xi }}) \rightarrow \infty \) as \(\Vert \dot{\bar{\xi }}\Vert \rightarrow \infty \).

On the other hand, \(V(t,\bar{\xi },\dot{\bar{\xi }})\) is upper-bounded by

$$\begin{aligned} W_1(\bar{\xi },\dot{\bar{\xi }})= & {} \frac{1}{2}\mu _M \Vert \dot{\bar{\xi }}\Vert ^2 + \beta _P\Vert \bar{\xi }\Vert ^2 +\epsilon \mu _M \beta _P\Vert \bar{\xi }\Vert \Vert \dot{\bar{\xi }}\Vert \nonumber \\= & {} \frac{1}{2}\left[ \begin{array}{c} \Vert \bar{\xi }\Vert \\ \Vert \dot{\bar{\xi }}\Vert \end{array} \right] ^T\left[ \begin{array}{cc} \beta _P &{} \epsilon \mu _M \beta _P \\ \epsilon \mu _M \beta _P &{} \mu _M \end{array} \right] \left[ \begin{array}{c} \Vert \bar{\xi }\Vert \\ \Vert \dot{\bar{\xi }}\Vert \end{array} \right] \end{aligned}$$
(34)

where again Definition 1 and Property 2 have been used. Now, \(W_1(\bar{\xi },\dot{\bar{\xi }})\) is positive definite if

$$\begin{aligned} \epsilon ^2 < \frac{1}{\mu _M \beta _P} \end{aligned}$$
(35)

and as \(\mu _M>\mu _m\), then it is enough that again \(\epsilon <\epsilon _1\).

Therefore,

$$\begin{aligned} W_1(\bar{\xi },\dot{\bar{\xi }})&\ge V(t,\bar{\xi },\dot{\bar{\xi }}) \ge W_0(\bar{\xi },\dot{\bar{\xi }})\nonumber \\&\quad +(1-\alpha )\int _{0_n}^{\bar{\xi }}{s_P^T\left( K_P r \right) \mathrm{d}r} \end{aligned}$$
(36)

and we can conclude that \(V(t,\bar{\xi },\dot{\bar{\xi }})\) is a radially unbounded positive definite and decreasing function.

Now, the upper right-hand derivative of (28) along the trajectories of the closed-loop system (26) is

$$\begin{aligned} \dot{V}(t,\bar{\xi },\dot{\bar{\xi }})= & {} {\dot{\bar{\xi }}}^TH(q)\ddot{\bar{\xi }} + \frac{1}{2}{\dot{\bar{\xi }}}^T\dot{H}(q,\dot{q})\dot{\bar{\xi }}\nonumber \\&+ s_P^T(K_P\bar{\xi })\dot{\bar{\xi }} +\epsilon s_P^T(K_P\bar{\xi })H(q)\ddot{\bar{\xi }} \nonumber \\&+ \epsilon \dot{\bar{\xi }}^T\dot{H}(q,\dot{q})s_P(K_P\bar{\xi })\nonumber \\&+ \epsilon \dot{\bar{\xi }}^TH(q) s'_P(K_P\bar{\xi })K_P\dot{\bar{\xi }} \nonumber \\= & {} {\dot{\bar{\xi }}}^T \left\{ -s_P(K_P\bar{\xi })-s_D(K_D \dot{\bar{\xi }})\right. \nonumber \\&\left. -[C(q,\dot{q})+C(q,\dot{q}_h)]\dot{\bar{\xi }} - F\dot{\bar{\xi }}\right\} \nonumber \\&+ \frac{1}{2}{\dot{\bar{\xi }}}^T\dot{H}(q,\dot{q})\dot{\bar{\xi }}+ s_P^T(K_P\bar{\xi })\dot{\bar{\xi }}\nonumber \\&+ \epsilon \dot{\bar{\xi }}^T\dot{H}(q,\dot{q})s_P(K_P\bar{\xi })+\epsilon s_P^T(K_P\bar{\xi })\nonumber \\&\times \left\{ -s_P(K_P\bar{\xi })-s_D(K_D \dot{\bar{\xi }}) \right. \nonumber \\&\left. -[C(q,\dot{q})+C(q,\dot{q}_h)]\dot{\bar{\xi }} - F\dot{\bar{\xi }}\right\} \nonumber \\&+ \epsilon \dot{\bar{\xi }}^TH(q) s'_P(K_P\bar{\xi })K_P\dot{\bar{\xi }} \nonumber \\= & {} - {\dot{\bar{\xi }}}^Ts_D(K_D \dot{\bar{\xi }}) - {\dot{\bar{\xi }}}^TC(q,\dot{q}_h)\dot{\bar{\xi }}\nonumber \\&- {\dot{\bar{\xi }}}^TF\dot{\bar{\xi }}-\epsilon s_P^T(K_P\bar{\xi })s_P(K_P\bar{\xi }) \nonumber \\&-\epsilon s_P^T(K_P\bar{\xi })s_D(K_D \dot{\bar{\xi }})\nonumber \\&-\epsilon \dot{\bar{\xi }}^T [C(q,\dot{\bar{\xi }})+C(q,\dot{q}_h)]s_P(K_P\bar{\xi }) \\&-\epsilon s_P^T(K_P\bar{\xi })F\dot{\bar{\xi }} -\epsilon s_P^T(K_P\bar{\xi })C(q,\dot{q}_h)\dot{\bar{\xi }} \nonumber \\&+ \epsilon \dot{\bar{\xi }}^TH(q) s'_P(K_P\bar{\xi })K_P\dot{\bar{\xi }} \nonumber \end{aligned}$$
(37)

where Property 4 was used. Then, by employing Properties 2, 5, 6, 7, and 8, Assumptions 3 and 4, and inequality (23), \(\dot{V}(t,\bar{\xi },\dot{\bar{\xi }})\) can be upper-bounded as

$$\begin{aligned} \dot{V}(t,\bar{\xi },\dot{\bar{\xi }}) \le - {\dot{\bar{\xi }}}^Ts_D(K_D \dot{\bar{\xi }}) - W_2(\bar{\xi },\dot{\bar{\xi }}) \end{aligned}$$
(38)

where

$$\begin{aligned} W_2(\bar{\xi },\dot{\bar{\xi }})&= -k_c B_{hv}\Vert \dot{\bar{\xi }}\Vert ^2 + f_m \Vert \dot{\bar{\xi }}\Vert ^2 + \epsilon \Vert s_P(K_P\bar{\xi })\Vert ^2 \nonumber \\&\quad -\epsilon \kappa \Vert s_P(K_P\bar{\xi })\Vert \Vert \dot{\bar{\xi }}\Vert -\epsilon k_c B_P \Vert \dot{\bar{\xi }}\Vert ^2 \nonumber \\&\quad -\epsilon k_c B_{hv} \Vert s_P(K_P\bar{\xi })\Vert \Vert \dot{\bar{\xi }}\Vert \nonumber \\&\quad -\epsilon f_M \Vert s_P(K_P\bar{\xi })\Vert \Vert \dot{\bar{\xi }}\Vert \nonumber \\&\quad -\epsilon k_c B_{hv} \Vert s_P(K_P\bar{\xi })\Vert \Vert \dot{\bar{\xi }}\Vert - \epsilon \mu _M \beta _P \Vert \dot{\bar{\xi }}\Vert ^2 \nonumber \\&= \left[ \begin{array}{c} \Vert s_P\left( K_P\bar{\xi }\right) \Vert \\ \Vert \dot{\bar{\xi }}\Vert \end{array} \right] ^TQ_2\left[ \begin{array}{c} \Vert s_P\left( K_P\bar{\xi }\right) \Vert \\ \Vert \dot{\bar{\xi }}\Vert \end{array} \right] \end{aligned}$$
(39)

with \(B_P=\sqrt{\sum _{i=1}^n M_{Pi}^2}\) and

$$\begin{aligned} Q_2 = \left[ \begin{array}{ccc} \epsilon &{} &{} -\epsilon \left( \frac{\kappa +f_M}{2}+k_cB_{hv}\right) \\ -\epsilon \left( \frac{\kappa +f_M}{2}+k_cB_{hv}\right) &{} &{} f_m-k_cB_{hv}-\epsilon (k_cB_P+\mu _M\beta _P) \end{array} \right] \end{aligned}$$
(40)

which is positive definite if \(\epsilon < \epsilon _2\) for

$$\begin{aligned} \epsilon _2 = \frac{f_m-k_cB_{hv}}{k_cB_P+\mu _M\beta _P+\left( \frac{\kappa +f_M}{2}+k_cB_{hv}\right) ^2}, \end{aligned}$$
(41)

then, \(B_{hv}<f_m/k_c\). Thus, by satisfying \(\epsilon < \min \{\epsilon _1, \epsilon _2\}\), we can conclude that \(\dot{V}(t,\bar{\xi },\dot{\bar{\xi }}) < 0\) and the equilibrium point of closed-loop (non-autonomous) system (26) is globally uniformly asymptotically stable.

4 Numerical Simulation

The validation of the proposed control scheme was carried out by one numerical simulation test of a human–robot interaction task, where a comparative analysis of the performance of our scheme and two controllers with a similar structure was conducted. The interaction task implemented assumes that the robotic system is coupled externally to a person’s arm (simulating an exoskeleton) and the elbow rotation axes of both are coincident. Initially, the robot has a predefined desired trajectory and will have to adapt or modify its movement depending on the active participation of the person, i.e., when the torque applied by the user is greater than zero.

For the implementation of controllers with bounded actions, the following generalized saturation functions were used:

$$\begin{aligned}&\sigma _h(\varsigma ;M)=M \mathrm{sat}(\varsigma /M) \end{aligned}$$
(42)
$$\begin{aligned}&\sigma _s(\varsigma ;L,M)= \left\{ \begin{array}{lr} \varsigma , &{} \forall |\varsigma | \le L\\ \rho _s(\varsigma ), &{} \forall |\varsigma | > L \end{array} \right. \end{aligned}$$
(43)

where

$$\begin{aligned} \rho _s(\varsigma )=\mathrm{sign}(\varsigma )L+(M-L)\tanh \left( \frac{\varsigma -\mathrm{sign}(\varsigma )L}{M-L}\right) \end{aligned}$$
(44)

4.1 Model of the Robotic Platform

The robotic platform used in simulation tests corresponds to a two-degree-of-freedom robot manipulator whose modeling and dynamic parameterization were presented in [38]. The robot actuators have as torque limit values \(T_1 = 200\) Nm and \(T_2 = 15\) Nm, respectively, while the corresponding positive constants that satisfy Properties 2, 6, 7, and 8 are: \(\mu _{m}=0.088\) kg\(\cdot \)m\(^2\), \(\mu _{M}=2.533\) kg\(\cdot \)m\(^2\), \(\mu _{M1}=2.526\) kg\(\cdot \)m\(^2\), \(\mu _{M2}=0.213\) kg\(\cdot \)m\(^2\), \(k_c=0.146\) kg\(\cdot \)m\(^2\), \(k_{c1}=0.136\) kg\(\cdot \)m\(^2\), \(k_{c2}=0.084\) kg\(\cdot \)m\(^2\), \(f_m=f_{M2}=0.175\) kg\(\cdot \)m\(^2\)/s, \(f_M=f_{M1}=2.288\) kg\(\cdot \)m\(^2\)/s, \(B_{g1}=40.29\) Nm, and \(B_{g2}=1.825\) Nm, respectively. Besides, for this robot, we have that

$$\begin{aligned}&Y(q,\dot{q}, \ddot{q}) \nonumber \\&\quad = \left[ \begin{array}{cccc} \ddot{q}_1 &{} &{} &{} 0 \\ (2\ddot{q}_1+\ddot{q}_2)c_2 -\dot{q}_2(2\dot{q}_1+\dot{q}_2)s_2 &{} &{} &{} \ddot{q}_1 c_2 + \dot{q}_1^2 s_2 \\ \ddot{q}_2 &{} &{} &{} \ddot{q}_1+\ddot{q}_2 \\ \dot{q}_1 &{} &{} &{} 0 \\ 0 &{} &{} &{} \dot{q}_2 \\ \sin {q_1} &{} &{} &{} 0 \\ \sin {(q_1+q_2)} &{} &{} &{} \sin {(q_1+q_2)} \end{array} \right] \nonumber \\\end{aligned}$$
(45)
$$\begin{aligned}&\theta = \left[ \begin{array}{ccccccc} 2.351&0.084&0.102&2.288&0.175&38.465&1.825 \end{array} \right] ^T\nonumber \\ \end{aligned}$$
(46)

to satisfy Property 9 and where \(c_2=\cos {q_2}\) and \(s_2=\sin {q_2}\).

4.2 Model of Human-Applied Torques

In order to simulate the torques applied by a human interacting with the robot, EMG signals of biceps and triceps muscles from the database [39] were used as inputs to the model described in Sect. 2.3. First, the EMG signals were preprocessed using the cutoff frequency of 10 Hz for high-pass and 400 Hz for low-pass filters. According to the database, the MVC values for the biceps and triceps are 7527.5 and 1776.6, respectively. Therefore, it was only considered that there is an external torque applied to the elbow joint and the shoulder joint moves freely, i.e., \(\tau _{e1}=0\) Nm (\(M_{e1}=0\)).

The values selected for the constants of the Hill model (4)–(11) were: \(k_{A1}=k_{A2}=-2\), \(\theta _1=0^\mathrm{o}\), \(\theta _2=10^\mathrm{o}\), \(f_{M01}=400\) Nm, \(f_{M02}=600\) Nm, \(h_{01}=h_{02}=-2.06\), \(h_{11}=h_{12}=6.16\), \(h_{21}=h_{22}=-3.13\), \(l_{1}=l_{2}=0.8\), \(r_1=0.0153\) m, and \(r_2=0.01\) m, where sub-index 1 refers to biceps and sub-index 2 to triceps. In addition, to model the bounded behavior of the interaction torque it was considered that

$$\begin{aligned} \sigma _{e2}(\varsigma )=\sigma _s(\varsigma ;L_{e2},M_{e2}) \end{aligned}$$
(47)

with \(M_{e2}=8.5\) and \(L_{e2}=0.9M_{e2}\) satisfying (12). The muscle torques obtained are shown in Fig. 1.

Fig. 1
figure 1

Muscle torques obtained by the Hill model from EMG signals. The segmented line represents the bound \(M_{e2}=8.5\)

4.3 Configuration of the Impedance Controller

The trajectories to be followed by the robot’s joints were chosen as

$$\begin{aligned} q_{d1}(t)= & {} \frac{\pi }{2}+\sin {\omega t} \end{aligned}$$
(48)
$$\begin{aligned} q_{d2}(t)= & {} \cos {\omega t} \end{aligned}$$
(49)

where, according to Assumptions 3 and 4, \(\omega =B_{dv} < f_m/k_c - B_{ev}\). Then, \(B_{da}=\omega ^2\) and we can select \(B_{ep}=0.85\), \(B_{ev}=0.15\), \(B_{ea}=0.3\) obtaining that \(\omega < 1.049\) rad/s. Therefore, we set \(\omega =1\) rad/s and the impedance parameters that characterize the dynamics of human–robot interaction were tuned as \(k_{E2}=10\), \(h_{E2}=2\), and \(d_{E2}=25\) to satisfy (16), (17), and (18), respectively.

The proportional and derivative actions of the impedance controller (21) were implemented with

$$\begin{aligned} \sigma _{Pi}(\varsigma )= & {} \sigma _s(\varsigma ;L_{Pi},M_{Pi}) \end{aligned}$$
(50)
$$\begin{aligned} \sigma _{Di}(\varsigma )= & {} \sigma _h(\varsigma ;M_{Di}) \end{aligned}$$
(51)

\(i=1,\ 2\). Therefore, \({\sigma }'_{PiM}={\sigma }'_{DiM}=1\) and \(\kappa =\max _i\{k_{Di}\}\). In order to obtain bounded control actions, \(M_{P1}=M_{D1}=40\), \(L_{P1}=0.9M_{P1}\), \(M_{P2}=M_{D2}=2\), and \(L_{P2}=0.9M_{P2}\) were chosen to satisfy (24) with \(B_{D1}=46.385\) and \(B_{D2}=2.414\) according to the values of the robot’s dynamic parameters, while the dynamic compensation term \(Y(q,\dot{q}_h, \ddot{q}_h)\theta \) was implemented by replacing \(\dot{q}\) with \(\dot{q}_h\) and \(\ddot{q}\) with \(\ddot{q}_h\) in (4546). In addition, for the external torque compensation term \(\tau _e\), the estimated joint torque from the EMG signals described in Sect. 4.2 was used.

4.4 Results

For comparison purposes, the same human–robot interaction task was implemented using the adaptive controllers presented in [7, 15], and to distinguish each of the controllers, the following nomenclature is used: JS-IC represents the joint-space impedance controller proposed in this paper, JS-TC is the joint-space tracking controller presented in [7], and TS-IC denotes the task-space impedance controller presented in [15]. The SP-SD+ adaptive tracking controller [7] is given by

$$\begin{aligned} u= & {} -s_P(K_P\bar{q})-s_D(K_D \dot{\bar{q}})+Y(q,\dot{q}_d, \ddot{q}_d)\hat{\theta } \end{aligned}$$
(52)
$$\begin{aligned} \dot{\phi }= & {} -\varGamma Y^T(q,\dot{q}_d, \ddot{q}_d)[\dot{\bar{q}}+\varepsilon s_P(K_P\bar{q})] \end{aligned}$$
(53)
$$\begin{aligned} \hat{\theta }= & {} s_a(\phi ) \end{aligned}$$
(54)

where \(\varGamma =\mathrm{diag}[\gamma _1,...,\gamma _p]\) is a (constant) positive definite matrix, while \(s_a(x)={(\sigma _{a1}(x_1),...,\sigma _{ap}(x_p))}^T\) with \(\sigma _{al}(\cdot )\) being strictly increasing GSFs bounded by \(M_{al}\), \(l=1, ..., p\). The proportional and derivative actions were implemented as (50)–(51) with \(M_{P1}=M_{D1}=40\), \(L_{P1}=0.9M_{P1}\), \(M_{P2}=M_{D2}=4\), and \(L_{P2}=0.9M_{P2}\), while for the adaptive term

$$\begin{aligned} \sigma _{al}(\varsigma ) = \sigma _s(\varsigma ;L_{al},M_{al}) \end{aligned}$$
(55)

with \(M_a= (2.939, 0.105, 0.127, 2.86, 0.219, 48.081, 2.281)^T\) and \(L_{al}=0.9M_{al}\), \(l=1, ..., 7\).

On the other hand, the adaptive impedance controller [15] is given by

$$\begin{aligned} \tau= & {} H_0(q,\hat{\theta }_d(0))J^{-1}(q,\hat{\theta }_k)[-K_P \bar{\xi }-K_D \hat{\zeta }-\dot{J}(q,\dot{q},\hat{\theta }_k)\nonumber \\&+C(q,\dot{q},\hat{\theta }_d)\dot{q} +g(q,\hat{\theta }_d) \nonumber \\&+J^T(q,\hat{\theta }_k)f_e+[H(q,\hat{\theta }_d)-H_0(q,\hat{\theta }_d(0))]\ddot{q} \end{aligned}$$
(56)
$$\begin{aligned} \dot{\hat{\theta }}_d= & {} \varGamma _d J(q,\hat{\theta }_k) H_0^{-1}(q,\hat{\theta }_d(0))Y_d(q,\dot{q}, \ddot{q})H_E[\bar{\xi }+\hat{\zeta }] \end{aligned}$$
(57)
$$\begin{aligned} \dot{\hat{\theta }}_k= & {} \varGamma _k [J(q,\hat{\theta }_k) H_0^{-1}(q,\hat{\theta }_d(0))Y_e(q,f_e)H_E[\bar{\xi }+\hat{\zeta }]\nonumber \\&-W_k^T\Lambda _k(W_k\hat{\theta }_k-z)] \end{aligned}$$
(58)

where \(f_e\) is the task-space interaction force, \(\bar{\xi }=x-x_d-x_e\) is the task-space impedance error, and \(\hat{\zeta }=\hat{\dot{x}}-\dot{x}_d-\dot{x}_e\) is the estimate of \(\dot{\bar{\xi }}\), with x being the Cartesian position of the robot’s end effector (forward kinematics), \(x_d\) being the desired trajectory in Cartesian space (obtained by forward kinematics with \(q_d\) as input), and \(x_e=\mathcal{F}(s)f_e\) being the trajectory adjustment vector in Cartesian space, whose parameters are \(H_E=\mathrm{diag}[2, 2]\), \(D_E=\mathrm{diag}[50, 50]\) and \(K_E=\mathrm{diag}[150, 150]\). \(H_0(q,\hat{\theta }_d(0))\) is a symmetric and positive definite matrix that represents the initial estimate of H(q), \(\hat{\theta }_d\) and \(\hat{\theta }_k\) are the estimated dynamic and kinematic parameter vectors, respectively, whose real values are

$$\begin{aligned} \theta _d= & {} \left[ \begin{array}{ccccc} 2.351&0.084&0.102&38.465&1.825 \end{array} \right] ^T \\ \theta _k= & {} \left[ \begin{array}{cc} 0.45&0.45 \end{array} \right] ^T, \end{aligned}$$

while \(J(q,\hat{\theta }_k)\) represents the estimate of analytical Jacobian matrix given by

$$\begin{aligned} J(q,\hat{\theta }_k)=\left[ \begin{array}{cccc} \hat{\theta }_{k1}\cos {q_1}+\hat{\theta }_{k2}\cos {(q_1+q_2)} &{} &{} &{} \hat{\theta }_{k2}\cos {(q_1+q_2)} \\ \hat{\theta }_{k1}\sin {q_1}+\hat{\theta }_{k2}\sin {(q_1+q_2)} &{} &{} &{} \hat{\theta }_{k2}\sin {(q_1+q_2)} \end{array} \right] \end{aligned}$$
(59)

In addition, \(\varGamma _d=\mathrm{diag}[\gamma _{d1},...,\gamma _{d5}]\), \(\varGamma _k=\mathrm{diag}[\gamma _{k1}, \gamma _{k2}]\), and \(\Lambda _k=\mathrm{diag}[\lambda _{k1}, \lambda _{k2}]\) are (constant) positive definite matrices, \(z=[\lambda s/(\lambda + s)]x\), \(W_k=[\lambda /(\lambda + s)]Y_k(q,\dot{q})\) is a low-pass filter with \(\lambda =10\), and the corresponding regression matrices are

$$\begin{aligned}&Y_k(q,\dot{q}) = \left[ \begin{array}{cccc} \dot{q}_1\cos {q_1} &{} &{} &{} [\dot{q}_1+\dot{q}_2]\cos {(q_1+q_2)} \\ \dot{q}_1\sin {q_1} &{} &{} &{} [\dot{q}_1+\dot{q}_2]\sin {(q_1+q_2)} \end{array} \right] \\&Y_d(q,\dot{q}, \ddot{q}) \nonumber \\&\quad = \left[ \begin{array}{cccc} \ddot{q}_1 &{} &{} &{} 0 \\ (2\ddot{q}_1+\ddot{q}_2)c_2 -\dot{q}_2(2\dot{q}_1+\dot{q}_2)s_2 &{} &{} &{} \ddot{q}_1 c_2 + \dot{q}_1^2 s_2 \\ \ddot{q}_2 &{} &{} &{} \ddot{q}_1+\ddot{q}_2 \\ \sin {q_1} &{} &{} &{} 0 \\ \sin {(q_1+q_2)} &{} &{} &{} \sin {(q_1+q_2)} \end{array} \right] \\&Y_e(q,f_e) \nonumber \\&\quad = \left[ \begin{array}{cccc} f_{e1}\cos {q_1}+f_{e2}\sin {q_1} &{} &{} &{} f_{e1}\cos {(q_1+q_2)}+f_{e2}\sin {(q_1+q_2)} \\ 0 &{} &{} &{} f_{e1}\cos {(q_1+q_2)}+f_{e2}\sin {(q_1+q_2)} \end{array} \right] \end{aligned}$$

In both cases, the authors’ tuning of the controllers was respected, considered to be the best possible. Table 1 summarizes the gain parameters used to implement the three controllers.

Table 1 Control parameter values

The initial joint positions and velocities were taken as \(q_1(0)=1\) rad, \(q_2(0)=0.5\) rad, \(\dot{q}_1(0)=\dot{q}_1(0)=0\) rad/s. While the auxiliary states were initiated at \(\phi (0)={(2.88 0.103 0.125 2.803 0.214 47.119 2.235)}^T\) in the case of controller [7], and \(\hat{\theta }_d(0)={(2.0 0.15 0.15 30.0 1.05)}^T\) and \(\hat{\theta }_k(0)={(0.5 0.6)}^T\) in the case of controller [15].

The results of the comparative analysis are presented in Figs. 2 and 3 and Table 2. First, in Fig. 2 the impedance or path tracking errors for each controller are depicted; it is possible to observe that in all cases when the interaction force/torque is small (during the first 8 seconds, see Fig. 1) all error components tend to zero. However, when the interaction torque begins to increase, only impedance controllers are able to regulate such human–robot interaction by keeping the error convergence to zero.

Fig. 2
figure 2

Components of error for the proposed joint-space impedance controller (JS-IC), the joint-space tracking controller (JS-TC), and the task-space impedance controller (TS-IC), respectively

On the other hand, the torques generated by all controllers are shown in Fig. 3, where the bounding feature of the proposed impedance controller (JS-IC) is shown, while for the tracking controller (JS-TC), the torque limit values (200 Nm and 15 Nm, respectively) are not exceeded in both cases. In the graphs on the right, a zoom-in of each torque component is shown, and it can be seen that the Cartesian impedance controller (TS-IC) exceeds the torque limits when starting the movement.

Fig. 3
figure 3

Applied control torques. The graphs on the right correspond to a zoom-in that allows to appreciate the transient behavior. The segmented lines represent the bounds \(\pm T_1\) and \(\pm T_2\), respectively

Then, in order to quantify the performance of impedance controllers, the error was normalized with respect to the maximum absolute values of each component (to be able to compare a joint controller with another Cartesian one) and the root-mean-square (RMS) value of the normalized error was calculated as

$$\begin{aligned} RMS=\sqrt{\frac{1}{T}\int _0^T{\Vert e(t)\Vert ^2 \mathrm{d}t}} \end{aligned}$$
(60)

where \(T=36\) seconds and

$$\begin{aligned} e(t)= \left[ \begin{array}{c} \bar{\xi }_1(t)/\max _t\{|\bar{\xi }_1(t)|\} \\ \\ \bar{\xi }_2(t)/\max _t\{|\bar{\xi }_2(t)|\} \end{array} \right] \end{aligned}$$
(61)

The RMS values of each impedance controller are presented in Table 2, where it can be observed that the values obtained are very similar; however, the performance of the proposed joint-space impedance controller is slightly better and with the advantage of generating bounded control actions (avoiding possible damage to the robot actuators).

Table 2 RMS error values

From the results obtained in the simulation test and the performance evaluation of the control schemes, the following can be stated: (1) the adaptive JS-TC motion control scheme is not robust in the face of disturbances caused by human–robot interaction, especially when the external torque applied by the user is greater than 10% of the maximum value of the actuator, i.e., \(|\tau _e(t)| > 1.5\) Nm; (2) the impedance controller TS-IC behaves appropriately when the initial position of the robot is close to the desired trajectory, because it is very sensitive to kinematic singularities. This causes high accelerations which are reflected in the demand for high torques above the actuators’ limits, i.e., \(\max \{|\tau _1(t)|\}>15\) Nm and \(\max \{|\tau _2(t)|\}>200\) Nm; (3) although the performance of both impedance controllers (JS-IC and TS-IC) is very similar, our proposal has the advantage of generating bounded torques and because it operates in joint space and is not affected by the kinematic singularities of the robot; (4) our proposal had the best performance since it achieves the convergence of the impedance error toward zero with lower RMS value, respecting the torque limits of the actuators and appropriately regulating the interaction forces exerted by the user. Therefore, the results of this comparative study allow us to conclude that the use of our control scheme in human–robot interaction tasks guarantees a good performance and an adequate level of safety for both the user and the robot.

Finally, another advantage of the proposed control scheme is that the tuning of impedance parameters (\(K_E\), \(D_E\), \(H_E\)) allows for bounded modification of the trajectory to be followed by the robot during interaction, i.e., the adjustment vectors of position, velocity and acceleration are bounded if the tuning criterion (16)–(18) is met. Figure 4 depicts the behavior of the trajectory adjustment vectors and shows that the position, velocity, and acceleration do not exceed the bounds \(B_{ep}=0.85\), \(B_{ev}=0.15\), and \(B_{ea}=0.3\), respectively.

Fig. 4
figure 4

Torque filter (\(\mathcal{F}(s)\tau _e\)) outputs \(q_e\), \(\dot{q}_e\), and \(\ddot{q}_e\), respectively. The segmented lines represent the bounds \(\pm B_{ep}\), \(\pm B_{ev}\), and \(\pm B_{ea}\), respectively

5 Conclusions

Closed-loop stability analysis, physical torque limits of actuators, and sensitivity to singularities are often overlooked in the design of control schemes for safe human–robot interaction tasks. This paper proposes a joint-space impedance controller with bounded actions that makes use of EMG to estimate the user’s joint torque during human–robot interaction. The proposed scheme has a nonlinear PD\(+\) structure based on generalized saturation functions and external torque compensation based on EMG and the Hill muscle model. These features respect the torque limits of the actuators and measure the user intent in a more natural way. Moreover, through a Lyapunov stability analysis and numerical simulations, the correct performance of the proposed control scheme was supported and validated. Due to these features, our proposal can be considered as a primary approach to impedance control for safe human–robot interaction with bounded actions.

The results of the comparative tests presented make evident the advantages of the proposed control scheme over other similar controllers to regulate human–robot interaction tasks. This is due to the fact that it can deal with the torques applied by the user at the same time that bounded control actions are generated below the torque limits of the robot’s actuators. In addition, the use of Hill’s muscle model and EMG for user joint torque estimation allows human–robot interaction to be defined in joint space, preventing the robot from reaching singular configurations as commonly happens with Cartesian controllers.