Multi-Lateral Teleoperation Based on Multi-Agent Framework: Application to Simultaneous Training and Therapy in Telerehabilitation

In this paper, a new scheme for multi-lateral remote rehabilitation is proposed. There exist one therapist, one patient, and several trainees, who are participating in the process of telerehabilitation (TR) in this scheme. This kind of strategy helps the therapist to facilitate the neurorehabilitation remotely. Thus, the patients can stay in their homes, resulting in safer and less expensive costs. Meanwhile, several trainees in medical education centers can be trained by participating partially in the rehabilitation process. The trainees participate in a “hands-on” manner; so, they feel like they are rehabilitating the patient directly. For implementing such a scheme, a novel theoretical method is proposed using the power of multi-agent systems (MAS) theory into the multi-lateral teleoperation, based on the self-intelligence in the MAS. In the previous related works, changing the number of participants in the multi-lateral teleoperation tasks required redesigning the controllers; while, in this paper using both of the decentralized control and the self-intelligence of the MAS, avoids the need for redesigning the controller in the proposed structure. Moreover, in this research, uncertainties in the operators' dynamics, as well as time-varying delays in the communication channels, are taken into account. It is shown that the proposed structure has two tuning matrices (L and D) that can be used for different scenarios of multi-lateral teleoperation. By choosing proper tuning matrices, many related works about the multi-lateral teleoperation/telerehabilitation process can be implemented. In the final section of the paper, several scenarios were introduced to achieve “Simultaneous Training and Therapy” in TR and are implemented with the proposed structure. The results confirmed the stability and performance of the proposed framework.


