Genetic Algorithm Application in Swing Phase Optimization of AK Prosthesis with Passive Dynamics and Biomechanics Considerations

A long standing common goal for engineers and physiologists has been to exploit the unique designs of the body to develop anthropomorphic artificial limbs that exhibit humanlike stability, strength and speed in a variety of natural environments and also have similar mechanical behaviours and strength. Although tremendous technological progress has been made in rehabilitation technology, orthotic and prosthetic (O&P) limbs cannot yet perform as well as their biological counterparts.


Introduction
A long standing common goal for engineers and physiologists has been to exploit the unique designs of the body to develop anthropomorphic artificial limbs that exhibit humanlike stability, strength and speed in a variety of natural environments and also have similar mechanical behaviours and strength.Although tremendous technological progress has been made in rehabilitation technology, orthotic and prosthetic (O&P) limbs cannot yet perform as well as their biological counterparts.
Study on biomechanics and new models of walking have led to establish frameworks for making improvements in prostheses performance.As electromyography muscle signals (EMG) (Basmajian & Tuttle, 1973) showed a low level of muscular activity in human and gorilla legs during walking, ideas on biped mechanisms, able to walk without any joint actuations or active controllers were formed.Modelling the ballistic motion assumption of human swing leg during normal walking was proposed by (Mochon & McMahon, 1980) and since then it has been improved by others.Afterwards, the term Passive-dynamic walking was devised.Passive-dynamic walking machines that walk on shallow slopes were first designed, simulated and built by Tad McGeer (McGeer, 1990a, 1990b).These machines consist of hinged rigid bodies that make collisional and rolling contact with a slope, rigid ground surface.They are powered by gravity and have no active control (Lotfi et al, 2006).
One main advantage of passive dynamic bipeds is their simplicity which makes them easier to understand, build and modify.Although they are the most energy efficient ones, they are not able to support multi-behaviours, and this is because of their dependency on gravity as source of energy and their rigid structure.In order to have multi-behaviour systems some basic changes like adding active elements (actuators) or considering compliant elements (joints and links) are necessary (Baines, 2005).
Either the swing phase motion assumed as a passive motion or not, the importance of multi behaviour function of an above knee (AK) prosthesis is obvious, as the published results by Zahedi represents that changing walking speed happens considerable times during a day, and also other behaviours like stop, standing, ascending or descending ramps and stairs.So some controlling parameters are needed to alter the function of prosthesis.As prosthetic knee joints with different types of controlling parameters can be considered as an intelligent robot, so it has made necessary the combination of biomechanics and robotics results in the electronically controlled knee joint.In this way the basic principle is detection of the current state of amputee gait by integrated sensors and real-time adaptation of the flexion and extension resistances of the prosthetic knee (Zahedi, 2004).In this way Zarrugh and Radclif simulated the swing phase dynamics of an amputee wearing an above-knee prosthesis with a four-bar knee mechanism using a pneumatic swing control unit, which provides an analysis process in evaluating prosthetic devices at design stage (Zarrugh & Radclif, 1976).Tsai and Mansour compared hydraulic and mechanical knee swing phase simulation and design of above knee prostheses (Tsai & Mansour, 1986).Blumentritt studied a rotary hydraulic prosthetic knee mechanism for a transfemural amputee (Blumentritt et al., 1998).Kim and Oh developed an above knee prosthesis using magnetorheological damper (Kim & Oh, 2001).A comparison between a magnetorheological controlling prosthetic knee and a conventional model was done in (Herr & Wilkenfeld, 2003).Kapti and Yucenur also worked on design and control of an active artificial knee joint (Kapti & Yucenur, 2006).A biomimetic variable-impedance kneed prosthesis was proposed by Vilalpando and Herr in order to improve gait and metabolic energy consumption of above-knee amputees on variant terrain conditions (Vilalpando & Herr, 2009).Joshi and Anand studied on smart and adaptive lower limb prosthesis and discussed about electrorheological and magnetorheological fluids actuators.Vilalpando and Herr continued their design in their variable-impedance kneed prosthesis so called the agonist-antagonist active knee, which comprises an active powered knee with two series-elastic actuators positioned in parallel in an agonist-antagonist arrangement which were optimized to minimize level-ground walking electrical energy cost (Vilalpando & Herr, 2009).
As previously mentioned changing the stance on prosthetics form passive systems to active ones implies energy consumption in prostheses.That is why optimization in the imbedded controlling parameter in order to reduce energy consumption and form a more natural gait is necessary (Karimi, 2010;Tahani & Karimi, 2010).In this study genetic algorithm is applied as an evolutionary method in order to optimize the involved parameters in a way that the deviation of the prosthesis shank angle from its natural pattern is reduced and also optimize the variation pattern of a controlling parameter (SEP) for the best performance of the prosthesis.

