Control method and device of brushless motor, electric control device and storage medium

By setting a commutation function in the electronic control device to calculate the commutation coefficient, the problem of low commutation flexibility of brushless motors is solved, and a more efficient motor control effect is achieved.

CN114696674BActive Publication Date: 2026-04-21GUANGDONG SKG INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-03
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

The commutation control of brushless motors in existing electronic control devices has low flexibility and cannot effectively adjust the commutation time at different speeds, resulting in poor commutation results.

Method used

The commutation coefficient is calculated by pre-setting the commutation function, and the electrical angle commutation time is obtained based on the duty cycle and commutation function, so as to flexibly adjust the commutation process of the brushless motor.

Benefits of technology

It improves the commutation effect of the electronic control device under different conditions, avoids the problem of inaccurate commutation time caused by differences in circuits and components, and achieves more efficient motor control.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114696674B_ABST
    Figure CN114696674B_ABST
Patent Text Reader

Abstract

The application discloses a control method and device of a brushless motor, an electric control device and a storage medium, and belongs to the technical field of circuit control. The method is applied to the electric control device and comprises the following steps: acquiring a first duty ratio, the first duty ratio being a duty ratio of a driving signal; acquiring a commutation coefficient according to the first duty ratio and a commutation function, the commutation function being used for indicating a coefficient curve between the commutation coefficient and the first duty ratio when an electric angle of the brushless motor is commutated; calculating an electric angle commutation time of the brushless motor according to the commutation coefficient; and controlling the brushless motor to be commutated according to the electric angle commutation time and an idling signal. The application can flexibly acquire the commutation coefficient under different conditions based on the duty ratio and the commutation function, so that the electric angle commutation time of the brushless motor is calculated, and the brushless motor is not required to be commutated by setting a fixed electric angle commutation time, thereby improving the effect of controlling the brushless motor to be commutated by the electric control device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of circuit control technology, and in particular to a control method, device, electronic control device, and storage medium for a brushless motor. Background Technology

[0002] With the advancement of science and technology, most electronic control devices used in daily life are equipped with brushless motors. These devices control different functions by switching between brushless motors.

[0003] Currently, most electronic control devices require precise knowledge of the motor's rotor position to control brushless motors. Only then can the central processing unit (CPU) of the electronic control device accurately control the brushless motor for commutation. Typically, electronic control devices use sensors such as Hall effect sensors and encoders to detect the motor's mechanical angle. Of course, there are also sensorless (i.e., sensorless) brushless motors.

[0004] For sensorless brushless motors, the mechanical angle is usually calculated by detecting the three back electromotive forces of the motor, and then the electrical angle is calculated. The commutation is fixed by delaying the theoretical value by 30 electrical angles. That is, the brushless motor is commutated by a fixed delay electrical angle. However, due to the different circuit designs and the different performance of each motor, there are differences in the commutation time. Commutating by a fixed delay electrical angle at different speeds has the problems of poor commutation results and low flexibility. Summary of the Invention

[0005] This application provides a control method, device, electronic control device, and storage medium for a brushless motor, which can flexibly calculate the commutation coefficient under different conditions and improve the effect of the electronic control device in controlling the brushless motor to perform commutation.

[0006] On one hand, this application provides a control method for a brushless motor. The method is applied to an electronic control device, which includes a brushless motor and a power control unit. The power control unit has a preset commutation function. When the electronic control device is working, the power control unit generates a drive signal and an idle signal. The drive signal is used to drive the brushless motor. The waveform of the drive signal is the same as the waveform of the idle signal, and the frequency of the idle signal is the same as the frequency of the drive signal. The control method includes:

[0007] Obtain the first duty cycle, which is the duty cycle of the drive signal;

[0008] The commutation coefficient is obtained based on the first duty cycle and the commutation function. The commutation function is used to indicate the coefficient curve between the commutation coefficient and the first duty cycle when the brushless motor performs commutation at the electrical angle.

[0009] The electrical angle commutation time of the brushless motor is calculated based on the commutation coefficient.

[0010] The brushless motor is controlled to commutate based on the electrical angle commutation time and the idling signal.

[0011] Optionally, before obtaining the commutation coefficient based on the first duty cycle and the commutation function, the method further includes:

[0012] Based on the first duty cycle, determine the sampling period for sampling the back electromotive force of the brushless motor;

[0013] The back electromotive force of the brushless motor is collected according to the sampling period.

[0014] After acquiring the back electromotive force of the brushless motor, it is checked whether a zero-crossing event has occurred.

[0015] If the zero-crossing event occurs, the step of obtaining the commutation coefficient based on the first duty cycle and the commutation function is executed.

[0016] Optionally, determining the sampling period for sampling the back electromotive force of the brushless motor based on the first duty cycle includes:

[0017] Based on the first duty cycle, a second duty cycle is determined, wherein the second duty cycle is the duty cycle of the idling signal;

[0018] The sampling period for sampling the back electromotive force of the brushless motor is determined based on the second duty cycle.

[0019] Optionally, determining the second duty cycle based on the first duty cycle includes:

[0020] If the first duty cycle is greater than the first preset threshold, then the second duty cycle is determined based on the first standard;

[0021] If the first duty cycle is less than or equal to the first preset threshold, then the second duty cycle is determined based on the second criterion.

[0022] Optionally, after acquiring the back electromotive force of the brushless motor, detecting whether a zero-crossing event has occurred includes:

[0023] Obtain the zero-crossing event identifier of the brushless motor;

[0024] Based on the occurrence identifier, detect whether a zero event has occurred.

[0025] Optionally, controlling the commutation of the brushless motor based on the electrical angle commutation time and the idling signal includes:

[0026] Detect whether the electrical angle commutation time has been reached;

[0027] If the desired result is achieved, the brushless motor is controlled to commutate.

[0028] If the zero-crossing event is not reached, then the step of obtaining the occurrence identifier of the zero-crossing event of the brushless motor is performed.

[0029] Optionally, before obtaining the first duty cycle, the method further includes:

[0030] Obtain the operating parameters of the electronic control device;

[0031] Adjust the operating parameters of the drive signal according to the operating parameters of the electronic control device;

[0032] The process of obtaining the first duty cycle includes:

[0033] Obtain the duty cycle corresponding to the adjusted drive signal.

[0034] Optionally, the commutation function includes a first function and a second function, and obtaining the commutation coefficient based on the first duty cycle and the commutation function includes:

[0035] If the first duty cycle is greater than the second preset threshold, then the commutation coefficient is obtained based on the first duty cycle and the first function;

[0036] If the first duty cycle is less than or equal to the second preset threshold, then the commutation coefficient is obtained based on the first duty cycle and the second function.

[0037] Optionally, calculating the electrical angle commutation time of the brushless motor based on the commutation coefficient includes:

[0038] Obtain the time difference between the last commutation time of the brushless motor and the current time;