INTRODUCTION
Telerehabilitation (TR) can be regarded as a telemedicine branch. While this field is considerably new, it is used in developed countries and has expanded rapidly. Patients living in remote areas where conventional rehabilitation services may not be readily available, will benefit from this technology. TR technologies are open to the patient with existing devices, such as laptops or mobile phones. In such methods, video calls, web-based and mobile apps can be used as well (Bostrom et al., 2020). TR typically lowers the costs of both healthcare services and patients compared to conventional inpatient or individual-to-person rehabilitation. Few studies have been conducted on the economic aspects of TR in which the cost of hospitalization in clinics is significantly reduced (Peretti et al., 2017;Schröder et al., 2019). TR is mainly applied to the physiotherapy process, and neural rehabilitation is used to monitor the rehabilitation process of stroke patients (Gal et al., 2015;Mani et al., 2017). The TR process is also performed with neuro-rehabilitative techniques, such as telemonitoring of cardiovascular parameters including oxygen saturation, ECG, and blood pressure for patients with heart disease (Tousignant et al., 2019). These techniques belong to another branch of telemedicine called telemonitoring, which has significantly expanded in recent years (Batalik et al., 2020). TR for regular training sessions can be accomplished several times in the week as oppose to clinical rehabilitation, which is usually done once or twice a week. TR can also be done individually or in groups (Rogante et al., 2015). These groups include a large number of patient, trainees, and therapists (Sharifi et al., 2017). Interactive tools, such as gamification can increase motivation while the training/therapy process is in progress. Also, TR, if done at home, can support more frequent exercises both in terms of numbers in the week and duration length (Peretti et al., 2017). Furthermore, TR can be delivered with haptic-enabled robotic manipulators in which the patient can interact directly with them. Therefore, the TR process can be performed in virtual reality, while the rehabilitation for neurological conditions is done using robots and gamification (Larson et al., 2014). Also, due to the presence of position and force sensors in the haptic-enabled devices, the progress of a patient's treatment can be shown numerically and on a graph (Schröder et al., 2019).
The specific idea of the proposed TR methods in this paper, came to the minds of the authors after frequent presence in physiotherapy clinics, observing the rehabilitation process, observing the training of trainees, and consulting with physiotherapists. For the implementation of the idea, the project was divided into three phases. In the first phase, the controller should be designed to involve several robots in the rehabilitation process, and to study its feasibility on non-homogeneous and conventional manipulators for the teleoperation process. In the second phase, dedicated manipulators will be built for rehabilitation operations, and the results of the first phase will be studied on it. In the third phase, the products of the previous phases will be tested in the clinic and on real patients. This article will cover the first phase of our TR project, and the rest of the phases will be reported in separate articles. So, in this paper, the concept of collaborative teleoperation and its usage in TR will be extended. All the participants in the experiments of this article are students and non-patients. In the continuation of this introduction, the available researches in the teleoperation and, the advances in robotic rehabilitation that have been made in this field, will be discussed.
Recently, teleoperation frameworks have incredibly extended human control capacities in critical or dangerous situations (Ferre et al., 2007). Up until this point, many propelled control schemes have been accounted for teleoperation frameworks (e.g., Nuño et al., 2009Nuño et al., , 2011Chan et al., 2016;Jafari and Spong, 2017) to give some examples, where a large portion of the previously mentioned examinations concern the control of single-master, single-slave setups. Given that numerous viable assignments cannot be finished by only a single robot. For example, conveying a heavy or delicate thing needs more than one manipulators to do more precise tasks. Another vital concern is the method by which to teleoperate various slave robots in a cooperative configuration. Presently, an everincreasing number of researches have been committed to this field (Mohajerpoor et al., 2013;Zhai and Xia, 2016), which for the most part, incorporates single-master multi-slave and multimaster multi-slave arrangements (Khademian and Hashtrudi-Zaad, 2013;Zhai and Xia, 2016). Moreover, the multilateral cooperative teleoperation framework has quickly risen in numerous conceivable applications that range from industrial assembly tasks to material handling in perilous situations and afterward to TR tasks for neurological lesions.
A stroke and spinal cord injuries are two principal purposes behind neurological lesions. Since 2008, just in the US, adding up to the cost of stroke is 34.3 billion dollars, and in 2016 it was estimated to be 69.1 billion dollars (Writing et al., 2016). In the light of the results of experiments, frequent movement repetition challenges regular physiotherapeutic methods for the motor rehabilitation of the central paretic forearm in the way that early starting of dynamic developments has a superior result than decreasing spasticity in the recovery of patients (French et al., 2016). This means task-oriented repetitive movements have a direct positive effect on muscle strength enhancement and development in neurologically injured patients. Robotics and automation technology are capable of assisting and enhancing rehabilitation by acquiring a high number of moves in repetition (Atashzar et al., 2017).
The traditional physiotherapy has several limitations with respect to the manually-assisted therapy criteria. In traditional physiotherapy, it is complicated to teach a trainee. Also, evaluating the trainee's performance is laborious and time-consuming. Training consistency is tied to therapist experience and performance. Unlike conventional methods, the rehabilitation procedure can be automated by implementing robotic devices, which increases device training sessions and process duration. As mentioned earlier, robotics therapy can be a practical and highly motivational context for virtual reality applications, and therefore treatment can achieve better results (Nef et al., 2016).
There are typically two types of rehabilitation robots, the first is the robots mounted on the end-effector, and the second is the exoskeletons. Exoskeletons have a resemblance to human anatomy and could be actuated by specific methods, whereas robots with end-effectors could be in any configuration. There is some kind of upper-extremity rehabilitation of exoskeleton robots like MAHI Exo-II, ETS-MARS, and CADEN-7 and some form of end-effector like MIT-MANUS and MIME (Krebs et al., 1998;Pehlivan et al., 2012;Niyetkaliyev et al., 2017;Brahmi et al., 2019;McDonald et al., 2020).
A major problem in multi-lateral teleoperation systems occurs when the number of robots involved in the interactions is increased. In this situation, the control design and stability analysis problems may become more challenging. The selfintelligence that exist between multiple agents interacting with each other in a MAS can be a key to solve the mentioned problem.
A multi-agent system consists of agents who can interact with their neighbors while making decisions. The shared information between the agents will help them together achieve the desired objective. The goal could be synchronization, coverage, or consensus Wang et al., 2017;Wen et al., 2017;Xiang et al., 2017). One of the fundamental goals in multiagent systems is synchronization, which means an agreement between agents over a target given the network's limitations (Peng et al., 2014;Sun, 2016). Consequently, the concept of remote multi-lateral TR based on MAS synchronization was previously introduced in Sharifi et al. (2016). It has been shown that the issue of bilateral teleoperation can be viewed as a problem of synchronization, in which the MAS synchronizes the operators' forces and positions. Although, the similar concept was defined in Spong and Chopra (2007) and Abdessameud and Tayebi (2011), it was considered that the dynamics of manipulators are Lagrangian without the effects of exerted external force. However, in TR systems, the concept of external force (operator forces) is not ignorable.
Based on these facts, in this paper, a new control scheme based on MAS is developed for several rehabilitation scenarios, that can deal with non-linear uncertain manipulators. Moreover, the scheme has the ability to design a desired hand force for each operator, which helps deal with training and therapy, concurrently. This new methodology is called "simultaneous training and therapy." Additionally, the concept of decentralized controllers is introduced for multi-lateral teleoperation systems. Through decentralized control, the reliability of the systems increases while the number of communication links decreases (Hou et al., 2009;Hernández-Méndez et al., 2016). Because of the self-intelligence feature in the MAS, the delay does not distribute between agents synergistically (Cao et al., 2013). Furthermore, time-varying delays in communication links are considered in the current work, which allows the implementation of a multi-lateral teleoperation system through the internet or other communication networks (Chopra et al., 2003;Wu et al., 2017). The structure of a dual-user teleoperation system with a shared environment is one of the most popular structure in multilateral teleoperation systems in recent years (Khademian and Hashtrudi-Zaad, 2012;Li et al., 2015;Shamaei et al., 2015;Hashemzadeh et al., 2016). The authority sharing structures in those papers can be regarded as a special case of the current research by applying matrices D, L, and P ≥ 0 that are investigated in section 6.
The remainder of the paper is organized as follows. Section 2, presents mathematical preliminaries concerning, the MAS, properties of serial link manipulators and multi-lateral teleoperation systems. Moreover, it introduces correspondence between the MAS, and multi-lateral teleoperation systems. Section 3 presents a new centralized controller for a multilateral teleoperation system. Throughout section 5, the controller is strengthened with a passivity-based adaptive control scheme in the presence of uncertainty in both of the environment and the operator. Afterward, in section 5, the decentralized controller based on the intelligence of a multi-agent framework is introduced to solve the problem of time-varying in communication networks while minimizing the number of communication links. Section 6 shows the relevance of the proposed method and the similar existing methods for multilateral teleoperation/telerehabilitation, such as "teach and repeat" and "assist as needed" (Staubli et al., 2009;Babaiasl et al., 2016;Luo et al., 2019). Moreover, it proposes novel schemes for multi-lateral remote rehabilitation systems and experimentally investigates them. Finally, section 7 discusses the conclusions and future works.