A new prosthesis
One of the recent applications of robotics is in newly devised prostheses which can improve amputee's gait and safety beside its multi-behaviour function on various terrains.These benefits are acquired by energy consumption and using different controlling parameters.The prosthesis which is the subject of this study comprises SEP controlling parameter in knee joint.

SEP
SEP is a controlling parameter which has direct effect on AK prosthesis acceleration and generally motion of the leg during swing phase.In modelling of this phase of human walking in an above knee prosthetic leg, Figure 1, the shank angular position pattern varies according to different knee torsion Spring End Position (SEP).SEP parameter, adjusts the jam/elongation of spring and consequently the initial acceleration in the prosthesis knee.This idea led us to optimize a variation pattern for this parameter in order to obtain a normal swing motion for the prosthesis.Figure 1 represents the SEP controlling parameter.The most important advantage of the variable impedance controlling parameter is its ability to adapt the motion on variant terrain conditions.The SEP, acts as a variable-impedance controlling parameter which has no limitations in adaption to polycentric knee mechanisms or large flexion angles in comparison to other variable-impedance ones.

Dynamic equation
The dynamic modelling of an AK prosthesis is according to Lagrange dynamic equation method which is based on variation of kinetic and potential energy of the system.This system is assumed to act as a 2D open kinematical chain in sagittal plane which its ankle joint moves according to the natural pattern., , , , , , , , , , , , , , , , = In (1) x B is the horizontal motion of support, y B is the vertical motion of support, l 1 is the distance between the prosthesis shank link centre of mass and knee joint, T is the thigh angle, B is the shank angle, A is the ankle joint angle, m 1 is the prosthetic shank mass, k is the stiffness coefficient, c is the damping coefficient and SEP is the spring end position.In passive modelling SEP is not a variable and is set in a specific amount.

Modelling considerations
In modelling the prosthesis after deriving governing equation, geometrical, initial and boundary conditions should be determined.In order to achieve an anthropomorphic prosthesis the geometrical data should be in accordance with anthropometry.On the other hand initial and boundary conditions have to be driven from natural gait and anthropometric data combination through a dynamic simulation.

Anthropometry
In prosthetic limb design, there have to be an exact similarity between the physical and geometric dimensions of prosthesis and it's sound limb.So the amputee's lost limb dimensions have to be obtained from anthropometric data references in order to be applied in the design of such devices.
No. Segment Formula Amount (mm) for H=1770 In this paper, the segmental dimensions are gathered in Table1 from the study of Yeadon and Morlock (Yeadon & Morlock, 1989) which is in adaption to (Winter, 2009) anthropometric data.More information about segments dimensions are included in Figure 2.
The item numbers 2, 3 and 4 in Table1 are directly presented in dynamic equation but all the items in the fourth column of this table are the geometric data considered in simulation.

Natural gait
Gait is a functional task requiring complex interactions and coordination among most of the major joints of the body particularly of the lower extremity.This fundamental task has been the subject of study by scientists for several centuries, both with description of typical body movements and of pathological conditions and therapeutic interventions (Nordin & Frankel, 2001).In brief, a gait refers to a particular sequence of lifting and placing the feet during legged locomotion.Gait analysis is useful for evaluating the effectiveness of prosthetic limbs, including their alignment, design, and performance, and for assessing orthotic designs and modifications (Gage et al., 2008).
According to the natural gait the following requirements for prosthetic knee function can be considered during level walking.At heel strike the prosthetic knee must be stabilized as the foot begins plantar flexion.During this Load Bearing period, the prosthesis has two major functions: body weight support and reduction in the impact of heel strike.This is achieved by a yielding flexion of the knee joint, which requires high flexion resistance.During the single support phase, the body moves over the stabilized leg like an inverse pendulum.
During this phase, the ground reaction force vector changes its position from heel to forefoot.This means that the flexed knee tends to extend rapidly so an appropriate extension resistance is necessary to prevent abrupt extension of the knee.This resistance should adapt to different gait speeds.As it is represented in Figure 3, swing phase starts with the knee already flexed 30 degrees; the maximum knee angle is 55 to 65 degrees and time for achieving this range of knee motion is very short.The prosthetic knee should start with minimal flexion resistance and adapt automatically to a wide range of gait speeds.At mid-swing the shank changes the direction of rotation due to mass reaction forces and the knee starts to extend.Terminal swing phase starts when the shank is in vertical position and ends when the extended leg hits the ground again.It is important that the knee joint extends quickly so that the leg is fully extended, yet the terminal impact should be minimal.So we can conclude that the important approach in stance phase is the system strength and components elasticity and in swing phase is the transition and dynamics.
The final conditions of the swing phase is the initial condition of double limb support and stance phase in human walking which is represented in Fig. 2.Many tries have been made to improve the swing phase.The importance of pendulum motion of swing leg during the inverse pendulum behavior of stance leg in swing phase is, that in specific time it has to get to the exact position in order to make the heel strike and bear the ground reaction forces to avoid falling down and make a continuous cyclic motion.Beside the mentioned necessity in order to obtain the continuous human like walking motion, the trajectories of prosthesis motion have to be similar to natural limbs trajectories which are one of the gait analysis results.The trajectories conformity is much more important in prosthesis design than biped robots.
Fig. 2. Anthropometric segment length of human body as a function of body height (Winter, 2009).
The gait analysis data that is used as natural pattern in composition and optimization of the model are gathered from a study results (Anderson & Pandy, 2001) in which the data have been obtained from five healthy adult males with the average age of 26 3  years.The subject's mass average was kilograms and the average of their height was centimetres.The subjects walked at an average speed of 81 meters per minute, which is very close to the optimal speed.The standard data is included in Table2 in which the natural joint angles in sagittal plane are presented at 43 time steps.

Simulation
In order to form initial and boundary condition compatible for the dynamic equation, the anthropometric and natural gait data have to be combined.Table3 represents the output of the simulation including the initial and boundary conditions required for solving and optimization of this prosthesis.In addition to getting the required data, this simulation enables checking whether the natural gait and anthropometric data are well-matched.As there is no scuffing in the period of simulation during swing phase the gait data seem to be perfectly compatible with the anthropometric data.Figure 4 shows the sequences of swing phase in simulation.

Solving method
Second order Taylor series is a numerical method in solution of such equations.The period of swing motion is divided into 43 time steps.ℎ= = .
The step period Derived from the dynamic equation at the i time step = +ℎ (4) Equations ( 2), ( 3), (4), and ( 5) represent the principle of the cyclic numerical solution process.
The shank orientation, B, is planned to be optimized by means of genetic algorithm.It is obvious that B 1 and are comprised by initial condition.

Optimization
The prosthesis optimization can be performed according to different approaches, generally, minimizing energy expenditure, and minimizing the kinematical deviation from a standard pattern.The optimizing parameters are stiffness and damping coefficient of knee joint and inertial properties of the shank link.Fixed and moving ankle assumptions are two different states in the design of prosthesis which are compared according to the obtained results.
In order to design and fabricate prosthetic legs able to perform efficient multi behaviours the same as their natural counterparts considering physical parameters such as mass amount mass distribution, joints stiffness and damping as controlling parameters is necessary.

Optimization procedure
There are two distinct approaches in optimization of this problem which relates to considering only physical properties or both physical properties and SEP controlling parameter.

Passive prosthesis optimization
In this approach only physical parameters are applied to optimize the performance of prosthesis and as previously mentioned physical parameters are the shank mass amount (m ), the shank centre of mass (l ), knee joint damping and knee joint stiffness coefficients (c and k).After adding initial and boundary condition and other constant values like foot mass to the dynamic equation, the optimizing program guesses the physical properties.Afterwards the mentioned solving method will determine the resulted shank angle.Using an evolutionary algorithm to find the best gesture for physical properties in order to form the most similar pattern of walking to the natural one is the rest of optimization procedure.

