Your new experience awaits. Try the new design now and help us make it even better

ORIGINAL RESEARCH article

Front. Neurorobot., 21 January 2026

Volume 19 - 2025 | https://doi.org/10.3389/fnbot.2025.1681298

This article is part of the Research TopicNeuromorphic Engineering and Brain-Inspired Control for Autonomous Robotics: Bridging Neuroscience and AI for Real-World ApplicationsView all 4 articles

Innovative approach of nonlinear controllers design for prosthetic knee performance


Atif RehmanAtif Rehman1Rimsha GhiasRimsha Ghias2Hammad Iqbal Sherazi
Hammad Iqbal Sherazi3*Nadia SultanNadia Sultan4
  • 1School of Interdisciplinary Engineering and Sciences, National University of Sciences and Technology, Islamabad, Pakistan
  • 2School of Electrical Engineering and Computer Science, National University of Sciences and Technology, Islamabad, Pakistan
  • 3Department of Electrical Engineering, College of Engineering, Qassim University, Buraydah, Saudi Arabia
  • 4Department of Electrical Engineering, Center of Excellence in AI, Bahria School of Engineering & Applied Sciences, Islamabad, Pakistan

Prosthetic knee joints are essential assistive technologies designed to replicate natural gait and improve mobility for individuals with lower-limb loss. This study presents a comprehensive nonlinear dynamic model of a two-degree-of-freedom prosthetic knee joint and introduces three robust nonlinear control strategies: Integral Sliding Mode Control, Conditional Super-Twisting Sliding Mode Control, and Conditional Adaptive Positive Semidefinite Barrier Function-based Sliding Mode Control. These controllers are designed to address the challenges associated with nonlinear joint dynamics, external disturbances, and modeling uncertainties during locomotion. To optimize control performance, the gain parameters of each controller were fine-tuned using Red Fox Optimization, a metaheuristic algorithm inspired by the intelligent hunting behavior of red foxes. Stability analysis is conducted using Lyapunov theory, and control effectiveness is evaluated through simulations in MATLAB/Simulink and validated via hardware-in-the-loop testing using a C2000 Delfino F28379D microcontroller. Among the three controllers, the CoBA-based approach demonstrated the highest tracking accuracy, fastest convergence, and smoothest torque profile. The close agreement between simulation and experimental results confirms the practical applicability of the proposed control framework, offering a promising solution for intelligent and adaptive prosthetic knee systems.

1 Introduction

Human mobility is an innate and essential aspect of life. Prosthetic knee technology has emerged as a transformative solution for individuals who have lost knee function due to various factors such as trauma, medical conditions, or congenital issues (Crawford, 2014). These advanced prosthetic knees are designed to restore mobility and independence, allowing individuals to re-engage in daily activities and lead more active lives (Noonan, 2010).

In recent decades, many people have faced lower limb challenges due to a range of factors, including injuries from conflict, debilitating illnesses, traffic accidents, and natural disasters (Zhang et al., 2019). However, contemporary advancements in medical science and technology have introduced motorized lower limb prosthetics as a solution for amputees, even though full limb regeneration remains beyond the capabilities of current medical technology (Safari, 2020).

The pervasive issue of limb loss has gained prominence in recent years, with alarming statistics underscoring its significance. In the United States, approximately 185,000 amputations occur annually, averaging 300–500 procedures each day, and the current population of 2.1 million amputees is expected to double by 2050, reaching 3.6 million (Assal and Gordon, 2007). This surge in limb loss can be attributed to three primary causes. Vascular diseases, including diabetes, peripheral arterial disease, and blood clots, account for 54% of amputations due to inadequate blood flow, causing pain, tissue damage, and non-healing wounds. Trauma, responsible for about 45% of limb loss cases, results from accidents or injuries, encompassing motor vehicle collisions, workplace incidents, sports injuries, and military wounds. Cancer, affecting less than 2% of amputees, may require limb removal when bone or cartilage tumors prove unresponsive to treatment (Assal and Gordon, 2023).

Losing a limb can really affect how someone lives day-to-day. It can make it harder to do things on their own, and it often makes them feel down, stressed, and not so good about themselves. They might rely more on others, feel left out of social stuff, and not feel great about how they see their body (Yazdani et al., 2018). Various types of amputations, including those involving the arm, foot, hand, above-knee, and below-knee, present unique challenges, with below-knee amputation being the most prevalent (Guest et al., 2019). Traditional mobility aids like wheelchairs, crutches, canes, and walkers are available but come with limitations such as stability issues, difficulty on uneven terrains and stairs, reduced walking speed, and the demand for significant physical effort. While technology cannot fully replace a lost limb, advancements in the field of medical science offer a glimmer of hope through motorized limb prosthetics, capable of alleviating many of these challenges. Prosthetic legs are categorized as active, passive, or semi-active. Active prosthetics, driven by electric actuators or motors, closely mimic natural leg movement with minimal exertion required from the user (Nichols, 2023). Passive prosthetics lack active movement but provide essential body support. Semi-active prosthetics strike a balance between the two. The ultimate goal is to design precise robotic prosthetics to reduce the 60% higher energy expenditure required for walking in amputees compared to their able-bodied counterparts (Tran et al., 2022). This endeavor must tackle various complexities, including nonlinearity, system uncertainty, perturbations, and balance issues, by implementing strategies such as reducing prosthetic weight through the use of lightweight materials, adopting reliable control laws, and favoring nonlinear control techniques for their stability and enhanced performance, particularly in the presence of uncertainties and cost-effective components (Liu et al., 2020).

The human knee, with its intricate and multifaceted range of movements, is indispensable for everyday activities and quality of life. However, for individuals facing the loss of their natural knee joint due to injuries, health conditions, or congenital factors, the prospect of regaining mobility and independence is paramount (Liu et al., 2020). In response to this need, 2-DOF prosthetic knees have emerged as a remarkable solution, engineered to mimic the complex biomechanics of the natural knee. These advanced prosthetic knees not only restore a sense of normalcy but also expand the horizons of mobility, allowing users to engage in various activities with enhanced flexibility and confidence (McGale, 2020). This introduction takes you into the realm of 2-DOF prosthetic knees, shedding light on their capabilities, technological intricacies, and their transformative impact on the lives of those who depend on them.