MATHEMATICAL PRELIMINARIES
A brief introduction about the terms and expressions used in the proposed structure is presented in this section. The first subsection relates to MAS, and the second subsection explores the serial link manipulators. Afterward, the third subsection presents the terms and equations for multi-lateral teleoperation systems. Lastly, in the fourth subsection, the multi-lateral teleoperation approach based on the MAS is implemented.

MAS Framework
The theory of graphs is a powerful tool to study MAS and its behaviors. An undirected G graph on the vertex set V = 1, 2, . . . , N contains V and a set of unordered pairs E = {(i, j) : i, j ∈ V} which are called the edges of G. Two vertices are called adjacent, if there is a line between them.
Consider a system consisting of N agents. The position of the ith agent is denoted by x i for i = 1, . . . , N. Considering the N agents as the vertices in V, the relationships between the N agents can be explained by a simple and undirected graph G.
The weighted adjacency matrix A = [α ij ] ∈ R n×n for the graph G is denoted such that α ij = 0 if there exists no input from the jth agent to ith agent; otherwise, α ij = 0.
The degree matrix D = diag{d 1 , d 2 , . . . , d N } ∈ R N×N is a diagonal matrix, where diagonal elements are d i = N j=1 α ij for i = 1, . . . , N. Then, the weighted graph's Laplacian matrix is defined as L = D − A. If there is a path between any two vertices, a directed graph is connected.
The latter remark points to a fundamental matter, which is the existence of a connected graph. This principle is instrumental in our proofs of stability as well as experimentations in section 6, for the Laplacian matrix (L).

Serial Link Manipulator Properties
Some properties of serial link manipulators, which can be found in Sciavicco and Siciliano (2012) are written in this subsection. The robot that interacts with the slave(s) and master(s) in teleoperation systems is regarded as n-DOF serial links with totally revolute joints. The related non-linear dynamics of these robots can be defined as follows.
,q i (t) ∈ R n×n , and g q i (t) ∈ R n×1 are inertia matrix, Coriolis/centrifugal matrix, and gravitational vector, respectively. In addition, q i ,q i , andq i ∈ R n×1 for i = 1, 2, . . . , N are the joint angle, angular velocities, and angular accelerations of the ith robot (Sharifi et al., 2011). If the ith robot is interacting directly with the human, then τ ext i = −τ hi (torque applied by the operator of ith robot). If the one is interacting with the environment, then τ ext i = τ ei (torque applied by the ith environment). Finally, τ c i ∈ R n×1 are control torques for the master and slave robots.
Property 1. For manipulators with totally revolute joints, the Coriolis/centrifugal terms are bounded, and the form of the bounds are as follows The fact can easily be generalized to the augmented equation that diagonally puts the C i (q i , x)y matrices for i = 1, . . . , N together, like the one in (4), that is and C is a diagonal matrix and is defined as C = diag C 1 (q 1 , x 1 ), C 2 (q 2 , x 2 ), . . . , C N (q N , x N ) .
Property 2. The relationship between the Coriolis/centrifugal and the inertia matrix for a serial manipulator isṀ i (q i )q i − 2C i (q i ,q i ) is a skew symmetric matrix; in other words, Property 3. The inertia matrix M(q) is symmetric positive-definite for a manipulator with revolute joints, and has the following upper and lower bounds: where λ i denotes the ith eigenvalue of a matrix, and I ∈ R n×n is the identity matrix. Furthermore, the derivative of the inverse of a matrix can be calculated as: Property 4. The dynamics of the manipulator, written in (1) equation, can be parameterized linearly as in which, the matrix Yi is the regressor matrix including known robot signals, and θ i (q i ,q i ) is the vector of unknown robot parameters (Cheah et al., 2006). τ h i is the torque applied by the operator of the ith robot, and τ c i ∈ R n×1 is the control torque of the ith robot.
Assumption 1. (Deng, 2014) Based on the passivity assumption of human operators and the environment, there are positive constants κ i such that for the ith operator, the passivity relation is Summing the above equations for i = 1, . . . , N and rewriting in matrix form we have