SEP prosthesis optimization
In this approach in addition to the input data the SEP pattern is also needed as a variable in the dynamic equation.So initially there should be a procedure to determine the SEP pattern.SEP pattern is obtained from the dynamic equation to which natural shank angle, initial and boundary condition are added by using an evolutionary program in which it is tried to minimize the domain of resulted SEP pattern variation during swing phase.
Adding all the provided data to the dynamic equation and again using an evolutionary program to optimize the physical properties are similar to the passive optimization.In this way the best physical properties are determined for the best SEP pattern.In this study the evolutionary program which is applied in the optimization procedure is genetic algorithm.

Genetic algorithm
Evolutionary algorithms are optimization procedures that search for the solution that optimize a given function in a prescribed search space.Each solution (individual) is represented by the integer or real values of a finite number of variables, which can vary in prescribed intervals.The optimization procedure is usually started by generating the initial population of individuals in a random way (the first generation).Each algorithm is characterized by its own rules that force the evolution of the population to favor the improvement of the function to be optimized.Some parameters, typical of each algorithm, control the evolution and determine the algorithm capability of finding the optimal solution (Sentinella & Casalino, 2009).
Genetic algorithms as an evolutionary method are stochastic iterative processes that are not guaranteed to converge; the termination condition may be specified as some fixed maximal number of generations or as the attainment of an acceptable fitness level (Baydal et al.).Figure5 represents the genetic algorithm proceeding.
In this algorithm the optimizing parameters are the shank mass (m ), shank centre of mass position (l ), knee torsion stiffness (k), and damping coefficient (c) which are obtained by decoding each 48 character length chromosomes of a generation.Chromosomes population of each generation is 1500.The first generation is randomly produced.In this study the fitness function is based on the difference between the calculated angle of shank and the natural pattern and it tries to minimize the amount of fitness value.
After solving the dynamic equation according to the mentioned optimization procedure for each chromosome fitness value is determined.If none of the fitness values of the generation attain the termination condition (0.001), the cyclic function of this program will compose a new generation by familiar processes including selection, crossover and mutation.In this study the maximum number of generations can reach to 6000.Afterwards the lowest amount of fitness value ever in all generation specifies the result of optimization.
The selection process is designed according to roulette wheel, which selects the individuals according to the inverse of the amount of fitness value.In crossover; each parent chromosome is divided into four parts to compose an offspring.The possibility rate of crossover is defined 0.9.Mutation process is also another function which its possibility rate

Results
AK prosthesis models represented acceptable results in comparison to natural walking.The physical parameters of the prosthesis which have shown in Table4 are optimized to minimize the deviation of resulted shank angle from the natural pattern according to walking gait data and its relevant anthropometry.Passive prosthesis optimization also results into the shank angle pattern which is represented in Figure 8 in comparison to the natural pattern.On the other hand SEP prosthesis optimization initially determines the SEP pattern which is depicted in Figure 9.
The shank angle pattern of the optimized SEP prosthesis and its natural pattern are also shown in Figure 10.

Conclusion
In this study the prosthesis physical parameters were optimized via genetic algorithm method and led us to the following conclusions: Beside the undeniable effect of a controlling parameter in making a prosthesis multi behaviour it improves performance of the prosthesis to make more natural behaviours.
According to the resulted physical properties, using a controlling parameter (SEP) reduces the prosthesis mass which is highly appreciated and also decreases the amount of damping coefficient and dissipative energy.

Fig. 1 .
Fig. 1.Represents the SEP controlling parameter.Alpha angle is the SEP.

Table 1
. Body segment lengths expressed as a fraction of body height H.

Table 2 .
Natural joint angles during swing phase of level walking. www.intechopen.com

Table 3 .
Natural, initial and boundary conditions required for solving and optimization

Table 4 .
The maximum deviation resulted in optimization of each model is represented in the fitness value column in the table.Physical parameters of the prosthesis.