Abstract
Time-varying impedance control is pivotal in shaping the dynamics of both patients and robots concurrently, facilitating tailored training for rehabilitation within human–robot interaction (HRI) scenarios, particularly for exoskeleton robots. Given the diverse physical characteristics of patients, sudden movement variations can pose challenges, potentially disrupting the robot’s functionality. Moreover, the inherent dynamics of robots coupled with uncertainties present additional hurdles for ensuring optimal and safe rehabilitation exercises. In this study, we introduce a novel approach: fuzzy adaptive time-varying impedance control, adept at mitigating external disturbances and addressing all uncertainties associated with both robot and patient dynamics, thereby ensuring safe and effective rehabilitation protocols. A primary concern with time-varying impedance control lies in system stability. Leveraging Lyapunov stability analysis, we delineate the safe operational boundaries of time-varying impedance control, thus averting potential instability. Our proposed impedance modulation facilitates desired dynamics while facilitating passive and isometric exercises for patients. Through simulations conducted in MATLAB2023, we demonstrate the efficacy of our approach, comparing its performance against conventional constant impedance control methods and also we used the controller for three different patients with various physical features that shows good results for all of them.
Introduction
Impedance control has emerged as a highly effective method for managing the interaction dynamics between robots and humans. It revolves around establishing a dynamic relationship between the force of interaction and various parameters such as acceleration, velocity, and displacement of both the robot and the associated body. In the realm of rehabilitation robotics, impedance control stands out as a viable strategy. By manipulating its dynamic model alongside the patient’s body, the robot can administer tailored exercises conducive to optimal rehabilitation outcomes.
While many existing approaches in rehabilitation literature lean toward constant impedance control (Akdogan and Arif, 2011), variable impedance control offers greater flexibility in modulating impedance profiles to align with desired dynamic models and enhance the robot’s resilience during environmental interactions (Ajoudani et al., 2012; Ficuciello et al., 2015). However, the paramount concern with variable impedance control lies in ensuring system stability (Sun et al., 2019). Exceeding appropriate bounds with variable terms can precipitate instability, a critical issue in the context of rehabilitation robotics with potentially catastrophic consequences.
The coefficients within the impedance equation represent the key parameters that can be varied during interaction. These coefficients—namely inertia, damping, and spring constants—correspond to acceleration, velocity, and displacement signals, respectively. Admittance control, as explored by Ficuciello et al. (2015) and Muller et al. (2018), offers an alternative perspective on impedance control, emphasizing the control of end effector velocity. In these studies, the spring coefficient is disregarded, while the inertia term remains constant, and only the damping coefficient varies inversely with end effector velocity.
In the studies by Lee and Buss (2008) and Kim et al. (2016), variable impedance control to achieve desired force output has been adopted. Here, the spring coefficient dynamically adjusts as the end effector seeks to exert a specified force, while the inertia and damping coefficients remain fixed. In the studies by Oguztöreli and Stein (1991) and Farahat and Herr (2010), a nonlinear spring coefficient that increases proportionally to the muscle force tolerated has been introduced. In the study by Tsumugiwa et al. (2002), a virtual mass and damper system to measure the patient’s spring coefficient, enabling dynamic adjustment of damping coefficient to regulate varying impedance has been employed. In the study by Li et al. (2016), electromyography (EMG) signals to estimate joint stiffness, employing an adaptive controller to facilitate rehabilitation have been utilized.
In the study by Furui et al. (2021), a lambda-type muscle model to redefine spring and damping coefficients during muscle relaxation has been implemented. In the study by Mersha et al. (2014), aerial interaction with variable impedance control, where spring coefficient variations drive changes in damping, while inertia remains constant has been explored. Ajoudani et al. (2012) selected spring coefficients proportional to EMG signals. Ikeura et al. (2002) optimized damping term using algorithms. In the studies by Yang et al. (2011), Burdet et al. (2014), Liang et al. (2014) and Li et al. (2018), learning approaches and adaptive controllers to mimic human behavior have been adopted.
Ensuring suitable coefficient ranges is crucial for maintaining system stability in variable impedance control. Ferraguti et al. (2013) and Zheng et al. (2018) introduced an energy tank-based method, utilizing a time-varying spring to stabilize the system. Kronander and Billard (2016) addressed coefficient ranges, treating inertia as constant, albeit with assumptions regarding interaction force. Sun et al. (2019) employed approximate dynamic inversion to model uncertainties, ensuring semi-global practical exponential stability. Liang et al. (2022) defined time-varying stiffness and employed an adaptive controller to manage uncertainty. Hamedani et al. (2021) adjusted stiffness based on force levels, utilizing a neural-fuzzy controller to estimate contact force. Jin and Guo (2023) used an extended state observer (ESO) and model predictive controller (MPC) for estimation of the uncertainty and disturbances of the patients during the lower limb rehabilitation by an exoskeleton robot. This robot has two links and after linearization could use the MPC for predicting the movements of the patients during rehabilitation.
Dong and Ren (2017) introduced a dynamic impedance curve with all coefficients varying over time, employing an uncertainty and disturbance estimator (UDE) to manage uncertainties. In this estimator, just the inertia matrix of the robot is considered to be uncertain and the UDE is defined by this assumption. Many studies focused on adapting impedance coefficients to ensure system stability. Huang and Chen (1992) used varying impedance with two strategies of position-based and force-based and could design the impedance coefficients to have a stable system. Park and Lee (2004) used adaptive control for control of a haptic device and could estimate the force in contact with people. Chien and Huang (2004) could use the adaptive impedance control to estimate the parameters of robot while the system became stable. Sharifi et al. (2014) utilized a model reference that finally led the adaptive control to have a stable system. Li et al. (2017) and Fateh and Khoshdel (2015) used the adaptive impedance control to change the impedance coefficients to have a stable system. However, these time-varying coefficients are not desired to be the best dynamic behavior of the system that can be satisfying for the specified usage. This research is trying to change the impedance parameter to get the force or the position of the robot to the desired amount in the presence of uncertainty and keep the system stable.
This study aims to adapt impedance parameters to achieve desired force or position in the presence of uncertainty while maintaining system stability. A new adaptive fuzzy controller is proposed to guide rehabilitation robots amid uncertainty and patient limb disturbances. Through time-varying impedance control, the robot can mimic professional physiotherapists’ behavior during training, providing variable impedance ratios for effective interaction. Simulation results demonstrate the controller’s efficacy in tracking desired impedance while ensuring system stability.
The paper proceeds as follows: The section “Problem formulation” presents robot dynamics and its conversion to a Cartesian coordinate system. The section “Time-varying impedance control” details the time-varying impedance control concept and the utilization of adaptive fuzzy control to achieve desired impedance. The section “Simulation” showcases simulation results and evaluates the proposed method’s effectiveness. Finally, the section “Conclusion and future research” offers concluding remarks.
Problem formulation
We consider an electrically driven rehabilitation robot comprising n links interconnected at n joints within an open kinematic chain. Each link is actuated by a permanent magnet direct current (DC) motor via gears. We make the idealized assumption that both the links and the couplings between the electric motors and links exhibit perfect rigidity. The dynamic model governing the system is expressed as shown in equation (1)
where
where,
in which
The electric motors provide the joint torques of the robot as follows
From equations (3) and (8), it is concluded that
In a permanent magnet DC motor, the electrical equation is given by
where
in which
Based on these equations, the robot motion equation in the task space is given by
where
The time-varying impedance control
The controller presented in this paper comprises two distinct components. The first component, serving as the inner controller, embodies the impedance model tasked with managing the dynamic interplay between the robot and the patient. Meanwhile, the outer layer of the controller entails the adaptive controller, designed to mitigate the impact of uncertainties and disturbances. The overarching objective of the outer layer controller is to drive the system’s state variables toward the desired impedance amid the presence of uncertainties and disturbances. To achieve this objective, an error term is defined, acting as a pivotal metric for assessing the deviation between the desired and actual system states
Now a sliding surface is designed as follows
and the control effort is such that
Similarly, we use an auxiliary variable called
From equations (18)–(21), it follows that
By replacing equations (23) and (24) in equation (16), we have
By considering uncertainty and nominal models, the motion equation is given by
The above equation is the nominal model of the system and
The inner layer of the controller tries to bring the dynamic equation of system impedance to the desired dynamic equation. The designed impedance model is as follows
where,
When this control law imposes on the system given by equation (25), the result will be as follows
The equation (31) is divided into two parts as given below
(ii) Equation (28), that is, impedance dynamic equation, where
And
Here, the fuzzy system is used to eliminate the effect of disturbance and uncertainty. This fuzzy system tries to minimize the effect of uncertainties. The most important principle in the design of the fuzzy system is the selection of system inputs, in this system the two inputs are
Assuming
For
for

