Design of brushless DC motor control system based on dsPIC30F3010

Publisher:meirongLatest update time:2012-03-03 Source: 电子设计工程 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

Brushless DC motor (BLDCM) is a new type of motor developed with the rapid development of power electronics technology. It has a series of advantages such as high reliability and easy maintenance, and has been widely used in household appliances and industrial production. In terms of its basic structure, the brushless DC motor can be considered as an "electric system" composed of the motor body, rotor position detection circuit and electronic switch circuit.

The electronic switch circuit of the brushless DC motor is used to control the order and time of powering on each phase winding on the motor stator. It is mainly composed of two parts: the power logic switch unit and the position sensor signal processing unit. The power logic switch unit is the core of the control circuit. Its function is to distribute the power of the power supply to each phase winding on the brushless DC motor stator in a certain logical relationship so that the motor can generate continuous torque. The order and time of the conduction of each phase winding mainly depends on the rotor position signal from the rotor position detection circuit. However, the signal generated by the rotor position detection circuit cannot generally be used directly to control the power logic switch unit. It often needs to undergo certain logic processing (power amplification) before it can control the logic switch unit.

The difficulty of position sensorless control of brushless DC motor lies in the detection of rotor position signal. Domestic and foreign researchers have proposed many methods, typical methods include: back electromotive force method, third harmonic detection method, inductance detection method and extended Kalman filter method. The third harmonic detection method can accurately and quickly estimate the rotor position at high speed, but when the motor speed is lower than a certain value, the detected third harmonic is severely distorted and the rotor position cannot be accurately estimated. The inductance detection method requires continuous real-time detection of the winding inductance, which is difficult to implement. The extended Kalman filter method is cumbersome to calculate, has high requirements on microcomputer performance, and is more troublesome to implement. The back electromotive force zero-crossing detection method detects the zero-crossing point of each back electromotive force, delays 30° electrical angle, and obtains the corresponding commutation moment. Although this method has the disadvantages of difficulty in obtaining effective rotor position signals at low speeds and zero-crossing phase shift caused by the RC filter circuit, it is currently the most mature, simplest to implement, and most widely used rotor position detection method.

The commonly used control schemes are DSP-based control and ASIC-based control. Due to the limitations of chip functions, speed and structure, more peripheral circuits are often required in hardware design, resulting in low overall integration of the device and relatively complex hardware development. This paper adopts the back-electromotive force zero-crossing detection method and designs a brushless DC motor position sensorless control system based on the dsPIC30F3010 chip. It combines the control characteristics of a high-performance 16-bit microcontroller with the advantages of DSP high-speed computing, providing a suitable single-chip, single-instruction stream solution for embedded system design. It has a simple structure and good operating performance.

1 System Hardware Design

The hardware of this brushless DC motor position sensorless control system uses the digital signal controller dsPIC30F3010 produced by Microchip as the core controller. The dsPIC 30F3010 has 6 10-bit A/Ds, 6 PWM modules designed specifically for motors, 5 16-bit timers, 24 kB Flash program memory, and 1 kB RAM. The dsPIC30F series devices use a powerful 16-bit architecture that seamlessly integrates the control functions of a microcontroller (MCU) and the computing power of a digital signal processor. Therefore, it is an ideal choice for applications based on high-speed, repetitive calculations and control.

1.1 Overall design of system hardware

The system hardware circuit consists of the main circuit, drive circuit, zero-crossing detection circuit, sampling circuit, and various protection circuits. The dsPIC30F3010 controller first obtains the rotor position signal through the back electromotive force detection method, and sends out the corresponding control word according to the rotor position to change the current value of the PWM signal, thereby changing the conduction sequence of the power tube in the DC motor drive circuit to achieve the control of the motor speed. Then the system measures the motor speed according to the rotor position and interval time. The detected current of each phase is converted into a voltage signal and then input into the A/D converter of the DSC after voltage reduction. Its value is compared with the current reference value generated after speed regulation to form the control amount of the PWM duty cycle to change the armature current of the DC brushless motor, thereby achieving the purpose of controlling the motor speed. The full-bridge PWM regulation method is adopted in the control system. The average DC voltage of the input brushless DC motor is adjusted by changing the duty cycle of the PWM control pulse to achieve the purpose of speed regulation. The hardware block diagram of the whole system is shown in Figure 1.

a.jpg


1.2 Design of dsPIC30F3010 peripheral circuit

