## 2 Materials and Methods  
The simulation of a gait cycle for the design of an active AFO was implemented using MuJoCo [15]. In this work, the foot movement was restricted to a plane parallel to the sagittal plane, limiting it to flexion and dorsiflexion. We assume that when a patient is assisted with the AAFO, they should perform a normal ankle movement during the gait cycle. We used the database provided by [PERSON] and [PERSON] [16] with the kinematics and dynamics of the walking cycle of multiple healthy individuals at different speeds to obtain a reference lower leg movement. Our group has a prior AAFO design and simulation [17], upon which we built this work. As we will show, this new design improves the interaction between the moving parts and reduces backlash to the motor; the simulation is more complete and faithful due to the underlying software chosen for this work; and finally, the optimization is multi-objective according to three objective functions and performed using two different algorithms.  
The orthosis design for modeling is depicted in Figure 1 and is explained in the following lines, with definitions for the most critical parts of the orthosis. Their control and synchronization are detailed in Section 2.1.  
Suspensions: A suspension system was designed for acting at different assistance stages, with two elements named \(Susp_{Rigid}\) and \(Susp_{Soft}\). The \(Susp_{Rigid}\) element, composed of a spring and a shock absorber, will transfer movement from the cam to the ankle joint. It is rigid enough to preserve the position and to work as a compliant component for possible external disturbances, helping to protect the main servomotor. The element \(Susp_{Soft}\), with just a spring component, has a low stiffness value and will contact the lever to reduce slapping.  
Cam: This element provides two functions: transforming the circular movement of a motor into linear movement and having a simple escapement when it is inactive. This element is used to keep the AAFO motor from interfering with the later stages of the gait cycle. The cam makes contact with \(Susp_{Rigid}\), and its profile has been designed to obtain a resolution of one degree per 0.2 mm of vertical displacement. Three functions were developed for the movement of this element during the gait cycle: Home-position, Follow-wheel, and Control.  
Figure 1: Model of the orthosis for simulation in MuJoCo. The main components are labeled.  
Lever: This element has only two positions: home or active. The lever contacts \(Susp_{soft}\) when active, according to the FSM. The purpose of this contact is used to avoid the foot slapping with the ground.  
Servomotors: a Dynamixel MX106 servomotor was selected, and its torque and velocity were simulated by following the performance graph from the manufacturer. This actuator powers the movement of the cam. A smaller servomotor controls the lever element, enabling an opposition point to stop the \(Susp_{Soft}\).  
The servomotors were modeled after their specifications from the manufacturers, including their masses and moments of inertia. In the case of other components, the moments of inertia were computed by the simulator based on their geometries and material densities. The simulator was configured to use the Runge-Kutta 4 th order solver, with a time step of 0.0001 s.