Fuzzy inputs (a)
If we use the Mamdani-type inference engine, the Gaussian fuzzifier and the center average defuzzifier, the output will be
where,
where,
Stability stands as the primary concern in time-varying impedance controllers. The incremental adjustment of impedance over time carries the risk of inducing instability, a particularly untenable scenario in medical robotics. While certain impedance coefficients have been identified as stabilizers for adaptive systems (Chien and Huang, 2004; Huang and Chen (1992); Li et al., 2017; Park and Lee, 2004; Sharifi et al., 2014), they often merely ensure stability without necessarily achieving the desired interaction dynamics. These coefficients are adjusted to a specific extent to maintain system stability, yet they may not fully address the dynamic requirements for interaction. In the study by Dong and Ren (2017), Dong tackled this issue by proposing specific limits for inertia, damping, and spring coefficients. These limits not only ensure the stability of the time-varying system but also allow all coefficients to be dynamically adjusted, facilitating attainment of desired dynamics within specified limits. Dong’s approach serves as a source of inspiration for this paper.
Dong considered the inertia matrix as a parameter fraught with uncertainty, a characteristic shared by all robot components in this article. To address this uncertainty, an adaptive control mechanism employing a fuzzy adaptive controller is introduced. In order to establish stability and derive adaptive rules, compensation based on Lyapunov’s function is proposed
While there is an
The following amount is offered for the
The derivative of Lyapunov function
And from equation (28), we get
Considering equation (44), L1 converts to
The derivative of equation (45) is
From equations (44), (48), and (49), we get
But for total stability of system,
(1)Non-contact phase: in this phase,
In this approach, all coefficients have symmetric, positive definite, and continuously differentiable time-varying matrices, and there always exists a nominal part
(2) Contact phase: in this phase,
The result of above equation is
So if the conditions in equation (52) are positive semi-definite and equation (45) is conducted,
By replacing equation (35) in equation (55), we can write
According to Assada (2005), we have
As a result, equation (56) is given by
And for having a negative derivative of Lyapunov, the following condition should happen
In this way, the centers of fuzzy groups are obtained. It can be seen that the Lyapunov function given by equation (42) is positive and its derivative is in the form of equation (60), which by establishing the relation given by equation (59), the derivative of the Lyapunov function is negative, that is,
The
So based on Lyapunov law, the system is stable and the limits in equation (52) guarantees the safety of the patient.
Physiotherapy training design
For the desired paths, a smooth trajectory is selected, ensuring at least second-order continuity. Furthermore, these paths are constrained within the permissible range of motion for the injured knee or thigh. The training regimen examined in our study focuses on isometric training, serving as a demonstrative example to showcase the controller’s efficacy in generating desired dynamics.
Isometric training involves muscle contraction without accompanying movement in the surrounding joints. This type of exercise emphasizes maintaining constant tension on the muscles, contributing to improvements in muscle endurance and supporting strength training. While many muscle-strengthening exercises entail moving joints and exerting force against resistance, isometric exercises differ by maintaining static positions. In our setup, the joint of the robot coupled to the hip angle is employed for isometric training. Specifically, the robot arm angle initiates from 0 degrees and steadily moves at a constant speed to an angle of 30 degrees in the front position, maintaining this angle thereafter. Similarly, for isometric movement where the knee angle remains constant, the robot arm angle begins at 90 degrees, progressing steadily at a constant speed to an angle of 60 degrees in the front position and maintaining this constant angle throughout.
The designed paths for both exercises are represented by third-order equations, satisfying angular boundary conditions. At the initiation and culmination of each path, the angular velocity is set to zero (see Figure 2(a) and (b)). These predetermined paths guide the robot’s end effector to the specified position (see Figure 2(c)) within the task space:

Desired path for the robot: (a) knee joint, (b) hip joint, and (c) end effector.
Yet the time-varying impedance coefficients are the important factors to first, help the joints to have a soft dynamic movement to get the desired constant degree while having the desired dynamic. Second, the constant phase of degree helps the joint to remain constant. These coefficients are designed for the hip as shown below
These coefficients are designed to be soft and the patient feels soft in the interaction process. Also when the controller maintains the impedance coefficients in the range of equation (50), the safety of the patient is guaranteed. Also considering the soft amounts for the coefficients during time, this soft rehabilitation causes more natural rehabilitation.
These parameters are designed as an example for showing the capability of the proposed controller for achieving the time-varying dynamics, and every other curve that is helpful for the rehabilitation and satisfies the two limitations for time-varying coefficients (equation (52)) can be utilized. To show these limits in the above example, the first item is
If equation (52) is formed for the system and
Equation (68) shows that the situation in equation (52) is satisfied. Also, Figure 3 depicts that equations (i) and (ii) are positive. Both above equations (i) and (ii) are positive semi-definite and the selected impedance coefficients are in the stable ranges. Figure 4 depicts that (i) and (ii) are positive.

The designed impedance coefficients.

Limitation criteria for time-varying impedance coefficients.
Simulation
In Figure 5, there is the control system of time-varying impedance control.