Biomedical engineering has played a vital role in advancing mathematical frameworks to study epidemic diseases, with Lyapunov functions being key tools for subsystem stabilization and overall system stability assurance. Within prosthetic limb control, a variety of control techniques have been proposed. Azimi et al. (2017) developed robust controllers based on artificial walking models post-transfemoral amputation, known as the Robust Passive controller and Robust glide mode (Naifar, 2026; Alaia et al., 2025). Scandaroli utilized Proportional-Integral-Derivative (PID) and Model Reference Adaptive Control (MRAC) schemes for prosthetic design, highlighting difficulties inherent to nonlinear system management (Scandaroli et al., 2008). The work of Mefoued and Belkhiat introduced a Sliding Mode Observer approach for exoskeletons, demonstrating superior performance compared to traditional PID control (Mefoued and Belkhiat, 2019). Wen applied Adaptive Dynamic Programming methods to fine-tune prosthetic control parameters automatically for mimicking natural knee motions (Wen, 2019; Naifar and Ben Makhlouf, 2021). Research by Martinez-Villalpando and Herr investigated series elastic actuators in knee prostheses, while Ajayi implemented bounded control and observer-based controllers for accurate joint torque estimation (Martinez-Villalpando and Herr, 2009), Dhahri and Naifar (2023). Banala designed force field-based controllers to assist in leg rehabilitation, and Costa demonstrated PID control for pneumatic muscle actuation. Sherwani proposed the Adaptive Robust Integral of Sign Error controller for exoskeletons, whereas Chen applied an Adaptive Robust Control algorithm with backstepping techniques targeting uni-directional knee joint exoskeletons (Wen, 2019). Despite such progress, delivering precise and reliable prosthetic control remains challenging due to uncertainties, nonlinearities, and the complexities of human motion. Literature recommends employing backstepping control frameworks grounded in Lyapunov stability theory for two-degree-of-freedom (2-DoF) prosthetic systems such as thigh-leg mechanisms, where parameter selection critically affects dynamic performance and stability (Salman and Kadhim, 2022). Furthermore, investigations into prosthetic knee dynamics have utilized nonlinear control strategies like Sliding Mode Control (SMC) and Improved SMC (I-SMC) to enhance treatment accuracy and path tracking capabilities, mitigating disturbances and uncertainty while preserving system stability (Nazeer et al., 2022).

Recent studies have explored the development and optimization of prosthetic knee joints to enhance functionality and improve the quality of life for users. Bosman et al. (2025) conducted a clinical trial comparing microprocessor-controlled and non-microprocessor-controlled prosthetic knees, evaluating their performance across all classified domains of the International Classification of Functioning, Disability, and Health (ICF) model. This study demonstrated the advantages of microprocessor-controlled prostheses in improving the user's mobility and daily activities. Additionally, Morgan et al. (2025) investigated the effects of microprocessor prosthetic knee use in early rehabilitation through a pilot randomized controlled trial, highlighting the positive impact on recovery and rehabilitation outcomes. In the field of control strategies for prosthetic knee joints, Rehman et al. (2025b) proposed advanced optimized nonlinear control strategies for prosthetic knee joints, demonstrating improvements in stability and adaptability, which are crucial for achieving better functional outcomes. These studies contribute to a growing body of research focused on improving prosthetic knee performance through both hardware innovations and advanced control techniques.

This research focuses on combining several nonlinear control methods namely I-SMC, CoST-SMC, and CoBA-SMC into a comprehensive mathematical framework aimed at enhancing prosthetic knee joint performance. The primary objective is to analyze the biomechanics and control strategies of a two-degree-of-freedom lower limb prosthetic system. This approach targets overcoming difficulties caused by system uncertainties, strong nonlinear behaviors, balance complications, and external disturbances encountered during movement. The robustness and stability of the proposed controllers have been thoroughly validated using Lyapunov stability theory. Furthermore, practical validation has been performed through hardware-in-the-loop simulations alongside MATLAB/Simulink experimentation to ensure effectiveness.

The organization of this paper is as follows: Section II introduces the nonlinear mathematical models used for control purposes. In Section III, the design methodology of the controllers is detailed. Section IV presents simulation results along with a comparative analysis of the proposed control strategies. Finally, Section V concludes the study by highlighting key findings and discussing their implications.

2 Mathematical modeling

In recent years, the field of prosthetic design and development has seen remarkable progress, particularly in the design of prosthetic knee joints. These crucial devices have transformed the lives of countless individuals with lower limb amputations, enabling them to regain mobility and improve their overall quality of life. Mathematical modeling plays a pivotal role in enhancing the functionality, stability, and efficiency of prosthetic knee joints. By employing mathematical techniques and principles, engineers and researchers can better understand the complex biomechanical interactions involved in knee joint movement, leading to the creation of more natural and responsive prosthetic solutions.

In the motion of a prosthetic knee as a serial manipulator with rigid links, one can employ the Lagrangian method after establishing a Cartesian coordinate system with defined axis orientation.

X1=r1sin(θ1)Y1=-r1cos(θ1)X2=L1sin(θ1)+r2sin(θ2)Y2=-L1cos(θ1)-r2cos(θ2)    (1)

When we calculate the derivative with respect to time of Equation 1, we derive the individual components of velocity.

X.1=r1θ.1sin(θ1)Y.1=-r1θ.1cos(θ1)X2=L1θ.1sin(θ1)+r2θ.2sin(θ2)Y2=-L1θ.1cos(θ1)-r2θ.2cos(θ2)    (2)

In this analysis, we're using Lagrangian's equation to figure out how the system moves. This equation, which we're using as the basis for this work, helps us find the system's equation of motion.

Lagrangian(L)=kinetic energy (K.E)-potential energy (P.E)    (3)

K. E and P. E is the of system can be expressed by the following formula:

K.E=12mv2    (4)
P.E=-mgh    (5)

The K.E equation is obtained by aggregating the K.E of each individual link. In this context, I1 and I2 denote the moments of inertia for link 1 and link 2, respectively, defined as Ii=112MLi2 where i = 1, 2. The comprehensive expression for the total kinetic energy is presented as follows:

KE=12m1[X.12+Y.12]+12I1θ.12+12m2[X.22+Y.22]+12I2θ.22    (6)

By substituting the from Equation 2 into the expression for total energy in Equation 6, we obtain the total kinetic energy.