Figure 2 is the control chip dsPIC30F3010 and its peripheral circuit diagram. In the figure, i.jpg the top is connected to the reset circuit, S1 is the reset button, through the pull-up resistor R2, so that the VPP/MCLR pin can be set to a low level to reset the PIC microcontroller; S2 is the start/stop button, which controls the start and stop of the motor; SW1 is the debug/programming switch, closing SW1 can switch to the MPLAB ICD clock line and data line for programming; HA, HB, HC are three-phase voltage feedback; VBUS and IMOTOR interfaces are the input interfaces of the motor bus voltage and current respectively; in the circuit, a resistor is connected to the ground in series through an adjustable resistor as the setting of the given speed. The small resistor in series prevents AD from reading a value as low as 0, avoiding the problem of the lower limit of the given speed. Use RB3/AN3, RB4/AN4, and RB5/AN5 to realize the motor terminal voltage detection and obtain the zero crossing point of the back electromotive force. PWM1L/YPWM1H, PWM2L/PWM2H, and PWM3L/PWM3H are the upper and lower arm switch signal interfaces of the A, B, and C three-phase inverter bridge circuits respectively. The PWM module is used to control the on and off of the six MOSFETs to achieve phase switching.

b.jpg

[page]

1.3 Design of inverter and its drive circuit

The inverter and drive circuit is shown in Figure 3. The main circuit adopts a three-phase bridge inverter circuit. The control part generates six PWM pulses, which are sent to the 2nd and 3rd pins of the three IR2101s respectively. After the internal processing of IR2101, two drive signals are generated to drive the two power MOS tubes of one bridge arm. C15 is a bootstrap capacitor, which stores energy for the floating power supply driven by the upper bridge arm power tube. The role of D1 is to prevent the DC bus voltage from reaching the power supply of IR2101 when the upper bridge arm is turned on, which will damage the device. Therefore, there should be enough reverse withstand voltage. Of course, since D1 is connected in series with C15, in order to meet the switching frequency requirements of the power tube of the main circuit, D1 should be a fast recovery diode, and the bootstrap capacitor capacity depends on the switching frequency, duty cycle and charging circuit resistance of the driven power device. It must be ensured that the capacitor is charged to a sufficient voltage. In this circuit, the bootstrap capacitor is a 2.2μF electrolytic capacitor. R30, R31, R32 and R33 are current limiting resistors to prevent the drive signal current from being too large and damaging the device.

c.jpg


FIG3 shows only the driving circuit of the bridge arm connected to the phase A winding of the motor. Similarly, the driving circuits of the bridge arms connected to the other two phase windings are similar.

1.4 Design of back-EMF detection circuit

When the brushless DC motor is running in steady state, the armature reaction of the motor is ignored, and the key position signal of the permanent magnet rotor is obtained by detecting the zero-crossing point of the reverse electromotive force, so as to control the switching of the winding current and realize the operation of the motor.

From the structure of the brushless DC motor, we know that the zero-crossing point of the back electromotive force has a corresponding relationship with the rotor position. By detecting the zero-crossing point of the back electromotive force on the stator winding, we can get the rotor position information. During the PWM conduction period, the terminal voltage of the suspended winding is equal to the superposition of the back electromotive force and 1/2 of the power supply voltage. The terminal voltage of the phase winding that is not energized is detected. When its value is equal to half of the power supply voltage, it is the back electromotive force zero-crossing signal. If the zero-crossing signal of the back electromotive force can be accurately detected, the position of the rotor can be determined. After the π/6 electric radian delay processing, the commutation time can be determined, and then the corresponding power tube can be triggered according to the conduction sequence of the power tube to realize the commutation of the brushless DC motor, ensuring that the motor rotates continuously in a fixed direction.

d.jpg


Assuming the speed is greater than zero, there are only two locations per electrical cycle where the BEMF for a phase is zero, as shown in Figure 4, and these locations are distinguished by the slope of the BEMF at the zero crossing. Each segment corresponds to a 60° portion of the electrical cycle (there are six equal 60° portions). Commutation occurs at the boundary of each segment, so segment boundaries need to be detected. There is a 30° offset between the BEMF zero crossing and the location where commutation is required, which must be compensated for smooth and efficient motor operation.

[page]

e.jpg


The three-phase back electromotive force detection circuit diagram is shown in Figure 5. The figure shows three detection channels, which are the detection of the three-phase back electromotive force of U, V, and W. The circuit principle is actually a simple resistor voltage divider network, which is mainly used to reduce the higher signal voltage to meet the AD conversion input requirements of the single-chip microcomputer. After the three-phase voltage is divided by 22 kΩ and 2.4 Ω resistors, it enters the three AD pins AN3, AN4, and AN5 through a 300 Ω resistor. AN3, AN4, and AN5 are used to detect the motor terminal voltage and obtain the back electromotive force zero point. During the PWM opening period, the terminal voltage of the phase winding that is not energized is detected. When its value is equal to half of the power supply voltage, it is the back electromotive force zero point signal.

