Motor control device, motor control method, motor control device and electronic equipment
By rotating the motor rotor to a fixed preset initial position and controlling the motor rotation at this position, the problem of the dead point of the single-phase motor starting is solved and the reliability of motor control is improved.
Patent Information
- Application Number
- CN202310757499.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-25
- Publication Date
- 2024-12-27
AI Technical Summary
A single-phase motor has a dead point with zero torque when starting, resulting in low reliability of the motor control of electronic devices.
After rotating the rotor position of the motor to a fixed preset initial position, and then controlling the motor rotation at this position, to avoid starting dead points and improve the reliability of motor control. Specifically, the motor drive unit and the main control chip are used to control the rotor to rotate to a preset position using a pre-drive circuit and an inverter circuit, and start the motor at this position.
It effectively avoids the motor start dead point, improves the reliability of motor control, ensures the accuracy of initial position positioning of the motor rotor, and improves the reliability of electronic equipment for motor control.
Smart Images

Figure CN119210225A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of electronic technology, and in particular to a motor control device, a motor control method, a device and an electronic device. Background Art
[0002] With the development of science and technology, electronic devices are used more and more widely and have more and more functions. They have become one of the necessities in people's daily life. At present, electronic devices including motors are becoming more and more common. In the related technology, since the single-phase motor has only one set of stator windings, there is a dead point where the torque is zero. Therefore, the control of the motor by the electronic device has the problem of low reliability. Summary of the invention
[0003] In view of the above problems, the present application proposes a motor control device, a motor control method, an apparatus and an electronic device, which can rotate the position of the motor's rotor to a fixed preset initial position, and then control the motor rotation at the preset initial position, so as to effectively avoid the motor starting dead point and improve the reliability of motor control.
[0004] In a first aspect, an embodiment of the present application provides a motor control device, the motor control device comprising a motor drive unit and a main control chip. The motor drive unit is used to connect to a motor and drive the motor to rotate; the main control chip is connected to the motor drive unit and is used to respond to an instruction to drive the motor to work, control the motor drive unit to drive the motor's rotor to rotate to a preset initial position, and control the motor drive unit to drive the motor to start working at the preset initial position.
[0005] In a second aspect, an embodiment of the present application provides a motor control method, which is applied to the motor control device provided in the first aspect. The method includes: in response to an instruction to drive the motor to work, controlling the motor drive unit to drive the rotor of the motor to rotate to a preset initial position; and controlling the motor drive unit to drive the motor to start working at the preset initial position.
[0006] In a third aspect, an embodiment of the present application provides a motor control device, which is applied to the motor control device provided in the first aspect above. The motor control device includes: a pre-positioning module and a working module. The pre-positioning module is used to control the motor drive unit to drive the rotor of the motor to rotate to a preset initial position in response to an instruction to drive the motor to work; the working module is used to control the motor drive unit to drive the motor to start working at the preset initial position.
[0007] In a fourth aspect, an embodiment of the present application provides an electronic device, comprising: a motor; one or more processors; a memory; and one or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors, and the one or more applications are configured to execute the method of the second aspect described above.
[0008] In a fifth aspect, an embodiment of the present application provides a computer-readable storage medium, in which a program code is stored, and the program code is called by a processor to execute the method of the second aspect as described above.
[0009] The motor control device, motor control method, device and electronic device provided in the embodiments of the present application control the motor drive unit to drive the rotor of the motor to rotate to a preset initial position in response to an instruction instructing the drive motor to work; control the motor drive unit to drive the motor to start working at the preset initial position, and then control the motor to rotate at the preset initial position after rotating the position of the motor's rotor to a fixed preset initial position, so as to effectively avoid the motor starting dead point and improve the reliability of motor control. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0011] Figure 1 A schematic diagram showing the rotor position of a motor provided by an embodiment of the present application is shown.
[0012] Figure 2 A structural block diagram of a motor control device provided by an embodiment of the present application is shown.
[0013] Figure 3 A circuit structure schematic diagram of a pre-driving circuit provided in one embodiment of the present application is shown.
[0014] Figure 4 A circuit structure schematic diagram of an inverter circuit provided in one embodiment of the present application is shown.
[0015] Figure 5 A circuit structure diagram of a voltage sampling circuit provided in one embodiment of the present application is shown.
[0016] Figure 6 A circuit structure schematic diagram of a first current sampling circuit provided in an embodiment of the present application is shown.
[0017] Figure 7 A circuit structure schematic diagram of a second current sampling circuit provided in an embodiment of the present application is shown.
[0018] Figure 8 A flow chart of a motor control method provided by an embodiment of the present application is shown.
[0019] Fig. 9 A flow chart of a motor control method provided by an embodiment of the present application is shown.
[0020] Fig.10 A schematic diagram showing the rotation of the rotor of a drive motor provided by an embodiment of the present application is shown.
[0021] Fig.11 A flow chart of a motor control method provided by an embodiment of the present application is shown.
[0022] Fig.12 A flow chart of a motor control method provided by an embodiment of the present application is shown.
[0023] Fig.13 A flow chart of a motor control method provided by an embodiment of the present application is shown.
[0024] Fig.14 A structural block diagram of a motor control device provided by an embodiment of the present application is shown.
[0025] Fig.15 A structural block diagram of an electronic device provided by an embodiment of the present application is shown.
[0026] Fig.16 A structural block diagram of a computer-readable storage medium provided by an embodiment of the present application is shown. DETAILED DESCRIPTION
[0027] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application, and cannot be understood as limiting the present application.
[0028] In order to enable those skilled in the art to better understand the solutions of the present application, the technical solutions 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 only part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without making creative work are within the scope of protection of the present application.
[0029] With the development of science and technology, electronic devices are becoming more and more diverse. At present, electronic devices including motors are becoming more and more common, such as vacuum cleaners, washing machines, exhaust fans, etc. Correspondingly, the reliability requirements for motor control in related technologies are getting higher and higher. In the related technology, a solution of unequal air gap design is proposed to solve the problem of dead point of single-phase motors, so that the position of the rotor when the motor starts avoids the dead point. Among them, the normal n-pole motor rotor in a single-phase motor has 2n initial positions in a static state. In the process of controlling a single-phase motor, each time the motor is started, the initial position of the rotor needs to be determined, and then the motor current commutation is controlled in the required direction to avoid causing the rotor to lose step.
[0030] For example, see Figure 1 , which shows a schematic diagram of the rotor position of a motor provided by an embodiment of the present application. In order to avoid the problem of a dead point at the start of a single-phase motor, the stator core of the motor is designed with unequal air gaps, wherein the motor includes a pair of pole motor rotors, and the rotor is affected by the cogging torque in a stationary state. The initial position of the rotor of the motor has and only has two initial positions, such as Figure 1 Position 1 as shown, where the N pole of the rotor is at an oblique upper position and the S pole is at an oblique lower position; Figure 1 Position 2 is shown, where the N pole of the rotor is obliquely below and the S pole is obliquely above. When the electronic device controls the motor to start, it can control the current commutation according to the position of the rotor in the motor to avoid the rotor in the motor from losing step.
[0031] In the related art, electronic devices can determine the position of the rotor based on the pulse positioning method by supplying a fixed-phase pulse current to the motor and utilizing the motor's salient polarity to collect the current response value after passing through the motor winding. However, this pulse positioning method has high requirements on the salient polarity of the motor's rotor. When the motor's salient polarity is not high, it is easy to misjudge the position of the rotor, resulting in low reliability of the electronic device's control over the motor.
[0032] Therefore, in the related art, since the single-phase motor has only one set of stator windings, there is a dead point where the torque is zero, and therefore, the control of the motor by the electronic equipment has a problem of low reliability.
[0033] In view of the above problems, the inventor has discovered after long-term research and proposed a motor control device, motor control method, device and electronic device provided in the embodiments of the present application, which controls the motor to rotate at the preset initial position after the position of the motor rotor is rotated to a fixed preset initial position, so as to effectively avoid the motor starting dead point and improve the reliability of motor control. Among them, the specific motor control method is described in detail in the subsequent embodiments.
[0034] See also Figure 2, which shows a schematic diagram of a motor control device provided by an embodiment of the present application. In the embodiment of the present application, the motor control device 10 may include a motor drive unit 101 and a main control chip 102.
[0035] Among them, the motor drive unit 101 can be used to connect to the motor and drive the motor to rotate; the main control chip 102 can be connected to the motor drive unit 101, and is used to respond to the instruction instructing the drive motor to work, control the motor drive unit 101 to drive the motor's rotor to rotate to a preset initial position, and control the motor drive unit 101 to drive the motor to start working at the preset initial position.
[0036] Wherein, the motor drive unit 101 may include a power supply unit, wherein the power supply unit may be used to provide energy for driving the motor to work, and illustratively, the power supply unit may provide a voltage of 175V to 264V. Optionally, the power supply unit may include a unit for rectifying the 310V mains to obtain an output voltage. Exemplarily, the power supply unit may filter the mains with an electrolytic capacitor and input it into the motor drive unit 101 to provide a bus voltage for driving the motor to work. Wherein, the rectification method may include half-wave rectification, full-wave rectification, bridge rectification, etc., which are not limited here.
[0037] The motor drive unit 101 may further include a pre-drive circuit and an inverter circuit. The pre-drive circuit may be composed of one or more circuit elements such as resistors, capacitors, and diodes. The inverter circuit may be composed of one or more circuit elements such as resistors, capacitors, diodes, and electronic switches. The electronic switch included in the inverter circuit may include a field effect transistor (MOS). Exemplarily, the inverter circuit may include an "H-bridge" composed of four MOS tubes; accordingly, the inverter circuit is connected to the motor, and different current directions may be provided for the motor drive through different MOS tube conduction modes.
[0038] Among them, considering that the driving current of the MOS tube is generally greater than 100mA, the chip IO output capacity of the main control chip 102 is generally less than or equal to 10mA. Optionally, the pre-drive circuit may include a pre-drive chip, which can receive the drive signal sent by the main control chip 102, and turn on the corresponding MOS tube in response to the drive signal to drive the motor to work. Among them, the drive signal may include the current flow direction of the motor. Further, the pre-drive circuit can turn on the electronic switch included in the inverter circuit based on the drive signal, control the inverter circuit to turn on the current flow corresponding to the drive signal to control the motor to work. Among them, the pre-drive chip can include a driver chip such as an LN8362 chip and a SOT23-6 chip, which is not limited here.
[0039] Exemplarily, the motor drive unit 101 is connected to the main control chip 102 to receive the drive signal sent by the main control chip 102; the output end of the pre-drive circuit can be connected to the inverter circuit to control the conduction of the inverter circuit in response to the drive signal, and control the flow direction of the current in the inverter circuit. The inverter circuit can be connected to the motor to drive the motor to work.
[0040] For example, see Figure 3 , which shows a schematic diagram of the circuit structure of the pre-drive circuit provided in an embodiment of the application. The pre-drive circuit is composed of resistors R1, R2, R3, R4, R5, R6, capacitors C1, C2, C3, C4, diodes D1, D2, pre-drive chips U1, U2, as shown in FIG. Figure 3 The connection method shown is composed of the following. The pre-drive circuit can receive the drive signal PWM_UH high-level signal and PWM_UL low-level signal sent by the main control chip 102 or the associated electronic device; the pre-drive chip U1 included in the pre-drive circuit can output the U signal, HOU signal and LOU signal to the inverter circuit based on the drive signal, and the pre-drive chip U2 included in the pre-drive circuit can output the V signal, HOU signal and LOU signal to the inverter circuit based on the drive signal. The U signal, V signal, HOU signal and LOU signal output by the pre-drive circuit can control the conduction mode of the inverter circuit, and thus control the flow direction of the motor current.
[0041] For example, see Figure 4 , which shows a schematic diagram of the circuit structure of an inverter circuit provided by an embodiment of the present application. The inverter circuit comprises resistors R7, R8, R9, R10, R11, R12, R13, R14, R15, R16, capacitors C5, C6, MOS1, MOS2, MOS3, MOS4, as shown in FIG. Figure 4 The connection method shown in the figure is as follows. Among them, capacitors C5 and C6 can rectify and filter the 310V mains power to obtain the bus voltage for driving the motor. Among them, MOS1, MOS2, MOS3, and MOS4 can form an "H bridge", MOS1 and MOS3 are turned on as one group, and MOS2 and MOS4 are turned on as another group.
[0042] Please refer to Figure 3 and Figure 4, wherein the U signal, V signal, HOU signal and LOU signal output by the pre-drive circuit can control the conduction of MOS1 and MOS4, and the U signal, V signal, HOU signal and LOU signal output by the pre-drive circuit can also control the conduction of MOS2 and MOS3. The motor can be connected to the inverter circuit. After the MOS tube is turned on, the current can flow through the motor based on the direction of U—>V, and can also flow through the motor based on the direction of V—>U, thereby driving the motor to work.
[0043] In some embodiments, the motor drive unit 101 may further include a voltage sampling circuit. The voltage sampling circuit may be used to connect to the power supply unit and the main control chip 102 respectively, and may sample the voltage of the drive motor. The voltage sampling circuit may be composed of one or more circuit elements such as resistors, capacitors, and diodes.
[0044] For example, please refer to Figure 4 and Figure 5 , Figure 5 FIG. 1 is a schematic diagram showing a circuit structure of a voltage sampling circuit provided by an embodiment of the present application. The voltage sampling circuit may be composed of a resistor R17, a resistor R18, a resistor R19, a resistor R20, a resistor R21, a resistor R22, a capacitor C7, a diode D3, and the like. Figure 5 The input end of the voltage sampling circuit can be connected to the inverter circuit, and the output end can be connected to the main control chip 102. Figure 4 The 310V input inverter circuit voltage shown is understood as the 310V voltage of the input voltage sampling circuit; Figure 5 The output end of the voltage sampling circuit shown can output the sampled bus voltage U_AD for driving the motor to the main control chip 102 .
[0045] In some embodiments, the motor drive unit 101 may further include a first current sampling circuit, the first end of which may be used to connect to the input end of the first resistor included in the inverter circuit, the second end of which may be used to be grounded, the third end of which may be used to connect to the main control chip 102, and the first current sampling circuit may be used to sample the first current corresponding to the first resistor. The first current sampling circuit may determine the first current based on the built-in operational amplifier of the MCU; the first current sampling circuit may also determine the first current based on the external current sampling operational amplifier.
[0046] The first current sampling circuit may be composed of one or more circuit elements such as resistors, capacitors, and comparators. Figure 4 and Figure 6 ,in, Figure 6FIG. 1 is a schematic diagram showing the circuit structure of a first current sampling circuit provided by an embodiment of the present application. The first current sampling circuit comprises a resistor R23, a resistor R24, a capacitor C8, a comparator 1, and a Figure 6 The first end of the first current sampling circuit can be understood as follows: Figure 6 The I_shunt1 input terminal can be used to connect to the first resistor (such as Figure 4 The first current sampling circuit is connected to the input end of the resistor R16 shown in the figure, the second end of the first current sampling circuit can be used for grounding, and the third end of the first current sampling circuit can be used for connecting to the main control chip 102, wherein the third end of the first current sampling circuit can send the voltage I_AD of the first resistor to the ground to the main control chip 102. Further, the main control chip 102 can obtain the first current corresponding to the first resistor according to the voltage I_AD and the resistance of the first resistor using the Ohm's law formula. Accordingly, it can be understood that the first current sampling circuit can be used to sample the first current corresponding to the first resistor.
[0047] The motor drive unit 101 may also include a second current sampling circuit, the first end of which may be used to connect to the first end of the second resistor included in the inverter circuit, the second end of which may be used to connect to the input end of the first resistor included in the inverter circuit, the third end of which may be used to connect to the main control chip 102, and the second current sampling circuit may be used to sample the second current corresponding to the first resistor and the second resistor, wherein the first resistor may be connected in series with the second resistor. The second current sampling circuit may determine the second current based on the built-in operational amplifier of the MCU; the second current sampling circuit may also determine the second current based on the external current sampling operational amplifier.
[0048] The second current sampling circuit may be composed of one or more circuit elements such as resistors, capacitors, and comparators. Figure 4 and Figure 7 ,in, Figure 7 FIG. 1 shows a schematic diagram of the circuit structure of a second current sampling circuit provided by an embodiment of the present application. The second current sampling circuit comprises a resistor R25, a resistor R26, a capacitor C9, a comparator 2, and a Figure 7 The connection method shown is composed
[0049] The first end of the second current sampling circuit can be understood as follows: Figure 7 The input terminal of iv+ can be used to connect to the second resistor (such as Figure 4 A first end of a resistor R15) is connected.
[0050] The second end of the second current sampling circuit can be understood as follows: Figure 7 The input end of I_shunt1 can be used to connect to the first resistor (such as Figure 4 The input terminal of the resistor R16 is connected as shown.
[0051] The third end of the second current sampling circuit can be used to connect to the main control chip 102, wherein the third end of the second current sampling circuit can send the voltage I_U of the first resistor and the second resistor to the ground to the main control chip 102. Further, the main control chip 102 can obtain the second current corresponding to the first resistor and the second resistor based on the Ohm's law formula according to the voltage I_U, the first resistor and the second resistor. Accordingly, it can be understood that the second current sampling circuit can be used to sample the second current corresponding to the first resistor and the second resistor.
[0052] It can be understood that, when MOS1 and MOS4 are turned on, the first resistor can be connected in series with the second resistor, and when MOS2 and MOS3 are turned on, the first resistor can be connected in parallel with the second resistor.
[0053] Optionally, the main control chip 102 may include a microcontroller unit (MCU). In this embodiment, the main control chip 102 may control the motor drive unit 101 to drive the rotor of the motor to rotate to a preset initial position in response to an instruction to drive the motor to work; control the motor drive unit 101 to drive the motor to start working at the preset initial position, and then control the motor to rotate at the preset initial position after rotating the position of the motor's rotor to a fixed preset initial position, so as to effectively avoid the motor starting dead point and improve the reliability of motor control.
[0054] See also Figure 8 , Figure 8 The flow chart of the motor control method provided by an embodiment of the present application is shown. The motor control method is applied to the motor control device provided by an embodiment of the present application, and the motor is controlled to rotate at the preset initial position after the position of the motor rotor is rotated to a fixed preset initial position, so as to effectively avoid the motor starting dead point and improve the reliability of motor control. In a specific embodiment, the motor control method can be applied to Fig.14 The motor control device 200 and the electronic device 100 ( Fig.15). The following will take an electronic device as an example to illustrate the specific process of this embodiment. Of course, it can be understood that the electronic device used in this embodiment may include a washing machine, a hair dryer, an exhaust fan, and other electronic devices including the motor control device provided in an embodiment of the present application, which are not limited here. Among them, the electronic device can be connected to the motor. Figure 8 The process shown is described in detail, and the motor control method may specifically include the following steps:
[0055] Step S110: in response to an instruction to drive the motor to work, controlling the motor drive unit to drive the rotor of the motor to rotate to a preset initial position.
[0056] In this embodiment, the electronic device may include a motor, and the electronic device may also be connected to one or more motors. The motor may include a single-phase motor; the single-phase motor may adopt an uneven air gap design on the stator; the single-phase motor may generate a magnetic resistance torque based on the uneven air gap design, ensuring that the rotor of the motor does not stop at a dead point with zero torque when the power is cut off and the reliability of controlling the rotation of the motor is ensured.
[0057] The electronic device may further include a motor control device, wherein the motor control device may include a motor drive unit and a main control chip. The motor drive unit may be used to connect to the motor and drive the motor to rotate. The main control chip may be connected to the motor drive unit, and is used to respond to an instruction to drive the motor to work, control the motor drive unit to drive the rotor of the motor to rotate to a preset initial position, and control the motor drive unit to drive the motor to start working at the preset initial position. For example, the motor is controlled to rotate.
[0058] In some embodiments, in order to avoid the dead point of the single-phase motor starting, the electronic device can control the motor drive unit to drive the motor continuously for a first preset time period with a current of a constant preset duty cycle. After the first preset time period, the duty cycle count value of the current driven by the motor drive unit can be controlled to gradually decrease from the count value of the preset duty cycle until it reaches 0, and wait for a second preset time period so that the motor is completely stationary at a preset initial position. At this time, the electronic device can control the motor drive unit to drive the motor to start rotating when the position of the rotor is fixed at the preset initial position.
[0059] Accordingly, the electronic device can determine the preset duty cycle, the first preset time period, the duty cycle decay rate, and the second preset time period, etc., of the rotor of the driving motor to rotate to the preset initial position by obtaining the voltage sampled by the voltage sampling circuit and the motor resistance value of the input motor driving the motor. Among them, the preset duty cycle, the first preset time period, the duty cycle decay rate, and the second preset time period can be pre-set in the electronic device; or the electronic device can obtain them from the associated cloud or electronic device through wireless communication technology (such as Bluetooth, WiFi, zigbee technology and other wireless technologies). Exemplarily, the electronic device determines, based on the voltage of the input motor and the resistance value of the motor, that the preset duty cycle is 25%, the first preset time period is 100 milliseconds, the duty cycle decay rate is 1 millisecond minus 1, and the second preset time period is 2 seconds.
[0060] In some embodiments, the electronic device may receive a first driving instruction input by a user, wherein the first driving instruction may be used to instruct the electronic device to drive the motor to work. Accordingly, after receiving the first driving instruction, the electronic device may control the motor drive unit to drive the rotor of the motor to rotate to a preset initial position in response to the instruction to drive the motor to work.
[0061] The preset initial position may be pre-set in the electronic device, or the electronic device may obtain the preset initial position from an associated cloud or electronic device through wireless communication technology. Figure 1 , wherein the preset initial position may include Figure 1 The position shown in FIG. 1 may also include Figure 1 Position 2 shown is not limited here.
[0062] In this embodiment, in response to the instruction to drive the motor to work, the electronic device controls the motor drive unit to drive the rotor of the motor to rotate to a preset initial position, and can drive the motor to work based on a current of any current direction when the motor drive unit is controlled to start the motor. Figure 4 , the main control chip in the electronic device can control the motor drive unit to turn on MOS1 and MOS4, so that the current flow from U->V drives the motor to work; the main control chip in the electronic device can also control the motor drive unit to turn on MOS2 and MOS3, so that the current flow from V->U drives the motor to work. Accordingly, the electronic device can control the motor drive unit to pass the current of any phase to continuously drive the motor for a first preset time period with a constant preset duty cycle, and then control the motor drive unit to drive the motor to work. The count value of the preset duty cycle of the current is gradually reduced until it is 0, and wait for the second preset time period, so that the motor's rotor changes from a rotating state to a stationary state, and then drives the motor's rotor to rotate to a preset initial position.
[0063] It is understandable that the electronic device can control the motor to rotate by briefly energizing the motor with a constant duty cycle for a first preset time period before the motor officially works, and then gradually reduce the duty cycle count value of the motor to 0, and wait for the second preset time period, so that the motor's rotor rotates to a preset initial position and then stops, thereby ensuring the high reliability of the motor's rotor positioning when the motor is officially working. Among them, the duty cycle count value of the motor driving the motor to rotate is gradually reduced to 0, and then waits for the second preset time period, so that the motor's rotor rotates to a preset initial position and then stops, which can effectively prevent the motor from vigorous shaking and causing the initial position of the rotor to shift, improve the accuracy of fixing the rotor to the preset initial position, and thus improve the reliability of the electronic device's control of the motor.
[0064] Step S120: controlling the motor drive unit to drive the motor to start working at the preset initial position.
[0065] In some embodiments, after the electronic device controls the motor drive unit to drive the motor's rotor to rotate to a preset initial position, the electronic device can control the motor drive unit to drive the motor to start working at the preset initial position. It can also be understood that after the electronic device rotates the motor's rotor to the preset initial position for pre-positioning, the electronic device can start the motor and control the motor to start working formally when the rotor is at the preset initial position.
[0066] It can be understood that in this embodiment, before starting the motor, the electronic device rotates the motor's rotor to a fixed preset initial position, thereby effectively avoiding the motor starting dead point and ensuring the reliability of the electronic device's control over the motor. Among them, for a single-phase motor with unclear salient polarity, by pre-positioning the initial position of the motor's rotor, the high reliability of the motor's rotor positioning is ensured, thereby improving the reliability of the motor control.
[0067] A motor control method provided in an embodiment of the present application controls a motor drive unit to drive the rotor of a motor to rotate to a preset initial position in response to an instruction instructing the motor to work; controls the motor drive unit to drive the motor to start working at the preset initial position, and then controls the motor to rotate at the preset initial position after rotating the position of the motor's rotor to a fixed preset initial position, so as to effectively avoid the motor starting dead point and improve the reliability of motor control.
[0068] See also Fig. 9 , Fig. 9 The flow chart of the motor control method provided by an embodiment of the present application is shown. The method is applied to the electronic device including the motor control device. Fig. 9 The process shown is described in detail, and the motor control method may specifically include the following steps:
[0069] Step S210: In response to an instruction to drive the motor to work, determine a pre-positioning parameter.
[0070] In some embodiments, the electronic device may receive a second driving instruction input by a user, wherein the second driving instruction may include an instruction for instructing the electronic device to drive the motor to work; wherein the instruction for instructing the electronic device to drive the motor to work may carry a pre-positioning parameter. The pre-positioning parameter may include a preset initial position, a driving duty cycle of the current, a first driving duration, a duty cycle attenuation rate, a waiting duration, etc., which are not limited here.
[0071] For example, see Figure 1 , wherein the preset initial position included in the pre-positioning parameter can be as follows Figure 1 The preset initial position included in the pre-positioning parameter may also be as follows: Figure 1 Position 2 shown is not limited here.
[0072] Among them, the driving duty cycle of the current included in the pre-positioning parameter can be 25%, 30%, 50%, etc., which is not limited here; wherein, the first driving duration included in the pre-positioning parameter can be 100 milliseconds, 90 milliseconds, etc., which is not limited here; wherein, the duty cycle decay rate included in the pre-positioning parameter can be 1 millisecond to reduce 1 duty cycle count value, or 1 millisecond to reduce 2 duty cycle count values, which is not limited here; wherein, the waiting time included in the pre-positioning parameter can be 2s, 1s, which is not limited here.
[0073] Exemplarily, the electronic device can control the motor drive unit to fix any current with a preset duty cycle of 25%, and after 100 milliseconds, the count value of the preset duty cycle of the motor drive unit is reduced based on the duty cycle decay rate (e.g., 1 millisecond minus 1). Among them, the count value of the 25% preset duty cycle corresponds to 0.25×2000=500, where 2000 is a pulse width PWM count cycle. Among them, after the electronic device controls the preset duty cycle of the motor drive unit to be reduced to 0, it can wait for 2 seconds to ensure that the motor rotor is completely stationary, and then start the motor again.
[0074] In some embodiments, the electronic device may be pre-set with pre-positioning parameters, wherein the pre-positioning parameters may be obtained based on third-party experimental data, or may be set independently by the user, and are not limited here. Exemplarily, the pre-positioning parameters may include a preset duty cycle, a first preset duration, a duty cycle decay rate, a waiting duration, etc.; wherein the preset duty cycle, the first preset duration, the duty cycle decay rate, the waiting duration, etc. may be obtained by debugging the motor and pre-stored in the electronic device.
[0075] The electronic device may also obtain the pre-positioning parameter from an associated cloud or electronic device through wireless communication technology. After receiving the instruction to drive the motor, the electronic device may determine that the motor needs to be controlled. Accordingly, the electronic device may determine the pre-positioning parameter from the memory in response to the instruction to drive the motor, or may determine the pre-positioning parameter from an associated cloud or electronic device through wireless communication technology, which is not limited here.
[0076] Step S220: controlling the motor drive unit to drive the rotor of the motor to rotate to the preset initial position based on the preset positioning parameters.
[0077] In some embodiments, after the electronic device determines the predetermined parameters, it can control the motor drive unit to drive the rotor of the motor to rotate to a preset initial position based on the predetermined positioning parameters. The preset initial position can be pre-set in the electronic device or included in the predetermined positioning parameters, which is not limited here.
[0078] Optionally, the pre-positioning parameters may include a driving duty cycle of the current, a duty cycle decay rate, and a waiting time. The process in which the electronic device controls the motor drive unit to drive the rotor of the motor to rotate to a preset initial position based on the pre-positioning parameters may include controlling the motor drive unit to drive the rotor of the motor to rotate to an intermediate position based on the driving duty cycle of the current; wherein the magnetic field direction of the rotor of the motor at the intermediate position coincides with the magnetic field direction of the stator of the motor.
[0079] Correspondingly, in the intermediate position, the electronic device can control the motor drive unit to drive the motor to rotate, and the driving duty cycle of the current decreases based on the duty cycle decay rate, and start timing when the driving duty cycle of the current is reduced to zero, and when the timing reaches the waiting time, control the motor drive unit to drive the rotor of the motor to rotate to a preset initial position.
[0080] For example, see Fig.10 , which shows a schematic diagram of controlling the position of the rotor of a motor provided by an embodiment of the present application. The position of the rotor of the motor in the initial state may be position one or position two, wherein the electronic device may control the motor drive unit to energize the motor based on the current of the driving duty cycle, so that the magnetic field direction of the coil (stator) of the motor after energization is upward, and then control the motor drive unit to drive the rotor of the motor to rotate to the middle position, wherein the magnetic field direction of the rotor of the motor at the middle position coincides with the magnetic field direction of the stator of the motor. It can be understood that when the magnetic field direction of the rotor of the motor at the middle position coincides with the magnetic field direction of the stator of the motor, the torque of the rotor of the motor is zero, and the motor can stop oscillating.
[0081] Correspondingly, in the intermediate position, the electronic device can control the driving duty cycle of the current when the motor drive unit drives the motor to rotate to decrease based on the duty cycle attenuation rate, start timing when the driving duty cycle of the current decreases to zero, and when the timing reaches the waiting time, control the motor drive unit to drive the rotor of the motor to rotate to the preset initial position. Among them, by controlling the driving duty cycle of the energized current to gradually decrease, the power supply to the motor is gradually reduced to zero, so that the rotor of the motor slowly rotates to the preset initial position and then stops, to prevent sudden power failure, motor vibration that makes the motor start direction unfixed, and prevent the problem of initial position error caused by severe shaking of the motor, ensure the high reliability of rotor positioning, and improve the reliability of motor control.
[0082] In some embodiments, the pre-positioning parameters may include a driving duty cycle of the current, a driving duration, a duty cycle decay rate, and a waiting duration. The process of the electronic device controlling the motor drive unit to drive the rotor of the motor to rotate to a preset initial position based on the pre-positioning parameters may include controlling the motor drive unit to drive the motor to rotate based on the driving duty cycle of the current, and when the rotation duration of the motor reaches the driving duration, controlling the driving duty cycle of the current when the motor drive unit drives the motor to rotate to decrease based on the duty cycle decay rate. Accordingly, the electronic device may start timing when the driving duty cycle of the current decreases to zero, and when the timing reaches the waiting duration, control the motor drive unit to drive the rotor of the motor to rotate to the preset initial position.
[0083] Among them, the electronic device controls the motor drive unit to drive the motor to rotate based on the driving duty cycle of the current, and when the rotation time of the motor reaches the driving time, the magnetic field direction of the motor's rotor can coincide with the magnetic field direction of the motor's stator, and the corresponding torque of the motor's rotor is zero, and the motor can stop oscillating.
[0084] Step S230: controlling the motor drive unit to drive the motor to start working at the preset initial position.
[0085] For the specific description of step S230, please refer to the specific description of step S120 above, which will not be repeated here.
[0086] Compared with the motor control method provided in one embodiment of the present application, Figure 8 The motor control method shown in this embodiment can also determine the pre-positioning parameters in response to the instruction instructing the driving motor to work, and control the motor drive unit to drive the rotor of the motor to rotate to a preset initial position based on the pre-positioning parameters, thereby ensuring the reliability of the positioning of the rotor of the motor and improving the reliability of controlling the motor.
[0087] See also Fig.11 , Fig.11The flow chart of the motor control method provided by an embodiment of the present application is shown. The method is applied to the electronic device including the motor control device. Fig.11 The process shown is described in detail, and the motor control method may specifically include the following steps:
[0088] Step S310: In response to an instruction to drive the motor to work, determine the magnetic field direction of the stator of the motor.
[0089] In some embodiments, the electronic device may receive a third driving instruction input by a user, wherein the third driving instruction may include an instruction for instructing the electronic device to drive the motor to work; wherein the instruction for instructing the electronic device to drive the motor to work may carry a preset initial position. wherein the electronic device may determine the magnetic field direction of the stator of the motor based on the preset initial position, that is, the electronic device may determine the magnetic field direction of the coil of the motor based on the preset initial position.
[0090] In some embodiments, the instruction instructing the electronic device to drive the motor to work may also carry the magnetic field direction of the motor's stator; wherein the electronic device can parse the instruction to determine the magnetic field direction of the motor's stator. wherein the electronic device can also determine the preset initial position of the motor's rotor according to the magnetic field direction of the motor's stator.
[0091] For example, see Figure 1 , wherein, if the preset initial position is position one, correspondingly, the electronic device can determine that the direction of the stator magnetic field of the motor is upward; wherein, if the preset initial position is position two, correspondingly, the electronic device can determine that the direction of the stator magnetic field of the motor is downward.
[0092] Among them, after determining the magnetic field direction of the stator of the motor, the electronic device can perform subsequent rotor positioning operations on the motor based on the magnetic field direction.
[0093] Step S320: controlling the motor drive unit to drive the rotor of the motor to rotate to the preset initial position under the magnetic field direction of the stator.
[0094] In some embodiments, after the electronic device determines the magnetic field direction of the stator of the motor, it can control the motor drive unit to drive the rotor of the motor to rotate to a preset initial position under the magnetic field direction of the stator. After determining the magnetic field direction of the stator, the electronic device can control the motor drive unit to pass current to the motor based on the magnetic field direction of the stator to drive the rotor of the motor to rotate to the preset initial position.
[0095] For example, please refer to Figure 1 and Figure 4, wherein, if the electronic device determines that the preset initial position is position one, the motor drive unit can be controlled to conduct a current of U—>V to the motor, that is, MOS1 and MOS4 are controlled to be turned on to drive the motor's rotor to rotate to the preset initial position; if the electronic device determines that the preset initial position is position two, the motor drive unit can be controlled to conduct a current of V—>U to the motor, that is, MOS2 and MOS3 are controlled to be turned on to drive the motor's rotor to rotate to the preset initial position. wherein, after the electronic device fixes the position of the motor's rotor to the preset initial position, it can be determined that the pre-positioning of the motor is completed, which can be understood as the initial position of the rotor when the motor is officially working is fixed, and then the electronic device can control the motor drive unit to start the motor again at the preset initial position to start working, thereby ensuring the accuracy and reliability of the motor's rotor positioning, and also improving the reliability of the electronic device's control of the motor.
[0096] Step S330: controlling the motor drive unit to drive the motor to start working at the preset initial position.
[0097] For the specific description of step S330, please refer to the specific description of step S120 above, which will not be repeated here.
[0098] Compared with the motor control method provided in one embodiment of the present application, Fig. 9 The motor control method shown in this embodiment can also respond to an instruction instructing the driving motor to work, determine the magnetic field direction of the stator of the motor, and control the motor drive unit to drive the rotor of the motor to rotate to the preset initial position under the magnetic field direction of the stator, thereby improving the rationality of the rotor position when starting the motor and improving the reliability of motor control.
[0099] See also Fig.12 , Fig.12 The flow chart of the motor control method provided by an embodiment of the present application is shown. The method is applied to the electronic device including the motor control device. Fig.12 The process shown is described in detail, and the motor control method may specifically include the following steps:
[0100] Step S410: In response to an instruction to drive the motor to work, determine the direction of the current driving the rotor of the motor to rotate.
[0101] In some embodiments, the electronic device may receive a fourth driving instruction input by a user, wherein the fourth driving instruction may include an instruction for instructing the electronic device to drive the motor to work; wherein the instruction for instructing the electronic device to drive the motor to work may carry a preset initial position. wherein the electronic device may determine the current direction of the rotor of the drive motor to rotate based on the preset initial position, that is, the electronic device may determine the current direction of the rotor of the drive motor to rotate based on the preset initial position.
[0102] In some embodiments, the instruction instructing the electronic device to drive the motor may also carry the current direction of the rotor of the drive motor; wherein the electronic device can parse the instruction to obtain the current direction of the rotor of the drive motor. wherein the electronic device can also determine the preset initial position of the rotor of the motor according to the current direction of the rotor of the drive motor.
[0103] For example, please refer to Figure 1 and Figure 4 , wherein, if the preset initial position is position one, correspondingly, the electronic device can determine that the current direction of the rotor rotation of the driving motor is U→V current, that is, MOS1 and MOS4 are turned on; wherein, if the preset initial position is position two, correspondingly, the electronic device can determine that the current direction of the rotor rotation of the driving motor is V→U current, that is, MOS2 and MOS3 are turned on.
[0104] Among them, the electronic device can perform subsequent rotor positioning operations on the motor based on the current direction of the current driving the rotor of the motor after the current direction of the current driving the rotor of the motor rotates.
[0105] Step S420: controlling the motor drive unit to drive the rotor of the motor to rotate to the preset initial position under the current direction.
[0106] In some embodiments, after the electronic device determines the direction of the current driving the rotor of the motor to rotate, it can control the motor drive unit to drive the rotor of the motor to rotate to a preset initial position under the current direction.
[0107] For example, please refer to Figure 1 and Figure 4 , wherein, if the preset initial position is position one, correspondingly, the electronic device can determine that the current direction of the motor rotor rotation is a current from U to V; the electronic device can control the motor drive unit to turn on MOS1 and MOS4 to drive the motor rotor to rotate to position one. wherein, if the preset initial position is position two, correspondingly, the electronic device can determine that the current direction of the motor rotor rotation is a current from V to U, the electronic device can control the motor drive unit to turn on MOS2 and MOS3 to drive the motor rotor to rotate to position two.
[0108] Among them, after the electronic device fixes the position of the motor's rotor to the preset initial position, it can be determined that the pre-positioning of the motor is completed. It can be understood that the initial position of the rotor when the motor is officially working is fixed, and then the electronic device can control the motor drive unit to start the motor again at the preset initial position, thereby ensuring the accuracy and reliability of the motor's rotor positioning, and also improving the reliability of the electronic device's control of the motor.
[0109] Step S430: controlling the motor drive unit to drive the motor to start working at the preset initial position.
[0110] For the specific description of step S430, please refer to the specific description of step S120 above, which will not be repeated here.
[0111] Compared with the motor control method provided in one embodiment of the present application, Fig. 9 The motor control method shown in this embodiment can also respond to an instruction instructing the driving motor to work, determine the current direction of driving the rotor of the motor to rotate, and control the motor drive unit to drive the rotor of the motor to rotate to a preset initial position under the current direction, thereby improving the rationality of the rotor position when starting the motor and also improving the reliability of motor control.
[0112] See also Fig.13 , Fig.13 The flow chart of the motor control method provided by an embodiment of the present application is shown. The method is applied to the electronic device including the motor control device. Fig.13 The process shown is described in detail, and the motor control method may specifically include the following steps:
[0113] Step S510: In response to an instruction to drive the motor to work, control the motor drive unit to drive the rotor of the motor to rotate to a preset initial position.
[0114] For the specific description of step S510, please refer to the specific description of step S110 above, which will not be repeated here.
[0115] Step S520: If a driving instruction is received at the preset initial position, the motor driving unit is controlled to drive the motor to work.
[0116] In some embodiments, the electronic device may receive a fifth driving instruction input by a user, wherein if the electronic device receives the fifth driving instruction at a preset initial position, the motor driving unit may be controlled to drive the motor to operate.
[0117] The instruction to instruct the drive motor to work may include an instruction to instruct the drive motor to start, and may also include an instruction to instruct the drive motor to standby. After the electronic device controls the motor drive unit to drive the rotor of the motor to rotate to a preset initial position in response to the instruction to instruct the drive motor to work, it may also receive a drive instruction input by the user, wherein the drive instruction may instruct the electronic device to drive the motor to start rotating, or may instruct the electronic device to drive the motor to rotate based on a preset direction, or may instruct the electronic device to drive the motor to rotate for a third preset time, which is not limited here.
[0118] Compared with the motor control method provided in one embodiment of the present application, Fig. 9 The motor control method shown in this embodiment can also control the motor drive unit to drive the motor to work if a driving instruction is received at a preset initial position, and then control the motor to rotate at the preset initial position, effectively avoiding the motor starting dead point and improving the reliability of motor control.
[0119] See also Fig.14 , Fig.14 The module block diagram of the motor control device provided by an embodiment of the present application is shown. The motor control device 200 is applied to the electronic device provided by an embodiment of the present application. Fig.14 The process shown in the figure is described in detail, the motor control device 200 includes: a pre-positioning module 210 and a working module 220, wherein:
[0120] The pre-positioning module 210 is used to control the motor drive unit to drive the rotor of the motor to rotate to a preset initial position in response to an instruction to drive the motor to work.
[0121] The working module 220 is used to control the motor driving unit to drive the motor to start working at the preset initial position.
[0122] Further, the pre-positioning module 210 may include: a pre-positioning parameter determination unit and a pre-positioning sub-unit, wherein:
[0123] The pre-positioning parameter determination unit is used to determine the pre-positioning parameter.
[0124] The pre-positioning subunit is used to control the motor drive unit to drive the rotor of the motor to rotate to the preset initial position based on the pre-positioning parameters.
[0125] Further, the pre-positioning parameters may include a driving duty cycle of the current, a duty cycle attenuation rate, and a waiting time, and the pre-positioning subunit may include: a rotation to an intermediate position unit, a driving duty cycle attenuation first unit, and a first pre-positioning unit, wherein:
[0126] The rotation to intermediate position unit is used to control the motor drive unit to drive the rotor of the motor to rotate to the intermediate position based on the driving duty cycle of the current, wherein the magnetic field direction of the rotor of the motor at the intermediate position coincides with the magnetic field direction of the stator of the motor.
[0127] The first driving duty ratio attenuation unit is used to control the driving duty ratio of the current when the motor driving unit drives the motor to rotate to decrease based on the duty ratio attenuation rate at the intermediate position.
[0128] The first pre-positioning unit is used to start timing when the driving duty cycle of the current is reduced to zero, and when the timing reaches the waiting time, control the motor driving unit to drive the rotor of the motor to rotate to the preset initial position.
[0129] Further, the pre-positioning parameters include a driving duty cycle, a driving duration, a duty cycle attenuation rate, and a waiting duration of the current, and the pre-positioning subunit may include: a driving rotation unit, a second driving duty cycle attenuation unit, and a second pre-positioning unit, wherein:
[0130] The driving rotation unit is used to control the motor driving unit to drive the motor to rotate based on the driving duty ratio of the current.
[0131] The second driving duty ratio attenuation unit is used to control the driving duty ratio of the current when the motor driving unit drives the motor to rotate to decrease based on the duty ratio attenuation rate when the rotation time of the motor reaches the driving time.
[0132] The second pre-positioning unit is used to start timing when the driving duty cycle of the current is reduced to zero, and when the timing reaches the waiting time, control the motor driving unit to drive the rotor of the motor to rotate to the preset initial position.
[0133] Further, the pre-positioning module 210 may include: a magnetic field direction determining unit and a third pre-positioning unit, wherein:
[0134] The magnetic field direction determining unit is used to determine the magnetic field direction of the stator of the motor.
[0135] The third pre-positioning unit is used to control the motor drive unit to drive the rotor of the motor to rotate to the preset initial position under the magnetic field direction of the stator.
[0136] Further, the pre-positioning module 210 may include: a current direction determining unit and a fourth pre-positioning unit, wherein:
[0137] The current direction determining unit is used to determine the current direction for driving the rotor of the motor to rotate.
[0138] The fourth pre-positioning unit is used to control the motor driving unit to drive the rotor of the motor to rotate to the preset initial position under the current direction.
[0139] Further, the working module 220 may include: a working subunit, wherein:
[0140] The working subunit is used to control the motor driving unit to drive the motor to work if a driving instruction is received at the preset initial position.
[0141] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices and modules can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here.
[0142] In several embodiments provided in the present application, the coupling between modules may be electrical, mechanical or other forms of coupling.
[0143] In addition, each functional module in each embodiment of the present application can be integrated into a processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The above integrated modules can be implemented in the form of hardware or software functional modules.
[0144] See also Fig.15 , which shows a structural block diagram of an electronic device provided in an embodiment of the present application. The electronic device 100 may be an electronic device such as an exhaust fan, a washing machine, a hair dryer, etc. that can run an application. The electronic device 100 in the present application may include: a motor 110, a processor 120, a memory 130, and one or more applications. Among them, one or more applications may be stored in the memory 130 and configured to be executed by one or more processors 120, and one or more programs are configured to execute the method described in the aforementioned method embodiment.
[0145] The processor 120 may include one or more processing cores. The processor 120 uses various interfaces and lines to connect various parts of the entire electronic device 100, and executes various functions and processes data of the electronic device 100 by running or executing instructions, programs, code sets or instruction sets stored in the memory 130, and calling data stored in the memory 130. Optionally, the processor 120 can be implemented in at least one hardware form of digital signal processing (DSP), field-programmable gate array (FPGA), and programmable logic array (PLA). The processor 120 can integrate one or a combination of a central processing unit (CPU), a graphics processing unit (GPU), and a modem. Among them, the CPU mainly processes the operating system, user interface, and application programs; the GPU is responsible for rendering and drawing the content to be displayed; and the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 120, but may be implemented separately through a communication chip.
[0146] In some embodiments, the processor 120 may include a main control chip 102, which can control the motor drive unit to drive the rotor of the motor 110 to rotate to a preset initial position in response to an instruction instructing the drive motor 110 to work; and control the motor drive unit to drive the motor 110 to start working at the preset initial position.
[0147] The memory 130 may include a random access memory (RAM) or a read-only memory (ROM). The memory 130 may be used to store instructions, programs, codes, code sets or instruction sets. The memory 130 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the following various method embodiments, etc. The data storage area may also store data (such as audio data, temperature data, time data) created by the electronic device 100 during use.
[0148] See also Fig.16 , which shows a structural block diagram of a computer-readable storage medium provided in an embodiment of the present application. The computer-readable medium 300 stores program codes, which can be called by a processor to execute the method described in the above method embodiment.
[0149] The computer readable storage medium 300 can be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read-only memory), an EPROM, a hard disk, or a ROM. Optionally, the computer readable storage medium 300 includes a non-transitory computer-readable storage medium. The computer readable storage medium 300 has storage space for program code 310 that performs any method steps in the above method. These program codes can be read from or written to one or more computer program products. The program code 310 can be compressed, for example, in an appropriate form.
[0150] To summarize, the motor control device, motor control method, device and electronic device provided in the embodiments of the present application control the motor drive unit to drive the rotor of the motor to rotate to a preset initial position in response to an instruction instructing the drive motor to work; control the motor drive unit to drive the motor to start working at the preset initial position, and then control the motor to rotate at the preset initial position after rotating the position of the motor's rotor to a fixed preset initial position, so as to effectively avoid the motor starting dead point and improve the reliability of motor control.
[0151] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A motor control device, characterized in that: The motor control device comprises: A motor drive unit, the motor drive unit is used to connect to the motor and drive the motor to rotate; A main control chip is connected to the motor drive unit, and is used to control the motor drive unit to drive the rotor of the motor to rotate to a preset initial position in response to an instruction instructing the motor to work, and control the motor drive unit to drive the motor to start working at the preset initial position.
2. A motor control method, characterized in that: Applied to the motor control device according to claim 1, the method comprises: In response to an instruction to drive the motor to work, controlling the motor drive unit to drive the rotor of the motor to rotate to a preset initial position; The motor driving unit is controlled to drive the motor to start working at the preset initial position.
3. The method according to claim 2, characterized in that The step of controlling the motor drive unit to drive the rotor of the motor to rotate to a preset initial position includes: determining pre-positioning parameters; The motor driving unit is controlled based on the predetermined positioning parameter to drive the rotor of the motor to rotate to the preset initial position.
4. The method according to claim 3, characterized in that The predetermined positioning parameters include a driving duty cycle of the current, a duty cycle decay rate, and a waiting time. The controlling the motor drive unit to drive the rotor of the motor to rotate to the preset initial position based on the predetermined positioning parameters includes: Controlling the motor drive unit based on the driving duty ratio of the current to drive the rotor of the motor to rotate to an intermediate position, wherein the magnetic field direction of the rotor of the motor at the intermediate position coincides with the magnetic field direction of the stator of the motor; In the middle position, the driving duty ratio of the current when the motor driving unit drives the motor to rotate is controlled to decrease based on the duty ratio decay rate; The timing starts when the driving duty cycle of the current decreases to zero, and when the timing reaches the waiting time, the motor driving unit is controlled to drive the rotor of the motor to rotate to the preset initial position.
5. The method according to claim 3, characterized in that: The predetermined positioning parameters include a driving duty cycle of the current, a driving duration, a duty cycle decay rate, and a waiting duration, and the controlling the motor drive unit to drive the rotor of the motor to rotate to the preset initial position based on the predetermined positioning parameters includes: Controlling the motor drive unit to drive the motor to rotate based on the driving duty ratio of the current; When the rotation time of the motor reaches the driving time, controlling the driving duty ratio of the current when the motor driving unit drives the motor to rotate to decrease based on the duty ratio attenuation rate; The timing starts when the driving duty cycle of the current decreases to zero, and when the timing reaches the waiting time, the motor driving unit is controlled to drive the rotor of the motor to rotate to the preset initial position.
6. The method according to any one of claims 2 to 5, characterized in that: The step of controlling the motor drive unit to drive the rotor of the motor to rotate to a preset initial position includes: Determining the magnetic field direction of the stator of the motor; The motor drive unit is controlled to drive the rotor of the motor to rotate to the preset initial position under the magnetic field direction of the stator.
7. The method according to any one of claims 2 to 5, characterized in that: The step of controlling the motor drive unit to drive the rotor of the motor to rotate to a preset initial position includes: determining the direction of the current driving the rotor of the motor to rotate; The motor driving unit is controlled to drive the rotor of the motor to rotate to the preset initial position under the current direction.
8. The method according to any one of claims 2 to 5, characterized in that: The step of controlling the motor drive unit to drive the motor to start working at the preset initial position includes: If a driving instruction is received at the preset initial position, the motor driving unit is controlled to drive the motor to work.
9. A motor control device, characterized in that: Applied to the motor control device according to claim 1, the device comprising: a pre-positioning module, configured to control the motor drive unit to drive the rotor of the motor to rotate to a preset initial position in response to an instruction to drive the motor to work; The working module is used to control the motor driving unit to drive the motor to start working at the preset initial position.
10. An electronic device, characterized in that: include: Motor; one or more processors; Memory; One or more application programs, wherein the one or more application programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs are configured to execute the method according to any one of claims 2 to 8.
11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores program codes, which can be called by a processor to execute the method according to any one of claims 2 to 8.