1 Introduction

1.1 Overview

The limbs are an integral part of human body. With aging, post stroke events, spinal cord injury, accidents, etc., the limbs may get affected temporarily or even permanently [1]. This can effect the quality of life for these persons and can even lead to depression. Rehabilitation robots are becoming more popular in bio-medical engineering due to their extensive use in post-stroke events and also they are helpful in addressing the problem of medical equipment shortages. With advancement these robots are becoming more powerful and intelligent to perform different task in our day to day lives [2]. Rehabilitation robots are automated machine that are designed for persons with limb impairments. The rehabilitation robots can act as an substitute for amputees to provide assistance. These robots are also being widely used as therapists which helps in speedy recovery for the patients suffering from stroke [3, 4].

1.2 Motivation and general framework

Scientist across the world are working on exoskeletons which are light weight in nature and can help in proper limb functioning. These devices can provide assistance in movement [5,6,7], counter movement when it is not synchronized in order to train the nervous system for achieving proper gait. There has been tremendous increase in the usage of these assistive devices in recent years due to several factors like aging and persons suffering from strokes, Parkinson’s disease, cerebral palsy, injury or any surgery. With aging or person affecting from stroke the nervous system of a person gets affected which leads to improper gait. These robots can then act as assistive devices and therapist to provide limb rehabilitation [8]. These rehabilitation robots can make patients perform exercise regularly and repeatedly in a precise and controlled manner [9]. These robots are also beneficial in measuring the recovery level of the patients with the help of sensors placed on them. These results can then be used in further clinical assessment of the patient. The exoskeleton robots are designed by encapsulating limb with a bionic structure which are responsible for calculating torque for joints and causing movement.

OpenSim is a freely available software developed by Stanford University in 2007 that allows to build and analyze musculoskeletal systems [10]. The musculoskeletal system of a human body comprises of bones, ligaments, tendons and connecting tissues which are responsible for movement and maintaining posture of human body. The OpenSim can provide many features like build and scale musculoskeletal models, perform inverse kinematics and inverse dynamic, analyze and simulate motion processes and perform rehabilitation [11]. In the proposed work, a musculoskeletal model is developed and simulations are carried out. The results obtained from these simulation are then fed to a controller to perform error free tracking of the trajectory and perform rehabilitation.

In the designing of the rehabilitation robots the controller is responsible to provide human robot coordination. The controller designed should be able to handle uncertainties and disturbances to achieve desired results [12]. During the last decade sliding mode controller is famous among the control research community. It is a non linear method which provides with easy tuning and implementation property. The distinguishing feature of sliding mode controller is that it is invariant to uncertainties and disturbances. SMC is therefore used to control the dynamic behaviour of the systems subject to model uncertainties.

Fig. 1
figure 1

Design for lower limb exoskeleton

In the proposed work the SMC is coupled with RBF neural network and fuzzy system individually to approximate the unknown functions values to perform modelling in practical engineering. Figure 1 shows the sequence of steps required to design rehabilitation robots. The RBF neural network can be used to evaluate the unknown nonlinearities in the system in accordance with the adaptive laws [13]. The RBF Network is fused with the adaptive SMC controller to provide with the improved approximation performance of the system. Though the SMC provides with desirable features like robustness and simplicity but suffers from chattering problem. This problem can be attenuated by coupling SMC with adaptive fuzzy system approximation for manipulators [14]. The Fuzzy system comprises of control rules which are in form of IF-THEN to control different operations in a system and to approximate unknown functions [15]. The Minimum Learming Parameter(MLP) is also introduced with RBF and Fuzzy system for approximating unknown function to reduce the computational cost and improve the real time performance of the control system [16].

1.3 Author’s contribution