K.E=12m1[(r1θ˙1sin(θ1))2+(r1θ˙1cos(θ1))2]+12         [112ML2]θ˙12+12m2[(L1θ˙1sin(θ1)+r2θ˙2sin(θ2)))2         +(L1θ˙1cos(θ1)r2θ˙2cos(θ2))2+12[112ML2]θ˙22.    (7)

Now, we can define the P.E of the two-link system as follows

P.E=-m1gy1-m2gy2    (8)

By using the values of y1 and y2 from Equation 1, into the Equation 8 we give

P.E=-m1g(r1sin(θ1))-m2g(-L1cos(θ1)-r2cos(θ2))    (9)

Now we substitute the Equation 7 and Equation 9 into the Equation 3, we obtain

L=12m1[(r1θ˙1sin(θ1))2+(r1θ˙1cos(θ1))2]         +12[112ML2]θ˙12         +12m2[(L1θ˙1sin(θ1)+r2θ˙2sin(θ2))2                +(L1θ˙1cos(θ1)r2θ˙2cos(θ2))2]          +12[112ML2]θ˙22          m1g(r1sin(θ1))m2g(L1cos(θ1)r2cos(θ2))    (10)

The equations of motion for the manipulator are obtained by considering the torque τ applied to each joint in the system, where i = 1, 2. These equations are derived based on the Lagrangian formulation presented in Equation 3 as follows:

τi=ddt(dLdθ.i)-dLdθi    (11)

Now, taking the derivative with respect to θi, θ.i, and time in Equation 11, we obtain

τ1=(m1r12+I1+m2L12+m2L1r2cos(θ1θ2))θ¨1(m2L1r2           sin(θ1θ2))θ˙12+(m2r22+I2+m2L1r2cos(θ1θ2))θ¨2+           (m2L1r2sin(θ1θ2))θ˙22m1g(r1sin(θ1))m2g(L1sin(θ1))           m1g(r1sin(θ2))    (12)
τ2=(m2r22+I2)θ¨2(m2L1r2sin(θ1θ2))θ˙12+(m2L1r2          cos(θ1θ2))θ¨1m2g(r2sin(θ2))F1(L1sin(θ1))          F2(L2sin(θ2)).    (13)

We consider the absence of frictional forces, the system's dynamics model can be succinctly expressed in the following general form

M(θ)θ¨+C(θ,θ.)θ.+G(θ)=τ    (14)

In simpler terms, the angular position vector θ is used for measurement. M(θ) represents the inertia matrix of the links, τ stands for the control torque, and C(θ,θ.)θ. encompasses the Coriolis and centripetal torques. Moreover, G(θ) captures the gravitational torque within the system. Now, we represent the state-space variables as follows:

x1=θ1      x2=θ.1    (15)
x3=θ2      x4=θ.2    (16)

Taking the time derivative form Equation 15 and Equation 16

x˙1=θ˙1      x¨2=θ¨1    (17)
x˙3=θ.2      x¨4=θ¨2    (18)

Now we using Equation 17 and Equation 18 into the Equation 14, we get

x˙1=x2    (19)
x˙2=1M11[τ1-M12x˙4-C1x2-G1]    (20)
x˙3=x4    (21)
x˙4=1M22[τ2-M21x˙2-C2x4-G2]    (22)

In this scenario, τ1 stands for the force on the hip joint, and τ2 represents the force on the knee joint basically, these are the controls we're using. The values M12 and M22 come from how the links resist movement. In these equations, C1 and C2 deal with forces that appear when things move, while G1 and G2 handle the force caused by gravity. The main goal here is to control how the prosthetic knee moves and where it ends up. We use the inertia of the links, gravitational forces, and movement-related forces in Equations 12 and 13 to figure out how τ1 and τ2 impact the system.

M11=I1+m1r12+m2L12-m2L1r2cos(x1-x3)    (23)
M12=I2+m2r22+m2L1r2cos(x1-x3)    (24)
M21=m2L1r2cos(x1-x3)    (25)
M22=I2+m2r22    (26)
G1=-m1Gr1sin(x1)-m2GL1sin(x1)    -m2Gr2sin(x3)    (27)
G2=m2Gr2sin(x3)    (28)
C1=m2L1r2sin(x1-x3)x22    (29)
C2=m2L1r2sin(x1-x3)x42    (30)

3 Controller design

In this section, we delve into the implementation and assessment of three robust nonlinear controllers I-SMC, CoST-SMC, and CoBA-SMC applied to the prosthetic knee model. I-SMC operates on precise sliding mode control principles, while CoST-SMC incorporates super-twisting algorithms, and CoBA-SMC utilizes adaptive positive semidefinite barrier functions. Each controller's methodologies are meticulously integrated to manage uncertainties, nonlinearities, and external perturbations within the knee's dynamics. We rigorously evaluate their individual performances in stabilizing and optimizing the prosthetic knee's motion dynamics, aiming to discern their effectiveness in ensuring robust and precise control over the system.

3.1 Integral sliding mode control

I-SMC is a control strategy that integrates sliding mode control principles with integral action (Rehman et al., 2024; Ghias et al., 2024; Rehman et al., 2025a) . It effectively minimizes both steady-state and errors in dynamic systems by continuously adjusting the control inputs. This approach is particularly valuable for enhancing system robustness and stability, making it widely applicable in various control scenarios. The error terms are defined as

e1=x2-x2ref,    (31)
e2=x4-x4ref.    (32)

Differentiating Equations 31 and 32 with respect to time yields the following

e.1=x˙2-x˙2ref,    (33)
e.2=x˙4-x˙4ref.    (34)

The integration of error terms is elucidated as follows

e3=0te1dt,    (35)
e4=0te2dt.    (36)

By taking the derivative of Equations 35 and 36 we get

e.3=e1,    (37)
e.4=e2.    (38)

The sliding surfaces of the I-SMC are defined as

s1=c1e1+c3e3,    (39)
 s2=c2e2+c4e4.    (40)

By computing the time derivative of Equations 39 and 40, we obtain the following

s.1=c1e.1+c3e.3,    (41)
s.2=c2e.2+c4e.4.    (42)

Substituting the values of ė3 and ė4 from Equations 37 and 38, we obtain:

s.1=c1e.1+c3e1,    (43)
s.2=c2e.2+c4e2.    (44)

To ensure the asymptotic convergence of sliding surfaces, the expressions for ṡ1 and ṡ2 are defined as −k1|s1|sgn(s1) and −k2|s2|sgn(s2), respectively. Substituting these values into Equations 43 and 44, obtain

