1 Introduction

Robots have been traditionally deployed in highly structured environments with either minimal or heavily controlled human-robot interaction. Their introduction into industries, such as health care, with complex interactive behaviour has revealed the limitations of traditional industrial controllers. The impedance controller [1,2,3,4,5,6] is a widespread technique enabling robots to interact with uncertain environments. This control technique relies on inverse dynamics modelling to drive the robot to act with a desired mechanical impedance, such as a linear Mass-Spring-Damper system [1, 7]. Nevertheless, the controller’s stability still highly depends on adequate gain tuning, which may be challenging for dynamically intensive tasks. Examples are environments that require adaptive trajectories and/or variable impedance gains [8], as well as tasks with uncertain end-effector contact against other agents or the environment (e.g., polishing, physical human-robot collaboration, etc.) [3,4,5,6, 9,10,11,12,13]. Such tasks pose various challenges to robots’ controllers that currently require an accurate model of contact conditions to ensure system stability.

Variable impedance controllers have been widely explored to address these issues. Ensuring stability with time-variant gains is non-trivial [8, 9, 13,14,15]; the stability of the system depends not only on the gain profile selected but also on how they are updated. The intrinsic unpredictability of unstructured environments further complicates the process. The variable stiffness controller proposed in [16] addresses stability but it is not robust to unknown external perturbations. Iterative and adaptive control methods have also been proposed to compensate for the external perturbations by guaranteeing interaction stability [11, 17,18,19]. These learning methods are task-specific and do not allow the user any tuning authority on these profiles. Another option to obtain more dexterous motion relies on using force/torque feedback from the end-effector, which is not always viable and is extremely susceptible to vibrations [20,21,22,23]. In synthesis, the main issue is that these controllers require accurate models of the external dynamics for stability. Therefore, the robot’s stability is highly dependent on environmental modelling, which is difficult to obtain in real-world scenarios.

Passive controllers have been presented as a viable solution to these problems since their stability is independent of the environmental interaction, in most practical cases [6, 24,25,26,27]. Passive systems are stable because they do not produce energy, but redistribute it at a cost. Virtual energy tanks have also been implemented to ensure stability of an active controller by measuring and storing the non-conservative energy via a virtual spring (i.e., integrator) [24,25,26,27,28,29]. Thus, their effectiveness is dependent on the ability of accurately tracking the energy exchanged by the controllers’ non-conservative elements (e.g., damping), and their performances are heavily challenged during adaptation to highly variable environments that may consume all the energy accumulated in their tanks [30,31,32]. Energy tank controllers have also been deployed to define energy/power-based safety metrics that allow tuning of the robot impedance, as reported for 1-DoF and multi-DoF platforms [33, 34]. Another benefit of passive controllers is their robustness to loss of information over data transmission, and system discretization [35]. The main limitations of virtual energy tank controllers are the performance dependency on the residual energy in their tanks, and the need of an integrator to account for non-conservative components. The latter becomes relevant in low-bandwidth controllers due to degraded accuracy of discrete integration.

This paper proposes a passive impedance controller where its anisotropic behaviour generates a stable attractor around the desired robot pose, shown in Fig. 1. The main contributions of the proposed approach are:

  1. 1.

    Introducing the fractal attractor to design an asymptotically stable impedance controller.

  2. 2.

    Removing the integrator required to achieve controller passivity in variable stiffness impedance controllers.

  3. 3.

    Demonstrating robustness of the proposed controller to low-bandwidth feedback.

The manuscript is organized as follows: the Method discusses the design of the proposed controller; The Experimental Validation describes the experiments conducted using a Panda 7-DoF Arm (Franka Emika GmbH, DE). The Results provides the results of the experiments. Finally, we analyse the results and draw the conclusions in Discussion and Conclusions, respectively.

Fig. 1
figure 1

Autonomous trajectories in the phase space of a Fractal Attractor

2 Method

The Fractal Impedance Controller (FIC) is a new approach to passive control, which relies upon a state-dependent impedance profile and a Fractal Attractor. The impedance profile determines the robot force and trajectory tracking characteristics, while the Fractal Attractor guarantees smooth autonomous trajectories and stability. In other words, the chosen impedance profile determines the effort the controller opposes to perturbations of the system state. The Fractal Attractor ensures a safe recovery after the perturbation terminates by identifying the harmonic trajectory capable of consuming all the energy accumulated in the Impedance Stiffness (\(K_\mathrm{d}\)) during divergence.

2.1 State-dependent variable impedance

A Cartesian impedance controller drives the end-effector of a robot to generate desired system dynamics [1, 2], such as the following:

$$\begin{aligned} {\Lambda }_d\ddot{{\tilde{X}}} + D_d\dot{{\tilde{X}}} + K_d{\tilde{X}} = W_{\text {ext}} + W_{\text {ID}}, \end{aligned}$$
(1)

where \({\Lambda }_d\), \(D_d\) and \(K_d\) are the desired Cartesian inertia, damping and stiffness matrices, respectively. Note that within the context of this paper, we use upper-case letters to indicate vectors and matrices, while the corresponding lower-case letters (e.g., \(k_d\)) represent a scalar component within the vector or matrix. \(W_{\text {ext}}\) is the external wrench applied to the end-effector, and \(W_{\text {ID}}\) is the inverse dynamics compensation. \({\tilde{X}} = X_d - X\) is the error between the desired pose \(X_d\) and the current pose X, and \(\dot{{\tilde{X}}}\), \(\ddot{{\tilde{X}}}\) are the first and second time derivatives of \({\tilde{X}}\), respectively.

Suppose we consider a passive controller without reference velocity (\(\dot{{\tilde{X}}}_d=\mathbf {0}\)) and acceleration (\(\ddot{{\tilde{X}}}_d=\mathbf {0}\)), which implies that the controller is always pulling the robot towards an equilibrium point. This assumption is essential for system stability in all control architectures that need to be within a region of attraction of a stable point, but it is generally accounted for at the planning stage [36]. As a consequence, such a controller would not rely on the planner for stability, but may compromise tracking performance. The introduction of a state-dependent nonlinear stiffness profile compensates for the loss of the tracking performance by generating a virtual boundary surrounding the desired pose and autonomously adjusting the robot’s rigidity to control task accuracy. The proposed stiffness profile for a single DoF of task-space is as follows:

