Embedded Systems Design Europe - March 2008 - (Page 18) 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); } } 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 Figure 6 shows the graphical representation of the centroid point calculation for the output vector Y[]. HARDWARE DESCRIPTION The eZdsp2812 board is used in this motor control application. At the heart of the eZdsp board is the TMS320F2812 DSP. The TMS320F2812 is a 150-MHz device that uses timer T1 running at 20 kHz for generating PWM1-6 signals, and timer T2 running at 40 kHz for executing interrupt service routines (ISRs). Additionally, the input capture pins CAP1-3 are used to collect speed Error and Cerror are compared with the rule table. The rule table contains membership set components NM, NS, ZE, PS, and PM, depending on the control surface. The output is “inferred” from the valid or “fired” rules. The inference process is described by pseudo code in Listing 1. Table 2 shows the initial rule base for the motor control surface. 18 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 MARCH 2008 | embedded systems design europe | www.embedded.com/europe 014-015-016-018-020-021_EETE.ind18 18 5/03/08 12:49:43 http://www.embedded.com/europe
Table of Contents Feed for the Digital Edition of Embedded Systems Design Europe - March 2008 Embedded Systems Design Europe - March 2008 Distributors to Increase Embedded Focus Kontron and Quanta to Join Forces Coverity Raises $22m as European Business Booms Help is at Hand for Europe's Industrial Control Developers Milestones in Embedded Systems Microsoft is Recruiting for Embedded Center in Aachen European Designers to Win Cash for Green Designs Duo Work on Smaller Form Factor Europe Invests in Real-Time Java for Multicore Systems Curtiss-Wright Buys Pentland Systems Designing DSP-Based Motor Control Using Fuzzy Logic Lower the Cost of Intelligent Power Control with FPGAs Virtualizing Embedded Linux Back to the Future: Manchester Encoding Is Multicore Hype or Reality New Products Advertising Contacts Embedded Systems Design Europe - March 2008 Embedded Systems Design Europe - March 2008 - Embedded Systems Design Europe - March 2008 (Page 1) Embedded Systems Design Europe - March 2008 - Embedded Systems Design Europe - March 2008 (Page 2) Embedded Systems Design Europe - March 2008 - Embedded Systems Design Europe - March 2008 (Page 3) Embedded Systems Design Europe - March 2008 - Embedded Systems Design Europe - March 2008 (Page 4) Embedded Systems Design Europe - March 2008 - Embedded Systems Design Europe - March 2008 (Page 5) Embedded Systems Design Europe - March 2008 - Kontron and Quanta to Join Forces (Page 6) Embedded Systems Design Europe - March 2008 - Kontron and Quanta to Join Forces (Page 7) Embedded Systems Design Europe - March 2008 - Milestones in Embedded Systems (Page 8) Embedded Systems Design Europe - March 2008 - Milestones in Embedded Systems (Page 9) Embedded Systems Design Europe - March 2008 - Duo Work on Smaller Form Factor (Page 10) Embedded Systems Design Europe - March 2008 - Duo Work on Smaller Form Factor (Page 11) Embedded Systems Design Europe - March 2008 - Curtiss-Wright Buys Pentland Systems (Page 12) Embedded Systems Design Europe - March 2008 - Curtiss-Wright Buys Pentland Systems (Page 13) Embedded Systems Design Europe - March 2008 - Designing DSP-Based Motor Control Using Fuzzy Logic (Page 14) Embedded Systems Design Europe - March 2008 - Designing DSP-Based Motor Control Using Fuzzy Logic (Page 15) Embedded Systems Design Europe - March 2008 - Designing DSP-Based Motor Control Using Fuzzy Logic (Page 16) Embedded Systems Design Europe - March 2008 - Designing DSP-Based Motor Control Using Fuzzy Logic (Page 17) Embedded Systems Design Europe - March 2008 - Designing DSP-Based Motor Control Using Fuzzy Logic (Page 18) Embedded Systems Design Europe - March 2008 - Designing DSP-Based Motor Control Using Fuzzy Logic (Page 19) Embedded Systems Design Europe - March 2008 - Designing DSP-Based Motor Control Using Fuzzy Logic (Page 20) Embedded Systems Design Europe - March 2008 - Designing DSP-Based Motor Control Using Fuzzy Logic (Page 21) Embedded Systems Design Europe - March 2008 - Lower the Cost of Intelligent Power Control with FPGAs (Page 22) Embedded Systems Design Europe - March 2008 - Lower the Cost of Intelligent Power Control with FPGAs (Page 23) Embedded Systems Design Europe - March 2008 - Lower the Cost of Intelligent Power Control with FPGAs (Page 24) Embedded Systems Design Europe - March 2008 - Lower the Cost of Intelligent Power Control with FPGAs (Page 25) Embedded Systems Design Europe - March 2008 - Virtualizing Embedded Linux (Page 26) Embedded Systems Design Europe - March 2008 - Virtualizing Embedded Linux (Page 27) Embedded Systems Design Europe - March 2008 - Virtualizing Embedded Linux (Page 28) Embedded Systems Design Europe - March 2008 - Virtualizing Embedded Linux (Page 29) Embedded Systems Design Europe - March 2008 - Virtualizing Embedded Linux (Page 30) Embedded Systems Design Europe - March 2008 - Back to the Future: Manchester Encoding (Page 31) Embedded Systems Design Europe - March 2008 - Back to the Future: Manchester Encoding (Page 32) Embedded Systems Design Europe - March 2008 - Back to the Future: Manchester Encoding (Page 33) Embedded Systems Design Europe - March 2008 - Back to the Future: Manchester Encoding (Page 34) Embedded Systems Design Europe - March 2008 - Back to the Future: Manchester Encoding (Page 35) Embedded Systems Design Europe - March 2008 - Is Multicore Hype or Reality (Page 36) Embedded Systems Design Europe - March 2008 - Is Multicore Hype or Reality (Page 37) Embedded Systems Design Europe - March 2008 - Is Multicore Hype or Reality (Page 38) Embedded Systems Design Europe - March 2008 - New Products (Page 39) Embedded Systems Design Europe - March 2008 - New Products (Page 40) Embedded Systems Design Europe - March 2008 - New Products (Page 41) Embedded Systems Design Europe - March 2008 - New Products (Page 42) Embedded Systems Design Europe - March 2008 - Advertising Contacts (Page 43) Embedded Systems Design Europe - March 2008 - Advertising Contacts (Page 44)
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.