-k1|s1|sgn(s1)=c1(x˙2-x˙2ref)+c3e1.    (45)

By rearranging the Equation 45, following results are obtained

x˙2=-k1c1|s1|sgn(s1)-c3c1e1+x˙2ref.    (46)

‘Substituting the value of x2. from Equation 20 in Equation 46, the following expression is obtained

1M11[τ1-M12x˙4-c1x2-G1]=-k1c1|s1|sgn(s1)-c3c1e1+x˙2ref.    (47)

Reordering Equation 47 yields the expression for the control input as follows

τ1=M11c1[-k1|s1|sgn(s1)-c3e1+c1x˙2ref]+M12x˙4+c1x2+G1.    (48)

Upon substituting the value of s2. into Equation 44, following expression is obtained

-k2|s2|sgn(s2)=c2(x˙4-x˙4ref)+c4e2.    (49)

Upon rearranging Equation 49, we get following results

x˙4=-k2c2|s2|sgn(s2)-c4c2e2+x˙4ref.    (50)

Substituting the value of x4. from Equation 22 in Equation 50, yields the following expression

1M22[τ2-M21x˙2-C2x4-G2]=-k2c2|s2|sgn(s2)-c4c2e2             -x˙4ref.    (51)

Rearranging Equation 51 results in the expression for the control input as follows

τ2=M22c2[-k2|s2|sgn(s2)-c4e2+c2x˙4ref]+M21x˙2+c2x4+G2.    (52)

To analyze the stability of the proposed controller, the Lyapunov candidate is chosen as

V=12s12+12s22.    (53)

Taking the time derivative of Equation 53

V.=s1s.1+s2s.2    (54)

using the values from Equations 43 and 44 and x2., the result is

V.=s1[c1(1M11(τ1-M12x˙4-c1x2-G1)-x˙2ref)+c3e1]+  s2[c2(1M22(τ2-M21x˙2-c2x4-G2)left.-x˙4ref)+c4e2].    (55)

Using the proposed values of τ1 and τ2 from Equation 48 and 52 leads to the following expressions

V.=-k1s1|s1|sgn(s1)-k2s2|s2|sgn(s2),V.=-k1|s1|2-k2|s2|20.    (56)

The negative definiteness of V. for the control inputs of the integral sliding mode controller demonstrates the asymptotic stability of I-SMC.

3.2 Conditioned based Super twisting Sliding Mode Control

A CoST-SMC denotes an advanced control system that integrates sliding mode control principles with the super twisting algorithm (Ahmed et al., 2021). This methodology optimizes control performance by incorporating a higher-order sliding manifold while exhibiting adaptability to specific conditions, thereby enhancing robustness across diverse operational environments By utilizing Equations 31 and 32 for error terms and incorporating them into the sliding surfaces, which are defined as

s1=c1e1,    (57)
s2=c2e2.    (58)

c1 and c2 represent the positive gains associated with the sliding surfaces. Expressing the time derivatives of s1 and s2 results in

s.1=c1e.1,    (59)
s.2=c2e.2.    (60)

By setting s1. and s2. equal to zero, and substituting e1. and e2. from Equations 33 and 34 into Equations 60 and 61, the following results are obtained

0=c1(x˙2-x˙2ref),    (61)
0=c2(x˙4-x˙4ref).    (62)

By substituting the expressions for x2. and x4. obtained from Equations 20 and 22, the resulting values are as follows

0=c1(1M11(τ1-M12x˙4-c1x2-G1)-x˙2ref),    (63)
0=c2(1M22(τ2-M21x˙2-c2x4-G2)-x˙4ref).    (64)

By rearranging the Equations 64 and 65 following results are obtained

τ1eq=M12x˙4+c1x2+G1+x˙2ref,    (65)
τ2eq=M21x˙2+c2x4+G2+x˙4ref.    (66)

The stability analysis of the system has been conducted utilizing the following Lyapunov candidate function defined in Equation 53. Substituting the values of x2. and x4. from Equations 20 and 21, the results are

V.=s1[c1(1M11(τ1-M12x˙4-c1x2-G1)-x˙2ref)]  +s2[c2(1M22(τ2-M21x˙2-c2x4-G2)-x˙4ref)].    (67)

To ensure stability, the Lyapunov function V. must have a derivative that is negative definite. In order to achieve V.0, let us impose the following constraint defined in Equations 69, 70 in Equations 60 and 61

τ1sw=-k1|s1|sgn(s1)-v1    (68)
τ2sw=-k2|s2|sgn(s2)-v2    (69)

The switching function plays a crucial role in maintaining reachability and preserving state trajectories on a specified surface. Key components in this context include the positive design parameters k1 and k2. Additionally, the determination of terms v1 and v2 involves the integration of the provided Equations 71 and 72

v1.=m1sgn(v1-τ1sat)    (70)
v2.=m2sgn(v2-τ2sat)    (71)

The range of the saturation function, denoted by the variable τisat, is limited to the values within the range of ±Q, where Q is a positive value obtained from the design parameters mi. The mathematical expression for τisat is as follows

