Embedded Systems Design - March 2008 - (Page 22) 0308esd.p16to25 2/14/08 3:50 PM Page 22 cover feature Listing 1 Inference rules pseudo code. MinValue = MaxValue = 0 Y[0..N] = 0; For (I = 0 to N) { for (j = 0 to M) { MinValue = Min{X1[I], X2[M]}; // compare each X1 element to X2 element and store // smaller value // store max value found among X2 members If (Max{X1[I], X2[M]} > MaxValue) // { MaxValue = Max{X1[I], X2[M]}; } // add max value to output vector function defined by // membership rules MaxValue += output_vector_member(x); } } Defuzzified output vector table. Array NM NS ZE PS PM Y[ ] 0x0 0x13F 0x196A 0x0 0x0 Table 3 In the earlier example, output vector Y[] is shown in Table 3. DEFUZZIFICATION Defuzzification is the process of converting fuzzy data back into crisp value data. For the purpose of this application the defuzzified value determines the duty cycle of the PWM signal used to drive the motor. The duty cycle is determined by using the modified centroid calculation function. The defuzzification approach used here takes the centroid function and multiplies it by a coefficient. The modified calculation is also known as the centroid point calculation function. This approach provides additional precision over the centroid calculation function. The centroid point calculation is obtained by the center point of the function that is the result of the multiplication of the output membership function by the output vector Y[]. The formula for the centroid point calculation is: Defuzzified Value = Σ_Y[i] X multCoeff[I] / Σ Y[i] where Y[i] are the i-th elements of the output vector, and multCoeff[i] are the multiplying coefficients of the output membership function. The index i has a range of i = 1 to i = 5. Figure 5 shows the graphical representation of the output membership function used by this application with the coefficients of [-0x10, -0x8, 0x0, 0x8, 0x10]. Using the example output vector Y[] = [0x0, 0x13F, 0x196A, 0x0, 0x0], the following defuzzification output value is calculated: Defuz = 0 X (-16) + 319 X (-8) + 6506 X (0) + 0 X (8) + 0 X (16) / 0 + 319 + 6506 + 0 + 0 = -2552 / 6825 => -0.37391 FUZZY LOGIC DEFINITIONS Centroid calculation function: used for producing an exact output value by calculating the center of gravity of the union of areas bound by membership functions and the input variable axes. Defuzzification: a general method for determining the best exact or “crisp” output of a given fuzzy set, defuzzification uses the centroid calculation function or a similar function to generate a crisp output. Fuzzification: a method for converting a “crisp” input value to a fuzzy membership function. The resulting fuzzy value is a member of a multivalued set. Fuzzy control system: a control system based on fuzzy IF-THEN rules that use fuzzy sets for input and output. Fuzzy inference system: a collection of fuzzy IF-THEN rules. Fuzzy logic: logic that uses linguistic variables to describe a system. Examples include: “fast,” “slow,” and “medium.” Fuzzy set: any set that allows its members to have different “grades” of membership. Each member may be expressed by a continuous number between zero and one: [0,1]. This contrasts to Boolean logic that limits set members to a value of either zero or one. Fuzzy system: a system whose variables range over states that are fuzzy sets. Membership function: the mapping of a fuzzy set that associates each set member with its grade of membership. 22 MARCH 2008 | embedded systems design | www.embedded.com http://www.embedded.com
Table of Contents Feed for the Digital Edition of Embedded Systems Design - March 2008 Embedded Systems Design - March 2008 Contents #Include Programming Pointers Designing DSP-based Motor Control Using Fuzzy Logic Hardware/Software Verification Enters the Atomic Age Efficient CRC Calculation with Minimal Memory Footprint Programming Your Own Microcontroller Advertising Index Break Points Marketplace Embedded Systems Design - March 2008 Embedded Systems Design - March 2008 - (Page BB1) Embedded Systems Design - March 2008 - (Page BB2) Embedded Systems Design - March 2008 - Embedded Systems Design - March 2008 (Page Cover1) Embedded Systems Design - March 2008 - Embedded Systems Design - March 2008 (Page Cover2) Embedded Systems Design - March 2008 - Embedded Systems Design - March 2008 (Page 1) Embedded Systems Design - March 2008 - Embedded Systems Design - March 2008 (Page 2) Embedded Systems Design - March 2008 - Contents (Page 3) Embedded Systems Design - March 2008 - #Include (Page 4) Embedded Systems Design - March 2008 - #Include (Page 5) Embedded Systems Design - March 2008 - #Include (Page 6) Embedded Systems Design - March 2008 - #Include (Page 7) Embedded Systems Design - March 2008 - #Include (Page 8) Embedded Systems Design - March 2008 - Programming Pointers (Page 9) Embedded Systems Design - March 2008 - Programming Pointers (Page 10) Embedded Systems Design - March 2008 - Programming Pointers (Page 11) Embedded Systems Design - March 2008 - Programming Pointers (Page 12) Embedded Systems Design - March 2008 - Programming Pointers (Page 13) Embedded Systems Design - March 2008 - Programming Pointers (Page 14) Embedded Systems Design - March 2008 - Programming Pointers (Page 15) Embedded Systems Design - March 2008 - Designing DSP-based Motor Control Using Fuzzy Logic (Page 16) Embedded Systems Design - March 2008 - Designing DSP-based Motor Control Using Fuzzy Logic (Page 17) Embedded Systems Design - March 2008 - Designing DSP-based Motor Control Using Fuzzy Logic (Page 18) Embedded Systems Design - March 2008 - Designing DSP-based Motor Control Using Fuzzy Logic (Page 19) Embedded Systems Design - March 2008 - Designing DSP-based Motor Control Using Fuzzy Logic (Page 20) Embedded Systems Design - March 2008 - Designing DSP-based Motor Control Using Fuzzy Logic (Page 21) Embedded Systems Design - March 2008 - Designing DSP-based Motor Control Using Fuzzy Logic (Page 22) Embedded Systems Design - March 2008 - Designing DSP-based Motor Control Using Fuzzy Logic (Page 23) Embedded Systems Design - March 2008 - Designing DSP-based Motor Control Using Fuzzy Logic (Page 24) Embedded Systems Design - March 2008 - Designing DSP-based Motor Control Using Fuzzy Logic (Page 25) Embedded Systems Design - March 2008 - Designing DSP-based Motor Control Using Fuzzy Logic (Page 26) Embedded Systems Design - March 2008 - Hardware/Software Verification Enters the Atomic Age (Page 27) Embedded Systems Design - March 2008 - Hardware/Software Verification Enters the Atomic Age (Page 28) Embedded Systems Design - March 2008 - Hardware/Software Verification Enters the Atomic Age (Page 29) Embedded Systems Design - March 2008 - Hardware/Software Verification Enters the Atomic Age (Page 30) Embedded Systems Design - March 2008 - Hardware/Software Verification Enters the Atomic Age (Page 31) Embedded Systems Design - March 2008 - Hardware/Software Verification Enters the Atomic Age (Page 32) Embedded Systems Design - March 2008 - Efficient CRC Calculation with Minimal Memory Footprint (Page 33) Embedded Systems Design - March 2008 - Efficient CRC Calculation with Minimal Memory Footprint (Page 34) Embedded Systems Design - March 2008 - Efficient CRC Calculation with Minimal Memory Footprint (Page 35) Embedded Systems Design - March 2008 - Efficient CRC Calculation with Minimal Memory Footprint (Page 36) Embedded Systems Design - March 2008 - Efficient CRC Calculation with Minimal Memory Footprint (Page 37) Embedded Systems Design - March 2008 - Efficient CRC Calculation with Minimal Memory Footprint (Page 38) Embedded Systems Design - March 2008 - Efficient CRC Calculation with Minimal Memory Footprint (Page 39) Embedded Systems Design - March 2008 - Efficient CRC Calculation with Minimal Memory Footprint (Page 40) Embedded Systems Design - March 2008 - Programming Your Own Microcontroller (Page 41) Embedded Systems Design - March 2008 - Programming Your Own Microcontroller (Page 42) Embedded Systems Design - March 2008 - Programming Your Own Microcontroller (Page 43) Embedded Systems Design - March 2008 - Programming Your Own Microcontroller (Page 44) Embedded Systems Design - March 2008 - Programming Your Own Microcontroller (Page 45) Embedded Systems Design - March 2008 - Programming Your Own Microcontroller (Page 46) Embedded Systems Design - March 2008 - Programming Your Own Microcontroller (Page 47) Embedded Systems Design - March 2008 - Advertising Index (Page 48) Embedded Systems Design - March 2008 - Break Points (Page 49) Embedded Systems Design - March 2008 - Break Points (Page 50) Embedded Systems Design - March 2008 - Marketplace (Page 51) Embedded Systems Design - March 2008 - Marketplace (Page 52) Embedded Systems Design - March 2008 - Marketplace (Page Cover3) Embedded Systems Design - March 2008 - Marketplace (Page Cover4)
For optimal viewing of this digital publication, please enable JavaScript and then refresh the page. If you would like to try to load the digital publication without using Flash Player detection, please click here.