Rethinking Exoskeleton Simulation-Based Design: The Effect of Using Different Cost Functions

Designing an exoskeleton that can improve user capabilities is a challenging task, and most designs rely on experiments to achieve this goal. A different approach is to use simulation-based designs to determine optimal device parameters. Most of these simulations use full trajectory tracking limb kinematics during a natural gait as a reference. However, exoskeletons typically change the natural gait kinematics of the user. Other types of simulations assume that human gait is optimized for a cost function that combines several objectives, such as the cost of transport, injury prevention, and stabilization. In this study, we use a 2D OpenSim model consisting of 10 degrees of freedom and considering 18 muscles, together with the Moco optimization tool, to investigate the differences between these two approaches with respect to running with a passive knee exoskeleton. Utilizing this model, we test the effect of a full trajectory tracking objective with different weights (representing the importance of the objective in the optimization cost function) and show that when using weights that are typically used in the literature, there is no deviation from the experimental data. Next, we develop a multi-objective cost function with foot clearance term based on peak knee angle during swing, that achieves trajectories similar (RMSE=7.4 deg) to experimental running data. Finally, we investigate the effect of different parameters in the design of a clutch-based passive knee exoskeleton (1.5 kg at each leg) and find that a design that utilizes a 2.5 Nm/deg spring achieves an improvement of up to 8% in net metabolic energy. Our results show that tracking objectives in the cost function, even with a low weight, hinders the simulation’s ability to change the gait trajectory. Thus, there is a need for other predictive simulation methods for exoskeletons.


Rethinking Exoskeleton Simulation-Based
Design: The Effect of Using Different Cost Functions

Barak Ostraich and Raziel Riemer
Abstract-Designing an exoskeleton that can improve user capabilities is a challenging task, and most designs rely on experiments to achieve this goal.A different approach is to use simulation-based designs to determine optimal device parameters.Most of these simulations use full trajectory tracking limb kinematics during a natural gait as a reference.However, exoskeletons typically change the natural gait kinematics of the user.Other types of simulations assume that human gait is optimized for a cost function that combines several objectives, such as the cost of transport, injury prevention, and stabilization.In this study, we use a 2D OpenSim model consisting of 10 degrees of freedom and considering 18 muscles, together with the Moco optimization tool, to investigate the differences between these two approaches with respect to running with a passive knee exoskeleton.Utilizing this model, we test the effect of a full trajectory tracking objective with different weights (representing the importance of the objective in the optimization cost function) and show that when using weights that are typically used in the literature, there is no deviation from the experimental data.Next, we develop a multi-objective cost function with foot clearance term based on peak knee angle during swing, that achieves trajectories similar (RMSE=7.4deg) to experimental running data.Finally, we investigate the effect of different parameters in the design of a clutchbased passive knee exoskeleton (1.5 kg at each leg) and find that a design that utilizes a 2.5 Nm/deg spring achieves an improvement of up to 8% in net metabolic energy.Our results show that tracking objectives in the cost function, even with a low weight, hinders the simulation's ability to change the gait trajectory.Thus, there is a need for other predictive simulation methods for exoskeletons.