The paper discusses the designing of a 2 link lower limb manipulator by implementing adaptive sliding mode controller in association with the RBF and fuzzy design techniques for rehabilitation purposes. The original inputs to the proposed work are listed as follows:

  1. 1.

    This novel approach proposed an architecture for assistive devices which constitutes of musculoskeletal modelling and trajectory tracking control scheme.

  2. 2.

    The musculoskeletal model is build in virtual mode implemented in OpenSim software which evaluates dynamic forces according to real subject specifications to design personalised exoskeleton for better rehabilitation therapy. The model simulation also facilitates the efficient trajectory tracking control system implementation and validation with reduced errors as shown in results.

  3. 3.

    We proposed a robust adaptive sliding mode controller which attenuates the chattering problem, model uncertainties and external disturbances without using additional sensors to reduce overall computational cost, power consumption and complexity of the system ensuring improved performance and desired trajectory tracking.

  4. 4.

    The radial basis function neural network and fuzzy techniques are coupled with the non linear control systems to approximate unknown nonlinearities according to the adaptive laws to speedup the convergence of the system.

  5. 5.

    The Minimum Learning Parameter technique introduced in the system reduces the number of adaptive parameters to one which reduces computational cost and complexity and improves real time tracking of the system.

  6. 6.

    The performance of the proposed controller is measured using performance index parameters and the results are compared with the existing method.

The layout of the paper is designed as follows: The second section, list and explains the various techniques used in the past to design the control system for exoskeletons. The next section explains the 2-link lower limb mechanical structure, inverse kinematics, inverse dynamics and OpenSim software. The fourth section discusses the control methods utilized to design an effective and stable controller. Section 5, contains results obtained on Matlab-Simulink and performance is measured using performance index parameters. The last Section 6, contains future enhancements which can be applied later to the proposed model.

2 Related works

In the literature, rehabilitation robots are becoming very profound and popular in biomedical engineering among the various scientists and researchers worldwide. In 2022 Liang et al [2], developed non singular terminal SMC and neural network to develop rehabilitation robots which provided faster convergence and reduced chattering problem. The rehabilitation robots was designed for two-link single-arm robot. The Iterative Learning Control Algorithm was proposed [17] to develop LLRR to track desired trajectory for lower joints. ILC is a simple algorithm and is used for controlling the object with repeated motion and also musculoskeletal model was used to improve the accuracy. Zhang et al [18], in 2019 proposed a solution for the robot arm design. They have designed the system depending on parametric uncertainty and no parametric certainty. The information concentration estimator was employed to find the approximated model uncertainties and adaptive SMC controlled the arm speed. Khamar et al [19] also designed a controller for lower limb dedicated to crouch gait patients. The controller designed reduced the risk related to crouch gait patterns and effectively dealt with actuator saturation effect. In [20], the human in loop technique was utilized to optimize the torque values generated by exoskeleton which resulted in time savings. In 2021 Yu et al [10], also developed a musculoskeletal model in OpenSim to study the motion characteristics of the subject on the basis of real gait data collected. The results obtained from the software was then fed into PD controller to perform tracking of the desired trajectory. The model should ensure that signals are noiseless because the derivative part can amplify the noise and can create stability issues for the plant. Similarly another adaptive PD controller [21] was designed to perform rehabilitation in 2021.

In another work [13] the author has used surface electromyography(sEMG) technique to predict the joint angles for upper limb rehabilitation. The paper focused on the problem of poor human computer interaction. But the sEMG technique used is influenced by model uncertainties and disturbances which degrades the system performance. In similar work where sEMG was used, sliding mode iterative learning controller was used for tracking trajectory [22, 23]. In 2017 Niu et al [24], also used sliding mode control using non linear disturbances observer technique for wire rehabilitation robots. Their performance was better when compared with traditional sliding mode control in terms of chattering and model uncertainties. Rezaee et al [25] investigated video data frames to predict the falling risk of elderly people using Kalman filter by calculating the joint angles of the subject lower limb. Then the Adaptive SMC controller utilizing radial basis network was designed to control the upper limb movement while performing rehabilitation. The controllers are also used to designed prosthesis for amputees as done by Raheema et al [14]. The data is first collected by force plates and video camera which is then used to design the the control system. The adaptive neuro fuzzy system with PID controller is used to design control system. Similarly in [15] adaptive fuzzy SMC was designed for three degree of freedom manipulators in industry. The fuzzy PID controller was developed to perform rehabilitation by providing accurate torque values in presence of model uncertainties [26, 27]. The neural network [28] was also used in designing rehabilitation robots by approximating unknown values of a system. The deep reinforcement learning approach was also applied to perform rehabilitation using lower limb exoskeleton [29]. The musculoskeletal model was developed and 3D simulations were carried out in physics environment on both the healthy gait data and post stroke patient gait data. Earlier in 2019 musculoskeletal model was developed to perform bio-mechanical analysis of lower limb for both normal and pathological gait [11].