[0039] The electrical angle commutation time of the brushless motor is determined based on the time difference and the commutation coefficient.

[0040] Optionally, before obtaining the first duty cycle, the method further includes:

[0041] Determine multiple test values;

[0042] Adjust the first duty cycle to each test value, and obtain the electrical angle commutation time corresponding to each test value;

[0043] Based on the electrical angle commutation time corresponding to each test value, determine the commutation coefficient corresponding to each test value;

[0044] The commutation function is obtained based on each test value and the commutation coefficient corresponding to each test value;

[0045] The commutation function is stored in the power control unit.

[0046] On the other hand, this application provides a control device for a brushless motor. The method is applied to an electronic control device, which includes a brushless motor and a power control unit. The power control unit has a preset commutation function. When the electronic control device is working, the power control unit generates a drive signal and an idle signal. The drive signal is used to drive the brushless motor. The waveform of the drive signal is the same as the waveform of the idle signal, and the frequency of the idle signal is the same as the frequency of the drive signal. The control device includes:

[0047] The first acquisition module is used to acquire a first duty cycle, wherein the first duty cycle is the duty cycle of the drive signal;

[0048] The second acquisition module is used to acquire the commutation coefficient based on the first duty cycle and the commutation function. The commutation function is used to indicate the coefficient curve between the commutation coefficient and the first duty cycle when the brushless motor performs commutation at the electrical angle.

[0049] The first calculation module is used to calculate the electrical angle commutation time of the brushless motor based on the commutation coefficient.

[0050] The steering control module is used to control the commutation of the brushless motor according to the electrical angle commutation time and the idling signal.

[0051] On the other hand, embodiments of this application provide an electronic control device, which includes a memory and a processor. The memory stores a computer program, and when the computer program is executed by the processor, the processor enables the processor to implement the brushless motor control method as described in one aspect above.

[0052] On the other hand, embodiments of this application provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the brushless motor control method as described in one aspect above.

[0053] On the other hand, embodiments of this application provide a computer program product that, when run on a computer, causes the computer to execute the brushless motor control method as described in one aspect above.

[0054] On the other hand, embodiments of this application provide an application publishing platform for publishing computer program products, wherein when the computer program product is run on a computer, the computer executes the brushless motor control method as described in one aspect above.

[0055] The technical solutions provided in this application embodiment may include at least the following beneficial effects:

[0056] The electronic control device provided in this application obtains a first duty cycle, which is the duty cycle of the drive signal; obtains a commutation coefficient based on the first duty cycle and a commutation function, where the commutation function indicates the coefficient curve between the commutation coefficient and the first duty cycle when the brushless motor performs commutation at its electrical angle; calculates the electrical angle commutation time of the brushless motor based on the commutation coefficient; and controls the commutation of the brushless motor based on the electrical angle commutation time and the idle signal. This application can flexibly obtain the commutation coefficient under different conditions based on the duty cycle and the commutation function, thereby calculating the electrical angle commutation time of the brushless motor without needing to set a fixed electrical angle commutation time, thus improving the effectiveness of the electronic control device in controlling the commutation of the brushless motor. Attached Figure Description

[0057] Figure 1 This is a flowchart of a brushless motor control method provided in an exemplary embodiment of this application;

[0058] Figure 2 This is a flowchart of a brushless motor control method provided in an exemplary embodiment of this application;

[0059] Figure 3 This is a schematic diagram of the structure of an electronic control device according to an exemplary embodiment of this application;

[0060] Figure 4 This is a schematic diagram of a circuit structure for driving a brushless motor according to an exemplary embodiment of this application;

[0061] Figure 5 This is a structural block diagram of a brushless motor control device provided in an exemplary embodiment of this application;

[0062] Figure 6 This is a schematic diagram of the structure of an electronic control device disclosed in an exemplary embodiment of this application. Detailed Implementation

[0063] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0064] In this article, "multiple" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. The character " / " generally indicates that the preceding and following related objects have an "or" relationship.

[0065] The solution provided in this application can be used in real-world scenarios where people use electronic control devices in their daily lives to control the brushless motor contained within them. To facilitate understanding, some terms and application scenarios involved in the embodiments of this application will be briefly introduced below.

[0066] A brushless direct current motor (BLDC) consists of a motor body and a driver, and is a typical mechatronic product. A brushless motor refers to a motor without brushes and a commutator (or slip rings), also known as a commutatorless motor.

[0067] Electric angle: the angle of rotation of a magnetic field.

[0068] Mechanical angle: The rotation angle of the motor rotor.

[0069] Brushless motors, named for their absence of brushes and commutators, consist of a motor body and a driver, making them a typical mechatronic product. As a relatively new product in the motor industry, although they have only been in China for a short time and are more expensive than brushed motors, their significant advantages have led to their rapid expansion into various industries, making them a rising star in the motor sector and ushering in the brushless era.

[0070] With the widespread adoption of microcontrollers, their costs have decreased significantly, accelerating the widespread application of brushless motors. Compared to traditional brushed DC motors, brushless motors eliminate mechanical commutation and use electronic commutation, fundamentally solving the problem of short lifespan caused by brush failure. At the same time, brushless motors are quieter and have greater torque. Currently, brushless motors have found good applications in industrial robots, drones, electric vehicles, machine tools, compressors, and other products.

[0071] In summary, brushless DC motors are characterized by their small size, light weight, long lifespan, high efficiency, low noise, low vibration, spark-free operation, high reliability, good stability, strong adaptability, and simple maintenance. Thanks to their superior performance, brushless DC motors are increasingly being used in the manufacture of home appliances and luxury cars. Consequently, countries around the world are accelerating the development of brushless motor products and increasing their market share. Many Japanese companies have successfully applied brushless DC motors to digital cameras, miniature recorders, camcorders, printers, mobile storage devices, mobile phones, as well as automotive air conditioners, vacuum cleaners, electric vehicles, and heart pumps.

[0072] Today, brushless DC motors can completely replace DC motor speed control, as well as inverter-driven speed control and asynchronous motor-driven speed control. They eliminate the carbon brushes and slip rings, combining all the advantages of traditional brushed motors, resulting in excellent torque characteristics. They offer good torque performance at low and medium speeds, high starting torque, low starting current, stepless speed regulation, a wide speed range, and strong overload capacity. Furthermore, while the lifespan of a conventional brushed DC motor is approximately 10,000 hours, the lifespan of a brushless DC motor is several times longer.

[0073] Furthermore, since brushless DC motors inherently lack excitation and carbon brush losses, eliminating multi-stage reduction losses, the overall energy saving rate can reach 20% to 60%. The price difference compared to ordinary motors can be recovered within a year solely through energy savings. Moreover, the government has been advocating energy conservation and environmental protection in recent years, making brushless DC motors undoubtedly the future development trend of the motor industry.

[0074] Currently, most electronic control devices require precise knowledge of the rotor position to control brushless motors. Only then can the central processing unit (CPU) of the control device accurately control the brushless motor for commutation. Typically, control devices use sensors such as Hall effect sensors and encoders to detect the motor's mechanical angle. For sensorless brushless motors, the mechanical angle is calculated by detecting the motor's three back electromotive forces, and then the electrical angle is calculated and fixed with a 30-degree electrical delay based on the theoretical value. In this approach, the control device usually uses a fixed electrical delay angle for commutation. However, in practical applications, due to differences in circuit design and motor performance, commutation times vary. Using a fixed electrical delay angle for commutation at different speeds results in poor commutation performance and low flexibility.

[0075] To avoid the problems existing in the above technical solutions, this application provides a brushless motor control method that flexibly calculates the commutation coefficient under different conditions to improve the commutation effect of the electronic control device. This method calculates the commutation coefficient by pre-setting a commutation function, thereby calculating the corresponding electrical angle commutation time. Different commutation coefficients are used in different scenarios, achieving flexible calculation of the commutation coefficient and improving the commutation effect of the electronic control device.

[0076] Please refer to Figure 1 This document illustrates a flowchart of a brushless motor control method according to an exemplary embodiment of this application. This method can be used in the aforementioned scenario architecture and is executed by an electronic control device that includes a brushless motor. The electronic control device includes the brushless motor and a power control unit. The power control unit has a preset commutation function. When the electronic control device is working, the power control unit generates a drive signal and an idle signal. The drive signal is used to drive the brushless motor. The waveform of the drive signal is the same as the waveform of the idle signal, and the frequency of the idle signal is the same as the frequency of the drive signal. Figure 1 As shown, the control method for this brushless motor may include the following steps.

[0077] Step 101: Obtain the first duty cycle, which is the duty cycle of the drive signal.

[0078] The CPU of the electronic control unit can obtain the duty cycle of the drive signal when the brushless motor is working. Optionally, the CPU of the electronic control unit can be an MCU. When the brushless motor is working, the electronic control unit can control the MOS full-bridge circuit to work through the MCU, so that the MOS full-bridge circuit acts as the drive circuit for the brushless motor, thereby supplying power to the brushless motor.

[0079] Optionally, the MCU of the electronic control device can obtain the duty cycle of the drive signal when the brushless motor is working by essentially obtaining the duty cycle of the output signal of the MCU to the MOS full-bridge circuit. For example, the electronic control device controls the MOS full-bridge circuit to work by providing a PWM waveform signal through the MCU, so that the MOS full-bridge circuit drives the brushless motor. Here, the duty cycle of the PWM waveform signal can be obtained.

[0080] Step 102: Obtain the commutation coefficient based on the first duty cycle and the commutation function. The commutation function is used to indicate the coefficient curve between the commutation coefficient and the first duty cycle when the brushless motor performs commutation at the electrical angle.

[0081] The commutation function is derived from a table of optimal commutation times and duty cycles obtained through experiments by the developers. The optimal commutation times at each point are then fitted into a coefficient curve, reflecting the relationship between commutation time and duty cycle. Optionally, the MCU of the electronic control unit calculates the commutation coefficient using the obtained duty cycle and the pre-set commutation function.

[0082] Step 103: Calculate the electrical angle commutation time of the brushless motor based on the commutation coefficient.

[0083] Optionally, the MCU of the electronic control device can calculate the electrical angle commutation time of the brushless motor based on the commutation coefficient.

[0084] Step 104: Control the brushless motor to commutate according to the electrical angle commutation time and idling signal.

[0085] Optionally, the MCU of the electronic control device controls the brushless motor to commutate when the electrical angle commutation time is reached. For example, the timing starts after the last commutation ends, and when the calculated electrical angle commutation time is reached, the brushless motor is commutated again, thus enabling the brushless motor to commutate.

[0086] In summary, the electronic control device provided in this application obtains a first duty cycle, which is the duty cycle of the drive signal; obtains a commutation coefficient based on the first duty cycle and a commutation function, where the commutation function indicates the coefficient curve between the commutation coefficient and the first duty cycle when the brushless motor performs commutation at its electrical angle; calculates the electrical angle commutation time of the brushless motor based on the commutation coefficient; and controls the commutation of the brushless motor based on the electrical angle commutation time and the idle signal. This application can flexibly obtain the commutation coefficient under different conditions based on the duty cycle and the commutation function, thereby calculating the electrical angle commutation time of the brushless motor without needing to set a fixed electrical angle commutation time, thus improving the effectiveness of the electronic control device in controlling the commutation of the brushless motor.

[0087] In one possible implementation, the electronic control device can configure the power supply circuit for the drive signal when the brushless motor is working as a comparison interrupt circuit. That is, the output port of the MOS full-bridge circuit that supplies power to the brushless motor is initialized as a comparison interrupt port, thereby determining the commutation function according to the comparison interrupt method, and improving the effect of the electronic control device in controlling the brushless motor to perform commutation.

[0088] Please refer to Figure 2 This document illustrates a flowchart of a brushless motor control method according to an exemplary embodiment of this application. This method can be used in the aforementioned scenario architecture and executed by an electronic control device that includes a brushless motor in that scenario, such as... Figure 2 As shown, the control method for this brushless motor may include the following steps.

[0089] Step 201: Start the timer in the electronic control device to provide a drive signal to the brushless motor.

[0090] When the electronic control device starts, it can first start a timer to complete the startup process of each circuit. After the electronic control device starts, it supplies power to the brushless motor through a MOS full-bridge circuit.

[0091] Please refer to Figure 3 This illustrates a schematic diagram of the structure of an electronic control device according to an exemplary embodiment of this application. Figure 3 As shown, it includes an MCU module 301, a MOS full-bridge module 302, and a brushless motor (MT) module 303. The MCU module 301 acts as a controller to process some control logic and detect feedback signals from the motor to perform related control calculations. It controls the on / off state of the MOS full-bridge by outputting six PWM waveforms through its internal timer.

[0092] The MOS full-bridge module 302 is a motor drive circuit composed of 6 MOSFETs and transistors. Its control pin can turn on the high-voltage, high-current terminal when it receives the control signal from the microcontroller. Each phase is composed of a set of MOSFETs, divided into upper and lower MOSFETs. The upper and lower MOSFETs will not be turned on at the same time. Each phase has the same hardware design. This circuit generates an alternating three-phase DC current to drive the motor.

[0093] The MT module 303, or brushless motor, typically consists of a rotor made of magnets and a stator made of coils. Under three-phase DC power, the coils are energized in pairs to generate a magnetic field that can drive the rotor to rotate. When driven in a certain pattern, it produces a continuous rotation effect.

[0094] Please refer to Figure 4 This illustration shows a schematic diagram of a circuit structure for driving a brushless motor according to an exemplary embodiment of this application. Figure 4 As shown, the module includes an MCU module 401, a MOS full-bridge module 402, and an MT module 403. The MCU module 401 includes six signal output ports and three detection ports: first output port 401a, second output port 401b, third output port 401c, fourth output port 401d, fifth output port 401e, sixth output port 401f, first detection port 401g, second detection port 401h, and third detection port 401i. The MOS full-bridge module 402 includes a first MOS transistor group 402a, a second MOS transistor group 402b, and a third MOS transistor group 402c. The MT module 403 includes three input ports: first input port 403a, second input port 403b, and third input port 403c.

[0095] like Figure 4 As shown, the MCU module 401 contains 6 signal output ports, which are electrically connected to the 6 MOS transistors of the MOS full-bridge module 402. The 6 MOS transistors of the MOS full-bridge module 402 are electrically connected to the three input ports of the MT module 403 in a group. The MCU module 401 contains 3 detection ports, which are also electrically connected to the three input ports of the MT module 403.

[0096] Optionally, the MCU in the electronic control device, according to the above structure, outputs PWM waveform signals through 6 signal output ports to drive the MOS full-bridge circuit to work, thereby driving the brushless motor.

[0097] Step 202: Obtain the operating parameters of the electronic control device.

[0098] Optionally, the MCU in the electronic control device can obtain the current operating parameters of the brushless motor before the brushless motor executes the steps of this solution or during its own operation. These operating parameters can be any one or more of the parameters of the electronic control device, such as running time, number of rotations, and aging degree. Optionally, the power supply circuit of the drive signal when the brushless motor is working can be configured as a comparison interrupt circuit.

[0099] Optionally, in this application, the electronic control device can configure the power supply circuit for the drive signal of the brushless motor as a comparison interrupt circuit when starting the brushless motor, that is, to configure the aforementioned... Figure 4 The MCU module 401 has six signal output ports configured for compare-interrupt mode. For example, when the brushless motor is working, the MCU generates four PWM waveform signals, and the electronic control device can configure the fourth signal as a compare-interrupt.

[0100] Step 203: Adjust the operating parameters of the drive signal according to the operating parameters of the electronic control device.

[0101] Optionally, after obtaining the operating parameters, the operating parameters of the drive signal can be adjusted based on these parameters. These operating parameters can be any one or more of signal strength, signal period, signal frequency, etc. That is, the electronic control device can adjust the operating parameters of the drive signal based on these operating parameters, thereby indirectly adjusting the duty cycle of the drive signal when the brushless motor is operating. For example, after starting the timer, the MCU of the electronic control device outputs a start-up voltage signal. This start-up voltage signal needs adjustment, and the MCU adjusts the drive signal of the brushless motor to the normal operating voltage. Optionally, different motors have different normal operating voltages. The electronic control device adjusts the start-up voltage to the normal operating voltage according to actual needs, and correspondingly adjusts the duty cycle of the drive signal when the brushless motor starts to the normal operating duty cycle.

[0102] Step 204: Obtain the first duty cycle, which is the duty cycle of the drive signal.

[0103] Optionally, the MCU of the electronic control device can obtain the duty cycle of the adjusted drive signal.

[0104] Step 205: Determine the second duty cycle based on the first duty cycle. The second duty cycle is the duty cycle of the idling signal.

[0105] In one possible implementation, the second duty cycle is determined based on the first duty cycle as follows: if the first duty cycle is greater than a first preset threshold, the second duty cycle is determined based on a first standard; if the first duty cycle is less than or equal to the first preset threshold, the second duty cycle is determined based on a second standard. That is, after the MCU of the electronic control device obtains the first duty cycle, it can compare the first duty cycle with the first preset threshold. When the first duty cycle is greater than the first preset threshold, the duty cycle of the idling signal is determined based on the first standard; when the first duty cycle is not greater than the first preset threshold, the duty cycle of the idling signal is determined based on the second standard.

[0106] For example, if the first preset threshold is 40%, and the first duty cycle obtained by the electronic control device is 30%, then the first duty cycle is not greater than the first preset threshold. The electronic control device calculates the duty cycle of the idling signal (i.e., the first standard) according to the first formula, which is as follows: (duty / 2)*ARR, where duty is the obtained first duty cycle and ARR is an empirical constant. If the first duty cycle obtained by the electronic control device is 50%, then the first duty cycle is greater than the first preset threshold. The electronic control device calculates the duty cycle of the idling signal (i.e., the second standard) according to the second formula, which is as follows: (0.5+duty / 2)*ARR, where duty is the obtained first duty cycle and ARR is an empirical constant.

[0107] Step 206: Determine the sampling period of the back electromotive force of the brushless motor based on the second duty cycle.

[0108] In one possible implementation, the electronic control device can determine the sampling period of the brushless motor's back electromotive force (EMF) based on the duty cycle of the idling signal obtained above. For example, the electronic control device can obtain the number of sampling periods of the brushless motor's back EMF within a second duty cycle. The initial value of the number of sampling periods of the brushless motor's back EMF can be 0. In this step, to allow sufficient sampling time for the brushless motor's back EMF and to account for the delay caused by the MOSFET, sampling should be performed at an optimal time. This optimal time is the midpoint of the high interval of the voltage signal at a lower duty cycle and the midpoint of the low interval of the voltage signal at a larger duty cycle.

[0109] That is, after the MCU determines the number of sampling periods for the back EMF of the brushless motor based on the second duty cycle, the back EMF sampling module is started in this step, and the back EMF of the MT is sampled through the three detection ports of the MCU module.

[0110] Step 207: Collect the back electromotive force of the brushless motor according to the sampling period.

[0111] In this process, when the sampling period is reached, the MCU generates a trigger signal to collect the back electromotive force (EMF). Optionally, the sampling trigger signal is generated when the idle signal changes from low to high or from high to low. Alternatively, corresponding to the method of determining the second duty cycle mentioned above, if the first duty cycle is greater than the first preset threshold, the second duty cycle is determined based on the first standard. In this step, when the sampling period is reached, the back EMF corresponding to the preset region in the high level of the drive signal is collected. If the first duty cycle is less than or equal to the first preset threshold, the second duty cycle is determined based on the second standard. In this step, when the sampling period is reached, the back EMF corresponding to the preset region in the low level of the drive signal is collected.

[0112] Optionally, the electronic control device determines the sampling time for the back electromotive force of the brushless motor based on the number of acquired cycles. For example, the number of cycles is represented by Current_Tick. When the number of cycles is 2, the sampling is performed according to the duration of 2 cycles, meaning the sampling time is the time after 2 cycles. Optionally, this sampling method can use an analog-to-digital converter (ADC) for sampling. Alternatively, the electronic control device can also use other detection sensors to acquire the back electromotive force, such as Hall elements, encoders, code disks, gratings, etc., to obtain the rotor position and achieve better position detection accuracy.

[0113] Optionally, the electronic control device acquires the back electromotive force (EMF) of the brushless motor according to the sampling time obtained above. When the sampling time is reached, the MCU module of the electronic control device begins to sample the back EMF of the MT through the above three detection ports.

