Embedded Systems Design - March 2008 - (Page 18) 0308esd.p16to25 2/14/08 3:50 PM Page 18 cover feature termine system behavior, rather than complex math equations. For example, IF the error (E) is equal to NM and + Hysteresis Ιρ ΔΙ Voltage current 3-Phase I dt change in error (CE) is equal to PS, inverter – controller Position then the change in the armature voltcy decoder age (CV) is equal to NS. The number Speed controller of rules used is based on the experience of the designer and the knowledge of Encoder cε ε the system. Thus, for our system the d/dt number of rules used is 25, which is +– ω d/dt based on our basic PID controller ωρ model using the PID’s control surface. Figure 1 In order to energize the armature, the CV fuzzy output must be converted back to a crisp output. This process is 1. Define inputs, outputs, and the natively, CE is negative iff the current called defuzzification. A popular controller’s range of operation. speed is greater than the set speed. method of defuzzification called the 2. Define fuzzy membership set func- When close to the set speed CE altercenter of gravity method is used; I’ll tions and rules. nates between positive and negative discuss it in greater detail later. 3. Tune the engine. values. CV is the energizing voltage apThe last step of design is to adjust plied to the armature. This voltage is the membership functions and rules. Figure 1 shows the block diagram of expressed in implementation as a pulse This stage is also referred to as tuning. the BLDC controller model. Tuning is used to imThe first step is to define prove the performance Instead of math formulas, a fuzzy-logic the relevant inputs and outof the FL controller. puts of the model. The inOnce designed, the controller uses fuzzy rules to make a puts are the error (E), which controller is ready to decision and generate an output; is the current error between be implemented. how cool is that? the set speed (SS) and the The FL controller current speed (CS). The othimplementation is er input is the change in error (CE), width modulation (PWM) duty cycle. made up of three modules. They are which is the difference between the The next step is to define the fuzzy fuzzification, rule-base, and defuzzificurrent error, and the previously calcu- membership set functions, variables cation. The following sections discuss lated error (PE). The output is the and rules. In order to work, non-fuzzy the modules as related to the FL-BLDC change in armature voltage (CV), (crisp) inputs and outputs must be implementation. which is the difference between the converted into fuzzy ones. Conversion current armature voltage (CAV) and is performed by using linguistic variFUZZIFICATION the stored value of the previous armaables to represent input and output Fuzzificaton is the process of convertture voltage (PAV). The resulting ranges. These are also referred to as ing crisp value data into fuzzy data. model equations are as follows: fuzzy variables. Fuzzy variables are used The resulting fuzzy data conversion is to partition a region of values for based on the degree of fuzzy set memE = SS – CS membership functions. For example, bership of input variables. For this apCE = E – PE five variables are used to map the inplication, motor control input variCV = CAV – PAV puts and output. They are negative ables are rotational error (Error) and medium (NM), negative small (NS), change in rotational error (Cerror), Motor speed units are in revoluzero (Z), positive small (PS), and posiwhich are taken from the PID contions per minute (RPM), and E detertive medium (PM). The model’s inputs troller model discussed earlier. Error is mines how close we are to the target and outputs are membership set functhe absolute error from one sample speed. So for E > 0 motor speed is betions that are described over the range time to the next. Similarly, Cerror is low set speed. Alternatively, E < 0 indiof operation by the five fuzzy variables. the change in Error from one sample cates that the motor is spinning faster Instead of math formulas, an FL time to the next. The formulas for than the set speed. CE determines concontroller uses fuzzy rules to make a each are: troller direction to adjust. CE is posidecision and generate an output; how tive if and only if (iff) the current cool is that? FL rules are in the form of Error = SetSpeed – CurrentSpeed speed is less than the set speed. AlterIF-THEN statements. Fuzzy rules deCerror = Error – PreviousError BLDC motor The BLDC controller block diagram. 18 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.