Fuzzy Application Library/Technical Applications/Medical Shoe
Fuzzy Logic and NeuroFuzzy Data Analysis in a Medical Shoe
by Constantin von Altrock
Citation Reference: This paper was published at the Fuzzy Logic '94 Conference held in San Francisco in September 1994. The Fuzzy Logic Application Note series is published by Inform Software Corporation on its Internet server to promote the use of fuzzy logic technologies in applications.
The analysis of complex data sets often requires human-like evaluations and decisions. Mathematical models used for this have severe limitations in representing such evaluations. Also, in many applications, the data material is noisy or contains artifacts. Here, conventional data analysis methods soon reach their limits. This section describes the use of fuzzy logic in data analysis. Section 1 shows how fuzzy logic is combined with data analysis techniques. Section 2 describes the combination of software tools for fuzzy data analysis. As a case study, Section 3 shows an application of fuzzy data analysis in an embedded application.
1. Using Fuzzy Logic in Data Analysis
Most data analysis methods try to derive structural information out of given data sets. This structural information shall represent the system that produced the data sets. The goal is to identify internal parameters of the system that cannot directly be measured.
Today, many different methods and algorithms for data analysis exist. Most of these algorithms have difficulties coping with noisy data and data that contains artifacts. These applications have to use very robust data analysis techniques that can cope with errors and artifacts in the data material.
|Figure 1: Only if you squeeze your lids so that the picture becomes "fuzzy", you recognize Abraham Lincoln|
But how can fuzzy logic fix this? Here is a simple example: look at Figure 1. With the human eye as sensor, this looks like a non-sensical collection of gray squares. The human eye is already a very precise sensor that can distinguish about 100 different shades of gray, but even with better sensors Figure 1 remains a collection of gray squares. Only if you squeeze your lids so tight that the entire picture becomes "fuzzy", you see that the collection of gray squares is actually a picture of Abraham Lincoln. The lesson learned is that even the most precise method will not give you the information that is contained in the picture. Even if you would modify the grayness of some of the squares, the "fuzzy" look would still recognize Lincoln.
To employ fuzzy logic in data analysis applications, many different combinations of fuzzy logic and conventional techniques exist. Which one is the best to use depends strongly on the application. The most common combinations of fuzzy logic and conventional techniques are:
A. Fuzzy Cluster Analysis
Cluster analysis maps objects to pre-defined classes. For a quality control system, the classes could be bad and good. For this mapping, a vector of parameters describes each object. Each parameter denotes a certain property of the objects. For the classification of acoustic signals, these parameters could be the result of a Fourier transformation. Most cluster analysis algorithms use training algorithms to configure themselves from given sample data sets.
Using fuzzy logic in cluster analysis allows for the definition of "fuzzy" classes. The benefit of this is that even when a unique classification of some parameters is not possible, a good final solution can still be derived. For more and general information on fuzzy cluster analysis, refer to [1, 2, 7, 14].
B. Fuzzy Rule Based Methods
Cluster analysis methods derive all necessary structural information by training from given sample data sets. This demands a very high quality of the sample data sets used. Also, there is no explicit modifications of the resulting system. This makes optimization and verification a difficult task.
Fuzzy rule based methods work differently. Here, "if-then" rules represent the entire classification. This is very similar to the application of fuzzy logic in intelligent control as described before. In contrast to fuzzy logic in control applications, fuzzy logic classification uses different inference and defuzzification methods.
The benefit of fuzzy rule based methods over fuzzy cluster analysis is that the information flow in the system is completely transparent. Since fuzzy logic systems are self-explanatory, explicit optimization and verification is easy. The disadvantage of fuzzy rule based methods is that the entire system has to be built up manually. In contrast to fuzzy cluster analysis, no automated training exist.
However, fuzzy rules based methods are the basis of many successful applications in data analysis and signal classifications.  presents some of there applications.
|Figure 2: Linking the DataAnalyzer Module, the NeuroFuzzy Module and fuzzyTECH creates an integrated development environment for Fuzzy Data Analysis Systems (large)|
C. Adaptive Fuzzy Rule Based Methods
In summary, the advantage of fuzzy cluster analysis lies in its trainability while the advantage of fuzzy rule based methods lies in the inherent transparency of the system. However, some applications need trainability and transparency both at the same time. Here, the combination of a training algorithm with a fuzzy rule based method can make a successful solution. Because the training algorithm adapts the fuzzy rules and membership functions so that the behavior represents the sample data sets, this combination is called "adaptive fuzzy rule based method".
Although there are many ways to adapt a fuzzy logic system, the only approach that has been widely used in industrial applications is the NeuroFuzzy technique. Here, learning algorithms developed for neural nets are modified so that they can also train a fuzzy logic system.  treats this technique in detail.
The benefit of such a technology is that it can learn from given sample data sets and that the learned result can be further enhanced by hand. Especially for applications where only partial information for the solution stems from sample data, adaptive fuzzy rule based systems are the best choice. Another advantage is that the system developed is a 'pure' fuzzy logic system which can be implemented even on very inexpensive hardware platforms. Section 3 of this paper shows a good example of this.
2. Software Tools for Fuzzy Data Analysis
In most fuzzy data analysis systems, the input data needs extensive preprocessing before the fuzzy logic system. This preprocessing can include filtering, linearizations, or Fourier transformations. These functions are not part of most fuzzy logic applications in industrial control and, hence, are not part of most fuzzy logic software development tools.
For the fuzzyTECH development system , complete data analysis functionality is provided by an add-on tool, the DataAnalyzer Module . Figure 2 shows how fuzzyTECH, the DataAnalyzer Module, and the NeuroFuzzy Module can be linked to form an integrated design environment. Linking all three components allows for the design of adaptive fuzzy rule based solution. If the NeuroFuzzy Module is left out, only fuzzy rule based solutions are possible.
|Figure 3: Development of a Fuzzy Data Analyzer Solution is completely graphical. Configuring pre-defined Function Blocks integrates conventional signal analysis techniques and Fuzzy Logic. Fuzzy Logic is also represented as a Function Block. (large)|
Figure 3 shows the visual design of a fuzzy data analyzer solution that supervises the wear of a machinery tool during operation. The two upper left function blocks drive A/D channels of a standard PC plug-in board. The upper channel links to a tension stripe sensor that acts as a microphone, the lower channel links to a temperature sensor mounted at the tool. The acoustic signal is pre-processed by a Spectrum block (fast fourier transformation) and inputted to the fuzzy logic function block. The second input to the fuzzy logic function is the temperature signal filtered by a low pass Filter. The third input to the fuzzy logic function block is the direct temperature signal after a Threshold function block. A fourth input comes from a visual inspection of the machine operator and is inputted by a slide in a separate window.
Both a Meter and a spectrum Scope visualize the outputs of the fuzzy logic function block. In case of an overload, a D/A channel outputs a speed overwrite signal to the machine to avoid destruction of the machinery tool. For documentation, a File function block writes the evaluation results to disk. The NeuroFuzzy Module resides on top of fuzzyTECH (Figure 2), hence, it is not displayed in Figure 3.
|Figure 4: The orthopedic shoe consists of an electronic unit attached by velcro over the ankle and a sensor in a silicon inlay (large)|
3. Fuzzy Data Analysis in a Medical Shoe
After knee surgery, patients are required to limit the strain on the knee during a long convalescence period. The problem is that humans have no strain sensor to control this. When pain occurs, the knee already suffers from damage. To solve this problem, we used a tension sensor and a fuzzy logic data analysis system to design a biofeedback shoe inlay. Figure 4 shows the schematics. A silicon inlay contains a tension sensor made of a conductive polymer. The sensor is wired to an electronic unit that sits in a belt attached over the ankle by Velcro. The electronic units contain a host microcontroller, battery, speaker, and a keypad. The speaker warns the user when the strain limit is reached. A/D conversion, signal preprocessing, and the fuzzy data analysis system all run on the 8-bit microcontroller.
|Figure 5: Silicon shoe inlay with pressure sensor (large)|
The objective for the fuzzy data analysis system is to estimate the internal strain on the knee from the tension signal. If 80% of the maximum acceptable load is reached, a beep warns the user to take it easy from here. If 90% of the maximum acceptable load is reached, a repeating beep tells the user to not use the leg for a while and if the strain is over the maximum threshold that is set by the doctor, the beep sounds continuously.
|Figure 6: Typical tension sensor signal for step sequence (large)|
The difficulty of this is to estimate the internal strain on the knee from just the tension signal. Figure 6 displays the tension sensor signal for a typical sequence of steps. To get more information from the tension sensor signal, pre-processing derives additional inputs to the fuzzy data analysis system. In total, this yields four inputs to the fuzzy logic function block:
|Figure 7: Structure of the Fuzzy Logic Function Block for the Fuzzy Data Analysis System (large)|
Figure 7 shows a screen shot of the fuzzy logic system in the data analyzer. The upper window draws the structure of the system. The output variable "Alarm" stems from a rule block with the input variables "ActualLoad" and "TimeLoad". Both these variables are outputs of other rule blocks. ActualLoad computes from the two input variables Act_Slope and Act_Peak, which are input variables of the fuzzy logic function block. The DataAnalyzer Module computes these variables from the tension sensor signal.
TimeLoad computes from the two input variables Hist_Short and Hist_Long that the DataAnalyzer Module computes out of the output signal from the fuzzy logic function block by averaging. The left lower window shows a typical membership function definition. Most linguistic variables use two (2) or three (3) membership functions of Standard MBF type. The lower right window shows four rules of the upper rule block. The total number of rules in the system is 39.
|Figure 8: Implementation of the Fuzzy Data Analyzer System on a microcontroller (large)|
The rules were derived in close cooperation with orthopedic doctors. Since no good sample data for the strain estimation on a knee exists, the NeuroFuzzy Module was not used. Under the nomenclature of Section 1, this application uses "fuzzy rule based methods". Another advantage of using fuzzy logic in this example is that the rule set is easy to modify. For example, by designing a rule set that evaluates the steps and their fit to an optimal curve, runners could improve their running style with this intelligent biofeedback technique.
Figure 8 shows the total implementation on the PIC16C57 microcontroller. First, the analog-to-digital conversion transforms the resistance of the tension sensor into a digital 10-bit value. Preprocessing and filtering gets the four input variables for the fuzzy logic computation shown in Figure 7. Last, depending on the strain rating, the speaker outputs the alarm and the keypad is scanned. The fuzzy logic system requires about 20 bytes RAM and 590 words ROM on the PIC16C57 microcontroller . The code was generated by the fuzzyTECH MP Edition that generates fuzzy logic systems as PIC-specific assembly code.
|||Bezdek, J. C., Tsao, E. C.-K., and Pal, N. R., "Fuzzy Kohonen Clustering Networks", FUZZ-IEEE Conference (1992), p. 1035-1043.|
|||Kandel, A., "Fuzzy Techniques in Pattern Recognition", New York (1982).|
|||N.N., "fuzzyTECH MP Edition Manual", Microchip Technologies, Chandler, Arizona (1994).|
|||N.N., "Fuzzy Logic Benchmarks for Standard MCUs", INFORM GmbH Aachen / Inform Software Corp., Chicago (1994).|
|||N.N., "fuzzyTECH 3.2 NeuroFuzzy Module Manual", INFORM GmbH Aachen / Inform Software Corp., Chicago (1994).|
|||N.N., "fuzzyTECH 3.2 DataAnalyzer Module Manual", INFORM GmbH Aachen / Inform Software Corp., Chicago (1994).|
|||Watada, V., "Methods for Fuzzy Classification", Japanese Journal of Fuzzy Theory and Systems" 4 (1992), p. 149-163.|
|||von Altrock, C., Krause, B. and Zimmermann, H.-J. "Advanced fuzzy logic control of a model car in extreme situations", Fuzzy Sets and Systems, Vol 48, Nr 1 (1992), p. 41 - 52.|
|||von Altrock, C. and Krause, B., "On-Line-Development Tools for Fuzzy Knowledge-Base Systems of Higher Order", 2nd Int'l Conference on Fuzzy Logic and Neural Networks Proceedings, IIZUKA, Japan (1992), ISBN 4-938717-01-8.|
|||von Altrock, C., Krause, B. and Zimmermann, H.-J., "Advanced Fuzzy Logic Control Technologies in Automotive Applications", IEEE Conference on Fuzzy Systems (1992), ISBN 0-7803-0237-0, p. 831-842.|
|||von Altrock, C., "NeuroFuzzy Technologies", Computer Design Magazine 6/94 (1994).|
|||von Altrock, C., Arend, H.-O., Krause, B., Steffens, C., and Behrens-Rommler, E., "Customer-Adaptive Fuzzy Control of Home Heating System", IEEE Conference on Fuzzy Systems in Orlando (1994).|
|||von Altrock, C., "Fuzzy Logic and NeuroFuzzy Applications Explained", Prentice Hall, ISBN 0-13-368456-2 (1995).|
|||Zimmermann, H.-J., "Fuzzy Set Theory -- and its applications", Zweite Revidierte Auflage (1991), Boston, Dordrecht, London, ISBN 0-7923-9075-X.|