{'fraction_non_alphanumeric': 0.030519046558253507, 'fraction_numerical': 0.01019157941635108, 'mean_word_length': 4.687994931897371, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 1, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 5, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Controller Design for A Stance-Control Knee-Ankle-Foot Orthosis Based on Optimization Techniques

Design of active orthosis is a challenging problem from both the dynamic simulation and control points of view. The redundancy problem of the simultaneous human-orthosis actuation is an interesting exercise to solve concerning the analytical and computational cost effectiveness. The physiological static optimization approach tries to solve the actuation sharing problem. Its objective is to quantify the contributions of muscles and active orthosis to the net joint torques in order to select the proper actuator for the joint. Depending on the disability of each patient, different controllers can be designed. As a matter of fact, the duration of the gait cycle for each patient should be different. In this paper, a PI controller is designed whose parameters are tuned by optimizing a cost function which takes into account the patients muscle power and the error of the knee angle with the reference value. Moreover, the final time is obtained by minimizing the mean of integral squared errors. The performance of the method is shown by designing the controller for three types of patients, ordered from low to high disability. The objective of this work is to use optimal control techniques based on physiological static optimization approach to the design of active orthosis and its control.


INTRODUCTION
Spinal cord injuries (SCI) cause paralysis of the lower extremities because of the break of the connection between nervous central system and muscular units of the lower body. According to the standard neurological classification of the American Spinal Injury Association (ASIA), there are different SCI levels depending on motor and sensory function to be preserved. The ASIA Impairment SCALE (AIS) range them from A (complete SCI) to E (normal and sensory function). This work focuses in the assistance of incomplete SCI subjects with AIS level C or D. Those patients have partially preserved motor function in the key lower limb muscle groups, and can perform a low-speed and high-cost pathological gait by using walking aids. The energy cost and aesthetics of this walk can be performed by means of active orthosis, requiring external actuation mechanisms to assist the motion of the lower limb joints during gait cycle. Considerable efforts have been focused on the design and application of passive and active orthoses to assist standing and walking of SCI individuals.
There is a great evolution between the first controllable active, a patent by Filippi in 1942(Filippi, 1942) of a hydraulically-actuated device for adding power at the hip and knee joints, and the actual orthotic devices. Concerning the first, developed at the University of Belgrade in the 60's and 70's by Vukobratovich et al. (Vukobratovic et al., 1972), these early devices to aid people with paraplegia resulting from spinal cord injury were limited to predefined motions and had limited success. Nowadays, orthotic systems use predefined patterns of joint motions and torques together with classical control techniques or EMG-based control, with the aim of integrating the human musculoskeletal system and the assisting device. There are different designs in the literature, see for example the review of Dollar (Dollar and Herr, 2008). Nevertheless, few studies (Silva et al., 2010;Kao et al., 2010) examine the moment joint patterns of combined patient-orthosis systems. Moreover, the number of studies testing these systems on handicapped subjects is paradoxically low when comparing with the studies on able-bodied subjects wearing the orthosis.
To assist the proper design of active orthoses for incomplete SCI, it is necessary to quantify the simultaneous contributions of muscles and active orthosis to the net joint torques of the human-orthosis system. Simulation of walking in individuals with incomplete SCI wearing an active orthosis is a challenging problem from both the analytical and the computational points of view, due to the redundant nature of the simultaneous actuation of the two systems. In this work, the functional innervated muscles of SCI patients will be modeled as Hill-type actuators, while the idle muscles will be represented by stiff and dissipative elements that increment the passive moments of the inactive joints. The orthosis will be considered as a set of external torques added to the ankles, knees and hips to obtain net joint torque patterns similar to those of normal unassisted walking. Kao (Kao et al., 2010) suggests that able-bodied subjects aim for similar joint moment patterns when walking with and without robotic assistance rather than similar kinematic patterns. This is the fundamental hypothesis of this approach to obtain muscular forces: the combined actuation of the musculoskeletal system of the SCI subject and the active orthosis produce net joint moment patterns similar to those of normal unassisted walking. The muscle-orthosis redundant actuator problem was solved through a physiological static optimization approach . A comparison between cost functions and various sets of innervated muscles can be found in this work. Based on these results, as Font et al. explained in (Font-Llagunes et al., 2011), the proper actuation can be selected, but control techniques are required to achieve a suitable gait.
The objective of this work is to design an optimal controller based on the minimization of a cost function that takes into account the patients muscle power and the tracking error of the knee angle. For the patients with less capability, the weigh of the muscle power in the cost function will be chosen bigger whereas for patients with more capability, this weigh will be chosen smaller. Therefore, this controller will consider a trade off between accuracy of knee movement regarding to healthy human waking and muscle power of each patient.
The rest of the paper is organized as follows. In Section 2, musculoskeletal modeling is stated. In addition, in order to obtain the muscular power developed by each muscle during gait cycle, the optimization approach proposed in Alonso et al.  is applied. Section 3 addresses the design of the optimal controller. Finally, Section 4 includes the main conclusions of this work.

MUSCULOSKELETAL MODELING
In this section, the biomechanical model adopted to obtain net joint torques for normal walking is presented, as well as the muscle models for the functional (innervated) and partially denervated muscles of the spinal cord injured subject.

Biomechanical multibody model
The biomechanical model used has 12 degrees of freedom. It consists of twelve rigid bodies linked with revolute joints (see Fig. 1), and is constrained to move in the sagittal plane. Each rigid body is characterized by mass, length, moment of inertia about the center of mass, and distance from the center of mass to the proximal joint. The equations of motion of the biomechanical multi-body system can be written as: where M is the global (human-orthosis) mass matrix, Φ T q is the Jacobian matrix of the constraint equations,q is the acceleration vector, Q is the generalized force vector and λ are the Lagrange multipliers. Using kinematic and anthropometric data in (1), the net joint torques during a physical activity or motion and the resultant force and moment due to body-ground contact can be calculated. (complete) to E (normal motor and sensory function). In the design cases C and D, the motor function is preserved below the neurological level (lowest segment where motor and sensory functions are normal), being the difference between them the muscle activity grade of the key muscles. This grade ranges from 0 (total paralysis) to 5 (active movement, full range of motion, normal resistance). As Alonso et al. proposed in (Alonso et al., 2011), the weakness of the denervated muscles is modeled through a weakness factor p ∈ [0, 1] that limits the maximum activation of this muscles.
Both innervated and denervated are modeled as Hill-type actuators. The Hill-type muscle-tendon model (Zajac, 1989;Winter, 1991) is shown in Fig. 2 (a) and 2 (b). It consists of a contractile element (CE) that generates the force, a nonlinear parallel elastic element (PE), representing the stiffness of the structures in parallel with muscle fibers, and a nonlinear series elastic (SE) element that represents the stiffness of the tendon which is serially attached to the muscle and completes the muscletendon unit. The two differential equations that govern the muscle dynamics are:ȧ (2) Equation (2) refers to the activation dynamics, which relates the muscle excitation u from the central nervous system (CNS) and the muscle activation a ∈ [0, 1]. On the other hand, equation (3) defines the force-generation properties as a function of the muscle tendon length l mt and velocity v mt . Activation dynamics is not considered for the purpose of this work.
If the pennation angle α is constant, in accordance with Fig. 2 where the force of the parallel elastic element is set to zero (Ackermann, 2007;Ackermann and Schiehlen, 2006). The tendon (SE) can be modeled by a simple quadratic force-strain curve depending on tendon stiffness as follows: where l ts is the tendon slack length and k t is the SE stiffness, which is given by: being ε 0 (3% to 5%) the strain occurring at the maximal isometric muscle force f 0 (Ackermann, 2007). The force generated by the CE f ce is a function of the activation a, its length l ce , and its contraction velocity v ce . The expression for the concentric contraction (v ce < 0) reads as: whereṽ N ce = v ce /l opt ce , A r = 0.41, B r = 0.52 and f iso = f iso (w, l opt ce , l ce ), which corresponds to the muscle isometric force relative to the maximal isometric muscle force f 0 and f ac = min(1, 3.33a).
The expression for the eccentric contraction (v ce > 0) depends onṽ N ce and f iso . The force-length-velocity relationship is shown in Fig. 2 (c).  (Zajac, 1989). (c) Force-length-velocity model.
In order to quantify the muscle weakness, the muscle activation will be multiplied by the mentioned weakness factor p, where p = 1 for innervated muscles, 0 < p < 1 for partially denervated muscles and p = 0 for totally denervated muscles (no activity). The atrophy of denervated muscles, as exposed by Thomas and Grumbles (Thomas and Grumbles, 2005), depends on the elapsed time from the injury. This atrophy increases the passive torques at the joint. Several studies (Edrich et al., 2000;Lebiedowska and Fisk, 1999;Amankwah et al., 2004) show that passive torques tend to be larger in pathological than in healthy individuals. To take this fact into account stiff and dissipative elements are included into the model using the definitions given in (Amankwah et al., 2004). Fig. 3 shows the increment of the knee torque due to pathological passive torque compared with the torques in normal gait (obtained through inverse dynamics analysis from the 2D walking kinematic benchmark from Winter (Winter, 1991)). As can be observed, only very slight differences can be found between both torques.

Optimization approach. Muscle and orthosis actuation
In order to solve the load sharing problem in biomechanics, optimization procedures are used next. There are several optimization methods (static and dynamic optimization, large-scale optimization) and optimization criteria (minimization of the metabolic cost of transport, minimization of muscle stresses) in the literature (Menegaldo et al., 2006;Yamaguchi et al., 1995). In order to obtain the forces that will be used in the design of the controller, we use the physiological static optimization approach .
This modified version of the classical static optimization approach considers muscle contraction dynamics, ensuring the physiological consistency of the solution. This approach comprises two steps. In the first one, the inversion of the contraction dynamics is solved assuming that muscle activation are maxima. The length (l mt ) and velocity (v mt ) of each tendon unit involved in the process are obtained from the generalized coordinates of the multi-body model and the maximum muscle-tendon length (Gerritsen et al., 1998). Then, the maximum muscle force histories f * mt (t) compatible with contraction dynamics are calculated assuming the muscle activation is maxima at each instant, i.e. A m = [a 1 , . . . , a N ] T = [1, . . . , 1] T . Briefly, for each muscle, the contraction dynamics differential equation is integrated as: In the second step, the muscle activations and orthosis actuation is calculated by solving the optimization problem: where AF * mt = [a 1 · p 1 · f * mt,1 , . . . , a 8 · p 8 · f * mt,8 , o 1 · T * o,1 , . . . , o 3 · T * o,3 ]. With this approach, muscle forces and orthosis actuation are calculated for a gait cycle in order to optimize the cost function and obtain the parameters of the PI controller proposed. The 2D walking kinematic benchmark data from Winter (Winter, 1991) was used to perform an inverse dynamic analysis. This movement corresponds to a healthy female subject with 57.75 kg of weight with normal gait. Once joint torques have been calculated, the optimization problem is solved by using MATLAB routine fmincon implemented in the optimization toolbox that uses a Sequential Quadratic Programming (SQP) method. The simulated muscle-orthosis actuation was performed for an AIS C subject: motor function partially preserved below the neurological level and more than half of the key muscles below the neurological level have a muscle grade less than 3. To simulate this kind of injury, we have defined the following vector of weakness factor: The orthosis actuation prevents stance phase knee flexion due to quadriceps and assists swing-phase flexion depending on the ability of each patient, as shown in the simulation results for the knee in Fig.  4.

Controller design
In order to control the orthosis, a mathematical model of the motor is needed. In particular, the following second order transfer function is used (see (HosseinNia et al., 2011)): To control the orthosis, a classic PI controller is considered as: The aim is to tune the parameters k p and k i in order to optimize the following cost function, with e = θ k re f − θ k . This cost function consists of two parts. The first one corresponds to the muscle power where f mt is the muscular forces obtained by optimization and v mt the muscular velocities. The second part refers to the error between the knee angle θ k and the reference knee angle θ k re f , respectively. Two weights 0 < β < 1 and (1 − β) can be chosen regarding to the muscle power of the patients. The idea is to design an optimal controller based on the patients muscle power and the tracking of a reference signal, where, for the patients with less muscular capacity, β will be chosen bigger in order to minimize power and perform the movement and, for patients with more capacity, the value of β will be minor, so the cost function prioritizes the minimization of the tracking error and the movement is going to be made in less time. Therefore, this controller will consider a trade off between accuracy of knee movement (concerning healthy human walking) and muscle power of each patient, taking into account that patients with less capability need more time to perform the same movement.
In order to show the performance of the proposed method, the controller will be designed regarding to the following three weight options: • β = 0.1 for the patients with low disability, • β = 0.5 for the patients with fair disability, • β = 0.9 for the patients with high disability. Fig. 4 shows the orthosis torque, muscle torque and total torque corresponding to each controlled system (the controller parameters ara given in Table 2). As can be seen, prioritizing the muscular power with a big value of β, we consider that patients have a major disability and the assistance torque provided by the orthosis should be higher to compensate the deficiency. On the other hand, prioritizing the tracking error with a low value of β means that patients have more ability to perform the movement, so the torque provided is lower and the movement is achieved in less time with more accuracy. The final times corresponding to each case are calculated based on minimizing the following mean of integral squared errors (MISE):    5 shows the effect of the disability of the patients in final times. As can be observed, patients with higher β (considered with disability) need more time to perform the complete gait cycle than patients with low value of β, corresponding to low disability. In the same way, high disability correspond to higher tracking error, and lower disability correspond to a better accuracy in the performance of the movement compared with the healthy subject.

CONCLUSIONS
In this paper, in order to control an orthosis, an optimal approach is proposed to design a PI controller according to disability of the patients. This disability is simulated by means of physiological static optimization approach where the muscular forces of SCI are obtained in a process that combines the actuation of the muscles and the external actuation provided by the orthosis. Those forces are used to design a proper controller for the external actuation. Considering patients with a high disability, the controller is tuned to perform the movement so as to allow the patient to achieve the movement but in a longer cycle compared with patients with less disability, where the controller is tuned giving priority to the accuracy of the movement. Patients with less power in his muscle -high disability-, need more time in a gate cycle to walk, whereas patients with low disability need less time. This idea is shown through some three types of disability, i.e. high disability, fair disability and low disability. The simulation results show the efficiency of the proposed method.