Some Definitions in Multi-Lateral Teleoperation Systems
In the following, some definitions that are useful for the rest of the paper are addressed.
Definition 1. Shared Environment is a virtual collaborative environment that brings together users who are geographically distributed but connected via a network.
Definition 2. Assistive/Resistive Rehabilitation: Assistive Rehabilitation provides an assistant force for the users to complete the target movement. Conversely, Resistive Rehabilitation provides a resistant force against the movement. The proposed system in this paper, can provide the both phases, meaning that it can either help the user's movement in the target direction in assistive phase or constrain the direction of the user's movements, preventing deviations from the target trajectory in the resistive phase (Brewer et al., 2007).
Definition 3. The term Transparency refers to the fact that if the operators feel they are directly interacting with the remote task, the teleoperation system would be completely transparent. Meaning that the operator's position (X m ) can be exerted on the remote task while he/she simultaneously feels the force of the environment (F s ).
Definition 4. The term Hierarchical Teleoperation can be defined as an attempt to handle the problem of cooperative multi-lateral teleoperation systems by decomposing the problem of teleoperation into smaller subproblems and reassembling their Frontiers in Robotics and AI | www.frontiersin.org solutions into a hierarchical structure. In this structure, the operators located in an upper layer command the weighted average of their forces/positions to the lower layer, and get the desired forces/positions from the operators in the lower layers.
In this structure, the operators (agents) at the master or slave sides may not connect directly together and can get/share the information indirectly from/to other operators via an intermediate operator.
Definition 5. Multi-lateral Teleoperation system is the system in which multiple robots interact with each other to perform a remote task in shared environments. So, these robots can manipulate an object in the shared virtual environment through an intervening tool or directly. In the multi-lateral teleoperation system, the information can flow between all sites. Depending on the number of channels used in the control architecture, this information can include position and/or force information. A multi-lateral teleoperation system comprises multiple robots as haptic interfaces for multiple operators.
Definition 6. The force sensed by the hand of the operator, in the teleoperation process is called Sensed Force in this literature. It is equal to τ ext i in (1).

Using MAS Framework for Multi-Lateral Teleoperation
In this subsection, a correspondence (mapping) between the multi-lateral teleoperation systems and MAS will be constituted. Due to this correspondence, the following consideration should be taken.
All the master robots in the teleoperation system are considered as leaders in the MAS, and all the slave robots are assumed as followers. Hence, the structure of cooperative teleoperation can be considered as the leader-follower scheme in the MAS. In addition, the masters' and slaves' positions must track each other. This objective is similar to the convergence of the positions of the agents in the MAS. Moreover, any latency in the communication channels is regarded as delays of the agent to agent connections in the MAS. One property of MAS is the synchronization, meaning that despite the limited connectivity between the neighbors the tracking objective is done if the spanning tree exists (Zuo et al., 2016). Based on this fact, in the proposed method, the tracking of positions in a multi-lateral teleoperation system is shown to be possible as long as the spanning tree still exists, even if some connections in the network are broken.
A graph of multi-agent system with network topology G is considered. In this topology, if the agent i cannot receive any information from agent j, then α ij in the adjacency matrix will be chosen as zeros; otherwise, it will be a positive scalar related to the connection weight. The index of α ij shows the value of connection weight from the jth agent to the ith agent. Theses values can be regarded as the "performance" or "interference" index in the related studies like Rohrer et al. (2002).
In this study, the position error for the ith agents is defined as e i (t) = j∈N i α ij q i (t) − q j (t) , and the torque effort for ith manipulator should contain the following terms as a function of position error: wherep i ≥ 0 is a weight scalar. In section 3 it will be shown that the use of (3) as part of the control effort, helps to make the multilateral teleoperation system transparent.
Remark 3. The term Centralized Controller refers to the original multi-variable controller, which is located in the main computer (consisting of the interacting local controllers), while the term Decentralized Controller refers to a set of controllers inside each individual operator, which can communicate with each other with a reduced number of interconnection links. Consequently, using decentralized controllers may help the stability and connectivity of the system even if some certain commutation links in the system are lost. Moreover, in the decentralized controller scheme, each part (agent) has its own local controller that helps the system's reliability.

MULTI-LATERAL TELEOPERATION BASED ON CENTRALIZED CONTROLLER
For a multi-lateral teleoperation system, a new centralized controller based on centralized MAS is introduced in this section. So, this section is a reference for the next section about the MAS-based decentralized controllers. Consider the non-linear dynamic equation given as (1) for the n-DOF manipulator robots. The N robots (agents) equation can be augmented together, based on the following definitions, Property 5. It is easy to show that Property 2 can be generalized to the augmented dynamics of the operators in (4). The augmented version of Property 2 is Remark 4. Consider the matrixP = diag{p 1 , . . . ,p N } and the following equation: Frontiers in Robotics and AI | www.frontiersin.org So, the following equation can directly be shown, based on the Kronecker product properties: It is also straightforward to show that if a positive definite P is chosen, thenP will be positive definite, too.
The controller's augmented position error is described as: which is the position errors for the ith agent and its neighbors. The controller is designed as in whichτ c i (t) is defined as (3). The augmented form ofτ c i (t) and τ c i (t) is as follows: where Ŵ is the positive-definite damping factor of the system and is a positive definite matrix which can be chosen as The idea of the centralized controller is depicted in Figure 1. Accordingly, the closed-loop equation of the system would results as follows In the following part, the first result of the suggested controller is presented as a theorem.
Theorem 1. If the augmented controller (8) is exerted on the multi-lateral teleoperation system (4), and considering the assumption 1, then the vectors of augmented joint velocity and accelerationQ(t),Q(t) and the augmented joint position error E(t) will remain bounded for α ij ≥ 0.
Proof: Consider the Lyapunov candidate as the following scalar functionals: Subsequently, ..
Using Equation (14), and property 1 and 3, it is easy to show thatQ(t) is bounded, too, which completes the proof.
Remark 5. It is easy to see from (10) that, at the steady-state e.g.,Q(t),Q(t) ≃ 0 , the sensed force is as follows: The above-mentioned fact is utilized in section 6.
Corollary 1. In the multi-lateral teleoperation system with the same conditions as in Theorem 1 and working in free motion, i.e., τ h i (t) = 0 for i = 1, . . . , N (or equivalently T Ext (t) = 0), and the other assumptions as in Theorem 1, the absolute values of the position errors (|e i (t)|) and the joint velocities (|q i (t)|) asymptotically converge to zero.
Proof: Integrating (12), and noting that V(Q(t)) ≥ 0 in relation (11), results in . So,Q ∈ L 2 , which yields inq i (t) ∈ L 2 , ∀i ∈ {1, . . . , N}. Furthermore, with a lower-bounded decreasing function V(Q(t)), it is concluded that   (8) and sends its associated part to each individual block (i.e., {T C1 , . . . , T CN }). As a drawback of the centralized controller, it is clear that if the centralized controller is damaged, the whole system will fail.
Consequently, the operators' sensed forces asymptotically converge to zero. Remark 6. In Theorem 1 and Corollary 1, it was shown that by certain control efforts, the position errors could be reduced. On the other hand, by Remark 5 the hands' sensed force of the operators can be adjusted in the steady-state. So, the transparency of the system defined in Definition 3 can be achieved.

