# Cable-Driven Exoskeleton for Ankle Rehabilitation in Children with Cerebral Palsy
## 2 Exoskeleton Development and Control Methodology
### Discover2 Walk Overview
#### 2.1.4 Bio-Inspired Architecture  
The communication and control of the different modules of the D2W system is achieved by implementing a bio-inspired architecture (see Figure 3). This architecture mimics the hierarchical functioning of the CNS, the processing of information, and commands from the human body for the movement of the lower body. We have three intercommunicating levels of complexity [41]: high, medium, and low level.  
* High level: it is the one associated with the processes of perception and intention. It is implemented through a clinical interface that modifies the parameters of the exoskeleton according to the anthropometric conditions of the patient (height and weight) and uses a trigger event to initialize the movement.
* Medium level: based on the parameters determined at the high level and the sensor readings of the subject's movement, it is responsible for generating the gait patterns to be performed by the subjects [42]. These trajectories will be sent to the low level.
* Low level: it is in charge of ensuring that each of the actuators of the three modules (pelvis, ankle, and traction) reaches the positions calculated by the middle level so that the trajectories are performed correctly. As in the human body, each actuator has sensors that send feedback to the middle level.  
The implementation of the described system was carried out using ROS2 nodes, allowing modularity and communication between the different levels (see Figure 4).  
At the top level, there is communication between the perception and intention algorithms and the ROS2 services, allowing the parameters to be modified at each level. The clinical graphical interface is implemented based on HTML and allows the platform to be configured to fit the therapeutic needs of each patient. In addition, the interface provides feedback from all nodes of the system.  
At the high level, trigger events activate all nodes of the system. The event can be triggered from the interface manually, or by a brain-computer interface (BCI) with algorithms that process the cortical information. When a patient intends to perform a movement, the BCI detects the electrical activity generated by the brain and sends information to the exoskeleton to perform a preconfigured movement [43].  
Figure 3: Bio-inspired architecture of the D2W that mimics the CNS based on three intercommunicating levels of complexity. The high level handles perception and intention processes, implemented through a clinical interface. The middle level generates the gait patterns to be performed by the actuators. The low level is in charge of controlling the D2W modules and collecting the information from the sensors. The global system is implemented and communicated through a system of nodes developed in ROS2.  
In the middle level appears the node associated with the gait pattern generator. This node uses the information received from the high-level services (patient height and gait speed) to generate the three-dimensional trajectories to be followed by each of the three platform modules in the form of setpoints [42].  
Finally, at the low level, we find that each of the controlled kinematic groups (pelvis, ankle, and traction) is controlled by an independent node (achieving the modularity of the system). Each of these nodes will be in charge of sending position, velocity, and torque information to the actuators associated with its module. In addition, they will also publish the information measured by the system's sensors in a number of topics.  
The bio-inspired hierarchical control architecture implemented in the exoskeleton ensures a highly modular and scalable system, allowing for intuitive integration within rehabilitation environments. This architecture has demonstrated enhanced clinical usability, offering real-time monitoring, a user-friendly clinical interface, and seamless adaptability to individual patient needs, being that the operation of the system is completely transparent to the end user [40].