Abstract
This paper proposes a variable impedance control strategy based on the singular perturbation method to address the challenges of achieving accurate impedance characteristics and mitigating stability degradation in two-degree-of-freedom planar SEA-driven robots. By decomposing the system into fast and slow subsystems, we control them separately to improve tracking performance, disturbance rejection, and impedance control. A MATLAB/Simulink model was developed for simulation and compared with a traditional PD controller. The results show that the proposed controller outperforms the PD controller, maintaining position errors under 10% and impedance errors under 30% of those seen with the PD controller under external force input. Additionally, experimental validation confirmed the controller's ability to optimally adjust robot stiffness in response to changes in the user's limb-end stiffness, supporting the assist-as-needed strategy.
Keywords
Introduction
Patients with upper limb dysfunction often face barriers to adequate rehabilitation due to economic, resource, and time constraints. Leveraging neural plasticity, 1 rehabilitation robots aid in recovery by facilitating damage repair. Consequently, their integration into medical programs is increasingly seen as a practical and effective solution. Additionally, variable impedance control enhances rehabilitation by enabling adaptive force regulation, ensuring safer interactions, and improving therapeutic outcomes through individualized assistance tailored to patient needs.
In rehabilitation, common robot types include exoskeletons, exosuits, and end-effectors.2–4 Exoskeletons offer multi-degree-of-freedom training but may cause discomfort due to mismatched joint axes.5–7 Exosuits, based on human anatomy, may limit natural movement. 8 End-effector robots ensure accurate positioning and comfort but lack flexibility, compromising safety and comfort in human-robot interactions. 9 To overcome this, flexible elements like Series Elastic Actuators (SEA) and Variable Stiffness Actuators (VSA) have been introduced in end-effector robots, offering improved flexibility and user comfort. As a result, planar multi-degree-of-freedom SEA robots are now a leading design for rehabilitation. 10
Control strategies for flexible robots are more complex than for rigid robots, particularly in multi-degree-of-freedom motion control for upper limb rehabilitation. These strategies must accommodate various training modes, such as assisted, power-assisted, and resistance training.11,12 Current strategies include balance-based, challenge-based, adaptive, and tactile stimulation-based control. Electromyography (EMG)-based control is commonly used but challenging due to signal variability. 13 For force and position control, impedance-based strategies are preferred, 13 as they account for dynamic interactions and safety, making them more suitable for rehabilitation robotics. 14 Impedance-based control is widely used in human-robot interactions to regulate force and position, ensuring the safety of rehabilitation robots. 15 During therapy, the robot controls the patient's arm to follow a specific path, intervening when deviations occur. Ott et al. developed a passive control framework for flexible joint rehabilitation robots, incorporating internal torque feedback for impedance control, which was validated on DLR lightweight robots. 16 However, this method is limited by fixed impedance parameters. Li et al. proposed an iterative learning impedance controller for SEA-driven robots, supporting dynamic stability. 17 Sharifi et al. introduced a nonlinear adaptive bilateral impedance controller for tele-rehabilitation with multi-degree-of-freedom systems. 18 Brahmi et al. developed an adaptive impedance control method for exoskeletons using a nonlinear time-delay disturbance observer. 15 Current adaptive impedance control algorithms estimate real-time environmental dynamics and adjust robot impedance parameters accordingly.19,20
Adaptive adjustment of impedance parameters and external disturbances increase the prominence of joint flexibility. 21 SEA actuators, connected to flexible structures, complicate direct control, leading to challenges such as increased degrees of freedom, underactuation, vibration, and excessive contact forces from minor positional deviations. Consequently, adaptive impedance control must ensure system stability while modifying impedance parameters. Kronander et al. proposed constraints on variable impedance profiles for stability, 22 while Liang et al. applied state-independent stability conditions for time-varying profiles. 23 Gosselin et al. examined the stability of macro-mini robot systems in human-robot interactions. 24 Thus, further research is needed on the stability of variable impedance control. Giovacchini et al. designed an APO control system with hierarchical torque and adaptive assistance levels. Given the coupled nature of flexible joint-driven systems, singular perturbation theory is applicable. This paper proposes a singular perturbation method using a variable impedance controller for a SEA-driven flexible upper limb rehabilitation robot, simplifying the system's model and enhancing controller stability.
This paper focuses on three main areas: (1) establishing the kinematic and dynamic models of a planar 2-DOF flexible robot; (2) designing a variable impedance controller based on impedance control theory and the singular perturbation method, with MATLAB/Simulink used for model construction and stability analysis; and (3) validating the controller's performance through simulation experiments, comparing it with a traditional PD controller. This comparison highlights the variable impedance controller's superior adaptability, stiffness control, and effectiveness in multivariable systems. An experimental platform further demonstrated the robot's ability to adjust its end-point stiffness using the assist-as-needed strategy, confirming the controller's effectiveness. The study emphasizes the variable impedance control of the SEA-driven 2-DOF planar robot with the singular perturbation method.
Flexible two-degree of freedom robot system
Kinematics model
The training diagram of the upper limb rehabilitation robot, which is based on the two-degree-of-freedom SEA-driven flexible joint, can be simplified as depicted in Figure 1(a). The forward kinematics formula for the two-degree-of-freedom upper limb rehabilitation robot is derived by considering point O as the reference center and it can be expressed as follows:

Flexible two-degree of freedom robot. (a) Training diagram (b) Adams model.
The variables
The inverse kinematics formula can be derived from the direct kinematics as follows:
To validate the inverse kinematics equations, a Simulink-Adams co-simulation model was established (Figure 2). The Adams model inputs include joint positions and end-effector interaction forces, assuming zero forces in the Cartesian x and y directions while neglecting friction. The simulation involves trajectory planning based on the initial end-effector position in Adams (0, 0.3657 m). The trajectories in the x and y directions are defined as

Simulink-Adams kinematic co-simulation model.
The joint positions

Reference trajectory versus actual trajectory.
Dynamics model
We established the Lagrangian dynamic model of a 2-DOF SEA-driven upper limb rehabilitation robot,
To validate the dynamic equations, a Simulink model of a two-degree-of-freedom SEA-driven flexible upper limb rehabilitation robot was constructed (Figure 4). The model includes input loads, control inputs, the SEA dynamics, the actual trajectory, and clock signals, with a simulation time of 10 s. The simulation involved two steps: first, forward dynamics were used to compute joint angles from input joint torques; second, inverse dynamics calculated driving torques from the joint angles. Comparing the calculated driving torque with the initial input torque confirmed the correctness of the robot's forward and inverse dynamics.

Simulink model of robot dynamic.
In the robot's forward dynamics, joint driving torques and the previous state (angle and angular velocity) are used to compute acceleration at the next time step, followed by integration to obtain velocity and angle. Control inputs, defined as

Validation of robot dynamics. (a) Control input (b) Joint position (c) Control input (inverse dynamics).
In the inverse dynamics, the robot's motion state (acceleration, velocity, and angle) is used to calculate driving forces and torques. Position data from forward dynamics are substituted into the inverse model, producing input torques (Figure 5(c)). Comparison of Figures 6(a) and 6(c) confirms consistency in joint control input curves, validating the dynamic model.

