# Cable-Driven Exoskeleton for Ankle Rehabilitation in Children with Cerebral Palsy
## 2 Exoskeleton Development and Control Methodology
### Inverse Kinematics
#### 2.2.4 Control System  
The control strategy of the ankle module is designed to implement the Assistance-as-Needed (AAN) paradigm [46], which aims to provide only the minimal robotic assistance required to correctly perform a task. Rather than imposing predefined trajectories, AAN-based systems continuously adapt to the user's motion, promoting active participation. This approach has been shown to enhance movement accuracy, stimulate neuroplasticity, and improve motor learning, while also reducing therapy duration and cost [46; 47; 48]. Figure 10: Geometric formulation of the forward kinematics problem in CDPRs. Each semi-transparent sphere represents the reachability zone of the end effector, defined as the set of points located at a distance equal to the measured cable length from a fixed anchor point \(A_{i}\). The pose of the end effector, denoted as \((\vec{r},\mathbf{R})\), is estimated as the intersection of these spheres. Red points \(B_{i}\) indicate the distal cable attachment locations on the end effector in the global frame. Dashed lines illustrate the cable vectors. (**a**) Three-dimensional view of the full setup. (**b**) XZ-plane projection for cables \(l_{2}\), \(l_{4}\), \(l_{6}\), and \(l_{8}\). (**c**) XY-plane projection for cables \(l_{1}\) to \(l_{4}\). It is important to note that, at this stage of development, the AAN control is not dynamically adaptive. While it enables guided movement by applying only the necessary assistance to promote muscular engagement and strengthening, its configuration must be performed offline by the clinician between therapy sessions. To realize the AAN model, a mechanical impedance control strategy was adopted. Unlike classical position control, impedance control does not enforce trajectory tracking at all costs; instead, it modulates the actuator response by simulating a virtual spring-damper behavior. This reduces the risk of excessive forces and ensures safe physical interaction between the robot and the user--an essential consideration in pediatric neurorehabilitation. The control loop, illustrated in Figure 11, computes the reference torque \(\tau_{i}\) applied to each motor according to the impedance law, as follows:  
\[\tau_{i}=K_{S}\xi_{l_{i}}+K_{D}\xi_{v_{i}} \tag{8}\]  
where \(K_{S}\) and \(K_{D}\) are the stiffness and damping coefficients, respectively, and \(\xi_{l_{i}}\) and \(\xi_{v_{i}}\) denote the length and velocity errors for the \(i\)-th cable. The length error, \(\xi_{l}\), is defined as the difference between the desired cable length \(l_{s}\), derived via inverse kinematics, and the actual cable length \(l_{c}\) measured by the encoders, as follows:  
\[\xi_{l}=l_{s}-l_{c} \tag{9}\]  
The stiffness coefficient \(K_{S}\) is modulated according to a user-specific _assistance level_, defined on a scale from 1 (minimal assistance) to 10 (maximum assistance). Higher values of \(K_{S}\) correspond to greater robotic support, appropriate for users with severely impaired mobility, whereas lower values favor patient-driven movement. The **velocity error**, \(\xi_{v}\), is computed analogously as the difference between the desired cable velocity \(l_{s}\) and the measured velocity \(l_{c}\), as follows:  
\[\xi_{v}=l_{s}-l_{c} \tag{10}\]  
The damping coefficient \(K_{D}\) governs the system's responsiveness and its resistance to oscillatory behavior, thereby contributing to motion smoothness and stability. The resulting torques \(\tau_{i}\) are transmitted to the corresponding actuators via the motor drivers, generating cable displacements that produce compliant, user-adaptive motion of the end effector throughout the gait cycle. Figure 11: Control loop of the exoskeleton based on mechanical impedance control.