I. INTRODUCTION
E XOSKELETONS are mechanical devices that aim to enhance human capabilities.For example, there are exoskeletons for reducing walking effort or improving jump height [1], [2].The design of an exoskeleton is a non-trivial task, especially because of the human interaction involved [3].The design typically relies on trial-and-error experiments in which the design is modified and tested experimentally in cycles until the predefined goals are met [4].An alternative approach involves constructing an end effector that mimics the actuation of an exoskeleton and refining its operation to attain optimal performance, a process known as human-in-the-loop optimization [5], [6], [7].Regardless of the method chosen, these designs demand extensive hours of device construction and laboratory testing.
An alternative method for developing exoskeletons is to use simulations.This approach has been applied to vertical jumping [8], walking [9], and running [10], [11].The simulation method offers a time-and cost-effective means of identifying the optimal design within a broad range of parameters.This ultimately will result in the creation of an initial prototype that closely aligns with the final product, thereby minimizing development time and costs.Over the past decade, there has been an increase in the application of multibody system dynamics to the predictive simulation of human movement.
Predictive simulations are complex and require a high level of expertise.They are multifaceted processes that involve several key steps, beginning with the mathematical model selection.The mathematical representation considers factors such as complexity, accuracy, and computational efficiency [12].The next crucial step is selecting optimization algorithms and methods to discretize the mathematical model and solve the equations governing the system's behavior over time.Lastly, the formulation of a cost function is determined to resemble experimental data [13].
To date, while simulations without an exoskeleton are prevalent [14], [15], exoskeleton simulations are less prevalent.Previous exoskeleton simulation studies have generally used a fixed trajectory based on experimental data obtained while walking [16] or running [11] without exoskeleton.Therefore, the implicit assumption of such simulations is that the exoskeleton does not significantly alter the user's gait.The fixed trajectory approach has been used to simulate running with assistive devices [10], [11], [16], [17] and walking with an energy harvesting device [18].However, the assumption that gait will not change relative to natural movement is not in line with previous studies [19], [20], [21].Furthermore, it has been demonstrated that utilizing exoskeleton assistive torques derived from simulations based on typical joint kinematics as a benchmark leads to considerable discrepancies between predicted and observed performance in experimental settings [22].
To the best of our knowledge, only two studies in the literature have not used natural tracked data in their simulation of the exoskeleton.The first tested the effect of the ankle exoskeleton [23].The second [24] tested the effect of using different objective functions on the results of optimal torque assistance to torque assistance for one of the leg joints (ankle, knee, or hip).
Passive exoskeletons can assist the user by storing mechanical energy during negative joint work and later releasing it back during the positive work phase without adding any net positive mechanical work [25].Thus, these devices can provide assistance without the burden of carrying energy sources, such as batteries.A previous review reported on 24 exoskeletons developed to reduce metabolic expenditure [26].Of these, only four were passive devices, focusing on the hip [27], [28], [29] and ankle [19].Analysis of joint power at the knee while running reveals that during the stance phase, there is a negative phase followed by a positive phase.These phases can be utilized for a passive device.Previous attempts to build such devices [4], [30] have not reduced metabolic effort [31].However, a simulation of a clutch-spring knee exoskeleton with fixed joint trajectories shows that this might be possible [17].
The aim of this paper is to present a new perspective on simulating exoskeletons.The study involves conducting predictive simulations using OpenSim Moco while optimizing for a cost function that combines various objectives.The first step in our research was to test the effect of incorporating tracking into the cost function on the ability to adapt kinematics for better utilization of the exoskeleton.Second, we aimed to build a cost function with minimal tracking to enable adaptation to the exoskeleton.To achieve this goal, we evaluated different combinations of weights of each objective function to create kinematics and kinetics similar to those of natural human running.Lastly, we used the cost function developed in the previous step to demonstrate a simulation for the design process of a passive knee clutched-based exoskeleton.The objective was to illustrate the simulation's capability to alter the gait trajectory when various parameters of the exoskeleton design were examined.

II. METHODS
The simulations were performed using the OpenSim [32] and Moco [33] optimization methods.The human model used in the simulations is described in Section II-A, the exoskeleton representation is described in Section II-B, and Knee muscles: hamstrings, biceps, gastrocnemius, rectus femoris, and vastus.Hip muscles: gluteus maximus, iliopsoas, hamstrings, and rectus femoris.Ankle muscles: gastrocnemius, soleus, tibialis anterior.The foot-ground contact points and exoskeleton points are also shown.

A. The Human Model
The model consists of 10 degrees of freedom (2 ankles, 2 knees, 2 hips, lumbar-pelvic, tilt, and x and y translation) and 8 segments (2 feet, 2 femurs, 2 tibias, pelvis, and HAT).This 2D model moves in the sagittal plane.The segment dimensions were taken from [13] and scaled to fit the mass and height of the average subject according to [34].
The biomechanics model comprises 18 muscles modeled in OpenSim as "DeGrooteFregly2016Muscle," with properties taken from [35].The muscles represent the muscle groups that have been defined in previous studies [35], [36], [37] and are depicted in Fig. 1.The simulation assumes symmetric periodicity; thus, only one half of the gait cycle needs to be simulated, covering the period from the right foot strike to the left foot strike (Fig. 2).We used "MocoPeriodicityGoal" to couple the states of the right foot at the final timepoint with the states of the left foot at the initial timepoint.
The foot-ground contact was modeled using contact spheres described by the OpenSim "SmoothSphereHalfSpaceForce" model [3].Two contact spheres were simulated, both located on the right foot, under the calcaneus and the metatarsophalangeal joints (Fig. 1).Contact was not needed at the left foot because only the right stance and left swing of the cycle were simulated.The stiffness was set to 5 × 10 −6 N/m. and the friction was set to 0.8.Further in a few simulations the swing foot penetrated the ground.These cases were discarded.

