ap-4-10.dvi Acta Polytechnica Vol. 50 No. 4/2010 A Study of Gait and Posture with the Use of Cyclograms O. Hajný, B. Farkašová Abstract Present-day science makes extensive use of the simulation. Our work focuses on simulating human gait. Simulations of human gait can be used for prosthetics and therapy e.g. rehabilitation, optimizing the movements made by sportsmen, evaluating advances in rehabilitation, etc. Methods of AI can also be used for predicting gait movement and for identifying disorders. Our project is about measuring human gait, simulating the musculo-skeletal system in order to study study walking and predicting and quantifying gait with the use of neural networks. The research is being carried out in the biomechanics laboratory at FBE CTU, and is intended for use in clinical practice at the 2nd Faculty of Medicine, Charles University. Keywords: simulation, human body model, walking, artificial intelligence, gait angles, bilateral cyclograms. 1 Methods For a study of gait angles, we decided to use meth- ods based on measurements of the geometric proper- ties ofbilateral cyclograms(also calledangle-angledia- grams). The symmetrymeasuresare simple andphysi- callymeaningful, objective, reliable andwell suited for a statistical study [1]. Furthermore, the technique is strongly rooted in geometry and the symmetry mea- sures are intuitively understandable [3]. Depending on the cyclicity of the gait, cyclograms are closed tra- jectories generated by simultaneously plotting two (or more) joint variables. In gait study, the easily iden- tifiable planar hip-knee cyclograms have traditionally received the most attention. In order to quantify the symmetry of human walking, we also obtained and studied cyclograms from the same joint from two sides of the body [2]. Fig. 1: Illustration of marker movements 1.1 Measuring systems We used two methods for measuring gait and move- ment: an infrared (IR) camera with active markers, and a web camera. First, we had to measure a human gait to obtain a quantumofdata. For this purpose, we used two methods of movement in the space measure. The firstmethod used an IR camera (Fig. 2.) with ac- tivemarkers (LukotronicAS 200),whichwas available fromthe externalworkplaceJointCTUDepartmentof Biomedical Engineering and Charles University. We placed LED diodes markers on the measured person at the following points: malleolus lateralis, epicondy- lus lateralis, trochanter major and spina iliaca ante- rior superior. By this method we were able to register the movement in three dimensional space. The sec- ond method was to record a video of human walking, using a web camera. The video was consecutively an- alyzed in Coach6, version 6.1. In this case, we made our own circular markers, which contrasted with the clothing of the measured person, who was dressed in black. TheCoach6programis anadequate tool for de- tecting themarkers. We chose frames of the video that were usable for our analysis, and we marked the posi- tions of the markers in them, one by one. This video method providedonly two-dimensional co-ordinates of the captured markers. Fig. 2: LUKOtronik AS200 IR camera system [6] 1.2 Model A model of human body was created in the Matlab (Mathematic Laboratory), version R2008b environ- ment with SimMechanics (Simulink toolbox) for sim- ulating and modeling mechanical elements and their directions. To create a model of the human body we used the SimMechanics tool blocks. For a practically 48 Acta Polytechnica Vol. 50 No. 4/2010 useable model, a big block was built to form the base of the model. A skeletal was formed by a body block and custom joints. With the help of the joint actua- tor block, the data acquired by one of the measuring systems was imported to the body model. Using the joint sensor block, data could be exported from the body model (Fig. 3). Fig. 3: Model of a human body created in the Simulink workspace [5] The presentmodelwas updated by themass of the body. The user working with the program filled in a small form including information on height, weight and sex. With a subprogram we computed the length and weight of each segment of subject’s body. Several methods can be used for determining the weight of the individual segments. Unfortunately, none of them is absolutely exact, so we have to count with a weight error. We decided to calculate the mass of the segments by means of experimentally acquired coefficients. The coefficients are stochastic, and apply- ing them for an average population involves a weight error, because the authors (Zatsiorsky, Bohn, Shan, et al.) carried out their experiments on a different pop- ulation. We wanted to calculate the weight of the individ- ual body segments. The optimal equationusing exper- imentally appointed coefficients B0i, B1i a B2i takes the form: mi = B0i + B1i · m + B2i · h. (1) Where mi is the weight of an individual seg- ment (kg), m is the total weight of the subject, and h is the height of the subject (cm). Table 1 shows our experimentalweight coefficients. Other methods for finding out the weight of the seg- ments can also be used, e.g. subaqueous weighing ac- cording to the Archimedes principle. However, this method is not applicable for our example. We can compute the loading of the joints and the moments of inertia of the body segments using a sim- ilar equation: Iti = B0i + B1i · m + B2i · h (2) Table 1: Weight coefficients for computing the weight of the segments Weight coefficient segment B0i B1i B2i Foot −0.8290 0.0077 0.0073 Shin −1.5920 0.0362 0.0121 Femur −2.6490 0.1463 0.0137 Hand −0.1165 0.0036 0.0017 Forearm 0.3185 0.0144 −0.0011 Upper arm 0.2500 0.0301 −0.0027 Head 1.2960 0.0170 0.0143 Upper torso 8.2144 0.1862 0.0584 Medial torso 7.1810 0.2234 −0.0663 Lower torso −7.4980 0.0976 0.0490 Our body model was created mainly to calculate the angles in the joints and to use the results in the simulation of human gait. To compute the angles we used equation (3): cosϕ = u1v1 + u2v2√ u21 + u 2 2 · v21 + v22 (3) for the two-dimensional system, where u1, u2, v1, v2 are thevectorsof thebody segments (femur, shin, foot, etc.) represented by at least two points as markers. Fig. 4: Figure of the computed angle in the knee For computing the angles in the three-dimensional system, the model uses the following equation: cosϕ = u1v1 + u2v2 + u3v3√ u21 + u 2 2 + u 2 3 · √ v21 + v 2 2 + v 2 3 (4) Based on this equation, the model is able to calcu- late the angles in the hip, knee and ankle if there are enoughmarkers. In the LukotronicAS200 system, the 49 Acta Polytechnica Vol. 50 No. 4/2010 maximum number of markers is 32, but we had a lim- ited editionwith 10markers. With 32markerswewill be able to measure more joints in the body, including the upper extremities, but this is beyond the scope of our project. By means of simulationwe can check the accuracy of the data. Becausewe use more than one system for imaging the movements of a point in space, the mark- ers may be confused or another human lapsesmay oc- cur. Fig. 5: Animation controlled and computed by the Simulink model [5] The model uses measured data of a moving point in space to calculate the angles in the joints. To calcu- late the angle in one jointweneed at least three points (markers). This data was acquired using a webcam and was processed in Coach6, version 6.1. The frame rate of webcam was 26 frames per second. 2 Results By means of the model we obtained graphs of the de- pendency of the change in angle over time in the knee and hip (Fig. 6). This is important for subsequent computation of the cyclograms. The graph is plot- ted fromthe data obtained from thewebcammeasure- ments. The graph captures the half step and the full step, because the subject was asked to make a step from the standing position (Fig. 1). It follows from the graph that the angle in the knee changes from 1◦ (stretched leg) to 78◦ (relaxed leg), where the values represent the angle between the femur and the shin. The second curve plots the changing angle between the femur and the body. The cyclograms are obtained very easily. They are graphs plotting the angles in the knee and the hip to- gether. There are various kinds of cyclogram where we can plot e.g. the angles between the knee and the ankle, etc. (Fig. 6). For our case, we used the formula: cyclogram= angle in knee angle in hip (5) Fig. 6: Computed changes in the angles over time of the knee and hip We had to decide which kind of cyclogramwas ap- plicable for our research. The choice fell on the cyclo- gram of the knee and the hip, because it is easiest and most accurate to measure the angles in the joints. Fig. 7: Cyclogram of gait (knee/hip) 3 Gait prediction We selected an artificial neural network to analyze the cyclograms, because we consider NNs to be very in- teresting, and we think they will be used extensively in future [4]. The M-S (musculo-skeletal) body model contains an option of movement prediction, or more accurately inferior limbmotionpredictionwhich is rep- resented by the NN. We used the Matlab AI toolbox for the NN. We created our NN to predict the angles in the knee and hip of the right leg and we used a backprop- agation network training functionwith 10 input layers (we defined this number according to a calculation of the breaks in the angle functionbehavior)andoneout- put layer. Weuseda log-sigmoid function as a transfer function of the input layers and a linear transfer func- tion in the output layer. Our neural network learns for 500 generations, because the mean squared error (MSE) of the predicting function of the angles in the knee and the hip was the smallest at that point. 50 Acta Polytechnica Vol. 50 No. 4/2010 Fig. 8: Data predicted by NN 4 Conclusion We designed a functional user interface in the Matlab GUIDEcomponent inwhich theuser can easilyhandle all parts of our program. The output of our project is a user interface for work with our application consisting of an analysis (graphs of measured data and of the change of an- gles in the knee and hip, bilateral cyclograms), a body model (animation ofmotion) and a prediction (setting of theNN, graphsof the input vector, the target vector and the output vector). The program that we are pursuing will be ready for use in the biomechanics laboratory for study of gait. The body model can be modified by changing theweight of the body or of individual segments, from which we can count the moments of inertia of these segments and the forces in the joints. A more realis- tic human model could be created, e.g. in CAD. In the next step of our research we would like to pro- duce a hydraulic mechanism that will be controlled by NN and could help patients in their rehabilita- tion. 4.1 Future developments In the future we would like to build on our previous work and develop our system. The next useable function in the model will calcu- late the load of the joint from the mass of the body. Itmay be important to study duringwhichmovement and in which part of the movement the joint is most loaded by the mass. Matlab Simulink offers a connectionwith theCAD technical graphic program. Wewould like tomake use of this connection and to recreate a real human body in CAD. The animation will be more distinct in this way. Itwill takeaconsiderable time topredict theangles in the knee and hip, and then to compute the cyclo- grams. We aim to teachNN to predict the cyclograms correctly. Acknowledgement This work was carried out at FBE CTU in frame of research program No. MSM 6840770012 “Transdisci- plinary Biomedical Engineering Research II” of CTU, sponsored by the Ministry of Education, Youth and Sports of the Czech Republic. References [1] Goswami, A.: Kinematic quantification of gait symmetry based on bilateral cyclograms, XIXth Congress of the International Society of Biome- chanics (ISB), Dunedin, New Zealand, 2003. [2] Goswami, A.: New Gait Parameterization Tech- nique by Means of Cyclogram Moments: Applica- tion to Human Slop Walking, Gait and Posture, 1998, p. 15–26. [3] Heck, A., Holleman, A.: Walk like a mathemati- cian: an example of authentic education, Proceed- ings of ICTMT6 – New Technologies Publications, 2003, p. 380–387. [4] Ju Won Lee, Gun Ki Lee: Gait Angle Prediction for Lower Limb Orthotics and Prostheses Using an EMG Signal and Neural Networks, Interna- tional Journal of Control, Automation, and Sys- tems, 2005, p. 152–158. [5] Jelínek,R.: Tvorba modelu svalově-kosterního sys- tému pro studijní účely, Kladno (Czech Republic), 2009. [6] LUKOTRONIC [online]. URL: http://www.lukotronic.com/ About the authors Ondřej HAJNÝ was born in Chomutov on 19. 11. 1987,where he graduated from the basic school andthen fromthegrammarschool. He isnowstudying at the Faculty of Biomedical Engineering of CTU, in Kladno. He is employed as a teaching and research as- sistant at the Institute of normal, pathology and clin- ical physiology, Charles University in Prague. BarboraFARKAŠOVÁwasborn inOstrava,where she graduated from the basic school and then from the grammar school. She is now studying at the Faculty of Biomedical Engineering of CTU, in Kladno. Ondřej Hajný Barbora Farkašová E-mail: hajnyond@fbmi.cvut.cz, farkabar@fbmi.cvut.cz Department of Biomedical Technology Faculty of Biomedical Engineering Czech Technical University in Prague Nám. Śıtná 3105, 272 01 Kladno, Czech Republic 51