UNCERTAIN DYNAMICS IN THE ENVIRONMENT AND THE MANIPULATORS
Uncertainty in the dynamics of the manipulators is discussed in this section. Consider the augmented dynamics of the manipulators as before mentioned: The controller T C (t) is now defined as whileT C (t) is defined as The adaptation law is regarded aṡ in which is positive definite matrix. We can re-write the controller (19) as The symbol ± means that Y is added and subtracted to and from the equation. Subsequently, using the controller (19), we can re-arrange the closed-loop dynamics of the system (18) as Therefore, the parameter R(t) is chosen based on (22) as R(t) is inherently a low-pass filter. So, this filter can be considered as follows meaning that Assumption 2. The human operators' hand force follows the below equation in which R is as defined in (24) and Frontiers in Robotics and AI | www.frontiersin.org Moreover, it is assumed that every element of κ 0 and κ 1 are bounded. Furthermore, note that κ 0 (t) can be argued as a pure muscular force of the operators' hand, which is obviously bounded.
Theorem 2. By Assumption 2 on the operators hand force, in the multi-lateral teleoperation system with the uncertain augmented dynamics (18), and the controllers (19), (21), (23), and (25) with damping coefficient Ŵ as a positive-definite matrix and α ij ≥ 0, the augmented joint position error E(t) will ultimately remain bounded.
Proof: Consider the following Lyapunov functionals The summation of V i s are as Then, we havė Using (24) inside V 4 (t), we have, So, the result ofV(t) would be as follows, by using Assumption 2, the result can be written aṡ Using the fact that = K + κ 1 is positive definite and symmetric, This figure shows a multi-variable filter made of the passive filter. The division sign (forward slash) means that the left matrix is multiplied by the inverse of the right matrix.
On the other hand, if we choose as follows then, outside the closed set ,V(t) is negative or zero. Therefore, E(t),˜ (t), and R(t) are UUB. Considering the closed-loop dynamic (22), the fact R(t),˜ (t), and E(t), κ 0 ∈ L ∞ , and it is concluded thatṘ(t) ∈ L ∞ . Moreover, from (24) it is concluded thaṫ So, using the fact thatQ,Ṙ(t) ∈ L ∞ , it is easy to show thaẗ Q ∈ L ∞ , which completes the proof.
Remark 7. Non-Passive Operators: If Assumption 2 holds and if the parameters κ 0 or κ 1 are negative; in other words, the operators are not passive, then the system is stable if K + κ 1 still remain positive. According to non-passivity of the operators, the value of κ 0 (t) and κ 1 may be negative (Chopra et al., 2008).
Assumption 3. Pre-filtered passivity: A condition can be defined on the passivity filter as follows This condition is similar to assumption 1, however, the velocity signal is replaced with the pre-filtered passivity of the velocity signal as depicted in Figure 2 (Sharifi et al., 2017).
Theorem 3. Assuming that the operators and the environment are pre-filtered passive as defined in assumption 3, in the multi-lateral teleoperation system with the uncertain augmented dynamics (18), and the controllers (19), (23), and (25), beside adaptation law (21), the augmented joint position error E(t) goes to zero asymptotically. Proof: Consider the following Lyapunov functionals as in (26) in addition to V 4 (t) defined in the following The Lyapunov function can be achieved by adding V i (t) where i ∈ 1, .., 4 as (30) Moreover,V Consequently,˜ (t), E(t), and R(t) ∈ L ∞ . So, from (23),Q(t) ∈ L ∞ . Considering L T ⊗ I n×n P = ϒ and integrating (32), we have Given 0 ≤ λ min (K)I ≤ K and 0 ≤ λ min (ϒ)I ≤ ϒ, it can be concluded that Thus, R(t) and E(t) ∈ L 2 . Therefore, based on Barbalat's Lemma, the parameter E(t) converge to zero asymptotically.