B. The Exoskeleton
The knee exoskeleton includes a rotational torque spring, which is assembled between the femur and tibia at the knee joint, and a clutch for engaging and disengaging the spring.The spring is designed to provide assistance in the knee joint's range of motion, which ranges from 0 degrees when standing straight to approximately 120 degrees at maximum bending.The spring has an engagement starting angle at which it becomes activated.When the knee angle is below the engagement angle, the spring is disabled.
For smooth transitions between stance and swing phases, a exoskeleton zero assistance torque during disengagement is essential.To achieve this maximum spring work, the spring engages and disengages at the same angle.Fig. 3 presents this knee angle for two different spring stiffnesses.In addition to the engagement angle condition, the spring is selectively activated only when the foot touches the ground.Touching ground is defined as a vertical force that exceeds 100 N.During the swing phase, the spring is disengaged, and the knee is free to move.

C. Optimization Formulation and Objectives
OpenSim Moco tool was used to achieve a predictive simulation that optimized muscle excitation.The Moco tool is a direct collocation solver that iterates on the state variables q (joint angles or coordinates), q (generalized velocities), and u (muscle excitation) until the dynamic equations are satisfied.The state and control trajectories were sampled at discrete time intervals, and splines were used to connect them.The initial state (guess) for optimization was natural running.The stop criterion for convergence was 10 −4 .To determine the optimal number of time intervals per simulation, we tested values of 10 intervals and upwards until the change in the RMSE was less than 1%.This was achieved when 50 discrete time intervals were used, which is in line with Bogert et al.'s [35] methodology.We chose to calculate the error on the angular velocity because although there could be differences between the experimental and the modeled joint angles (due to an alignment difference), the angular velocity profile should be the same.
The cost function plays a crucial role in predictive simulations, as it represents the objective that the user aims to optimize during their gait.There are several types of objectives that could be used, such as minimizing metabolic power or effort.However, using only one such objective results in a non-realistic gait pattern [37].Thus, the cost functions in the literature are typically multi-objective, as shown in Equation 1: Some of the additional objective goals that have been suggested for inclusion in the cost function, alongside the metabolic cost or effort, are head stabilization [37], [38], [39], injury prevention by avoiding angles close to the limit of the joint range of motion [13], [37], [40], ground force or impulse minimization [14], [37], and arm excitation, which can contribute to an efficient gait [13].Other methods of achieving a realistic gait might include constraining a degree of freedom (DOF) to a specific value, for example, to ensure foot clearance during swing [41] or using weighted trajectory tracking in addition to other objectives [35].
An examination of the objectives and weights proposed in previous studies of running and walking [13], [37], [40], [42] reveals that there is no gold standard in terms of the ideal cost function for human gait.Thus, in the present study, seven objectives were tested in the cost function of our simulations, as described below.
1) Tracking Objective: The tracking objective is built into OpenSim and is the sum of the RMSE between the modeled and the reference angles and the RMSE between the modeled and the reference angular velocities (see Equation 2).Further, a weight can be specified for each angle and angular velocity.This study used equal weights for all angles, w q = 1 and equal (but higher) weights for all angular velocities, w q = 6.We applied lower weights to the angles because the marker positions during the experiments can differ from the model definition, and this could create an offset between the two angle trajectories (simulated and experimental)-a phenomenon that does not apply to the angular velocities. where In the above equations, i (1 to 6) is the index of the sagittal angle or angular velocity, each of which has a reference experimental trajectory and a corresponding weight, j is the time increment, q i, j − q i,r e f is the difference between the simulated value of DOF i at time j and the corresponding experimental value, and n is the number of discrete time points (n = 50 in this study).Equation 3 refers to the angles, but it has the same form for angular velocities.
2) Cost of Transport (COT) Objective: The COT (metabolic cost of transport) is based on the energy rate calculated using "Bhargava2004SmoothedMuscle-Metabolics" in Open-Sim.The total metabolic energy was averaged across the time increments and divided by the total human model mass and the total center of mass COM distance.
where m (1 to 18) is the muscle number, j (1 to 50) is the time increment, and Ėm, j is the metabolic energy rate of muscle m at timepoint j.
3) Head Stability Objective [40]: This is the first of the two head stability functions proposed in the literature.The function was defined using the acceleration of the head segment.It determined a lower and upper bound on the acceleration of the head COM such that within these bounds, no penalty was applied, while below the lower bound and above the upper bound, a linear penalty was applied.To calculate the objective, the sum of the horizontal and vertical acceleration penalties during the simulation was divided by the total COM distance.The acceleration bounds for the two axes were the same as those defined by Ong et al. [40].
ψ j a x , a x,min , a x,max 2 + ψ j a y , a y,min , a y,max 2 (5) where i f a min < a < a max a min − a : i f a < a min a max − a : i f a > a max (6) Note that ψ j (a, a max , a min ) has the same form for horizontal and vertical accelerations, where a x,min , a x,max , a y,min , a y,max are set to −0.25 g, 0.25 g, −0.5 g and 0.5 g, respectively.
4) Head Stability Objective [37]: The second method defines head stability as the time integral of the sum of the absolute values of the acceleration in the vertical and horizontal directions divided by the COM distance: where a x j and a y j are the horizontal and vertical accelerations of the head COM at increment j [37].
5) Effort Objective: The effort objective is the sum of the squared activations of the muscles divided by COM distance: where act m, j is the activation of muscle m at time increment j and varies from 0 to 1.
6) Minimum Ground Force Objective: This objective is the ground force integrated across time and divided by COM distance [37].The aim of the objective was to reduce the joint forces, where large forces could cause discomfort or even injuries.
where G F j is the vertical ground force component at time increment j. 7) Foot Clearance Objective: To avoid foot contact with the ground during swing, we used a method based on Xiang et al. [41].The method sets a target for maximum knee bending during walking.By observing the experimental data of running [34], the maximum knee swing angle was set to 100 degrees.Thus, the objective is defined such that during the swing, it should stay close to 100 degrees.Note that this objective specifically applies to the left leg during the swing phase only.During this phase, the exoskeleton remains inactive on the left leg, so the impact of the objective on the right leg exoskeleton is minimal.
In addition, two alternative foot clearance objectives were tested.First, we tested an objective of the minimum distance between the toe and the ground (31 cm, based on experimental results).However, when this objective was used, the swing leg affected the center of mass height and, in doing so, prevented sufficient bending at the stance leg knee and spring stretching (Appendix C).The second option was a minimum clearance of 5 cm, which resulted in a shuffling running gait where the foot moved as close to the ground as was feasible with this constraint (Appendix C). 8) Total Cost Function: Based on the above objectives, the cost function used in our study is shown in Equation 11: where the weights W are changed for each analysis.
In addition to all the objectives, the average COM was specified as a constraint.This constrained the model by calculating the endpoint COM distance and gait time.The average cycle speed for all cases was set as 3 m/s and was set using "MocoAverageSpeedGoal".

