{'fraction_non_alphanumeric': 0.026026743075453676, 'fraction_numerical': 0.013371537726838587, 'mean_word_length': 4.745130315500686, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Lower Limb Rehabilitation Using Patient Data

The aim of this study is to investigate the performance of a 6-DoF parallel robot in tracking the movement of the foot trajectory of a paretic leg during a single stride. The foot trajectories of nine patients with a paretic leg including both males and females have been measured and analysed by a Vicon system in a gait laboratory. Based on kinematic and dynamic analysis of a 6-DoF UPS parallel robot, an algorithm was developed in MATLAB to calculate the length of the actuators and their required forces during all trajectories. The workspace and singularity points of the robot were then investigated in nine different cases. A 6-DoF UPS parallel robot prototype with high repeatability was designed and built in order to simulate a single stride. Results showed that the robot was capable of tracking all of the trajectories with the maximum position error of 1.2 mm.


Introduction
Neurologic injuries like stroke, traumatic brain, and spinal cord injuries can cause lower limb disabilities [1]. A stroke is the second most common cause of death and the leading cause of disability in Europe [2]. Intensive efforts of therapists and patients are required during traditional rehabilitation sessions; furthermore, 44% of patients who are rehabilitated by physiotherapy will have future problems [3,4]. By using robotic technology, all labour-intensive operations will be performed by robot-assisted rehabilitation devices and based on the obtained data diagnosis, customization of therapy will be facilitated [5].
There are two main types of robot-assisted lower limb rehabilitation devices available including wearable devices and platform-based devices [6][7][8]. Functional recovery of the gait can be an indicator of lower limb functional recovery, specifically for the ankle joint [1]. Several different robots have been developed for lower limb rehabilitation such as Rutgers, IT-HPARR, AKROD, GIST, and NUVABAT [9]. Parallel robots can be used for lower limb rehabilitation, motion therapy, and muscle strength training. Motion therapy can be carried out in five different modes including passive, active, active-resistive, active-assistive, and bilateral exercises; and each one of these modes needs a different level of participation from patients. In strength training, actuators apply resistive force to improve the muscle strength of the user. Based on evidence, therapists suggest that activeassistive exercises provide functional benefits for the patients to do the exercises with the minimum level of manual assistance [1]. However, selecting the proper control strategy and rehabilitation system for a specific lower limb disability is still under research and it should be investigated further [10].
Researchers at Rutgers have focused on the development and effect of a robot-based rehabilitation system in different studies [11][12][13][14][15][16][17]. It was found that combination of Rutgers system with a Virtual Reality (VR) system leads to a better outcome on the gait of poststroke patients rather than using the robot alone [12,14]. In [10,18], the Rutgers system has been used for cerebral palsy patients and it has been found that the patients' quality of life was improved by increasing their ankle strength and motor control. In another study, a six-degree-of-freedom parallel robot, named R-2000, was used to simulate a gait cycle and ground reaction forces in vitro, based on data obtained from an in vivo gait [19].
There are different optimization techniques for trajectory selection of the manipulator such as minimum seeking algorithms, genetic algorithms, multiple objective optimizations, minimum time trajectory, minimum energy trajectory, and collision free trajectory. All of these techniques are based on kinematics and dynamics' constraints of the manipulator during the path motion. The dynamics' results are much more 2 Applied Bionics and Biomechanics realistic in comparison with the kinematics' results in terms of fitting in torque constraints and limitation of the joints [20]. In another study, the path planning for a hybrid parallel robot with 9 DoF has been successfully investigated while the robot was tracking the foot trajectory of healthy subjects [21,22]. In another study, a parallel robot was designed and built for ankle rehabilitation which was capable of performing only two rotations, since the first two movements are the dominant actions in ankle rehabilitation [23]. To determine the appropriate trajectory for the movement of the robot, there are different methods such as modelling the trajectory based on normative movements [24][25][26]; a prerecorded trajectory obtained by gait analysis [27,28]; and a prerecorded trajectory during therapist assistance [29,30].
In this paper, the performance of a 6-DoF parallel robot in following real patient data based on the robot's kinematic and dynamic analysis has been investigated. The capability of the robot in tracking full range of exercises using healthy participants will be considered in a separate research study. The aim of this study is to test the functionality of a 6-DoF UPS parallel robot in tracking the foot trajectory of paretic patients with respect to the robot's constraints. A 6-DoF UPS parallel robot was designed and built in order to track the foot trajectory of the paretic leg of nine paretic patients during a single stride. It was assumed that the patients would use the robot in a sitting position and all of the required power for performing the exercise will be supplied by the actuators. The system was developed with and for the use of stroke survivors, particularly for those in the early stage of recovery. Personalising the movements of the robot based on prerecorded foot trajectories of patients is one of the fundamental and necessary issues during the procedure of rehabilitation which will be addressed in this study.   Figure 1(c) and one of the female participants shown in Figure 1(a) used a walker during gait analysis. Except for one of the males shown in Figure 1(e), all other participants wore shoes during the test.

Measurements.
The gait laboratory was equipped with 12 Vicon cameras (with frequency of 100 Hz) including six MX3+ and six MX T40 cameras. Two digital 50 Hz cameras were used in the sagittal and lateral planes. The Vicon cameras were synchronised with two force plates (Kistler and Ampti Optima) which were used in the laboratory to collect data with a sampling frequency of 2000 Hz. Before data collection, the cameras were calibrated within a 2.8 m 2 calibration volume. Sixteen reflective markers were placed on the participant's right and left leg to record the gait parameters. The position of the markers was measured by the Vicon system and temporal spatial parameters, linear velocity, and acceleration of the markers were calculated. Based on the Cardan angle system, the joint movements were calculated. The resultant force of the joints was calculated by applying inverse dynamic. The data for each leg was averaged over the successful trials.
A set of three markers were attached to the thigh, shank, and foot segments. Before starting the experiment, the height, mass, and all anthropometric dimensions of the participants were measured including pelvis depth, knee width, hip breath, and sphyrion height.
Each participant was asked to walk on a 10 m walkway with self-selected speed. Six successful trials were collected for each leg with a total 12 trials for each participant. The trajectory of the foot segment was calculated with respect to the measured trajectory of attached markers 1, 2, and 3, which were placed on the heel, ankle joint, and toe, respectively, as shown in Figure 2. The normal vector of the plane created by these three markers was calculated by the following equation: where P 1 , P 2 , and P 3 represent the position of heel, ankle, and toe markers, respectively.

Development of Physical
Model. The kinematics of the parallel robot has been investigated based on orientation ranges and linear translation of the foot segment. The length of the actuators of the parallel robot and the actuators forces were calculated; then the singularity regions of the robot were investigated based on Newton-Euler formulation addressed in [31][32][33].
To follow the trajectory of a foot during a gait cycle, an algorithm was developed in MATLAB to calculate the length of the actuators and the required force for each actuator based on kinematics, dynamics, singularity, and workspace of the designed robot. The desired trajectory was measured in the gait laboratory and was imported to the control system of the robot. A CAD model of the robot was linked to MATLAB to follow the same trajectory. In case the robot faces any kind of constraint, singularity points, or workspace limitation, it searches for the next reachable point along the trajectory.
Based on kinematics and dynamics analysis, a six-DoF hexapod was built at the University of Birmingham [34], as shown in Figure 3, using six linear servo actuators with a stroke of 30 cm, operating speed (12 V) of 55.88 mm per second, dynamic trust (12 V) of 11.33 Kg, and static trust (12 V) of 226.79 Kg connected to the top and base by six rolling spherical joints (SRJ016C) and six universal joints. Ultralight G6 polycarbonate foot wear with adjustable straps was placed on the top platform. A micro control SSC-32 was used to control the movements of the UPS robot.
A graphical user interface (GUI) has been designed in MATLAB in order to control the movements of the robot based on a designed control system. The obtained trajectories from the gait laboratory were used as reference trajectories and the error value was continuously calculated as the difference between the actual foot trajectory and robot's endeffector trajectory. A database, as a library of various rehabilitation exercises, has been embedded in the GUI which enables the operator to select the most appropriate exercise for the rehabilitation of the lower limb. Three different speed modes have been designed for the robot, including slow, medium, and fast, which will be used in different stages of rehabilitation.

Repeatability of Parallel Hexapod Robot
Movement. An experiment was conducted to evaluate the repeatability and reliability of the robot's positioning in the static mode as follows. The robot was first positioned to (0, 0, 120) mm in the -axis to allow it to translate freely across the -and -axes. Then, the robot was moved to −100 mm on the -axis. Once it has stopped moving, the robot was moved to +100 mm on the -axis and then moved back to −100 mm again. The stroke length of the shortest actuator was measured with a set of Vernier callipers. Then, the motion was repeated and the stroke was measured another three times to produce four sets of data for the desired position. This procedure was repeated for several other stroke lengths within the workspace area of the robot. Finally, the robot was moved back to the translation coordinate (0, 0, 120) mm. The above procedure was repeated for all axes of translation. The -axis translations' range was marginally smaller than that of the other two axes.

Gait Results.
In Section 2, we explained how the trajectory of the foot was calculated based on the coordinates of the attached markers. Foot trajectories of all participants have been measured through the Vicon system and the data were analysed by Vicon Nexus software. The obtained trajectory of the leg was normalized for each participant during a single stride. The mean averaged trajectories over six trials were calculated for individual patients in order to be used by the control system of the robot. For instance, the foot trajectory of participant (a) has been normalized in time and shown in Figure 4(a). The foot trajectory reached a maximum of 120 mm along the -axis when the foot reached 68% of its trajectory. The ground reaction forces and movement of the paralysed leg were measured by the force plate. As shown in Figure 4(b), the range of variation of force in the -and -axes changed from 0 to 98 N, while this value changed from 0 to 810 N in the -axis. The peak force in the -axis occurred when both the heel and the toe were in contact with the force plate. At 40% of the trajectory, both the heel and the toe touched the force plate, and at 52% of the trajectory the heel lost its contact with the force plate. The maximum ground reaction force in different axes was used as an external force in order to calculate the actuator forces during the foot trajectory. Figure 5 for the translations in the and coordinates show an apparent similarity between them, with both deviations showing a peak at around 225 mm displacement (Figures 5(a) and 5(b)) and coming to a plateau beyond the peak point x-axis z-axis y-axis is closer to approaching the maximum stroke of the actuator of 250 mm compared to the stroke lengths at 150 mm. It was observed that the unreliability increases with the stroke of the actuators. In theory, if all of the actuators are of equal performance, there should be no variation between the data generated from the translations between the -andaxis translations. However, small errors in the measurement procedure such as inconsistent lengths along the clevis of the actuators will lead to differences between the axes.

Reliability Analysis. The charts in
As expected, the -axis translations showed a distinct trend compared to that of the -, as the vertical displacement occurs on a different plane. Comparing the absolute values of standard deviation on the -axis with that of the other translations, it shows that the actuators can be up to 3.65 times more reliable in purely vertical translations compared to lateral movements. The standard deviations only peak at 0.171 mm ( Figure 5(a)) as opposed to 0.420 and 0.624 mm for the other two axes of translation.
Translations purely in the -axis have a different characteristic in that all of the actuator lengths are theoretically equal at all positions. Due to this characteristic, all of the actuators are only required to move together at the same speed compared to other translations, which require some actuators to move in a sequence. This leads to a more reliable -axis movement. The controller used in the platform (Lynxmotion SSC-32) is programmable to synchronise movement across all actuators; however, due to the fixed duty cycle on the actuator hardware, it is not possible to achieve this synchronisation.
In contrast to the reliability of the actuators under translation, rotational movements showed fluctuating reliability. However, the trend is not random as all three axes of rotation show peaks of unreliability between 15 and 20 degrees of rotation and a similar plateau beyond that range. The three rotations are visually similar in "phase" and characteristics.

Robot Analysis.
The workspace of the robot was simulated in MATLAB with respect to the maximum length of the actuators and joint constraints in order to find the reachable boundary of the moving platform, as shown in Figure 6. The maximum translations of the end effector in the -, -, and -axes were 556 mm, 556 mm, and 280 mm, respectively.
The trajectory of the foot of participant (a) was used by the developed program in MATLAB in order to find the length of the actuators for that particular motion. The calculated lengths are transferred to the interface program (VBA) in order to modify the motors that are developed in the assembled CAD model in SolidWorks. An algorithm was developed in MATLAB to calculate the force of the actuators during the movements of the robot based on measured data in the gait laboratory and kinematic analysis. The actuators' forces were calculated for individual cases and the average value for all participants' trajectories were calculated in 5.5 s, as shown in Figure 7 The trajectory of the foot during a gait cycle has been followed by the end effector for all nine participants, as given in Figure 8. The trajectory of the foot measured in the gait laboratory was compared with a simulated trajectory of the robot in MATLAB. The illustrated foot trajectory for each participant is the average of six successful trials. The measured paralysed foot trajectories of the patients during a single stride have been scaled down in the -axis two times from the original foot trajectory in order to be within the workspace of the robot. The robot was able to move 278 mm in the positive -axis while the maximum scaled down trajectory is 263 mm in the -axis (Figure 8(e)). The robot was able to track the foot trajectory of all nine patients during a single stride, although their foot trajectories were different from one another. The robot started its movement from the home position, while all actuators' stroke sizes were zero. Initially, the robot calculated the length of the actuators with respect to the predefined trajectories, and then it calculated the required force of the actuators with respect to the applied GRF. The singularities of the robot during its movement have been investigated with respect to the joint constraint and workspace of the robot. If there was not any singularity point during the trajectory of the robot, then it started its movement. The speed of the actuators during its movement was 2.71 cm/s, which was constant along the entire trajectory. In Figure 8(a), the robot reached 66 mm in the -axis; this was the time that the foot reached its maximum position during a single stride. The patients were asked to walk as much as possible in a straight line; as a result, the variation of data in was between −10 mm and +10 mm for all cases. The trend of the foot trajectory was very similar between all cases, so the robot moved along similar trajectories. However, it is very important to personalise the trajectory of motion for individual patients since small movements out of the range of motion of the joint can cause serious injury to the patient.
The mean position error of the robot has been calculated while the robot tracked the foot trajectory. The position of the end effector has been calculated based on the servo feedback of the actuators. The results were then compared with the gait results. The mean values of the position error over the nine participants were 0.7 mm, 1.2 mm, and 0.95 mm in the -, -, and -axes, as shown in Figure 9. The results reveal that the 6-DoF UPS parallel robot has sufficient accuracy for ankle rehabilitation.
As shown in Figure 9(a), the position error in theaxis was zero when the robot was passing 50% of the trajectory. The position error in the -axis fluctuated and reached its maximum of 1.2 mm after passing 95% of the trajectory. The maximum position error was caused by the joint constraint of the robot. The position error in the -axis started from zero and after 0.26 s it reached zero. This means that the position error in the -axis was zero when the foot trajectory reached its maximum position. Then, this error was increased radically up to 0.95 mm before decreasing to zero at the end of the trajectory. Since the stroke size was increasing along two axes, the position error was expected to increase too. The system would be able to track the trajectory profile during different rehabilitation exercises with respect to the maximum position error of 1.2 mm. However, the error band can be reduced by improving the architecture of designed algorithm, where the system's accuracy can be further improved.
The long stroke size of the system enables the operator to perform various exercises which require a larger workspace. The current rehabilitation device is potentially inexpensive and easy to use in local clinics and hospitals without special training. The system would allow high quality treatment of people with severe impairments at any time after stroke. Furthermore, therapy and performance would be more consistent, predictable, and measurable. Personalising the foot trajectories by averaging the motions over a number of trials is one of the critical issues which should be considered during the rehabilitation process. The averaged foot trajectory of patient's healthy leg can be used as a reference trajectory for rehabilitation of the affected leg by the robot. Although Rutgers robot [13][14][15], ARBOT, and other developed parallel ankle robots [35,36] consider lower limb rehabilitation using a parallel robot, defining the protocols of suitable exercises that can be performed by the robot has not yet been addressed properly. However, in this study, an attempt has been made to introduce a number of fundamental protocols for defining suitable exercises that can be used by the robot.

Conclusion
In this study, the capability of a 6-DoF parallel robot for lower limb rehabilitation using foot trajectories of a number of patients with paretic legs has been analysed. A physical