[0114] Step 208: After acquiring the back electromotive force of the brushless motor, obtain the zero-crossing event identifier of the brushless motor.

[0115] Optionally, if the electronic control device detects the back electromotive force (EMF) of the brushless motor, it can continue to acquire the zero-crossing event flag of the brushless motor. If the electronic control device fails to detect the back EMF of the brushless motor, it can wait for the next acquisition time to arrive before continuing to acquire the back EMF of the brushless motor. The electronic control device internally sets an event flag for the zero-crossing event, indicating whether a zero-crossing event has occurred. For example, if no zero-crossing event has occurred, the flag is 0; if a zero-crossing event has occurred, the flag can change to 1.

[0116] Step 209: When an indicator shows that the brushless motor has not crossed zero, wait for a first preset time and detect the zero-crossing event of the brushless motor.

[0117] Optionally, in this embodiment, the step of the electronic control device detecting whether a zero-crossing event has occurred based on the occurrence identifier is divided into steps 209 and 210.

[0118] In step 209, when the electronic control device learns from the aforementioned occurrence indicator that the brushless motor has not experienced a zero-crossing event, it can wait for a first preset time period before continuing to detect whether a zero-crossing event has occurred. This first preset time period is equal to the freewheeling delay caused by the MOSFET in the MOS full-bridge circuit. That is, after the MCU of the electronic control device detects a zero-crossing event, it avoids the freewheeling delay of the diode in the MOSFET and re-detects the zero-crossing event of the brushless motor.

[0119] Step 210: When a zero-crossing event is detected, obtain the commutation coefficient based on the first duty cycle and the commutation function.

[0120] Optionally, the commutation function includes a first function and a second function. The electronic control device (ECU) obtains the commutation coefficient based on the first duty cycle and the commutation function as follows: The ECU determines the corresponding commutation function based on the first duty cycle and a second preset threshold. For example, when the ECU learns from the aforementioned occurrence indicator that the brushless motor has experienced a zero-crossing event, it can determine the commutation function based on the first duty cycle and the second preset threshold. The process by which the MCU of the ECU determines the commutation function can be as follows: The first duty cycle is compared with the second preset threshold. If the obtained first duty cycle is greater than the second preset threshold, the determined commutation function is function one; if the obtained first duty cycle is not greater than the second preset threshold, the determined commutation function is function two, thus determining the commutation function under different conditions. For example, function one could be: K = 0.7 - (duty - 0.4), and function two could be K = 0.7. Here, K is the commutation coefficient, and duty is the first duty cycle. That is, if the obtained first duty cycle is greater than the second preset threshold, the determined commutation function is K = 0.7 - (duty - 0.4), and if the obtained first duty cycle is not greater than the second preset threshold, the determined commutation function is K = 0.7.

[0121] Optionally, the number of commutation functions mentioned above is determined by the developers through testing. This application does not limit this. For example, multiple test values ​​are determined; the first duty cycle is adjusted to each test value, and the electrical angle commutation time corresponding to each test value is obtained; based on the electrical angle commutation time corresponding to each test value, the commutation coefficient corresponding to each test value is determined; based on each test value and the commutation coefficient corresponding to each test value, the commutation function is obtained; and the commutation function is stored in the power control unit.

[0122] Optionally, the electronic control device can calculate the commutation coefficient by substituting the duty cycle into the commutation function obtained above.

[0123] Step 211: Calculate the electrical angle commutation time of the brushless motor based on the commutation coefficient.

[0124] Optionally, after obtaining the commutation coefficient, the electronic control device uses this commutation coefficient to calculate the electrical angle commutation time of the brushless motor. In one possible implementation, the time difference between the last commutation time of the brushless motor and the current time is obtained; based on the time difference and the commutation coefficient, the electrical angle commutation time of the brushless motor is calculated. That is, the electronic control device can obtain the time of each electrical angle commutation of the brushless motor through the aforementioned timer, use this time and the current time to obtain the time difference, and multiply the time difference by the commutation coefficient to calculate the electrical angle commutation time of the brushless motor. That is, the time difference between the last commutation time of the brushless motor and the current time, Tick_offset = current time, Current_Current - last commutation time, Old_Tick, and the electronic control device obtains the electrical angle commutation time, Delay_Tick, of the brushless motor by Tick_offset*K.

[0125] Step 212: Control the brushless motor to commutate according to the electrical angle commutation time and idling signal.

[0126] Optionally, the MCU of the electronic control device can detect whether the electrical angle commutation time has been reached; if it has been reached, the brushless motor is controlled to commutate; if it has not been reached, the step of obtaining the occurrence flag of the zero-crossing event of the brushless motor is executed, that is, returning to step 207.

[0127] Optionally, the MCU of the electronic control device controls the brushless motor to commutate when the electrical angle commutation time is reached. For example, the timing starts after the last commutation ends, and when the calculated electrical angle commutation time is reached, the brushless motor is commutated again, thus enabling the brushless motor to commutate. Optionally, after this step, the zero-crossing event flag can be adjusted to indicate that a zero-crossing event has occurred.

[0128] Step 213: When the flag indicates that the brushless motor has experienced a zero-crossing event, check whether the commutation delay of the brushless motor has been reached.

[0129] Optionally, when the flag bit obtained by the electronic control device indicates that the brushless motor has experienced a zero-crossing event, it can detect whether the commutation delay of the brushless motor has been reached. If the commutation delay has been reached, it means that the commutation delay has been obtained, and the brushless motor can be controlled to commutate, thus executing step 213. If the commutation delay has not been reached, it means that the commutation delay has not been reached, and the MCU needs to continue sampling the back momentum, i.e., executing step 214.

[0130] Step 214: If the commutation delay of the brushless motor is reached, control the brushless motor to commutate.

[0131] Optionally, after the electronic control device controls the brushless motor to commutate, the time of the last commutation of the brushless motor can be updated to the current time, and the current time can be used as the starting time (for example, the current time can be cleared to zero). The zero-crossing event flag can be updated to indicate that the brushless motor has not experienced a zero-crossing event, and the process of collecting the reaction force can continue.

[0132] If the commutation delay of the brushless motor is not reached, the step of collecting the back electromotive force of the brushless motor according to the sampling time is executed again, that is, returning to step 208.

[0133] Optionally, the electronic control device can also reset the commutation delay of the brushless motor, or wait for the commutation delay of the brushless motor and re-execute the step of collecting the back electromotive force of the brushless motor according to the sampling time.