Table 1 Literature survey of controllers used for different applications

The PID controllers were earlier generally used to design exoskeletons (Table 1). The performance of this controller generally degrades in the environment of noise and disturbances. The derivative part can amplify the noise present in the system and can effect the system performance. In [31] the PID controller was to design lower limb exoskeleton where artificial neural network was utilized to tune controller parameters. Similarly [30] proposed a model for upper limb robotic arm exoskeleton RAX-1. The PID controller was used and its parameters were tune with particle swarm optimization and ant colony optimization techniques. The traditional method for optimizing PID controller used Ziegler-Nichols method but it faced overshoot problems. Other optimization techniques used to tune the controllers are grey wolf optimization [12] and online/ offline optimization [32]. Presently, Lokomat [33, 34] have become popular which are known as exoskeleton robots. These are assistive devices which provides gait rehabilitation by making subjects move on treadmill wearing these devices to provide normal gait cycle [35,36,37]. The nature inspired curriculum learning was developed for learning to walk problems in [38]. They also proposed deep reinforcement learning for gait optimality on musculoskeletal models.

Various other techniques used in gait rehabilitation involves using cable driven leg exoskeleton [9], socially assistive robots [39], trajectory deformation algorithm [40] and bio inspired adaptive oscillator [8]. The internet of things technology has also been introduced in this field to provide medical facilities at remote places. In the proposed work [41] pressure sensor is used to collect data which is transmitted by STM32 controller.

3 Designing of lower limb rehabilitation robot

3.1 Mechanical structure of LLRR dynamic equations

It is often convenient to express the dynamic equation of the manipulator in terms of a single equation that abstracts some details and show some structure of the manipulator. The structure of 2-degree of freedom is taken into consideration for the rehabilitation robot [42]. This structure as shown in Fig. 2 consist of two links and two joints that is hip joint and knee joint to form a lower limb. Mathematically, the Newton-Euler motion equation of the 2-link manipulator is given as follows:

$$\begin{aligned} I(q)\ddot{q}+T(q,\dot{q})\dot{q}+G(q)+F(\dot{q})+\tau _d = \tau \end{aligned}$$
(1)

Where q, \(\dot{\text {q}}\) and \(\ddot{\text {q}}\) represents joint angles, velocities and accelerations.

Fig. 2
figure 2

Mechanical structure of lower limb

The \(I(q)\in R^{2x2}\) denotes mass/inertia matrix, T(q,\(\dot{\text {q}}\)) \(\in R^{2x2}\) denotes the Coriolis/centrifugal matrix, \(G(q) \in R^{2x1}\) is the force due to gravity, F(\(\dot{\text {q}}\)) represents the frictional force, \(\tau _d\) is the unknown disturbances and \(\tau = [ \tau _{1}, \tau _{2}]\) is the control torque where \(\tau _{1}\), \(\tau _{2}\) is the hip and knee joint torque respectively.

3.2 Musculoskeletal modeling