D. Analysis
The first analysis aimed to validate the reduced OpenSim model employed in this study, which was originally proposed by Bogert et al. [35].This particular model consisted of 10 degrees of freedom and 18 muscle groups.Our initial task was to verify whether the model could accurately replicate running gaits similar to those observed in experimental studies.To this end, as a reference, we used experimental data from 10 subjects running on a treadmill at 3 m/s without an exoskeleton [34].A simulation was performed with only motion trajectories tracking and no tracking of ground forces.
The second analysis aimed to investigate the effect of the weight of the tracking objective on the simulation results.Thus, a cost function that incorporated the common objective of COT [43] along with tracking was tested.A series of simulations was conducted in which the tracking weight (W track ) was varied (0, 0.001, 0.01, 0.1, and 1), while the COT weight was kept constant (at 0.1).For each simulation, the relative contributions of the tracking objective and the COT objective to the total cost function were calculated.Further, in the evaluation of the simulation results, the RMSE of the angular velocities served as a measure of the degree of tracking constraint (a larger RMSE corresponds to a lower tracking effect).
The third analysis aimed to determine the weights for the objective function with minimal motion constraints that could still produce trajectories resembling the experimental data.This was to enable future simulations with the exoskeleton to deviate from the experimental trajectories if needed.The approach employed to identify the cost function involved conducting a two-stage process.Initially, a random search was performed, followed by a grid search of the weights.During the initial stage, a random exploration was conducted across a broad range of weights, with values set at 0.01, 0.1, and 1 for each of the specified objectives: COT, effort, head stabilization [40], head stabilization [37], and foot clearance (FC).Additionally, for the ground force objective, the weight values set as 0, 10 −4 and 10 −5 .This stage involved approximately 120 iterations and revealed that the two head objectives and the ground force objective were not required for producing trajectories that were similar to the experimental data.In the second stage, another search was performed near the best solution (minimum RMSE from the experimental joint trajectory).A grid search was conducted using the weights determined in the first stage, allowing for a deviation of 5-10% on each side.In this stage, 125 simulations were performed.
The fourth analysis aimed to demonstrate the effect of exoskeleton stiffness on metabolic power, joint kinematics, and kinetics.Thus, based on the third analysis, the bestfit cost function capable of producing a realistic running gait with minimal constraints was used.To demonstrate the effect of the exoskeleton, six levels of spring stiffness were simulated (0, 0.5, 1, 1.5, 2, 2.5, and 2.8 Nm/deg).For each stiffness engagement angle, angles of 30, 35, 40, and 44 degrees were tested (these values are based on preliminary simulations and achieved joint angles).The mass of the exoskeleton was 1.5 kg for each leg.An additional simulation was conducted, resembling natural running, in which the mass of the exoskeleton was zero.
The fifth analysis used simulations to compare the lowest tracking that still produced a running gait (found in the second analysis) with the suggested cost function found in the third analysis (multi-objective cost function with kinematics constraint term for peak knee angle during swing).This comparison was aimed at testing the ability of the simulation to change the gait in order to better utilize the exoskeleton.This was tested in two conditions, in which we calculated the maximum angle in the stance and the metabolic rate.The two conditions were an exoskeleton with no spring and one with a 2.5 Nm/deg spring.

