收藏 分享(赏)

交流电机正弦控制AN1017.pdf

上传人:精品资料 文档编号:9711609 上传时间:2019-08-27 格式:PDF 页数:18 大小:313.86KB
下载 相关 举报
交流电机正弦控制AN1017.pdf_第1页
第1页 / 共18页
交流电机正弦控制AN1017.pdf_第2页
第2页 / 共18页
交流电机正弦控制AN1017.pdf_第3页
第3页 / 共18页
交流电机正弦控制AN1017.pdf_第4页
第4页 / 共18页
交流电机正弦控制AN1017.pdf_第5页
第5页 / 共18页
点击查看更多>>
资源描述

1、 2005 Microchip Technology Inc. DS01017A-page 1 AN1017 INTRODUCTION This application note describes a method of driving a sensored Permanent Magnet Synchronous Motor (PMSM) with sinusoidal currents controlled by a dsPIC30F Digital Signal Controller (DSC). The motor control firmware uses the dsPIC30F

2、 peripherals while the mathematical computations are performed by the DSP engine. The firmware is written in C language, with some subroutines in assembly to take advantage of the special DSP operations of the dsPIC30F. APPLICATION FEATURES Sinusoidal current generation for controlling PMSM motor ph

3、ases using Space Vector Modulation (SVM) Synchronization of sinusoidal voltages to PMSM motor position Four-quadrant operation allowing forward, reverse and braking operation Closed-loop speed regulation using digital Proportional Integral Derivative (PID) control Phase advance operation for increas

4、ed speed range Fractional math operations performed by the DSP engine of the dsPIC DSC MOTOR CONTROL WITH DIGITAL SIGNAL CONTROLLERS The dsPIC30F Motor Control family is specifically designed to control the most popular types of motors, including AC Induction Motors (ACIM), Brushed DC Motors (BDC),

5、Brushless DC Motors (BLDC) and Per- manent Magnet Synchronous Motors (PMSM), to list a few. Several application notes have been published for ACIM operation (AN984, AN908 and GS004) and Brushless DC Motor Control operation (AN901, AN957 and AN992) based on the dsPIC30F motor control fam- ily. These

6、application notes are available on the the Microchip web site (). This application note demonstrates how the dsPIC30F2010 is used to control a sensored PMSM motor with sinusoidal voltages. The design takes advantage of dsPIC30F peripherals specifically suited for motor control: Motor Control Pulse W

7、idth Modula- tion (MCPWM) and high-speed A/D Converter. The DSP engine of the dsPIC30F2010 supports the necessary fast mathematical operations. The dsPIC30F2010 family member is a 28-pin 16-bit DSC specifically designed for low-cost/high efficiency motor control applications. The dsPIC30F2010 provid

8、es these key features: 30 MIPS processing performance Six independent or three complementary pairs of dedicated Motor Control PWM outputs Six-input, 1 Msps ADC with simultaneous sam- pling capability from up to four inputs Multiple serial communications: UART, I 2 C and SPI Small package (6 mm x 6 m

9、m QFN) for embedded control applications DSP engine for fast response in control loops HARDWARE REQUIRED You will need the following hardware to implement the described motor control application: PICDEM MCLV Development Board (Figure 1) Hurst DMB0224C10002 BLDC Motor 24 VDC Power Supply You can purc

10、hase these items from Microchip as a complete kit or as individual components. Check the Development Tools section of the Microchip web site for ordering information. FIGURE 1: PICDEM MCLV DEVELOPMENT BOARD Author: Jorge Zambada Microchip Technology Inc. Sinusoidal Control of PMSM Motors with dsPIC3

11、0F DSCSINUSOIDAL CONTROL OF PMSM MOTORS WITH DSPIC30F DSC DS01017A-page 2 2005 Microchip Technology Inc. It is strongly recommended that you read the “PICDEM MCLV Development Board Users Guide” (DS51554) to fully understand the hardware topology being used in this application note. This Users Guide

