Motor commutation method and device, controller and storage medium
By acquiring and parsing the current encoder signal, a commutation wave signal is generated in real time, which solves the problem of large torque pulsation in brushless motors, realizes commutation without delay, improves the smoothness and efficiency of motor operation, and simplifies engineering applications.
Patent Information
- Application Number
- CN202410837911.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-26
- Publication Date
- 2024-11-12
AI Technical Summary
Brushless motors suffer from large torque ripple. Existing technologies reduce commutation delay by compensating for commutation deviations caused by low-pass filtering and device delays. However, these methods are complex and rely on accurate back EMF coefficients, winding resistance parameters, and bus current sampling accuracy, which is not conducive to engineering applications.
By acquiring and parsing the current encoder signal, a commutation wave signal is generated in real time by applying it to the commutation wave function. Based on this signal, the motor commutation operation is performed. Software control is used to achieve commutation without delay, thereby improving commutation accuracy.
It achieves zero-delay commutation, reduces torque ripple, improves the smoothness and efficiency of motor operation, and simplifies engineering applications.
Smart Images

Figure CN118944498A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of motor technology, and in particular to a motor commutation method, device, controller and storage medium. Background Art
[0002] Brushless motors have outstanding energy-saving characteristics, stable operating characteristics and sensitive control characteristics. They have the advantages of high power density, high efficiency and low noise. They have been increasingly widely used in industries such as industry, aerospace, medical care, and robotics.
[0003] Brushless motors generally have the problem of large torque pulsation, and the main reason for the large torque pulsation is commutation delay. In the prior art, there is a solution to reduce commutation delay by compensating for commutation deviation caused by factors such as low-pass filtering and device delay, thereby reducing torque pulsation. However, this solution relies on accurate back-EMF coefficient, winding resistance parameters and bus current sampling accuracy, and the correction method used is also relatively complex, which is not conducive to wide application in engineering.
[0004] Therefore, how to provide a simpler technical solution for delay-free commutation to reduce the torque pulsation of the brushless motor has become a technical problem that needs to be solved urgently by those skilled in the art. Summary of the invention
[0005] In view of the above, the present application provides a motor commutation method, device, controller and storage medium, the purpose of which is to solve the above technical problems.
[0006] In a first aspect, the present application provides a motor commutation method, the method comprising:
[0007] Get and parse the current encoder signal;
[0008] Allowing the current encoder signal to act on the current commutation wave function in real time to generate a commutation wave signal;
[0009] A commutation operation is performed on the motor based on the commutation wave signal.
[0010] In one embodiment, the obtaining and parsing of the current encoder signal includes:
[0011] Configure the triggering conditions of the commutation interrupt;
[0012] Setting the priority of the commutation interrupt to be higher than the priority of the current control loop interrupt;
[0013] When the commutation interrupt event is triggered, the current encoder signal is acquired and analyzed.
[0014] In one embodiment, the triggering condition of configuring the phase switching interruption includes:
[0015] Through the application program of the Hall encoder of the motor, a Hall edge signal is configured to trigger a commutation interrupt, wherein the Hall edge signal includes a Hall rising edge signal and a Hall falling edge signal.
[0016] In one embodiment, the step of causing the current encoder signal to act on the current commutation wave function in real time to generate a commutation wave signal includes:
[0017] The current Hall position signal is input into the current commutation wave function in real time to generate the commutation wave signal.
[0018] In one embodiment, performing a commutation operation on the motor based on the commutation wave signal includes:
[0019] The inverter bridge of the motor is controlled in real time to be opened or closed according to the phase-changing wave signal, so that the motor performs a phase-changing operation.
[0020] In a second aspect, the present application provides a motor commutation device, the device comprising:
[0021] Acquisition module: used to acquire and analyze the current encoder signal;
[0022] Generating module: used for making the current encoder signal act on the current commutation wave function in real time to generate a commutation wave signal;
[0023] Phase commutation module: used for performing phase commutation operation on the motor based on the phase commutation wave signal.
[0024] In a third aspect, the present application provides a commutation controller for a motor, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;
[0025] Memory, used to store computer programs;
[0026] The processor is used to implement the motor commutation method described in any one of the embodiments of the first aspect when executing the program stored in the memory.
[0027] In a fourth aspect, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the motor commutation method as described in any embodiment of the first aspect is implemented.
[0028] The above technical solution provided by the embodiment of the present application has the following advantages compared with the prior art:
[0029] The present application obtains and analyzes the current encoder signal, and makes the current encoder signal act on the current commutation wave function in real time to generate a commutation wave signal, and performs commutation operations on the motor based on the commutation wave signal. Since the current encoder signal of the motor acts on the current commutation wave function in real time, it is guaranteed that the commutation information obtained at this moment acts on the current commutation wave function, thereby achieving delay-free commutation, improving the commutation accuracy of the motor, and reducing the torque pulsation caused by commutation. Compared with the prior art solution of reducing commutation delay by compensating for commutation deviations caused by factors such as low-pass filtering and device delay, the delay-free commutation method implemented by software control in the present application is simpler and easier to be widely used in engineering. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0031] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0032] Figure 1 This is a flow chart of an embodiment of the motor commutation method of the present application;
[0033] Figure 2 A schematic diagram of the waveform of the output current of a BLDC motor affected by the commutation delay in an embodiment of the present application;
[0034] Figure 3 It is a schematic diagram of the waveform of the output current of the BLDC motor affected by the absence of commutation delay in the embodiment of the present application;
[0035] Figure 4 This is a module schematic diagram of an embodiment of a motor commutation device of the present application;
[0036] Figure 5 A schematic diagram of an embodiment of a commutation controller for a motor of the present application;
[0037] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0038] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0039] The disclosure below provides many different embodiments or examples to realize the different structures of the present application. In order to simplify the disclosure of the present application, the parts and settings of specific examples are described below. Of course, they are only examples, and the purpose is not to limit the present application. In addition, the present application can repeat reference numbers and / or letters in different examples. This repetition is for the purpose of simplification and clarity, and does not itself indicate the relationship between the various embodiments and / or settings discussed.
[0040] The present application provides a motor commutation method. Figure 1 FIG. 1 is a flow chart of a method of an embodiment of a motor commutation method of the present application. The method may be executed by a motor commutation controller, and the motor commutation controller may be implemented by software and / or hardware. The motor commutation method includes:
[0041] Step S10: Acquire and analyze the current encoder signal;
[0042] Step S20: allowing the current encoder signal to act on the current commutation wave function in real time to generate a commutation wave signal;
[0043] Step S30: performing a commutation operation on the motor based on the commutation wave signal.
[0044] The scheme of the present application is described in detail by taking a DC brushless motor as an example. It can be understood that in practical applications, the motor of the present application can also be other types of brushless motors.
[0045] A brushless DC motor (Brushless DC Motor, BLDCM) is a type of synchronous motor. It is an electric drive device that uses electronic commutation instead of traditional mechanical commutation to convert electrical energy into mechanical energy. A brushless DC motor is usually composed of a permanent magnet rotor, a Hall element and an electronic switching circuit. At least three Hall encoders are configured in the stator of the brushless DC motor to collect the position of the motor rotor.
[0046] BLDC motors generally have the problem of large torque pulsation. Torque pulsation refers to the phenomenon that the output torque changes or fluctuates periodically during the operation of the motor. Large torque pulsation will cause vibration and noise during the operation of the motor, reduce the control accuracy and efficiency of the system, and even affect the life of the motor. Reducing torque pulsation can improve the running stability and efficiency of the motor, reduce the vibration and noise of the system, and thus improve the overall performance of the brushless DC motor.
[0047] Since the main reason for the large torque pulsation in the BLDC motor includes the commutation delay, the present application realizes delay-free commutation through a software control method, improves the commutation accuracy of the BLDC motor, and reduces the torque pulsation caused by the commutation. The commutation method is simple and easier to be widely used in engineering.
[0048] Specifically, the current encoder signal is acquired and parsed through the main control chip MCU, and the current encoder signal represents the current position information of the BLDC motor rotor, wherein the current encoder signal includes the current Hall position signal, and the current encoder signal may also be a pulse signal or a photoelectric signal, etc. Taking the current encoder signal as the Hall position signal as an example, the current Hall position signal is the Hall signal output by the Hall encoder, and the current Hall position signal represents the current position information of the rotor.
[0049] The current Hall position signal is made to act on the current commutation wave function in real time. The current commutation wave function can generate a commutation wave signal according to the current Hall position signal. The commutation wave function refers to a function that calculates when to switch the current to keep the BLDC motor running normally according to the rotor position information of the BLDC motor. The commutation wave function can output a commutation wave signal. The commutation wave signal refers to a signal used to control the phase sequence switching of the BLDC motor. The commutation wave signal can determine when to switch the current to keep the motor running normally. After the commutation wave signal is generated, the commutation operation is performed on the brushless DC motor according to the commutation wave signal. Since the current Hall position signal of the BLDC motor acts on the current commutation wave function in real time, it is ensured that the commutation information obtained at this moment acts on the current commutation wave function, so that commutation without delay can be achieved.
[0050] Specifically, the obtaining and parsing of the current encoder signal includes:
[0051] Configure the triggering conditions of the commutation interrupt;
[0052] Setting the priority of the commutation interrupt to be higher than the priority of the current control loop interrupt;
[0053] When the commutation interrupt event is triggered, the current encoder signal is acquired and analyzed.
[0054] The external interrupt function of the main control chip MCU in the controller of the BLDC motor is used to set the phase-change interrupt callback function, and the priority of the phase-change interrupt is set higher than the priority of the current control loop interrupt. The phase-change interrupt callback function is used to execute the acquisition of the Hall encoder data (i.e., the current Hall position signal), and to perform the calculation and processing of the phase-change wave function. When the phase-change interrupt event is triggered, the callback function is executed, that is, the current encoder signal is acquired and parsed, and then the current Hall position signal is made to act on the current phase-change wave function in real time to generate a phase-change wave signal. By setting the priority of the phase-change interrupt higher than the priority of the current control loop interrupt, and placing the acquisition of the Hall position signal and the calculation of the phase-change wave function in the execution loop of the same program, it is possible to achieve non-delayed phase-change, improve the phase-change accuracy of the BLDC motor, and avoid the torque pulsation phenomenon caused by the current control loop interrupt.
[0055] Furthermore, the triggering condition for configuring the phase switching interruption includes:
[0056] Through the application program of the Hall encoder of the motor, a Hall edge signal is configured to trigger a commutation interrupt, wherein the Hall edge signal includes a Hall rising edge signal and a Hall falling edge signal.
[0057] Both the Hall rising edge signal and the Hall falling edge signal can trigger the phase-commutation interrupt. The execution priority of the phase-commutation interrupt is set before the current control loop interrupt. By limiting the execution priority through timing, the response of the BLDC motor to key events is improved, so that the acquisition of the Hall position signal and the generation of the phase-commutation wave signal do not need to be executed in the program within the current control loop, which further meets the real-time requirements of the Hall position signal.
[0058] In one embodiment, the step of causing the current encoder signal to act on the current commutation wave function in real time to generate a commutation wave signal includes:
[0059] The current Hall position signal is input into the current commutation wave function in real time to generate the commutation wave signal.
[0060] In order to adapt to different working conditions and requirements, the corresponding commutation wave function can be different for each position of the rotor of the BLDC motor within one cycle, that is, the Hall position signal corresponding to the rotor at different positions can be input into the corresponding commutation wave function to obtain a commutation wave signal.
[0061] In one embodiment, performing a commutation operation on the motor based on the commutation wave signal includes:
[0062] The inverter bridge of the motor is controlled in real time to be opened or closed according to the phase-changing wave signal, so that the motor performs a phase-changing operation.
[0063] Since the commutation wave signal is used to control the phase sequence switching of the BLDC motor, the inverter bridge can be controlled to be turned on and off according to a certain rule according to the commutation wave signal, thereby realizing the commutation of the BLDC motor.
[0064] Ginseng Figure 2 As shown in the figure, it is a schematic diagram of the waveform of the output current of the BLDC motor due to the commutation delay. Figure 2 The output current waveform of the BLDC motor under no-load state when running at 1000Hz and not using the solution of the present application is shown. Channel 1 (yellow) represents the Hall edge signal, channel 2 (green) represents the phase current, channel 3 (blue) represents the output voltage, and channel 4 (red) represents the commutation wave signal. It can be clearly seen that there is a lag between the commutation wave signal of channel 4 and the Hall edge signal of channel 1, resulting in a large torque pulsation. When the torque pulsation is reflected in the output current, that is, there is a large current spike during the commutation period, and the output current effective value of channel 2 is 399mA.
[0065] Ginseng Figure 3 As shown in the figure, it is a schematic diagram of the waveform of the output current of the BLDC motor without commutation delay. Figure 3 The output current waveform of the BLDC motor running at 1000Hz and using the solution of the present application under no-load condition is shown. Channel 1 (yellow) represents the Hall edge signal, channel 2 (green) represents the phase current, channel 3 (blue) represents the output voltage, and channel 4 (red) represents the commutation signal. It can be clearly seen that there is no lag delay between the commutation signal of channel 4 and the Hall edge signal of channel 1. Therefore, the current during commutation is almost non-existent, and the corresponding torque pulsation is also extremely small. The output current effective value of channel 2 is 264.1mA. Therefore, under the same operating conditions, the torque pulsation generated by the commutation method of the present application is smaller, and the corresponding output current is also more advantageous.
[0066] Reference Figure 4 , which is a schematic diagram of the functional modules of the motor commutation device 100 of the present application.
[0067] The motor commutation device 100 described in the present application can be installed in the commutation controller of the motor. According to the functions to be implemented, the motor commutation device 100 may include an acquisition module 110, a generation module 120 and a commutation module 130. The module described in the present application may also be referred to as a unit, which refers to a series of computer program segments that can be executed by the processor of the commutation controller of the motor and can complete fixed functions.
[0068] In this embodiment, the functions of each module / unit are as follows:
[0069] Acquisition module 110: used to acquire and analyze the current encoder signal;
[0070] Generating module 120: used to make the current encoder signal act on the current commutation wave function in real time to generate a commutation wave signal;
[0071] The phase switching module 130 is configured to perform a phase switching operation on the motor based on the phase switching wave signal.
[0072] In one embodiment, the obtaining and parsing of the current encoder signal includes:
[0073] Configure the triggering conditions of the commutation interrupt;
[0074] Setting the priority of the commutation interrupt to be higher than the priority of the current control loop interrupt;
[0075] When the commutation interrupt event is triggered, the current encoder signal is acquired and analyzed.
[0076] In one embodiment, the triggering condition of configuring the phase switching interruption includes:
[0077] Through the application program of the Hall encoder of the motor, a Hall edge signal is configured to trigger a commutation interrupt, wherein the Hall edge signal includes a Hall rising edge signal and a Hall falling edge signal.
[0078] In one embodiment, the step of causing the current encoder signal to act on the current commutation wave function in real time to generate a commutation wave signal includes:
[0079] The current Hall position signal is input into the current commutation wave function in real time to generate the commutation wave signal.
[0080] In one embodiment, performing a commutation operation on the motor based on the commutation wave signal includes:
[0081] The inverter bridge of the motor is controlled in real time to be opened or closed according to the phase-changing wave signal, so that the motor performs a phase-changing operation.
[0082] Reference Figure 5 , which is a schematic diagram of a preferred embodiment of the commutation controller of the motor of the present application.
[0083] The commutation controller of the motor includes a processor 111, a communication interface 112, a memory 113 and a communication bus 114, wherein the processor 111, the communication interface 112 and the memory 113 communicate with each other through the communication bus 114;
[0084] Memory 113, used for storing computer programs;
[0085] Figure 5Only a commutation controller for an electric machine having components 111 - 114 is shown, but it should be understood that implementation of all of the components shown is not required, and more or fewer components may alternatively be implemented.
[0086] In one embodiment of the present application, the processor 111 is used to execute the program stored in the memory 113 to implement the motor commutation method provided by any of the above method embodiments, including:
[0087] Get and parse the current encoder signal;
[0088] Allowing the current encoder signal to act on the current commutation wave function in real time to generate a commutation wave signal;
[0089] A commutation operation is performed on the motor based on the commutation wave signal.
[0090] For a detailed description of the above steps, please refer to the above Figure 1 Description of a flowchart of an embodiment of a motor commutation method.
[0091] In addition, the embodiment of the present application also proposes a computer-readable storage medium, which can be non-volatile or volatile. The computer-readable storage medium includes a data storage area and a program storage area, and the program storage area stores a motor commutation program. When the motor commutation program is executed by the processor, the following operations are implemented:
[0092] Get and parse the current encoder signal;
[0093] Allowing the current encoder signal to act on the current commutation wave function in real time to generate a commutation wave signal;
[0094] A commutation operation is performed on the motor based on the commutation wave signal.
[0095] The specific implementation of the computer-readable storage medium of the present application is substantially the same as the specific implementation of the above-mentioned motor commutation method, and will not be described in detail here.
[0096] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0097] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a general hardware platform, and of course, by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the relevant technology can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0098] It should be noted that the descriptions involving "first", "second", etc. in this application are only for descriptive purposes and cannot be understood as indicating or implying their relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In addition, the technical solutions between the various embodiments can be combined with each other, but they must be based on the ability of ordinary technicians in this field to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such combination of technical solutions does not exist and is not within the scope of protection required by this application.
[0099] It should be understood that the terms used herein are only for the purpose of describing specific example embodiments and are not intended to be limiting. Unless the context clearly indicates otherwise, the singular forms "one", "an" and "said" as used herein may also be meant to include plural forms. The terms "include", "comprise", "contain", and "have" are inclusive, and therefore specify the existence of stated features, steps, operations, elements and / or parts, but do not exclude the existence or addition of one or more other features, steps, operations, elements, parts, and / or combinations thereof. The method steps, processes, and operations described herein are not interpreted as necessarily requiring them to be performed in the specific order described or illustrated, unless the execution order is clearly indicated. It should also be understood that additional or alternative steps may be used.
[0100] The above description is only a specific implementation of the present application, so that those skilled in the art can understand or implement the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest range consistent with the principles and novel features applied for herein.
Claims
1. A motor commutation method, characterized in that: The method comprises: Get and parse the current encoder signal; Allowing the current encoder signal to act on the current commutation wave function in real time to generate a commutation wave signal; A commutation operation is performed on the motor based on the commutation wave signal.
2. The motor commutation method according to claim 1, characterized in that: The current encoder signal includes a current Hall position signal of the motor.
3. The motor commutation method according to claim 2, characterized in that: The obtaining and parsing of the current encoder signal includes: Configure the triggering conditions of the commutation interrupt; Setting the priority of the commutation interrupt to be higher than the priority of the current control loop interrupt; When the commutation interrupt event is triggered, the current encoder signal is acquired and analyzed.
4. The motor commutation method according to claim 3, characterized in that: The triggering condition of configuring the phase switching interruption includes: Through the application program of the Hall encoder of the motor, a Hall edge signal is configured to trigger a commutation interrupt, wherein the Hall edge signal includes a Hall rising edge signal and a Hall falling edge signal.
5. The motor commutation method according to claim 2, characterized in that: The step of causing the current encoder signal to act on the current commutation wave function in real time to generate a commutation wave signal includes: The current Hall position signal is input into the current commutation wave function in real time to generate the commutation wave signal.
6. The motor commutation method according to claim 2, characterized in that: The performing a commutation operation on the motor based on the commutation wave signal comprises: The inverter bridge of the motor is controlled in real time to be opened or closed according to the phase-changing wave signal, so that the motor performs a phase-changing operation.
7. A motor commutation device, characterized in that: The device comprises: Acquisition module: used to acquire and analyze the current encoder signal; Generating module: used for making the current encoder signal act on the current commutation wave function in real time to generate a commutation wave signal; Phase commutation module: used for performing phase commutation operation on the motor based on the phase commutation wave signal.
8. A motor commutation controller, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, for implementing the motor commutation method according to any one of claims 1 to 6 when executing a program stored in a memory.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the motor commutation method according to any one of claims 1 to 6 is implemented.
