+ All Categories
Home > Documents > An Optimization Design of Artificial Hip Stem by Genetic Algorithm

An Optimization Design of Artificial Hip Stem by Genetic Algorithm

Date post: 12-Sep-2021
Category:
Upload: others
View: 1 times
Download: 0 times
Share this document with a friend
13
An Optimization Design of Artificial Hip Stem by Genetic Algorithm and Pattern Classification Final Project for Introduction to Artificial Neural Networks and Fuzzy Systems Xingchen Liu [email protected] Department of Mechanical Engineering University of Wisconsin Madison December 23, 2010
Transcript
Page 1: An Optimization Design of Artificial Hip Stem by Genetic Algorithm

An Optimization Design of Artificial Hip Stem by Genetic Algorithm and Pattern Classification

Final Project for

Introduction to Artificial Neural Networks and Fuzzy Systems

Xingchen Liu

[email protected]

Department of Mechanical Engineering

University of Wisconsin – Madison

December 23, 2010

Page 2: An Optimization Design of Artificial Hip Stem by Genetic Algorithm

1

Introduction

The total hip arthroplasty was first elaborated by Charnley in 1961 and well

developed in the 1980s. Now Total hip arthroplasty (THA) has become the

second most performed surgical procedure with an estimated number of more

than 1,000,000 operations each year worldwide. [1]

THA is performed because of

osteoarthritis in the hip joint. The stress, displacement, amount of wear, and

fatigue may dictate how the implant is performing.[2]

Complications of THA are often attributed to the distribution of mechanical

stresses over the Bone–Artificial Hip Stem interface. Stress patterns in these

contact regions mainly depend on three factors: the magnitude and orientation of

the load; the elastic, yield and fracture properties of the femur, hip stem materials;

and the geometry of the implant hip stem.[3]

One can alter the geometry and/or

the mechanical properties of the components to minimize potential complications.

The goal of minimizing the potential complications is usually expressed in terms

of optimizing some measure of the stresses.

By the theory of plasticity, yield criteria for the failure mode of any single

material (e.g. von Mises stress) may be used to describe failure within the bone

or cement at the interface. This approach is based on the idea that failure begins

within the interfacial material and that interface loosening results from crack

propagation.

By using a three-dimensional (3D) finite element model (FEM) and equivalent

stress-based objective functions, we could apply numerical shape optimization to

the femoral component of THA.

Approach

Geometry modeling

