Acta Polytechnica Acta Polytechnica 53(2):88–93, 2013 © Czech Technical University in Prague, 2013 available online at http://ctn.cvut.cz/ap/ CHARACTERIZATION OF HUMAN GAIT USING FUZZY LOGIC Patrik Kutileka,∗, Slavka Viteckovaa, Zdenek Svobodab a Faculty of Biomedical Engineering, Czech Technical University in Prague, nam. Sitna 3105, 272 01 Kladno, Czech Republic b Faculty of Physical Culture, Palacky University of Olomouc, Krizkovskeho 8, 771 47 Olomouc, Czech Republic ∗ corresponding author: kutilek@fbmi.cvut.cz Abstract. In medical practice, there is no appropriate widely-used application of a system based on fuzzy logic for identifying the lower limb movement type or type of walking. The object of our study was to determine characteristics of the cyclogram to identify the gait behavior by using a fuzzy logic system. The set of data for setting and testing the fuzzy logic system was measured on 10 volunteers recruited from healthy students of the Czech Technical University in Prague. The human walking speed was defined by the treadmill speed, and the inclination angle of the surface was defined by the treadmill and terrain slope. The input to the fuzzy expert system is based on the following variables: the area and the inclination angle of the cyclogram. The output variables from the fuzzy expert system are: the inclination angle of the surface, and the walking speed. We also tested the method with input based on the angle of inclination of the surface and the walking speed, and with the output based on the area and the inclination angle of the cyclogram. We found that identifying the type of terrain and walking speed on the basis of an evaluation of the cyclogram could be sufficiently accurate and suitable if we need to know the approximate type of walking and the approximate inclination angle of the surface. According to the method described here, the cyclograms could provide information about human walking, and we can infer the walking speed and the angle of inclination of the terrain. Keywords: type of terrain, walking speed, inclination angle, fuzzy logic, cyclogram. 1. Introduction In medical practice, there is no widely-used applica- tion of a system based on fuzzy logic for identifying lower limb movement type or type of walking. Several methods can be used in medical practice and in phys- iotherapeutic research for identifying gait behavior. The most widely-used method for studying gait be- havior in clinical practice is gait phase analysis by gait time phase cycles [1–3]. Time and phase diagrams of gait behavior have been used to analyze gait with the application of artificial intelligence methods [4–7], but the findings have not subsequently been applied in medical practice. Intensive research is now being done on predicting leg movements by artificial intel- ligence (AI) and EMG signal measurements [8–10]. Fuzzy logic as a part of AI has only been tested in gait recognition systems or bipedal robotics control systems [11, 12], but has never been tested to identify the type of gait by using information about the joint angles. For a study of gait, we have used methods based on an analysis of gait angles using cyclograms (also called angle-angle diagrams or cyclokinograms) and artificial intelligence [13] to identify gait behavior. The first mention of the cyclogram [14] argued that a cyclic process such as walking is better understood if stud- ied with a cyclic plot, e.g. an angle-angle diagram. Depending on the cyclicity of the gait, cyclograms are closed trajectories generated by simultaneously plotting two (or more) joint quantities. In gait stud- ies, most attention has traditionally been given to easily identifiable planar knee-hip cyclograms [14, 15]. Applications of cyclograms in conjunction with fuzzy logic can offer a wide range of medical applications, but this approach has not yet been studied or applied in practice. Our paper investigates the application of the fuzzy rule based expert system (FRBES) to the identification of human gait behavior. 2. Data acquisition The main object of our study was to identify the characteristics of the cyclogram to identify the gait behavior (i.e. type of terrain and walking speed) by using a fuzzy logic system. The set of data for setting and testing the fuzzy logic system was measured on 10 volunteers recruited from healthy students of the Czech Technical University in Prague. The subjects were asked to walk properly on a treadmill at a variable walking speed and inclination angle of the surface. The human walking speed was defined by the treadmill speed, and the angle of inclination of the surface was defined by the treadmill and terrain slope. We used the very accurate Lukotronic AS200 mo- tion capture system to record data about the position of the markers i.e. body segment movement in a three- dimensional space [15]. One camera system mounted in front of or behind the subject moving on the tread- mill recorded the 3D motion of the lower limbs [13]. 88 http://ctn.cvut.cz/ap/ vol. 53 no. 2/2013 Characterization of Human Gait using Fuzzy Logic Figure 1. Example of the arrangement of IR markers and angles measured during the trial [13, 15]. Markers were placed in accordance with the manufac- turer’s recommendations for gait analysis by GaitLab software. The recommended marker set model is sim- ilar to the set defined by the Helen Hayes Hospital model [16] for Vicon Clinical Manager and the sagittal plane, Figure 1, [13, 15]. Using this method, we can record the movement in a three-dimensional space, though we primarily study the movement in a two-dimensional sagittal plane [13, 15]. The markers, i.e. the points, move in space together with the body segments, and the individual segments of the body move by the translational and angular movement per unit time. The angles between each two segments are calculated by assuming the segments to be idealized rigid bodies, Figure 1. 3. Gait characteristics To create and study angle-angle diagrams, we use the basic kinematics 7-segment model of the human body created in MatLab (MathWorks, Inc.) Simulink, i.e. SimMechanic software. Our model consists of a torso, thighs, shins and feet. The model does not include the arms and head. We obtained graphs of the changes of angles (during the time of the trial) in all joints of the lower part of the human body and the sagittal plane. This was important for subsequent computation of the angle-angle diagram curves [13, 15]. The cyclogram (Figure 2) shows that the swing phase typically starts at a thigh extension angle of 0° and knee flexion of about 80 % of the maximum. The measured subject weighed 75 kilograms and was 23 years old. For each measured subject and a specific velocity, a closed cyclogram trajectory was created by the average values of the measured angles. In the next step of the study, we used the cyclo- grams to identify the gait behavior for different speeds and surface inclination angles. In our previous work [13, 15], we used a method based on principal compo- nent analysis (PCA) to describe the shape of the area Figure 2. Example of the knee-hip cyclogram. enclosed by the trajectory of a cyclogram, but this method is less suitable for non-normal data distribu- tion, if it occurs. For this reason, we have to describe the 2D shape of the area of a cyclogram by other variables used to describe the two-dimensional plane shape [15]. We decided to use the second moment of the area to describe the two-dimensional plane shape of the cyclogram. The reason for using the second moment is that we can very easily describe the dis- tribution of the circumscribed area of an angle-angle diagram, and we can determine the inclination angle θ of a diagram. The value of angle θ, which is given a product moment of zero, is equal to, [15]: tan 2θ = 2Ixy Ixx − Iyy , where Ixx is the second moment of the area about the x-axis, Iyy is the second moment of the area about the y-axis, and Ixy is the product moment of the area [17, 18], θ is the inclination angle between the axes of the original coordinate system of the diagram and the principal axes of the area of a closed trajectory of the diagram curve. If the area A enclosed by the trajectory of the cyclogram of the gait cycle is defined, then all the stereotypes of walking can be characterized by the cyclogram area and the inclination of the cyclogram. Theoretically, we can also use the characteristics of the ellipse of inertia, the polar moment, the center of the area, the maximum and minimum second moment of the area etc, to describe the gait behavior. 4. Fuzzy rule based expert system We can use fuzzy sets to evaluate the angle-angle di- agrams (cyclograms). The most important part of our work is to design methods for potential practical application of the cyclograms in order to identify gait behavior. We used the cyclograms as models/patterns for setting the fuzzy expert system. After setting the fuzzy system, we used them to identify human gait behavior. For this purpose, we used the artificial in- telligence methods which are implemented in MatLab 89 P. Kutilek, S. Viteckova, Z. Svoboda Acta Polytechnica Figure 3. Two basic ideas behind a fuzzy system are to interpret an input and, on the basis of sets of if-then rules, to infer an output, [12]. Input variables Output variables Area of cyclogram (A) Inclination angle Walking speed (v) Inclination angle of cyclogram (θ) of the surface (ε) small (S) small negative (SN) slow (S) small (S) medium (M) small positive (SP) comfortable (C) medium (M) large (L) medium positive (MP) fast (F) large (stairs) (L) large positive (LP) Table 1. Fuzzy sets of variables and linguistic expressions based on the area and the inclination angle of the cyclogram. toolboxes [19, 20]. The use of fuzzy logic enables us to overcome the problems encountered when using “hard” computing techniques [12, 21]. With fuzzy logic, we are able to use natural language and words, instead of equations and numbers. Reasoning in natural lan- guage and words enables us to translate experimental findings and knowledge into fuzzy if-then rules. The basic idea behind a fuzzy expert system is to interpret an input and, on the basis of sets of if-then rules, to infer an output. Developing fuzzy if-then rules is a relatively easy process. The transition from “belong- ing to a set” to “not-belonging to a set” is gradual, and is characterized by a membership function that gives fuzzy sets flexibility in modeling commonly used linguistic expressions [12, 15]. A fuzzy if-then rule assumes the form: if x is A then y is B, where A and B are linguistic variables defined by fuzzy sets on uni- verses of discourse X and Y , respectively (Figure 3). The fuzzy rules could employ the relationship between input variables and output variables in a meaningful and explicit manner, [12]. Our fuzzy if-then rules are derived from experi- mental findings and knowledge indicating relations between characteristics of the cyclogram and the type of terrain and walking speed. Gait behavior can be described by a number of characteristics. We choose the inclination angle of the surface (ε) or the type of terrain and walking speed (v). In the model of cyclograms, sets of variables are distinguished. In our case, the first variable that is used is the area (A) of the cyclogram, and the second used variable is the inclination angle (θ) of the cyclogram. We can also use the following variables: the second moment of the area about the x-axis and the y-axis, the product moment of the area, the polar moment of inertia, etc. The first fuzzy expert system used and designed to identify human gait behavior is based on two input variables: area and inclination angle, Table 1. The output variables from the fuzzy expert system are: the inclination angle of the surface, and the walking speed, see Table 1. The proposed model is based on identifying the type of terrain and the walking speed. The fuzzy expert system interprets an input and, on the basis of sets of if-then rules, infers an output, see Figure 3. We use the fuzzy expert system to identify the type of terrain and the walking speed, but we can also use the opposite way. If we know the desired type of terrain and walking speed, we can identify characteristics of the cyclogram, and thus the joint angles, see Figure 3B. In the next part of this paper, we will deal with the first way, see Figure 3A. The Mamdani fuzzy model was used and the rules are in the form: IF area (A) is . . . AND inclination angle of diagram (θ) is . . . THEN walking speed (v) is . . . AND inclination angle of the surface (ε) is . . . We also defined the membership functions to which the inputs belong in each of the appropriate fuzzy antecedent sets (see Table 2 for a description of the membership functions). The output variables are represented by consequent fuzzy sets. We determined the membership functions to which the outputs belong in each of the appropriate fuzzy consequent sets (see Table 2). 90 vol. 53 no. 2/2013 Characterization of Human Gait using Fuzzy Logic Fuzzy Fuzzy a b c d variable set A (deg2) S 600 600 1550 M 600 1550 2000 L 1550 2000 3150 3150 θ (deg) SN −40 −40 −5 10 SP −5 10 25 MP 10 25 40 LP 25 40 40 v (km/h) S 0 0 5 C 0 5 12 F 5 12 12 ε (deg) S 0 0 15 M 0 15 30 L 15 30 30 Table 2. Parameters for defining the triangular (a, b and c) and trapezoidal (a, b, c and d) membership function for fuzzy sets. We described all rules by matrices of rules, see Ta- ble 3. The matrices of variables are derived from experimental findings and knowledge indicating re- lations between type of terrain and walking speed and characteristics of the cyclogram. Fuzzy rules de- fine the gait characteristics by combinations of input variables. For example, IF area (A) is small AND inclination angle (θ) is small positive THEN walking speed (v) is small AND the inclination angle of the surface (ε) is small. Our method for identifying gait characteristics is based on the premise of the proposal of the fuzzy expert system. We used the Fuzzy Toolbox and the Mamdani Fuzzy Inference System (FIS) in MatLab to create the fuzzy expert system. Mamdani FIS is the most known and the most used system in developing fuzzy models. We assume that the fuzzy system cre- ated by information on the state of the terrain, the walking speed and the characteristics of the closed trajectories of the cyclogram is sufficient to identify the gait characteristics. 5. Results We assume that the type of terrain and the walking speed strongly affect the characteristics of the cyclo- gram. The human walking speed was defined by the treadmill speed (3 km/h and 6 km/h), and the angle of inclination of the surface (0° and 16°) was defined by the treadmill and the terrain slope. This data was used to set the FRBES, but also can be used to verify the functionality of the proposed expert system by sim- ulation. The FRBES had to be tested to see if it was working properly. In order to do this, the known data A A θ S M L θ S M L SN L SN S SP S S M SP S C F MP M CP F LP M M LP S C Table 3. Matrix of output variables. Left: inclination of the surface (ε). Right: walking speed (v). FRBES Input: characteristics of the cyclogram A (deg2) 770 938 986 1340 θ (deg) 11 42 13 40 FRBES Output: gait behavior v (km/h) 3.6 4.1 4.9 5.6 ε (deg) 5 15 5 15 Real gait behavior v (km/h) 3.0 3.0 6.0 6.0 ε (deg) 0 16 0 16 Differences in preficted values from the expected ∆v (km/h) 0.6 1.1 1.1 0.4 ∆ε (deg) 5 1 5 1 Table 4. Example of tested values of the characteris- tics of cyclograms and the type of terrain and walking speed predicted by the fuzzy expert system. was inputted to see if the system was able to recognize the right type of terrain and walking speed. Based on the input variables (A and θ), the fuzzy expert system selects two outputs. These responses are represented by two variables (v and ε), Table 4. The simulation was done in Matlab (Mathworks). The inferred data (Table 4) shows that the use of the described variables and fuzzy logic successfully enables us to determine the approximate expected values of the type of ter- rain and walking speed from the characteristics of the cyclogram. The slight variability in the estimation of the type of terrain and walking speed could be negligible, because there are small variations even in human walking. The small differences (Table 4) in the inferred characteristics are comparable with those seen during measured natural human walking. We found that inference based on an evaluation of the cyclogram could be sufficiently accurate and suitable if we need to know the approximate type of walking and the approximate inclination angle of the surface. According to the method described here, cyclograms could provide information about human walking, and we can infer the type of terrain and walking speed. 91 P. Kutilek, S. Viteckova, Z. Svoboda Acta Polytechnica 6. Discussion We chose measured and calculated values of the joint angles as an approach for creating the cyclograms. Walking is described by the cyclogram, and the cyclo- gram is used to identify the type of terrain and the walking speed. For setting the fuzzy sets, we used the shape of the closed trajectory of the cyclogram that represents a set of states of a man walking. Cyclograms in conjunction with artificial intelli- gence are broadly applicable in medicine. We have presented a method for describing the motion of the lower extremities, and these characteristics can be used for evaluating human gait in physiotherapeutic practice, based on a study of angle-angle diagrams. In our study, we have used an artificial fuzzy logic system based on expert knowledge. The new methods based on soft computing (i.e. fuzzy logic, neural networks and genetic algorithms) can be applied in clinical prac- tice for studies of disorders or characteristics in the motion function of the human body, and the method can be used in advanced control systems for controlled prostheses of the lower extremities [22]. In the past, it was almost impossible to use complex algorithms based on AI in the slow control systems of a controlled prosthesis, but today we can consider applying the methods described here in the algorithms for new prosthetic control systems [23, 24]. The fuzzy expert system can also be modified to take into account other appropriate parameters, for example angular veloc- ity or acceleration. The fuzzy logic expert system, however, puts great demands on expert knowledge or computer automatic determination of fuzzy rules and membership functions based on a large number of experimentally measured data items. The proposed methods based on a fuzzy expert system can also be used in algorithms for a driven robotic gait orthosis for the purposes of locomotion therapy, [25, 26]. This work has not attempted to describe all potential ways of applying cyclograms in conjunction with fuzzy logic. We have shown new methods that have subsequently been proved by a simulation in MATLAB software. These methods based on cyclograms and fuzzy logic could be suitable for a broad range of applications. Acknowledgements This research has been supported by CTU Prague project SGS 13/091/OHK4/1T/17. References [1] Gage, R. J., Hicks, R.: Gait Analysis in Prosthetics. Clinical Prosthetics & Orthotics, 9(3), 1989, p. 17–21. [2] Kerrigan, D. C., Schaufele, M., Wen, M. N.: Gait Analysis. Rehabilitation Medicine: Principles and Practice, Philadelphia: Lippincott Williams & Wilkins, 1998, p. 167–187. [3] Janura, M., Cabell, L., Svoboda, Z., Kozakova, J., Gregorkova, A.: Kinematic analysis of gait in patients with juvenile hallux valgus deformity. Journal of Biomechanical Science and Engineering, 3(3), (2008, p. 390–398. [4] Gioftsos, G., Grieve, D. W.: The use of neural networks to recognize patterns of human movement: gait patterns. Clinical Biomechanics, 10(4), 1995, p. 179–183. [5] Lai, D. T. H., Begg, R. K., Palaniswami, M.: Computational Intelligence in Gait Research: A Perspective on Current Applications and Future Challenges. IEEE Transactions on Information Technology in Biomedicine, 13(5), 2009, p. 687–702. [6] Wang, L., Tan, T., Ning, H., Hu, W.: Automatic gait recognition based on statistical shape analysis. IEEE Trans Image Processing, 12(9), 2003, p. 1120–1131. [7] Mijailovic, N., Gavrilovic, M. & Rafajlovic, S.: Gait Phases Recognition from Accelerations and Ground Reaction Forces: Application of Neural Networks. Telfor Journal, 1(1), 2009, 34-36. [8] Sepulveda, F., Wells, D., Vaughan, C.: A neural network representation of electromyography and joint dynamics in human gait. Journal of Biomechanics, 26(2), 1993, p. 101–109. [9] Prentice, S. D., Patla, A. E., Stacey D. A.: Artificial neural network model for the generation of muscle activation patterns for human locomotion. Journal of Electromyography and Kinesiology, 11(1), 2001, p.19-30. [10] Heller, B. W., Veltlink, P. H., Rijkhof, N. J. M., Rutten W. L. C., Andrevs B.: Reconstructing muscle activation during normal walking: a comparison of symbolic and connectionist machine learning techniques. Biological Cybernetics, 69(4), 1993, p. 327–335. [11] Lu, J.W., Zhang, E: Gait recognition for human identification based on ICA and fuzzy SVM through multiple views fusion. Pattern Recognition Letters, 28(16), 2007, p. 2401–2411. [12] Jacobs R.: Control Model of Human Stance using Fuzzy Logic, Biological Cybernetics, 77, 1997, p. 63–70. [13] Kutilek, P., Farkasova, B.: Prediction of lower extremities movement by angle-angle diagrams and neural networks. Acta of Bioengineering and Biomechanics, 13(2), 2011, p. 57–65. [14] Grieve, D. W.: Gait patterns and the speed of walking. Biomedical Engineering, 3(3), 1968, p. 119–122. [15] Kutilek, P., Viteckova, S.: Prediction of lower extremity movement by cyclograms. Acta Polytechnica, 52(1), 2012, p. 51–60. [16] Vaughan, C. L., Davis, B. L., O’Connor, J. C.: Dynamics of human gait. 2nd Edition, Cape Town: Kiboho Publishers, 1999. [17] Goldstein, H.: Classical mechanics. 2nd ed., Boston: Addison-Wesley, 1980. [18] Pilkey, W. D.: Analysis and design of elastic beams. New York: John Wiley & Sons, 2002. [19] Sivanandam, S. N., Sumathi, S., Deepa, S. N.: Introduction to fuzzy logic using MATLAB. Berlin: Springer, 2010. [20] Hajny, O., Farkasova, B.: A study of gait and posture with the use of cyclograms. Acta Polytechnica, 50(4), 2010, p. 48–51. 92 vol. 53 no. 2/2013 Characterization of Human Gait using Fuzzy Logic [21] Zadeh, L.: Fuzzy sets. Information Control, 8, 1965, p. 338–353. [22] Eng, J. J., Winter, D. A.: Kinetic analysis of the lower limbs during walking: What information can be gained from a three-dimensional model. Journal of Biomechanics, 28(6), 1995, p. 753–758. [23] Bellmann, M., Schmalz, T., Blumentritt S.: Comparative biomechanical analysis of current microprocessor-controlled prosthetic knee joints. Archives of physical medicine and rehabilitation, 91(4), 2010, p. 644–652. [24] Brian, J. H., Laura, L. W., Noelle, C. B., Katheryn, J. A., Douglas, G. S.: Evaluation of function, performance, and preference as transfemoral amputees: Transition from mechanical to microprocessor control of the prosthetic knee. Archives of physical medicine and rehabilitation, 88(2), 2010, p. 207–217. [25] Boian, F. R., Burdea, C. G., Deutsch, E. J.: Robotics and virtual reality applications in mobility rehabilitation. Rehabilitation Robotics, Vienna: I-Tech Education and Publishing, 2007, p. 27–42. [26] Cikajlo, I., Matjacic, Z.: Advantages of virtual reality technology in rehabilitation of people with neuromuscular disorders. Recent Advances in Biomedical Engineering, Vienna: INTECH, 2009, p. 301–320. 93 Acta Polytechnica 53(2):88--93, 2013 1 Introduction 2 Data acquisition 3 Gait characteristics 4 Fuzzy rule based expert system 5 Results 6 Discussion Acknowledgements References