Schematic block diagram.
Singular perturbation control
Design of variable impedance controller
Impedance error, the deviation between actual and desired impedance, affects the accuracy and reliability of robotic control systems. Impedance control requires real-time feedback on forces and positions to adjust parameters and ensure proper interaction. However, environmental complexity and uncertainty often cause discrepancies, leading to oscillations or overshoots in rehabilitation scenarios, which reduce control precision and system robustness. Sets the impedance error E:
Define the reference trajectory
Assuming that
Singular perturbation method
The core of singular perturbation method lies in adding a correction term to the rigid system in order to improve the inherent chattering phenomenon. 25
In the mathematical model of the flexible rehabilitation robot, it can be formulated into a fast time scale subsystem at the actuator and a quasi-steady state subsystem, that is, the fast-varying flexible part and the slow-varying rigid part are controlled by controllers respectively. 26
Assumptions K and
A slow subsystem control is available:
Stability analysis
To verify the stability of the variable impedance controller that was designed using the singular perturbation method, a Lyapunov function is designed. The convergence of the impedance error E is confirmed by applying the Lyapunov theorem. This process validates the robustness of the closed-loop system of the designed impedance controller.
We make the assumption that the dynamic equation of the series elastic actuator is set as (5), (6). Designing variable impedance controller inputs
Definition
Design the Lyapunov function as follows,
According to the formula (27), (28), It can be further obtained that,
According to Lyapunov's theorem, the convergence of
Optimal stiffness control strategy
In order to improve the effectiveness of rehabilitation robot-assisted rehabilitation therapy, the robot controller should encourage the active participation of the patient. At the same time, if the patient's movement deviates from the desired movement, it needs to be restrained. Therefore, the stiffness of the rehabilitation robot needs to be set in a reasonable range. To balance patient engagement and trajectory offset error, set the reward function:
Let
When the affected limb is highly impaired
Simulation experiment
Establishment of the simulation model
To demonstrate the effectiveness of the proposed algorithm, simulation experiments were conducted to verify the singular perturbation method based on stability analysis, as depicted in Figure 6. A Simulink simulation model based on SEA was constructed for this purpose. It primarily consists of the desired trajectory of the two joints, the reference trajectory, the impedance error, the control input for the two joints, the dynamic model of the SEA, and the clock signal.
Simulation results
Torque control simulation
In practical rehabilitation robot applications, human-robot interaction forces often vary. Thus, our goal is to evaluate the controller's ability to balance trajectory tracking performance and steady-state error in the presence of disturbance forces, as well as its adaptability to external load forces. To achieve this, output and error performance are tested under varying external interaction forces. In the MATLAB/Simulink simulation model, sinusoidal loads with frequencies of
Torque control simulation parameter setting.
To compare the variable impedance control system with the traditional PD controller, the latter is implemented in the original model. Performance is evaluated using key indicators to assess their differences. The robot's dynamic and kinematic parameters remain unchanged. The PD controller parameters were optimized using MATLAB self-tuning for optimal performance, and adjusted based on the robot's actual motion to achieve smoother, more stable behavior. For Joint 1, the PD parameters are Kp = 5.355 and Kd = 4.631, for Joint 2, Kp = 4.768 and Kd = 2.739. The simulation results are as follows:
Figures 8 and 9 show the motion of the two joints under sinusoidal external load forces with both controllers. In these figures, the dash-dotted line represents a 0.5 N load, the solid line represents 1 N, and the dashed line represents 2 N.
Figure 7 illustrates the joint trajectories with the variable impedance controller. The motion remains relatively stable as external load forces increase. Joint 1's trajectory stays near 0.95 rad, fluctuating by about 0.1 rad, with a maximum deviation of 0.14 rad. Similarly, joint 2's trajectory remains stable around 0.95 rad, with fluctuations increasing to a maximum of 0.16 rad.

Joint trajectory under the variable impedance controller. (a) Actual trajectory of joint 1 (b) Actual trajectory of joint 2.
Figure 8 shows the motion under the PD controller. While the trajectory remains largely unchanged with increasing external load, the PD controller exhibits larger deviations compared to the variable impedance controller. Joint 1's trajectory stabilizes at around 0.8 rad, with fluctuations increasing by approximately 0.1 rad, reaching a maximum of 0.18 rad. Joint 2's trajectory also stays around 0.8 rad, with fluctuations increasing by 0.1 rad as the load force rises.

Joint trajectory under the PD controller. (a) Actual trajectory of joint 1 (b) Actual trajectory of joint 2.
Figures 9 and 11 show the output torque of the two joints under both controllers. The dash-dotted line represents 0.5 N load, the solid line represents 1 N, and the dashed line represents 2 N load.