12、can be downloaded from the Microchip web site. Figure 2 is a simplified system block diagram for a Sinusoidal PMSM motor control application. This diagram will help you develop your own hardware. FIGURE 2: SYSTEM BLOCK DIAGRAM Salient aspects of this topology are: Potentiometer R14 selects the desir

13、ed speed (Reference Speed) Rotor position is detected using Hall effect sensors connected to pins RB3, RB4 and RB5 Current feedback is provided through a simple operational amplifier circuit Fault input is received through a comparator cir- cuit connected with the current feedback circuit. The curre

14、nt is sensed using a 0.1 ohm resistor (R26) You can easily adjust the values of the resistors to accommodate the current capabilities of the motor being used for your application. The motor drive circuit, on the other hand, is designed to drive a 24V PMSM motor. You can change the hardware to meet t

15、he drive requirement of a specific motor. On the low side, the voltage limit is 10V. On the high side, the voltage limit is 48V. It is important to note that the heat sink on the IGBT s have very limited heat dissi- pation, so high power requirements may not be easily met with the PICDEM MCLV develo

16、pment board. To use the PICDEM MCLV development board for this application, use the jumper settings shown in Table 1 and the motor connections shown in Table 2 and Table 3. TABLE 1: PICDEM MCLV DEVELOPMENT BOARD JUMPER SETTINGS TABLE 2: CONNECTIONS FOR MOTOR WINDINGS* TABLE 3: MOTOR CONNECTIONS FOR

17、HALL SENSORS* * The colors referenced in Tables 2 and 3 for the motor windings and hall sensors, respectively, pertain to the Hurst 24V motor available from Microchip. The ground wire is sometimes not available on some motors. After your code is developed and you have down- loaded it to the dsPIC30F

18、, you will need to press switch S2 to start and stop the motor. The potentiomer marked REF (R14) sets the required speed and direction of rotation of the motor. The motor does not need to stop to change direction of rotation. Note: Refer to the “PICDEM MCLV Develop- ment Board Users Guide” (DS51554)

19、 for details on how to change the hardware for use with motors greater or less than 24V. PWM3H PWM3L dsPIC30F2010 PWM2H PWM2L PWM1H PWM1L AN1 AN2 RC14 RB3/CN5 RB4/IC7 RB5/IC8 3-Phase Inverter 3-Phase PMSM Motor Phase A Phase B Phase C Reference Speed S2 +5V Start/Stop R24 R23 R20 R21 R22 R25 Hall A

20、Hall B Hall C IBUS R26 R14 Jumpers Position for Sinusoidal Control (dsPIC DSC Sensored) J7, J8, J11 Open J12, J13, J14 Open J15, J16, J17, J10 Open J19 Short Connector J9 Position for Sinusoidal Control (dsPIC DSC Sensored) M3 Phase A (White) M2 Phase B (Black) M1 Phase C (Red) G Ground (Green) if a

21、vailable Connector J9 Position for Sinusoidal Control (dsPIC DSC Sensored) +5V Red GND Black HA White HB Brown HC Green 2005 Microchip Technology Inc. DS01017A-page 3 SINUSOIDAL CONTROL OF PMSM MOTORS WITH DSPIC30F DSC PROGRAMMING THE dsPIC30F2010 WITH THE dsPICDEM MCLV DEVELOPMENT BOARD The dsPICDE

22、M MCLV development board allows you to program the dsPIC30F2010 in-circuit. To program the part, you must set DIP switch S4 to the PRGM posi- tion. When programming is complete, you must set the DIP switch to the DEBUG position to execute the code. If the IDC2 is connected to the PICDEM MCLV devel-

23、opment board as a debugger, the connector at J6 should be attached. If you use MPLAB ICD 2 as a debugger, the RJ11 cable should be connected to the board (J6). If you use MPLAB ICD 2 as a programmer only, the RJ11 cable should be connected for program- ming the part and unplugged for normal program