Fuzzy adaptive time-varying impedance control of rehabilitation robot.
For the simulation, the Matlab2023 is used and a rehabilitation robot with two links is used (see Appendix A). The experiment is done for three different patients with different weights (see Table 1) to show the power of the controller for getting the desired impedance.
The weight of limbs of three patients.
The desired impedance parameters are time-varying and can change the dynamics of the robot and the human during the rehabilitation. The uncertainty is limited and is 20% of the real amount. It means that the model that is used in the controller is 20% or lower than the real model
For the disturbance terms, 10% of the input voltage to the actuators is used for simulation of a disturbance. This leads to simulate the disturbance to more natural shape. When the amount of changes of the angle is more the voltage will be more and this leads to more disturbances. This kind of disturbance is near to the disturbances that are related to the patients’ movement. When the motor tries to change the robot’s angle, the patient will move more and this increases the disturbance effect. The parameters of the adaptive fuzzy controller are selected as given below
Figure 6 depicts the results of isometric exercise for rehabilitation for time-varying impedance coefficients and constant coefficients. Based on equation (18), the error of the outer layer that is in charge of compensation of uncertainties and disturbances is as given below and shows the difference between x and xi.

The error of outer layer of controller in X direction. (b) The error of outer layer of controller in Y direction.
This figure illustrates the effective compensation provided by the adaptive fuzzy controller for disturbances and uncertainties, enabling the robot to reach its desired position within the task space for all three patients. Notably, this observation holds true for both time-varying and constant impedance scenarios. Also, the results show that the amount of error for patient 1 in both direction of X and Y is the lowest and for patient 3 the error is the most. This demonstrates that when the weight of the patient increases, the error becomes more but finally for all three patients the amount of error is very low and in patient 3 and in the direction Y, it is 3 mm that is acceptable for the rehabilitation.
It underscores the adaptive fuzzy controller’s ability to mitigate the impact of disturbances and uncertainties independently of the inner control layer. Given that the inner controller effectively manages the system to attain the desired dynamics, achieving the desired impedance becomes feasible. In this study, particular emphasis is placed on voltage control. By manipulating the motors’ voltage, the system can be steered toward the desired dynamics as shown in Figure 7.

The voltage of the first and second joint for all patients.
The voltages depict that between 0 and 2 seconds, the voltage increases to get the desired task space trajectory, then the voltage remains stable to robots linkages that have constant degrees. The voltages are the outer layer output of the controller. Obviously for the third patient that have heavier limbs, the amount of voltage for tracking the time-varying impedance increases more and when the limbs get the desired impedance the voltage of the first patient becomes less than the other two. This phenomenon is because of more control attempt by the controller for the heavier person.
Now for a better understanding of the efficiency of time-varying impedance, we compare the results of time-varying impedance with the constant impedance control. In the same situation that all control coefficients of control like
These are the exact amount of impedance coefficients that the time-varying impedance coefficients had at the final of the path. The output trajectory that leads the xi to track the xd and causes the system to have the desired dynamic known in this paper as the Ein is shown in Figure 8.