A. Validation of the Biomechanical Model
A simulation was performed in which the cost function included only the tracking objective, and the results were compared with the experimental data [34].In all simulations, there was a consistent ankle offset of 12 degrees and a hip offset of 7 degrees.This effect was due to variations in marker locations observed in the experiments, although it is important to note that this difference did not impact velocities or torques.Subsequently, a uniform offset was applied to all ankle and hip angles to maintain consistency.
We observed that the simulation closely replicated the experimental data for the angles and angular velocities (RMSE of 2 deg and 0.3 deg/s, respectively), but there were some deviations with respect to torque and power (RMSE of 45 Nm and 167 W, respectively) (Fig. 4).

B. Effect of Full Trajectory Tracking Weight
The analysis revealed that when using a tracking weight of 0.01, which resulted in this term contributing 8% of the total objective value (11), the trajectory was almost identical to the experimental trajectory (see Fig. 5), with close similarity for weights higher than this value.When the tracking weight was set to 0.001 or 0, the joint angle trajectory during running was no longer consistent with the experimental data; specifically, the simulation predicted less knee bending (Fig. 5A).The results (Table I) showed that as the tracking weight decreased, the metabolic energy decreased, and the RMSE of the angular velocity increased.The second and third columns of the table show the percentage of the cost function corresponding to the tracking objective and the COT objective, respectively.

C. Simulation Without Using Full Trajectory Tracking Best Fit Cost Function
The first stage of the grid search revealed that head stabilization and ground force objectives had almost no impact on the RMSE of joint trajectories relative to the experimental data.The foot clearance objective (i.e.target maximum knee angle during swing) was crucial to simulate the swing, and without it, the swing height was very low and did not resemble the experimental running data.Therefore, the objectives in the second phase were the effort, foot clearance, and COT.Following the execution of the second grid search.To enable adjustments in the maximum knee flexion angle, the weight assigned to the foot clearance objective function was selected to be the minimum possible while still yielding a comparable RMSE to the experiments.This was achieved using a sensitivity analysis to find what is the lowest weight on this objective that still produce running gait with similar RMSE to the best solution.This configuration assigned the following weights: 1.0 for foot clearance (using maximum knee angle at swing), 0.12 for COT, and 0. 1 for effort.This resulted in an optimal solution in a relative magnitude of cost function totals of 1%, 96%, and 3%, respectively).The simulation profile results (Fig. 7) were similar to the experimental data for joint angle and angular velocity (average of three joint RMSE of 7.4 deg and 2.3 deg/s, respectively), but larger deviations for moment and power (RMSE of 27 Nm and 160 W, respectively).

D. Running With Exoskeleton
Using the cost function with the following weights: 1.0 for clearance, 0.12 for COT, and 0.1 for effort, simulations of running with knee exoskeleton with different spring stiffnesses are performed.The spring attachment and detachment angle were modified for each spring stiffness to find the maximum reduction in the metabolic rate.The results revealed that as the spring stiffness increased, starting from the case in which there was no exoskeleton (nd), followed by a zero-stiffness exoskeleton and stiffnesses up to 2.8 Nm/deg, there was more knee bending during stance (Fig. 8).The 2.5 Nm/deg spring resulted in the largest metabolic reduction.The average metabolic power decreased from 13.14 W/kg for the simulation of the exoskeleton with no spring to 12.11 W/kg for a spring of 2.5 Nm/deg (Table II).The metabolic cost in a simulation without the device was 12.75 W/kg.For an explanation of why 2.8 was worse than 2.5 Nm/deg see Appendix B.