To perform gait analysis data is collected first with the help of Nokov 3D motion capture system and force measuring plates. The proposed work has utilized data from [10] to perform gait analysis and rehabilitation. The gait represents the walking pattern behaviour of human beings, which is an important metric to predict human health in medical research [43]. After the data was captured it was pre-processed by discarding or interpolating missing values [44]. This data is then applied to a musculoskeletal model to obtain joint angles and torque values to perform rehabilitation therapy. Musculoskeletal model is an experimental model that helps to study motion, analyze and simulate it [45]. It is a rich source of information that recreates human musculoskeletal to build exoskeleton in order to perform gait restoration after some injuries or strokes [11]. Several software are available for musculoskeletal modeling namely OpenSim, MSMS, SIMM, LifeMOD and Anybody.

Fig. 3
figure 3

OpenSim gait-2354 model in different views

The proposed work has utilized OpenSim software to perform dynamic simulations. OpenSim is a free open source software package developed by Stanford University in 2007. The software finds its application in neuroscience research, Bio-medical research, ergonomics analysis, rehabilitation therapy, sports community, exoskeleton robot development and education. The generic model used for the proposed work is Gait 2354 model. The musculoskeletal Gait 2354 model shown in Fig. 3 is a 3D model with 23 degrees of freedom. The models were created by Darryl Thelen from University of Wisconsin-Madison and Frank C. Anderson, Ajay Seth, and Scott L. Delp from Stanford University [46]. This model focused on lower limb joint extremities model, lower back joint model and a planar knee model. The Gait 2354 model is then scaled accordingly to subject physical specifications required to collect experimental data. Scaling is an iterative process and is performed by matching the experimental marker to model marker placed on the model. The purpose is to modify the anthropometry of the model with the anthropometry of the particular subject in order to adjust the mass and body segment dimension. Scaling the model to subject is important because the accuracy of the later stages(like inverse kinematics and inverse dynamics) results is dependent on it.

3.2.1 Inverse kinematics

Kinematics is defined as study of motion without taking into consideration the factors that causes motion. The robot kinematics can be solved by forward kinematics and inverse kinematics [47, 48]. In forward kinematics the final position of the manipulator is obtained when initial position and velocity of the manipulator is given as an input. On the other hand in inverse kinematics the final position is given and joint angle values need to be estimated for manipulator orientation and configuration [49]. OpenSim helps to solve the inverse kinematics problem by using experimental subject data to determine kinetic and kinematics of musculoskeletal model. The OpenSim provides the inverse kinematic tool which calculates the set of generalized coordinates that is joint angles for the model that best matches with the experimental subject kinematics [10]. The inverse kinematic tool positions the model in a best pose that matches the corresponding experimental subject pose for the same time stamp. This match is found with the help of the weighted least square equation.

The joint angles are estimated by passing as input the experimental data file which is the .trc file collected through motion capture data system. The other input files are the scaled model file which is scaled Gait-2354 model and the IK setup file which includes marker weightings. In the output a motion file is obtained which contains joint knee, hip and ankle angles, pelvis tilt, hip flexion, hip abduction, hip rotation, etc,. The inverse kinematics solves the weighted least square problem with the given equation as follows:

$$\begin{aligned} \underset{q}{\min }[\underset{i\in markers}{\Sigma }w_i\Vert x^{exp}_i-x_i(q) \Vert ^2+\underset{j\in unprescribed \, coords}{\Sigma }\omega _j(q^{exp}_j-q_j)^2] \end{aligned}$$
(2)
$$\begin{aligned} q_j=q_j^{exp} \, for \, all \, prescribed \, coordinates \, j \end{aligned}$$
(3)

where, \(x_i^{exp}\) is the real subject position for i marker, \(x_i(q)\) is the mdel position for marker i, \(q_i^{exp}\) is the experimental value of coordinate j and q is the vector of the solved generalized coordinates. A prescribed coordinate is a one whose trajectory is known and is not computed by IK tool. On the other hand unprescribed coordinates are not prescribed and their values are calculated using IK tool.

3.2.2 Inverse dynamics:

Dynamics is a branch of mechanics that deals with the motion study and the forces that causes the motion [49]. Inverse dynamic tool in OpenSim is used to estimate the forces which causes locomotion and how musculoskeletal system of humans contribute for that locomotion. To determine forces, the equation (4) for the system is solved while considering external forces. These equation of motion are generated automatically by inverse dynamic tool of OpenSim in accordance with the model dimensions. Traditionally, the force is dependent on the mass and acceleration of the system and is governed by the following motion equation: F \(=\) ma. The inverse dynamics tool calculates the force at each joint to produce motion [10]. The equation of motion for 2-link manipulator is written as:

$$\begin{aligned} I(q)\ddot{q}+T(q,\dot{q})\dot{q}+G(q) = \tau \end{aligned}$$
(4)

Where q, \(\dot{\text {q}}\) and \(\ddot{\text {q}}\) represents joint angles, velocities and accelerations. The \(I(q)\in R^{2x2}\) denotes inertia/mass matrix, T(q,\(\dot{\text {q}}\)) \(\in R^{2x2}\) denotes the Coriolis matrix, \(G(q) \in R^{2x1}\) is the force due to gravity and \(\tau = [ \tau _{1}, \tau _{2}]\) denotes control torque where \(\tau _{1}\), \(\tau _{2}\) is the hip and knee joint torque. In above equation, all the terms on left hand side are known \(\tau\) is the only unknown value that represents torque.

4 Control methods

The control system is a system which provides stable desired output by varying in the input [50]. The different control methods applied in the proposed system are as follows:

4.1 Adaptive SMC neural network with MPL

An adaptive sliding mode control technique is used to design a 2-link manipulator as shown in Fig. 4 which used radial basis function in the network to approximate unknown values. As we have seen earlier, mathematically the motion equation of the 2-link manipulator is:

$$\begin{aligned} I(q)\ddot{q}+T(q,\dot{q})\dot{q}+G(q)+F(\dot{q})+\tau _d = \tau \end{aligned}$$
(5)

Where q, \(\dot{\text {q}}\) and \(\ddot{\text {q}}\) represents joint angles, velocities and accelerations. The \(I(q)\in R^{2x2}\) denotes inertia/mass matrix, T(q,\(\dot{\text {q}}\)) \(\in R^{2x2}\) denotes the Coriolis matrix, \(G(q) \in R^{2x1}\) is the force due to gravity and \(\tau = [ \tau _{1}, \tau _{2}]\) denotes control torque where \(\tau _{1}\), \(\tau _{2}\) is the hip and knee joint torque. The error of the system can be stated as:

$$\begin{aligned} e_{sys}(t)=q_{des}(t)-q(t) \end{aligned}$$
(6)

where \(q_{des}\) is the desired joint angle and q is actual joint angle. There the objective is to achieve \(e_{sys}(t)\rightarrow 0\) and \(\dot{e_{sys}}(t)\rightarrow 0\) as \(t\rightarrow \infty\).

4.1.1 Controller design with RBF based on MPL

The sliding mode function is defined as:

$$\begin{aligned} s=\dot{e_{sys}}+\Lambda e_{sys} \end{aligned}$$
(7)

where \(\Lambda\) is a positive symmetric matrix and \(\Lambda =\Lambda ^T>0\) From eq. (6) we can write \(\dot{\text {q}}\) as:

$$\begin{aligned} \dot{q} = -s+\dot{q_{des}}+\Lambda e_{sys} \end{aligned}$$
(8)

Then calculate Iṡ

$$\begin{aligned} I\dot{s} = I(\ddot{q_{des}}-\ddot{q}+\Lambda \dot{e_{sys}}) \end{aligned}$$
(9)

The eq. (9) can be rewritten as follows:

$$\begin{aligned} I\dot{s}= I(\ddot{q_{des}}+\Lambda \dot{e_{sys}})-Ts+T(\dot{q_{des}}+\Lambda e_{sys})+G+F+\tau _d-\tau \end{aligned}$$
(10)
$$\begin{aligned} I\dot{s} =-Ts-\tau +f+\tau _d \end{aligned}$$
(11)

where \(f = I(\ddot{q_{des}}+\Lambda \dot{e_{sys}})+T(\dot{q_{des}}+\Lambda e_{sys})+G+F\) in eq. (11).

Now we will utilize neural network with MPL to approximate this f unknown function. For the \(i^{th}\) link, RBF network [51] is defined as \(f_i=w_i^Th_i(x_i)+\varepsilon _i\) where \(x_i=[e_{sys_{i}} \, \dot{e_{sys_{i}}} \, q_{des_{i}} \, \dot{q_{des_{i}}} \, \ddot{q_{des_{i}}}]\) are inputs to RBF network, \(\varepsilon _i\) is the approximation error and \(w_i\) is weight. Define minimum parameter \(M= max_{1\le i \le n}{\{\parallel w_i \parallel ^2}\}\) where M is a positive constant,\(M_{est}\) is an estimation of M, so \(\overset{\sim }{M}\ = M_{est}-M\). Here \(W=[w_1,w_2....w_n]^T\) and \(H=[h_1,h_2....h_n]^T\). According to GL operator we have, \(W \circ H = [w_1^Th_1,h_2....h_n]^T\) Define minimum parameter \(M= max_{1\le i \le n}{\{\parallel w_i \parallel ^2}\}\) where M is a positive constant,\(M_{est}\) is an estimation of M, so \(\overset{\sim }{M}\ = M_{est}-M\). Here \(W=[w_1,w_2....w_n]^T\) and \(H=[h_1,h_2....h_n]^T\). According to GL operator we have, \(W \circ H = [w_1^Th_1,w_2^Th_2....w_n^Th_n]^T\), so f can be written as \(f=W\circ H+\varepsilon\). Therefore, the control law is:

$$\begin{aligned} \tau =\frac{1}{2}M_{est}s \circ (H \circ H)+R_vs-v-\tau _{os} \end{aligned}$$
(12)

where, v is the term to minimize approximation error \(\varepsilon\) and disturbance, \(R_v\) is a positive symmetric matrix. Including \(\tau _{os}\) is the torque obtained from OpenSim which provides better trajectory tracking and increases performance of the system.

Fig. 4
figure 4

Control structure of adaptive sliding RBF network

The term v is expressed as:

$$\begin{aligned} v=-(\varepsilon _N +b_d)sgn(s) \end{aligned}$$
(13)

where, \(\parallel \tau _d \parallel \le b_d\). The system is stable by using Lyapunov function [52] as follows:

$$\begin{aligned} Y=\frac{1}{2}s^TIs+\frac{1}{2l}{\overset{\sim }{M}}^2 \,\,\, where\, l>0 \end{aligned}$$
(14)

Then adaptive law is given as:

$$\begin{aligned} {\dot{M}}_{est}=\frac{l}{2}\Sigma _{i=1}^ns_i^2\parallel h_i\parallel ^2 \end{aligned}$$
(15)

4.2 Adaptive SMC based on fuzzy system with MPL

This section discusses the use of minimum parameter learning for designing of adaptive SMC with fuzzy method illustrated in Fig. 5. The dynamics of the 2-link manipulator for the system will be identical to eq. (5). The sliding mode function s will be calculated using eq. (7) with notations having similar meaning mentioned above. Similarly, here the unknown parameter f which is expressed as \(f = I(\ddot{q_{des}}+\Lambda \dot{e_{sys}})+T(\dot{q_{des}}+\Lambda e_{sys})+G+F\) in eq. (11) need to be calculated. The fuzzy system approximates unknown function f. The output of the proposed system is as follows:

$$\begin{aligned} f_{est}= \theta _f^T\xi (x) \end{aligned}$$
(16)