DECENTRALIZED CONTROLLER FOR UNCERTAIN SYSTEMS IN PRESENCE OF VARYING TIME DELAY
In this section, the intelligence of each agent in the MAS is utilized in the concept of multi-lateral teleoperation systems, which were introduced in previous sections. Each operator works as an agent in MAS, and the local controller on each operator helps to synchronize positions and forces in the overall network based on Definition 3. These local controllers help to minimize the connection links, while minimizing the defective effects of varying time delays. There is no need to have a full connection between operators to set the multi-lateral teleoperation system (Figure 3). The only thing to have full control over the system is to have a spanning tree in the graph of the system (Su and Lin, 2016).
Moreover, it is shown in the rest part of this section that the proposed local controller can overcome uncertainty in the environment and the operator, while having time communication delays. unknown, while its derivative should be bounded with a known upper-bound ψ ofτ ji (t), i.e.,τ ji (t) < ψ (33) Because of the causality of the delay, the derivative of the delay is considered to be less than unity, i.e., ψ ≤ 1.
The non-linear uncertain dynamics of the ith operator are as follows, Note that, the parameters q i ,q i ,q i , τ h i , τ c i are functions of time; however, for the sake of simplicity, the time parameter (t) is not written. In this part, because of time delays, the simple form of the augmented system (4) is not usable. So, the equation of each agent is written separately and integrated together. Moreover, the control law is chosen as in which Note that j∈N i α ji ≤ N. Furthermore,τ c i is chosen as in which r j (t − τ ji (t)) is received from the jth operator and γ i is the ith element of the vector γ , which is the left eigen-vector of the Laplacian matrix according to zero eigenvalue of Laplacian matrix (see Remark 2). So, the controller is consisted of two parts, the local controller [θ i (q i ,q i )Y i (t) − k i r i (t)] and the multiagent part (τ c i ). In addition r i (t) and υ i (t) are intermediate variables and are defined as r i (t) = q i (t) − υ i (t) and υ i (t) = −λe i (t). Hence, consequently, (38) is a passive filter, containing the encoded data about the force/position errors. So, the closed loop system becomes or, equivalently: Furthermore, the adaptation law is considered as follows, in which, i is a positive definite matrix.
Theorem 4. Consider a group of multi-lateral teleoperation systems, consisting of N manipulators with n degrees of freedom, with dynamical Equation (34), and control inputs (35), (37), and (41) with assumptions (33) and (36), then the synchronization error converges to zero asymptotically.
Proof: Choosing the following Lyapunov candidate Equivalently, using (40) we havė It should be noted that, knowing that based on assumption 4, the upper-bound ofτ ji (t) is ψ. Now, by adding and subtracting the term, in inequality (43), the following inequality is obtained i∈N r T iτ c i Three notes are to be considered. First, the self delays of operators are negligible, i.e., τ ii ≃ 0. The second factor is that using Remark 2, 1 2 i∈N Substituting (44) in (42) and using the constraint (36), the Lyapunov derivative becomes: Therefore, based on Lyapunov theory, r i (t) asymptotically converge to zero, which completes the proof.

NOVEL DESIGN FOR SIMULTANEOUS TRAINING AND THERAPY IN TELEREHABILITATION TASKS
The main idea that led to the concept of "Simultaneous Training and Therapy, " came to the minds of the authors of this article after several attending the clinics and closely observing the trainees and the rehabilitating patients in the field. The main problem was the presence of a large number of trainees and their short training time. Therefore, the use of manipulators in the TR process for trainees, patients, and therapists can significantly reduce the cost of patients attending the clinic and the cost of one-to-one teaching for trainees as well as its duration time. Consequently, this is the most important section, and in fact the practical conclusion of this article, because it implements the main idea of the authors. To show the effectiveness of the proposed method in this article, various examples in the field of rehabilitation will be given along with practical experiments. Therefore, to show the effectiveness of the proposed method in the sections 4 and 5, utilizing the power of theoretical parts achieved, some novel designs in the simultaneous training and therapy for TR systems are proposed. Two tuning matrices L and D as Laplacian and Sensed Force, are used to implement such schemes. For Laplacian matrix L, it is enough to be connected, as mentioned in Remark 2. The tuning matrix D has a decisive role in the TR scenarios.
Based on the controllers in Theorems 1-3, we have the freedom to design multiple scenarios for the TR tasks. The primary item in this structure that gives the freedom, is the matrix D, which can be used in designing the remote rehabilitation structure. It has been shown that the controller guarantees the position synchronization. As described in Remark 5, by selecting a suitable matrix D, we can design the desired Sensed Forces at a steady-state as the following: the desired force is achieved, which is a function of operator position errors. Thus, the equation D = L T PL should be solved by choosing a proper positive (semi-)definite matrix P. However, it is already known from Remark 1, the Laplacian matrix is singular by its nature. Therefore, the following remark is to be noted.
Remark 8. Applying the Theorems 1-3, to ensure the stability of the system, the matrix P should be positive semi-definite. As stated in Remark 1, all of eigen-values associated to L are positive or zero. So, L is a positive semi-definite (Golub and Van Loan, 1996). Adding a small positive value to zero eigenvalue(s) of L retains the Laplacian matrix being positive definite. In addition, the desired force matrix (D) is chosen as a positive definite matrix. Therefore, P = L −T new DL −1 new would be positive semi-definite. The algorithm is depicted in Figure 4.
Thus, considering the algorithm in Figure 4, the matrix P will be calculated as follows: It is easy to verify that the leading principal minors of P are all positive, guaranteeing that the matrix P is positive definite in this example. More comparisons with similar existing frameworks are illustrated in Figure 5 at the end of the paper.
In addition, to implement the structure of the proposed method, the shared environment is used for all the experiments in this section. To implement the shared environment, the model of virtual manipulator, and impedance of the environment, a software called Unity3D © is used. Furthermore, the controller is implemented in Simulink Desktop Real-Time TM (Sahin et al., 2017), and it is connected to Unity3D © via the UDP protocol. The delays considered in the system for all of the experimentation are as in (45), which obviously satisfies Assumption 4. The participants in all of the experimentation are healthy people emulating the behavior of the therapist, patient, and trainees inside the virtual environment 1 . The proposed structure will be examined in the succeeding subsections for some novel rehabilitation scenarios.