The output torque of joints under the variable impedance controller. (a) Output torque of joint 1 (b) Output torque of joint 2.
Figure 10 illustrates the variable impedance controller's effect. The output torque increases rapidly within the first 0.5 s, then stabilizes, with torque rising as external load forces increase. Joint 1 exhibits higher torque than joint 2, in line with the robot's actual structure. This confirms that the output torque responds to external load forces, validating the torque control and position-holding functions.

The output torque of joints under the PD controller. (a) Output torque of joint 1 (b) Output torque of joint 2.
Figure 10 shows the PD controller's effect. Similar to the variable impedance controller, the output torque changes significantly in the first second before stabilizing, with torque increasing as external load forces rise. However, the PD controller's torque changes more gradually in the first second, requiring more time to reach a stable state.
Figure 11 compares the mean position error of the robot's two joints with the PD and variable impedance controllers under different sinusoidal load inputs. The position retention ability of the two controllers shows a clear performance gap. With the PD controller, joint 1 errors exceed 0.15 rad, and joint 2 errors exceed 2 rad. In contrast, both joints’ errors remain below 0.005 rad with the variable impedance controller.

The average position error. (a) Average position error of joint 1 (b) Average position error of joint 2.
These results demonstrate that the variable impedance controller, based on the singular perturbation method, offers superior torque control performance.
Variable impedance control simulation
In rehabilitation, robots must interact safely, comfortably, and effectively with patients. The robot's impedance parameters are critical for adapting interactions to different patients, rehabilitation stages, and treatment needs. Thus, evaluating the control system's ability to handle changes in impedance parameters is essential. To achieve this, set simulation parameters as follows Table 2:
Variable impedance control simulation parameter setting.
By applying a sinusoidal load to the robot and adjusting impedance parameters accordingly, we simulate the dynamic interaction between the patient and robot during rehabilitation. This verifies the effectiveness of the variable impedance controller in adapting its control strategy to changing impedance parameters. The simulation results are as follows:
In Figure 12(a), the actual trajectories closely align with the expected trajectories for both joints using the variable impedance controller. In contrast, Figure 13(a) shows noticeable deviations between the expected and actual trajectories with the PD controller.

Joint trajectory and trajectory tracking error under the variable impedance controller. (a) Reference and actual trajectory (b) Reference trajectory tracking error.

Joint trajectory and trajectory tracking error under the PD controller. (a) Reference and actual trajectory (b) Reference trajectory tracking error.
Figure 12(b) illustrates the reference trajectory tracking error
Figure 13 shows the impedance error E for both joints under two controllers, with the dash-dotted line representing joint 1 and the solid line representing joint 2.
Figure 14(a) illustrates the impedance error variation under the variable impedance controller, where both joints’ errors converge within 0.5 s. The impedance error of joint 1 stabilizes within 0.3 Nm, and joint 2's error stays within 0.5 Nm. This confirms that the variable impedance controller effectively drives the error toward zero.

Variation of impedance error E under different controllers. (a) Variable impedance controller (b) PD controller.
In contrast, Figure 14(b) shows the impedance error under the PD controller, where the errors remain unstable. Joint 1's impedance error fluctuates between −3 Nm and 6 Nm, while joint 2's error oscillates between −1 Nm and 2.7 Nm, without converging to a stable value. Thus, the singular perturbation-based impedance control ensures convergence to the desired impedance dynamics, while the PD controller fails to achieve this stability.
Figure 15 compares the mean impedance errors for the PD and variable impedance controllers. The dark cylinder represents joint errors under the variable impedance controller, while the light cylinder represents errors under the PD controller. The mean error for the PD controller is significantly higher, with joint 1 exceeding 1.8 rad and joint 2 above 1 rad. In contrast, the variable impedance controller keeps the errors below 0.3 rad for joint 1 and 0.2 rad for joint 2. Additionally, the impedance error of joint 1 is consistently higher, likely due to control error accumulation, as it is the terminal joint, influenced by joint 2's motion.