where, x represents input to the system,\(\theta _f\) belong to the set of fuzzy rules vector and \(\xi (x)\) is the fuzzy vector.

Fig. 5
figure 5

Control structure of adaptive sliding fuzzy system

The optimal parameter P is evaluated using the following equation:

$$\begin{aligned} P= arg\, \underset{\theta _f \in \theta }{\min }[sup|f_{est}-f|] \end{aligned}$$
(17)

So the unknown function can be calculated as:

$$\begin{aligned} f= P^T\xi (x)+\varepsilon \end{aligned}$$
(18)

where, \(\varepsilon\) is the approximation error and disturbances. Using minimum parameter learning define \(M=\parallel \theta ^*_f \parallel ^2\) where M is a positive constant and \(M_{est}\) is an estimation of M.The control law for the proposed system is:

$$\begin{aligned} \tau =-\frac{1}{2}sM_{est}\xi ^T\xi +\ddot{x_{des}}-\Lambda \dot{e_{sys}}-\eta sgn(s)-\mu s-\tau _{os} \end{aligned}$$
(19)

where,\(\eta \ge \varepsilon _N+\tau _d, \mu >0\). The Lyapunov function [53, 54] for stability is mentioned as follows :

$$\begin{aligned} L=\frac{1}{2}s^2+\frac{1}{2l}\overset{\sim }{M} \end{aligned}$$
(20)

where,\(\overset{\sim }{M}=M_{est}-M,l>0\). Then adaptive law is:

$$\begin{aligned} {\dot{M}}_{est}= \frac{l}{2}s^2\xi ^T\xi -\kappa l M_{est} \end{aligned}$$
(21)

where, \(\kappa >0\).

5 Simulation results

The proposed work was executed on computer system with i8 8700U processor with 12.0 GB RAM. OpenSim 4.2 software supported by Windows 10 operating system with 2GB memory and 1GB hard disk space was used to perform dynamic simulations on musculoskeletal models. The simulation results were performed on Matlab-Simulink R2022a software. The motion capture system with affixed marker points and force measuring platform have been utilized to capture the gait data. The proposed work has been implemented on the data-set available by Yu et al. [10]. The data-set contains the force file and position file which is then applied on musculoskeletal model in OpenSim to calculate joint angles and torque values using inverse kinematics and inverse dynamics tool. For the implementation of the 2-link lower limb exoskeleton the selection of the parameters values is significant for the performance of the system.

Fig. 6
figure 6

Membership function for \(x_i\)

For the Adaptive SMC-RBF manipulator with minimum learning technique, the initial parameters of weight matrix of the RBF network can be -1.5,-1,0,1 and 1.5. The input to the network is \(x=[e_{sys} \, \dot{e_{sys}} \, q_{des} \, \dot{q_{des}} \, \ddot{q_{des}}]\). The control law and adaptive law adapted for this system is mentioned in equation (12) and equation (15) respectively. The parameter chosen for the mentioned controller are as follows: \(l=500, b_d=0.20,\varepsilon _N=0.50 \, and \, \Lambda =dig[50,50]\).

Similarly for the fuzzy adaptive SMC with MPL technique the membership function is given as follows:

$$\begin{aligned} \mu _{A^l_i}(x_i)= \exp (-(\frac{x_i-\overline{x_i}^l}{\pi / 24})^2) \end{aligned}$$
(22)

where, x represents input, \(\overline{x_i}^l\) are \(-\pi /6,-\pi /12, 0, \pi /12 \, and \, \pi /6\), respectively, for i=1 to 5 and \(A^l_i\) is the fuzzy set including NB, NS, ZO, PS, PB belong to \(l^{th}\) fuzzy rule. Figure 6 shows the membership function curves. The other parameters of the controller are defined as follows: \(\eta =1.1, \mu =10 \, and \, l=500\) respectively. The control law is defined in equation (19) and adaptive law in equation (21) for the mentioned controller. The simulation results are shown in Figs. 7, 8, 9, 10, 11, 12, 13 and 14. The Fig. 7a and b shows the tracking for joint angles and tracking error for joint angles for hip and knee joint considering the torque obtained from OpenSim. The speed and control input for the same are shown in Fig. 8a and b respectively.