Design and Control of Hierarchical Telerehabilitation Systems
The idea of the Hierarchical Telerehabilitation System (HTS) is similar to the idea of driving instruction in driving school. In the training cars, a dual pedal is placed under the instructor's feet, and the instructor can override the trainee's pedals, meaning that a hierarchy exists between the instructor and the trainee (Figure 6). The trainee cannot affect the pedal of the instructor, while the instructor can depress his/her pedal and override the trainee's pedal. This idea has been used for the HTS. However, in the HTS, three users participate in the process instead of two users, i.e., therapist, trainee, and patient. In this hierarchy, the therapist has the highest rank, and the patient has the lowest rank. So, the therapist can override the movements of the trainee and the patient. And, the trainee can override the movements of the patient.
On the other hand, the virtual environment interacts with the patient and put him/her in a predetermined path. So, the virtual environment can play a decisive role in this process. Many conventional rehabilitation therapies can be implemented using the HTS. Two of them are "teach and repeat therapy" and "assist as need therapy." For teach and repeat therapy, the virtual environment can be trained by an expert therapist's hand movements (record the movement task) in periodic tasks, e.g., moving on a circle or square. After the therapist leaves the process, the virtual environment repeats the therapist's hand movements. The virtual environment can also play the role of "assist as need therapy" (Staubli et al., 2009). It means that if the patient's movement is in the desired path, no extra force is exerted to the patient's hand. However, if the patient's movement error exceeds a specified limit, the virtual environment assists the patient's hand return to the desired path. This can be implemented easily by choosing the appropriate functions for matrix D.
To show the performance of the HTS, a practical scenario is proposed. Three operators consisting of a therapist (operator 3), a student/trainee (operator 2), and a patient (operator 1) are considered. These operators are working in a shared virtual environment (operator 4). In this experiment, operator 1 has the highest rank while the operator 4 has the lowest rank. Additionally, the robots considered for these experiments are non-homogeneous, including one Phantom Omni R and two Novint Falcons R , interacting with the Therapist, Trainee, and the Patient, respectively (Figure 7). The experimental parts are described in the Appendix. The desired matrix of the sensed force and the Laplacian matrix are selected for position synchronization as follows By looking at Laplacian matrix L it is easy to verify that the Remark 2 is satisfied. The third row of matrix D is totally zero, showing that the therapist's desired sensed force is not affected by other operators. The results of the experiments are shown in Figure 8. As depicted in the figures in the first phase, the positions of both the trainee and the patient follow the position of the therapist, and the system assists both of them for moving. In the second phase, the therapist stops moving and the trainee goes to the resistive phase, while the patient is still in the assistive mode. So, the trainee should enforce a larger amount of effort to move in the direction. In the third phase, both the therapist and the   trainee stop moving, and the patient is asked to move. Therefore, the patient goes to the resistive mode and the amount of the patient's force becomes larger. So, both assistive and resistive scenarios can be implemented in this method.

Teach and Repeat Therapies
The virtual environment proposed in this project has the ability to store the therapist's hand movements and then replay it for the rehabilitation process (Babaiasl et al., 2016). Therefore, the virtual environment can play the role of "teach and repeat." In the experiment performed as the teach and repeat role, a square path of the therapist's hand movements in section 6.1 is stored and then replayed in the rehabilitation process. Moreover, as can be seen from Figure 9, the teach and repeat therapy, was performed in the first 60 s of this experiment. Due to the capability of this method, there would be freedom for the therapist to put the process in teach and repeat mode and observe the process without his/her intervention.

Assist as Needed
During the replay discussed in the experiment of section 6.2, the patient follows a square path, and if he/she deviates from the specified path, the assistive force returns the patient's hand to the square path, which is "Assist as Needed" therapy (Luo et al., 2019). To implement such therapy with our proposed method, consider a case study with similar participants as section 6.1. Then, the following switching criteria for matrix D is chosen.
If the tracking error (e) is less than the allowable limit (ρ), the matrix D is set to 0 4×4 . Conversely, if the tracking error is greater than the specified limit, the first line of matrix D, which is related to the patient's hand, would changes as 1 0 0 −1 , meaning that the virtual environment tries to return it to the main path. The other zero rows, mean that other operators move freely without getting any force feedback. As can be seen in Figure 9, in the 60th second, the patient is out of the marked square path (e > ρ), and the assistive force returns the patient's hand to the main path. When the patient returns to the square path, the assistive force will gradually vanish from the rehabilitation process.