$$\begin{aligned}&{k_d}({\tilde{x}}) = k_{\text {const}} + k_{\text {var}}({\tilde{x}}) \nonumber \\&k_{\text {var}}= \left\{ \begin{array}{ll} \frac{w_\mathrm{max}}{|{{\tilde{x}}}|} - k_{\text {const}}, \ &{} \ \text {if} \ |{\tilde{x}} |> x_{\text {B}} \\ \\ {e}^{({\beta } {{\tilde{x}}})^2}, &{} \ \text {o/w} \end{array}\right. \nonumber \\&{\beta }^2 =\frac{\ln \left( k_{\text {max}}-k_{\text {const}}\right) }{x_{{B}}^2} =\frac{\ln \left( \frac{w_{\text {max}}}{x_{{B}}}-k_{\text {const}}\right) }{x_{{B}}^2} \end{aligned}$$
(2)

where \(k_{d}\) is the ith-element of the block diagonal stiffness matrix \(K_{d}\in \mathbb {R}^{6\times 6}\). \(k_{\mathrm{const}}\) is a fixed constant stiffness. \(w_{\text {max}}\) is the maximum exertable task-space force or torque for a single DoF and is determined by the robot’s physical properties. \(x_{\text {B}}\) is the virtual boundary point where the exerted force saturates. As shown in Fig. 2 the proposed nonlinear stiffness profile starts with a linear region around zero, followed by an exponential growth until the force saturation is reached at \({\tilde{x}}=x_\mathrm{B}\) and, consequentially, the stiffness starts to decrease with the increase of the displacement in order to maintain a constant maximal force.

Fig. 2
figure 2

Nonlinear stiffness profile used in the fractal impedance controller. Stiffness starts at \(k_\mathrm{const}\) near zero and exponentially increases until reaching maximum stiffness \(k_\mathrm{max}=w_\mathrm{max}/x_B\). Beyond \(x_B\) stiffness decays in order to maintain a maximal force

In summary, the proposed controller works with the following assumptions:

  1. 1.

    The desired velocity vector (\(\dot{X}_\mathrm{d}\)) and acceleration (\(\ddot{X}_\mathrm{d}\)) are equal to 0, determining that every reference state of the controller is an equilibrium point.

  2. 2.

    \({\Lambda }_d\) is equal to the task-space inertia of the robot.

  3. 3.

    The spring potential energy (E) function which is unbounded, explicitly depends only on pose errors (i.e., \(E=f({\tilde{X}})\)).

  4. 4.

    The controller energy is a uniform continuous function which has a bounded derivative (i.e., a Lipschitz function).

2.2 Fractal attractor

The Fractal Attractor generates a global region of attraction surrounding the desired state and determines the smooth autonomous trajectories of the controller. It is worth mentioning that Fractal Attractor is the name we give to the stable dynamics generated by the proposed method. The name was chosen because it is a strange attractor. These type of systems have a fractal structure due to their state dimensionality being a non-integer rational number [37], hence the name Fractal Attractor. The proposed system differs from the traditional formulations of strange attractors because it is defined in an algorithmic form rather than parametric nonlinear dynamics equations. This implementation allows changing the system dynamics by selecting a different force profile, resulting in more intuitive programming of the interaction dynamics.

A way demonstrate that the system is a fractal is verifying that the point-wise dimensionality of its Cantor set is a rational number [37]. The point-wise dimensionality is determined numerically by counting the number of states that are progressively encompassed by gradually increasing an isotropic neighbourhood of a chosen point in the system phase-state [37]. The point-wise dimensionality for the proposed method (Fig. 3) is \(N_{({\tilde{x}}=0,~\dot{x}=0)}\propto \left( 0.5\epsilon ^2+\right. \) \(\left. 0.5\epsilon ^{2-\gamma },~ \gamma \in (0,1]\subset \mathbb {R}\right) \), where \(\epsilon \) is the radius of an isotropic neighbour of the considered state. It is smaller than the two-dimensional Cartesian space (\(N_{({\tilde{x}}=0,~\dot{x}=0)}\propto \epsilon ^2\)) [37].

Proof

The proposed attractor has the same dimensionality of the Cartesian Space during divergence (Qi and Qiii in Fig. 3c), where it acts as an oscillator around the null state (i.e., \({\tilde{x}}=0,~\dot{x}=0\)), implying that a point for every state enters the neighbourhood every time is increased. In contrast, it has a smaller dimensionality during convergence (Qii and Qiv in Fig. 3c), where the attractor trajectory depends by the residual displacement at the at the switching condition (\(\dot{x}=0\)). Therefore, even accounting for a system capable of an infinite displacement, the number of points entering an infinitesimally small neighbourhood of the null state is limited to the set displacements outside it. Consequently, the number of system trajectories entering the neighbourhood is decreased by one every time it is increased in dimension.

To formalise what explained in the previous paragraph, let’s consider a circumference in phase space (\({\tilde{x}},\dot{x}\)) and increase its radius using unit step (\(\Delta i=1\)) to \(\epsilon \) (i.e., \(i\in [0,\epsilon ]\subset \mathbb {N}\)). The point-wise dimensionality for semicircle in divergence is:

$$\begin{aligned} 0.5\sum _{i=1}^\epsilon \epsilon =0.5\epsilon \sum _{i=1}^\epsilon 1=0.5\epsilon ^2 \end{aligned}$$

The point-wise dimensionality for the semicircle of convergence has to account for the decrease number of available trajectories for every increase leading to:

$$\begin{aligned} 0.5\sum _{i=1}^\epsilon \epsilon -i=0.5\epsilon \sum _{i=1}^\epsilon \left( 1-\frac{i}{\epsilon }\right) =0.5\epsilon ^{2-\gamma } \end{aligned}$$
(3)

where \(\gamma \in (0,~1]\subset \mathbb {R}\) describe reduction in dimensionality. The value of gamma depends on the maximum dimension of the neighborhood (\(\epsilon \)) and the chosen discretisation (\(\Delta i\)), which asymptotically converges to zero when \((\Delta i\rightarrow 0,\epsilon \rightarrow \infty )\). This can be easily verified rewriting Eq. (3) as:

$$\begin{aligned}&0.5\epsilon \sum _{i=1}^\epsilon \left( 1-\frac{i}{\epsilon }\right) \\&\quad =5\epsilon \sum _{i=1}^\epsilon 1 - 5\epsilon \sum _{i=1}^\epsilon 1 -0.5\sum _{i=1}^\epsilon \\&i= 0.5\epsilon ^2 -0.5\sum _{i=1}^\epsilon i \end{aligned}$$

and studying its limits for \(\epsilon \rightarrow \infty \):

$$\begin{aligned} \lim _{\epsilon \rightarrow \infty } 0.5\epsilon ^2 -0.5\sum _{i=1}^\epsilon i = 0.5(\infty ^2-\infty )=\infty ^2 \end{aligned}$$

The total point-wise dimensionality of the Cantor set is obtained by adding the semicircle together.

$$\begin{aligned}&N_{({\tilde{x}}=0,~\dot{x}=0)}\propto 0.5\epsilon ^2+0.5\epsilon \sum _{i=1}^\epsilon \left( 1-\frac{i}{\epsilon }\right) \nonumber \\&\quad = (0.5\epsilon ^2+0.5\epsilon ^{2-\gamma }) \end{aligned}$$
(4)

\(\square \)

Fig. 3
figure 3

a Energy associated with autonomous trajectories of the Fractal Attractor. b The phase portraits show that the attractor topology scales based on the energy accumulated in the controller spring, but they do not change in shape. c Starting from the first quadrant of the Cartesian plane Qi: the environment perturbs the end-effector. When the end-effector is released and inverts its motion (Qiv), a controller switch is triggered with impedance matched to restore the end-effector to the origin (green line). However, if extra energy is added from the environment (dashed black line) the trajectory will move into Qiii, triggering another controller switch and restoring the original impedance. When the trajectory reaches Qii, impedance is again matched to extract the residual energy. (Color figure online)

The attractor dynamics is defined to redistribute the potential energy accumulated in the controller to asymptotically return to the desired end-effector state using a smooth trajectory. The proposed method is based on the assumption that the energy reservoir is the controller’s nonlinear stiffness. Consequently, the energy that the robot can release into the environment is upper-bounded by the potential energy accumulated in the controller. The Fractal Attractor also limits the controller power \(\dot{E}\); thus, guaranteeing global stability in fixed-base robots.

Energy redistribution is achieved by altering the controller’s impedance when the end-effector starts to converge toward the desired pose. To do so, an impedance \(Z_{K_c}\) is added in series to the desired impedance \(Z_{K_d}\), as shown in Fig. 4a. Subsequently, the original impedance \(Z_{K_d}\) is restored either when the system reaches the desired state or enters a new divergence phase. The impedance switch occurs at every divergence/convergence boundary, as exemplified in Fig. 4.

Fig. 4
figure 4

a The environment (\(E_{env}\)) introduces the energy in the robot during divergence, following the line marked by red arrows. This energy (\(E_{\text {In}}\)) is accumulated in the stiffness component of the robot impedance (\(Z_{K_d}\)). During convergence, the robot releases the energy (\(E_{\text {Out}}\)) through the line marked by green arrows, engaging \(Z_{K_c}\) in series to \(Z_{K_d}\). b The activation of \(C_{\text {div}}\) (impedance control in divergence phase) and \(C_{\text {conv}}\) (passivity control in convergence phase) is performed by changing S, as described in Eq. (5). (Color figure online)

Figure 3 describes the phase space for a 1-DoF attractor generated by the controller without damping. The divergence phases (quadrants Qi and Qiii) have an impedance equal to \(Z_{K_d}\). The convergence phases (quadrants Qii and Qiv) have an impedance equal to \(Z_{K_d}+Z_{K_c}\). Figure 3c shows a sample trajectory moving clockwise that branches in quadrant Qiv into an ideal behaviour and a perturbed behaviour.

The switching behaviour is implemented using a hard-switch (\(s=0,1\)) and is based on the architecture shown Fig. 4 and proposed by Swift et al. [38]. In our case the switch is activated by the following condition (independently for each task-space DoF):

$$\begin{aligned} \left\{ \begin{array}{ll} {s} = 1 &{} \text {if~} \dot{x}=0~ \vee ~ \text {sgn}({\tilde{x}}) = \text {sgn}(\dot{x})\\ {s} = 0 &{} \text {o/w} \end{array} \right. \end{aligned}$$
(5)

where \(s =1\) denotes the divergent phase and \({s} =0\) denotes the convergent phase for the considered DoF. When \({s} =1\) the stiffness of the impedance controller \(C_{\text {div}}\) is equal to \(k_d({\tilde{x}})\) as in Eq. (2). At the moment s becomes 0, the impedance controller \(C_{\text {conv}}\) is derived by applying the conservation of energy principle to ensure the controller’s passivity. The updated impedance redistributes the accumulated energy, using half for acceleration towards the equilibrium point and the other half for deceleration once the position error has been halved. Thus, it produces balanced acceleration and deceleration phases and reduces the peak control torques. The mathematical formulation of the stiffness profile for the controller \(C_{\text {conv}}\) is obtained by applying the conservation of energy between the energy accumulated in the robot stiffness at the beginning of convergence (\(E_\mathrm{In}\)) and the energy that will be released during convergence (\(E_\mathrm{Out}\)) for each task-space DoF:

$$\begin{aligned} \left. \begin{array}{l} E_{\text {In}}=\int k_{d}\left( {\tilde{x}}\right) {\tilde{x}}~d{\tilde{x}}\\ E_{\text {Out}}=2\frac{k^{'}_{\text {total}}{\tilde{x}}_{\text {mid}}^2}{2}=k^{'}_{\text {total}}{\tilde{x}}_{\text {mid}}^2\\ {\text {Passivity} \implies E_{\text {In}}\ge \displaystyle {E_{\text {Out}}}}\\ k^{'}_{\text {total}} =\left( \frac{1}{{\tilde{x}}^2_{\text {mid}}}\right) E_{\text {In}}=\left( \frac{4}{{\tilde{x}}^2_{\text {max}}}\right) E_{\text {In}} \end{array}\right. \end{aligned}$$
(6)

where \({\tilde{x}}_{\text {max}}\) is the displacement reached at the moment of switch from \(s=1\) to \(s=0\), and \({\tilde{x}}_{\text {mid}}\) is the midpoint between \({\tilde{x}}_{\text {max}}\) and \(x_d\). Note that \(k^{'}_{\text {total}}\) in Eq. (6) assumes the spring’s equilibrium point is moved to \({\tilde{x}}_{\text {mid}}\) during convergence. Rather we maintain \(x_d\) as the equilibrium point by introducing the following nonlinear stiffness:

$$\begin{aligned} \left. \begin{array}{l} k_{\text {total}}({\tilde{x}}) = k^{'}_{\text {total}} \left( \frac{0.5{\tilde{x}}_{\text {max}} -{\tilde{x}}}{{\tilde{x}}}\right) \end{array} \right. \end{aligned}$$
(7)

which satisfies the condition:

$$\begin{aligned} k_{\text {total}}{\tilde{x}} =k^{'}_{\text {total}}{\tilde{x}}_{\text {mid}}~, ~ \forall ~ {\tilde{x}}~ \in (0,~ {\tilde{x}}_{\text {max}}) \end{aligned}$$

Equation (6) imposes the controller passivity, which is a sufficient condition for stability. Note that the controller does not require damping in order to dissipate energy.

Finally, the FIC is added together with dynamics compensation and a null space controller term to obtain the robot control torques (\(\tau _\mathrm{ctrl}\)) as described in Algorithm 1; where q is the joint configuration vector, \(\dot{q}\) is the joint velocity vector, M(q) is inertia matrix, J(q) is the Jacobian, G(q) is the gravity compensation, and t\( C(q,\dot{q})\) is the Coriolis matrix.

figure a

2.3 Lyapunov stability analysis

The proposed controller is characterised by a non-smooth piece-wise energy manifold with a time-invariant topology, as described by Eq. (6). In other words, the system dynamics is deterministic and changing the controller gains online does not affect either the manifold regularity or the fact that the system energy flow is always converging to the null state \(({\tilde{x}}=0,~\dot{x}=0)\). This simplifies the stability analysis as it implies that changing gains are just an alteration of the initial condition. Furthermore, the intrinsic damping can be assumed to be zero without loss of generality in the proposed controller. Let us now consider the controller’s autonomous dynamics for a monodimensional system:

$$\begin{aligned} \left\{ \begin{array}{ll} \lambda (x)\ddot{x} +\dot{\lambda }(x)\dot{x} + k_d{\tilde{x}}=0 &{} \text { Divergence}\\ \lambda (x)\ddot{x} +\dot{\lambda }(x)\dot{x} + k_{\text {total}}{\tilde{x}}=0 &{} \text { Convergence} \end{array}\right. \end{aligned}$$
(8)

where \(\lambda (x)\) is the task-space inertia. \(\dot{\lambda }(x)\dot{x}\) are the Coriolis and Centrifugal forces [36]. A valid Lyapunov’s candidate is:

$$\begin{aligned} {\left\{ \begin{array}{ll} \displaystyle { V_{\text {div}}= \frac{\dot{x}^{T}\lambda (x) \dot{x}}{2} +\int k_{d}{\tilde{x}}~d{\tilde{x}}} \\ \displaystyle {V_{\text {con}}= \frac{\dot{x}^T\lambda (x)\dot{x}}{2} +\frac{{\tilde{x}}^T k_{\text {total}}{\tilde{x}}}{2}+\frac{\int _{0}^{{\tilde{x}}_{\text {max}}} k_{d}{\tilde{x}}~d{\tilde{x}}}{2}} \end{array}\right. } \end{aligned}$$
(9)

Time derivative of V is:

$$\begin{aligned} {\left\{ \begin{array}{ll} \dot{V}_\mathrm{div}=(\lambda (x)\ddot{x} +\dot{\lambda }(x)\dot{x} + k_d{\tilde{x}})\dot{x}=0\\ \dot{V}_\mathrm{con}=(\lambda (x)\ddot{x} +\dot{\lambda }(x)\dot{x} + k_{\text {total}}{\tilde{x}})\dot{x}=0 \end{array}\right. } \end{aligned}$$
(10)

Equations (9) and (10) prove that the two pieces that compose our manifold are stable. However, Lyapunov’s stability for non-smooth systems also requires to verify that the candidate is a Lipschitz function, which implies V exists and has a bounded finite derivative also at the transition point. To verify the continuity condition for the Lyapunov function, the limits of the two continuous functions at the switching conditions, occurring for \(\dot{x}=0\), should be the same value. When the switching occurs for \({\tilde{x}}\ne 0\), this is guaranteed by Eq. (7). On the other hand, such equality needs to be verified for \({\tilde{x}}=0\):

$$\begin{aligned} {\left\{ \begin{array}{ll} \displaystyle {\lim _{\begin{array}{c} {\tilde{x}}\rightarrow 0 \\ \dot{x}\rightarrow 0 \end{array}}{V_{\text {div}}}=\int k_{d}{\tilde{x}}~d{\tilde{x}}=0}\\ \displaystyle {\lim _{\begin{array}{c} {\tilde{x}}\rightarrow 0 \\ \dot{x}\rightarrow 0 \end{array}}{V_{\text {conv}}}=\frac{{\tilde{x}}^T k_{\text {total}}{\tilde{x}}}{2}+\int _{0}^{{\tilde{x}}_{\text {max}}} k_{d}{\tilde{x}}~d{\tilde{x}}}\\ ~~~~~~=\displaystyle {\left( \int _{0}^{{\tilde{x}}_{\text {max}}} k_{d}{\tilde{x}}- k_{d}{\tilde{x}}~d{\tilde{x}}\right) =0} \end{array}\right. } \end{aligned}$$
(11)

To verify that V is radially unbounded integrating the energy associated with \(K_\mathrm{d}\) in Eq. (2).

$$\begin{aligned} E=\left\{ \begin{array}{lc} \frac{e^{\left( \beta {\tilde{x}}\right) ^2}}{2\beta }+\frac{ k_{\text {const}}{\tilde{x}}^2}{2}, &{}\text {}|{\tilde{x}}|\le x_{B}\\ w_\mathrm{max}{\tilde{x}}+\frac{e^{\left( \beta {\tilde{x}}_\mathrm{B}\right) ^2}}{2\beta } +\frac{k_{\text {const}}{\tilde{x}}_\mathrm{B}^2}{2} , &{} \text {o/w} \end{array}\right. \end{aligned}$$
(12)

The controller energy is radially unbounded (i.e., \(E \rightarrow \infty \text { if } |x |\rightarrow \infty \)), and consequentially also V [Eq. (9)] is radially unbounded.

$$\begin{aligned} \displaystyle {\lim _{{\tilde{x}}_{\text {max}}\rightarrow \infty } V_{\text {div}}(x)=E(x)= \int _{0}^{\infty } k_{d}{\tilde{x}}~d{\tilde{x}}=\infty } \end{aligned}$$

Furthermore, the \(\dot{V}=0\) in both the transition states \(({\tilde{x}}_{\text {max}})\) and \((\dot{x}=0)\). Therefore, the controller respects all the required the stability conditions.

2.4 FIC intrinsic robustness to low-bandwidth feedback

The FIC generates a conservative field with asymptotically stable autonomous trajectories. Thus, the attractor energy is path independent. As a consequence, the proposed controller is intrinsically robust to discretisation, model errors and noise. On the other hand, this is not valid for virtual energy tank methods which rely on an integrator to track the energy exchanged by the controller to achieve passivity. To verify our claim we analyse the computation of energy exchanged by the FIC and a task-space mass-spring-damper impedance controller (i.e., PID in velocity). Consequently, the proportional, integral, and derivative terms are the damping, the stiffness, and the inertia, respectively.

The mechanical work of a mono-dimensional FIC is equal to the difference in potential energy between the two states (i.e, A and B):

$$\begin{aligned} \Delta E_\mathrm{FIC}= & {} \displaystyle {\int _{A}^{B}f({\tilde{x}})dS=\int _{A}^{B}f({\tilde{x}})\dot{{\tilde{x}}}dt}\nonumber \\= & {} \displaystyle {\int _{A}^{B}f({\tilde{x}})dx}=E(B)-E(A) \end{aligned}$$
(13)

where E is the energy of associated with the controller state, and reported in Eq. (12). As a consequence, the integral is path independent, and the evaluation of the controller energy is unaffected by the sampling time in discrete systems. Let’s now consider the mechanical work of an impedance controller using constant gains:

(14)

where \(t_\mathrm{f}\) is the final time of the trajectory. \(k_\mathrm{D}\), \(k_\mathrm{P}\) and \(k_\mathrm{I}\) are inertia, damping and stiffness of the controller. As \(k_\mathrm{I}\) is a conservative component, it is path independent and unaffected by switching to discrete time systems. However, this is not valid for both inertia and damping, which are both trajectory dependent. Thus, the calculation of mechanical work for an impedance controller depends on the chosen discretion, and will always be an approximation of the effective work in Eq. (14). For example, let’s consider the non-conservative components of the impedance controller’s mechanical work and apply a zero-order hold time discretisation.

$$\begin{aligned} \displaystyle {\Delta E_\mathrm{IC}^-}= & {} \displaystyle {k_\mathrm{D}\sum _{A}^{B}\ddot{{\tilde{x}}}\Delta {\tilde{x}}+k_\mathrm{P}\sum _{A}^{B}\dot{{\tilde{x}}}\Delta {\tilde{x}}}\nonumber \\= & {} \displaystyle {k_\mathrm{D}\sum _{t=0}^{t_\mathrm{f}}\ddot{{\tilde{x}}}(t)({\tilde{x}}(t+\Delta t)- {\tilde{x}}(t))\Delta t}\nonumber \\&+\,\displaystyle {k_\mathrm{P}\sum _{t=0}^{t_\mathrm{f}}\dot{{\tilde{x}}}\left( t\right) \left( {\tilde{x}}\left( t+\Delta t\right) -{\tilde{x}}\left( t\right) \right) \Delta t} \end{aligned}$$
(15)

It shall be noted that we have assumed for simplicity that the time needed to move between \(A\rightarrow B\) is a multiple of the sampling time for all the selected \(\Delta t\). The estimation of the energy can be improved with state estimators. However, their accuracy will be always be compromised by a low sampling frequency (Fig. 5), model errors and noise.

Fig. 5
figure 5

\(\Delta E_\mathrm{IC}\) for a system (\(k_\mathrm{D}=1 \hbox {kg}\), \(k_\mathrm{P}=1\hbox {Nm}^{-1}\) ) tracking the trajectory \(x(t)=t^3+t^2+t\) for \(1~ \hbox {s}\) at different sampling rates are compared against the expected reference value computed at a frequency of \(10\,\hbox {kHz}\). The system energy (\(\text {E}\)) computed with the different samplings of the same signal shows an error that increases with the reduction of the bandwidth. The drift of the energy values reveals that integration errors becomes relevant for low-bandwidth controllers even for simple ideal dynamics (absence of both model errors and noise)

3 Experimental validation

The experiments are designed to validate if the proposed controller retains the desirable characteristics and performance of impedance controllers whilst reducing some of its shortcomings. In other words, we would like to retain the interaction robustness of impedance controllers, while being able to adjust online the trade-off between compliance and tracking accuracy.

A 7-DoF Panda robot manipulator from Franka Emika is used for the experiments where the controller damping is always set to zero. During contact experiments, a PTFE sheet is attached to the end-effector to reduce sliding friction. An ATI Gamma SI-130-10 force/torque (F/T) sensor, mounted at the end-effector of the Panda, records the interaction forces but is not used in the controller.

3.1 End-effector pose tracking before controller calibration

Diagonal gain matrices are used for the constant stiffness gains in Eq. (2). The values of kconst are set to 150 \(\mathrm{Nm}^{(-1)}\) for linear degrees of freedom(DoF)and 5 Nm \(rad^{(-1)}\) for the angular DoF. We also test the proposed impedance profile on a traditional impedance controller [Eq. (1)] by turning off the Fractal Attractor (stiffness set to Eq. (2) during both convergence and divergence). However, the high stiffness values may render the manipulator unsafe and trigger the Panda safety mechanisms, as shown in the attached video. Therefore, it is not possible to run a comparison with a traditional impedance controller using the nonlinear stiffness of Eq. (2).

3.1.1 Static target

The initial configuration of the end-effector is set to \(X_{d} = [0.5 \ 0 \ 0.5 \ -\pi \ 0 \ 0]^T\) (m or rad), and the end-effector is randomly perturbed by a human operator 15 times. The robot’s recovery behaviour is recorded. The initial virtual boundaries, controlled by tuning the nonlinear stiffness profile in Eq. (2), are as follows: \(X_{B,1:3} = {0.05}\hbox {m}\) and \(X_{B,4:6} = {0.1746}\hbox {rad}\), unless differently stated. The mean \(\bar{{\tilde{X}}}\), standard deviation \(\sigma \), and the RMSE of the end-effector error are used to evaluate the system accuracy. The mean and standard deviation of the convergence time after a perturbation are computed to evaluate the recovery behaviour of the controller.

3.1.2 Trajectory tracking

We evaluate the robustness of the proposed method to track a desired trajectory when the end-effector is perturbed. The desired periodic trajectory, on y-axis, has amplitude \(\pm {0.25}\hbox {m}\) and period \(T = {40}\hbox {s}\). Fifteen manually generated perturbations of the end-effector are used for this evaluation. The mean and the standard deviation of RMSE for \({\tilde{X}}\) are computed to evaluate the controller tracking performance. The convergence time mean and standard deviation are also measured to evaluate the performance of the controller after each perturbation.

3.2 End-effector pose tracking and forward force control after controller calibration

Despite the controller allowing global stability, each physical system has marginal stability due to its limited finite properties, such as power and band-pass limits. Thus, within the context of this method, controller calibration refers to the process of identifying the upper-bounds of the controller’s parameters that can be applied without exceeding the physical properties of the robot within its work-space. We set the damping to zero and then evaluate the maximum force that can be exerted without losing stability. It is worth noting that the value of force would not precisely correspond to the amount of force exerted on the end-effector due to the presence of model errors. The authors would like to remark that these calibrations are both system and impedance profile specific.

The following is the calibration process used to identify the maximum force that can be applied for a given boundary when the damping is set to zero:

  1. (i)

    Setting \(K_{\text {const},ii} = 0\) (\(\forall i \in [1,6] \subset \mathbb N\)).

  2. (ii)

    Setting the initial maximum allowed wrench at the virtual boundaries by taking the maximum payload of the robot into account: \(W_{\text {max},1:3} = {30}\hbox { N}\) and \(W_{\text {max},4:6} = {20}\hbox {N m}\).

  3. (iii)

    Perturbing the end-effector of the robot and reducing the size of the virtual constraints (\(X_{{B,i}}\)), until the robot starts to oscillate.

  4. (iv)

    Reducing \(W_{\text {max},i}\) and keeping the value for \(X_{{B,1:6}}\) before the oscillation.

  5. (v)

    Repeating steps item 3 and item 4 until: \(X_{{B,1:3}} = {0.001}\hbox {m}\) and \(X_{{B,4:6}} = {0.0174}\hbox {rad}\).

The controller is tested again after calibration, and trajectory tracking performance is evaluated with the same method used for the trajectory tracking experiment above. Furthermore, the stability and the accuracy of the force interaction are evaluated using the force/torque sensor mounted at the end-effector. The force interaction has been limited to the z-axis for the scope of this paper. The following experiments are carried out during this phase:

  1. (1)

    Static & trajectory tracking: the previous experiments are repeated after calibration.

  2. (2)

    Online virtual boundary adjustment: the human operator randomly perturbs the robot in static as its virtual constraint size of \(X_{B,1:3}\) is decreased online. \(X_{B,1:3}\) reduces from \({0.20}\,\hbox {m}\) by \({0.0025}\,\hbox {m}\) every second until it reaches \({0.001}\,\hbox {m}\). During the interaction, the manipulator stiffness automatically increases from initial value of \(k_{d,2} = {150}\,\hbox {Nm}^{-1}\) at the beginning of the experiment where \(X_{B,1:3} = {0.20}\,\hbox {m}\) to \(k_{d,2} = {1250}\,\hbox {Nm}^{-1}\) at the end due to the change in the virtual constraints.

  3. (3)

    Circular trajectory tracking: the trajectories on the xy-, xz- and yz-planes are tracked to evaluate the accuracy of the controller across multiple directions. The starting pose is \(X_{d} = [0.4 \ 0 \ 0.85 \ 0 \ 0 \ 0]^T\), the trajectory execution period \(T={40}\,\hbox {s}\), and its \(\text {radius} = {0.1}\,\hbox {m}\). The tracking performance has been evaluated initially for \(K_{\text {const}} = \mathbf {0}\), then setting \(K_{\text {const},ii} = {150}\,\hbox {Nm}^{-1}\) for the linear degrees of freedom and \(K_{\text {const},ii} = {5}\,\hbox {Nm rad}^{-1}\) for the angular degrees of freedom.

  4. 4)

    Interaction with objects: the robot makes contact with Box #1 shown in Fig. 8a and gradually pushes down to exert the maximum allowed force in the direction of z-axis. The force evolution over time is recorded with the force/torque sensor and compared with the data from the forward model. The virtual constraints are \(X_{B,1:3} = {0.1}\,\hbox {m}\) and \(X_{B,4:6} = 0.174 6~\hbox {rad}\).

3.3 Robustness to low-bandwidth feedback

The FIC’s robustness to low-bandwidth feedback is evaluated on a static pose and trajectory tracking tasks along the lateral direction (y-axis). In both cases, the controller behaviour is analysed in both unperturbed and perturbed conditions. Low-bandwidth feedback is emulated by applying a zero-order hold to the robot’s sensory feedback signals. The perturbations used are 10 pushes manually applied at the end-effector along the vertical directions (z-axis). The RMSE and recovery time of the perturbations are calculated for experiments executed with feedback frequencies of 20, 100 and 1000 Hz.

All the low-bandwidth experiments were conducted setting \(X_{B}=[7.5~7.5~7.5~1.047~1.047~1.047]^T\) cm or rad, \(K_\mathrm{const}=\mathrm {diag}(100,~100,~100,~5,~5,~5)\) N/m or Nm/rad, and a passive damping \(D=\mathrm {diag}(2.5,~2.5,~2.5,~1.25,~1.25,~1.25)\) \(\hbox {Nsm}^{-1}\) or \(\hbox {N}\hbox {m}\hbox {s}\,\hbox {rad}^{-1}\). The passive damping was introduced to experimentally verify that the stability of the system is not compromised as long as there is not velocity tracking. Lastly, it shall be noted that during this experiment the Franka Arm was wrapped in plastic covers due to a concurrent experiment involving sand.

4 Results

The passivity of the controller is verified by checking the difference between the absorbed \(E_{\text {in}}\) and energy released on the environment \(E_{\text {rel}}\), computed as follows:

$$\begin{aligned} \begin{array}{lc} \displaystyle {E_{\text {in}} = \sum _{i=1}^{6} \int K_{d,ii}{{\tilde{X}}}_{i}~d{\tilde{X}}_{i}},&{} \text {Divergence } \\ E_{\text {rel}} = \max \left( \frac{1}{2} \dot{X}^T \Lambda (q) \dot{X}\right) , &{} \text {Convergence} \end{array}{} \end{aligned}$$
(16)

4.1 End-effector pose tracking before controller calibration

The collected data for the static perturbations in Table 2 indicate that the position error is constrained and consistent. The average convergence time over the 15 perturbations is \({1.43} \pm {0.047}\,\hbox {s}\) and the difference between the absorbed and released energy in static is \(E_{\text {rel}} - E_{\text {in}} = -0.011 \pm 0.003 \ \hbox {J}\). The trajectory tracking data are reported in Table 2. The average convergence time to the desired pose is \({1.45} \pm {0.047}\,\hbox {s}\), and the energy exchanged is \(-0.019 \pm 0.006 \ \hbox {J}\).

Fig. 6
figure 6

Stiffness Profile w.r.t \(X_{B,1:3} = {0.05}\,\hbox {m}\) and \(X_{B,4:6} = {0.1746}\hbox {rad}\)a variable stiffness w.r.t position error (\({{\tilde{X}}}_{1:3}\)), b Variable stiffness w.r.t orientation error (\({{\tilde{X}}}_{4:6}\))

4.2 Controller calibration

Table 1 represents the results of the controller calibration and it shows how the value of \(W_{\text {max}}\) changes as \(X_B\) varies. A preliminary analysis of the stiffness profile obtained with the Franka Panda has been performed to verify that the proper impedance profile has been implemented in the robot. The results are shown in Fig. 6, which are congruent with the theoretical profiles shown in Fig. 2.

Table 1 Controller calibration w.r.t \(W_{\text {max}}\) and \(X_{B}\)
Table 2 Static (S) and Trajectory Tracking (TT) Errors recorded before (BC) and after (AC) calibration

4.3 End-effector pose tracking and forward force control after controller calibration

Static & trajectory tracking: the data recorded for the static poses experiment after calibration are reported in Table 2. They indicate that there is a reduction of the pose error after a perturbation. The static position errors gets 7 times smaller after calibration. Meanwhile, the orientation errors gets 3 times smaller after calibration. The calibration also reduces the RMSE of the tracking errors of a factor between 2.5 and 3.5. The convergence time to the desired pose is \({1.38} \pm {0.044}\hbox { s}\) and the difference of absorbed and release energy is \( -0.033 \pm 0.010 \ \hbox {J}\). These results are also confirmed by the trajectory tracking experiment data reported in Table 2. The convergence time is \({1.42} \pm {0.045}\hbox { s}\) and the difference between the absorbed and released energy is \(-0.048 \pm 0.013 \ \hbox {J}\) during trajectory tracking.

Online virtual boundary adjustment: the stability is not affected by an online change of the virtual constraints while a user introduces random perturbations to the robot. The system remains passive over the trial with a difference between the absorbed and the released energy of \(-0.136 \pm 0.005 \ \hbox {J}\).

Circular trajectory tracking: Table 3 reports RSME tracking performances of end-effector pose on the xy-, xz- and yz-planes for \(K_{\text {const}} \ne \mathbf {0}\). The best tracking performance is obtained with a boundary of \( 0.01 \hbox {m}\) boundary when \(K_{\text {const}} \ne \mathbf {0}\). The highest RMSE recorded is less than 0.007 m. Sample circular trajectories for the yz-plane are provided in Fig. 7.

Table 3 The mean of the RMSE measured for tracking a circular trajectory on 3 different planes

Interaction with objects: the steady state force recorded during the interaction with a box is \({27.01}\,\hbox {N}\) which is the 95% of the desired interaction force (Figs. 8, 9).

Fig. 7
figure 7

Circular trajectory tracking on yz-plane

Fig. 8
figure 8

Snapshots of the interaction experiments. a Vertical interaction with a cardboard box. b Interaction during tracking a sinusoidal trajectory (along the y-axis) while interacting with a cardboard box. c Tracking a sinusoidal trajectory along the y-axis while interacting with a curved surface

Fig. 9
figure 9

Data recorded in the interaction experiments. a Static interaction with a cardboard box normalised wrt time. The shaded area are the 90% prediction bounds for the recorded data. b Interaction with the cardboard box while tracking a sinusoidal trajectory along the y-axis. The average maximum force is \({28.45}\,\hbox {N}\). c Interaction with the curved surface while tracking a sinusoidal trajectory along the y-axis. The average maximum force is \({28.85}\,\hbox {N}\)

4.4 Robustness to low-bandwidth feedback

The controller remains stable after receiving an external perturbation even with a feedback bandwidth of \({20}\hbox {Hz}\) as shown in Figs. 10 and 11. The data gathered in Table 4 indicate that as the feedback frequency decreases the position error of \({\tilde{x}}\), \({\tilde{y}}\) and \({\tilde{z}}\) increases, but the tracking error at its highest peak is less than \({5}\,\hbox {mm}\). The recovery time in the static task for the feedback frequencies of 1000, 100 and \({20}\,\hbox {Hz}\) are \({1.33} \pm {0.043}\hbox { s}\), \({1.45} \pm {0.047}\hbox { s}\) and \({2.26}{} \pm {0.074}\hbox { s}\), respectively. The recovery time for the trajectory tracking task for the aforementioned feedback frequencies are: \({1.37} \pm {0.090}\hbox { s}\), \({1.51} \pm {0.049}\hbox { s}\) and \({3.13} \pm {0.103}\hbox { s}\), respectively.

Fig. 10
figure 10

Comparison of one random interaction at the end-effector with the following feedback bandwidths: 1000, 100 and \({20}\,\hbox {Hz}\). a Static pose, b trajectory tracking. Reducing the feedback bandwidth reduces the tracking accuracy, but it does not compromise the task even when the system is perturbed

Fig. 11
figure 11

Comparison of trajectory tracking along the y-axis with/without interaction on the end-effector with the following feedback bandwidths: 1000, 100 and \({20}\,\hbox {Hz}\). a Without interaction, and b with interaction (same experiment of Fig. 10b). A perturbation along the z-direction does not affect the task along the y-direction in any of the tested conditions

Table 4 Results of the low-bandwidth feedback experiments

5 Discussion

The experiments verify that the FIC retains passivity in a redundant manipulator without requiring the observation of the entire robot state. As a consequence, the FIC’s stability is independent from the null-space controller, which is regarded as an external perturbation. The tracking accuracy data indicate that it is robust to model errors, which are equivalent to external disturbances and are compensated by the FIC’s nonlinear stiffness. The experiments also show that the robot can initiate rigid contact with unknown bodies and dynamic systems without any assumption on the interaction. In the attached video, the reader can also appreciate how the robot remains stable even in the case of a sudden loss of contact when applying the maximum achievable interaction force. The robustness is further showcased in Figs. 8 and 9 where the robot initiates and brakes contact with 3 different rigid bodies without any need to account for the objects’ presence or shape in the controller. Furthermore, the video includes the following additional scenarios: FIC with damping in the convergence phase, perturbation beyond the boundaries without damping and rapid shaking without damping. The passivity was verified in all cases. The time of the convergence are 1.24, 1.33 and \({1.35}\hbox { s}\), respectively. Therefore, it can be said that the controller is intrinsically stable independently from environmental interactions both theoretically and experimentally. The data also show that the trajectory tracking errors RMSE (Tables 2, 3) are always contained within the task boundaries set by the user. Thus, we validate that tracking performance is not affected by removal of active damping, due to the high on-line adjustable impedance gains that may be achieved with the proposed controller.

These results are possible because the stability of the proposed controller does not rely on the projection matrices used by conventional controllers to account for null-space and contact during stabilization [39,40,41]. Mainly, Moura et al. have recently studied and reported the effect of numerical instability related to projection matrices on the performance of both contact and null-space controllers, which is considered a major limitation of stable interaction with highly variable and unknown dynamics [41].

In summary, the major difference between tank based controllers and the proposed method is that a nonlinear controller impedance as an energy storage function eliminates dependency from null-space projections and, consequently, singularities. The FIC energy maps the robot energy, which is upper-bounded by the maximum displacement from the desired pose and is zero only when the robot is in the desired pose. Consequently, the FIC overcomes the limitation of the tank-based approach that is susceptible to miss-estimation of the exchanged energy [31].

The experiments with low-feedback bandwidth demonstrate that the proposed method is immune to the miss-estimation of exchanged energy intrinsic to methods requiring integration to evaluate the state of the controller. The tracking error is slightly increased by the reduction of the feedback bandwidth, and there is also an increase in the oscillatory behaviour while recovering from a perturbation. Thus, reduced feedback bandwidth degrades the system’s dynamic response, but it does not alter the stability proprieties of the controller. These results are particularly important because they show how this controller may be operated directly via feedback from camera sensors, which typically require computationally complex sensor fusion and state estimators that are susceptible to drift [42,43,44].

The sole limitation of the proposed method currently known to the authors is that when using a nonlinear impedance profile, there is a jump in force when switching from divergence to convergence. This behaviour is due to the different slopes of the stiffness energy in the two phases, and further research need to be conducted to identify a solution to ensure energy and force conservation at the switching condition for nonlinear force profiles.

6 Conclusion

This manuscript introduces a framework for impedance controllers which relies on a fractal task-space attractor to guarantee the stability of interaction with unknown environments. The FIC enables online impedance adaptation without introducing additional stability conditions, which is not possible with traditional controllers [17, 39, 45]. The results show that the system can achieve a good level of accuracy in trajectory tracking, and it can exert significant forces on the environment without compromising stability. At the best of the authors’ knowledge these results are the first example of accurate trajectory tracking that relies solely upon the nonlinear stiffness of the controller. Future works will focus on identifying different impedance profiles and attractor characteristics that will enable the application of this framework to fields such as medical and industrial robots.