## 4 Discussion
If the human body is assisted by an external device, a different walking strategy can be adopted even under the same joint moment because it changes the walking pattern to adapt to the device or to use the assistive force better [15; 17]. Experiments or additional predictive simulations should be performed to deal with these areas. Fourth, we use target tracking data from the CMC results. The use of the result data of CMC may not have a significant effect on the simulation results in that the previous study suggests that dynamic optimization and static optimization have the same results in low-speed gait motion [34]. However, it is better to use the state variables obtained by predictive simulation for rapid or novel movements. In this study, the direct collocation method used to obtain the dynamic optimization solution transforms the optimization problem into nonlinear programming (NLP) problem via the parametrization of the state variables and control variables. This results in a sizable constraint Jacobian matrix, which requires a significant computation time; however, it can be shortened by using the sparsity of the matrix [25]. In addition, because the governing equations of the system are transformed into algebraic equations and integration is not necessary, the calculation speed is higher than that of the shooting method, which uses the method of discretizing only the control variables and integrating the governing equations. The direct collocation method can be used for both data tracking and predictive simulation, and studies using this method such as maximum height jumps [14] and 3D data tracking [13] have been performed. The purpose of the existing data tracking problem study was to predict the muscle force from the given kinematics data and external force, GRF, and a cost function, such as the muscle activation squared or metabolic cost, which is widely used as the physiological term of the human gait, is used [13; 29; 30]. References [29; 30] predicted the muscle force while tracking the gait data without an external assist device using CMC. In addition, when an external actuator was used for assistance, the muscle force change and corresponding control input were obtained to analyze the metabolic cost reduction and the relation between the actuator position for assistance. CMC is a tool that can efficiently track a target dataset by using static optimization, forward dynamics, and proportional-derivative (PD) control [20]; however, in this study, it is difficult to use in the simulation. The reason is that the CMC tool calculates the muscle force to track it with kinematics data and an external force (GRF), whereas the simulation performed in this study requires tracking both kinematics data and muscle force. In order to obtain the Type 1 and Type 2 actuator inputs presented in this study using the method of CMC in OpenSim, the objective function of the static optimization needs to be changed, which is initially set to the square of the muscle activity. However, it cannot be easily changed in MATLAB. In this study, because the optimization was performed outside of OpenSim by performing dynamic optimization by the DC method, there was no restriction on the setting of the objective function; therefore, it could be constructed to minimize the tracking error of the state variables. Because muscle force prediction was not the primary objective, the physiological term was not used in the objective function as in previous studies. In this study, we used the six degrees of freedom lower-limb model with six actuators. Thus, the input \(L\) could have been solved much faster algebraically by multiplying the inverse of \(B\) in (Equation (13)). Although we focused a lot on methodological challenges, we were able to obtain muscle-related variables with less mathematical effort required. The direct collocation approach we used in this paper can also be easily applied to predictive simulation by altering the objective function and constraints.