Fig. 7
figure 7

Adaptive SMC-RBF with OpenSim

Fig. 8
figure 8

Adaptive SMC-RBF with OpenSim

Similarly, Figs. 9a and b, 10a and b shows the position tracking, position tracking error, speed and control torque for two joints using adaptive sliding mode function with RBF network but without including OpenSim feature. From the mentioned figures it is clearly visible that the tracking error is more stable with less fluctuations in the controller that utilized the musculoskeletal software.

Fig. 9
figure 9

Adaptive SMC-RBF without OpenSim

Fig. 10
figure 10

Adaptive SMC-RBF without OpenSim

The simulation results obtained for controller designed by adaptive fuzzy sliding mode control are shown in Figs. 11, 12, 13 and 14 with and without OpenSim respectively.

Fig. 11
figure 11

Adaptive Fuzzy-SMC with OpenSim

Fig. 12
figure 12

Adaptive Fuzzy-SMC with OpenSim

From the Figs. 714 it is observed that the error tracking rate for the controllers designed with OpenSim is less as compared with controllers designed without OpenSim. The position angles obtained are more stable and has a better tracking rate. So the torque obtained from the OpenSim helps in compensating the error as the musculoskeletal taken in these software are designed taken into consideration the actual physical dimension of the experimental subject. The results show the robustness of the adaptive law and control law with reduced chattering problem and faster convergence of the system. The control system accuracy and sensitivity is measured in terms of a parameter known as performance index [55].

Fig. 13
figure 13

Adaptive Fuzzy-SMC without OpenSim

Fig. 14
figure 14

Adaptive Fuzzy-SMC without OpenSim

The performance index is used to compare between different controller designs in stability analysis. The different performance index parameters used in comparative analysis are Integral Absolute Error (IAE), Integral Square Error (ISE), Integral Time Absolute Error (ITAE) and Integral Time Square Error (ITSE).

Table 2 Comparative study of proposed work with previous study with minimum error values entries shown in boldface for all performance index

The minimum error values are marked in bold in Table 2. From Table 2 it is observed that the proposed work showed better results than the [10] in both the cases that is using and without using OpenSim. From the table it can also be concluded that adaptive SMC-RBF performs best among all methods when the software is not used. But using the musculoskeletal software increases the overall efficiency of the controller by making the system more stable and reliable for the patients for rehabilitation purpose. And still the Adaptive SMC-RBF gives minimum values in all the performance parameters in presence of OpenSim. This proves the proposed technique is superior among the techniques used and results can be used for several advantages for rehabilitation purposes.

6 Conclusion

The paper presents a novel approach to design a 2-link manipulator for rehabilitation systems for lower limb in presence of unknown dynamics, uncertainties and disturbances. The musculoskeletal software that is OpenSim is first utilized to obtain the joint angle and torque values in accordance with the physical characteristics of the subject. This process of scaling the model to subject physical dimension increases the efficiency of the system. The results obtained were then applied to the controller and verified it on Simulink. The error tracking for knee and hip joint positions obtained from PD controller, adaptive SMC using RBF network and fuzzy system shows that RBF system performs better than other methods. The minimum learning parameter technique also reduced the computational cost and increased the real time performance of the controller.

Though the intersection of musculoskeletal modelling and trajectory tracking control system has produced with desired results but still improvements can be made in the areas of human machine interaction. In future the proposed control strategy will be implemented on hardware and investigation of the differences which occur in physical and simulated environments will be performed. This integration will further lead to optimal utilization of resources and greater energy savings. As a future scope, a cost effective synchronized limbs can be developed for the better human lower limb rehabilitation therapy.