RoboWalk: augmented human-robot mathematical modelling for design optimization

ABSTRACT Utilizing exoskeleton devices to help elderly or empower workers is a growing field of research in robotics. The structure of an exoskeleton can vary depending on user’s physical dimensions, joints or muscles targeted for assistance, and maximum achievable actuator torque. In this research, a Human-Model-In-the-Loop (HMIL) constrained optimization technique is proposed to design the RoboWalk lower-limb exoskeleton. RoboWalk is an under-actuated non-anthropomorphic assistive robot, that besides applying the desired assistive force, exerts an undesirable disturbing force leading to the user’s fall. The HMIL method uses the augmented human-robot 2D model to take RoboWalk and human body’s joint torques into account during optimization. The superiority of HMIL method is proven by comparing the results with other strategies in the literature. Obtained results reveal elimination of the disturbing forces, 2 N.m. reduction in average human knee-joint torque, and significant decrease in the actuator required torque.


Introduction
Humanoids are inherently unstable robots that should be dynamically stabilized [1], especially when performing tasks on different surface conditions [2,3]. Human-robot rehabilitation technology is one of the spinoffs of humanoid technology where, depending on the user's health, a part of the tasks is taken over by the human itself [4]. Orthosis and exoskeletons are wearable robots that are widely used in medical industries for curing patients suffering from limb pathology and for performance augmentation of able-bodied users. The medical exoskeletons are categorized into two groups of treadmill-based immobile [5][6][7] and mobile devices [8][9][10]. The BLEEX exoskeleton [11] of University of California, Berkeley is the most well-known exoskeleton of strength augmentation type. Robo-Knee [12] and MIT augmentation exoskeleton [13] are other types of these devices.

Assistive wearable robots
Another important class of wearable robots are assistive exoskeletons. The intention of using such groups of exoskeletons is assisting the weak elderly to become needless of walker, sticks or help of others in doing their daily activities. In addition, it can help healthy users to do their tasks by spending less energy in longer periods of time. This kind of exoskeletons are divided into two categories: passive and active. Passive devices use compliant elements instead of using any form of electrical power to operate and assist the user. As for some examples of passive assistive exoskeletons, one can mention the XPED2 [14], Passive Ankle Exoskeleton [15], MoonWalker [16].
One of the most successful active assistive robots is the Honda bodyweight support assist device [17]. The elders, tourists, factory workers and, generally, people who should be on foot for hours are the main target society of this device. This device has an attractive design such that wearing it is as easy as putting on the shoes and placing the seat under the groin region. The objective of the device control strategy is to offer maximum reduction in felt weight in single support phase. Although the results showed a 10% reduction in the Floor Reaction Force (FRF) during the mid-stance phase, unfortunately, an unwanted horizontal force in sagittal plane [18] was produced. This disturbing force causes interruptions and may be a threat to user stability or may increase joint torques during the walking gait cycle.
The design and function of Honda's bodyweight system has captured a lot of attention. The passive Bodyweight support exoskeleton with compliant knee [19] and assistive exoskeleton device fabricated in Ottawa University [20] are examples of assistive devices inspired by Honda bodyweight support assist device. The former claims to reduce the knee joint torque up to 27% in some points of mid-stance phase but although it uses a compliant knee, its design is not optimized, and it has a bad influence on user gait. In the latter case, the kinematic results revealed that the device interrupts user gait and does not assist the user in most of the gait cycle. In both cases, no optimizations were performed and this could be a source of these bad influences on user gait.