1.5 Current sampling and overcurrent protection circuit

The current sampling and overcurrent protection circuit is shown in Figure 6. In order to obtain the current feedback information of the motor, a low-resistance current detection resistor (25 mΩ) is connected between the negative voltage of the DC bus and the ground. The voltage generated by this resistor is amplified by an external op amp (MCP6002) and fed back to the ADC input (RB1).

f.jpg


The motor control series MCU of dsPIC30/33 has an FLTA pin. When a low level output is obtained, the effective output of PWM can be turned off and made invalid. This is a hardware processing mechanism, so fault events can be handled quickly to achieve safe operation. The fault input signal can be obtained through the comparator circuit (U6) connected to the current feedback circuit, and the comparator threshold value can be adjusted through the potentiometer POT2.

2 System Software Design

The software design includes the DSC event manager initialization program, motor starting program, commutation subroutine, interrupt service program, speed loop and current loop control program, etc. It mainly realizes the open-loop start-up, zero-crossing detection, commutation, speed and current closed-loop control of the motor, etc. The software design is completed in Microchip's integrated development environment MPLAB IDE, and the control program is written in C30 language.

The main program is an infinite loop structure, which is used to complete the dsPIC30F3010 initialization, watchdog program and medium-speed event handler. The software structure is based on the main program, and parameters are passed to subroutines through function calls and global variables. The medium-speed event handler loops once every 10 ms, including motor start, speed control, current A/D conversion and cyclic call interrupt service subroutines, etc. It is the most important program in the entire system. The main program flow and the medium-speed event handler flow are shown in Figures 7 and 8 respectively.

g.jpg


The following four issues should be noted in software design: 1) Use the special event trigger of the motor control PWM module to start the A/D signal conversion, so that the A/D conversion can be synchronized with the PWM time base. 2) The first few back-EMF sampling points after phase switching should be discarded, so that it is easy to avoid the demagnetization problem of the phase winding, because the winding current will not be zero immediately after phase switching, and it will drop to zero after a continuous current process. 3) Do not use hardware to filter the terminal voltage waveform significantly, but use software to carefully select signal sampling points according to the PWM waveform to eliminate the mutual coupling PWM related noise and discontinuous current problems. 4) Use the QEI counter to record the time when the two terminal voltages are continuously monitored to cross the zero point. Divide by 2 to get the time of 30° electrical angle. Load this time into timer 2. Timer 2 triggers an interrupt after 30° electrical angle time, and calls the phase switching subroutine for electronic phase switching. [page]

3 Experimental Results

A three-phase eight-pole brushless DC motor of type 42BLF02, 24 V, 52 W, maximum current 9.4 A, and rated speed 4 000 rpm was used as the experimental object, and a speed and current double closed-loop regulation method was adopted. The experimental platform and the voltage waveforms of the two phases when the motor is running stably are shown in Figures 9 and 10 respectively.

h.jpg


After the hardware and software were debugged successfully, the position sensorless control system based on the dsPIC30F3010 chip was able to control the motor to start smoothly, and achieved the correct commutation of the experimental motor, ensuring the normal operation of the brushless DC motor. The whole solution is feasible and the test results are relatively ideal.

The terminal voltage waveform during normal operation of the motor is shown in Figure 10. It can be seen from the figure that the terminal voltage waveform is a good trapezoidal wave, which is consistent with the theoretical terminal voltage waveform. In the 60° electrical angle interval indicated by the arrow, the phase winding is in a suspended state, while the other two phase windings are in a working state. From the theoretical analysis, it can be seen that when the phase is not conducting, the phase terminal potential is equal to the superposition of the back electromotive force and 1/2 of the power supply voltage. It can be seen from the figure that when the phase is not conducting, the back electromotive force zero crossing appears in the middle position when the phase is not conducting, and there is an offset of 12 V, which is exactly the same as the theoretical analysis.

4 Conclusion

This system adopts a simple design scheme in both the software and hardware of the brushless DC motor position sensorless control system. Experiments have proved that the motor system starts smoothly without vibration and loss of step by adopting the above control technology. Compared with similar systems using single-chip microcomputers, the DSC control system can achieve comparable functions and control accuracy, but at a lower cost and simplified hardware design, making it an ideal choice for brushless DC motor controllers.

Reference address:Design of brushless DC motor control system based on dsPIC30F3010

Previous article:Introduction to 16-bit MCU technology designed with PIC24FJ256DA210
Next article:Software and hardware design of adjustable countdown reminder based on PIC16F627 microcontroller

Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号