[0134] It should be noted that the aforementioned electronic control device can be any type of electronic control device that includes a brushless motor. For example, the electronic control device can be a fascia gun. In a fascia gun, the controller and motor drive board are integrated into a single design. After measuring the motor's performance parameters, the commutation curve is obtained through experiments, and the optimal driving effect is achieved through program design. Similarly, in other fascia guns and similar products, after replacing the motor, only the commutation coefficient curve needs to be obtained. After changing the relevant curve functions and other parameters in the program, the machine can quickly achieve the optimal effect. Alternatively, the electronic control device can be an electric vehicle. In electric vehicles, the brushless motor is also the main drive unit. The electric vehicle uses the rotation of the brushless motor as a power source to drive the reducer to increase torque and thus drive the tires to rotate. The application of brushless motors in electric vehicles requires driving larger loads, and as a passenger-carrying product, it needs to have better smoothness during operation. For different models of electric vehicles with different loads, the characteristics of the brushless motor can be specifically adjusted to achieve better results, while obtaining larger loads and higher efficiency at a certain power.

[0135] In summary, the electronic control device provided in this application obtains a first duty cycle, which is the duty cycle of the drive signal; obtains a commutation coefficient based on the first duty cycle and a commutation function, where the commutation function indicates the coefficient curve between the commutation coefficient and the first duty cycle when the brushless motor performs commutation at its electrical angle; calculates the electrical angle commutation time of the brushless motor based on the commutation coefficient; and controls the commutation of the brushless motor based on the electrical angle commutation time and the idle signal. This application can flexibly obtain the commutation coefficient under different conditions based on the duty cycle and the commutation function, thereby calculating the electrical angle commutation time of the brushless motor without needing to set a fixed electrical angle commutation time, thus improving the effectiveness of the electronic control device in controlling the commutation of the brushless motor.

[0136] Furthermore, the commutation function obtained through experiments, and the electrical angle commutation time of the brushless motor obtained through the commutation function, can avoid the discrepancy between actual results and theoretical values ​​caused by differences in circuitry and components. The actual experimental parameters will better match the real-world application scenario. Simultaneously, segmented sampling with high and low duty cycles improves sampling accuracy. Measuring the motor's rotation effect experimentally to obtain the commutation coefficient further enhances the precision and efficiency of motor commutation.

[0137] The following are embodiments of the apparatus described in this application, which can be used to execute the embodiments of the method described in this application. For details not disclosed in the apparatus embodiments of this application, please refer to the embodiments of the method described in this application.

[0138] Please refer to Figure 5 This illustration shows a structural block diagram of a brushless motor control device provided in an exemplary embodiment of this application. The brushless motor control device 500 can be used in an electronic control device that includes a brushless motor to perform... Figure 1 or Figure 2 The method provided in the illustrated embodiment includes all or part of the steps performed by an electronic control device. The electronic control device includes a brushless motor and a power control unit. The power control unit has a preset commutation function. When the electronic control device is working, the power control unit generates a drive signal and an idle signal. The drive signal is used to drive the brushless motor. The waveform of the drive signal is the same as the waveform of the idle signal, and the frequency of the idle signal is the same as the frequency of the drive signal. The control device 500 for the brushless motor may include the following modules:

[0139] The first acquisition module 501 is used to acquire a first duty cycle, wherein the first duty cycle is the duty cycle of the drive signal;

[0140] The second acquisition module 502 is used to acquire the commutation coefficient based on the first duty cycle and the commutation function. The commutation function is used to indicate the coefficient curve between the commutation coefficient and the first duty cycle when the brushless motor performs commutation at the electrical angle.

[0141] The first calculation module 503 is used to calculate the electrical angle commutation time of the brushless motor based on the commutation coefficient.

[0142] The steering control module 504 is used to control the commutation of the brushless motor according to the electrical angle commutation time and the idling signal.

[0143] In summary, the electronic control device provided in this application obtains a first duty cycle, which is the duty cycle of the drive signal; obtains a commutation coefficient based on the first duty cycle and a commutation function, where the commutation function indicates the coefficient curve between the commutation coefficient and the first duty cycle when the brushless motor performs commutation at its electrical angle; calculates the electrical angle commutation time of the brushless motor based on the commutation coefficient; and controls the commutation of the brushless motor based on the electrical angle commutation time and the idle signal. This application can flexibly obtain the commutation coefficient under different conditions based on the duty cycle and the commutation function, thereby calculating the electrical angle commutation time of the brushless motor without needing to set a fixed electrical angle commutation time, thus improving the effectiveness of the electronic control device in controlling the commutation of the brushless motor.

[0144] Optionally, the device further includes:

[0145] The first determining module is used to determine the sampling period for sampling the back electromotive force of the brushless motor based on the first duty cycle before obtaining the commutation coefficient based on the first duty cycle and the commutation function.

[0146] The first acquisition module is used to acquire the back electromotive force of the brushless motor according to the sampling period;

[0147] The first detection module is used to detect whether a zero-crossing event has occurred after the back electromotive force of the brushless motor is collected.

[0148] The first execution module is configured to, if the zero-crossing event occurs, execute the step of obtaining the commutation coefficient based on the first duty cycle and the commutation function.

[0149] Optionally, the first determining module includes: a first determining unit and a second determining unit;

[0150] The first determining unit is configured to determine a second duty cycle based on the first duty cycle, wherein the second duty cycle is the duty cycle of the idling signal;

[0151] The second determining unit is used to determine the sampling period for sampling the back electromotive force of the brushless motor based on the second duty cycle.

[0152] Optionally, the first determining unit is used for:

[0153] If the first duty cycle is greater than the first preset threshold, then the second duty cycle is determined based on the first standard;

[0154] If the first duty cycle is less than or equal to the first preset threshold, then the second duty cycle is determined based on the second criterion.

[0155] Optionally, the first detection module is used for:

[0156] Obtain the zero-crossing event identifier of the brushless motor;

[0157] Based on the occurrence identifier, detect whether a zero event has occurred.

[0158] Optionally, the commutation control module includes: a second detection unit, a first control unit, and a first execution unit;

[0159] The second detection unit is used to detect whether the electrical angle commutation time has been reached;

[0160] The first control unit is configured to control the brushless motor to commutate if the desired direction is achieved.

[0161] The first execution unit is configured to perform the step of obtaining the occurrence identifier of the zero-crossing event of the brushless motor if the zero-crossing event is not reached.

[0162] Optionally, the device further includes:

[0163] The third acquisition module is used to acquire the operating parameters of the electronic control device before acquiring the first duty cycle;

[0164] The first adjustment module is used to adjust the operating parameters of the drive signal according to the operating parameters of the electronic control device;

[0165] The first acquisition module is used to acquire the duty cycle corresponding to the adjusted drive signal.

[0166] Optionally, the second acquisition module includes: a first acquisition unit and a second acquisition unit;

[0167] The first acquisition unit is configured to acquire the commutation coefficient based on the first duty cycle and the first function if the first duty cycle is greater than the second preset threshold.

[0168] The second acquisition unit is used to acquire the commutation coefficient based on the first duty cycle and the second function if the first duty cycle is less than or equal to the second preset threshold.

[0169] Optionally, the first calculation module includes: a third acquisition unit and a third determination unit;

[0170] The third acquisition unit is used to acquire the time difference between the time of the last commutation of the brushless motor and the current time.

[0171] The third determining unit is used to determine the electrical angle commutation time of the brushless motor based on the time difference and the commutation coefficient.

[0172] Optionally, the device further includes:

[0173] The second determining module is used to determine multiple test values ​​before the first duty cycle is obtained;

[0174] The fourth acquisition module is used to adjust the first duty cycle to each test value and acquire the electrical angle commutation time corresponding to each test value;

[0175] The third determining module is used to determine the commutation coefficient corresponding to each test value based on the electrical angle commutation time corresponding to each test value.

[0176] The fifth acquisition module is used to acquire the commutation function based on each test value and the commutation coefficient corresponding to each test value;

[0177] The first storage module is used to store the commutation function in the power control unit.

[0178] Please refer to Figure 6 This illustration shows a schematic diagram of the structure of an electronic control device disclosed in an exemplary embodiment of this application. Figure 6 As shown, in addition to a brushless motor and a MOS full-bridge circuit, the electronic control device may also include: a radio frequency (RF) circuit 610, a memory 620, an input unit 630, a display unit 640, a sensor 650, an audio circuit 660, a WiFi module 670, a processor 680, and a power supply 690, among other components. In the above embodiment, this electronic control device can be used as a massage device or simply as an electronic control device. Those skilled in the art will understand that... Figure 6 The structure of the electronic control device shown does not constitute a limitation on the electronic control device, and may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0179] The following is combined with Figure 6 The components of the electronic control device are described below:

[0180] RF circuit 610 can be used for receiving and transmitting signals during information transmission or calls. Specifically, it receives downlink information from the base station and processes it with processor 680; additionally, it transmits uplink data to the base station. Typically, RF circuit 610 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low-noise amplifier (LNA), a duplexer, etc. Furthermore, RF circuit 610 can also communicate wirelessly with networks and other devices. The aforementioned wireless communication can use any communication standard or protocol, including but not limited to Global System for Mobile Communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), email, Short Messaging Service (SMS), etc.

[0181] The memory 620 can be used to store software programs and modules. The processor 680 executes various functional applications and data processing of the electronic control device by running the software programs and modules stored in the memory 620. The memory 620 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, application programs required for at least one function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the electronic control device (such as audio data, telephone directory, etc.). In addition, the memory 620 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device.

[0182] The input unit 630 can be used to receive input digital or character information, and to generate key signal inputs related to user settings and function control of the electronic control device. Specifically, the input unit 630 may include a touch panel 631 and other input devices 632. The touch panel 631, also known as a touch screen, can collect touch operations performed by the user on or near it (such as operations performed by the user using a finger, stylus, or any suitable object or accessory on or near the touch panel 631), and drive the corresponding connected devices according to a pre-set program. Optionally, the touch panel 631 may include two parts: a touch detection device and a touch controller. The touch detection device detects the user's touch position and the signal generated by the touch operation, and transmits the signal to the touch controller; the touch controller receives touch information from the touch detection device, converts it into touch point coordinates, sends it to the processor 680, and can receive and execute commands sent by the processor 680. In addition, the touch panel 631 can be implemented using various types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch panel 631, the input unit 630 may also include other input devices 632. Specifically, other input devices 632 may include, but are not limited to, one or more of the following: physical keyboard, function keys (such as volume control buttons, power buttons, etc.), trackball, mouse, joystick, etc.

[0183] The display unit 640 can be used to display information input by the user or information provided to the user, as well as various menus of the electronic control device. The display unit 640 may include a display panel 641, which may optionally be configured as a Liquid Crystal Display (LCD), Organic Light-Emitting Diode (OLED), or similar display panel. Furthermore, a touch panel 631 may cover the display panel 641. When the touch panel 631 detects a touch operation on or near it, it transmits the information to the processor 680 to determine the type of touch event. Subsequently, the processor 680 provides corresponding visual output on the display panel 641 based on the type of touch event. Although in Figure 6 In this embodiment, the touch panel 631 and the display panel 641 are two separate components to realize the input and output functions of the electronic control device. However, in some embodiments, the touch panel 631 and the display panel 641 can be integrated to realize the input and output functions of the electronic control device.

[0184] The electronic control device may also include at least one sensor 650, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor. The ambient light sensor can adjust the brightness of the display panel 641 according to the ambient light level, and the proximity sensor can turn off the display panel 641 and / or backlight when the electronic control device is moved to the ear. As a type of motion sensor, an accelerometer sensor can detect the magnitude of acceleration in various directions (generally three axes). When stationary, it can detect the magnitude and direction of gravity and can be used for applications that identify the posture of the electronic control device (such as landscape / portrait switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), etc. Other sensors that may be configured in the electronic control device, such as gyroscopes, barometers, hygrometers, thermometers, and infrared sensors, will not be described in detail here.

[0185] Audio circuit 660, speaker 661, and microphone 662 provide an audio interface between the user and the electronic control device. Audio circuit 650 converts received audio data into electrical signals and transmits them to speaker 661, where speaker 661 converts them into sound signals for output. On the other hand, microphone 662 converts collected sound signals into electrical signals, which are received by audio circuit 660, converted into audio data, and then processed by processor 680 before being sent via RF circuit 610 to, for example, another electronic control device, or output to memory 620 for further processing.

[0186] WiFi is a short-range wireless transmission technology. The electronic control device, through the WiFi module 670, can help users send and receive emails, browse web pages, and access streaming media, providing users with wireless broadband internet access. Although Figure 6 WiFi module 670 is shown, but it is understood that it is not a necessary component of the electronic control device and can be omitted as needed without changing the nature of the invention.

[0187] The processor 680 is the control center of the electronic control device. It connects various parts of the device via various interfaces and lines, and performs various functions and processes data by running or executing software programs and / or modules stored in the memory 620, and by calling data stored in the memory 620, thereby providing overall monitoring of the electronic control device. Optionally, the processor 680 may include one or more processing units; preferably, the processor 680 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and applications, and the modem processor mainly handles wireless communication. It is understood that the modem processor may not be integrated into the processor 680.

[0188] The electronic control device also includes a power supply 690 (such as a battery) that supplies power to various components. Preferably, the power supply can be logically connected to the processor 680 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system.

[0189] Although not shown, the electronic control device may also include a camera, Bluetooth module, etc., which will not be described in detail here.

[0190] This application discloses a computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the method described in the above method embodiments.

[0191] This application discloses a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to perform the methods described in the above method embodiments.

[0192] This application discloses an application publishing platform, which is used to publish computer program products. When the computer program products are run on a computer, the computer executes the methods described in the above method embodiments.

[0193] It should be understood that the phrase "one embodiment" or "an embodiment" throughout the specification means that a specific feature, structure, or characteristic related to the embodiment is included in at least one embodiment of this application. Therefore, "in one embodiment" or "in an embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. Furthermore, these specific features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. Those skilled in the art should also recognize that the embodiments described in the specification are optional embodiments, and the actions and modules involved are not necessarily essential to this application.

[0194] In the various embodiments of this application, it should be understood that the sequence number of each process does not necessarily imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0195] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units; they can be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0196] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0197] If the aforementioned integrated units are implemented as software functional units and sold or used as independent products, they can be stored in a computer-accessible memory. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a memory and includes several requests to cause a computer device (which can be a personal computer, server, or network device, specifically a processor in the computer device) to execute some or all of the steps of the methods described in the various embodiments of this application.

[0198] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, including read-only memory (ROM), random access memory (RAM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), one-time programmable read-only memory (OTPROM), electrically-Erasable Programmable Read-Only Memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disc storage, disk storage, magnetic tape storage, or any other computer-readable medium capable of carrying or storing data.

[0199] The above description provides examples of a brushless motor control method, apparatus, massage device, and storage medium disclosed in the embodiments of this application. These examples illustrate the principles and implementation methods of this application. The descriptions of the embodiments above are merely for the purpose of helping to understand the method and core ideas of this application. Furthermore, those skilled in the art will recognize that, based on the ideas of this application, there will be changes in the implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A control method for a brushless motor, characterized in that, The method is applied to an electronic control device, which includes a brushless motor and a power control unit. The power control unit has a preset commutation function. When the electronic control device is working, the power control unit generates a drive signal and an idle signal. The drive signal drives the brushless motor, and the waveform of the drive signal is the same as the waveform of the idle signal. The frequency of the idle signal is the same as the frequency of the drive signal. The control method includes: Obtain the first duty cycle, which is the duty cycle of the drive signal; The commutation coefficient is obtained based on the first duty cycle and the commutation function. The commutation function is used to indicate the coefficient curve between the commutation coefficient and the first duty cycle when the brushless motor performs commutation at the electrical angle. The electrical angle commutation time of the brushless motor is calculated based on the commutation coefficient. The brushless motor is controlled to commutate based on the electrical angle commutation time and the idling signal.

2. The method according to claim 1, characterized in that, Before obtaining the commutation coefficient based on the first duty cycle and the commutation function, the method further includes: Based on the first duty cycle, determine the sampling period for sampling the back electromotive force of the brushless motor; The back electromotive force of the brushless motor is collected according to the sampling period. After acquiring the back electromotive force of the brushless motor, it is checked whether a zero-crossing event has occurred. If the zero-crossing event occurs, the step of obtaining the commutation coefficient based on the first duty cycle and the commutation function is executed.

3. The method according to claim 2, characterized in that, The step of determining the sampling period for sampling the back electromotive force of the brushless motor based on the first duty cycle includes: Based on the first duty cycle, a second duty cycle is determined, wherein the second duty cycle is the duty cycle of the idling signal; The sampling period for sampling the back electromotive force of the brushless motor is determined based on the second duty cycle.

4. The method according to claim 3, characterized in that, The step of determining the second duty cycle based on the first duty cycle includes: If the first duty cycle is greater than the first preset threshold, then the second duty cycle is determined based on the first standard; If the first duty cycle is less than or equal to the first preset threshold, then the second duty cycle is determined based on the second criterion.

5. The method according to claim 2, characterized in that, After acquiring the back electromotive force of the brushless motor, detecting whether a zero-crossing event has occurred includes: Obtain the zero-crossing event identifier of the brushless motor; Based on the occurrence identifier, detect whether a zero event has occurred.

6. The method according to claim 5, characterized in that, The step of controlling the commutation of the brushless motor based on the electrical angle commutation time and the idling signal includes: Detect whether the electrical angle commutation time has been reached; If the desired result is achieved, the brushless motor is controlled to commutate. If the zero-crossing event is not reached, then the step of obtaining the occurrence identifier of the zero-crossing event of the brushless motor is performed.

7. The method according to any one of claims 1 to 6, characterized in that, Before obtaining the first duty cycle, the method further includes: Obtain the operating parameters of the electronic control device; Adjust the operating parameters of the drive signal according to the operating parameters of the electronic control device; The process of obtaining the first duty cycle includes: Obtain the duty cycle corresponding to the adjusted drive signal.

8. The method according to any one of claims 1 to 6, characterized in that, The commutation function includes a first function and a second function, and the step of obtaining the commutation coefficient based on the first duty cycle and the commutation function includes: If the first duty cycle is greater than the second preset threshold, then the commutation coefficient is obtained based on the first duty cycle and the first function; If the first duty cycle is less than or equal to the second preset threshold, then the commutation coefficient is obtained based on the first duty cycle and the second function.

9. The method according to any one of claims 1 to 6, characterized in that, The step of calculating the electrical angle commutation time of the brushless motor based on the commutation coefficient includes: Obtain the time difference between the last commutation time of the brushless motor and the current time; The electrical angle commutation time of the brushless motor is determined based on the time difference and the commutation coefficient.

10. The method according to any one of claims 1 to 6, characterized in that, Before obtaining the first duty cycle, the method further includes: Determine multiple test values; Adjust the first duty cycle to each test value, and obtain the electrical angle commutation time corresponding to each test value; Based on the electrical angle commutation time corresponding to each test value, determine the commutation coefficient corresponding to each test value; The commutation function is obtained based on each test value and the commutation coefficient corresponding to each test value; The commutation function is stored in the power control unit.

11. A control device for a brushless motor, characterized in that, The device is applied to an electronic control device, which includes a brushless motor and a power control unit. The power control unit has a preset commutation function. When the electronic control device is working, the power control unit generates a drive signal and an idle signal. The drive signal drives the brushless motor, and the waveform of the drive signal is the same as the waveform of the idle signal. The frequency of the idle signal is the same as the frequency of the drive signal. The control device includes: The first acquisition module is used to acquire a first duty cycle, wherein the first duty cycle is the duty cycle of the drive signal; The second acquisition module is used to acquire the commutation coefficient based on the first duty cycle and the commutation function. The commutation function is used to indicate the coefficient curve between the commutation coefficient and the first duty cycle when the brushless motor performs commutation at the electrical angle. The first calculation module is used to calculate the electrical angle commutation time of the brushless motor based on the commutation coefficient. The steering control module is used to control the commutation of the brushless motor according to the electrical angle commutation time and the idling signal.

12. An electronic control device, characterized in that, The electronic control device includes a memory and a processor. The memory stores a computer program. When the computer program is executed by the processor, the processor enables the processor to implement the brushless motor control method as described in any one of claims 1 to 10.

13. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the brushless motor control method as described in any one of claims 1 to 10.

Citation Information

Patent Citations

  • PWM (Pulse Width Modulation) method for suppressing commutation torque ripples of brushless DC motor

    CN106655911A

  • Brushless direct current motor starting control method and control system

    CN110365260A