Design optimization
In the exoskeleton industry, online optimization techniques are more frequently used for finding optimal set of control algorithms [21] or set of control parameters [22,23] by using the prediction of future kinematics or dynamics [24,25]. On the other hand, exoskeleton design should be optimized offline and before it is constructed, unless the device is modular, soft or changeable [26] which is not the case in this paper.
Offline dimensional optimization has lots of applications in multi-body systems [27,28,29] and robotic industries. Shim et al. have designed a robotic gripper for the frontend module assembly process and optimized a six-bar linkage by a multi-objective optimization approach [30]. Pan et al. designed a scissor mechanism for load-carrying augmentation [31]. In [32] a length optimization of the scissor sides to minimize the transmitting errors between the input and output motions in walking were performed. In another study, a passive upper limb exoskeleton was designed [33] and its elastic elements' impedance were optimized by genetic algorithm. Authors in [34] designed pleated pneumatic artificial muscles to obtain a lightweight design by maximizing the compactness of the actuator.
In the field of lower limb exoskeletons, Kawale [35] performed optimization to achieve an energy-efficient design for a wearable lower-body exoskeleton mechanism in shipbuilding industry. Ortiz [26] used a starting point dependent Nelder-Mead method for optimizing the structure and parameters of a soft modular lower limb exoskeleton to make it energetically efficient. Random sampling within the parameter space was performed to prevent finding the local minima. In Wang et al. an optimization framework to obtain efficient and lightweight combination for the Mindwalker series elastic joint was proposed [36]. None of the above-mentioned articles used human model joint torques as a criterion for their optimization. This problem is going to be addressed in this paper, along with other key elements included in the optimization algorithm.
This paper introduces new results along with the author's previous works [37,38,39], wherein [37] a conceptual design of the robot was added to a skeletal Opensim model and some preliminary simulations and tests were performed. The works presented in [38,39] dealt with the modelling and performance analysis of the first and second generation of RoboWalk exoskeleton. In this paper, a 2D human skeletal model and the third generation of RoboWalk exoskeleton are modelled in sagittal plane. To this end, an initiative accurate kinematic model for RoboWalk is presented that requires less computational time than other methods presented in [38,39], which makes it suitable for optimization. Also, for the first time, the Human-robot models are augmented to be used in the proposed HMIL strategy. The main goals of this human-robot model augmentation are to minimize the disturbance force, RoboWalk actuator torque and the user knee-joint torque.
The paper is divided into seven sections. In section 2, a brief introduction to RoboWalk assistive exoskeleton structure and its functionality are presented. The multibody augmented human-exoskeleton model is obtained by Newton and Recursive Newton-Euler Algorithm (RNEA) in section 3. In section 4, three constrained dimensional optimization techniques, including HMIL strategy, are presented. Section 5 presents the verification of the obtained dynamics and discusses the results obtained by the design optimization approaches by considering the human joint torques as a good criterion for analysing user comfort. Finally, the conclusions of this study are summarized in the last section.

Introducing RoboWalk Assistive Device
As mentioned before, the structure of RoboWalk is inspired of Honda's bodyweight support assist device, which is explained in detail in [17,38] and demonstrated in Figure 1.
The user wears the shoes of the device and, after turning the device on, raises the seat up to the groin area. The front and rear bearings, the guide rails attached to the seat and the rollers inside it provide a passive 3-DoF rotational motion for the hip. The knees, which are actuated by the motor placed under the seat, have 1-DoF in sagittal plane and the ankle spherical joint permits a 3-DoF rotation. The torque generated by the actuator is tranfered to the knee joint by a 4-link transmission mechanism. There are some points worth noting about RoboWalk's motion: (1) The legs of RoboWalk (extraction and contraction mechanisms) remain between the legs of the user during the entire gait. This is a beneficial design allowing the device to have a low moment of inertia when rotating about the user longitudinal axis. (2) This design restricts the robot to move in the sagittal plane whilst the user is walking, therefore all the analysis is done in the sagittal plane. (3) A minimal actuator torque (0-8 N.m.) is always applied to hold the seat attached to the buttocks. Therefore, during simulations the robot seat is assumed to be stuck to user pelvis. (4) The robot's ankle joint is fixed to user shoes. Hence, after the robot is set in place, RoboWalk kinematics is completely specified.
A closer look to the device structure ( Figure 2) could be more illuminating. Similar to Honda's assistive device, the desired upward assist force is set to be a constant value during the optimal design simulation. This assisting force is applied to the seat by the stance leg. The torque T m is approximately the same as the torque applied to the knee joint during the entire stance phase. Meanwhile, the knee actuator of the leg in the swing phase is inactive to avoid disturbing the swing leg. Therefore, in addition to applying the assisting force, the stance side of the device bares the weight of the robot's leg in the swing phase. The undesirable disturbing force exerted to the human arises when the stance leg tends to apply the assisting upward force. Due to the under-actuated nature of the device, a horizontal force is applied to the user as a side effect of the upward force.

