CN115173752A - Accurate commutation control method for brushless direct current motor without position sensing - Google Patents
Accurate commutation control method for brushless direct current motor without position sensing Download PDFInfo
- Publication number
- CN115173752A CN115173752A CN202210575506.XA CN202210575506A CN115173752A CN 115173752 A CN115173752 A CN 115173752A CN 202210575506 A CN202210575506 A CN 202210575506A CN 115173752 A CN115173752 A CN 115173752A
- Authority
- CN
- China
- Prior art keywords
- motor
- rotor
- commutation
- signal
- brushless
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Classifications
-
- H—ELECTRICITY
- H02—GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
- H02P—CONTROL OR REGULATION OF ELECTRIC MOTORS, ELECTRIC GENERATORS OR DYNAMO-ELECTRIC CONVERTERS; CONTROLLING TRANSFORMERS, REACTORS OR CHOKE COILS
- H02P6/00—Arrangements for controlling synchronous motors or other dynamo-electric motors using electronic commutation dependent on the rotor position; Electronic commutators therefor
- H02P6/08—Arrangements for controlling the speed or torque of a single motor
-
- H—ELECTRICITY
- H02—GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
- H02P—CONTROL OR REGULATION OF ELECTRIC MOTORS, ELECTRIC GENERATORS OR DYNAMO-ELECTRIC CONVERTERS; CONTROLLING TRANSFORMERS, REACTORS OR CHOKE COILS
- H02P6/00—Arrangements for controlling synchronous motors or other dynamo-electric motors using electronic commutation dependent on the rotor position; Electronic commutators therefor
- H02P6/14—Electronic commutators
- H02P6/16—Circuit arrangements for detecting position
- H02P6/18—Circuit arrangements for detecting position without separate position detecting elements
-
- H—ELECTRICITY
- H02—GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
- H02P—CONTROL OR REGULATION OF ELECTRIC MOTORS, ELECTRIC GENERATORS OR DYNAMO-ELECTRIC CONVERTERS; CONTROLLING TRANSFORMERS, REACTORS OR CHOKE COILS
- H02P6/00—Arrangements for controlling synchronous motors or other dynamo-electric motors using electronic commutation dependent on the rotor position; Electronic commutators therefor
- H02P6/14—Electronic commutators
- H02P6/16—Circuit arrangements for detecting position
- H02P6/18—Circuit arrangements for detecting position without separate position detecting elements
- H02P6/182—Circuit arrangements for detecting position without separate position detecting elements using back-emf in windings
-
- H—ELECTRICITY
- H02—GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
- H02P—CONTROL OR REGULATION OF ELECTRIC MOTORS, ELECTRIC GENERATORS OR DYNAMO-ELECTRIC CONVERTERS; CONTROLLING TRANSFORMERS, REACTORS OR CHOKE COILS
- H02P2203/00—Indexing scheme relating to controlling arrangements characterised by the means for detecting the position of the rotor
- H02P2203/03—Determination of the rotor position, e.g. initial rotor position, during standstill or low speed operation
Landscapes
- Engineering & Computer Science (AREA)
- Power Engineering (AREA)
- Control Of Motors That Do Not Use Commutators (AREA)
Abstract
Description
技术领域technical field
本发明属于电机技术领域,具体涉及一种无位置传感无刷直流电机精确换相控制方法。The invention belongs to the technical field of motors, and in particular relates to a precise commutation control method for a position-sensing brushless DC motor.
背景技术Background technique
无刷直流电机因其运行效率高,调速性能好,结构简单,并且方便维护等诸多优点已在航空航天,过程控制,电子设备,地下矿井作业,家用电器等广泛应用。其换相由于受到换相延时、电机工作是否负载等影响,无法在一定时间内准确获得电机转速,且转子的实时位置确定困难,不能准确得到下一个换相点,影响换相的精确度。为此,我们提出一种无位置传感无刷直流电机精确换相控制方法,以解决上述背景技术中提到的问题。Brushless DC motors have been widely used in aerospace, process control, electronic equipment, underground mine operations, household appliances, etc. due to their high operating efficiency, good speed regulation performance, simple structure, and easy maintenance. The commutation is affected by the commutation delay and whether the motor is working or not, so the motor speed cannot be accurately obtained within a certain period of time, and the real-time position of the rotor is difficult to determine, and the next commutation point cannot be accurately obtained, which affects the accuracy of commutation. . To this end, we propose a precise commutation control method for a position sensorless brushless DC motor to solve the problems mentioned in the above background art.
发明内容SUMMARY OF THE INVENTION
本发明的目的在于提供一种无位置传感无刷直流电机精确换相控制方法,以解决上述背景技术中提出的问题。The purpose of the present invention is to provide a precise commutation control method for a position-sensing brushless DC motor, so as to solve the above-mentioned problems in the background art.
为实现上述目的,本发明提供如下技术方案:一种无位置传感无刷直流电机精确换相控制方法,包括如下步骤:In order to achieve the above purpose, the present invention provides the following technical solutions: a method for precise commutation control of a position-sensing brushless DC motor, comprising the following steps:
S1、定时器模块的定时值用于对电机转子速度进行计算来完成定时功能;S1. The timing value of the timer module is used to calculate the rotor speed of the motor to complete the timing function;
S2、A/D模块是对电机端电压和相电流进行采样,然后转换成对应的线值,用于转子位置计算;S2. The A/D module samples the motor terminal voltage and phase current, and then converts them into corresponding line values for rotor position calculation;
S3、PWM模块根据检测出来的转子位置信号,得出换相逻辑信号,发出相应驱动信号,控制电机换相实现对换相驱动信号的控制功能;S3. The PWM module obtains the commutation logic signal according to the detected rotor position signal, sends out the corresponding driving signal, and controls the motor commutation to realize the control function of the commutation driving signal;
S4、启动函数弥补无位置传感器在静止或低速时无法检测到反电动势过零点的缺点,实现电机软启动。S4. The start function makes up for the disadvantage that no position sensor can detect the zero-crossing point of the back electromotive force when it is stationary or at low speed, and realizes the soft start of the motor.
所述无位置传感无刷直流电机的精确换相控制系统包括无刷直流电机本体,转子位置检测单元,控制器,逆变器和直流电源;The precise commutation control system of the position sensorless brushless DC motor includes a brushless DC motor body, a rotor position detection unit, a controller, an inverter and a DC power supply;
直流电源通过逆变器电性连接于无刷直流电机本体,无刷直流电机本体通过转子位置检测单元连接于控制器,控制器电性连接于逆变器;The DC power supply is electrically connected to the brushless DC motor body through the inverter, the brushless DC motor body is connected to the controller through the rotor position detection unit, and the controller is electrically connected to the inverter;
无刷直流电机本体的转子位置信号通过转子位置检测单元传递给控制器,控制器输出触发脉冲驱动逆变器,使无刷直流电机本体的绕组按规律通电,无刷直流电机本体的转子的磁场和由电流产生的磁场经过合成电磁转矩,从而带动无刷直流电机本体的正常运转。The rotor position signal of the brushless DC motor body is transmitted to the controller through the rotor position detection unit, and the controller outputs trigger pulses to drive the inverter, so that the windings of the brushless DC motor body are energized regularly, and the magnetic field of the rotor of the brushless DC motor body is And the magnetic field generated by the current passes through the synthetic electromagnetic torque, thereby driving the normal operation of the brushless DC motor body.
所述步骤S1中,对电机转子速度进行计算包括如下步骤:In the step S1, the calculation of the rotor speed of the motor includes the following steps:
由转子转过60电角度的时间对应着两个相邻反电势过零点的间隔,利用定时器模块,确定相邻2次反电势过零点之间的时间算出转子速度;The time for the rotor to rotate through 60 electrical degrees corresponds to the interval between two adjacent back-EMF zero-crossing points, and the timer module is used to determine the time between two adjacent back-EMF zero-crossing points to calculate the rotor speed;
电机转速计算为:(转/分钟),其中,fPWM表示PWM信号的频率;p表示极对数;COUNT表示一个60度电角度内PWM定时计数器的计数值;The motor speed is calculated as: (revolution/minute), where f PWM represents the frequency of the PWM signal; p represents the number of pole pairs; COUNT represents the count value of the PWM timer counter within a 60-degree electrical angle;
当检测到相邻2次反电势过零点时,就读取COUNT计数值并清零,COUNT再重新计数。When two adjacent back-EMF zero-crossing points are detected, the count value of COUNT is read and cleared, and COUNT is counted again.
所述步骤S3中,换相逻辑信号由反电势过零信号经过逻辑处理而得到的,具体包括:转速通过负反馈与给定转速进行比较后,进行转速PI调节;In the step S3, the commutation logic signal is obtained by logical processing of the back EMF zero-crossing signal, which specifically includes: after the rotational speed is compared with a given rotational speed through negative feedback, the rotational speed PI is adjusted;
将输出作为电流环的给定值,与输出相电流进行比较后,经过电流环进行PI调节输出,其中经过限幅和整流处理后,就可以调节PWM的占空比,其占空比值输出和逻辑开关信号做与处理,得到逆变桥模块gate信号输入作用于逆变器,间接控制了电机能得到的平均电压。The output is used as the given value of the current loop, and after comparing with the output phase current, the output is adjusted by PI through the current loop. After the amplitude limiting and rectification processing, the duty cycle of the PWM can be adjusted. The logic switch signal is processed and processed, and the gate signal input of the inverter bridge module is obtained to act on the inverter, which indirectly controls the average voltage that the motor can obtain.
所述步骤S5中,电机软启动具体包括:首先用转子预定位法定位后,接着封死全部的驱动信号,使电机处于断电的状态;In the step S5, the soft start of the motor specifically includes: first, after positioning by the rotor pre-positioning method, then sealing all the driving signals, so that the motor is in a power-off state;
再采用同样的方法进行转子预定位来实现电机的准确定位,该预定位的位置是要在第一次预定位的定位基础上,将导通步向前或向后发生一次换相;Then use the same method to pre-position the rotor to realize the accurate positioning of the motor. The pre-positioning position is based on the positioning of the first pre-positioning, and the conduction step is forwarded or backward. A commutation occurs;
将电机转子定位到特定位置,然后按照直流无刷电机的换向顺序对电机进行换向,这是三段式启动法的第二阶段,即外同步加速法;Position the motor rotor to a specific position, and then commutate the motor according to the commutation sequence of the brushless DC motor. This is the second stage of the three-stage starting method, that is, the external synchronous acceleration method;
当转子定位完成后,按照电机的转动方向在使用长脉冲给电机加速的同时,使用短脉冲检测转子位置信号;When the rotor positioning is completed, according to the rotation direction of the motor, the long pulse is used to accelerate the motor, and the short pulse is used to detect the rotor position signal;
施加换相信号作用于电机定子绕组上时,一方面,换相信号要根据六步通电换相顺序来施加驱动信号到逆变管上,另外要逐步提高PWM信号的占空比,不断增加六步通电顺序的换相频率,从而使得定子绕组电压能增大到预期的频率,使得电机能达到一定转速,其中的反电势信号增大到能够检测出来。When the commutation signal is applied to the stator winding of the motor, on the one hand, the commutation signal should apply the drive signal to the inverter tube according to the six-step energization commutation sequence, and the duty cycle of the PWM signal should be gradually increased, continuously increasing by six. The commutation frequency of the power-on sequence is adjusted step by step, so that the stator winding voltage can be increased to the expected frequency, so that the motor can reach a certain speed, and the back EMF signal in it can be increased enough to be detected.
与现有技术相比,本发明的有益效果是:本发明提供的一种无位置传感无刷直流电机精确换相控制方法,本发明在一定的时间内,通过对反电势过零点数量的计数值除以极数获得电机转速。将速度PI的输出反馈到了电流PI输入端,再将检测到的相电流输出值经过STM32的A/D模块进行转换后,与输出值进行比较,再以偏差的形式通过电流PI构成电流环控制。电流PI模块输出能控制PWM占空比的信号,再通入驱动电路达到控制功率管的通断来达到调节转子电压的大小,也就可以灵活调节电机理想的空载转速点。当电机处于负载条件下,由电压和电流,电流与输出转矩的关系,同样可以通过调节转速,从而达到控制电机输出转矩的目的,完成双闭环控制。Compared with the prior art, the beneficial effects of the present invention are as follows: the present invention provides a precise commutation control method for a brushless DC motor without position sensing. Divide the count value by the number of poles to get the motor speed. The output of speed PI is fed back to the input terminal of current PI, and then the detected phase current output value is converted by the A/D module of STM32, and then compared with the output value, and then the current loop control is formed through the current PI in the form of deviation. . The current PI module outputs a signal that can control the PWM duty cycle, and then enters the drive circuit to control the on-off of the power tube to adjust the rotor voltage, which can flexibly adjust the ideal no-load speed point of the motor. When the motor is under load, the relationship between voltage and current, current and output torque can also be adjusted by adjusting the speed, so as to achieve the purpose of controlling the output torque of the motor and complete double closed-loop control.
无刷直流电机控制系统的控制实现过程,实验平台介绍,对功能单元电路分别进行设计,兼顾了额定工作电压和输出电流指标。本发明借鉴步进电机的开环运行方式启动电机工作,然后加速,再平稳切换到过零检测的闭环运行,其中,闭环运行程序中分为:反电势过零检测、转速计算等部分。另一部分是整个算法最重要的部分,即启动过零检测后,单片机要正确检测出过零点,这是换相的基础,就能得到转子实时位置,再经过延时计算,得出下一个换相点,驱动换相,提高换相的精确度。The control implementation process of the brushless DC motor control system, the introduction of the experimental platform, and the design of the functional unit circuits respectively, taking into account the rated operating voltage and output current indicators. The invention draws on the open-loop operation mode of the stepping motor to start the motor, then accelerates, and then smoothly switches to the closed-loop operation of zero-crossing detection. The other part is the most important part of the whole algorithm, that is, after the zero-crossing detection is started, the single-chip microcomputer must correctly detect the zero-crossing point, which is the basis of the commutation, and the real-time position of the rotor can be obtained, and then after the delay calculation, the next commutation can be obtained. Phase point, drive commutation, improve the accuracy of commutation.
附图说明Description of drawings
图1为转速计算程序流程图;Fig. 1 is the flow chart of rotational speed calculation procedure;
图2为无位置传感无刷直流电机的精确换相控制系统示意图;Figure 2 is a schematic diagram of a precise commutation control system for a position-sensing brushless DC motor;
图3为无刷直流电机的机械特性曲线图;Fig. 3 is the mechanical characteristic curve diagram of the brushless DC motor;
图4为BLDCM双闭环控制系统框图;Fig. 4 is the block diagram of BLDCM double closed-loop control system;
图5为BLDCM驱动电路硬件图;Figure 5 is a hardware diagram of the BLDCM drive circuit;
图6为IRF540NS的特色参数示意图;Figure 6 is a schematic diagram of the characteristic parameters of IRF540NS;
图7为电源电路设计图;Figure 7 is a design diagram of a power supply circuit;
图8为总线电压和环境温度检测电路示意图;8 is a schematic diagram of a bus voltage and ambient temperature detection circuit;
图9为反电势过零位置检测电路示意图;9 is a schematic diagram of a back EMF zero-crossing position detection circuit;
图10为软件系统程序流程图;Figure 10 is a flow chart of a software system program;
图11为主程序流程图;Figure 11 is the main program flow chart;
图12为A/D中断程序流程图;Figure 12 is a flowchart of the A/D interrupt program;
图13为电机启动控制流程图;Fig. 13 is a flow chart of motor start-up control;
图14为电机换相流程图;Figure 14 is a flow chart of motor commutation;
图15为闭环运行程序流程图;Figure 15 is a flowchart of a closed-loop operation program;
图16为电机PWM驱动程序流程图。Figure 16 is a flow chart of the motor PWM driver.
具体实施方式Detailed ways
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
无刷直流电机具有和有刷直流电机一样的机械特性,也就是负载转矩在一定的直流电压下随转速的升高而减小,两者是反比例关系。其中,其特性曲线如图3。The brushless DC motor has the same mechanical characteristics as the brushed DC motor, that is, the load torque decreases with the increase of the speed under a certain DC voltage, and the two are inversely proportional. Among them, its characteristic curve is shown in Fig. 3.
理想的空载转速在负载一定的条件下会随着供电电压的增大而增大,两者是同比例关系,因此,无刷直流电机调速的主要方式即为调节施加在电机上电压的大小,这种方式用稳压源来进行脉冲宽度调制控制实现的。The ideal no-load speed will increase with the increase of the supply voltage under a certain load, and the two are in the same proportional relationship. Therefore, the main method of speed regulation of the brushless DC motor is to adjust the voltage applied to the motor. The size, in this way, is realized by using a voltage regulator source for pulse width modulation control.
在一定的时间内,通过对反电势过零点数量的计数值除以极数获得电机转速。将速度PI的输出反馈到了电流PI输入端,再将检测到的相电流输出值经过STM32的A/D模块进行转换后,与输出值进行比较,再以偏差的形式通过电流PI构成电流环控制。In a certain period of time, the motor speed is obtained by dividing the count value of the number of back EMF zero-crossing points by the number of poles. The output of speed PI is fed back to the input terminal of current PI, and then the detected phase current output value is converted by the A/D module of STM32, and then compared with the output value, and then the current loop control is formed through the current PI in the form of deviation. .
电流PI模块输出能控制PWM占空比的信号,再通入驱动电路达到控制功率管的通断来达到调节转子电压的大小,也就可以灵活调节电机理想的空载转速点。The current PI module outputs a signal that can control the PWM duty cycle, and then enters the drive circuit to control the on-off of the power tube to adjust the rotor voltage, which can flexibly adjust the ideal no-load speed point of the motor.
当电机处于负载条件下,由电压和电流,电流与输出转矩的关系,同样可以通过调节转速,从而达到控制电机输出转矩的目的,完成双闭环控制。由BLDCM速度主环和电流副环组成的双闭环系统控制系统如图4所示。When the motor is under load, the relationship between voltage and current, current and output torque can also be adjusted by adjusting the speed, so as to achieve the purpose of controlling the output torque of the motor and complete double closed-loop control. The double closed-loop system control system composed of the BLDCM speed main loop and the current sub-loop is shown in Figure 4.
无刷直流电机无位置传感器控制系统的设计实现硬件部分电路有以下组成:主控制电路MCU、由功率管组成的主电路和驱动芯片电路以及具有检测,保护功能的辅助单元等。其中,主控制电路选择的是STM32F103ZETT6作为MCU,在编译环境MDK5中进行程序的编译与调试。The design and realization of the position sensorless control system of the brushless DC motor consists of the following parts of the hardware circuit: the main control circuit MCU, the main circuit and driver chip circuit composed of power tubes, and the auxiliary unit with detection and protection functions. Among them, the main control circuit selects STM32F103ZETT6 as the MCU, and compiles and debugs the program in the compilation environment MDK5.
一般功率器件单元的驱动电压通常为+10~20V,但本设计中,由于采用+3.3V供电的微控制器芯片且要求较高,所以我们采用了IR2110S芯片作为功率驱动部分的转换芯片。采用IRF540NS来分立MOSFET功率逆变器功率部分。检测电路可采用电阻分压来降低系统成本。Generally, the driving voltage of the power device unit is usually +10~20V, but in this design, we use the IR2110S chip as the conversion chip of the power driving part due to the use of +3.3V power supply microcontroller chip and high requirements. The IRF540NS is used to separate the power section of the MOSFET power inverter. The detection circuit can use resistive voltage divider to reduce system cost.
(1)驱动电路设计:(1) Drive circuit design:
BLDCM驱动电路硬件图如图5所示。首先是六个桥臂的驱动,驱动板选择的MOS管型号是:IRF540NS,贴片封装,如有需要可以自形加散热片。IRF540NS的特色参数如图6所示。The hardware diagram of the BLDCM drive circuit is shown in Figure 5. The first is the drive of the six bridge arms. The MOS tube model selected by the driver board is: IRF540NS, SMD package, and a heat sink can be added if necessary. The characteristic parameters of IRF540NS are shown in Figure 6.
IR的HEXFET功率场效应管IRF540NS采用先进的工艺技术制造,具有极低的导通阻抗。IRF540NS这种特性,加上快速的转换速率,和以坚固耐用著称的HEXFET设计,使得IRF540NS成为极其高效可靠、应用范围超广的器件。简单来说,IRF540NS性能优越。IR's HEXFET power field effect transistor IRF540NS is manufactured with advanced process technology and has extremely low on-resistance. This feature of the IRF540NS, combined with its fast slew rate and its well-known rugged HEXFET design, makes the IRF540NS an extremely efficient and reliable device for a wide range of applications. Simply put, the IRF540NS is superior.
(2)电源电路设计:(2) Power circuit design:
为了供电简单方便,通用性增强,作为整个控制系统能量的唯一来源,电源电路要使整个控制系统的外接接口尽可能地少,其电源均由逆变器直流母线电源直接或间接获得。这里用到15V和5V电源,考虑到PMSM电机的驱动,我们这里还设计了3.3V的电源部分。15V电源使用线性稳压芯片LM317得到,该芯片最大输入电压为37V,该芯片在正常工作中发热属于正常现象,如有需要可以自行加散热器辅助散热。5V电源由LM2596-5.0芯片得到,3.3V使用AMS1117-3.3得到。电源电路设计图如图7所示。For simple and convenient power supply and enhanced versatility, as the only source of energy for the entire control system, the power supply circuit should have as few external interfaces as possible in the entire control system, and the power supply is obtained directly or indirectly from the DC bus power supply of the inverter. 15V and 5V power supplies are used here. Considering the drive of the PMSM motor, we also designed a 3.3V power supply part here. The 15V power supply is obtained by using the linear voltage regulator chip LM317. The maximum input voltage of the chip is 37V. It is normal for the chip to heat up during normal operation. If necessary, you can add a radiator to assist heat dissipation. The 5V power supply is obtained by the LM2596-5.0 chip, and the 3.3V is obtained by the AMS1117-3.3. The power circuit design diagram is shown in Figure 7.
(3)总线电压和温度传感器电路的设计:(3) Design of bus voltage and temperature sensor circuit:
其目的的是减少或避免这些均会使系统不能正常工作,甚至损坏电路的事件发生。系统的保护可分类为硬件的保护和软件的保护。硬件保护则是直接由硬件产生保护动作来封死驱动系统的运行输出,而不需要经过程序判断环节达到保护目的。但是,系统一般是先发生软件保护,当软件保护无效后,才启动硬件保护。一个优质的控制系统,即使软件保护和硬件保护相互配合、协调作用,也不能使其免受任何事件带来的破坏后果。Its purpose is to reduce or avoid these events that will make the system not work properly or even damage the circuit. The protection of the system can be classified into hardware protection and software protection. Hardware protection is to block the running output of the drive system by directly generating the protection action by the hardware, without the need to go through the program judgment link to achieve the purpose of protection. However, the system generally occurs software protection first, and only starts hardware protection when the software protection is invalid. A high-quality control system, even if software protection and hardware protection cooperate and coordinate with each other, cannot make it immune to the damaging consequences of any event.
总线电压和环境温度检测电路如图8所示,它能起到过,欠电压保护和高温保护等,当然这些都是需要程序编程支持的。The bus voltage and ambient temperature detection circuit is shown in Figure 8. It can perform over-voltage protection, under-voltage protection and high-temperature protection, etc. Of course, these all require program programming support.
(4)反电势过零检测电路的设计:(4) Design of the back EMF zero-crossing detection circuit:
反电势过零位置检测电路如图9所示,该电路主要分为PWM脉冲比较器参考电压设置,反向电压比较,上拉电路三部分。当上桥臂功率管为PWM-ON时,单片机就开启反电势过零捕获端口。此时,PWM端输出高电平,三极管Q1、Q2饱和导通,R3近似接地。由于R2=R3,故将反向电压比较器的参考端电压值设成二分之一的电源电压。将端电压与参考电压两者进行比较,当两者相等时,比较器输出电平翻转并通过捕获端口输入给单片机,再进行30电角度延迟,得到转子的准备换相位置。当功率开关在PWM-OFF期间,转子位置检测分析与此类似。The back EMF zero-crossing position detection circuit is shown in Figure 9. The circuit is mainly divided into three parts: PWM pulse comparator reference voltage setting, reverse voltage comparison, and pull-up circuit. When the power tube of the upper bridge arm is PWM-ON, the single-chip microcomputer opens the back EMF zero-crossing capture port. At this time, the PWM terminal outputs a high level, the transistors Q1 and Q2 are saturated and turned on, and R3 is approximately grounded. Since R2=R3, the voltage value of the reference terminal of the reverse voltage comparator is set to be one-half of the power supply voltage. The terminal voltage and the reference voltage are compared. When the two are equal, the output level of the comparator is reversed and input to the microcontroller through the capture port, and then a delay of 30 electrical degrees is performed to obtain the ready commutation position of the rotor. The rotor position detection analysis is similar when the power switch is PWM-OFF.
(5)版图设计:(5) Layout design:
由于本驱动器集成了大电流的驱动电路和高速的单片机数字电路,其中的寄生参数对电源回路会产生较大影响,甚至其引起的电源尖峰可能破坏电路,因此在版图设计时,要尽可能减少寄生参数对电源回路的影响。Since this driver integrates a high-current drive circuit and a high-speed single-chip digital circuit, the parasitic parameters in it will have a great impact on the power supply circuit, and even the power supply spikes caused by it may destroy the circuit. Therefore, in the layout design, it is necessary to minimize the The effect of parasitic parameters on the power loop.
其中的版图设计应符合规则如下:The layout design shall comply with the following rules:
1.为了有效减小寄生参数对电容的影响,电容滤波电路应尽可能靠近器件管脚,才能缩短电容到管脚的距离。1. In order to effectively reduce the influence of parasitic parameters on the capacitor, the capacitor filter circuit should be as close as possible to the device pins to shorten the distance from the capacitor to the pins.
2.为了避免功率MOS管开关器件在输出大电流时,在寄生电感的作用下产生尖峰电压,必须采用星型接地。星型接地即以功率MOS管回路的地为参考,所有地线都以此作为参考。2. In order to avoid the peak voltage generated by the parasitic inductance when the power MOS tube switching device outputs a large current, the star grounding must be used. The star grounding is based on the ground of the power MOS tube loop, and all ground wires are used as a reference.
3.由于电阻具有一定的感性以及回路寄生电感的影响,在采样电阻上,开关电流可能产生较大的感应电压,从而引起小信号回路逻辑紊乱,因此电流采样电阻应尽可能靠近低边MOS管的源极和参考地。3. Since the resistance has a certain inductance and the influence of the loop parasitic inductance, on the sampling resistance, the switching current may generate a large induced voltage, which will cause the logic disorder of the small signal loop. Therefore, the current sampling resistance should be as close as possible to the low-side MOS tube. source and reference ground.
4.因为两条靠近的走线或层间走线之间存在寄生电容,可能造成信号线不稳定。要注意走线的方向,尽可能避免寄生电容的影响,如小信号回路走线应与功率电源回路走线分离。4. Because of the parasitic capacitance between two adjacent traces or traces between layers, the signal line may be unstable. Pay attention to the direction of the traces and avoid the influence of parasitic capacitance as much as possible. For example, the traces of the small signal loop should be separated from the traces of the power supply loop.
5.功率电源回路相当于一个线圈,其面积应尽可能小。因为功率电源回路包含的面积内会产生电磁场可能影响小信号回路,因此功率电源回路面积设计要尽可能小到不要与小信号回路发生交叉。5. The power supply circuit is equivalent to a coil, and its area should be as small as possible. Because the area contained in the power supply loop will generate an electromagnetic field that may affect the small signal loop, the area of the power supply loop should be designed as small as possible so as not to cross the small signal loop.
本发明提供了如图1-16的一种无位置传感无刷直流电机精确换相控制方法,包括如下步骤:The present invention provides a precise commutation control method for a position-sensing brushless DC motor as shown in Figures 1-16, including the following steps:
S1、定时器模块的定时值用于对电机转子速度进行计算来完成定时功能;S1. The timing value of the timer module is used to calculate the rotor speed of the motor to complete the timing function;
S2、A/D模块是对电机端电压和相电流进行采样,然后转换成对应的线值,用于转子位置计算;S2. The A/D module samples the motor terminal voltage and phase current, and then converts them into corresponding line values for rotor position calculation;
S3、PWM模块根据检测出来的转子位置信号,得出换相逻辑信号,发出相应驱动信号,控制电机换相实现对换相驱动信号的控制功能;S3. The PWM module obtains the commutation logic signal according to the detected rotor position signal, sends out the corresponding driving signal, and controls the motor commutation to realize the control function of the commutation driving signal;
S4、启动函数弥补无位置传感器在静止或低速时无法检测到反电动势过零点的缺点,实现电机软启动。S4. The start function makes up for the disadvantage that no position sensor can detect the zero-crossing point of the back electromotive force when it is stationary or at low speed, and realizes the soft start of the motor.
所述无位置传感无刷直流电机的精确换相控制系统包括无刷直流电机本体,转子位置检测单元,控制器,逆变器和直流电源;The precise commutation control system of the position sensorless brushless DC motor includes a brushless DC motor body, a rotor position detection unit, a controller, an inverter and a DC power supply;
直流电源通过逆变器电性连接于无刷直流电机本体,无刷直流电机本体通过转子位置检测单元连接于控制器,控制器电性连接于逆变器;The DC power supply is electrically connected to the brushless DC motor body through the inverter, the brushless DC motor body is connected to the controller through the rotor position detection unit, and the controller is electrically connected to the inverter;
无刷直流电机本体的转子位置信号通过转子位置检测单元传递给控制器,控制器输出触发脉冲驱动逆变器,使无刷直流电机本体的绕组按规律通电,无刷直流电机本体的转子的磁场和由电流产生的磁场经过合成电磁转矩,从而带动无刷直流电机本体的正常运转。The rotor position signal of the brushless DC motor body is transmitted to the controller through the rotor position detection unit, and the controller outputs trigger pulses to drive the inverter, so that the windings of the brushless DC motor body are energized regularly, and the magnetic field of the rotor of the brushless DC motor body is And the magnetic field generated by the current passes through the synthetic electromagnetic torque, thereby driving the normal operation of the brushless DC motor body.
所述步骤S1中,对电机转子速度进行计算包括如下步骤:In the step S1, the calculation of the rotor speed of the motor includes the following steps:
由转子转过60电角度的时间对应着两个相邻反电势过零点的间隔,利用定时器模块,确定相邻2次反电势过零点之间的时间算出转子速度;The time for the rotor to rotate through 60 electrical degrees corresponds to the interval between two adjacent back-EMF zero-crossing points, and the timer module is used to determine the time between two adjacent back-EMF zero-crossing points to calculate the rotor speed;
电机转速计算为:(转/分钟),其中,fPWM表示PWM信号的频率;p表示极对数;COUNT表示一个60度电角度内PWM定时计数器的计数值;The motor speed is calculated as: (revolution/minute), where f PWM represents the frequency of the PWM signal; p represents the number of pole pairs; COUNT represents the count value of the PWM timer counter within a 60-degree electrical angle;
当检测到相邻2次反电势过零点时,就读取COUNT计数值并清零,COUNT再重新计数。When two adjacent back-EMF zero-crossing points are detected, the count value of COUNT is read and cleared, and COUNT is counted again.
所述步骤S3中,换相逻辑信号由反电势过零信号经过逻辑处理而得到的,具体包括:转速通过负反馈与给定转速进行比较后,进行转速PI调节;In the step S3, the commutation logic signal is obtained by logical processing of the back EMF zero-crossing signal, which specifically includes: after the rotational speed is compared with a given rotational speed through negative feedback, the rotational speed PI is adjusted;
将输出作为电流环的给定值,与输出相电流进行比较后,经过电流环进行PI调节输出,其中经过限幅和整流处理后,就可以调节PWM的占空比,其占空比值输出和逻辑开关信号做与处理,得到逆变桥模块gate信号输入作用于逆变器,间接控制了电机能得到的平均电压。The output is used as the given value of the current loop, and after comparing with the output phase current, the output is adjusted by PI through the current loop. After the amplitude limiting and rectification processing, the duty cycle of the PWM can be adjusted. The logic switch signal is processed and processed, and the gate signal input of the inverter bridge module is obtained to act on the inverter, which indirectly controls the average voltage that the motor can obtain.
所述步骤S5中,电机软启动具体包括:首先用转子预定位法定位后,接着封死全部的驱动信号,使电机处于断电的状态;In the step S5, the soft start of the motor specifically includes: first, after positioning by the rotor pre-positioning method, then sealing all the driving signals, so that the motor is in a power-off state;
再采用同样的方法进行转子预定位来实现电机的准确定位,该预定位的位置是要在第一次预定位的定位基础上,将导通步向前或向后发生一次换相;Then use the same method to pre-position the rotor to realize the accurate positioning of the motor. The pre-positioning position is based on the positioning of the first pre-positioning, and the conduction step is forwarded or backward. A commutation occurs;
将电机转子定位到特定位置,然后按照直流无刷电机的换向顺序对电机进行换向,这是三段式启动法的第二阶段,即外同步加速法;Position the motor rotor to a specific position, and then commutate the motor according to the commutation sequence of the brushless DC motor. This is the second stage of the three-stage starting method, that is, the external synchronous acceleration method;
当转子定位完成后,按照电机的转动方向在使用长脉冲给电机加速的同时,使用短脉冲检测转子位置信号;When the rotor positioning is completed, according to the rotation direction of the motor, the long pulse is used to accelerate the motor, and the short pulse is used to detect the rotor position signal;
施加换相信号作用于电机定子绕组上时,一方面,换相信号要根据六步通电换相顺序来施加驱动信号到逆变管上,另外要逐步提高PWM信号的占空比,不断增加六步通电顺序的换相频率,从而使得定子绕组电压能增大到预期的频率,使得电机能达到一定转速,其中的反电势信号增大到能够检测出来。When the commutation signal is applied to the stator winding of the motor, on the one hand, the commutation signal should apply the drive signal to the inverter tube according to the six-step energization commutation sequence, and the duty cycle of the PWM signal should be gradually increased, continuously increasing by six. The commutation frequency of the power-on sequence is adjusted step by step, so that the stator winding voltage can be increased to the expected frequency, so that the motor can reach a certain speed, and the back EMF signal in it can be increased enough to be detected.
控制系统的软件设计:Software design of control system:
控制系统设计完成后,还需要对软件进行设计。本论文采用单片机主要完成实现位置传感器功能的工作,单片机的软件设计是整体设计的核心,因而单片机的算法是否有效,能否稳定工作是系统能否实现正常工作的关键。After the control system design is completed, the software needs to be designed. In this paper, the single chip microcomputer is mainly used to realize the function of the position sensor. The software design of the single chip computer is the core of the overall design. Therefore, whether the algorithm of the single chip computer is effective and whether it can work stably is the key to whether the system can work normally.
软件控制系统中,包括主程序、启动程序、闭环运行程序、中断服务程序等。其中,要实现电机的正常启动,整个控制程序分为两部分。本设计先借鉴步进电机的开环运行方式启动电机工作,然后加速,再平稳切换到过零检测的闭环运行,其中,闭环运行程序中分为:反电势过零检测、转速计算等部分。另一部分是整个算法最重要的部分,即启动过零检测后,单片机要正确检测出过零点,这是换相的基础,就能得到转子实时位置,再经过延时计算,得出下一个换相点,驱动换相。软件系统程序流程图如图10所示。In the software control system, including the main program, startup program, closed-loop operation program, interrupt service program, etc. Among them, to realize the normal start of the motor, the entire control program is divided into two parts. In this design, the open-loop operation mode of the stepping motor is used to start the motor, then accelerate, and then smoothly switch to the closed-loop operation of zero-crossing detection. The closed-loop operation program is divided into: back-EMF zero-crossing detection, speed calculation and other parts. The other part is the most important part of the whole algorithm, that is, after the zero-crossing detection is started, the single-chip microcomputer must correctly detect the zero-crossing point, which is the basis of the commutation, and the real-time position of the rotor can be obtained, and then after the delay calculation, the next commutation can be obtained. Phase point, drive commutation. The flow chart of the software system program is shown in Figure 10.
主程序设计:Main program design:
主程序设计主要完成的是对STM32微处理器的初始化配置和电机自启动的实现等。初始化配置包括系统工作时钟配置、I/O端口配置、全局变量赋初值,配置定时器模块、配置A/D模块、电机驱动PWM发生模块配置和软件保护实现等。在模块配置中,还有定时器中断开关和优先级的设定、A/D采样中断优先级配置等对应的中断服务程序配置。定时器模块的定时值用于对电机转子速度进行计算来完成定时功能;A/D模块是对电机端电压和相电流进行采样,然后转换成对应的线值,用于转子位置计算;PWM模块根据检测出来的转子位置信号,得出换相逻辑,发出相应驱动信号,控制电机换相实现对换相驱动信号的控制功能。启动函数主要是弥补无位置传感器在静止或低速时无法检测到反电动势过零点的缺点,实现电机软启动。The main program design mainly completes the initialization configuration of the STM32 microprocessor and the realization of the self-starting of the motor. The initialization configuration includes system working clock configuration, I/O port configuration, initial value assignment of global variables, configuration of timer module, configuration of A/D module, configuration of motor drive PWM generation module, and implementation of software protection. In the module configuration, there are also corresponding interrupt service routine configurations such as timer interrupt switch and priority setting, A/D sampling interrupt priority configuration, etc. The timing value of the timer module is used to calculate the rotor speed of the motor to complete the timing function; the A/D module samples the motor terminal voltage and phase current, and then converts them into corresponding line values for rotor position calculation; the PWM module According to the detected rotor position signal, the commutation logic is obtained, the corresponding driving signal is sent out, and the motor commutation is controlled to realize the control function of the commutation driving signal. The starting function is mainly to make up for the shortcoming that no position sensor cannot detect the zero-crossing point of the back electromotive force at a standstill or at low speed, so as to realize the soft start of the motor.
主程序流程主要是完成初始化,负责各个程序、寄存器的初始化。单片机上电后,主程序作为入口程序,首先,要对寄存器资源进行分配。程序开始后,本程序主要对PWM模块和ADC模块进行配置。除此之外,还要申明各个变量和初始化程序。初始化后,对电机的六个运行状态进行排序,并把当前状态装载进PWM输出寄存器中,程序进入循环等待,直到采样和PWM调制触发中断,才改变输出状态。程序流程图图11所示。The main program flow is mainly to complete the initialization, and is responsible for the initialization of each program and register. After the microcontroller is powered on, the main program is used as the entry program. First, the register resources must be allocated. After the program starts, this program mainly configures the PWM module and the ADC module. In addition, each variable and initializer must be declared. After initialization, the six operating states of the motor are sequenced, and the current state is loaded into the PWM output register. The program enters a loop and waits until the sampling and PWM modulation trigger an interrupt before changing the output state. The program flow chart is shown in Figure 11.
主要初始化程序如下:The main initialization procedure is as follows:
TIMx输出PWM信号初始化,其中,只要调用这个函数TIMx的四个通道就会有PWM信号输出:TIMx outputs PWM signal initialization, among which, as long as this function is called, the four channels of TIMx will have PWM signal output:
将初始化中涉及的GPIO,DMA,ADC的时钟打开:Turn on the clocks of the GPIO, DMA, and ADC involved in the initialization:
/*打开ADC IO端口时钟*//*Open ADC IO port clock*/
ADC_GPIO_APBxClock_FUN(ADC_GPIO_CLK,ENABLE);ADC_GPIO_APBxClock_FUN(ADC_GPIO_CLK,ENABLE);
/*打开DMA时钟*//* Turn on the DMA clock */
RCC_AHBPeriphClockCmd(ADC_DMA_CLK,ENABLE);RCC_AHBPeriphClockCmd(ADC_DMA_CLK,ENABLE);
/*打开ADC时钟*//* Turn on ADC clock */
ADC_APBxClock_FUN(ADC_CLK,ENABLE);ADC_APBxClock_FUN(ADC_CLK,ENABLE);
A/D中断程序设计:A/D interrupt programming:
A/D中断程序的主要目的,一方面是采样电机三相绕组的端电压和相电流,另一方面是采样直流侧电压,A/D中断程序流程图如图12所示。在A/D中断中,其主要作用是对采样值进行数字滤波,并用滤波器进行反电动势估算,同时也用于系统的软件保护,如果系统发生过流、欠压和过压等情况,可通过程序立即关闭PWM信号输出,实现软件保护作用。The main purpose of the A/D interrupt program is to sample the terminal voltage and phase current of the three-phase winding of the motor on the one hand, and to sample the DC side voltage on the other hand. The flow chart of the A/D interrupt program is shown in Figure 12. In the A/D interrupt, its main function is to digitally filter the sampled value, and use the filter to estimate the back electromotive force, and it is also used for the software protection of the system. Immediately close the PWM signal output through the program to achieve software protection.
TIMx,x[6,7]中断优先级配置:TIMx,x[6,7] interrupt priority configuration:
配置ADC工作模式的优先级设置代码:Priority setting code to configure ADC working mode:
电机启动程序设计:Motor start program design:
启动程序构成无刷直流电机控制的重要组成部分,它的成功与否也关系到后续无位置传感器控制技术的实现。由于无法获得电机转子的初始位置,所以本设计采用二次定位法来获得转子的初始位置,既能保证电机可靠启动,又能保证电机在启动时,不会像传统有刷直流电机启动时产生过电流冲击,当有紧急情况发生时,软件能够及时做出响应。电机启动控制流程图如图13所示。The start-up procedure constitutes an important part of the brushless DC motor control, and its success is also related to the realization of the subsequent position sensorless control technology. Since the initial position of the rotor of the motor cannot be obtained, this design adopts the secondary positioning method to obtain the initial position of the rotor, which can not only ensure the reliable start of the motor, but also ensure that the motor will not be generated when the traditional brushed DC motor starts. Over-current shock, when an emergency occurs, the software can respond in time. The flow chart of motor startup control is shown in Figure 13.
图13中所示采用两次预定位的三段式启动法,实现了电机由静止状态的强迫启动。这种方法既能有效实现电机启动,又能避免电机启动时间过长。采用的二次定位法也避免了转子磁极与定子磁势两极对调而导致一次定位失败的问题。在保证换相频率和PWM占空比为定值的同时,根据设置好的导通顺序来改变逆变器开关器件的导通,保证电机能匀加速运行。其中,控制加速运行的时间根据电机本体而各不相同。配置好PWM占空比和PID的参数值后,开启换相控制中断,先为自运行做好准备,同时调整好加速阶段的电机导通步数,当检测到三相端电压时,即可切换到自同步运行阶段。启动程序中的循环启动计数,一方面是用来实现电机实现软启动;另一方面是避免启动时间过长、施加的电压过大,能有效地保护电机。当电机软启动成功后,启动程序结束,电机平稳切换到了无位置传感器控制方式。As shown in Fig. 13, the three-stage starting method using twice pre-positioning realizes the forced starting of the motor from the static state. This method can not only effectively realize the motor start, but also avoid the motor start time is too long. The adopted secondary positioning method also avoids the problem of the first positioning failure caused by the poles of the rotor magnetic pole and the stator magnetic potential being reversed. While ensuring that the commutation frequency and the PWM duty cycle are fixed values, the conduction of the inverter switching devices is changed according to the set conduction sequence to ensure that the motor can run at a uniform acceleration. However, the time for controlling the acceleration operation varies depending on the motor itself. After configuring the PWM duty cycle and PID parameter values, turn on the commutation control interrupt, prepare for self-running first, and adjust the number of motor conduction steps in the acceleration stage. When the three-phase terminal voltage is detected, you can Switch to the self-synchronized operating phase. The cycle start count in the start-up program is used to realize the soft start of the motor on the one hand; on the other hand, it can effectively protect the motor by preventing the start-up time from being too long and the applied voltage being too large. When the soft start of the motor is successful, the start-up procedure ends, and the motor is smoothly switched to the position sensorless control mode.
电机换相程序设计:当检测到反电势过零点信号时,将其输入到单片机的捕获端口,在发生电平跳变时,进入中断,清中断标志,关闭中断,相位延时30电角度时间后,即为转子换相时刻。电机换相流程图如图14所示。Motor commutation program design: When the back EMF zero-crossing signal is detected, it is input to the capture port of the single-chip microcomputer. When a level jump occurs, the interrupt is entered, the interrupt flag is cleared, the interrupt is closed, and the phase delay is 30 electrical degrees time. After that, it is the rotor commutation time. The flow chart of motor commutation is shown in Figure 14.
电机换相设置程序代码如下:The motor commutation setting program code is as follows:
闭环运行程序设计:在闭环控制系统中,通过检测装置将系统的输出量引入系统的输入端,输出信号作为反馈信号与输入量比较,从而得到两者的偏差信号。调节器通过纠正偏差,产生对被控对象的控制作用,偏差趋于减小,使输出无限接近于输入。闭环系统不仅增强了系统的抗干扰能力,也提高了系统控制精度,从而在电机控制系统中广泛应用。Closed-loop operation program design: In the closed-loop control system, the output of the system is introduced into the input end of the system through the detection device, and the output signal is compared with the input as a feedback signal to obtain the deviation signal of the two. By correcting the deviation, the regulator produces a control effect on the controlled object, and the deviation tends to decrease, making the output infinitely close to the input. The closed-loop system not only enhances the anti-interference ability of the system, but also improves the control accuracy of the system, so it is widely used in motor control systems.
电机启动完毕,就进入了自同步运行状态,即可根据不同的设定速度配置相应的PID参数。双闭环运行控制包括速度环和电流环两部分。在实际运行中,一般都采用PI控制,将微分参数设为0。PID控制器参数设计一般步骤为:先设计比例常数,再设置积分常数,最后整定微分常数。转速反馈与转速设定比较后,经转速PI输出电流参考值,再与反馈电流比较,经电流PI输出PWM占空比。本设计的整定是先将积分环节设置为零,调节比例参数直到系统稳定,再来调节积分参数。其中,调节积分参数是用于改善系统的静态稳定和动态响应。闭环运行程序流程图如图15所示。After the motor is started, it enters into the self-synchronized running state, and the corresponding PID parameters can be configured according to different set speeds. Double closed-loop operation control includes two parts: speed loop and current loop. In actual operation, PI control is generally used, and the differential parameter is set to 0. The general steps of PID controller parameter design are: first design the proportional constant, then set the integral constant, and finally set the differential constant. After the speed feedback is compared with the speed setting, the current reference value is output through the speed PI, and then compared with the feedback current, and the PWM duty cycle is output through the current PI. The tuning of this design is to first set the integral link to zero, adjust the proportional parameter until the system is stable, and then adjust the integral parameter. Among them, adjusting the integral parameter is used to improve the static stability and dynamic response of the system. The flow chart of the closed-loop operation program is shown in Figure 15.
转速计算:在双闭环节设计中,反馈转速的计算是首要解决的问题。我们可以由转子转过60电角度的时间对应着两个相邻反电势过零点的间隔,来利用定时器,确定相邻2次反电势过零点之间的时间算出转子速度。Speed calculation: In the double closed-loop design, the calculation of feedback speed is the first problem to be solved. We can use the timer to determine the time between two adjacent back-EMF zero-crossing points to calculate the rotor speed from the time when the rotor turns 60 electrical degrees corresponding to the interval between two adjacent back-EMF zero-crossing points.
由推导可得,电机转速计算为:(转/分钟)。From the derivation, the motor speed is calculated as: (rev/min).
其中,fPWM表示PWM信号的频率;p表示极对数;COUNT表示一个60度电角度内PWM定时计数器的计数值。当程序检测到相邻2次反电势过零点时,就读取COUNT计数值并清零,COUNT再重新计数。转速计算程序流程图如图1所示。Among them, f PWM represents the frequency of the PWM signal; p represents the number of pole pairs; COUNT represents the count value of the PWM timing counter within a 60-degree electrical angle. When the program detects two adjacent back-EMF zero-crossing points, it reads the count value of COUNT and clears it, and COUNT counts again. The flow chart of the speed calculation program is shown in Figure 1.
电机PWM驱动程序设计:只有上述启动程序、中断服务程序、反电动势估算函数以及转速和位置估算程序都能正常运行,才能真正发出无刷直流电机的驱动信号,正确的PWM驱动信号作用于主电路逆变桥,才能导致电机的最终运行。因此,电机PWM驱动信号的发出,需要在启动程序、中断子程序、及其它保护程序的相互配合下完成。在电机驱动程序中,先依据检测的电机转子的具体位置,再通过查表,在开关向量表中找到相应驱动顺序,发出无刷直流电机驱动信号。电机PWM驱动程序流程图如图16所示。Motor PWM driver program design: Only the above startup program, interrupt service program, back-EMF estimation function and speed and position estimation program can run normally, can the driving signal of the brushless DC motor be truly issued, and the correct PWM driving signal acts on the main circuit The inverter bridge can lead to the final operation of the motor. Therefore, the sending of the motor PWM drive signal needs to be completed under the cooperation of the startup program, the interrupt subroutine, and other protection programs. In the motor driver program, according to the specific position of the detected motor rotor, and then by looking up the table, the corresponding driving sequence is found in the switching vector table, and the driving signal of the brushless DC motor is sent out. The flow chart of the motor PWM driver is shown in Figure 16.
配置TIMx输出的PWM信号的模式,如周期、极性、占空比等,程序代码如下:Configure the mode of the PWM signal output by TIMx, such as period, polarity, duty cycle, etc. The program code is as follows:
综上所述,与现有技术相比,本发明在一定的时间内,通过对反电势过零点数量的计数值除以极数获得电机转速。将速度PI的输出反馈到了电流PI输入端,再将检测到的相电流输出值经过STM32的A/D模块进行转换后,与输出值进行比较,再以偏差的形式通过电流PI构成电流环控制。电流PI模块输出能控制PWM占空比的信号,再通入驱动电路达到控制功率管的通断来达到调节转子电压的大小,也就可以灵活调节电机理想的空载转速点。当电机处于负载条件下,由电压和电流,电流与输出转矩的关系,同样可以通过调节转速,从而达到控制电机输出转矩的目的,完成双闭环控制。To sum up, compared with the prior art, the present invention obtains the motor speed by dividing the count value of the number of zero-crossing points of the back EMF by the number of poles within a certain period of time. The output of speed PI is fed back to the input terminal of current PI, and then the detected phase current output value is converted by the A/D module of STM32, and then compared with the output value, and then the current loop control is formed through the current PI in the form of deviation. . The current PI module outputs a signal that can control the PWM duty cycle, and then enters the drive circuit to control the on-off of the power tube to adjust the rotor voltage, which can flexibly adjust the ideal no-load speed point of the motor. When the motor is under load, the relationship between voltage and current, current and output torque can also be adjusted by adjusting the speed, so as to achieve the purpose of controlling the output torque of the motor and complete double closed-loop control.
无刷直流电机控制系统的控制实现过程,实验平台介绍,对功能单元电路分别进行设计,兼顾了额定工作电压和输出电流指标。本发明借鉴步进电机的开环运行方式启动电机工作,然后加速,再平稳切换到过零检测的闭环运行,其中,闭环运行程序中分为:反电势过零检测、转速计算等部分。另一部分是整个算法最重要的部分,即启动过零检测后,单片机要正确检测出过零点,这是换相的基础,就能得到转子实时位置,再经过延时计算,得出下一个换相点,驱动换相,提高换相的精确度。The control implementation process of the brushless DC motor control system, the introduction of the experimental platform, and the design of the functional unit circuits respectively, taking into account the rated operating voltage and output current indicators. The invention draws on the open-loop operation mode of the stepping motor to start the motor, then accelerates, and then smoothly switches to the closed-loop operation of zero-crossing detection. The other part is the most important part of the whole algorithm, that is, after the zero-crossing detection is started, the single-chip microcomputer must correctly detect the zero-crossing point, which is the basis of the commutation, and the real-time position of the rotor can be obtained, and then after the delay calculation, the next commutation can be obtained. Phase point, drive commutation, improve the accuracy of commutation.
最后应说明的是:以上所述仅为本发明的优选实施例而已,并不用于限制本发明,尽管参照前述实施例对本发明进行了详细的说明,对于本领域的技术人员来说,其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换,凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。Finally, it should be noted that the above are only preferred embodiments of the present invention, and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, for those skilled in the art, it is still The technical solutions described in the foregoing embodiments can be modified, or some technical features thereof can be equivalently replaced, and any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention shall be included. within the protection scope of the present invention.
Claims (5)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202210575506.XA CN115173752A (en) | 2022-05-24 | 2022-05-24 | Accurate commutation control method for brushless direct current motor without position sensing |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202210575506.XA CN115173752A (en) | 2022-05-24 | 2022-05-24 | Accurate commutation control method for brushless direct current motor without position sensing |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN115173752A true CN115173752A (en) | 2022-10-11 |
Family
ID=83483071
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202210575506.XA Pending CN115173752A (en) | 2022-05-24 | 2022-05-24 | Accurate commutation control method for brushless direct current motor without position sensing |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN115173752A (en) |
Cited By (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN115833541A (en) * | 2022-12-09 | 2023-03-21 | 上海儒竞智控技术有限公司 | PWM wave generation and duty ratio control method, system, timer and storage medium |
| CN116111883A (en) * | 2023-02-28 | 2023-05-12 | 艾勒动力科技(苏州)有限公司 | A high-speed brushless DC motor driver and its driving method |
| CN116755353A (en) * | 2023-06-21 | 2023-09-15 | 哈尔滨工业大学 | Algorithm synchronization method and verification method of motor control rapid prototyping platform |
| CN117200617A (en) * | 2023-09-14 | 2023-12-08 | 浙江乾麟缝制设备有限公司 | A control method for adjusting the mechanical characteristics of a three-phase permanent magnet brushless DC motor system |
| CN119543713A (en) * | 2025-01-22 | 2025-02-28 | 陕西拓普达精密设备有限公司 | Control method and system for permanent magnet DC brushless slotless motor |
Citations (10)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101242154A (en) * | 2008-03-14 | 2008-08-13 | 重庆大学 | An embedded permanent magnet brushless DC motor control system without position sensor |
| CN101729002A (en) * | 2009-11-27 | 2010-06-09 | 哈尔滨工业大学 | SOPC-based remote monitoring system of no-position sensor brushless DC motor |
| CN102868350A (en) * | 2012-09-21 | 2013-01-09 | 中南林业科技大学 | Quasi-close loop starting method of brushless direct current motor free of position sensor |
| CN102969955A (en) * | 2011-08-29 | 2013-03-13 | 天津航天鑫茂稀土机电科技有限公司 | Non-position detection of permanent magnetic direct-current brushless double-rotor motor |
| CN103248294A (en) * | 2013-04-28 | 2013-08-14 | 天津大学 | Position sensor-free double closed-loop speed regulation control method for brushless DC motor |
| CN106817051A (en) * | 2015-11-30 | 2017-06-09 | 三星电子株式会社 | For driving equipment and control method without sensor BLDC motors |
| CN107425765A (en) * | 2017-07-28 | 2017-12-01 | 无锡双能达科技有限公司 | A kind of DC brushless motor controller and its control method based on position-sensor-free |
| CN111614300A (en) * | 2020-06-18 | 2020-09-01 | 中国矿业大学 | A four-phase switched reluctance motor without a position sensor initial position positioning method |
| CN113131808A (en) * | 2019-12-31 | 2021-07-16 | 广东美的白色家电技术创新中心有限公司 | Brushless DC motor control method, electronic device, and medium |
| CN115189601A (en) * | 2022-05-24 | 2022-10-14 | 广州启明星机器人有限公司 | Compound positioning starting method for brushless direct current motor without position sensing |
-
2022
- 2022-05-24 CN CN202210575506.XA patent/CN115173752A/en active Pending
Patent Citations (10)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101242154A (en) * | 2008-03-14 | 2008-08-13 | 重庆大学 | An embedded permanent magnet brushless DC motor control system without position sensor |
| CN101729002A (en) * | 2009-11-27 | 2010-06-09 | 哈尔滨工业大学 | SOPC-based remote monitoring system of no-position sensor brushless DC motor |
| CN102969955A (en) * | 2011-08-29 | 2013-03-13 | 天津航天鑫茂稀土机电科技有限公司 | Non-position detection of permanent magnetic direct-current brushless double-rotor motor |
| CN102868350A (en) * | 2012-09-21 | 2013-01-09 | 中南林业科技大学 | Quasi-close loop starting method of brushless direct current motor free of position sensor |
| CN103248294A (en) * | 2013-04-28 | 2013-08-14 | 天津大学 | Position sensor-free double closed-loop speed regulation control method for brushless DC motor |
| CN106817051A (en) * | 2015-11-30 | 2017-06-09 | 三星电子株式会社 | For driving equipment and control method without sensor BLDC motors |
| CN107425765A (en) * | 2017-07-28 | 2017-12-01 | 无锡双能达科技有限公司 | A kind of DC brushless motor controller and its control method based on position-sensor-free |
| CN113131808A (en) * | 2019-12-31 | 2021-07-16 | 广东美的白色家电技术创新中心有限公司 | Brushless DC motor control method, electronic device, and medium |
| CN111614300A (en) * | 2020-06-18 | 2020-09-01 | 中国矿业大学 | A four-phase switched reluctance motor without a position sensor initial position positioning method |
| CN115189601A (en) * | 2022-05-24 | 2022-10-14 | 广州启明星机器人有限公司 | Compound positioning starting method for brushless direct current motor without position sensing |
Cited By (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN115833541A (en) * | 2022-12-09 | 2023-03-21 | 上海儒竞智控技术有限公司 | PWM wave generation and duty ratio control method, system, timer and storage medium |
| CN116111883A (en) * | 2023-02-28 | 2023-05-12 | 艾勒动力科技(苏州)有限公司 | A high-speed brushless DC motor driver and its driving method |
| CN116755353A (en) * | 2023-06-21 | 2023-09-15 | 哈尔滨工业大学 | Algorithm synchronization method and verification method of motor control rapid prototyping platform |
| CN116755353B (en) * | 2023-06-21 | 2026-01-13 | 哈尔滨工业大学 | Algorithm synchronization method for motor control rapid prototype platform and verification method thereof |
| CN117200617A (en) * | 2023-09-14 | 2023-12-08 | 浙江乾麟缝制设备有限公司 | A control method for adjusting the mechanical characteristics of a three-phase permanent magnet brushless DC motor system |
| CN119543713A (en) * | 2025-01-22 | 2025-02-28 | 陕西拓普达精密设备有限公司 | Control method and system for permanent magnet DC brushless slotless motor |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN115173752A (en) | Accurate commutation control method for brushless direct current motor without position sensing | |
| CN103701367B (en) | A kind of control of soft device of brushless DC motor without sensor | |
| JP5425133B2 (en) | Brushless motor control | |
| US9431931B2 (en) | Controller for a brushless motor | |
| CN201383787Y (en) | Controller of brushless direct current motor | |
| CN205304653U (en) | Two plane type leads to fan control system based on brushless DC motor | |
| CN101051806A (en) | Novel electric driving control system and method for vehicle air conditioner compressor | |
| CN105356796B (en) | Permanent-magnet brushless DC motor control system without position sensor | |
| CN102957369A (en) | Brushless DC (Direct Current) motor speed regulation device on basis of DSP (Digital Signal Processor) | |
| CN203675020U (en) | Hand dryer brushless motor controller without position sensor | |
| CN107482962A (en) | The commutation position detection phase change method of brushless direct current motor sensorless | |
| CN102088266A (en) | Brushless motor stepless speed change controller based on FPGA (Field Programmable Gate Array) digitization control | |
| CN104052342B (en) | A kind of motor control assembly and there is its air-conditioning system | |
| CN105915130A (en) | Control method and device of sensorless permanent magnet motor used for pump | |
| WO2007041387A2 (en) | Electric motor with adjustable timing | |
| JP2015106980A (en) | Motor drive device and motor control method | |
| CN115189601B (en) | Composite positioning starting method for brushless direct current motor without position sensing | |
| CN115450944A (en) | Control method of single-phase brushless direct current fan | |
| WO2022237307A1 (en) | Power tool and control method therefor | |
| CN204559452U (en) | Based on the brushless coil excitation DC motor control system of current chopping | |
| Gao et al. | Research of sensorless controller of BLDC motor | |
| CN114257138A (en) | Control system of brushless direct current motor, brushless direct current motor and control method thereof | |
| CN103633901B (en) | Aviation pump high-voltage brushless DC motor control method | |
| CN111585479A (en) | Three-phase sensorless brushless direct current motor control system | |
| CN205545053U (en) | Integrated inverter motor controller |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination |











