[go: up one dir, main page]

CN116780956B - A control method for self-learning DC brushless motor Hall position based on vector algorithm - Google Patents

A control method for self-learning DC brushless motor Hall position based on vector algorithm Download PDF

Info

Publication number
CN116780956B
CN116780956B CN202310560963.6A CN202310560963A CN116780956B CN 116780956 B CN116780956 B CN 116780956B CN 202310560963 A CN202310560963 A CN 202310560963A CN 116780956 B CN116780956 B CN 116780956B
Authority
CN
China
Prior art keywords
hall
motor
self
learning
sector
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.)
Active
Application number
CN202310560963.6A
Other languages
Chinese (zh)
Other versions
CN116780956A (en
Inventor
陈季萍
张元良
杨柳莺
倪立学
杨瑞军
张成忠
江辰瑜
顾毅
黄炳焱
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jiangsu Ocean University
Original Assignee
Jiangsu Ocean University
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Jiangsu Ocean University filed Critical Jiangsu Ocean University
Priority to CN202310560963.6A priority Critical patent/CN116780956B/en
Publication of CN116780956A publication Critical patent/CN116780956A/en
Application granted granted Critical
Publication of CN116780956B publication Critical patent/CN116780956B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02PCONTROL OR REGULATION OF ELECTRIC MOTORS, ELECTRIC GENERATORS OR DYNAMO-ELECTRIC CONVERTERS; CONTROLLING TRANSFORMERS, REACTORS OR CHOKE COILS
    • H02P21/00Arrangements or methods for the control of electric machines by vector control, e.g. by control of field orientation
    • H02P21/0003Control strategies in general, e.g. linear type, e.g. P, PI, PID, using robust control
    • H02P21/0017Model reference adaptation, e.g. MRAS or MRAC, useful for control or parameter estimation
    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02PCONTROL OR REGULATION OF ELECTRIC MOTORS, ELECTRIC GENERATORS OR DYNAMO-ELECTRIC CONVERTERS; CONTROLLING TRANSFORMERS, REACTORS OR CHOKE COILS
    • H02P21/00Arrangements or methods for the control of electric machines by vector control, e.g. by control of field orientation
    • H02P21/0003Control strategies in general, e.g. linear type, e.g. P, PI, PID, using robust control
    • H02P21/0025Control strategies in general, e.g. linear type, e.g. P, PI, PID, using robust control implementing a off line learning phase to determine and store useful data for on-line control
    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02PCONTROL OR REGULATION OF ELECTRIC MOTORS, ELECTRIC GENERATORS OR DYNAMO-ELECTRIC CONVERTERS; CONTROLLING TRANSFORMERS, REACTORS OR CHOKE COILS
    • H02P21/00Arrangements or methods for the control of electric machines by vector control, e.g. by control of field orientation
    • H02P21/14Estimation or adaptation of machine parameters, e.g. flux, current or voltage
    • H02P21/18Estimation of position or speed
    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02PCONTROL OR REGULATION OF ELECTRIC MOTORS, ELECTRIC GENERATORS OR DYNAMO-ELECTRIC CONVERTERS; CONTROLLING TRANSFORMERS, REACTORS OR CHOKE COILS
    • H02P6/00Arrangements for controlling synchronous motors or other dynamo-electric motors using electronic commutation dependent on the rotor position; Electronic commutators therefor
    • H02P6/14Electronic commutators
    • H02P6/16Circuit arrangements for detecting position
    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02PCONTROL OR REGULATION OF ELECTRIC MOTORS, ELECTRIC GENERATORS OR DYNAMO-ELECTRIC CONVERTERS; CONTROLLING TRANSFORMERS, REACTORS OR CHOKE COILS
    • H02P2203/00Indexing scheme relating to controlling arrangements characterised by the means for detecting the position of the rotor
    • H02P2203/03Determination of the rotor position, e.g. initial rotor position, during standstill or low speed operation

Landscapes

  • Engineering & Computer Science (AREA)
  • Power Engineering (AREA)
  • Databases & Information Systems (AREA)
  • Control Of Motors That Do Not Use Commutators (AREA)

Abstract

The invention discloses a control method for self-learning the Hall position of a DC brushless motor based on a vector algorithm, which comprises the following steps: determining the relation between the power-on sequence of the direct-current brushless motor and the Hall sensor to obtain a Hall sector, configuring parameters of an upper computer, and then sending an instruction to a control board; after receiving the instruction, the control board firstly learns the Hall sector by itself, and stores the Hall sector obtained by self-learning into FLASH in the chip; then, after the self-learning of the Hall sector is successful, the self-learning of the FOC algorithm is carried out, the electric speed of the motor operation is calculated through the sector, and the current angle is calculated through the electric speed; in the FOC algorithm, fixed parameters Ud and Uq are set, three paths of PWM waves are generated through the calculated angle values and are input into a three-phase stator of the motor, and the rotor is driven to rotate; through self-learning of various parameters of the direct current brushless motor in the early stage, the learned parameters are valued, so that the bus current value is collected when the motor rotates, whether the self-learning is successful or not is judged, and the rotating performance of the motor is optimized by adopting a vector control FOC algorithm; and secondly, the learned motor parameters are stored into the chip to obtain a FLASH region, so that the function of power-off protection is achieved.

Description

一种基于矢量算法自学习直流无刷电机霍尔位置的控制方法A control method for self-learning DC brushless motor Hall position based on vector algorithm

技术领域Technical field

本发明属于直流无刷电机技术领域,具体涉及一种基于矢量算法自学习直流无刷电机霍尔位置的控制方法。The invention belongs to the technical field of brushless DC motors, and specifically relates to a control method for self-learning the Hall position of a brushless DC motor based on a vector algorithm.

背景技术Background technique

生活中的各种场景都离不开电机的参与,在控制领域,在电机后端有霍尔传感器的前提下,要想使直流无刷电机转动,需要知道直流无刷电机的三相绕组(U相、V相、W相)所对应的霍尔传感器的位置(HALLA、HALLB、HALLC),而如何更好的控制电机的转动,提高电机的工作效率是必须要考虑的问题,通常情况下,传统的控制方法有以下几种:Various scenes in life are inseparable from the participation of motors. In the field of control, if there is a Hall sensor at the back end of the motor, if you want to make the brushless DC motor rotate, you need to know the three-phase windings of the brushless DC motor ( The position of the Hall sensor (HALLA, HALLB, HALLC) corresponding to U phase, V phase, W phase), and how to better control the rotation of the motor and improve the working efficiency of the motor are issues that must be considered. Usually , the traditional control methods include the following:

1、通过示波器查看霍尔传感器反馈的信号所对应的三相相电压的反电动势波形,从而确定其一一对应的关系,最终通过代码的编写,从而控制直流无刷电机转动,此外,对于微小性的直流无刷电机(Brushless Direct Current Motor,BLDC)而言,传统方法采用六步换向的控制,该方法通过定子绕组产生的转矩的方向与转子的位置夹角在[60°,120°]之间,使最终电机输出的转矩产生波动,不是最优的控制策略。1. View the back electromotive force waveform of the three-phase voltage corresponding to the signal fed back by the Hall sensor through an oscilloscope to determine their one-to-one correspondence. Finally, write the code to control the rotation of the brushless DC motor. In addition, for micro For the traditional Brushless Direct Current Motor (BLDC), the traditional method uses six-step commutation control. The angle between the direction of the torque generated by the stator winding and the position of the rotor is within [60°, 120° °], causing the final motor output torque to fluctuate, which is not the optimal control strategy.

2、在有霍尔传感器的控制方法下,面对一款全新的直流无刷电机,需要调试获得霍尔的位置以及电机的零度位置,通过不断的调试,寻找霍尔扇区所对应电机的角度值,从而采用FOC算法控制电机转动。但其复杂的调试过程以及所设计的系统仅仅只能应用到同款电机上,不具备普遍性。2. Under the control method with Hall sensor, facing a brand-new brushless DC motor, it is necessary to debug to obtain the position of Hall and the zero position of the motor. Through continuous debugging, find the position of the motor corresponding to the Hall sector. Angle value, thereby using the FOC algorithm to control the motor rotation. However, its complicated debugging process and the designed system can only be applied to the same type of motor and are not universal.

发明内容Contents of the invention

本发明的目的在于设计出一种基于矢量算法自学习直流无刷电机霍尔位置的控制方法,通过上位机与控制板结合,使电机可以自学习霍尔传感器的位置并存储到控制板的FALSH区域,不会随着控制板掉电而使数据丢失。The purpose of this invention is to design a control method for self-learning the Hall position of a brushless DC motor based on a vector algorithm. By combining the host computer and the control board, the motor can self-learn the position of the Hall sensor and store it in the FALSH of the control board. area, data will not be lost when the control board is powered off.

为了实现上述目的,本发明采用的技术方案如下:In order to achieve the above objects, the technical solutions adopted by the present invention are as follows:

S1:上位机配置好参数后,发送指令到控制板上S1: After the host computer configures the parameters, it sends instructions to the control board

S2:控制板收到指令后,首先先进行霍尔扇区的自学习,将自学习得到的霍尔扇区存入到芯片中的FLASH中;S2: After receiving the instruction, the control board first performs self-learning of the Hall sectors and stores the Hall sectors obtained by self-learning into the FLASH in the chip;

S3:然后自学习霍尔扇区成功后,进行FOC算法的自学习,通过扇区解算出电机运行的电速度,通过电速度解算出当前的角度值。S3: Then after the self-learning of the Hall sector is successful, the FOC algorithm is self-learning, the electrical speed of the motor is calculated through the sector, and the current angle value is calculated through the electrical speed.

S4:在FOC算法中,设定固定的参数Ud和Uq,通过解算的角度值,生成三路PWM波输入到电机的三相定子中,带动转子转动起来。S4: In the FOC algorithm, fixed parameters Ud and Uq are set, and through the calculated angle values, three PWM waves are generated and input into the three-phase stator of the motor to drive the rotor to rotate.

通过上述自学习的算法,可以使任何类型的电机在矢量控制FOC的算法下,成功的转动。Through the above self-learning algorithm, any type of motor can be successfully rotated under the vector control FOC algorithm.

本发明具有如下有益效果:The invention has the following beneficial effects:

本发明设计的系统通过前期对直流无刷电机各种参数的自学习,通过对学习到的参数进行取值,让电机在转动时候采集母线电流值,判定自学习是否成功,采用矢量控制FOC算法使电机转动的性能达到最优;其次,将学习到的电机参数存入芯片内部得到FLASH区域,起到了断电保护的作用;最后,通过上位机与下位机的结合,UI界面的操作可以带来更加简洁化的体验,并通过上位机可以实时检测到直流无刷电机在自学习的过程中参数的实时变化。The system designed by this invention uses self-learning of various parameters of the brushless DC motor in the early stage, and takes the values of the learned parameters to allow the motor to collect the bus current value when rotating to determine whether the self-learning is successful and adopts the vector control FOC algorithm. Optimize the performance of motor rotation; secondly, store the learned motor parameters inside the chip to obtain the FLASH area, which plays the role of power-off protection; finally, through the combination of the upper computer and the lower computer, the operation of the UI interface can be For a more simplified experience, the real-time changes in parameters of the brushless DC motor during the self-learning process can be detected in real time through the host computer.

本发明通过合理的设计、智能化的控制策略,可以较好的完成对直流无刷电机的自学习功能,节约了针对每款直流无刷电机需要单独调试的成本,设计的算法具有更好的适应性和鲁棒性,满足不同产品的需求。Through reasonable design and intelligent control strategy, the present invention can better complete the self-learning function of the DC brushless motor, save the cost of separate debugging for each DC brushless motor, and the designed algorithm has better Adaptability and robustness to meet the needs of different products.

任何类型的直流无刷电机,不需要通过前期的测试、调试、编写代码等工作,通过设计的算法使电机自学习其中的参数。Any type of brushless DC motor does not need to go through preliminary testing, debugging, coding, etc. The designed algorithm allows the motor to self-learn its parameters.

附图说明Description of the drawings

图1是直流无刷电机的霍尔传感器安装位置与电机转子的位置关系图。Figure 1 is a diagram showing the relationship between the installation position of the Hall sensor of the brushless DC motor and the position of the motor rotor.

图2是霍尔顺序与最终霍尔的扇区霍尔状态值HALLState之间的关系图。Figure 2 is a diagram of the relationship between the Hall sequence and the final Hall's sector Hall state value HALLState.

图3是反电动势与HALLState之间的关系图。Figure 3 is a diagram showing the relationship between back electromotive force and HALLState.

图4是霍尔传感器的直流无刷电机自学习算法流程图。Figure 4 is the flow chart of the brushless DC motor self-learning algorithm of the Hall sensor.

图5是第二次自学习得到的扇区顺序的流程图。Figure 5 is a flow chart of the sector sequence obtained in the second self-learning.

图6是最终的θresult与霍尔扇区之间的关系图。Figure 6 is the relationship between the final θ result and the Hall sector.

图7是上位机的界面图。Figure 7 is the interface diagram of the host computer.

具体实施方式Detailed ways

下面结合附图对本发明做进一步的说明:The present invention will be further described below in conjunction with the accompanying drawings:

随着人工智能的发展,设计出来的产品需要更加的智能化和更强的鲁棒性,而本发明中设计的算法可以对任何一款带霍尔传感器的直流无刷电机进行自学习,通过算法让电机自己去学习自己的各种参数,可以自适应的通过矢量控制使电机的转动达到最优,采用霍尔扇区解算角度值的算法,并通过矢量控制FOC算法控制电机,使电机在运行过程中产生更大的扭矩、减少电流损耗、提高工作效率,通过C#语言编写上位机软件,界面化的操作能带来更加直观的感受,上位机与下位机的通讯使设计出来的系统更加的简洁化。With the development of artificial intelligence, designed products need to be more intelligent and stronger, and the algorithm designed in the present invention can perform self-learning on any brushless DC motor with a Hall sensor. The algorithm allows the motor to learn its own various parameters, and can adaptively optimize the rotation of the motor through vector control. It uses the algorithm of Hall sector to solve the angle value, and controls the motor through the vector control FOC algorithm to make the motor During operation, greater torque is generated, current loss is reduced, and work efficiency is improved. The upper computer software is written in C# language. The interface operation can bring a more intuitive experience. The communication between the upper computer and the lower computer makes the designed system More simplicity.

结合附图1-7,本发明公开一种基于矢量算法自学习直流无刷电机霍尔位置的控制方法,所述方法如下:With reference to Figures 1-7, the present invention discloses a control method for self-learning the Hall position of a brushless DC motor based on a vector algorithm. The method is as follows:

S1:确定直流无刷电机的通电顺序与霍尔传感器的关系得出霍尔扇区,上位机配置参数,然后发送指令到控制板上;S1: Determine the relationship between the power-on sequence of the brushless DC motor and the Hall sensor to obtain the Hall sector, host computer configuration parameters, and then send instructions to the control board;

S2:控制板收到指令后,先进行霍尔扇区的自学习,将自学习得到的霍尔扇区存入到芯片中的FLASH中;S2: After receiving the instruction, the control board first performs self-learning of the Hall sectors and stores the Hall sectors obtained by self-learning into the FLASH in the chip;

所述霍尔扇区的自学习具体步骤:通过对直流无刷电机通电的顺序,让转子运动到指定的位置,获得该位置的霍尔状态HALLState;按照通电的顺序,每次持续100ms,在100ms内定子产生的磁矩使转子运动,并将获得的HALLState存入到二维数组BUFF中,一个周期有六次换向,需要600ms,自学习10次,并通过六步换向的控制方法,检测母线电流值是否小于设定值,验证自学习是否成功;The specific steps of self-learning of the Hall sector: through the sequence of powering on the DC brushless motor, let the rotor move to the specified position, and obtain the Hall state HALLState of the position; follow the sequence of powering on, each time lasting 100ms, in The magnetic moment generated by the stator within 100ms causes the rotor to move, and the obtained HALLState is stored in the two-dimensional array BUFF. There are six commutations in one cycle, which takes 600ms, self-learning 10 times, and a six-step commutation control method. , detect whether the bus current value is less than the set value, and verify whether the self-learning is successful;

S3:然后自学习霍尔扇区成功后,进行FOC算法的自学习,通过扇区解算出电机运行的电速度,通过电速度解算出当前的角度值;S3: Then after the self-learning of the Hall sector is successful, the self-learning of the FOC algorithm is performed, the electrical speed of the motor is calculated through the sector, and the current angle value is calculated through the electrical speed;

S4:在FOC算法中,设定固定的参数Ud和Uq,通过解算的角度值,生成三路PWM波输入到电机的三相定子中,带动转子转动。S4: In the FOC algorithm, fixed parameters Ud and Uq are set, and through the calculated angle values, three PWM waves are generated and input into the three-phase stator of the motor to drive the rotor to rotate.

针对上述方法,本发明给出了具体的实施例如下:For the above method, the present invention provides specific examples as follows:

本发明研究的对象为三个霍尔的安装位置相差120°,可以输出6个不同的霍尔信号组合,分别对应6个不同的区域。直流无刷电机的霍尔传感器安装位置与电机转子的位置如图1所示。The research object of this invention is that the installation positions of three Halls are 120° different, and 6 different Hall signal combinations can be output, corresponding to 6 different areas respectively. The installation position of the Hall sensor of the brushless DC motor and the position of the motor rotor are shown in Figure 1.

直流无刷电机的通电顺序与霍尔传感器的关系如下表所示,其中“×”代表该相关闭,“√”代表该相导通。The relationship between the power-on sequence of the brushless DC motor and the Hall sensor is as shown in the table below, where "×" means that the phase is closed, and "√" means that the phase is on.

三相霍尔信号是开关信号,记高电平为1,低电平为0,霍尔扇区值可以计算如下:The three-phase Hall signal is a switching signal. The high level is recorded as 1 and the low level is 0. The Hall sector value can be calculated as follows:

HALLStateSum=HALLA+2*HALLB+4*HALLC HALLState Sum =HALL A +2*HALL B +4*HALL C

HALLStateSum的霍尔顺序为5-4-6-2-3-1,可根据实际情况对其按顺序(0-5)进行排序,方便角度值解算处理。霍尔顺序与最终霍尔的扇区霍尔状态值HALLState之间的关系如2所示,图中上方的曲线为HALLState的扇区值,下方的曲线为按照顺序排序之后的图。The Hall order of HALLState Sum is 5-4-6-2-3-1, which can be sorted in order (0-5) according to the actual situation to facilitate angle value calculation and processing. The relationship between the Hall order and the final Hall's sector Hall state value HALLState is shown in 2. The upper curve in the figure is the sector value of HALLState, and the lower curve is the figure after sorting in order.

A相对中性点反电动势过零点(由正变负)实质上是角度值绝对零度位置,在反电动势公式(表贴式直流无刷电机)中的公式如下:A's relative neutral point back electromotive force zero-crossing point (from positive to negative) is essentially the absolute zero position of the angle value. The formula in the back electromotive force formula (surface-mounted brushless DC motor) is as follows:

Ea、Eb、Ec是直流无刷电机定子绕组的三相对中性点的反电动势,ωe为电角速度,ψf为转子的磁链,θe为角度值,可以得到反电动势与HALLState之间的关系图3所示,图中上方的曲线为HALLState的扇区值,下方的曲线为A相的反电动势,可以得到反电动势由正转变为负值的交点为电角度零度位置,对应的扇区称为零度扇区。Ea, Eb, and Ec are the back electromotive force of the three-phase neutral points of the stator winding of the brushless DC motor. ω e is the electrical angular velocity, ψ f is the flux linkage of the rotor, and θ e is the angle value. The relationship between the back electromotive force and HALLState can be obtained. The relationship is shown in Figure 3. The upper curve in the figure is the sector value of HALLState, and the lower curve is the back electromotive force of phase A. It can be obtained that the intersection point where the back electromotive force changes from positive to negative is the zero electrical angle position, and the corresponding sector The area is called the zero degree sector.

本发明首先需要对直流无刷电机的霍尔扇区进行识别,为后续采用FOC算法做基础,通过对直流无刷电机通电的顺序,让转子运动到指定的位置,获得该位置的霍尔状态HALLState,按照通电的顺序,每次持续100ms,在100ms内定子产生的磁矩使转子运动,并将获得的HALLState存入到二维数组BUFF中,一个周期有六次换向,需要600ms,自学习10次,提高自学习的成功率,并通过六步换向的控制方法,检测母线电流值是否小于设定值,验证自学习是否成功。本发明基于霍尔传感器的直流无刷电机自学习算法流程图4所示。The present invention first needs to identify the Hall sector of the DC brushless motor to lay the foundation for the subsequent use of the FOC algorithm. Through the sequence of powering on the DC brushless motor, the rotor is moved to the designated position and the Hall state of the position is obtained. HALLState, according to the power-on sequence, lasts for 100ms each time. Within 100ms, the magnetic moment generated by the stator causes the rotor to move, and the obtained HALLState is stored in the two-dimensional array BUFF. There are six commutations in one cycle, which takes 600ms. Learn 10 times to improve the success rate of self-learning, and use the six-step commutation control method to detect whether the bus current value is less than the set value to verify whether the self-learning is successful. The self-learning algorithm flow chart of the DC brushless motor based on the Hall sensor of the present invention is shown in Figure 4.

在得到霍尔位置之后,采用FOC矢量算法让电机转动起来,首先需要得到电机零角度位置所对应的扇区。第一次自学习算法得到电机定子绕组三相一一对应的霍尔线束,第二次自学习得到零度扇区的位置,并知道电机正反转对应的扇区变化的顺序。After obtaining the Hall position, use the FOC vector algorithm to rotate the motor. First, you need to obtain the sector corresponding to the zero-angle position of the motor. The first self-learning algorithm obtains the one-to-one Hall wiring harness corresponding to the three phases of the motor stator winding. The second self-learning algorithm obtains the position of the zero-degree sector and knows the sequence of sector changes corresponding to the forward and reverse rotation of the motor.

对于FOC矢量算法,本发明通过求解上一次扇区的电角速度,通过对上一扇区电角速度积分得到本次扇区的位移角度量。第二次自学习得到的扇区顺序的流程图5所示,电机启动前,电机可能处于静止状态,需要我们先读取三相霍尔开关信号,确定当前转子所处的Hall扇区角度,该角度与实际角度最大偏差为±30°。待电机稳定旋转后,一个电周期内可获取6个准确的霍尔扇区角度。计算转速时,可以利用信号捕获功能触发中断,并且在中断中读取计数结果,用于转速计算,同时清空计数,并进入下一次扇区计数。电机转动一个电周期,Hall产生6个扇区变化。以ωe表示电机的电气角速度,计算公式为:For the FOC vector algorithm, the present invention obtains the displacement angle of this sector by solving the electrical angular velocity of the previous sector and integrating the electrical angular velocity of the previous sector. The flow chart of the sector sequence obtained in the second self-learning is shown in Figure 5. Before the motor starts, the motor may be in a stationary state. We need to read the three-phase Hall switch signal first to determine the Hall sector angle where the rotor is currently located. The maximum deviation between this angle and the actual angle is ±30°. After the motor rotates stably, 6 accurate Hall sector angles can be obtained within one electrical cycle. When calculating the speed, you can use the signal capture function to trigger an interrupt, and read the counting results in the interrupt for speed calculation, clear the count, and enter the next sector count. When the motor rotates for one electrical cycle, Hall produces 6 sector changes. Let ω e represent the electrical angular speed of the motor, and the calculation formula is:

式中,RegisterCnt是读取的定时器计数值,ftimer是定时器配置的频率。机械转速即为电气角速度的(1/P)倍,公式为:In the formula, RegisterCnt is the read timer count value, and f timer is the frequency of the timer configuration. The mechanical speed is (1/P) times the electrical angular speed, and the formula is:

式中,P为电机的极对数,ωm表示电机的机械角速度。In the formula, P is the number of pole pairs of the motor, and ω m represents the mechanical angular speed of the motor.

本发明中霍尔角度的解算是通过对速度的积分来实现的。首先,使用定时器,计算走过一个霍尔扇区所需要花费的时间ToneSec(T法测速)。其次,利用ToneSec计算在一个载波周期(Tcarrier)内需要走过的角度值Δθe。最后,在每个载波中断内,每次累加该角度值,实现角度的连续积分。这里的Δθe是通过上一个扇区的速度估算,在每次霍尔扇区发生跳变的时候将更新角速度ωe并清除寄存器的值。为了方便直流无刷电机的自学习过程,针对霍尔扇区的偏差角度,采用固定的偏差角度为θerror,则最终通过霍尔扇区解算出来的真实的角度值为:In the present invention, the solution of the Hall angle is achieved by integrating the velocity. First, use a timer to calculate the time it takes to walk through a Hall sector, T oneSec (T method speed measurement). Secondly, use T oneSec to calculate the angle value Δθ e that needs to be traveled within one carrier cycle (T carrier ). Finally, within each carrier interruption, the angle value is accumulated each time to achieve continuous integration of the angle. The Δθ e here is estimated from the speed of the previous sector. Every time the Hall sector jumps, the angular velocity ω e will be updated and the register value will be cleared. In order to facilitate the self-learning process of the brushless DC motor, a fixed deviation angle is used as θ error for the deviation angle of the Hall sector. Then the real angle value finally calculated through the Hall sector is:

θresult=θCumulateerror θ resultCumulateerror

式中,θCumulate为霍尔扇区积分累加得到的角度值,θerror为固定的偏差值30°,θresult为最终求得的角度值。通过J-Scope软件查看最终的θresult与霍尔扇区之间的关系,图6中显示起始阶段给固定的角度值,定子产生的磁矩拖动转子转动起来,拖动起来之后,芯片中的寄存器可以捕获到霍尔扇区发生跳变,从而开始记录每个扇区停留的时间,之后就可以求解电速度,对速度进行积分来解算出当前的角度值。In the formula, θ Cumulate is the angle value obtained by integrating the Hall sector, θ error is the fixed deviation value of 30°, and θ result is the final angle value. Check the relationship between the final θ result and the Hall sector through the J-Scope software. Figure 6 shows a fixed angle value in the initial stage. The magnetic moment generated by the stator drags the rotor to rotate. After dragging, the chip The register in can capture the transition of the Hall sector and start recording the time spent in each sector. After that, the electrical speed can be solved and the speed can be integrated to calculate the current angle value.

将最终求得的θresult输入到SVPWM(Space Vector Pulse Width Modulation)的代码中,通过固定的Ud等于0,Uq等于10000可以生成三相随时间变化的PWM波,最终合成旋转的矢量,带动电机转子旋转。Input the final θ result into the SVPWM (Space Vector Pulse Width Modulation) code. By fixing Ud equal to 0 and Uq equal to 10000, a three-phase PWM wave that changes with time can be generated, and finally a rotating vector is synthesized to drive the motor. The rotor spins.

本发明中采用更加方便的界面化操作,让使用者能够更好的了解产品的功能,设计UI界面作为上位机,通过对不同的按钮定义,可以通过点击按钮从而使上位机与控制板进行通讯,控制板得到相应的指令后执行响应的动作,上位机的界面图7所示。The present invention adopts more convenient interface operations, allowing users to better understand the functions of the product. The UI interface is designed as a host computer. By defining different buttons, the host computer can communicate with the control panel by clicking the button. , the control board executes the corresponding action after getting the corresponding instruction. The interface of the host computer is shown in Figure 7.

整个方法对于任何类型的直流无刷电机,不需要通过前期的测试、调试、编写代码等工作,通过设计的算法使电机自学习其中的参数。若设备断电后,由于提前将参数信息存入到芯片中的FLASH区域,不会随着断电而使数据丢失,将自学习获得的经验进行存储。实时检测电机的运行状态,并在上位机上实时显示出来,使用户可以更加直观的感受到有关电机的参数变化。通过多次的自学习训话,加大了自学习的成功率。The entire method does not require preliminary testing, debugging, coding, etc. for any type of brushless DC motor. The designed algorithm allows the motor to self-learn its parameters. If the device is powered off, since the parameter information is stored in the FLASH area of the chip in advance, the data will not be lost along with the power outage, and the experience gained from self-learning will be stored. The running status of the motor is detected in real time and displayed on the host computer in real time, so that the user can feel the parameter changes of the motor more intuitively. Through multiple self-study training sessions, the success rate of self-study is increased.

以上所述均为本发明的优选实施方式,对于本技术领域的普通技术人员,在不脱离本发明的原理前提下,对本发明的各种等价形式的修改均属于本申请所附权利要求的保护范围。The above are all preferred embodiments of the present invention. For those of ordinary skill in the art, without departing from the principles of the present invention, modifications to various equivalent forms of the present invention all fall within the scope of the appended claims of this application. protected range.

Claims (6)

1.一种基于矢量算法自学习直流无刷电机霍尔位置的控制方法,其特征在于:所述方法如下:1. A control method for self-learning the Hall position of a brushless DC motor based on a vector algorithm, which is characterized in that: the method is as follows: S1:确定直流无刷电机的通电顺序与霍尔传感器的关系得出霍尔扇区,上位机配置参数,然后发送指令到控制板上;S1: Determine the relationship between the power-on sequence of the brushless DC motor and the Hall sensor to obtain the Hall sector, host computer configuration parameters, and then send instructions to the control board; S2:控制板收到指令后,先进行霍尔扇区的自学习,将自学习得到的霍尔扇区存入到芯片中的FLASH中;S2: After receiving the instruction, the control board first performs self-learning of the Hall sectors and stores the Hall sectors obtained by self-learning into the FLASH in the chip; 所述霍尔扇区的自学习具体步骤:通过对直流无刷电机通电的顺序,让转子运动到指定的位置,获得该位置的霍尔状态HALLState;按照通电的顺序,每次持续100ms,在100ms内定子产生的磁矩使转子运动,并将获得的HALLState存入到二维数组BUFF中,一个周期有六次换向,需要600ms,自学习10次,并通过六步换向的控制方法,检测母线电流值是否小于设定值,验证自学习是否成功;The specific steps of self-learning of the Hall sector: through the sequence of powering on the DC brushless motor, let the rotor move to the specified position, and obtain the Hall state HALLState of the position; follow the sequence of powering on, each time lasting 100ms, in The magnetic moment generated by the stator within 100ms causes the rotor to move, and the obtained HALLState is stored in the two-dimensional array BUFF. There are six commutations in one cycle, which takes 600ms, self-learning 10 times, and a six-step commutation control method. , detect whether the bus current value is less than the set value, and verify whether the self-learning is successful; S3:然后自学习霍尔扇区成功后,进行FOC算法的自学习,通过扇区解算出电机运行的电速度,通过电速度解算出当前的角度值;S3: Then after the self-learning of the Hall sector is successful, the self-learning of the FOC algorithm is performed, the electrical speed of the motor is calculated through the sector, and the current angle value is calculated through the electrical speed; S4:在FOC算法中,设定固定的参数Ud和Uq,通过解算的角度值,生成三路PWM波输入到电机的三相定子中,带动转子转动;S4: In the FOC algorithm, fixed parameters Ud and Uq are set, and through the calculated angle values, three PWM waves are generated and input into the three-phase stator of the motor to drive the rotor to rotate; 霍尔角度的解算是通过对速度的积分来实现的:The solution for the Hall angle is achieved by integrating the velocity: 首先,使用定时器,计算走过一个霍尔扇区所需要花费的时间ToneSec,T法测速;First, use a timer to calculate the time T oneSec it takes to walk through a Hall sector, and measure the speed with the T method; 其次,利用ToneSec计算在一个载波周期Tcarrier内需要走过的角度值ΔθeSecondly, use T oneSec to calculate the angle value Δθ e that needs to be traveled within a carrier period T carrier ; 最后,在每个载波中断内,每次累加该角度值,实现角度的连续积分;Finally, within each carrier interruption, the angle value is accumulated each time to achieve continuous integration of the angle; 这里的Δθe是通过上一个扇区的速度估算,在每次霍尔扇区发生跳变的时候将更新角速度ωe并清除寄存器的值;固定的偏差角度为θerror,则最终通过霍尔扇区解算出来的真实的角度值为:The Δθ e here is estimated from the speed of the previous sector. Each time the Hall sector jumps, the angular velocity ω e will be updated and the register value will be cleared; the fixed deviation angle is θ error , and the Hall sector will eventually pass the angular velocity ω e The real angle value calculated by the sector is: θresult=θCumulateerror θ resultCumulateerror 式中,θCumulate为霍尔扇区积分累加得到的角度值,θerror为固定的偏差值30°,θresult为最终求得的角度值。In the formula, θ Cumulate is the angle value obtained by integrating the Hall sector, θ error is the fixed deviation value of 30°, and θ result is the final angle value. 2.根据权利要求1所述的一种基于矢量算法自学习直流无刷电机霍尔位置的控制方法,其特征在于:S1中采用三个霍尔的安装位置相差120°,输出6个不同的霍尔信号组合,分别对应6个不同的区域,直流无刷电机的通电顺序与霍尔传感器的具体关系如下:2. A control method for self-learning DC brushless motor Hall position based on vector algorithm according to claim 1, characterized in that: the installation positions of three Halls used in S1 differ by 120°, and 6 different Hall positions are output. Hall signal combinations correspond to 6 different areas. The specific relationship between the power-on sequence of the brushless DC motor and the Hall sensor is as follows: 其中,“×”代表该相关闭,“√”代表该相导通,高电平信号为1,低电平信号为0。Among them, "×" means that the phase is closed, "√" means that the phase is turned on, the high-level signal is 1, and the low-level signal is 0. 3.根据权利要求1所述的一种基于矢量算法自学习直流无刷电机霍尔位置的控制方法,其特征在于:FOC算法的自学习分为两次,第一次自学习算法得到电机定子绕组三相一一对应的霍尔线束,第二次自学习得到零度扇区的位置,并知道电机正反转对应的扇区变化的顺序。3. A control method for the Hall position of a brushless DC motor based on vector algorithm self-learning according to claim 1, characterized in that: the self-learning of the FOC algorithm is divided into two times, and the first self-learning algorithm obtains the motor stator. The three-phase one-to-one Hall wiring harness of the windings can obtain the position of the zero-degree sector through self-learning for the second time, and know the sequence of sector changes corresponding to the forward and reverse rotation of the motor. 4.根据权利要求2或3所述的一种基于矢量算法自学习直流无刷电机霍尔位置的控制方法,其特征在于:电机运行之前需要读取三相霍尔开关信号,确定当前转子所处的Hall扇区角度,该角度与实际角度最大偏差为±30°;待电机稳定旋转后,一个电周期内可获取6个准确的霍尔扇区角度;计算转速时,利用信号捕获功能触发中断,并且在中断中读取计数结果,用于转速计算,同时清空计数,并进入下一次扇区计数;电机转动一个电周期,Hall产生6个扇区变化;以ωe表示电机的电气角速度,计算公式为:4. A control method for self-learning DC brushless motor Hall position based on vector algorithm according to claim 2 or 3, characterized in that: before the motor runs, it is necessary to read the three-phase Hall switch signal to determine the current position of the rotor. The maximum deviation between this angle and the actual angle is ±30°; after the motor rotates stably, 6 accurate Hall sector angles can be obtained within one electrical cycle; when calculating the rotational speed, use the signal capture function to trigger Interrupt, and read the counting results in the interrupt for speed calculation, clear the count at the same time, and enter the next sector count; the motor rotates for one electrical cycle, and Hall produces 6 sector changes; ω e represents the electrical angular speed of the motor , the calculation formula is: 式中,RegisterCnt是读取的定时器计数值,ftimer是定时器配置的频率;机械转速即为电气角速度的1/P倍,公式为:In the formula, RegisterCnt is the read timer count value, f timer is the frequency of the timer configuration; the mechanical speed is 1/P times the electrical angular speed, and the formula is: 式中,P为电机的极对数,ωm表示电机的机械角速度。In the formula, P is the number of pole pairs of the motor, and ω m represents the mechanical angular speed of the motor. 5.根据权利要求1所述的一种基于矢量算法自学习直流无刷电机霍尔位置的控制方法,其特征在于:将最终求得的θresult输入到SVPWM,通过固定的Ud等于0,Uq等于10000生成三相随时间变化的PWM波,最终合成旋转的矢量,带动电机转子旋转。5. A control method for self-learning DC brushless motor Hall position based on vector algorithm according to claim 1, characterized in that: the final obtained θ result is input to SVPWM, and Ud is equal to 0 through fixed Uq. It is equal to 10000 to generate a three-phase PWM wave that changes with time, and finally synthesizes a rotating vector to drive the motor rotor to rotate. 6.根据权利要求1所述的一种基于矢量算法自学习直流无刷电机霍尔位置的控制方法,其特征在于:上位机设计UI界面,操作UI界面使上位机与控制板进行通讯,控制板得到相应的指令后执行响应的动作。6. A control method for self-learning DC brushless motor Hall position based on vector algorithm according to claim 1, characterized in that: the host computer designs a UI interface, and operates the UI interface to communicate with the host computer and control panel. After receiving the corresponding instructions, the board performs the corresponding actions.
CN202310560963.6A 2023-05-18 2023-05-18 A control method for self-learning DC brushless motor Hall position based on vector algorithm Active CN116780956B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310560963.6A CN116780956B (en) 2023-05-18 2023-05-18 A control method for self-learning DC brushless motor Hall position based on vector algorithm

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310560963.6A CN116780956B (en) 2023-05-18 2023-05-18 A control method for self-learning DC brushless motor Hall position based on vector algorithm

Publications (2)

Publication Number Publication Date
CN116780956A CN116780956A (en) 2023-09-19
CN116780956B true CN116780956B (en) 2024-01-16

Family

ID=87986917

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310560963.6A Active CN116780956B (en) 2023-05-18 2023-05-18 A control method for self-learning DC brushless motor Hall position based on vector algorithm

Country Status (1)

Country Link
CN (1) CN116780956B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110380653A (en) * 2019-06-17 2019-10-25 江苏大学 Vector controlled location estimation compensation method based on hall position sensor
WO2020031882A1 (en) * 2018-08-08 2020-02-13 日本電産株式会社 Position estimation method, motor control device and motor system
CN111245307A (en) * 2020-03-19 2020-06-05 深圳市微秒控制技术有限公司 Hall line sequence self-adaptive learning method of brushless motor

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110391770A (en) * 2018-04-17 2019-10-29 德昌电机(深圳)有限公司 Electric machine, motor-drive circuit and driving method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020031882A1 (en) * 2018-08-08 2020-02-13 日本電産株式会社 Position estimation method, motor control device and motor system
CN110380653A (en) * 2019-06-17 2019-10-25 江苏大学 Vector controlled location estimation compensation method based on hall position sensor
CN111245307A (en) * 2020-03-19 2020-06-05 深圳市微秒控制技术有限公司 Hall line sequence self-adaptive learning method of brushless motor

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
《霍尔转子位置预估方法及其误差校正》;荀倩;《电工技术学报》;第32卷(第6期);全文 *

Also Published As

Publication number Publication date
CN116780956A (en) 2023-09-19

Similar Documents

Publication Publication Date Title
CN102025305B (en) Hall phase sequence detecting method and device of brushless direct-current motor
US8228013B2 (en) Method and apparatus for automatically identifying electrical parameters in a sensor-less PMSM
CN105680742B (en) A sensorless rotor position recognition system and method for a brushless DC motor
CN105529967A (en) Fan start state detection and start control method
CN109239635B (en) Permanent magnet synchronous motor rotary transformer zero calibration system and calibration method
CN102437804A (en) Current feedback speed control method and driving method of sensorless brushless DC motor
CN108011549A (en) The BLDC motors phase change control method and device of position-sensor-free
CN107834917A (en) The counter electromotive force commutation point detection circuit and method of a kind of DC brushless motor
CN102075130A (en) Convenient method for controlling direction of rotation of synchronous motor of single-phase permanent magnet and motor using same
CN104022709A (en) Positioning method for initial position of rotor in permanent magnet synchronous motor and system thereof
CN107769636A (en) A kind of position-sensor-free permanent magnet synchronous motor rotor position detection method
CN103414433A (en) Hall position sensor fault emergency method
CN111857197A (en) Three-phase AC motor and its load simulation method and device
CN105680740B (en) A kind of method for controlling position-less sensor of high rotating speed brshless DC motor
CN108282117A (en) A kind of DC fan starts method, control circuit and air conditioner
CN116780956B (en) A control method for self-learning DC brushless motor Hall position based on vector algorithm
CN104579036A (en) Dual-mode driving method and device
CN206820680U (en) A kind of zero cross detection circuit of DC brushless motor
Tefay et al. Design of an integrated electronic speed controller for compact robotic vehicles
CN110865586B (en) Petri network-based brushless direct current motor DSP logic control program design method
CN106803728A (en) A kind of zero cross detection circuit of DC brushless motor
Grenier et al. Use of an extension of the Park's transformation to determine control laws applied to a non-sinusoidal permanent magnet synchronous motor
CN107947650B (en) A position sensorless control method of brushless DC motor based on extreme learning machine classification
TWI519058B (en) Sensorless Operation Control Method for DC Brushless Motor
CN105322860A (en) Sensorless rotor initial angle detection apparatus and method for permanent magnet direct drive motor

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
GR01 Patent grant
GR01 Patent grant