Integrated System Mathematical Modelling
In this section, the kinematics and dynamics of the human skeletal model and RoboWalk are discussed. The procedure of deriving the equations of motion (EoM) of the system is depicted in Figure 3 briefly. X p and Z p are the pelvis cartesian coordinates in sagittal plane and q is the set of human trunk, pelvis, thigh, shank and foot angles. The first task in obtaining user's forward kinematics is to find the foot contact point. This could be done by finding the maximum height between a reference point (e.g., pelvis) and toe/heel of the user and assigning the maximum amount as the height of the reference point [38]. Since the  connection points of RoboWalk are invariant with respect to the human body, by knowing the forward kinematics of the user, the inverse kinematics of RoboWalk can be derived. It is shown in the subsequent subsections that by knowing the robot's inverse dynamics, the robot's interaction forces with user are achieved.
RoboWalk is connected to the user in three points: the seat and the two robot ankles that are connected to the user shoes. The interaction forces between a robot and a human are known as human-robot interactions (HRI). These forces along with the FRFs are assumed as external forces to the user inverse dynamics model. The details of this procedure and the governing equations are discussed in subsequent subsections.

Human kinematic model
Since RoboWalk is limited to be between the user's leg during the gait, the robot's movement is restricted to the sagittal plane and almost all of the human-robot interaction forces are limited to this plane. Therefore, although RoboWalk is free to move passively with the user in other planes (e.g. when the user performs hip abduction/adduction), since we are investigating human walking and RoboWalk's influence on that, all the modellings and simulations are done in sagittal plane. In addition, all the analysis is conducted in single support phase (SSP). Accordingly, the human model is assumed to be an 8 linked multi-body system which includes pelvis, trunk, right and left thigh, shank and foot. The upper extremity is replaced by the trunk for ease in analysis. The pelvis is assumed to be the floating-base. Thus, the pose and orientation of the coordinate system attached to the centre of pelvis is calculated with respect to the inertial coordinate system to allow movement analysis of the human user. All other joints are assumed as ideal rotary joints and the inertial coordinate system is located on the ground and under the user before starting to walk. All coordinate axes of this model are illustrated in Figure 4.
In this figure, the arrows are the x-direction of coordinate frames and the crosses are the z-direction. The vector of generalized coordinates that define the whole-body motion is specified as: where X p , Z p andq p are the pose and orientation of pelvis reference coordinate with respect to the inertial coordinate system, expressed in inertial reference. q t , q h , q k and q f represent the rotational motion of trunk, hip, knee and ankle joints for left and right legs, respectively. Since our analysis is restricted to sagittal plane, these joints represent 1-DoF revolute joints. By this definition, the human model is a 10-DoF kinematic tree structure in sagittal plane. The governing equations of human kinematics model are completely discussed in [38].