Supervised Mirror Therapy
In this part, the scenario of Supervised Mirror Therapy (SMT) is implemented. In SMT, the patient attempts bi-manual symmetric movements as moving in the mirror trajectory. Meanwhile, the (remote) therapist helps the patient to move his hand in a desired trajectory. The manipulators keep the limbs in symmetry that helps the affected limb to rehabilitate. For the sake of synchronization in this SMT, the desired sensed force matrix D and the Laplacian matrix L are selected as follows: By looking at Laplacian matrix L it is easy to verify that the Remark 2 is satisfied. The only difference between (47) and (49) is the third row of the matrix D, meaning that the therapist's sensed force is a function of the patient's position (see Figure 10). FIGURE 8 | Forces in hierarchical therapy. This figure illustrates three phases of therapy. In the first phase, all the operators participate in the TR process. So, the therapist assists all of them to move in the correct path. In the second phase, when the therapist stops moving, the trainee's force is of larger magnitude. Moreover, in the third phase, the patient's force increases. The phase stage, is resistive for the trainee, that helps them to learn the process of rehabilitation. The third phase, is resistive for the patient trainee.
So, the concept of unilateral teleoperation is changed to multilateral teleoperation, because the desired force forms a closedloop structure. The varying delays in the channels are considered as (45), and remaining delays in the channels are selected as (50).
The results of the experiments and the 2D plots of positions of the operators are depicted in Figure 11. It is demonstrated that the hands of the patient are aligned with the positions of the hand of the therapist. At the steady-state, the operator forces are such that the summation of the forces will be zero.
The above equation is easily verifiable through (15) and (49). This is reflected in Figures 11D,E. FIGURE 9 | (A) The 2D position of "Assist as Needed" is shown. (B) Assistive force in X and Y direction is illustrated. In the first 60 s of the therapy, teach and repeat method is applied. The path is recorded in the VE and is replied to the patient. The patient moves freely in the specified path, which is a square here. The VE also moves on the square. If the patient's movement error is greater than the specified limit, Assist as Needed force is activated and attempts to return the patient's robot position to the original square path with assistive force. As can be seen in part (B) the assistive force is almost zero before the 60th second; however, from about 60th second, it is activated in the X and Y directions and tries to return the patient to the desired path. Note that, in this figure, the absolute values of the assistive forces are shown to the reader for better understanding.
FIGURE 10 | Desired graphs, considered for the proposed system in sections 6.1 and 6.4. This diagram is equivalent to the D matrices in (47) and (49) in which, the circles represent the role of each user. Next to the diagram, meaning of the numbers inside each circle is written. Moreover, on the arrows in the diagram, numbers are written that are equal to the numbers expressed in the rows of the D matrices of (47) and (49). Part (A) shows the force graph of HTS. It is the graph of matrix D in (47). Part (B) depicts the force graph of the proposed SMT. It is the graph of matrix D in (49).
FIGURE 11 | SMT experimentation. Participants in this TR process include a therapist, a functional hand, and impaired hand. Also, the virtual environment as the last operator in this process cooperates with other operators. As shown in the figure, there is a star path for users to move. Part (a) Shows the movement of the operators in two dimensions and part (b,c) show the movement of the operators in the X and Y dimensions separately. Sections (d,e) also show the force of the operators in the x and y directions. As can be seen, according to Equation (51), the sum of the forces in each case will be close to zero.

Several Trainees in Telerehabilitation Process
In this part, the scenario called Several Trainees in Telerehabilitation Process (STTRP) is introduced. The idea of STTRP is based on the fact that, while the patient is undergoing the process of stroke recovery, several numbers of the trainees can learn the required skills via robots without interrupting the interaction of the patient and the expert therapist. The proposed system forces the trainee's position to track the desired position and sense the desired force of the system. The numbers of trainees may vary from 0 to any number. By choosing the correct matrix D, the trainees sense exactly what the expert therapist wants to teach them without interfering in the rehabilitation process. By advancing the process of therapy, one or more trainees can participate more efficiently in the process. The scenario for this experiment is tracking a circular path in 2-D space. All the operators move in the same direction, and the positions are almost a circle. The experimental results are depicted in Figure 12 which shows the impaired limb (black route) will finally move neatly on the circular path after some iterations. So, the experiment confirms the stability and synchronization of operators.

CONCLUSION
In this paper, the problem of multi-lateral TR with nonlinear and uncertain dynamics was addressed. To deal with the theoretical parts of such systems, a novel structure based on the MAS was presented. This structure could solve the complexity of multi-lateral rehabilitation system due to several numbers of operators in the process. The key factor in the MAS is the self-intelligence between the agents that shows the consciousness of each agent about the other ones. Moreover, uncertainties in the operators' dynamics, as well as timevarying delays in the communication channels, were addressed by using the power of the MAS and passivity based adaptive controls. Furthermore, this paper introduced a framework for simultaneous training and therapy in multi-lateral TR systems.

DATA AVAILABILITY STATEMENT
The raw data supporting the conclusions of this article will be made available by the authors, without undue reservation, to any qualified researcher.

ETHICS STATEMENT
The studies involving human participants were reviewed and approved by All subjects provided informed consent to the experimental procedures, which were reviewed and approved by the University of Alberta Research Ethics Board (Study ID: Pro00033955). The patients/participants provided their written informed consent to participate in this study.

AUTHOR CONTRIBUTIONS
IS conceived of the presented idea and developed the theory and performed the computations. HT and MT verified the analytical methods. RP encouraged HT and MT to investigate experimental scenarios and supervised the findings of this work. IS, HT, and MT carried out the experiment. IS wrote the manuscript with support from MT, HT, and RP. All authors discussed the results and contributed to the final manuscript.