To the best of the author`s knowledge, there have been no studies published

reporting geometry modeling beyond the dependence on the Boolean operation of

basic geometric shapes, which involves location dimension such as neck angle,

the height of cross-section and geometry dimension such as stem length,

cross-section dimension, neck length, and ball diameter. This kind of design as

well as model representation leads to limited design variables and the failure of

C1 and/or C2 continuity.

For a better design flexibility, a freeform model is introduced. The stem is

represented by B-splines. By updating the parameter matrix of the B-splines, the

geometry of the Artificial Hip Stem may regenerate. The cement model may

generate by the Boolean operation of the femur model and Artificial Hip Stem

model.

Finite Element Method

The Finite Element Method (FEM) is a suitable technique for surgeons and

engineers to use when selecting and evaluating the stem. FEM allows detailed

visualization of where structures bend or twist, and indicates the distribution of

stresses and displacements. FEM software provides a wide range of simulation

options for controlling the complexity of both modeling and analysis of a system.

In this project, the von Mises stress calculated by FEM will be used to define an

Page 3: An Optimization Design of Artificial Hip Stem by Genetic Algorithm

2

objective function for the optimization problem.

Numerical optimization

The Artificial Hip Stem model contains a large number of parameters and is

derivative-free that cannot be easily optimized by the standard non-linear function

optimization techniques. The problem can be subject to a Global Optimization

problem:

𝑓(X∗) ≤ 𝑓(X); X ∈ 𝑆

The search of optimal by traditional optimization methods can sometimes be

fooled into declaring convergence far short of the true optimum because of high

dimensionality and irregularities contained in the objective function response such

as multiple optima, unsmoothness, discontinuity, elongated ridges, fiat plateaus

and so on. These difficulties may, however, be overcome to a large extent by

Genetic Algorithms (GA), which approach the optimization problem very

differently.

Genetic algorithms are implemented in a computer simulation in which a

population of abstract representations (called chromosomes or hene) of candidate

solutions (called individuals, creatures, or phenotypes) to an optimization problem

evolves toward better solutions. The evolution usually starts from a population of

randomly generated individuals and happens in generations. In each generation,

the fitness of every individual in the population is evaluated, multiple individuals

are stochastically selected from the current population (based on their fitness), and

modified (recombined and possibly randomly mutated) to form a new population.

The new population is then used in the next iteration of the algorithm. Commonly,

the algorithm terminates when either a maximum number of generations has been

produced, or a satisfactory fitness level has been reached for the population.

Efficiency enhancement

Not all the data generated in the geometry modeling step will be valid or

meaningful to be a solid or for Finite Element Analysis (FEA). If one can tell the

whether or not the data generated in the geometry modeling step can be used for

the FEA, the efficacy of the program will be improved a lot (as the time

consumption of FEA is huge).

Patten classification will be a suitable tool to solve this problem. Multi-Layer

Perceptron (MLP) will be used as the classifier. A MLP is a feedforward artificial

neural network which consists of multiple layers of nodes in a directed graph.

MLP utilizes a supervised learning technique called backpropagation for training

the network. MLP is a modification of the standard linear perceptron, which can

distinguish data that is not linearly separable.[4]

Implementation

Geometry modeling in SolidWorks

The 3D model will be built in SolidWorks. A SolidWorks Add-in is programed in

order to randomly generate a generation of 3D Models under the boundary

condition as the first generation of Genetic Algoithom. The precedure of

generating a Artificial Hip Stem programmingly is listed below:

Page 4: An Optimization Design of Artificial Hip Stem by Genetic Algorithm

3

Step 1:

A B-spline will be drawn as the guideline of the Artificial Hip Stem under

the certain boundary condition.

Fig. 1 B-spline guideline Fig. 2 Six intersection planes

Step 2:

Random Select 4 points between start point and end point on the spline. Six

intersection planes will be built based on these points and corresponding

normal of eh B-Spline. (Fig.2)

Step 3:

Six intersection contours will be drawn by B-Splines. (Fig. 3)

Fig. 3 Six intersection contours

Page 5: An Optimization Design of Artificial Hip Stem by Genetic Algorithm

4

Step 4:

A loft surface will be generated based on these intersection contours. (Fig. 4)

Fig. 4 Loft surface Fig. 5 Finished Artificial Hip Stem

Step 5:

The last step of Geometry modeling is to build a ball head, which is going

to contact the pelvic. (Fig.5)

Finite Element Analysis by SolidWorks Simulation

The Finite Element Analysis will be supported by SolidWorks Simulation. When

the model generation finished, FEA will programmingly conduct static stress

analysis.

The material used for the Artificial Hip Stem is Ti-6Al-4V, with mechanical

properties shown in Fig.6.

Fig. 6 Mechanical properties of Ti-6Al-4V

Page 6: An Optimization Design of Artificial Hip Stem by Genetic Algorithm

5

To perform analysis, the bottom surface will be fixed and a 7000N force will be

applied on the ball head towards the bottom surface. A sample result is illustrated

in Fig. 7.

Fig. 7 Sample result of FEA

After the Finite Element Analysis, a text-file recorded the geometric information

as well as the result of the Finite Element Analysis will be outputted. (Fig.8)

Fig.8 Text-file recorded the geometric information and FEA result

Genetic Algorithms

Generally, a typical genetic algorithm requires: a genetic representation of the

solution domain, a fitness function evaluating the solution domain and

reproduction rules including cross-over rules and mutation rules. In our model,

the genetic representation will be the parameter matrix of the B-splines and the

fitness function will be the result of Finite Element Analysis (FEA) of the

freeform 3D feature.

Page 7: An Optimization Design of Artificial Hip Stem by Genetic Algorithm

6

The basic structure of GA:

Step 1:

Set up an initial population P(1)—an initial set of solution

Evaluate the initial solution for fitness

Generation index t=1

Step 2:

Perform annihilate inferior

Use genetic operators to generate the set of children (crossover, mutation)

Add a new set of randomly generated population

Reevaluate the population

If not converge or reach a certain number of loop, t←t+1

Go To Step 2

In this part, the program will first read the data text file of a whole generation

into the memory, sort them based on the performance in Finite Element Analysis.

The last 80% will be annihilated to making room for new genes. New

chromosomes will be generated by reproduction rules, including Simple

Crossover (Fig. 9), Arithmetic Crossover (Fig. 10) and Mutation (Fig. 11).

Genetic Algorithm is implemented by C#.

Fig. 9 Simple Crossover

Page 8: An Optimization Design of Artificial Hip Stem by Genetic Algorithm

7

Fig.10 Arithmetic Crossover

Fig. 11 Mutation

Multi-Layer Perceptron Classifier

Pattern classification will be used in this step to get rid of the 3D Model that may

be failed at FEA in testing data. Vectorize parameter matrix of the first generation

to be the feature vector of the training data for MLP classifier. The validity of the

data generated in the geometry modeling step will be recorded as the label vector

to the corresponding feature vector for pattern classification. The new generation

of 3D Model will be the feature vector to the testing data for pattern classification.

Initially, 840 models which will be generated randomly will be used as training

data set. For each input feature, mean and variance will be identified for analysis

and pre-processing the data set. After pre-processing, a 79-dimension feature

vector will be used in training the MLP classifier. A 79-90-2 structure for MLP

will be used, and a 100% classification rate on training data can be reached.

Page 9: An Optimization Design of Artificial Hip Stem by Genetic Algorithm

8

MATLAB Builder NE, which is an extension to MATLAB Compiler is used to

convert MATLAB functions to .NET methods.

Step 1:

Type deploytool in Command Window, a Deployment Project dialogue box

will promot. (Fig. 12)

Fig. 12 Deployment Project dialogue box

Step 2:

In the ―Build‖ Tab, add a class which corresponds to the .Net Class Name,

and .m files, each .m file (i.e. a MATLAB function) corresponds to a

method of the .Net Class. (Fig. 13) Then click the Build button.

Fig. 13 Add class mlpcclass and function bptest, bptesap and mlpc

Step 3:

Open C# project in Visual Studio and add generated .dll file: mlpcprj.dll,

mlpcprjNative.dll and MWArray.dll into the project references. (Fig. 14)

Step 4:

Add using mlpcprj; using MathWorks.MATLAB.NET.Utility; using

MathWorks.MATLAB.NET.Arrays; into heading. Use mlpcclass mlp1 =

new mlpcclass(); to initialized the class.

A sample Windows Console Program was developed to show the results

(Fig. 15)

Page 10: An Optimization Design of Artificial Hip Stem by Genetic Algorithm

9

Fig. 14 References used in the program

Fig. 15 Sample program to test classification

Results

The variance used in Genetic Algorithm is 400 populations for a generation and

totally 25 generations will be tested. Parents (good gene from old generation) will not

be killed during the process, so the maximum stress during the process will be

monotonically decreased. The improvement of mechanical property is dramatic at

beginning but getting smoother during the process. No improvement was made in the

last four generations.

Page 11: An Optimization Design of Artificial Hip Stem by Genetic Algorithm

10

The final design parameter for the Artificial Hip Stem is:

Guide B-Spline Curve:

Control Pt. 1 2 3 4 5 6

X -0.00769 0.003298 0.001528 0.004741 0 0

Y 0.015383 -0.01193 -0.03993 -0.06521 -0.12 -0.15

Six Intersection Contours:

Control Pt. 1 2 3 4 5 6

Contour

1

X -0.011 -0.0055 0.0055 0.011 0.0055 -0.0055

Y 1.35E-18 -0.00953 -0.00953 -1.25E-17 0.009526 0.009526

Contour

2

X -0.01034 -0.0006 0.006505 0.018053 0.009768 -0.00491

Y 0.003159 -0.00867 -0.01117 -0.00315 0.010466 0.012078

Contour

3

X -0.00948 -0.00703 0.006853 0.008576 0.004291 -0.0028

Y 0.001115 -0.00802 -0.00907 -0.0031 0.009015 0.009637

Contour

4

X -0.00846 -0.00576 0.004627 0.009692 0.005603 -0.00804

Y -0.00061 -0.01003 -0.01342 0.001323 0.009461 0.005343

Contour

5

X -0.00958 -0.00537 0.004693 0.009959 0.005895 -0.0049

Y 0.000535 -0.0102 -0.01067 0.004075 0.007299 0.012272

Contour

6

X -0.01044 -0.00625 0.009824 0.011521 0.003779 -0.00123

Y -0.00152 -0.01063 -0.00858 -0.00355 0.006373 0.00934

0

200000

400000

600000

800000

1000000

1200000

1400000

1 3 5 7 9 11 13 15 17 19 21 23 25

von Mises

von Mises

Page 12: An Optimization Design of Artificial Hip Stem by Genetic Algorithm

11

Final Design of the guide curve and six contours:

Final Design of Artificial Hip Stem:

Page 13: An Optimization Design of Artificial Hip Stem by Genetic Algorithm

12

FEA on the final design:

References:

[1] Abdul-Kadir, MR, U Hansen, R Klabunde, D Lucas, and A Amis. Finite Element

Modelling of Primary Hip Stem Stability: The Effect of Interference Fit. Journal of

Biomechanics 41, no. 3 (2008): 587-94.

[2] Bennett, D, and T Goswami. Finite Element Analysis of Hip Stem Designs. Materials and

Design 29, no. 1 (2008): 45-60.

[3] Bergmann, G, G Deuretzbacher, M Heller, F Graichen, A Rohlmann, J Strauss, and GN

Duda. "Hip Contact Forces and Gait Patterns from Routine Activities." Journal of

Biomechanics 34, no. 7 (2001): 859-71.

[4] Cybenko, G. 1989. Approximation by superpositions of a sigmoidal function Mathematics

of Control, Signals, and Systems (MCSS), 2(4), 303–314.


Recommended