RoboWalk Kinematic Model
As stated before, the robot interacts with the user in three points (both ankles and the seat). The directions of the forces applied to the seat are determined by kinematic calculations. Consider the human and robot as shown in Figure 5.
As shown in Figure 5-a, wherever the roller bearings are in contact with the seat rails, a normal force is exerted to the rail (tangential friction force is neglected). These forces are transmitted to the user through the seat, in the horizontal and vertical directions, as  the assisting upward force and friction horizontal force. The rollers are attached to the upper leg of the mechanism and are free to move within the guide rails. Rollers number 2 and 4 push the seat up and numbers 1 and 3 pull it down whenever needed. The forces exerted to the seat are directed towards the centre of the guide rail arc (which is assumed to be almost coincident with the user's centre of gravity (CoG)). Figure 5 -b is a schematic of the user and one leg of the assistive robot and the direction of the assist force.
Since RoboWalk has a special structure, obtaining its kinematics is a bit tricky. Figure  6 demonstrates the important angles for introducing the kinematics of the system.
In this figure x 0 ; z 0 ð Þis the centre of guide rail arcs (i.e. approximate CoG of user) and x e ; z e ð Þ is the coordinate of robot ankle. The bearings attached to the upper limb are constrained to move inside the guide rail. Thus, the upper link is forced to rotate about the arc centre, which makes it possible to handle this complex constrained geometry and simplifies the leg's motion analysis. Accordingly, the entire leg kinematics model is simplified to a two-link manipulator with the lengths of L and r as depicted in Figure  6. Hence, the inverse kinematics of the robot in any configuration is as follows.
, the first link's angle with respect to vertical is known. By simple maths operations θ 2 is obtained as follows.
By knowing the velocity and acceleration of x 0 ; z 0 ð Þ and x e ; z e ð Þ and introducing Δx ¼ x e À x 0 , Δz ¼ z e À z 0 and Θ ¼ θ 1 θ 2 ½ � T , the links' angular velocities and accelerations are computed as follows.
where J represents the jacobian of the robot ankle with respect to human's CoG.

Augmented Dynamics Modelling
After obtaining the kinematics relations of human model and RoboWalk, and possessing the gait data from Opensim [40] software, the inverse dynamics relations can be acquired. In order to obtain the human-RoboWalk integrated model, the HRI forces are assumed as external forces applied to the human model. The impact of the HRI forces on the human skeletal model is observed by using the transpose of jacobian of the contact points.

Human-Body Dynamics model
As stated before, the FRF and HRI forces are the main external forces applied to the user. Hence, a general form of user dynamics is obtained and these external forces are then introduced to the equation. The general equation of a system, when no constraints and external forces are applied to, is expressed as: in this equation, M represents a 10 × 10 inertia matrix, C and Q are 10 × 1 vectors. C represents Coriolis, centrifugal, gyration effects, G represents the gravity effects and Q is equivalent to Dτ when the human is considered as a floating body with no interaction with the environment [41]. In this case, D and τ are defined as: in whichτ T is the trunk joint torque,τ HR ; τ KR ; τ AR are joint torques of right hip, knee and ankle and τ HL ; τ KL ; τ AL are those of the left leg, respectively. Then, in order to include the external ground contact forces in the EoM, one could develop constrained dynamics model by simply replacing unknown forces/moments acting on the point of contact. The mapping of these forces to the space of generalized coordinates is carried out using the transpose of jacobian of the contact point. In this case, is the jacobian of contact point and F contact is the vector of external forces/moments exerted to that point. Thus, the EoM of the human model can be specified as: When RoboWalk is exploited, the HRI forces are added to EoM as external forces. These HRI forces consist of the force exerted to the foot of the user by robot's ankle joint and the assisting forces applied to user's pelvis towards user CoG. Hence, the EoM of the augmented human-robot in SSP turns into the following equation.
whereJ s and F are the jacobian of seat force applying point and the known assistive (including seat friction) forces obtained from robot inverse dynamics. In addition, in this equation where, J A L and J A R are the robot's left and right ankle jacobian and F A L and F A R are the known forces applied to RoboWalk ankle joint.
Since DJ FRF T is a square matrix, joint torques and contact forces are uniquely determined in SSP. In the double support phase (DSP) the EoM is as follows.
J T FRF L and J T FRF R represent the Jacobian of the left and right foot contact points, respectively. In this case, the number of unknowns exceeds the number of EoMs by three (because the simulation is conducted in sagittal plane) and the problem is solved by Minimum Norm method.
Since the most extreme phase in designing RoboWalk is the SSP, and the fact that DSP is a very short time in human gait, the DSP is excluded from our analysis. The dynamics equation of a multi-body system (Equation (7)) can be obtained by two different approaches. In the first approach, internal forces are omitted from the EoM (e.g. Lagrange method). in the second approach, the internal forces in the EoM are explicitly included (e.g. Newton-Euler method). Since the human joint force is a criterion of assessing the suitability of RoboWalk, Newton-Euler method is used for attaining the EoM of the entire system. The obtained system dynamics model is then verified using RNEA [42].

RoboWalk Dynamics Model
After obtaining the kinematics of RoboWalk, the device's dynamics equation is obtained by assuming that two of the bearings are in contact with the guide rail in every instant. Figure 7 shows the FBD of the schematic assistive robot.
Where α f 1 and α f 2 are the angle of applied forces with respect to horizontal. a and b are the horizontal and vertical distance between upper link CoG and human CoG (O 1 ) and L is the distance between RoboWalk knee joint and human CoG (O 1 ). The same is done for the lower link as follow where r G2 represent the distance between RoboWalk knee joint and lower link CoG. Hence, six equations are obtained for each leg of the robot. The vertical and friction force and the point where they are applied are found by writing the EoMs for the seat. Control Strategy. As it is illustrated in Figure 8, there are seven unknown parameters (F 1 ;F 2 ; A x ; A z ; B x ; B z and T m ) for each robot leg. Note that F 1 and F 2 directions are known by knowing the kinematics of the robot. Hence, without introducing another equation to these 6 equations, finding an accurate solution to this problem is impossible.
To achieve this goal, a control strategy should be defined for the assistive exoskeleton. In this paper, the main purpose of using the device is to support a portion of the user's bodyweight and induce the feeling of having less weight to the user. In order to do so, the objective of the robot stance leg is to compensate a portion of the human's bodyweight; the other leg's actuator is assumed to be turned off. Hence, the 7 th equation for the stance leg is going to be:  (20) where W human is the total user weight and p.W human represents the portion of the bodyweight that the robot supports. For the leg in swing phase the 7 th equation is: By attaining these equations, all the unknown parameters are easily obtained in each sampling time.

Recursive Newton-Euler Algorithm (RNEA)
RNEA is a numerical approach to model inverse dynamics. This algorithm is based on using 6 × 1 spatial coordinate [42] instead of the classical 3 × 1 representation [43] for each moment and force (or linear and angular velocity). Similar to the classical Newton-Euler method, all the equations are written in body coordinate. The spatial equation of motion states that the net force acting on a rigid body equals its rate of change of momentum [44]: in this equation, f i B represents the net force applied to i. The left side of this equation is the rate of change of body i's angular momentum.� � , v i ; a i and I i are spatial force product sign, velocity, acceleration and moment of inertia, respectively. If the external force f i x is applied to body i and f j is applied by body i to its successor body (body j), the following equation is written for body i.
This equation is then reordered to obtain the recurrence relation of forces acting on body i: Equation (7) is solved by non-recursive algorithms, possessing a high computational complexity as O(n 4 ). One the other hand, Recursive algorithms are much more efficient, possessing computational complexities of O(n) [42]. Hence, though non-recursive methods give preferable physical understanding, recursive algorithms are much better for implementation. Therefore, human and RoboWalk are modelled by RNEA and, for the sake of validation, the obtained results are compared with those of Newton's method in subsequent sections.

Structural Optimization
As mentioned in previous sections, each leg of RoboWalk assists the user by applying two forces towards the user CoG. The resultant of these two forces are two forces along X and Z direction in sagittal plane. Since RoboWalk has one actuator on each leg, it is an underactuated system. As a result of this matter, one cannot possess control on setting both forces to the desired value. Hence, by assuming the control strategy mentioned in equation (20), the assisting force in the Z direction is set but the creation of a force in X direction is inevitable. The effect of applying this horizontal force can be explained in such a way that the person is being pushed or pulled during walking and this might cause the user to fall. This undesirable disturbing horizontal force could be vanished to some extent if the upper link of the robot could stay horizontal during the entire gait. In this way, most of the assisting force created by motors would remain in Z direction. For this purpose, either upper or lower link of the robot must have variable length. This could be done using another actuator or passive elements like springs for changing the robot link length. Many designs were checked and studied but they either increased the weight of the system or its complexity with no guarantee of the disturbing force reduction in the entire gait.
Another approach for decreasing this horizontal force is optimizing the dimensions of the robot such that the horizontal force is taken care of to some extent and low torque is required for RoboWalk motor. Trying to keep the motor torques as low as possible has two benefits. It allows using smaller and low power actuator system (motors and gears) and therefore, helps keeping robot's weight and manufacturing cost as low as possible. Hence, it is concluded that the cost function of the optimization problem should be as follows.
where F x and T m represent horizontal force and motor torque, respectively. In this optimization problem, the design parameters are chosen to be L (distance between user CoG and RoboWalk knee), r (lower link length), R (arc radius) and θ opt (angle between L and the line passing through human CoG and the roller that applies force to the user) which are all circled in Figure 8. The rest of the parameters are considered to be a function of LrRθ opt Tparameter-set but the mass of each limb is assumed to remain constant during optimization. Three methods were examined to design RoboWalk optimally. Since this problem is a continuous optimization problem, the Particle Swarm Optimization (PSO) method is used to obtain the optimal parameter values for each robot leg. It is worth mentioning that this optimization process is a constrained optimization problem and all dimensional parameters are bounded, giving the set of inequality constraints as follows: when finding optimal parameters, the geometrical and velocity constraints be violated. Some of these geometrical constraints are mentioned as.

First approach for structural optimization
In the first approach, optimization is conducted for each gait sample separately. In other words, when the user steps a single sample time forward, valid combinations (population) of parameter-set values are chosen and the cost function is evaluated for each parameter-set. Consecutive parameter-sets are selected such that the cost function reduces in every step. In this approach, the cost function is proposed as Where w 1 , w 2 and w i are the weights and F x and T m represent horizontal force exerted to the user and RoboWalk motor torque, respectively. The horizontal force is obtained Figure 9. The first approach of optimization structure.
according to user posture and RoboWalk configuration for the intended parameter-set. The structure of the optimization problem in the first approach is illustrated in Figure 9. As shown in the figure, the optimal parameters that minimize the cost function are obtained for every sample gait data (k th gait sample). In this figure,N data is the number of data samples, N pop is particle population (number of parameter-sets) and Maxit is the number of iterations made for every sample to find the optimal structure for that gait sample. The pseudo-code of this structure is as follows. In this strategy, the Global_Best(i) is the best dimension set that minimizes the cost function in that particular sample. Hence, although this method might not have a unique answer, if a parameter-set causes the cost function to be in its minimum in most of the gait, those parameters are selected as the best configuration.

Second approach for structural optimization
Most of the optimizations in the literature are performed by a strategy similar to this approach [26,32,33,35]. In this method, unlike the previous method that the optimization was done for every gait sample, the optimization is done for the entire gait at once. The structure of this optimization approach is depicted in Figure 10.
In this structure, unlike the first approach that consecutive parameter-sets were chosen for every gait sample, a parameter-set is chosen in every iteration of the optimization and the cost of choosing that parameter-set is estimated for the entire gait. Then, in the next iteration, another parameter-set is selected and the cost estimation is performed once again. The PSO algorithm that minimizes this cost function is capable of finding optimal structural parameters to minimize a cost over the entire gait cycle. The pseudocode of this structure is demonstrated as follows. The cost function in this approach is similar to the previous.
This cost function should be estimated for every set of parameters for the entire gait (every iteration). Hence, it must be accumulated or averaged for each iteration as follow The only objection to this approach is that although it considers the horizontal force, the main contributing factor to the increase of knee-joint torque, it does not involve the joint torque directly.

Human-model-in-the-loop method
The human model-in-the-loop method is proposed to overcome the problem of the previous method. In this method, the human skeletal/musculoskeletal dynamics model is involved in each cost function evaluation. The structure of this method is illustrated in Figure 11 and explained in the subsequent concise form pseudo-code (the initialization is omitted). In the first step of this optimization method, random parameters are selected for the robot. These parameters are examined to fit for a specific user height. If the parameters selected could not fit the desired user, another set of parameters will be chosen. The valid set of parameters will be used for the robot in the entire gait. By knowing the user's forward kinematics, RoboWalk inverse kinematics will be estimated using the selected parameters. Knowing the kinematics leads to obtaining the forces applied to the user by the robot. The interaction between robot and user in every iteration causes different assisting forces and different knee torque. Hence, the cost function to obtain the least knee torque and actuator torque for the user is as follows.
In this cost function, τ knee , T m L and T m R are the knee torque for each user's leg, actuator torque of the left and right leg of RoboWalk, respectively. This cost function should be estimated for every set of parameters (every iteration). Hence, it must be added or averaged for each iteration (entire gait).

Obtained Results and Discussion
The simulations in this research are carried out on Windows 10, core i7, CPU (2.8 GHz), memory 16 GB. The human mass and geometrical properties were extracted from the human skeletal model in Opensim software. The human kinematics (mentioned in equation (1)) consisted of 188 samples for the kinematics verification and 54 samples for the optimization. The kinematics of the augmented system is verified in Figure 12 compared to the numerical RNEA. For arbitrary trajectories of the joints, joint forces are obtained by these methods and compared to each other. In Figure 12.b the result of both methods is compared.
As it can be observed in this figure, both methods yield the same results and the error between them (of the order of 10 −14 ) is due to computation round-off.
The robot's dimensional specifications are extracted from Honda's bodyweight support system [45]. Since our robot has more sensors and electronic boards for research purposes and a heavier seat, we decided to assume the weight to be 8 Kg in a conservative estimation, which is a typical weight for non-anthropomorphic assistive devices [46,47] without backpacks. Tables 1 and 2 illustrate human and robot's mass properties and geometrical specifications.
The geometric properties of human and RoboWalk is as follows.
Using these geometrical and mass specifications and obtaining the kinematic gait data from Opensim software, the RoboWalk influence on user's knee force are estimated and shown in Figure 13. The solid and dotted-dashed line is after and before using RoboWalk, respectively.
In this figure, F KR and F KL represent the joint force of right and left knee, respectively. Elders are most vulnerable at knee joints due to weak muscles and arthritis. In patients suffering from knee arthritis, the force exerted on knee causes pain. It is demonstrated in this figure that the joint force (bone on bone forces) has decreased dramatically after utilizing RoboWalk. Simulations showed an increase in joint torques after using the device in most of the gait cycle which is mainly caused by the disturbing horizontal force. This is an important fact that could harass, exhaust, or lead to the fall of the user. Consequently, most of the force is tolerated by the muscles and the bone on bone forces are reduced considerably. In order to decrease the disturbing force, we can either reduce the percentage of RoboWalk assisting force or change the structure. Accordingly, a structural optimization to minimize user knee joint torque and robot motor torque is conducted.

First approach of design optimization
The optimization of all the methods was performed by PSO with a population of 500 particles. Optimization was done for the left leg SSP when more data was collected than other SSP phases (54 data samples). The first approach achieved to the following results ( Figure 14).
In this case, the force and robot motor torque are shown in Figure 15. As shown in Figure 14 in the first half of SSP, the average values of all parameters are different from the other half's average values. Gait sample number 30 could be assumed as a suitable average sample for all parameters. Accordingly, good results for this optimization approach are summarized in Table 3.
This approach benefits of its low calculation time for solving the optimization problem but unfortunately, there is no precise optimal value for entire gait and an average value should be considered. There is no guarantee that the selected average value is an appropriate value for the rest of the gait.

Second approach of design optimization
The optimization in this method is performed in the same situation as the previous; namely, the data samples and bounding of parameters are the same in both methods. The results of this optimization are illustrated in Figure 16.
In this case, the force and robot motor torque are demonstrated in Figure 17.
As it is shown in these figures, robot parameters have converged to specific values. These values are optimized throughout the entire SSP and are reliable to produce the least horizontal force by using the least motor torque value. The parameter values after convergence of the algorithm are specified in Table 4.
The calculation time of this approach is less than the previous and the parameters converge to the values that minimize the overall cost function. The only deficiency of this approach is that it only deals with actuator torque and horizontal force and it does not include the user knee-joint actuation torque in the cost function. This problem is addressed in the next approach. In addition, LL 1 = 11 cm means that the distance between the knee joint of RoboWalk and the seat is approximately 11 cm. Which could cause problems when the user intends to sit or crouch. Since there is no control on LL 1 and LL 2 and geometrical constraints attain them, this could be considered as another drawback of this approach.

Human-model-in-the-loop method
This method is suggested to solve the problems and deficiencies of previous methods. In this method, actuator torque and knee-joint torque of the human model is involved. Results of dimensional optimization for this approach is demonstrated in Figure 18.
The parameter values after convergence of the algorithm is specified in Table 5. Using these optimal parameters, user knee-joint torque is obtained and illustrated in Figure 19.  In this figure, the solid line is the joint torque obtained after using the optimal values, the dashed line is the user joint torque obtained after using the intuitive values (nonoptimal joint torque) and the dotted line is human joint torque before utilizing RoboWalk. The hatched part of the plot is the area that the user's joint torque is improved by using optimal values. Figure 20 depicts the speed-torque diagram of RoboWalk actuator after optimization is performed by each method.
In the previous design, RoboWalk actuators should have provided 70 N.m. nominal torque in approximately 6rpm velocity. After optimizing the device design by the first, second and HMIL approaches, the required torque of 65, 55 and 25 N.m. were achieved in approximately 6,7 and 20 rpm, respectively. Therefore, the HMIL approach is superior to other mentioned methods in the sense of obtaining the best actuator system. As a result of this valuable achievement, this design's required motor and gearbox are lighter, more likely to be back-drivable and even more affordable in price. This means that the 630 grams EC 90 flat Ø90 mm, brushless, 360 W, with Hall sensors that deliver a nominal torque of 953mNm in nominal speed of 2340rpm and a 30:1 gearbox is a very conservative and suitable selection for RoboWalk motor. This selection is far from good since it is even lighter than what we expected and used in our simulations for RoboWalk upper link mass (Table 1). As stated before, if a low torque (0-8 N.m.) is applied by the robot knee actuator, the seat of the robot remains attached to the user buttocks ( Figure 21).
The results of the optimization showed that the least actuator torque was obtained by the HMIL approach and the amount of torque, in that case, was at least 15 N.m.; therefore, since the 8 N.m. actuator torque is never reached, the robot seat does not get detached from the user pelvis and assuming a perfect connection between them was reasonable in the modelling.

Conclusions and Discussion
In this research, a lower-limb assistive exoskeleton, named RoboWalk, was presented and its operational strategy was explained in detail. After modelling the augmented humanrobot system in 2D (sagittal plane) and verifying the kinematics and dynamics of this multi-body system, a simple control strategy was applied and RoboWalk performance and its effect on the user were investigated. The results showed that the robot reduced the felt bodyweight of the user by 33% using a 70 N.m. motor in approximately 6 rpm angular velocity but applied a large unwanted disturbing horizontal force to the user. The disturbing force causes the user to feel uncomfortable by increasing knee joint torque and    might eventually lead to his/her fall. In order to overcome this problem, dimensional optimization was performed using different strategies. The optimization problems were solved by PSO algorithm and the masses of the limbs were considered as constant values during optimization. In the first method best robot parameters were found for every    Figure 21. Comparing the actuator torque required for maintaining the seat attached to the pelvis and the minimum torque required for assisting the user (obtained by the HMIL approach).
sample of the gait. Therefore, there is no convergence to any particular parameter-set for the entire gait and an average parameter-set suitable for most of the gait should be chosen as the optimal set. In the second method, every parameter-set was tested for the entire gait to minimize the disturbing force and actuator torque. The significance of the HMIL optimization is to add the user joint torque by utilizing the human-robot augmented model. The performance of these strategies is summarized in Table 6. The computational time required for the first, second, and HMIL methods were 1, 0.5, and 5 hours, respectively. On average, the HMIL method reduced the knee joint torque by approximately 2 N.m. more than the best result obtained by the other two approaches. In addition, as it is shown in Figure 20, the best actuator speed-torque diagram is obtained for the HMIL approach. Therefore, according to the simulations, the proposed HMIL optimization strategy was found to be more useful than other strategies. Two significant benefits of the HMIL optimization are that in addition to the fact that the user felt less disturbing joint torques, the motor's required specifications decreased such that not only the system gets lighter and cheaper, but it also remains in the region of backdrivability, which is essential for user safety. In addition, having a lightweight actuator leads to less disturbing forces applied to the leg in the swing phase. It is worth noting that this optimization strategy could be used for other exoskeletons or other human models, such as human models in Opensim or Anybody modelling systems.
In the future, we hope to add some passive elements to the robot to eliminate the remaining undesirable disturbing forces in different human gaits (e.g. walking, sit to stand movement, climbing stairs, etc.). Designing a controller for the stance leg instead of using a simple control strategy for applying a constant upward assistive force to the user is also an exciting future research topic. Also, activating the robot swing leg actuator is now in progress to recover balance after perturbations.

Disclosure statement
No potential conflict of interest was reported by the authors.