Average impedance error of the two controllers.
To assess the impact of impedance control on assist-as-needed strategies, demand-driven simulations were conducted in MATLAB/Simulink with consistent parameters. The experiments varied stiffness values (Kd = 0, 1, 10, 50, 100, 1000) over a 10-s simulation, with inertia Md = 1 and damping Bd = 50.
Figure 16 shows position tracking errors, illustrating that higher stiffness (Kd) results in faster error convergence. When Kd = 0, convergence is minimal, demonstrating that higher stiffness improves position tracking performance.

Joint impedance error.
Based on the above experimental results, it can be demonstrated that the variable impedance controller using the singular perturbation method outperforms the traditional PD controller in controlling impedance dynamics.
Variable stiffness experiment
Experimental platform
To validate the proposed theory, a two-degree-of-freedom desktop rehabilitation robot based on SEA joints was constructed (Figure 17). This robot features two serially connected joints with a serial elastic actuator (SEA) linking them. Carbon fiber tubes connect the SEA joints and the end effector grip to the second SEA joint. A six-dimensional force sensor on the end effector base measures forces and torques in three Cartesian directions. A coordinate system is established at the center of the first SEA joint, focusing on the x and y directions for this desktop rehabilitation setup.

Experimental platform.
Experimental protocol
The adaptive impedance control experiment based on the assist-as-needed strategy is designed as follows: The task involves moving the patient's arm end effector from point A (0.5 m, 0) to point C (0.2 m, 0) within 10 s. A fifth-degree polynomial is used for x-direction trajectory planning, as shown in Figure 18(a). The position, velocity, and acceleration of the end effector are presented, with zero velocity and acceleration at both start and end points. This approach minimizes motor impact during startup and shutdown while ensuring a smooth trajectory for stable rehabilitation and better limb recovery. The desired joint trajectories, derived from inverse kinematics, are shown in Figure 18(b), with q1 and q2 as position control signals for the joint servos.

Assist-as-needed strategy trajectory planning. (a) Trajectory planning (x) (b) Desired trajectories.
Experimental result
The experimental parameters were set to prioritize the human upper limb's work in the rehabilitation strategy. The optimal stiffness limits were defined as Kmax = 400 N/m and Kmin = 10 N/m, ensuring safety by protecting the affected limb. The results include the end effector trajectory, human-robot interaction forces, identified damping, upper limb stiffness, and the robot's optimal stiffness under the assist-as-needed strategy.
As illustrated in Figure 19, during the rehabilitation training process, an increase in the damping and stiffness exhibited by the patient's upper limb corresponds to a decrease in the robot's optimal stiffness. This indicates a lower level of assistance provided by the robot, which aligns with the principles of assist-as-needed in rehabilitation training. Thus, this observation validates the effectiveness of the assist-as-needed strategy.

Assist-as-needed strategy experiment results.
Conclusions
This paper presents a variable impedance controller for flexible joints based on the singular perturbation method. The controller is designed using Tikhonov's theorem to ensure the convergence of impedance error, and its stability is validated with the Lyapunov theorem. Simulation results demonstrate excellent response performance and position tracking. Compared to the PD controller, the proposed controller shows superior torque control under external loads and better variable impedance modulation. Future work will explore its application in multi-degree-of-freedom robotic arms and more complex human-robot interactions.
However, there are several limitations: (1) the robot model does not fully capture the interaction between the rehabilitation robot and the environment, leading to impedance discrepancies; (2) the singular perturbation method performs well at higher stiffness but needs further development for lower stiffness scenarios; (3) experiment parameters were designed to validate the control algorithm, not reflect actual patient movement during rehabilitation; (4) the validation on the physical platform is limited, requiring more extensive testing to assess stability and effectiveness.
Footnotes
Declaration of conflicting interests
The authors declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.
Funding
The author(s) disclosed receipt of the following financial support for the research, authorship, and/or publication of this article: This work was supported by the National K&D Program of China (2022YFC3601400); Shanghai 2022 “Science and Technology Innovation Action Plan” biomedical science and technology support project (22S31901400).
Data Availability Statement
Example text of a Data statement, as provided by the author.