(a) Results of trajectory in task space, (b) error of tracking in x direction, and (c) error of tracking in y direction.
The results depict that the time-varying impedance control has better results for tracking a path and this is added to the main goal of this research which is having the desired dynamic with time-varying impedance coefficients. The results show that error of impedance in the X and Y direction are the most for patient 3, that is the biggest patient and the robot faced the more disorientation in comparison to the patient 1. But in the case of the constant impedance even while patient 1 is under the experiment the steady error in the Y and X direction is twice the heaviest patient (3) in the time-varying impedance. On the contrary, the constant coefficients that kept the primary amounts of impedance coefficients had the worst results in comparison to the time-varying impedance. The norm of error in task space for n sample in time is
This criterion is compared for the constant and time-varying impedance control and is the norm of error in the task space and for time-varying impedance with 10,547 samples is 0.0320 and for constant impedance with 45,372 samples is 0.0505. These data prove that the error of tracking in the time-varying impedance is less than the constant impedance and the ability to change during time helps the time-varying impedance to decrease the error and get the desired dynamic at the same time. Finally, the goal of isometric rehabilitation exercise is to have a constant force in the end effector of the exoskeleton robot to make the muscles of the patient stronger. This force is made by the impedance control and is shown in Figure 9.

The produced force by the exoskeleton robot for the patient in the isometric exercise.
Based on this figure, both constant and time-varying impedance controllers are able to produce a constant force for the end effector of the robot and time-varying impedance has less amount of force and this is because of less trajectory, velocity, and acceleration error in equation (27) that make the force for the end effector. This less force is not as important as imitating the desired time-varying dynamic and less tracking error. As the impedance coefficients are the same for all patients in the time-varying experiment, patient 3 that is the heaviest patient faces the most force that is 100 N in the stable condition and patient 2 endures the force 80 N in the stable condition. The happening is adapted to the need of the different patients that based on the volume of their muscles, they should have various forces. By knowing the best fit of dynamic that has the best performance for the rehabilitation, the exoskeleton robot can follow this dynamic behavior and get the desired dynamic even with the disturbances and uncertainties.
Conclusion and future research
This research is concerned with providing the best rehabilitation exercise for patients by using an exoskeleton robot for the knee and hip. The controller has two loops; in the outer loop, the fuzzy adaptive controller is used to achieve the current position of the robot in the task space to the xi which is known as the impedance state. The inner control loop is used to change the dynamic of the robot and patient to the desired dynamic, which is a time-varying dynamic, and uses the impedance coefficients to change the dynamical model. The Lyapunov method is used to show the stability of the system. All of the impedance coefficients are time-varying, which are important matters in comparison to the previous works. The limits of these coefficients are determined by the Lyapunov theory and the adaptive fuzzy controller could handle the system while there are disturbances in the system and there are uncertainties in all terms of robots and patients. The results depict that the time-varying impedance controller has a good performance to get the desired trajectory and can change the dynamic of the robot well while producing the force for the isometric exercise. This feature can be used in all exoskeleton robots to change the dynamic of the system to the best dynamic that can satisfy the best performance for the robot while having a stable and safe interaction with humans.
For future works, it is recommended to use neural networks and other functions to get the best dynamic of the rehabilitation. This matter can be done by using a professional rehabilitation expert and taking the data of the dynamic movements of this person. Then by utilizing detection methods like fuzzy and neural networks, these dynamics can be found and the time-varying coefficients with stable limitations that are as same as our work can be detected. The next step that can be done is using the CBFs (control barrier functions) to have safe interaction during the rehabilitation process that is less worked and known.
Footnotes
Appendix A
The two-links robot has a dynamic model that is
where
In these equations,
where
In this equation,
where
In the above equations, g is the acceleration of the center of the earth and is equal to 9.81 meters per square second. Also, the Jacobian matrix of the robot is as follows
where
Declaration of conflicting interests
The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.
Funding
The author(s) received no financial support for the research, authorship, and/or publication of this article.
Data availability statement
The results are obtained by computer simulations of dynamical systems and no dataset has been used.