24、exe- cution. The following configuration allows the application to work on a PICDEM MCLV development board: Other settings can be enabled or disabled as needed, or modified in the application. BACKGROUND Many consumer and industrial applications use the BLDC motor because of its compact size, contro

25、llability and high efficiency. Increasingly, it is used in automo- tive applications as part of a strategy to eliminate belts and hydraulic systems, to increase functionality and to improve fuel economy. In high-performance applica- tions, such as machine tools and low noise fan applications, the pr

26、oduction of smooth torque is crucial. The main disadvantage of BLDC motors, when low torque ripple and quieter operation are required, is the non-sinusoidal distribution of the stator windings. BLDC motors with non-sinusoidal winding distribution generate trapezoidal back-EMF, as shown in Figure 3.

27、Trapezoidal Back-EMF BLDC motors are specifically designed to be driven with square voltages synchro- nized with the motors angular position. This control method is commonly called six-step commutation. It is assumed that you are familiar with the six-step commutation technique, so no further elabor

28、ation is offered in this application note. However, for more detailed information on how to operate a BLDC motor with six-step commutation, you can refer to these additional Microchip application notes: AN857 “Brushless DC Motor Control Made Easy” (DS00857) AN957 “Sensored BLDC Motor Control Using d

29、sPIC30F2010” (DS00957) For a good introduction to BLDC motors and their basic operating principles, see also AN885 “Brushless DC (BLDC) Motor Fundamentals” (DS00885) . FIGURE 3: TRAPESOIDAL BACK-EMF Trapezoidal distribution of the motor windings of a BLDC motor leads to torque ripple during motor op

30、era- tion since the current generation is also trapezoidal. This torque ripple produces a small speed oscillation, which generates audible noise. On the other hand, sinusoidal Back-EMF BLDC motors, also known as Permanent Magnet Synchronous Motors (PMSM) pro- duce sinusoidal currents, which reduce t

31、he torque rip- ple, thus minimizing the audible noise. Figure 4 shows the sinusoidal back-EMF voltages generated by a motor with sinusoidal winding distribution. FIGURE 4: SINUSOIDAL BACK-EMF This application note assumes a 3-Phase PMSM motor with sinusoidal back-EMF and three Hall effect sensors. O

32、scillator Source: Primary Oscillator Primary Oscillator Mode: XT w/PLL 16x Comm Channel Select: EMUC2 and EMUD2 00 60 60 120 180 240 300 Phase A Phase B Phase C 00 60 60 120 180 240 300 Phase A Phase B Phase CSINUSOIDAL CONTROL OF PMSM MOTORS WITH DSPIC30F DSC DS01017A-page 4 2005 Microchip Technolo

33、gy Inc. SENSORED OPERATION OF BLDC MOTORS T o allow correct commutation of the motor, the absolute position within an electrical cycle must be measured. Three Hall effect sensors provide rotor position infor- mation. These sensors are distributed along the stator in such a way that they generate six

34、 different logic states per electrical cycle. The ratio between the elec- trical cycles and mechanical revolutions depends on the number of motor pole pairs. For instance, the motor used in this application note has five pole pairs, so every mechanical revolution requires five electrical cycles. For

35、 conventional energization (six-step com- mutation), six equally spaced commutations are required per electrical cycle. This is usually imple- mented using three Hall effect or optical switches with a suitable disk on the rotor. Continuous position infor- mation is not required. Only detection of th

36、e required commutation instances is required. Figure 5 shows the three sensor outputs along with the corresponding voltage driving each motor winding. FIGURE 5: SIX-STEP COMMUTATION FOR TRAPEZOIDAL BLDC MOTORS You can see that the voltage does not vary for each par- ticular sector until a new motor

37、position or combination of Hall effect sensor is detected. For the technique described in this application note, the three Hall effect sensors detect the rotor position, as in the six-step technique. However, instead of generating square waves, a continuous changing voltage is generated with a sine-

