TY - JOUR AU - Zhao, Liang AB - 1 Introduction A flexible robotic arm, typically featuring joints or structures made from bendable materials, is designed to navigate complex shapes and environments [1–3]. These arms are crucial for precise tasks like object grasping, flexible assembly, and collaborative operations, especially in constrained spaces such as medical surgeries, space exploration, and delicate material handling. Their adaptability and safety render them indispensable across a range of applications [4–6]. Investigations into the tracking control of mechanical systems have been shown to significantly boost automation, precision, and operational efficiency. These advancements not only broaden the range of potential applications but also lower both the costs and risks associated with operations. This is supported by the findings of [7,8], who discuss these improvements in their respective studies. Reference [9] explores robust tracking control for aircraft with actuator faults and damaged control surfaces, utilizing a multi-objective optimization strategy based on linear quadratic and performance metrics, validated through flight simulation examples. Li and Zhang et al. proposed two novel control strategies that effectively achieve precise trajectory tracking for quadrotor UAVs in the presence of dynamic obstacles and external disturbances, through the design of sliding mode disturbance observers and analysis using Lyapunov methods. Numerical simulation results validate the effectiveness of these control schemes [10]. In Reference [11], the study addresses asymptotic tracking control for uncertain nonlinear systems. Compared to traditional fuzzy adaptive control strategies [12,13], the integration of differential inclusion and set-valued mappings provides further theoretical validation for the controller’s local asymptotic tracking capabilities. This approach not only solidifies the theoretical base of the controller but also deepens our understanding of its precise tracking performance in a localized setting. A Naderolasli developed a new self-correcting adaptive strategy that significantly enhances the stability and control accuracy of two-degree-of-freedom tracking systems under external disturbances, parameter uncertainties, and measurement noise. This strategy utilizes inner and outer loop self-correcting stabilizers and trackers, along with an adaptive approach based on recursive least squares. The effectiveness of the proposed method has been validated through simulation techniques [14]. Moreover, uncertainty in system models can undermine the robustness of control systems, increasing their susceptibility to external disturbances and parameter variations, as noted in the references [15–17]. These uncertainties challenge the stability and performance of control systems, necessitating the implementation of robust [18,19] and adaptive control strategies [20,21] to maintain system effectiveness under varying conditions. Naderolasli A and Shojaei K et al. proposed a new controller for the formation of multiple autonomous surface vessels under the influence of model uncertainties and external disturbances, employing a leader-follower strategy and advanced control techniques to ensure formation stability. Simulation results validate the effectiveness and robustness of the control system [22]. In [23], a novel global regulator for flexible joint robots is proposed, which utilizes a nonlinear Proportional-Integral-Derivative (PID) control strategy. This regulator relies solely on motor position measurements and its global asymptotic stability is validated through closed-loop system analysis. Furthermore, Bounemeur and Chemachema proposed an adaptive fuzzy fault-tolerant tracking control method to address the challenges of multi-variable nonlinear systems with external disturbances, unknown control signs, and actuator faults. The method approximates the unknown nonlinear dynamics and state-dependent actuator faults using fuzzy logic systems and employs a Nussbaum-type function to tackle the issue of unknown control signs[24]. Reference [25] introduces a novel finite-time sliding mode control strategy for underwater robots, integrating backstepping and nonlinear disturbance observer techniques to address system uncertainties and time-varying disturbances. Simulation results demonstrate that this method enables robust signal tracking within a finite time frame, showcasing its effectiveness and disturbance rejection capabilities in practical underwater robotics applications. Reference [26] presents a robust adaptive formation control strategy for underactuated spacecraft using a neural network dynamic surface to manage external disturbances and uncertainties. Moreover, investigating the capacity of control systems, such as robots and drones, to operate effectively despite limitations on their outputs is critically important. Such research contributes to improving the systems’ efficiency, ensuring they operate as expected in restricted environments, thereby boosting their usability and dependability. Naderolasli A and colleagues developed a new leader-follower formation control method for Euler-Lagrange systems, optimizing system convergence rates and steady-state errors by employing an asymmetric barrier Lyapunov function and controlling trajectory tracking error boundaries. Simulation tests confirm the efficiency and stability of this control approach in dealing with unknown parameters and constrained system outputs [27]. Different from previous research by Naderolasli A, this study introduces a new constrained platoon formation controller design for autonomous underwater vehicles (AUVs) based on the dynamic surface control method, which effectively handles model uncertainties and field-of-view constraints. The tracking performance and safety are optimized through adaptive neural network technology. Simulation results confirm the high efficiency of this controller [28]. The Radial Basis Function Neural Network (RBFNN) uses radial basis functions as activation functions and is widely recognized for its proficiency in solving intricate nonlinear challenges. Bounemeur, chemachema, and others proposed an indirect adaptive fuzzy fault-tolerant control method that uses fuzzy systems to approximate uncertain nonlinearities and actuator faults, and employs a Nussbaum-type function to address the issue of unknown control gain sign. Simulation results validate the effectiveness of the approach, which overcomes the singularity problem in indirect adaptive feedback linearization control [29]. Liu et al. proposed a novel second-order sliding mode control strategy based on Hermite neural networks for nonlinear vector control of synchronous reluctance motor drive systems. The effectiveness and superiority of this control strategy in handling external disturbances and parameter uncertainties were validated through comparative hardware-in-the-loop testing [30]. In [31], a decentralized event-triggered fault-tolerant echo-state network (ESN) direct adaptive control method is proposed for uncertain interconnected systems with input saturation, actuator faults, external disturbances, and unavailable states. A fuzzy inference system is used to estimate the control error and derive the adaptation laws, while the ESNs approximate ideal control laws and robust terms are introduced to enhance the stability of the closed-loop system. At the same time, Lin’s team has developed an intelligent servo drive system for permanent magnet-assisted synchronous reluctance motors, utilizing a recurrent wavelet fuzzy neural network and intelligent backstepping control to effectively handle the motor’s nonlinearity and time-varying characteristics [32]. Like References [26,33] introduces a control strategy that combines a nonlinear disturbance observer with dynamic surface control, addressing the issue of dimension explosion in traditional designs. The use of a RBFNN effectively approximates unknown system functions, enhancing both robustness and overall performance. In [34], this report introduces a novel I-PID-type controller for torque-driven flexible joint robots with input constraints, utilizing a double-loop cascade configuration and nonlinear control strategies to ensure global asymptotic stability despite disturbances and uncertainties. Real-time experiments on a two-degrees-of-freedom manipulator demonstrate the controller’s superior performance, confirmed through Lyapunov theory and the Barbashin–Krasovskii theorem. Bounemeur and Chemachema proposed a finite-time fault-tolerant adaptive fuzzy control method for uncertain interconnected systems, addressing input saturation, state-dependent actuator faults, external disturbances, and unmeasurable states. The method approximates the unknown ideal control laws using fuzzy systems, ensuring the stability of the closed-loop system, and the simulation results validate its effectiveness [35]. Furthermore, Long Short-Term Memory (LSTM), a subtype of Recurrent Neural Networks (RNNs), is distinguished by its ability to capture long-term dependencies in data, addressing the problem of vanishing gradients common in traditional RNNs. This capability is widely recognized in studies such as [36,37], emphasizing its utility in sequence modeling and temporal dependency challenges. Consequently, LSTMs are frequently utilized in applications like trajectory planning for autonomous vehicles and predicting system states, as noted in [37,38]. Addressing complex system dynamics and the limitations of traditional static detection methods, Reference [37] utilizes LSTM networks to detect data anomalies with temporal features. The superiority of LSTM networks is further demonstrated through an extensive evaluation tailored to specific application scenarios. Reference [39] demonstrates how LSTM networks, leveraging deep learning, effectively simulate the storage effect in snow-affected watersheds to enhance the accuracy of rainfall-runoff models. This application is underscored through a detailed case study, highlighting LSTM’s utility in hydrological modeling. Reference [40] describes the development of a deep learning object detector to determine the six degrees of freedom (6-DoF) between a UAV-mounted monocular camera and a drogue cone, enhancing the UAV’s spatial awareness and positioning for critical tasks like aerial refueling or docking maneuvers. This technology provides essential data for autonomous UAV operations, reducing reliance on manual control. The object detector’s performance is rigorously evaluated against the VICON motion tracking system, validating its accuracy and reliability for navigation and spatial tracking in practical applications. Building on previous studies, this paper introduces an innovative approach for accurate tracking control of flexible single-joint robotic arms, effectively handling external disturbances and uncertainties through the use of adaptive neural network dynamic surface control techniques. Furthermore, it employs LSTM networks to predict and analyze vital system state variables. The principal contributions of this research are outlined as follows: Unlike conventional approaches that separately employ neural networks or dynamic surface control, our strategy integrates these components into a cohesive framework. This integration enhances the adaptability and precision of the control system under uncertain conditions. We introduce a novel application of nonlinear damping terms within the control law to effectively mitigate the impact of external disturbances, which is not commonly addressed in existing models. Additionally, our method stands out by implementing an adaptive law that updates both neural network weights and system parameters in real-time, improving the system’s responsiveness to dynamic changes and uncertainties. We incorporate Long Short-Term Memory (LSTM) networks to predict and analyze system state data, a feature rarely utilized in traditional control systems for flexible joint manipulators. This predictive capability allows for preemptive adjustments, enhancing the robustness and effectiveness of the control strategy. The structure of this paper is as follows: Sect 2 introduces the model transformation and problem description, detailing the conversion process and providing an overview of the problem. Sect 3 presents the control algorithm, which is based on the dynamic surface approach using neural networks. Sect 4 showcases numerical simulations conducted in MATLAB/Simulink to demonstrate the robustness and interference resilience of the proposed method. Finally, Sect 5 concludes with a summary of the main findings and suggestions for future research and development in this area. 2 Model transformation and problem description 2.1 Dynamic model of single-link flexible manipulator The research focuses on a horizontally operating single-link flexible manipulator, comprising a connecting rod, joint, end effector, sensor, and control system, which collectively enable the execution of complex tasks [41]. As shown in Fig 1, the manipulator receives a constrained input signal u(t) and encounters external disturbances d(t) at the end effector. Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 1. The response diagram of system state x(t) under constant disturbance. https://doi.org/10.1371/journal.pone.0318601.g001 To support controller design, we employ a standard dynamic model of a single-link flexible joint robot, serving as the foundation for subsequent controller development and analysis. (1) where and denote the angular positions of the mechanical linkage and the rotor, respectively. and are the moments of inertia for the linkage and rotor, respectively, while represents the joint stiffness coefficient. , , and signify the mass of the linkage, gravitational acceleration, and the distance from the joint to the center of mass of the linkage, respectively. Lastly, indicates the torque applied by the motor as an input. By selecting the state variables as follows: , , , and , and taking into account the influence of an external disturbance torque, we can express Eq (1) as follows: (2) where, , , . ; and represent external disturbance torques, and for positive values and , it holds that and . Assumption 1: The target angle is bounded, and both its first and second derivatives are well-defined, adhering to the condition that for a positive constant ξ, the sum of the squares of , its first derivative , and its second derivative does not exceed ξ. The system’s physical parameters, specifically and , are not known; however, they are constrained within known positive limits, with for i = 1 , 2. The functional forms of and are specific yet undisclosed. 2.2 Radial basis function neural network Remark 1: The Radial Basis Function Neural Network (RBFNN) is a type of artificial neural network that uses radial basis functions, typically Gaussian functions, as activation functions in its hidden layer. It consists of three layers: an input layer, a hidden layer with radial basis functions, and an output layer (see Fig 2). RBFNNs are commonly used for function approximation, pattern recognition, and regression due to their ability to handle nonlinear problems. With a simple architecture and fewer model parameters, RBFNNs are easy to understand and interpret [42]. Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 2. The schematic diagram of RBFNN structure. https://doi.org/10.1371/journal.pone.0318601.g002 The RBFNN can accurately approximate any continuous nonlinear function. By utilizing an RBFNN to approximate the functions and , an optimal weight vector exists. With , the neural network’s output closely approximates f (x), with an approximation error such that is the maximum allowable error [43]. (3) where, denotes the approximation error, which is constrained to an absolute value no greater than the specified threshold . Furthermore, the function represents the Gaussian basis functions, characterized by the following properties [43,44]: (4) where, , where i = 1 , ⋯ , N, represents the center of the i-th Gaussian basis function, and b > 0 denotes the width of the Gaussian basis function. These centers, , determine the positions in the input space around which the Gaussian basis functions are centered, and b controls the spread or width of these functions. Since is unknown a priori, it is crucial to devise an adaptive control law to estimate it. Note that the elements of are bounded, assumed to be within known positive constants , implying that the norm of , , does not exceed . This suggests that the magnitude of each element of is capped at . 2.3 Long short-term memory network Remark 2: The RNN is a neural network designed for sequential data, distinguished from traditional feedforward networks by its cyclic connections, which allow it to maintain a memory state during sequence processing (see Fig 3). A key variant of the RNN is the LSTM network, which excels at handling long-term dependencies in sequential data and addresses the vanishing gradient problem common in standard RNNs. Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 3. The schematic diagram of RNN structure. https://doi.org/10.1371/journal.pone.0318601.g003 LSTM features a memory cell critical for storing and accessing information, controlled through gates including the input, forget, and output gates. The architecture of an LSTM is illustrated in the schematic in Fig 4. Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 4. The schematic diagram of LSTM structure. https://doi.org/10.1371/journal.pone.0318601.g004 In an LSTM network, the extent to which previous cell state information is forgotten is determined by the forget gate. This gate computes its value based on the current input and the previous time step’s hidden state, which are processed through a fully connected layer and a sigmoid function. The output ranges from 0 (complete forgetting) to 1 (full retention of previous state information). The formula for the forget gate is as (5) where, is the weight matrix, is the bias term, is the previous time step’s hidden state, is the current input, and σ is the sigmoid function. In an LSTM network, it is crucial to decide what new information to store in the memory cell. This decision is governed by the input gate, which determines the segments of the memory cell to be updated, and a hyperbolic tangent (tanh) layer that generates a new candidate value vector for possible inclusion in the cell. The input gate and the candidate value vector are derived from the current input and the hidden state from the previous time step. The formula for the input gate is given as follows: (6)(7) where and represent the weight matrices, and and are the associated bias terms. denotes the hidden state from the previous time step, and refers to the current input. The symbol σ denotes the sigmoid function, and tanh refers to the hyperbolic tangent function. The memory cell in an LSTM network is updated by applying the decisions from the forget gate and the input gate. The cell state is multiplied by the forget gate’s value to discard certain state information, followed by adding the product of the input gate’s value and the candidate value, which introduces new state information. The formula for updating the cell state is as follows: (8) where, represents the output of the forget gate, while corresponds to the previous time step’s cell state. denotes the input gate value, and is the candidate value. The output is derived from the cell state, merging the current input with the hidden state from the previous time step via a fully connected layer. This layer applies a sigmoid function to set the output gate’s value, which ranges from 0 (no output) to 1 (full output). Subsequently, the cell state undergoes processing by a hyperbolic tangent (tanh) function, scaling it to a range of -1 to 1. This scaled value is then multiplied by the output gate’s value to compute the final hidden state. The operation of the output gate is described as follows: (9)(10) where, represents the weight matrix, corresponds to the bias term, and denotes the hidden state from the previous time step 2.4 Control objectives The primary objective of this paper is to develop a control strategy that enables a flexible joint manipulator to accurately follow a predefined trajectory, specifically , for the angular position θ of its links. To achieve this goal, we propose an ADSC approach, which is enhanced by the integration of a RBFNN. The RBFNN is employed to facilitate real-time adjustments of the neural network weights and to identify unknown model parameters dynamically. Additionally, we incorporate LSTM networks to predict and analyze the system’s state variables, thereby improving the overall performance and responsiveness of the control system. A schematic representation of the proposed control strategy is illustrated in Fig 5. Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 5. The schematic diagram of control logic. https://doi.org/10.1371/journal.pone.0318601.g005 2.1 Dynamic model of single-link flexible manipulator The research focuses on a horizontally operating single-link flexible manipulator, comprising a connecting rod, joint, end effector, sensor, and control system, which collectively enable the execution of complex tasks [41]. As shown in Fig 1, the manipulator receives a constrained input signal u(t) and encounters external disturbances d(t) at the end effector. Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 1. The response diagram of system state x(t) under constant disturbance. https://doi.org/10.1371/journal.pone.0318601.g001 To support controller design, we employ a standard dynamic model of a single-link flexible joint robot, serving as the foundation for subsequent controller development and analysis. (1) where and denote the angular positions of the mechanical linkage and the rotor, respectively. and are the moments of inertia for the linkage and rotor, respectively, while represents the joint stiffness coefficient. , , and signify the mass of the linkage, gravitational acceleration, and the distance from the joint to the center of mass of the linkage, respectively. Lastly, indicates the torque applied by the motor as an input. By selecting the state variables as follows: , , , and , and taking into account the influence of an external disturbance torque, we can express Eq (1) as follows: (2) where, , , . ; and represent external disturbance torques, and for positive values and , it holds that and . Assumption 1: The target angle is bounded, and both its first and second derivatives are well-defined, adhering to the condition that for a positive constant ξ, the sum of the squares of , its first derivative , and its second derivative does not exceed ξ. The system’s physical parameters, specifically and , are not known; however, they are constrained within known positive limits, with for i = 1 , 2. The functional forms of and are specific yet undisclosed. 2.2 Radial basis function neural network Remark 1: The Radial Basis Function Neural Network (RBFNN) is a type of artificial neural network that uses radial basis functions, typically Gaussian functions, as activation functions in its hidden layer. It consists of three layers: an input layer, a hidden layer with radial basis functions, and an output layer (see Fig 2). RBFNNs are commonly used for function approximation, pattern recognition, and regression due to their ability to handle nonlinear problems. With a simple architecture and fewer model parameters, RBFNNs are easy to understand and interpret [42]. Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 2. The schematic diagram of RBFNN structure. https://doi.org/10.1371/journal.pone.0318601.g002 The RBFNN can accurately approximate any continuous nonlinear function. By utilizing an RBFNN to approximate the functions and , an optimal weight vector exists. With , the neural network’s output closely approximates f (x), with an approximation error such that is the maximum allowable error [43]. (3) where, denotes the approximation error, which is constrained to an absolute value no greater than the specified threshold . Furthermore, the function represents the Gaussian basis functions, characterized by the following properties [43,44]: (4) where, , where i = 1 , ⋯ , N, represents the center of the i-th Gaussian basis function, and b > 0 denotes the width of the Gaussian basis function. These centers, , determine the positions in the input space around which the Gaussian basis functions are centered, and b controls the spread or width of these functions. Since is unknown a priori, it is crucial to devise an adaptive control law to estimate it. Note that the elements of are bounded, assumed to be within known positive constants , implying that the norm of , , does not exceed . This suggests that the magnitude of each element of is capped at . 2.3 Long short-term memory network Remark 2: The RNN is a neural network designed for sequential data, distinguished from traditional feedforward networks by its cyclic connections, which allow it to maintain a memory state during sequence processing (see Fig 3). A key variant of the RNN is the LSTM network, which excels at handling long-term dependencies in sequential data and addresses the vanishing gradient problem common in standard RNNs. Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 3. The schematic diagram of RNN structure. https://doi.org/10.1371/journal.pone.0318601.g003 LSTM features a memory cell critical for storing and accessing information, controlled through gates including the input, forget, and output gates. The architecture of an LSTM is illustrated in the schematic in Fig 4. Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 4. The schematic diagram of LSTM structure. https://doi.org/10.1371/journal.pone.0318601.g004 In an LSTM network, the extent to which previous cell state information is forgotten is determined by the forget gate. This gate computes its value based on the current input and the previous time step’s hidden state, which are processed through a fully connected layer and a sigmoid function. The output ranges from 0 (complete forgetting) to 1 (full retention of previous state information). The formula for the forget gate is as (5) where, is the weight matrix, is the bias term, is the previous time step’s hidden state, is the current input, and σ is the sigmoid function. In an LSTM network, it is crucial to decide what new information to store in the memory cell. This decision is governed by the input gate, which determines the segments of the memory cell to be updated, and a hyperbolic tangent (tanh) layer that generates a new candidate value vector for possible inclusion in the cell. The input gate and the candidate value vector are derived from the current input and the hidden state from the previous time step. The formula for the input gate is given as follows: (6)(7) where and represent the weight matrices, and and are the associated bias terms. denotes the hidden state from the previous time step, and refers to the current input. The symbol σ denotes the sigmoid function, and tanh refers to the hyperbolic tangent function. The memory cell in an LSTM network is updated by applying the decisions from the forget gate and the input gate. The cell state is multiplied by the forget gate’s value to discard certain state information, followed by adding the product of the input gate’s value and the candidate value, which introduces new state information. The formula for updating the cell state is as follows: (8) where, represents the output of the forget gate, while corresponds to the previous time step’s cell state. denotes the input gate value, and is the candidate value. The output is derived from the cell state, merging the current input with the hidden state from the previous time step via a fully connected layer. This layer applies a sigmoid function to set the output gate’s value, which ranges from 0 (no output) to 1 (full output). Subsequently, the cell state undergoes processing by a hyperbolic tangent (tanh) function, scaling it to a range of -1 to 1. This scaled value is then multiplied by the output gate’s value to compute the final hidden state. The operation of the output gate is described as follows: (9)(10) where, represents the weight matrix, corresponds to the bias term, and denotes the hidden state from the previous time step 2.4 Control objectives The primary objective of this paper is to develop a control strategy that enables a flexible joint manipulator to accurately follow a predefined trajectory, specifically , for the angular position θ of its links. To achieve this goal, we propose an ADSC approach, which is enhanced by the integration of a RBFNN. The RBFNN is employed to facilitate real-time adjustments of the neural network weights and to identify unknown model parameters dynamically. Additionally, we incorporate LSTM networks to predict and analyze the system’s state variables, thereby improving the overall performance and responsiveness of the control system. A schematic representation of the proposed control strategy is illustrated in Fig 5. Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 5. The schematic diagram of control logic. https://doi.org/10.1371/journal.pone.0318601.g005 3 Robust control of dynamic surface of adaptive RBF neural network 3.1 An overview of integrated control strategy In this subsection, we provide a detailed introduction to the comprehensive control strategy used in this manuscript, as depicted in Fig 5. This strategy includes virtual control laws, multi-level low-pass filters, adaptive laws, RBFNN, and LSTM. These components work together to precisely adjust the performance of the single-link flexible manipulator. Through this approach, we have designed an efficient control architecture that enhances the system’s stability and responsiveness, ensuring optimal control performance under various operating conditions. 3.2 Robust controller design of single-link flexible manipulator Remark 3: Dynamic Surface Control (DSC) is a control strategy designed to improve stability and tracking in nonlinear systems, especially under uncertainty and external disturbances. Commonly used in mechanical systems and robotics, DSC enhances performance by introducing dynamic feedback terms for asymptotic stability and improved trajectory tracking. Unlike backstepping control, DSC simplifies the design by using a “dynamic surface” to convert high-order derivatives into first-order, reducing system complexity and stabilizing oscillations and instabilities. Following the “progressive” design method of inversion control, the robust controller’s design is divided into four steps. Define the first dynamic surface error: (11) Taking the derivative, we get: (12) Then, choose a virtual control as: (13) Take , where is a positive constant, and pass it through a first-order low-pass filter with a time constant of to generate a new state variable . (14) Define the second dynamic surface error: (15) The derivation of Eq (15) can be obtained (16) Since and are unknown, construct the first RBFNN to approximate the unknown function (17) where, . Define (18) Given that is a positive constant and ε is a very small positive value, we use as a nonlinear damping term to mitigate the effects of . To facilitate this, we introduce a virtual control variable, , specifically designed to achieve a targeted objective or response. (19) where, represents the estimate of . The design of the adaptive law is as follows: (20) where is a positive definite symmetric matrix, and is a positive real number. A first-order low-pass filter with a time constant is applied to , creating a new state variable as follows: (21) Define the third dynamic surface error: (22) Computing the time derivative along the trajectory of Eq (22), it can be shown that (23) Next, we define the virtual control variable as (24) where is a positive constant, a first-order low-pass filter with a time constant is applied to the variable . This filtering procedure creates a new state variable, , with the transformation executed as follows: (25) where, , and . We define the vectors as: (26) where is a positive constant and ε is a very small positive value. The term is used as a nonlinear damping term to mitigate external disturbances represented by . The established control law is specified as (27) where is the estimate of . The adaptive law is formulated in the following manner: (28) where represents a positive definite symmetric matrix, and is a positive design parameter. Remark 4: Dynamic Surface Control (DSC) is a trajectory-tracking technique that does not rely on an extensive system model, making it well-suited for complex systems where precise modeling is challenging. DSC prioritizes accurate trajectory tracking and system stability, essential for high-precision tasks like robotic path following and exact positioning. Unlike traditional backstepping control methods, which may increase the dimensionality of the state space due to nonlinear terms [45–47], DSC simplifies the controller design and reduces computational load. The method often employs first-order filters to smooth trajectory error signals, mitigating the impact of rapid signal fluctuations and improving stability and tracking performance. 3.3 Analysis and proof of closed-loop system stability Remark 5: In this subsection, we propose an adaptive NNDSC strategy for a flexible-joint robotic manipulator with inherent uncertainties. An RBFNN is employed to approximate the unknown functions in the system model, while nonlinear damping terms are introduced to counteract external disturbance torques. Adaptive laws are designed for the real-time update of neural network weights and system parameters. Using the Lyapunov method, we show that all signals in the closed-loop system remain semi-globally and uniformly bounded. Additionally, it is demonstrated that by properly tuning the controller’s parameters, tracking errors can be minimized to negligible levels, ensuring the system achieves highly accurate tracking performance. The virtual control error is defined as: (29) From Eq (14), Eq (21), Eq (25) and Eq (29), we can derive: (30) Additionally, we define: (31) Taking the derivatives of the respective errors, we have: (32)(33) where, is given by: (34) which implies that (35)(36)(37) where (38) which implies that (39) By deriving the error of each virtual control term, we get (40)(41)(42) According to Eq (14), Eq (21), Eqs (29)–(33), Eqs (37)–(42), there is an upper bound function , which as (43)(44)(45) Consider the following compact set: (46) where p is any positive number. It is worth noting that is also a compact set, and the absolute values of , where i = 2 , 3 , 4, have maximum values on , denoted as . Consider the Lyapunov function: (47)(48)(49) Theorem 1: Considering the closed-loop system, which incorporates the plant dynamics as defined in Eq (2) and the designated controller detailed in Eq (27), if Assumption 1 is met and the initial conditions ensure V ( 0 ) ≤ p, then it is possible to select tuning parameters for i = 1 , … , 4, for i = 2 , 3 , 4, ε, , , , and . These parameters can be adjusted such that all signals within the closed-loop system remain semi-globally and uniformly bounded. Proof: Taking derivatives of , and , respectively: (50)(51)(52) The inequalities and are of significant importance. These inequalities, which link various parameters in the context of a specific problem, offer valuable insights into the interplay of different variables. Remark 6: The first set of inequalities illustrates the relationship between the squared deviations and relative to the energy scale ε, as well as their influence on the absolute values of and . These inequalities also highlight the connection between the product of and and the product of and , revealing their roles in the system’s dynamics. Similarly, the second set of inequalities involving and follows the same pattern, providing insights into their interrelations and constraints in the context of the problem. Remark 7: In this paper, we apply Lyapunov’s theory to evaluate the stability of the closed-loop system. It is crucial to highlight that Lyapunov’s theory is primarily used to analyze the stability of equilibrium points in a system. As such, we have rigorously established the existence of at least one equilibrium point within the closed-loop control system and have employed a Lyapunov function based on this equilibrium point to demonstrate the uniform boundedness and stability of the system’s states. The closed-loop control strategy we propose guarantees that the system can reach and maintain this equilibrium state under specific conditions, thereby achieving the desired control objectives. From Eq (50), Eq (51) and Eq (53), we can obtain (53) By utilizing the Young’s inequality and the inequality , we can derive the following expression for : (54) This expression represents an upper bound on the time derivative of a certain function V . It appears to be a complex combination of various terms and variables, including , , , , , , , and , as well as the norms of , , , and . The specific context or application of this inequality would be needed to provide further interpretation or analysis. Certainly, let’s further simplify and organize the expression for : (55) The specified inequality and conditions concerning , , and indicate that these parameter selections enable the establishment of an upper bound for the left-hand side expression, which is defined as . Here, denotes the maximum eigenvalue of the specified matrix. Given these conditions: The significance of this result lies in its ability to demonstrate that the expression on the left-hand side of the inequality can be constrained within the bound of . In control theory and stability analysis, this finding offers a valuable method for regulating and restricting the system’s behavior. The specific values of , , and along with the properties of the matrices and will determine the exact control and stability characteristics of the system. The control parameters are determined and configured as follows: (56) where the parameter r is a positive number that needs to be determined or designed. Then (57) Based on Assumption 1 and the conditions and for i = 1 , 2, it can be inferred that the expression has a maximum value denoted as Q. Selecting r such that r ≥ Q ∕ ( 2p ) , we have the following (58) Given that the condition is met when V = p, it results in at V = p. Thus, V ≤ p forms an invariant set. This means that if V ( 0 ) ≤ p, then V (t) will also be ≤ p for all t > 0. Assuming V ( 0 ) ≤ p, we find: (59) Solving the inequality above, we obtain: (60) It is evident that all signals in the closed-loop system are semi-globally bounded. With , equates to zero. Thus, as t approaches infinity, V converges to . 3.1 An overview of integrated control strategy In this subsection, we provide a detailed introduction to the comprehensive control strategy used in this manuscript, as depicted in Fig 5. This strategy includes virtual control laws, multi-level low-pass filters, adaptive laws, RBFNN, and LSTM. These components work together to precisely adjust the performance of the single-link flexible manipulator. Through this approach, we have designed an efficient control architecture that enhances the system’s stability and responsiveness, ensuring optimal control performance under various operating conditions. 3.2 Robust controller design of single-link flexible manipulator Remark 3: Dynamic Surface Control (DSC) is a control strategy designed to improve stability and tracking in nonlinear systems, especially under uncertainty and external disturbances. Commonly used in mechanical systems and robotics, DSC enhances performance by introducing dynamic feedback terms for asymptotic stability and improved trajectory tracking. Unlike backstepping control, DSC simplifies the design by using a “dynamic surface” to convert high-order derivatives into first-order, reducing system complexity and stabilizing oscillations and instabilities. Following the “progressive” design method of inversion control, the robust controller’s design is divided into four steps. Define the first dynamic surface error: (11) Taking the derivative, we get: (12) Then, choose a virtual control as: (13) Take , where is a positive constant, and pass it through a first-order low-pass filter with a time constant of to generate a new state variable . (14) Define the second dynamic surface error: (15) The derivation of Eq (15) can be obtained (16) Since and are unknown, construct the first RBFNN to approximate the unknown function (17) where, . Define (18) Given that is a positive constant and ε is a very small positive value, we use as a nonlinear damping term to mitigate the effects of . To facilitate this, we introduce a virtual control variable, , specifically designed to achieve a targeted objective or response. (19) where, represents the estimate of . The design of the adaptive law is as follows: (20) where is a positive definite symmetric matrix, and is a positive real number. A first-order low-pass filter with a time constant is applied to , creating a new state variable as follows: (21) Define the third dynamic surface error: (22) Computing the time derivative along the trajectory of Eq (22), it can be shown that (23) Next, we define the virtual control variable as (24) where is a positive constant, a first-order low-pass filter with a time constant is applied to the variable . This filtering procedure creates a new state variable, , with the transformation executed as follows: (25) where, , and . We define the vectors as: (26) where is a positive constant and ε is a very small positive value. The term is used as a nonlinear damping term to mitigate external disturbances represented by . The established control law is specified as (27) where is the estimate of . The adaptive law is formulated in the following manner: (28) where represents a positive definite symmetric matrix, and is a positive design parameter. Remark 4: Dynamic Surface Control (DSC) is a trajectory-tracking technique that does not rely on an extensive system model, making it well-suited for complex systems where precise modeling is challenging. DSC prioritizes accurate trajectory tracking and system stability, essential for high-precision tasks like robotic path following and exact positioning. Unlike traditional backstepping control methods, which may increase the dimensionality of the state space due to nonlinear terms [45–47], DSC simplifies the controller design and reduces computational load. The method often employs first-order filters to smooth trajectory error signals, mitigating the impact of rapid signal fluctuations and improving stability and tracking performance. 3.3 Analysis and proof of closed-loop system stability Remark 5: In this subsection, we propose an adaptive NNDSC strategy for a flexible-joint robotic manipulator with inherent uncertainties. An RBFNN is employed to approximate the unknown functions in the system model, while nonlinear damping terms are introduced to counteract external disturbance torques. Adaptive laws are designed for the real-time update of neural network weights and system parameters. Using the Lyapunov method, we show that all signals in the closed-loop system remain semi-globally and uniformly bounded. Additionally, it is demonstrated that by properly tuning the controller’s parameters, tracking errors can be minimized to negligible levels, ensuring the system achieves highly accurate tracking performance. The virtual control error is defined as: (29) From Eq (14), Eq (21), Eq (25) and Eq (29), we can derive: (30) Additionally, we define: (31) Taking the derivatives of the respective errors, we have: (32)(33) where, is given by: (34) which implies that (35)(36)(37) where (38) which implies that (39) By deriving the error of each virtual control term, we get (40)(41)(42) According to Eq (14), Eq (21), Eqs (29)–(33), Eqs (37)–(42), there is an upper bound function , which as (43)(44)(45) Consider the following compact set: (46) where p is any positive number. It is worth noting that is also a compact set, and the absolute values of , where i = 2 , 3 , 4, have maximum values on , denoted as . Consider the Lyapunov function: (47)(48)(49) Theorem 1: Considering the closed-loop system, which incorporates the plant dynamics as defined in Eq (2) and the designated controller detailed in Eq (27), if Assumption 1 is met and the initial conditions ensure V ( 0 ) ≤ p, then it is possible to select tuning parameters for i = 1 , … , 4, for i = 2 , 3 , 4, ε, , , , and . These parameters can be adjusted such that all signals within the closed-loop system remain semi-globally and uniformly bounded. Proof: Taking derivatives of , and , respectively: (50)(51)(52) The inequalities and are of significant importance. These inequalities, which link various parameters in the context of a specific problem, offer valuable insights into the interplay of different variables. Remark 6: The first set of inequalities illustrates the relationship between the squared deviations and relative to the energy scale ε, as well as their influence on the absolute values of and . These inequalities also highlight the connection between the product of and and the product of and , revealing their roles in the system’s dynamics. Similarly, the second set of inequalities involving and follows the same pattern, providing insights into their interrelations and constraints in the context of the problem. Remark 7: In this paper, we apply Lyapunov’s theory to evaluate the stability of the closed-loop system. It is crucial to highlight that Lyapunov’s theory is primarily used to analyze the stability of equilibrium points in a system. As such, we have rigorously established the existence of at least one equilibrium point within the closed-loop control system and have employed a Lyapunov function based on this equilibrium point to demonstrate the uniform boundedness and stability of the system’s states. The closed-loop control strategy we propose guarantees that the system can reach and maintain this equilibrium state under specific conditions, thereby achieving the desired control objectives. From Eq (50), Eq (51) and Eq (53), we can obtain (53) By utilizing the Young’s inequality and the inequality , we can derive the following expression for : (54) This expression represents an upper bound on the time derivative of a certain function V . It appears to be a complex combination of various terms and variables, including , , , , , , , and , as well as the norms of , , , and . The specific context or application of this inequality would be needed to provide further interpretation or analysis. Certainly, let’s further simplify and organize the expression for : (55) The specified inequality and conditions concerning , , and indicate that these parameter selections enable the establishment of an upper bound for the left-hand side expression, which is defined as . Here, denotes the maximum eigenvalue of the specified matrix. Given these conditions: The significance of this result lies in its ability to demonstrate that the expression on the left-hand side of the inequality can be constrained within the bound of . In control theory and stability analysis, this finding offers a valuable method for regulating and restricting the system’s behavior. The specific values of , , and along with the properties of the matrices and will determine the exact control and stability characteristics of the system. The control parameters are determined and configured as follows: (56) where the parameter r is a positive number that needs to be determined or designed. Then (57) Based on Assumption 1 and the conditions and for i = 1 , 2, it can be inferred that the expression has a maximum value denoted as Q. Selecting r such that r ≥ Q ∕ ( 2p ) , we have the following (58) Given that the condition is met when V = p, it results in at V = p. Thus, V ≤ p forms an invariant set. This means that if V ( 0 ) ≤ p, then V (t) will also be ≤ p for all t > 0. Assuming V ( 0 ) ≤ p, we find: (59) Solving the inequality above, we obtain: (60) It is evident that all signals in the closed-loop system are semi-globally bounded. With , equates to zero. Thus, as t approaches infinity, V converges to . 4 Simulation examples To more effectively validate the proposed method in this paper, a nonlinear adaptive backstepping control utilizing an RBF neural network, referred to as NN-ABSC, is designed and evaluated through simulation. Given the agreement on the simulation object, specific Lyapunov functions are crafted for the NN-ABSC approach. (61) where, , , and represent the error term. is design coefficients, with the condittion that . Let (62)(63) The neural network architecture implemented in the NN-ABSC framework is configured as 2-5-1, with its input defned as . The NN-ABSC is illustrated as a systematic approach, then have (64) In this section, we conduct a numerical simulation using MATLAB/Simulink to evaluate the performance and effectiveness of the control algorithm developed for the flexible manipulator. To ensure a fair comparison between the two methods, it is essential that the neural networks in both approaches start with identical initial weight configurations, learning rates, network structures, and the same number of neurons in the hidden layers. These precautions help eliminate any performance discrepancies that might arise from differing training conditions, ensuring that the comparison reflects the true effectiveness of each method rather than being influenced by variations in the training setup. In addition, the RBF neural network parameters of the two methods are the same. In the simulation, the primary control objective is to develop a control law for the link angle q in order to accurately track the desired trajectory, which is defined as . Assuming disturbance torques are given by and . The physical parameters of the system are selected as: . These parameters are used solely for constructing the object in the simulation. As a result, the true values of and , as well as and , are respectively equal to and 1. The initial state of the system is set to . According to the definitions of , , and , we can obtain the initial values for the three filter equations Eq (14), Eq (21) and Eq (25). Since , then . Since the network weights are all initialized to 0, . Therefore, according to Eq (21), we can obtain . As for , where , then . According to the expression for V , we have . Since the initial values of the functions approximated by the RBFNN, and , are assumed to be zero, it might seem reasonable to also assume that the initial weights of the RBFNN could be set to zero. The weights used for approximation by the RBFNNs are all initialized to 0. Therefore, we can set . Thus, it can be determined that . Following the condition p ≥ V ( 0 ) , we design . According to the equation r ≥ Q ∕ ( 2p ) , we design the value of r. Since , we can design very small values for and to minimize Q. In the simulation, it was found that small values for and are required in the adaptive laws (20 and 28) to obtain satisfactory results. As a result, it is essential to select a very small value for . The parameter r is chosen based on the condition r ≥ Q ∕ ( 2p ) . It is important to note that although Q is dependent on and , both of these parameters are also influenced by the value of r. Additionally, the key parameters for both control methods are summarized in Table 1. Download: PPT PowerPoint slide PNG larger image TIFF original image Table 1. The parameters for two different control methods. https://doi.org/10.1371/journal.pone.0313772.t001 The control law Eq (27), adaptive law Eq (20), and Eq (28) are employed for the simulation, and the results are presented in Figs 6, 7, 8, 9, 10, 11, and 12. Fig 6 presents three distinct types of signals: the ideal signal (depicted as a solid red line), the NN-ABSC method (shown as a blue dotted line), and the proposed method (illustrated with a green dotted line). The ideal signal illustrates the target trajectory for the system, while the other two lines indicate the performance of two different control methods in a practical setting. The lower segment of Fig 6 displays the tracking errors for both the NN-ABSC method (in blue) and the proposed method (in green). This figure highlights the superior accuracy and stability of the proposed control method in maintaining the trajectory of the single-link flexible manipulator in line with the ideal signal, showing significant enhancements over the NN-ABSC method. Fig 7 compares the control inputs for the same system, detailing the dynamics between control force and time for both the NN-ABSC method and the proposed method when managing a single-link flexible manipulator. It reveals that the proposed method is more efficient and precise in its application of control force, making it potentially more suited for scenarios requiring delicate operations. Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 6. The position tracking and error of a single-link flexible manipulator. https://doi.org/10.1371/journal.pone.0318601.g006 Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 7. The schematic diagram of system control input. https://doi.org/10.1371/journal.pone.0318601.g007 Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 8. The schematic diagram of dynamic surface error. https://doi.org/10.1371/journal.pone.0318601.g008 Fig 8 presents four dynamic surface error curves designed in this paper, and it can be seen from Fig 8 that the system’s dynamic surface error (, , and ) converges to zero. The system parameters and their estimations are presented in Fig 9. As shown in this figure, the Radial Basis Function Neural Network (RBFNN) utilized in this study successfully estimates the unknown parameters. Similarly, Fig 10 illustrates the functions and their corresponding estimations. From this, it is clear that the RBFNN is effective in approximating the unknown functions. Fig 11 depicts the time variation of the system’s position error. The figure reveals a significant initial peak in the position error, which rapidly decreases and gradually stabilizes, showing a noticeable attenuation in oscillations. Fig 12 compares the observed and predicted position errors of the flexible manipulator. The blue curve represents the actual observed position error, while the red curve indicates the predicted position error. The inset provides a zoomed-in view of a specific time period, allowing a more detailed comparison of the observed data and predictions. From Figs 11 and 12, it is evident that by accurately predicting the future position error, the control system can proactively adjust its parameters to prevent large errors, which could otherwise lead to performance degradation or system instability. This predictive capability is particularly crucial for applications where safety is a primary concern. Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 9. The schematic diagram of parameter , and its estimation. https://doi.org/10.1371/journal.pone.0318601.g009 Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 10. The schematic diagram of function , and its estimation. https://doi.org/10.1371/journal.pone.0318601.g010 Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 11. The diagram of position error. https://doi.org/10.1371/journal.pone.0318601.g011 Download: PPT PowerPoint slide PNG larger image TIFF original image Fig 12. Prediction of position error. https://doi.org/10.1371/journal.pone.0318601.g012 5 Discussion and future work This study proposes a robust control methodology, termed ADSC, for a single-joint flexible robotic manipulator, effectively addressing system uncertainties. The approach combines RBFNN for accurate approximation of unknown system functions, with the introduction of nonlinear damping terms to mitigate the impact of external disturbances. A novel adaptive law is established to continuously estimate the neural network weights and unknown model parameters, ensuring that the system remains adaptable under various operating conditions. Additionally, LSTM networks are employed to analyze and predict state variable position errors, enhancing the predictive capabilities of the system. Simulation results confirm the robustness and effectiveness of the proposed control approach, demonstrating its suitability for managing uncertainties and disturbances in real-time applications. Furthermore, future research could explore the integration of more advanced deep learning techniques, such as reinforcement learning and convolutional neural networks, to further improve state analysis and prediction. Cross-disciplinary collaboration in fields such as control engineering, machine learning, robotics, and materials science is essential for developing deeper insights and innovative solutions to future challenges in flexible robotic systems. Supporting information S1 Text. Paper program. https://doi.org/10.1371/journal.pone.0318601.s001 (PDF) TI - Adaptive control and state error prediction of flexible manipulators using radial basis function neural network and dynamic surface control method JF - PLoS ONE DO - 10.1371/journal.pone.0318601 DA - 2025-02-26 UR - https://www.deepdyve.com/lp/public-library-of-science-plos-journal/adaptive-control-and-state-error-prediction-of-flexible-manipulators-b0mvRHoXfb SP - e0318601 VL - 20 IS - 2 DP - DeepDyve ER -