E. Comparing Full Trajectory Tracking to Foot Clearance
Last, in the fifth analysis, we tested the ability of the simulation to adapt the gait in order to utilize the exoskeleton while using a low tracking weight of 0.01.The results (Fig. 6) revealed changes in the maximum stance angle of about 26% with foot clearance objective based on maximum knee angle during swing and 12% with full trajectory tracking.Furthermore, when comparing the COT change between the conditions of using an exoskeleton with no spring and using a spring of 2.5 Nm/deg, we found that for our proposed cost Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.function (objective based on maximum knee angle during swing), the decrease was 8.5%, while it was only 2% when using full trajectory tracking with a weight of 0.01.

IV. DISCUSSION
This research aimed to investigate the effect of full trajectory tracking on the simulation cost function.It sought to develop an alternative approach that could enable the simulation of running with a passive knee exoskeleton that could deviate from the recorded experimental data of running with no exoskeleton.Thus, as a first step, a simulation was performed to assess the ability of the human model to replicate the experimental data.The results showed that when using a cost function with a sufficiently weight on the full trajectory tracking objective, the simulated data achieved joint trajectories similar to experimental values for angle and angular velocity but lower accuracy for moments and power (Fig. 4).These results are in line with other studies in the literature [37].These differences in torques and power could be caused by errors in the angle, acceleration, or ground reaction forces [44].Regarding ground forces, this study used a contact model that is typically used in walking.However, this might not be the best option for modeling foot contact during running.Future work should perform parametric study to find the best contact model based on previous literatures [37], [45], [46].Using a cost function with both a full trajectory tracking objective and a COT objective on running without exoskeleton, we demonstrated that even when the full trajectory tracking objective had a very low weight (corresponding to 8% of the total cost function value at convergence), the simulation showed small deviation from the experimental data (Fig. 5, 6 and Table I).Furthermore, the fifth analysis compared scenarios of using minimal full trajectory tracking (weight 0.01) to those with minimal motion constraint based on maximum angle of the knee during swing.This revealed that full trajectory tracking reduced the changes in the joint angle and metabolic rate between the two simulation conditions (exoskeleton with no spring and with 2.5 Nm/deg).Therefore, careful consideration is essential when incorporating full trajectory tracking into the prediction of assisted gait.

TABLE II METABOLIC POWER AND MAXIMUM KNEE ANGLE AT STANCE FOR DIFFERENT SPRING STIFFNESSES
The third analysis aimed to determine the objective function with minimal motion constraints that could still produce trajectories resembling the experimental data.Although humans choose to walk at a speed that closely minimizes the COT [47], [48], [49], [50], recent experimental data suggest that the cost function that the human gait tries to optimize might be more complex [51], [52], [53], [54].The notion that the optimal cost function includes objectives other than the COT is also supported by previous simulation studies [38], [39], [43].
An examination of the trajectories created by the different objective functions revealed that along with effort and COT objectives, only the foot clearance objective based on maximum knee angle during swing [41] produced sufficient bending at the knee, similar to human swing phase during running (Appendix B).It should be noted that foot clearance imposes a kinematic constraint that ideally should be avoided.We believe this is because raising the foot during the swing phase requires more muscular effort and is less efficient than sliding the foot along the ground or moving it close to the ground.However, these sorts of movements increase the likelihood of accidental contact and episodes of instability.
In the fourth analysis, we addressed an important gap in the literature.Previous studies have used a full trajectory tracking objective in their predictions of running with an exoskeleton [11], [36], which did not enable the simulation to deviate from the experimental trajectories obtained without an exoskeleton.However, wearing an exoskeleton is known to alter a user's gait [7], [23], [55].Thus, assuming no change in trajectories could lead to wrong exoskeleton design since a change in kinematics and kinetics is likely to change the function of the exoskeleton and the user COT.The cost function used in our study is only representative of an approach for the type of objective function that does joint trajectories.
Using this cost function, an exoskeleton design with six spring stiffness levels (from 0 to 2.8 Nm/deg) was tested.For each spring, an engagement angle with the minimal COT was found.With an increase of up to 2.5 Nm/deg in spring stiffness, the metabolic power for running decreased.At a stiffness of 2.8 Nm/deg, the metabolic power increased relative to 2.5 Nm/deg.For an explanation of why this might have happened, see Appendix A. The springs yielded an assistance torque of up to 40 Nm (Fig. 9), which is about a third of the peak knee torque during natural running (120 Nm).This result is similar to experimental results [18], [19], [29] as well as simulation outcomes [56], [57].At the highest spring stiffness, the biological torque profile changed but kept the similar maximum (Fig. 10A), while the maximum total knee torque increased from 100 Nm to 140 Nm (Fig. 10B).Further, the use of the exoskeleton resulted in changes to the knee kinematics, which in turn produced different moments relative to natural running.The shift in knee flexion occurs because an increase in spring stiffness requires large torques, which can be achieved with minimal muscles effort by deeper stance (Appendix A).
The maximum decrease in metabolic power was approximately 5% (i.e., gross metabolic power difference) relative to running with no device (Table II) and 8% relative to the zerostiffness exoskeleton.This means that the addition of 1.5 kg for each leg only added 3%.While this is similar to results from simulation of the effect of the mass [35], this is less than the experimental results [34], which were found to be approximately 10%.Compared to our results, simulations of a knee device [11] using ideal massless extension actuators demonstrated a reduction of approximately 13%, and [17] achieved a 16.7% metabolic reduction using a massless clutch spring device.
These simulations assumed that the gait trajectory did not change and ignored the effect of mass.Further, [17] used a simplified model with no muscle that estimated the change in the metabolic base simple work model [58].
Notably, simulation for predictive biomechanics involves making a significant number of assumptions and simplifications with many parameters in the simulation that can alter the results.Thus, it is important to compare the simulation results with actual exoskeleton experiments; in our case, we do not have such a device, and, thus, it was not feasible.A few simulation studies have used experimental gait trajectories and assistive torque profiles to predict metabolic power changes.For hip passive exoskeleton running at 2.5 m/s, the experimental results with a net reduction of 8% [29] and the simulation using data for running at 2 m/s was 4.6% [10].
Another study compared the reduction achieved in experiments (8.3% net) to simulation using kinematic data from an experiment (net 12% net) in which an exotendon connected the legs during running [59].A comparison of simulations that found optimal assistive torques for ankle, knee and hip devices indicated that tracking walking data reduced metabolic rate in the simulation by 69%.However, when using the same optimal torque in the experiment, the reduction was 25.9% [22].The results of a knee exoskeleton for vertical jumping from a predictive simulation of a massless device showed an improvement of 10.4 cm with an assistive knee torque of 105 Nm total for both knees [60].where, in the experiment, the difference between jumping with the exoskeleton with no actuation (dead weight) and jumping with 105 Nm was 8.1 cm [2].These results show the importance of comparing the experimental results with those the simulation.
Finally, in this study, a passive exoskeleton was used.Although typically, such a device will have less weight and manufacturing cost compared to an active exoskeleton, it was used here to demonstrate an approach for simulation and not to claim that a passive exoskeleton is a better solution for the knee joint than an active exoskeleton.