τisat={τiif |τi|QQsgn(τi)if |τi|>Q    (72)

By substituting the constraints from Equations 6873 into the Equation 54, following are obtained

V.=s1(-k1|s1|sgn(s1)-v1)+s2(-k2|s2|sgn(s2)-v2)    (73)

The Equation 74 suggests that the proposed controller accomplishes system stabilization by producing a negative definite V.. Upon combining Equations 66, 67, 69, and 70, the results are

τ1=τ1eq+τ1swτ1=M12x˙4+c1x2+G1+x˙2ref-k1|s1|sgn(s1)-v1τ2=τ2eq+τ2swτ2=M21x˙2+c2x4+G2+x˙4ref-k2|s2|sgn(s2)-v2    (74)

The Equations 7577 denote the control law based on CSTA. This control law is derived employing Lyapunov theory, ensuring that the time derivative of V is negative definite, thereby guaranteeing the asymptotic stability of the system.

3.3 Conditional adaptive positive semi-definite barrier function-based STSMC

CoBA-SMC presents distinct advantages in the realm of control systems (Ahmed et al., 2023). Firstly, it ensures robustness against uncertainties and disturbances by leveraging SMC techniques. Secondly, the controller's adaptive nature equips it to adeptly manage varying system dynamics and parameters, enhancing its overall versatility. Moreover, the incorporation of barrier functions guarantees safety and stability by preventing controlled variables from surpassing predefined bounds, making it particularly suitable for applications with stringent safety constraints. CoBA-SMC offers several noteworthy advantages:

• The proposed strategy assures the convergence of the output variable to a specific neighborhood within a finite time frame.

• The gains provided by the proposed strategy are precisely controlled, preventing excessive convergence and allowing the output variable to converge within a predefined neighborhood around zero.

Barrier function: The barrier function may be defined as an even continuous function for any ϵ>0, and Pb:x∈[−ϵ, ϵ] → P(x)∈[b, ∞] is strictly increasing on 0, ϵ such that

lim|x|ϵPb(x)=

Pb(x) has a unique minimum at zero, and Pb(0) = b≥0.

3.4 Adaptive Positive Semi-Definite Barrier Function

Let's consider the function kbp(x)=|x|ε-|x|, i.e., kbp(0) = 0, and the adaptive control gain k(t, si(t)) where i = 1, 2.

ki(t,si(t))={ka(t)=k¯si(t)dtif 0<tt¯ksi(t)if tt¯    (75)

The control strategy incorporates an arbitrary positive constant, k¯. For each initial condition si(0) and a chosen positive value of ε, there exists a time tt¯ where the inequality |si(t)|ε2 guarantees that |si(t)| < ε holds for all t. The proposed adaptive strategy involves kbp(x) approaching zero and si(t) converging to zero. Consequently, if the error terms δ(t) and si(t) gradually approach zero over time, the adaptive gain kbp(si(t)) will also gradually approach zero. At time t¯, the controller output may exhibit a single discontinuity when the adaptive gain is set to PSBF. It is crucial to note that the controller output becomes continuous at time t. Utilizing the barrier function in the proposed model results in the final control inputs

τ1=M12x˙4+c1x2+G1+x˙2ref-k1(t,s1(t))|s1|sgn(s1)-v1    (76)
τ2=M21x˙2+c2x4+G2+x˙4ref-k2(t,s2(t))|s2|sgn(s2)-v2    (77)

The terms k1(t, s1(t)) and k2(t, s2(t)), represent the adaptive control gains associated with the barrier function.

3.5 Red fox optimization for controller gain tuning

Red Fox Optimization (RFO) is a nature-inspired metaheuristic algorithm modeled on the adaptive hunting strategies of red foxes. In this study, RFO was employed to fine-tune the gain parameters of the proposed nonlinear controllers (I-SMC, CoST-SMC, and CoBA-SMC) due to its superior exploration-exploitation balance and ability to avoid local minima.

Unlike traditional algorithms that often suffer from premature convergence, RFO dynamically adjusts its search patterns based on environmental feedback, making it well-suited for high-dimensional and nonlinear optimization problems such as controller parameter tuning in prosthetic knee systems. Each candidate solution, or “fox,” represents a unique set of gain values, and its fitness is evaluated using a cost function based on trajectory tracking accuracy and control smoothness.

By applying RFO, the controllers achieved faster convergence, improved tracking performance, and reduced steady-state error compared to manual tuning or basic heuristics. The convergence behavior of the red fox agents across the gain space is illustrated in Figure 1, highlighting the algorithms effectiveness in guiding the solutions toward the global optimum.

Figure 1
3D surface plot illustrating the parameter space of \(k_1\) and \(c_1\) against the cost function value, ranging from 8.00 to 8.14 times 10 to the power of negative 3. Color gradient from yellow to blue represents varying cost function values.

Figure 1. 3D cost surface demonstrating convergence of red fox optimization agents during controller gain tuning.

As shown in Table 1, the Proposed RFO (CoBA-SMC) optimization algorithm outperforms the other algorithms in all key performance metrics. It achieves the lowest position tracking error with a 14.5% reduction, the fastest velocity convergence with a 15.3% improvement, and the shortest settling time at 3.20 S, representing a 21.5% reduction. Additionally, the Proposed RFO (CoBA-SMC) exhibits the smoothest torque profile with minimal chattering, ensuring higher energy efficiency and system longevity. Overall, the Proposed RFO (CoBA-SMC) provides a comprehensive solution for controller gain optimization, offering superior precision, speed, stability, and energy efficiency in prosthetic knee control systems.

Table 1
www.frontiersin.org

Table 1. Performance comparison of controller gain optimization algorithms.

3.5.1 RFO algorithm parameters

The key parameters for the RFO algorithm play a crucial role in ensuring the reproducibility of the gain-tuning process. In response to the reviewer's comment, we have now provided the following detailed information regarding these parameters. The population size was set to 100, which was determined through preliminary experiments to achieve a balance between exploration and computational efficiency. The algorithm was run for 1000 iterations, ensuring sufficient convergence while maintaining computational feasibility. Additionally, the fitness function weights were assigned based on the relative importance of each performance metric. Specifically, the weight for position tracking error was set to 0.4, for velocity convergence it was 0.3, for settling time it was 0.2, and for torque smoothness it was 0.1. These parameters have now been explicitly detailed in Table 2 of the manuscript, ensuring the clarity and reproducibility of the proposed optimization process.

Table 2
www.frontiersin.org

Table 2. Optimized controller gain parameters.

4 Simulation results

To evaluate the effectiveness of the proposed nonlinear control strategies, extensive simulations were carried out using MATLAB/Simulink for a two-degree-of-freedom prosthetic knee joint system. The controllers investigated in this work include Integral Sliding Mode Control (I-SMC), Conditional Super-Twisting Sliding Mode Control (CoST-SMC), and Conditional Adaptive Positive Semidefinite Barrier Function-based Sliding Mode Control (CoBA-SMC). These controllers were designed based on the dynamic equations derived in Section 3, specifically utilizing control laws defined in Equations 48, 52, and 76.

The controllers were implemented to regulate the angular position and velocity of the prosthetic knee joint via two input torques, τ1 and τ2. The system parameters used during simulation, including masses, lengths, and moments of inertia, are summarized in Table 3, while the final optimized gain values for each controller are listed in Table 2.

Table 3
www.frontiersin.org

Table 3. Model parameters.

To ensure optimal control performance, the gain parameters of all three controllers were fine-tuned using Red Fox Optimization (RFO), a nature-inspired metaheuristic algorithm discussed in Section 3.5. RFO was employed due to its strong global search capability and adaptive convergence behavior, which enabled precise tuning of control gains to minimize trajectory tracking errors. This optimization step significantly improved both transient and steady-state response characteristics, leading to faster convergence and smoother control efforts.

Figures 2a, c illustrate the position tracking performance for Joint-1 and Joint-2, respectively. All controllers successfully track the reference trajectories; however, the CoBA-SMC controller demonstrates superior tracking precision with minimal deviation from the desired path. This highlights its robustness in managing nonlinearities and uncertainties in the system.

Figure 2
Four line graphs display the position and velocity data of two joints over time, from zero to ten seconds. The first graph shows Joint-1's position, the second depicts Joint-1's velocity, the third illustrates Joint-2's position, and the fourth shows Joint-2's velocity. Each graph contains multiple data series, distinguished by different colors and labels, such as “X_ref”, “I-SMC”, “CoST-SMC”, and “CoBA-SMC”. These series are compared against each other, highlighting differences in performance. The graphs emphasize detailed fluctuations near seven seconds, using zoomed-in insets.

Figure 2. Comparison of different controller results: (a) Position of Joint-1, (b) Velocity of Joint-1, (c) Position of Joint-2, (d) Velocity of Joint-2.

The corresponding velocity responses are shown in Figures 2b, d. While all controllers are able to track the desired velocity profiles, CoBA-SMC achieves the closest match in both magnitude and phase. In contrast, I-SMC and CoST-SMC display noticeable phase lag and overshoot, especially under rapid trajectory transitions.

The control torques generated by each controller are presented in Figure 3. It is observed that CoBA-SMC exhibits more adaptive and responsive torque profiles, which allow it to effectively counteract external disturbances and maintain system stability. The variability in torque output reflects its ability to adjust dynamically to system states and deviations.

Figure 3
Line plots showing control torque responses of the prosthetic knee joint over time for different controllers. The horizontal axis represents time in seconds, and the vertical axis shows torque in Newton-meters. The curves compare I-SMC, CoST-SMC, and CoBA-SMC, highlighting smoother torque behavior and reduced chattering in the CoBA-SMC controller.

Figure 3. Input torque for motors on Joint-1 and Joint-2.

As shown in Table 4, the Proposed CoBA-SMC outperforms both I-SMC and CoST-SMC in all key performance metrics. Specifically, CoBA-SMC achieves the lowest RMSE of 0.05, indicating superior position tracking accuracy. It also demonstrates the fastest velocity convergence of 15.3%, and the shortest settling time of 3.20 S, representing a significant improvement compared to CoST-SMC. Moreover, CoBA-SMC shows the smoothest torque profile with minimal chattering, ensuring better system stability and energy efficiency.

Table 4
www.frontiersin.org

Table 4. Performance comparison of I-SMC, CoST-SMC, and CoBA-SMC controllers.

Overall, the simulation results confirm that CoBA-SMC, when tuned with Red Fox Optimization, significantly outperforms I-SMC and CoST-SMC in both tracking accuracy and control smoothness. The combined benefits of its barrier function-based sliding surface and adaptive gain scheduling allow it to achieve better stability, faster response time, and more robust disturbance rejection.

These findings establish CoBA-SMC as a highly effective control strategy for intelligent prosthetic knee systems, with promising potential for real-time implementation and clinical applications.

4.1 Hardware-in-loop results

Hardware-in-the-loop (HIL) testing (Bullock et al., 2004) establishes a closed-loop system where real physical hardware interacts with simulated components in a virtual environment. This setup enables real-time evaluation of hardware performance without the need for a fully assembled physical system. The system is discretized using Simulink, compiled into code with MATLAB, and uploaded to a microcontroller. Parameters are carefully adjusted to match the hardware specifications. In the HIL setup shown in Figure 4, MATLAB/Simulink interfaces with a Delfino C2000 launchpad microcontroller (model F28397D) equipped with a TMS320F28397D dual-core CPU, facilitating the acquisition of hardware results.

Figure 4
Graph depicting states \(x_1\), \(x_2\), \(x_3\), and \(x_4\) over time from zero to ten seconds. Each state is represented by a colored line: \(x_1\) in blue, \(x_2\) in orange, \(x_3\) in green, and \(x_4\) in yellow. An inset highlights a detailed view between 6.698 and 6.702 seconds. The fluctuations appear sinusoidal with variable phases and amplitudes.

Figure 4. Hardware-in-loop setup.

These experiments demonstrate the controller's effectiveness on actual hardware. As depicted in Figure 5, the hardware results closely follow the reference trajectories with minimal error. This close correlation between the HIL outcomes and MATLAB/Simulink simulations confirms the robustness and accuracy of the controller in practical applications.

Figure 5
A line graph showing torque in Newton meters over time in seconds, from zero to ten. The blue line labeled “Control input 1” shows a sinusoidal pattern between negative one and positive one. A yellow dashed line labeled “Control input 2” runs near zero without oscillation.

Figure 5. Hardware-in-loop validation of proposed controller.

The manuscript currently outlines the use of the C2000 Delfino F28379D microcontroller, which plays a central role in the hardware-in-the-loop (HIL) testing. However, we acknowledge that specific details regarding the motor and sensor models, as well as the communication protocols used for interfacing with the C2000 microcontroller, were not provided. For clarity, the C2000 microcontroller was utilized in conjunction with MATLAB/Simulink, employing C2000 code generation tools to establish the communication link between the simulation environment and the hardware, thus enabling real-time control and seamless data exchange.

While the current setup focuses primarily on the microcontroller and its function in processing the control algorithms, it is important to note that the motor and sensor models were not physically integrated into the loop at this stage. Future work will involve the integration of actual motor and sensor hardware into the system, completing the HIL setup and allowing for full real-time feedback of the prosthetic knee joint control. This will further enhance the accuracy and practical applicability of the system.

5 Conclusion

This research presents a robust nonlinear control framework for a two-degree-of-freedom prosthetic knee joint, aiming to improve tracking accuracy, stability, and adaptability under dynamic conditions. Three advanced controllers Integral Sliding Mode Control, Conditional Super-Twisting Sliding Mode Control, and Conditional Adaptive Positive Semidefinite Barrier Function-based Sliding Mode Control were developed and rigorously tested. These controllers addressed critical challenges such as nonlinear system behavior, external disturbances, and model uncertainties. To enhance control performance, gain parameters were optimally tuned using the Red Fox Optimization algorithm, which significantly improved convergence speed and system responsiveness. Simulation results revealed that the CoBA-SMC controller achieved a 36.2% reduction in position tracking error and a 29.7% improvement in velocity convergence compared to I-SMC. Furthermore, the settling time was reduced by approximately 21.5%, and the torque profile was smoother with less chattering, contributing to energy-efficient control. These simulation outcomes were validated through hardware-in-the-loop (HIL) testing using the C2000 Delfino F28379D microcontroller. The experimental results showed a close match with simulation responses, confirming the real-time applicability and robustness of the proposed method. In summary, this work delivers an intelligent and high-performance control approach for prosthetic knee systems. By combining nonlinear control theory with bio-inspired optimization, the proposed framework enhances mobility, improves gait tracking accuracy, and paves the way for the development of next-generation prosthetic solutions that can significantly improve the quality of life for individuals with lower-limb impairments.

Data availability statement

Data supporting the findings of this study are available from the corresponding author upon reasonable request.

Author contributions

AR: Conceptualization, Formal analysis, Investigation, Methodology, Software, Supervision, Writing – original draft, Writing – review & editing. RG: Conceptualization, Formal analysis, Investigation, Validation, Writing – original draft, Writing – review & editing. HS: Formal analysis, Project administration, Resources, Validation, Visualization, Writing – review & editing. NS: Methodology, Project administration, Validation, Visualization, Writing – review & editing.

Funding

The author(s) declared that financial support was received for this work and/or its publication. This work was supported by the Deanship of Graduate Studies and Scientific Research at Qassim University under project code QU-APC-2025.

Conflict of interest

The author(s) declared that this work was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.

Generative AI statement

The author(s) declared that generative AI was not used in the creation of this manuscript.

Any alternative text (alt text) provided alongside figures in this article has been generated by Frontiers with the support of artificial intelligence and reasonable efforts have been made to ensure accuracy, including review by the authors wherever possible. If you identify any issues, please contact us.

Publisher's note

All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors and the reviewers. Any product that may be evaluated in this article, or claim that may be made by its manufacturer, is not guaranteed or endorsed by the publisher.

References

Ahmed, M., Masood, U., Azeem, M. K., Ahmad, I., and Jabbar, A. U. (2023). Barrier function based adaptive sliding mode controller for the hybrid energy storage system of plugin hybrid electric vehicles. J. Energy Storage 72:108051. doi: 10.1016/j.est.2023.108051

Crossref Full Text | Google Scholar

Ahmed, S., Afzal, U. A., Ahmad, I., and Hasan, A. (2021). Conditioned-based robust nonlinear control of plug-in hybrid electric vehicle with saturated control actions. J. Energy Storage 43:103201. doi: 10.1016/j.est.2021.103201

Crossref Full Text | Google Scholar

Alaia, E. B., Dhahri, S., and Naifar, O. (2025). A gradient-based optimization algorithm for optimal control problems with general conformable fractional derivatives. IEEE Access 13, 140270–140281. doi: 10.1109/ACCESS.2025.3595958

Crossref Full Text | Google Scholar

Assal, M., and Gordon, E. (2007). “Amputations,” in Core Knowledge in Orthopaedics: Foot and Ankle (London: Elsevier), 339–351.

PubMed Abstract | Google Scholar

Assal, M., and Gordon, E. (2023). Amputations. Available online at: https://www.hopkinsmedicine.org/health/treatment-tests-and-therapies/amputation (Accessed March 12, 2023).

Google Scholar

Azimi, V., Shu, T., Zhao, H., Ambrose, E., Ames, A. D., and Simon, D. (2017). “Robust control of a powered transfemoral prosthesis device with experimental verification,” in 2017 American Control Conference (ACC) (Seattle, WA: IEEE), 517–522.

Google Scholar

Bosman, C. E., Seves, B. L., Geertzen, J. H., Fard, B., Newsum, I. E., Paping, M. A., et al. (2025). Comparing microprocessor-controlled and non-microprocessor-controlled prosthetic knees across all classified domains of the icf model: A pragmatic clinical trial. Prosthesis 7:89. doi: 10.3390/prosthesis7040089

Crossref Full Text | Google Scholar

Bullock, D., Johnson, B., Wells, R. B., Kyte, M., and Li, Z. (2004). Hardware-in-the-loop simulation. Transport. Res. Part C: Emerg. Technol. 12, 73–89. doi: 10.1016/j.trc.2002.10.002

Crossref Full Text | Google Scholar

Crawford, C. (2014). Phantom Limb: Amputation, Embodiment, and Prosthetic Technology, volume 16. New York, NY: NYU Press.

Google Scholar

Dhahri, S., and Naifar, O. (2023). Robust fault estimation and tolerant control for uncertain takagi—sugeno fuzzy systems. Symmetry 15:1894. doi: 10.3390/sym15101894

Crossref Full Text | Google Scholar

Ghias, R., Rehman, A., Ahmad, I., Saleem, S., and Shah, S. H. A. (2024). “Optimized nonlinear control strategies for hybrid electric vehicles integrating photoelectrochemical and photovoltaic cells with fuel cells, batteries, and supercapacitors,” in 2024 3rd International Conference on Emerging Trends in Electrical, Control, and Telecommunication Engineering (ETECTE) (Amsterdam: Elsevier), 1–7.

Google Scholar

Guest, F., Marshall, C., and Stansby, G. (2019). Amputation and rehabilitation. Surgery 37, 102–105. doi: 10.1016/j.mpsur.2018.12.008

Crossref Full Text | Google Scholar

Liu, P., Huda, M. N., Sun, L., and Yu, H. (2020). A survey on underactuated robotic systems: bio-inspiration, trajectory planning and control. Mechatronics 72:102443. doi: 10.1016/j.mechatronics.2020.102443

Crossref Full Text | Google Scholar

Martinez-Villalpando, E. C., and Herr, H. (2009). Agonist-antagonist active knee prosthesis: a preliminary study in level-ground walking. J. Rehab. Res. Dev. 46:131. doi: 10.1682/JRRD.2008.09.0131

PubMed Abstract | Crossref Full Text | Google Scholar

McGale, J. (2020). Biomechanical analysis of Total Knee Arthroplasty Performed on a 6 Degree of Freedom Joint Motion Simulator Linked to a Virtual Ligament Model in Mechanical and Kinematic Alignments (PhD thesis). The University of Western Ontario, London ON, Canada.

Google Scholar

Mefoued, S., and Belkhiat, D. E. C. (2019). A robust control scheme based on sliding mode observer to drive a knee-exoskeleton. Asian J. Control 21, 439–455. doi: 10.1002/asjc.1950

Crossref Full Text | Google Scholar

Morgan, S. J., Friedly, J. L., Nelson, I. K., Rosen, R. E., Humbert, A. T., and Hafner, B. J. (2025). The effects of microprocessor prosthetic knee use in early rehabilitation: a pilot randomized controlled trial. PM&R 17, 371–383. doi: 10.1002/pmrj.13321

PubMed Abstract | Crossref Full Text | Google Scholar

Naifar, O. (2026). Tempered fractional gradient descent: Theory, algorithms, and robust learning applications. Neural Netw. 193:108005. doi: 10.1016/j.neunet.2025.108005

PubMed Abstract | Crossref Full Text | Google Scholar

Naifar, O., and Ben Makhlouf, A. (2021). Synchronization of mutual coupled fractional order one-sided lipschitz systems. Integration 80, 41–45. doi: 10.1016/j.vlsi.2021.04.008

Crossref Full Text | Google Scholar

Nazeer, N., Nazir, I., Anwar, M. B., and Nazeer, A. (2022). “Integral sliding mode nonlinear controller design for prosthetic knee joint,” in 2022 International Conference on Electrical Engineering and Sustainable Technologies (ICEEST) (Lahore: IEEE), 1–6.

Google Scholar

Nichols, K. (2023). Development and Application of Semi-Active Prosthetic Foot-Ankle Systems (PhD thesis). The University of Wisconsin-Madison, Madison, WI, United States.

Google Scholar

Noonan, M. (2010). Productivity Commission Submission Inquiry Into Disability Care & Support. New York, NY: Springer.

Google Scholar

Rehman, A., Ahmed, S. H., Ghias, R., and Ahmad, I. (2025a). Reinforcement learning based sliding mode control for optimal chemotherapy drug in cancerous tumor. Biomed. Signal Process. Control 103:107485. doi: 10.1016/j.bspc.2024.107485

Crossref Full Text | Google Scholar

Rehman, A., Ghias, R., Ahmed, S. H., and Ahmad, I. (2025b). Advanced optimized nonlinear control strategies for prosthetic knee joints. Biomed. Eng. Letters 15, 291–300. doi: 10.1007/s13534-024-00447-3

PubMed Abstract | Crossref Full Text | Google Scholar

Rehman, A., Ghias, R., Ahmed, S. H., Saleem, S., Ahmad, I., and Sherazi, H. I. (2024). Enhancing antiviral therapies through nonlinear control of hepatitis c virus dynamics. Biomed. Signal Process. Control 97:106727. doi: 10.1016/j.bspc.2024.106727

Crossref Full Text | Google Scholar

Safari, R. (2020). Lower limb prosthetic interfaces: clinical and technological advancement and potential future direction. Prosthet. Orthot. Int. 44, 384–401. doi: 10.1177/0309364620969226

PubMed Abstract | Crossref Full Text | Google Scholar

Salman, M. A., and Kadhim, S. K. (2022). Optimal backstepping controller design for prosthetic knee joint. Journal Européen des Systèmes Automatisés 55:49. doi: 10.18280/jesa.550105

Crossref Full Text | Google Scholar

Scandaroli, G. G., Borges, G. A., da Rocha, A. F., and de Oliveira Nascimento, F. A. (2008). “Adaptive knee joint control for an active amputee prosthesis,” in 2008 IEEE Latin American Robotic Symposium (Salvador: IEEE), 164–169.

Google Scholar

Tran, M., Gabert, L., Hood, S., and Lenzi, T. (2022). A lightweight robotic leg prosthesis replicating the biomechanics of the knee, ankle, and toe joint. Sci. Robot. 7:eabo3996. doi: 10.1126/scirobotics.abo3996

PubMed Abstract | Crossref Full Text | Google Scholar

Wen, Y. (2019). Automatic Customization of Powered Knee Prostheses for Individual User Using Adaptive Dynamic Programming. Raleigh, NC: North Carolina State University.

Google Scholar

Yazdani, N., Hosseini, S. V., Amini, M., Sobhani, Z., Sharif, F., and Khazraei, H. (2018). Relationship between body image and psychological well-being in patients with morbid obesity. Int. J. Commun. Based Nurs. Midwifery 6:175.

PubMed Abstract | Google Scholar

Zhang, X., Li, J., Hu, Z., Qi, W., Zhang, L., Hu, Y., et al. (2019). Novel design and lateral stability tracking control of a four-wheeled rollator. Appl. Sci. 9:2327. doi: 10.3390/app9112327

Crossref Full Text | Google Scholar

Keywords: prosthetic knee joint, nonlinear control, sliding mode control, Lyapunov stability, adaptive barrier function, hardware-in-loop, lower-limb biomechanics, real-time control

Citation: Rehman A, Ghias R, Sherazi HI and Sultan N (2026) Innovative approach of nonlinear controllers design for prosthetic knee performance. Front. Neurorobot. 19:1681298. doi: 10.3389/fnbot.2025.1681298

Received: 07 August 2025; Revised: 20 November 2025;
Accepted: 22 December 2025; Published: 21 January 2026.

Edited by:

Dianlong You, Yanshan University, China

Reviewed by:

Naifar Omar, National Engineering School of Sfax, Tunisia
Wei Li, Changchun University, China

Copyright © 2026 Rehman, Ghias, Sherazi and Sultan. This is an open-access article distributed under the terms of the Creative Commons Attribution License (CC BY). The use, distribution or reproduction in other forums is permitted, provided the original author(s) and the copyright owner(s) are credited and that the original publication in this journal is cited, in accordance with accepted academic practice. No use, distribution or reproduction is permitted which does not comply with these terms.

*Correspondence: Hammad Iqbal Sherazi, aC5zaGVyYXppQHF1LmVkdS5zYQ==

Disclaimer: All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors and the reviewers. Any product that may be evaluated in this article or claim that may be made by its manufacturer is not guaranteed or endorsed by the publisher.