Motor driving method, device, chip and electronic equipment
By obtaining the electrical angle of the back electromotive force of the motor and finding the signal modulation value, the driving signal is synthesized to drive the motor, and the problem of low calculation efficiency of the vector control method at high speed is solved, and more efficient motor driving is achieved.
Patent Information
- Application Number
- CN202210755523.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-28
- Publication Date
- 2024-12-13
- Estimated Expiration
- 2042-06-28
AI Technical Summary
In motor driving technology, the vector control method using magnetic field-oriented control is low in calculation efficiency at high speeds, resulting in the inability to effectively drive the motor to maintain high speeds.
By obtaining the electrical angle of the back electromotive force of the motor, and finding the corresponding signal modulation value based on the mapping relationship between the electrical angle and the signal modulation value in the preset data table, the driving signal is synthesized to drive the motor, simplifying the calculation process and improving the vector control method computing efficiency.
It reduces the difficulty of the algorithm, improves the calculation efficiency of the motor drive, and can maintain high speed more effectively.
Smart Images

Figure CN115021627B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of motor drive technology, and in particular to a motor drive method, device, chip and electronic equipment. Background Art
[0002] In the field of motor drive technology, permanent magnet brushless DC motors are divided into two categories according to the drive mode: square wave drive motors, namely brushless DC motors (Brushless Direct Current Motor, BLDCM), and motors using field-oriented control (Field-Oriented Control, FOC), namely permanent magnet synchronous motors (PMSM). Among them, FOC is a motor vector control method that achieves precise control of the motor by controlling the size and direction of the magnetic field, making the motor run smoothly, with low noise, constant torque, fast response speed, and no low-speed creep. However, when the motor is at high speed, the calculation efficiency of the vector control method using FOC is low, resulting in the inability to drive the motor to maintain a high speed. Summary of the invention
[0003] In view of this, the present application provides a motor driving method, device, chip and electronic device, which improves the calculation efficiency of the vector control method by reducing the algorithm difficulty, which is conducive to driving the motor to maintain a high speed.
[0004] The present invention provides a motor driving method, comprising the following steps:
[0005] Get the electrical angle of the motor's back electromotive force;
[0006] According to the mapping relationship between the electrical angle and the signal modulation value in the preset data table, searching for the signal modulation value of the electrical angle corresponding to the back electromotive force of the motor;
[0007] A driving signal is synthesized according to a preset driving voltage and the found signal modulation value, and the driving signal is used to drive the motor to a working state.
[0008] Optionally, the updating method of the preset data table includes:
[0009] When the motor is in a working state, a driving signal of the motor is acquired, and the driving signal is analyzed to obtain a signal modulation value and an electrical angle after analysis;
[0010] According to the analyzed signal modulation value and the electrical angle, the mapping relationship between the electrical angle and the signal modulation value in the preset data table is updated.
[0011] Optionally, obtaining the electrical angle of the motor back electromotive force includes:
[0012] Acquire each phase current of the motor;
[0013] Determine the electrical angle of the phase difference between each phase current each time the motor rotates, and determine the rotation speed of the motor;
[0014] The electrical angle of the motor back electromotive force is determined according to the interval electrical angle and the rotation speed.
[0015] Optionally, determining the electrical angle of the phase difference between each phase current each time the motor rotates includes:
[0016] Detecting each phase current of the motor;
[0017] When it is detected that the phase current of the motor is equal to a preset detection value, the electrical angle of the phase current is set to a preset value corresponding to the phase current;
[0018] The above steps are executed repeatedly until the electrical angle of each phase current of the motor is set to a corresponding preset value;
[0019] After the electrical angle of each phase current is set, the difference between the electrical angles of each phase current is used as the interval electrical angle.
[0020] Optionally, determining the rotation speed of the motor includes:
[0021] When it is detected that the phase current of the motor is equal to a preset detection value, the time and the number of rotations of the motor are recorded;
[0022] The rotation speed of the motor is determined according to the time and the number of rotations.
[0023] The present application provides a motor drive device, including:
[0024] The acquisition module is used to obtain the electrical angle of the motor back electromotive force;
[0025] A modulation module, used for searching the signal modulation value of the electrical angle corresponding to the back electromotive force of the motor according to the mapping relationship between the electrical angle and the signal modulation value in a preset data table;
[0026] The control module is used to synthesize a driving signal according to a preset driving voltage and the found signal modulation value, and use the driving signal to drive the motor to a working state.
[0027] Optionally, an update module is further included, wherein the update module is used to:
[0028] When the motor is in a working state, a driving signal of the motor is acquired, and the driving signal is analyzed to obtain a signal modulation value and an electrical angle after analysis;
[0029] According to the analyzed signal modulation value and the electrical angle, the mapping relationship between the electrical angle and the signal modulation value in the preset data table is updated.
[0030] Optionally, the acquisition module further includes a detection unit, and the detection unit is used to:
[0031] Acquire each phase current of the motor;
[0032] Determine the electrical angle of the phase difference between each phase current each time the motor rotates, and determine the rotation speed of the motor;
[0033] The electrical angle of the motor back electromotive force is determined according to the interval electrical angle and the rotation speed.
[0034] Optionally, the detection unit includes a first detection subunit, and the first detection subunit is used to:
[0035] Detecting each phase current of the motor;
[0036] When it is detected that the phase current of the motor is equal to a preset detection value, the electrical angle of the phase current is set to a preset value corresponding to the phase current;
[0037] The above steps are executed repeatedly until the electrical angle of each phase current of the motor is set to a corresponding preset value;
[0038] After the electrical angle of each phase current is set, the difference between the electrical angles of each phase current is used as the interval electrical angle.
[0039] Optionally, the detection unit includes a second detection subunit, and the second detection subunit is used to:
[0040] When it is detected that the phase current of the motor is equal to a preset detection value, the time and the number of rotations of the motor are recorded;
[0041] The rotation speed of the motor is determined according to the time and the number of rotations.
[0042] An embodiment of the present application provides a chip for executing the motor driving method as described above.
[0043] An embodiment of the present application provides an electronic device, comprising the chip as described above.
[0044] Compared with the prior art, the embodiments of the present application have the following beneficial effects:
[0045] The motor driving method, device, chip and electronic device provided by the embodiments of the present application, wherein the motor driving method comprises: obtaining the electrical angle of the motor back electromotive force; searching for the signal modulation value corresponding to the electrical angle of the motor back electromotive force according to the mapping relationship between the electrical angle and the signal modulation value in the preset data table; synthesizing the driving signal according to the preset driving voltage and the found signal modulation value, and using the driving signal to drive the motor to be in a working state. It can be seen that this embodiment searches for the preset data table that stores the mapping relationship between the electrical angle and the signal modulation value according to the acquired electrical angle, obtains the signal modulation value to synthesize the driving signal that drives the motor to be in a working state, saves the step of calculating the signal modulation value, reduces the difficulty of the algorithm, improves the calculation efficiency of the vector control method, and is conducive to driving the motor to maintain a high speed. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Figure 1 is a first flow chart of the motor driving method provided in an embodiment of the present application;
[0047] Figure 2 is a second flow chart of the motor driving method provided in an embodiment of the present application;
[0048] Figure 3 is a third flow chart of the motor driving method provided in an embodiment of the present application;
[0049] Figure 4 is a fourth flow chart of the motor driving method provided in an embodiment of the present application;
[0050] Figure 5 is a fifth flow chart of the motor driving method provided in an embodiment of the present application;
[0051] Figure 6 It is a schematic diagram of the structure of the motor drive device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0052] The technical solutions in the embodiments of the present application are clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present application. In the absence of conflict, the following embodiments and their technical features can be combined with each other.
[0053] This application provides a motor driving method, see Figure 1 , Figure 1 1 is a schematic diagram of a first process flow of a motor driving method provided in an embodiment of the present application. The motor driving method includes:
[0054] S1. Get the electrical angle of the motor's back electromotive force.
[0055] It is understandable that according to the laws of electromagnetics, when the magnetic field changes, the nearby conductor will generate an induced electromotive force, the direction of which conforms to Faraday's law and Lenz's law, and is exactly opposite to the voltage originally applied to both ends of the coil. This voltage is the back electromotive force. The motor's rotor rotates to cut the magnetic lines of force to generate an induced electromotive force, the direction of which is opposite to the external voltage, so it is called the motor back electromotive force.
[0056] S2. According to the mapping relationship between the electrical angle and the signal modulation value in the preset data table, find the signal modulation value of the electrical angle corresponding to the back electromotive force of the motor.
[0057] It is understandable that the driving signal can be an analog signal or a digital signal, and usually a digital signal is used, that is, a digital control signal PWM or a digital control signal SVPWM. In this embodiment, the preset data table is a fitting SVPWM lookup table for storing normalized SVPWM values corresponding to electrical angles.
[0058] S3. Synthesize a driving signal according to a preset driving voltage and the found signal modulation value, and use the driving signal to drive the motor to a working state.
[0059] In this embodiment, the motor of this embodiment is controlled according to the FOC vector. For a three-phase motor, the drive signal is SVPWM, and the drive signal SVPWM is synthesized according to the signal modulation value of the drive signal SVPWM and the preset drive voltage. When driving the motor, the vector direction changes continuously, so it is necessary to continuously calculate the vector action time, and SVPWM is used to control different vector action time ratios to synthesize the required voltage vector. The output torque output when the drive signal SVPWM controls the motor in the working state is determined by the preset drive voltage, and the preset drive voltage is usually set to the maximum drive voltage.
[0060] It can be understood that this embodiment searches for a preset data table that stores the mapping relationship between the electrical angle and the signal modulation value based on the acquired electrical angle, obtains the signal modulation value to synthesize the drive signal that drives the motor in a working state, saves the step of calculating the signal modulation value, reduces the difficulty of the algorithm, improves the computational efficiency of the vector control method, and is beneficial for the drive motor to maintain a high speed.
[0061] It is understandable that there are many ways to obtain the electrical angle of the motor back electromotive force. The present application provides some embodiments to obtain the electrical angle of the motor back electromotive force.
[0062] In one embodiment, the rotor of the motor rotates to cut the magnetic lines of force, thereby obtaining the back electromotive force of the motor, and then obtaining the electrical angle of the back electromotive force of the motor.
[0063] This application provides another embodiment, please refer to Figure 2 , Figure 2 is a second flow chart of the motor driving method provided in an embodiment of the present application. In this embodiment, obtaining the electrical angle of the motor back electromotive force includes:
[0064] S11. Obtain each phase current of the motor.
[0065] It is understandable that the motor data is collected by collecting the sampling results of the phase current, or by using a HALL sensor or encoder, that is, each phase current of the motor is obtained, for example, the first phase current, the second phase current and the third phase current of the three-phase motor are obtained. Specifically, the phase current in the form of an analog signal is collected by the ADC module, and then the phase current in the form of an analog signal is converted into a phase current in the form of a digital signal.
[0066] S12, determining the electrical angle between the phase currents of each phase each time the motor rotates, and determining the rotation speed of the motor.
[0067] S13. Determine the electrical angle of the motor back electromotive force according to the interval electrical angle and the rotation speed.
[0068] It is understandable that the phase current will change every time the motor rotates. Although there will be a slight error in the electrical angle difference between each phase current each time the motor rotates, the average value of the electrical angle difference between each phase current each time the motor rotates is calculated, and the average value of the electrical angle difference is fixed, which means that the electrical angle difference is fixed. In this way, it is only necessary to determine the rotation speed of the motor to determine the average value of the electrical angle difference, and use the average value of the electrical angle difference as the electrical angle of the motor's back electromotive force, which is beneficial to improve the precision and accuracy of the electrical angle.
[0069] On this basis, the present application also provides some embodiments for determining the interval electrical angle between each phase current when the motor rotates each time as follows:
[0070] In some embodiments, the electrical angle difference between each phase current each time the motor rotates is determined by detecting the electrical angle difference between each phase current when each phase current is equal to a preset current value.
[0071] In a preferred embodiment, see Figure 3 , Figure 3 3 is a schematic diagram of a third flow chart of a motor driving method provided in an embodiment of the present application. Determining the electrical angle of the difference between each phase current when the motor rotates each time includes:
[0072] S121. Detect each phase current of the motor.
[0073] S122. When it is detected that the phase current of the motor is equal to a preset detection value, the electrical angle of the phase current is set to a preset value corresponding to the phase current.
[0074] S123, executing the above steps in a loop until the electrical angle of each phase current of the motor is set to a corresponding preset value.
[0075] S124. After setting the electrical angle of each phase current, the difference between the electrical angles of each phase current is used as the interval electrical angle.
[0076] In this embodiment, a three-phase motor is taken as an example for explanation, and the three phase currents of the three-phase motor are obtained, namely, the first phase current la, the second phase current lb and the third phase current lc. A zero point is set, and the three phase currents are respectively determined by a comparator whether they are equal to zero. When the first phase current la is equal to zero, it is determined whether the current phase angle of the first phase current la is 0° or 180°. If it is 0°, the first phase current la is determined to be 0°. If it is 180°, the first phase current la is determined to be 180°. If it is neither 0° nor 180°, the first phase current la is determined to be 0° or 180°. Similarly, the second phase current lb is determined to be 120° or 300°, and the third phase current lc is determined to be 60° or 240°. In a specific application scenario, the first phase current la is determined to be 0°, the second phase current lb is determined to be 120°, and the third phase current lc is determined to be 60°. The difference between the electrical angles of each phase current is 60°, and the interval electrical angle of the three-phase motor is 60°. It can be seen that this embodiment can greatly simplify the calculation process of the interval electrical angle, which is beneficial to improving the calculation speed and at the same time improving the calculation accuracy of the interval electrical angle of the three-phase motor.
[0077] Also, see Figure 4 , Figure 4 4 is a schematic diagram of a fourth process flow of a motor driving method provided in an embodiment of the present application. The present application also provides some embodiments for determining the rotation speed of the motor as follows:
[0078] Optionally, determining the rotation speed of the motor includes:
[0079] S125. When it is detected that the phase current of the motor is equal to a preset detection value, the time and the number of rotations of the motor are recorded.
[0080] S126. Determine the rotation speed of the motor according to the time and the number of rotations.
[0081] In this embodiment, a three-phase motor is taken as an example. When any one of the first phase current la, the second phase current lb and the third phase current lc is equal to zero, a calculator is used to count once, recorded as the cnt value, and cnt is saved in a buffer with a depth of n (n is 24). At this time, the data in the buffer is equivalent to the time and the number of rotations. The rotation speed of the motor can be calculated based on the time and the number of rotations of the motor.
[0082] Researchers have found that different motors have different structures, resulting in different air gap flux density distribution, damping coefficient, inductance and other motor parameters between different motors, resulting in different drive signals SVPWM for driving the motors. In order to adapt to different motors and improve the control ability of the synthesized drive signal, based on the above embodiments, this application provides an embodiment of updating the preset data table, please refer to Figure 5 , Figure 5 is a fifth flow chart of the motor driving method provided in the embodiment of the present application. In this embodiment, the updating method of the preset data table includes:
[0083] S4. When the motor is in working state, the driving signal of the motor is obtained, and the driving signal is analyzed to obtain the signal modulation value and electrical angle after analysis.
[0084] In some embodiments, for example, when the three-phase motor is in operation, the drive signal SVPWM of the three-phase motor is acquired, and the drive signal SVPWM is parsed to obtain SVPWM drive data, wherein the SVPWM drive data includes a signal modulation value and an electrical angle.
[0085] S5. Update the mapping relationship between the electrical angle and the signal modulation value in the preset data table according to the analyzed signal modulation value and the electrical angle.
[0086] According to the SVPWM driving data, that is, the signal modulation value and the electrical angle, an SVPWM lookup table of the SVPWM value corresponding to the electrical angle is fitted.
[0087] It can be understood that in this embodiment, corresponding drive signals are obtained according to different motors, and the drive signals are analyzed to obtain the signal modulation values and electrical angles of the corresponding motors; the signal modulation values and electrical angles of different motors are updated to the mapping relationship between the electrical angle and the signal modulation value in the preset data table, which is beneficial to generate corresponding signal modulation values for different motors, improve the accuracy of synthesizing the drive signal according to the signal modulation value, and in the case of replacing a new motor (the mapping relationship between the signal modulation value and the electrical angle corresponding to the new motor has been stored in the preset data table), the mapping relationship between the signal modulation value and the electrical angle corresponding to the new motor can be quickly obtained by querying the preset data table, thereby improving efficiency.
[0088] The present application embodiment provides a motor drive device, see Figure 6 , Figure 6 : is a schematic diagram of the structure of the motor drive device provided in the embodiment of the present application. The motor drive device comprises:
[0089] The acquisition module 100 is used to obtain the electrical angle of the motor back electromotive force.
[0090] The modulation module 200 is used to find the signal modulation value of the electrical angle corresponding to the back electromotive force of the motor according to the mapping relationship between the electrical angle and the signal modulation value in the preset data table.
[0091] The control module 300 is used to synthesize a driving signal according to a preset driving voltage and the found signal modulation value, and use the driving signal to drive the motor to be in a working state.
[0092] Optionally, the motor drive device further includes an updating module, wherein the updating module is used for:
[0093] When the motor is in working state, the driving signal of the motor is obtained, and the driving signal is analyzed to obtain the analyzed signal modulation value and electrical angle; according to the analyzed signal modulation value and electrical angle, the mapping relationship between the electrical angle and the signal modulation value in the preset data table is updated.
[0094] Optionally, the acquisition module further includes a detection unit, which is used to:
[0095] Obtain each phase current of the motor; determine the interval electrical angle between each phase current each time the motor rotates, and determine the rotation speed of the motor; determine the electrical angle of the motor back electromotive force based on the interval electrical angle and the rotation speed.
[0096] Optionally, the detection unit includes a first detection subunit, and the first detection subunit is used to:
[0097] Detect each phase current of the motor; when it is detected that the phase current of the motor is equal to a preset detection value, set the electrical angle of the phase current to the preset value of the corresponding phase current; repeat the above steps until the electrical angle of each phase current of the motor is set to the corresponding preset value; after setting the electrical angle of each phase current, use the difference between the electrical angles of each phase current as the interval electrical angle.
[0098] Optionally, the detection unit includes a second detection subunit, and the second detection subunit is used to:
[0099] When it is detected that the phase current of the motor is equal to the preset detection value, the time and the number of rotations of the motor are recorded; and the rotation speed of the motor is determined according to the time and the number of rotations.
[0100] An embodiment of the present application provides a chip for executing the above motor driving method.
[0101] An embodiment of the present application provides an electronic device, comprising the above chip.
[0102] It should be understood that the various parts of the present application can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0103] In addition, each functional unit in each embodiment of the present application can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into one module. The above-mentioned integrated module can be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. The storage medium can be a read-only memory, a disk or an optical disk, etc.
[0104] The above is a preferred embodiment of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications are also considered to be within the scope of protection of the present application.
Claims
1. A motor driving method, characterized in that: The steps include: Get the electrical angle of the motor's back electromotive force; According to the mapping relationship between the electrical angle and the signal modulation value in the preset data table, searching for the signal modulation value of the electrical angle corresponding to the back electromotive force of the motor; synthesizing a driving signal according to a preset driving voltage and the found signal modulation value, and using the driving signal to drive the motor to a working state; The updating method of the preset data table includes: when the motor is in a working state, obtaining a driving signal of the motor, and parsing the driving signal to obtain a signal modulation value and an electrical angle after parsing; and updating a mapping relationship between the electrical angle and the signal modulation value in the preset data table according to the parsed signal modulation value and the electrical angle; The method of obtaining the electrical angle of the motor back electromotive force includes: obtaining each phase current of the motor; determining the interval electrical angle between each phase current each time the motor rotates, and determining the rotation speed of the motor; and determining the electrical angle of the motor back electromotive force based on the interval electrical angle and the rotation speed.
2. The motor driving method according to claim 1, characterized in that: Determining the electrical angle of the phase difference between each phase current when the motor rotates each time, comprising: Detecting each phase current of the motor; When it is detected that the phase current of the motor is equal to a preset detection value, the electrical angle of the phase current is set to a preset value corresponding to the phase current; The above steps are executed repeatedly until the electrical angle of each phase current of the motor is set to a corresponding preset value; After the electrical angle of each phase current is set, the difference between the electrical angles of each phase current is used as the interval electrical angle.
3. The motor driving method according to claim 2, characterized in that: Determining the rotation speed of the motor includes: When it is detected that the phase current of the motor is equal to a preset detection value, the time and the number of rotations of the motor are recorded; The rotation speed of the motor is determined according to the time and the number of rotations.
4. A motor drive device, characterized in that: include: The acquisition module is used to obtain the electrical angle of the motor back electromotive force; A modulation module, used for searching the signal modulation value of the electrical angle corresponding to the back electromotive force of the motor according to the mapping relationship between the electrical angle and the signal modulation value in a preset data table; A control module, used to synthesize a drive signal according to a preset drive voltage and the found signal modulation value, and drive the motor to a working state using the drive signal; An updating module is used to obtain a driving signal of the motor when the motor is in a working state, and parse the driving signal to obtain a signal modulation value and an electrical angle after parsing; and update a mapping relationship between the electrical angle and the signal modulation value in the preset data table according to the signal modulation value and the electrical angle after parsing; The detection unit is used to obtain each phase current of the motor; determine the interval electrical angle between each phase current each time the motor rotates, and determine the rotation speed of the motor; and determine the electrical angle of the motor back electromotive force based on the interval electrical angle and the rotation speed.
5. The motor drive device according to claim 4, characterized in that: The detection unit comprises a first detection subunit, and the first detection subunit is used for: Detecting each phase current of the motor; When it is detected that the phase current of the motor is equal to a preset detection value, the electrical angle of the phase current is set to a preset value corresponding to the phase current; The above steps are executed repeatedly until the electrical angle of each phase current of the motor is set to a corresponding preset value; After the electrical angle of each phase current is set, the difference between the electrical angles of each phase current is used as the interval electrical angle.
6. The motor drive device according to claim 5, characterized in that: The detection unit comprises a second detection subunit, and the second detection subunit is used for: When it is detected that the phase current of the motor is equal to a preset detection value, the time and the number of rotations of the motor are recorded; The rotation speed of the motor is determined according to the time and the number of rotations.
7. A chip, characterized in that: Used to execute the motor driving method according to any one of claims 1 to 3.
8. An electronic device, characterized in that: Comprising the chip as claimed in claim 7.