V. CONCLUSION
Most simulations of exoskeletons assume that the motion is unaltered with respect to natural motion.Thus, they incorporate full trajectory tracking in their cost function, as demonstrated in this study.However, even a minimal amount of full trajectory tracking, as revealed in our findings, hinders the simulation's capacity to modify gait trajectories.This is noteworthy, given that experimental results consistently indicate changes in gait when utilizing an exoskeleton.
Therefore, our goal was to create a simulation for running with an exoskeleton that enables changes to the trajectories due to wearing the device, similar to an idea previously presented for walking [23], [24].Thus, cost functions that included different combinations of objectives were tested.The cost function that resulted in the closest match to natural running experimental data was used.This cost function was used to represent the human user's objectives while running.Using this cost function and a human model, a knee exoskeleton with a clutch and linear tortional spring (with stiffness ranging from 0 to 2.5 Nm/deg) was tested.The clutch was activated during the stance phase.The results demonstrated that a reduction in metabolic power of up to 5% relative to running without a device can be achieved.
It should be noted that the cost function used in this study is not necessarily the unique correct cost function for human running with exoskeletons.Rather, it aims to demonstrate a concept for future simulation use in the design of exoskeletons.Future research should aim to find a cost function that fits several types of movements with and without the exoskeleton.Further, it is necessary to compare the simulation results with actual exoskeleton experiments.

APPENDIX A
The results showed that the stance bend was deeper as the spring stiffness increased.It should be noted that to stretch the spring without using flexor muscles, torque must be applied to the spring by the upper body mass (acceleration and gravitational forces).As spring stiffness increases, the initial bend must also increase to facilitate an increase in the torque arm (Fig. 11) for stretching the spring.
The selection of spring stiffness was 0 to 2.5 Nm/deg.The maximum stiffness of 2.5 Nm/deg was the one that still yielded an improvement to the max spring torque.The reason that springs with greater stiffness do not yield greater torques lies in the engagement angle and initial stance bend.With the rise in the initial bend at high stiffness levels, the engagement angle must increase, leading to a decrease in the stretch range up to the maximum stance bend.Fig. 12 shows the spring torque at stiffnesses of 2, 2.3, and 2.8 Nm/deg.The torque of the 2.8Nm/deg spring decreases because the engagement angle is 44 0 .