38、wave shape. Figure 6 shows the resulting sinusoidal voltage generation. The relation is shown between the phase voltages and the three Hall effect sensors. The amplitude of the sinusoidal voltages determines the speed for a specific mechanical load in the motor. FIGURE 6: VOLTAGE GENERATION FOR SINU

39、SOIDAL BLDC MOTORS 06 0 6 0 0 120 180 240 300 HALL A HALL B HALL C VOLTAGE A Float VOLTAGE B VOLTAGE C Float Float +V +V +V -V -V -V 06 0 6 0 0 120 180 240 300 HALL A HALL B HALL C VOLTAGE A Float VOLTAGE B VOLTAGE C Float Float +V +V +V -V -V -V 2005 Microchip Technology Inc. DS01017A-page 5 SINUSO

40、IDAL CONTROL OF PMSM MOTORS WITH DSPIC30F DSC IMPLEMENTATION OF SINUSOIDAL VOLTAGE CONTROL Figure 7 is a block diagram representation of the appli- cation software. When the motor is running, Measured Speed is subtracted from Reference Speed (desired speed) and the resulting error is processed by th

41、e PID controller to generate the amplitude of the sine wave. The Reference Speed is set by an external potentiom- eter, while the measured speed is derived from a Hall effect sensor. Once Amplitude is known, two additional parameters are needed for sine generation. One parameter is the Period of the

42、 sine wave, which is taken from one of the Hall effect sensors. The other parameter is the Phase, which is calculated using Phase Advance, depending on speed range requirements and the rotor position from the Hall effect sensors. The Amplitude variable sets the amount of motor current and the result

43、ing torque. An increase in torque corresponds to an increase in speed. The speed control loop only controls Amplitude. The value of Phase from the Phase Advance block is derived from Hall effect sensor information to maintain the sinusoidal voltage alignment to the rotor. Using the software block di

44、agram as a point of refer- ence, the following sections of this application note describe the software functionality in detail. The description starts with the Main State machine, which interacts with all the other software blocks using global variables. Then the description focuses on speed mea- su

45、rements (Reference Speed and Measured Speed), leading to an explanation of the software implementa- tion of the PID controller. This discussion includes some background information on PID control. Next, calculation of the parameters for generating three-phase sine waves is discussed, starting with t

46、he rotor sector and phase advance calculations. And finally, sinusoidal voltage generation using space vec- tor modulation, with Amplitude, Phase and Period as parameters, concludes the discussion. FIGURE 7: SOFTWARE BLOCK DIAGRAM BLDC 3-Phase Inverter 3-Phase Voltages Fault Low-Pass Passive Filters

47、 Input Capture MCPWM 10-Bit ADC GPIO +5v Reference Speed Error + - PID Amplitude Sine-Wave Generation Duty Cycles Phase Period Phase Advance Measured Maximum Phase Advance Rotor Sector Rotor Sector Calculation Direction Angular Position Period Main State Machine Start/ Stop Hall Sensors dsPIC DSC So

48、ftware Speed Calculation SpeedSINUSOIDAL CONTROL OF PMSM MOTORS WITH DSPIC30F DSC DS01017A-page 6 2005 Microchip Technology Inc. MAIN STATE MACHINE The state diagram shown in Figure 8 illustrates how each interrupt (shown with heavy, dark lines) interacts with the motor control software. At Power-on

49、 Reset, the software initializes all the software variables and enables all the peripherals to be used by the applica- tion. After the variables and peripherals are initialized, the software enters the Motor Stopped state and remains there until a Start command is executed from the external push button (S2 pressed). When S2 is pressed, the RunMotor() subroutine is called, and the first process within this subroutine (ChargeBootstraps() is executed. The inverter circuit uses N-channel MOSFETs for the upp

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 企业管理 > 管理学资料

本站链接:文库   一言   我酷   合作


客服QQ:2549714901微博号:道客多多官方知乎号:道客多多

经营许可证编号: 粤ICP备2021046453号世界地图

道客多多©版权所有2020-2025营业执照举报