Embedded Systems Design - March 2008 - (Page 24) 0308esd.p16to25 2/14/08 3:51 PM Page 24 cover feature Figure 6 shows the graphical representation of the centroid point calculation for the output vector Y[]. ECAP1-3 capture signals from the halleffect sensors. The motor is driven with PWM signals generated by the DSP and translated to a 3-phase output. The six PWM signals are used to source the 3phase power inverter. The power inverter converts the six signals to a 3phase signal that directly powers the motor. The 3-phase power inverter function is handled by an auxiliary termined by detecting edges from signals received from the hall-effect sensors. The signals are fed into the TMS320F2812’s capture pins and are debounced to eliminate noise or false edges from motor oscillations. The actual motor speed is calculated by counting the edge-triggered signals from the Hall-effect sensors via a software module. Figure 7 shows the hardware block diagram for controlling a three phase BLDC motor. 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 The fuzzy controller calculates at 40 kHz for executing inthe absolute and differential based on the SOFTWARE terrupt service routines (ISRs). Additionally, the inDESCRIPTION target set speed, current speed, and put capture pins CAP1-3 are The motor control previous absolute error. used to collect speed data software is composed from the hall-effect sensors. of DMC Library modOther members of the 28xx family motor control board. Spectrum Digital ules and the FL motor control routines. may be substituted for the provides two boards that provide this Seven of the DMClib modules are used TMS320F2812. For instance, the eZdfunction: the DMC550 and the in this application. They are: sp2808 board may be used if the timers DMC1500. Either board plugs directly Datalog driving the PWM and ISRs are into the eZdsp28xx board. BLDC3PWM changed. Specifically on the eZdsp2808 Hall-effect sensors are used for Hall3_Drv board, EPWM1-3 is used for PWM feedback for the fuzzy logic control Mod6_Cnt generation, while CPU timer 0 is used loop. The commutation instants for the Rmp2Cntl for an ISR interrupt source. Similarly, 3-phase power inverter switches are deRamp_Cntl Speed_PR The output membership function. NM NS ZE • • • • • • • y PS PM -0x10 Figure 5 -0x8 0x0 0x8 0x10 The output membership function multiplied by vector Y[]. y NM NS ZE 0x196A PS PM -0x10 Figure 6 -0x8 0x0 0x13F 0x8 0x10 Additionally, the FL motor control is handled by a main FuzzyCtl() routine; this is FuzzyBLDC() for BLDC motors. When configured, these components demonstrate fuzzy logic control of a variable speed motor. The software works by first performing configuration, then application-specific setup. Specifically, the GPIO pins are configured to act as PWMs and CAPture pins. Next the timers and module parameters are initialized, as well as ISR setup. After all peripherals are setup, interrupts are enabled, and the main control loop is entered. The main control loop calls the fuzzy controller once every 8.7 ms. The error values are converted through fuzzification into fuzzy values and stored in X1[], and X2[]. Once converted, the fuzzified values applied to the fuzzy inference rules. The results from the inference module are stored in Y[]. Output from Y[] is then applied 24 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.