APPENDIX B
Before conducting the grid search to find the weight of the cost function, we carried out a manual tuning procedure to determine the influence of each of the objective functions.We fixed the COT objective weight and each time added Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.another objective function from Effort, Ground Force, Head Stabilization 1 and 2, and Foot Clearance.The results showed (Fig. 13) that only the foot clearance objective (based on maximum knee angle during swing) can result in a gait with a swing height close to the experiments.The cost function is based on a single experiment.We posit that the cost function can effectively demonstrate a cost function that enables simulations with exoskeletons to deviate from natural trajectories.

APPENDIX C
The experimental data indicated that during running, the maximum height of the swing leg toe above the ground was approximately 31 cm, with a corresponding knee angle of 100 degrees.Thus, we tested three options to achieve foot clearance: 1) The knee angle during the swing phase was approximately 100 degrees.2) The maximum distance between the toe of the swing leg and the ground was set to approximately 31 cm.3) The toe clearance distance was set to a minimum of 5 cm.The outcomes for 100 degrees at the knee and a toe distance of 31 cm revealed that using this toe distance resulted in less knee flexion (63 degrees) than when using the angle goal (67 degrees) (Fig 14 1).Furthermore, there was a lower amount of negative or positive spring work (11J) for the toe goal than when using the knee angle goal (16J) (Fig 14 3).
A comparison between the knee angle method and a cost function that penalizes toe heights lower than 5 cm was performed without and with an exoskeleton.Our simulation with this cost function yielded a shuffling running gait, where the optimal solution minimized the swing foot elevation Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.Toe height during swing with two objective functions: 1) minimum 5 cm toe-to-surface clearance distance, and 2) maximum 100-degree knee angle during swing.
(Fig 15,16).Thus, we decided to use the toe clearance cost based on the knee angle.It should be noted that this may not constitute the true objective function that derives the human running gait; yet, for the purposes of this study, it offered a sufficiently useful representation.

Fig. 2 .
Fig. 2. Running simulation results for a zero-stiffness exoskeleton, from the right heel strike to the right stance to the right swing and ending on the right heel strike.

Fig. 3 .
Fig. 3. Knee angle for two different spring stiffnesses.The engagement angle (A, B) is equal to the stance detachment angle (C, D).

Fig. 4 .
Fig. 4. Simulation of natural running at 3 m/sec with full trajectory tracking only.The shaded area depicts the experimental data and denotes one standard deviation across the 10 participants.The figures only show data for the right leg, while the left joints are assumed to be symmetrical.

Fig. 5 .
Fig. 5. Simulation results for knee (A) angles and (B) angular velocities along the trajectory for different full trajectory tracking weights.The shaded area denotes the average ± one standard deviation of the experimental data.

Fig. 6 .
Fig. 6.Knee angle for no spring and a spring of 2.5 Nm/deg (with exoskeleton weight).Blue lines are for foot clearance during swing using max knee angle in the proposed cost function, and red lines are with a full trajectory tracking weight of 0.01.

Fig. 7 .
Fig. 7. Best-fit simulation (smallest RMSE) achieved without full trajectory tracking; with a COT weight of 0.12, an effort weight of 0.1, and a foot clearance weight of 1.The shaded area denotes one standard deviation on the mean of the experimental data.

Fig. 8 .
Fig. 8. Angles along the trajectory for different spring stiffnesses (in Nm/deg), where nd represents the case of no device.The shaded area denotes one standard deviation on the mean of the experimental data.

Fig. 9 .Fig. 10 .
Fig. 9. Torques of different springs along the running gait for the right leg.During the swing, the torques are zero.HS -heel strike, TO -take off.

Fig. 11 .
Fig. 11.torque arm of the torso mass relative to the knee joint.

Fig. 12 .
Fig. 12.The spring torque at 2.8 Nm/deg spring decreases because an engagement angle of 44 0 required to stretch the spring.The knee angles were similar.

Fig. 13 .
Fig. 13.The influence of each objective function on gait.COT, cost of transport; GF, ground force; HS, head stabilization; FC, foot clearance.

14 .
The knee angle(1), spring torque (2), and power (3) provided by a 2.5 Nm/deg spring.Comparison of the simulation results for toe distance clearance goal and clearance based on a 100-degree knee angle.

TABLE I EFFECT
OF DIFFERENT FULL TRAJECTORY TRACKING WEIGHTS ON RMSE ω AND METABOLIC POWER