Motor position deviation acquisition method
By obtaining the preset voltage and counting the number of times of the motor, controlling the motor rotation, obtaining and calculating the position deviation, the position sensor deviation problem of the permanent magnet synchronous motor is solved, and the motor control accuracy and performance are improved.
Patent Information
- Application Number
- CN202211014512.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-23
- Publication Date
- 2025-09-09
- Estimated Expiration
- 2042-08-23
AI Technical Summary
There is a deviation between the output of the existing permanent magnet synchronous motor position sensor and the actual position of the motor, which affects the control effect and performance indicators.
By obtaining the preset voltage and statistical number of motors, the motor rotation is controlled, the first phase voltage, the second phase voltage and the deflection angle are obtained, and when the conditions are met, the angle is stored and the position deviation is calculated. The position deviation of the motor is calculated using the formula.
Quickly and effectively obtain motor position deviation, improve motor control accuracy and performance, reduce hardware costs, and simplify operations.
Smart Images

Figure CN115224987B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of AC motor control, and in particular to a method for obtaining a motor position deviation. Background Art
[0002] Permanent magnet synchronous motors (PMSMs), with their simple structure, high power density, and excellent dynamic performance, have been widely used in transportation, defense, industrial automation, and other fields. Accurately determining the motor position is crucial for PMSM control systems. For position servo systems, the control task, broken down to the PMSM control layer, is to adjust the motor rotor position to the desired angle. If the motor position cannot be accurately determined, the control results will inevitably be inaccurate. Furthermore, control strategies commonly used for PMSMs, such as vector control and direct torque control, rely on the coordinate transformation from a three-phase stationary coordinate system to a two-phase rotating coordinate system. This significantly simplifies the mathematical model of the PMSM and reduces the coupling between different parameters. The key parameter in this coordinate transformation is the rotor position.
[0003] Permanent magnet synchronous motor position detection is primarily accomplished using position sensors. Currently, photoelectric encoders and resolvers are widely used. The former uses photoelectric conversion to map the motor's angular displacement into a corresponding digital code. The control system then analyzes and processes the encoded signal to extract motor position information. The latter is a special transformer whose primary and secondary sides' relative positions change as the motor rotates. Position information is extracted by mapping the relative position to the input and output signals. Whether using a photoelectric encoder or a resolver, due to factors such as the actual installation process, detection methods, and product consistency, there is inevitably a deviation between the position sensor output and the actual motor position, affecting the control effectiveness and performance of the permanent magnet synchronous motor. Summary of the Invention
[0004] The first embodiment of the present application proposes a method for obtaining a motor position deviation, which can quickly and efficiently obtain the deviation of the motor position so as to improve the motor control accuracy and control performance.
[0005] The first aspect of the present application provides a method for obtaining a motor position deviation, including: obtaining a preset voltage and a preset statistical number of times of the motor; controlling the rotation of the motor by an external force, and obtaining a first phase voltage, a second phase voltage and a motor deflection angle of the motor; if the first phase voltage, the second phase voltage and the preset voltage meet a first preset condition, the motor deflection angle is stored in a motor deflection angle set, and the current statistical number is obtained; if the current statistical number is greater than or equal to the preset statistical number, the position deviation of the motor is calculated based on the motor deflection angle set and the preset statistical number.
[0006] According to the motor position deviation acquisition method of the embodiment of the present application, the preset voltage and preset statistical number of the motor are first obtained, and the motor rotation is controlled by external force to obtain the first phase voltage, second phase voltage, motor deflection angle and current statistical number of the motor. If the first phase voltage, second phase voltage and preset voltage meet the first preset condition, the motor deflection angle is stored in the motor deflection angle set. If the current statistical number is greater than or equal to the preset statistical number, the position deviation of the motor is calculated based on the motor deflection angle set and the preset statistical number. In this way, the deviation of the rotor position (i.e., the position deviation of the motor) can be obtained quickly and efficiently, so as to improve the motor control accuracy and control performance.
[0007] In addition, the motor position deviation acquisition method according to the above embodiment of the present application may also have the following additional technical features:
[0008] In one embodiment of the present application, after obtaining the preset voltage and the preset statistical times of the motor, the method further includes: disconnecting an external drive circuit of the motor.
[0009] In one embodiment of the present application, the above-mentioned motor position deviation acquisition method also includes: if the first phase voltage, the second phase voltage and the preset voltage do not meet the first preset condition, then re-acquiring the first phase voltage, the second phase voltage and the motor deflection angle of the motor.
[0010] In one embodiment of the present application, if the first phase voltage, the second phase voltage and the preset voltage meet a first preset condition, the deflection angle is stored in the motor deflection angle set, and the current statistical number is obtained, including: if the absolute value of the first phase voltage is less than the preset voltage, and the second phase voltage is greater than the preset voltage, the deflection angle is stored in the motor deflection angle set, and the current statistical number is obtained.
[0011] In one embodiment of the present application, the above-mentioned motor position deviation acquisition method also includes: if the current statistical number is less than the preset statistical number, controlling the current statistical number +1 to generate a new current statistical number, and re-acquiring the first phase voltage, second phase voltage and motor deflection angle of the motor.
[0012] In one embodiment of the present application, after obtaining the preset voltage and the preset statistical times of the motor, the method further includes: creating the motor deflection angle set.
[0013] In one embodiment of the present application, the position deviation of the motor is calculated by the following formula:
[0014]
[0015] Wherein, δ is the position deviation of the motor, m is the preset statistical number, k is the storage value sequence number of the motor deflection angle set, and fk is the kth storage value in the motor deflection angle set.
[0016] In one embodiment of the present application, if the first phase voltage, the second phase voltage and the preset voltage do not meet the first preset condition, the first phase voltage, the second phase voltage and the motor deflection angle of the motor are reacquired, including: if the absolute value of the first phase voltage is greater than or equal to the preset voltage, or the second phase voltage is less than or equal to the preset voltage, then the first phase voltage, the second phase voltage and the motor deflection angle of the motor are reacquired.
[0017] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:
[0019] Figure 1 This is a flow chart of a method for obtaining a motor position deviation according to one embodiment of the present application;
[0020] Figure 2 This is a flow chart of a method for obtaining a motor position deviation according to a specific example of the present application;
[0021] Figure 3 1 is a diagram showing calculation results of motor position deviation according to one embodiment of the present application;
[0022] Figure 4 This is a result diagram after motor position deviation compensation according to one embodiment of the present application;
[0023] Figure 5 Graph showing the error results before and after motor position deviation compensation according to one embodiment of the present application. DETAILED DESCRIPTION
[0024] The following describes in detail embodiments of the present application, examples of which 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 intended to be used to explain the present application, and should not be construed as limiting the present application.
[0025] The following describes a method for obtaining a motor position deviation according to an embodiment of the present application with reference to the accompanying drawings.
[0026] The motor position deviation acquisition method provided in the embodiment of the present application can be executed by an electronic device, and the electronic device can be a PC (Personal Computer), a tablet computer, etc., without any limitation here.
[0027] In an embodiment of the present application, an electronic device may be provided with a processing component, a storage component, and a drive component. Optionally, the drive component and the processing component may be integrated, the storage component may store an operating system, an application program, or other program modules, and the processing component implements the motor position deviation acquisition method provided in an embodiment of the present application by executing the application program stored in the storage component.
[0028] Figure 1 1 is a flow chart of a method for obtaining a motor position deviation according to an embodiment of the present application.
[0029] The motor position deviation acquisition method of the embodiment of the present application can be executed by the above-mentioned electronic device to obtain the preset voltage and preset statistical number of the motor, and control the rotation of the motor through external force, as well as obtain the first phase voltage, second phase voltage, motor deflection angle and current statistical number of the motor. If the first phase voltage, second phase voltage and preset voltage meet the first preset condition, the motor deflection angle is stored in the motor deflection angle set. If the current statistical number is greater than or equal to the preset statistical number, the position deviation of the motor is calculated based on the motor deflection angle set and the preset statistical number, so that the deviation of the motor position (i.e., the position deviation of the motor) can be obtained quickly and efficiently, thereby improving the motor control accuracy and control performance.
[0030] As a possible scenario, the motor position deviation acquisition method of the embodiment of the present application can also be executed on the server side. The server can be a cloud server, and the motor position deviation acquisition method can be executed on the cloud.
[0031] like Figure 1 As shown, the motor position deviation acquisition method may include:
[0032] Step 101: Obtain a preset voltage and a preset number of statistical counts for the motor. Both the preset voltage and the preset number of statistical counts can be calibrated based on actual conditions. The preset voltage can be set to a relatively small value, such as 0.001. Furthermore, the preset number of statistical counts can be set based on actual conditions, such as 20, to automatically exit the subsequent screening algorithm.
[0033] It should be noted that the preset statistical times described in this embodiment have a great influence on the analysis accuracy of the position deviation. The larger the value, the higher the deviation analysis accuracy, but the more computing resources of the electronic device are occupied. Therefore, the preset voltage and the preset statistical times can be set according to actual conditions (for example, they can be calibrated according to the computing power of the electronic device).
[0034] In an embodiment of the present application, the above-mentioned motor may be a permanent magnet synchronous motor, which can be controlled by an electronic device connected thereto (for example, a computer). In order to facilitate understanding of the various embodiments of the present application, the motor will be explained below as a permanent magnet synchronous motor.
[0035] It should be noted that the preset voltage and preset statistical times described in this embodiment can be pre-set by relevant personnel in the above-mentioned electronic device, for example, the preset voltage and preset statistical times can be set for the motor position deviation acquisition software installed in the electronic device.
[0036] Specifically, when the motor position deviation needs to be obtained, the electronic device may first obtain the preset voltage and preset statistical times of the motor through built-in motor position deviation obtaining software.
[0037] Step 102 : Control the motor to rotate by external force, and obtain the first phase voltage, the second phase voltage, and the motor deflection angle of the motor.
[0038] In order to clearly illustrate the above embodiment, in one embodiment of the present application, after obtaining the preset voltage and the preset statistical number of times of the motor, the method may further include disconnecting the external drive circuit of the motor.
[0039] It should be noted that before controlling the rotation of the motor by external force, it is necessary to first disconnect the external drive circuit of the motor so that the three-phase winding of the motor is in an open-circuit state, and then control the rotation of the motor by external force, wherein the external force can be used to continuously rotate the motor shaft by manual or other mechanical power transmission. For example, in order to reduce the experimental cost, the motor shaft can be driven to rotate manually during the experiment. In addition, in order to reduce the labor intensity of relevant personnel, the motor shaft can be driven to rotate by mechanical transmission. For example, the external drive member can be connected to the motor shaft through a coupling to drive the motor shaft to rotate, wherein the external drive member can be selected as a motor, and the external drive member can be connected to the above-mentioned electronic device to control the external drive member through the electronic device.
[0040] In an embodiment of the present application, a first-phase voltage and a second-phase voltage of a motor can be obtained by a voltage sensor, and a motor deflection angle can be obtained by a position sensor. The position sensor can be disposed on the motor shaft to facilitate acquisition of the motor deflection angle, and the voltage sensor can be disposed on the motor to acquire the first-phase voltage and the second-phase voltage of the motor.
[0041] It should be noted that the position sensor and voltage sensor described in this embodiment can be connected to the electronic device using a copper cable with a DuPont connector. The multiple sensors acquire (collect) parameters of the first phase voltage, the second phase voltage, and the motor deflection angle in real time and transmit them to the electronic device via the copper cable. Furthermore, after receiving these parameters, the electronic device can save them for subsequent access.
[0042] Specifically, after obtaining the preset voltage and preset statistical counts of the motor, the electronic device can first disconnect the motor's external drive circuit through relevant software, leaving the motor's three-phase windings in an open-circuit state. It then activates the position sensor and voltage sensor, and controls the rotation of the motor's shaft through relevant mechanical equipment. As the motor rotates, its position continuously changes. At this time, the electronic device can obtain the outputs of the position sensor and voltage sensor in real time at a certain frequency, thereby collecting the motor's first-phase voltage, second-phase voltage, and motor deflection angle.
[0043] Step 103: If the first phase voltage, the second phase voltage, and the preset voltage meet a first preset condition, the motor deflection angle is stored in the motor deflection angle set, and the current statistical number is obtained. The first preset condition can be calibrated according to actual conditions.
[0044] To clearly illustrate the above embodiment, in one embodiment of the present application, after obtaining the preset voltage and the preset statistical times of the motor, it may further include creating a motor deflection angle set.
[0045] Specifically, after obtaining the preset voltage and preset statistical times of the motor, the electronic device may first create a motor deflection angle set to facilitate subsequent storage of the motor deflection angle obtained each time.
[0046] In one embodiment of the present application, if the first phase voltage, the second phase voltage and the preset voltage meet the first preset condition, the deflection angle is stored in the motor deflection angle set and the current statistical number is obtained. It may include if the absolute value of the first phase voltage is less than the preset voltage and the second phase voltage is greater than the preset voltage, the deflection angle is stored in the motor deflection angle set and the current statistical number is obtained.
[0047] Specifically, after obtaining the first phase voltage, second phase voltage and motor deflection angle of the above-mentioned motor, the electronic device can first determine whether the absolute value of the first phase voltage is less than the preset voltage, and whether the second phase voltage is greater than the preset voltage. If the absolute value of the first phase voltage is less than the preset voltage and the second phase voltage is greater than the preset voltage, it means that the first phase voltage, the second phase voltage and the preset voltage meet the first preset condition. At this time, the electronic device can directly store the above-mentioned deflection angle in the motor deflection angle set and obtain the current statistical number.
[0048] It should be noted that the current statistical number described in this embodiment may be equal to the number of times the first phase voltage, the second phase voltage and the preset voltage meet the first preset condition, wherein the initial value of the current statistical number may be 1.
[0049] In order to further clarify the previous embodiment, in one embodiment of the present application, the above-mentioned motor position deviation acquisition method may also include re-acquiring the first phase voltage, the second phase voltage and the motor deflection angle of the motor if the first phase voltage, the second phase voltage and the preset voltage do not meet the first preset condition.
[0050] Specifically, if the first phase voltage, the second phase voltage and the preset voltage do not meet the first preset condition, the first phase voltage, the second phase voltage and the motor deflection angle of the motor are re-acquired, which may include if the absolute value of the first phase voltage is greater than or equal to the preset voltage, or the second phase voltage is less than or equal to the preset voltage, then the first phase voltage, the second phase voltage and the motor deflection angle of the motor are re-acquired.
[0051] Specifically, after obtaining the first phase voltage, second phase voltage and motor deflection angle of the above-mentioned motor, the electronic device can first determine whether the absolute value of the first phase voltage is less than the preset voltage, and whether the second phase voltage is greater than the preset voltage. If the absolute value of the first phase voltage is greater than or equal to the preset voltage, or the second phase voltage is less than or equal to the preset voltage, it means that the first phase voltage, the second phase voltage and the preset voltage do not meet the first preset condition. At this time, the electronic device can re-acquire the first phase voltage, the second phase voltage and the motor deflection angle of the motor, and judge the first preset condition based on the re-acquired first phase voltage and second phase voltage of the motor until the re-acquired first phase voltage and second phase voltage of the motor meet the first preset condition.
[0052] Step 104 : If the current statistical number is greater than or equal to the preset statistical number, the position deviation of the motor is calculated according to the motor deflection angle set and the preset statistical number.
[0053] To further clarify the above embodiment, in one embodiment of the present application, the position deviation of the motor can be calculated by the following formula (1):
[0054]
[0055] Wherein, δ may be the position deviation of the motor, m may be the preset statistical number, k may be the storage value sequence number of the motor deflection angle set, and fk may be the kth storage value in the motor deflection angle set.
[0056] It should be noted that k described in this example is the storage value sequence number of the motor deflection angle set, that is, the storage value sequence number is equal to the current statistical number, and fk is the kth storage value in the motor deflection angle set, that is, fk is equal to the position sensor output θ (motor deflection angle).
[0057] Specifically, after obtaining the current statistical number, the electronic device can first determine whether the current statistical number is greater than or equal to the preset statistical number. If so, the electronic device can substitute the motor deflection angle set and the preset statistical number into the above formula (1) through the built-in motor position deviation acquisition software to calculate the motor position deviation. In this way, the motor position deviation can be obtained quickly and efficiently, so as to improve the motor control accuracy and control performance.
[0058] In addition, in one embodiment of the present application, the above-mentioned motor position deviation acquisition method may also include controlling the current statistical number +1 to generate a new current statistical number if the current statistical number is less than the preset statistical number, and re-acquiring the first phase voltage, second phase voltage and motor deflection angle of the motor.
[0059] Specifically, after obtaining the current statistical number, the electronic device can first determine whether the current statistical number is greater than or equal to the preset statistical number. If not, it means that the current statistical number is less than the preset statistical number. At this time, the electronic device controls the current statistical number +1 to generate a new current statistical number, and re-obtains the first phase voltage, second phase voltage and motor deflection angle of the motor, and performs the judgment of the next cycle until the current statistical number is greater than or equal to the preset statistical number.
[0060] In summary, according to the motor position deviation acquisition method of the embodiment of the present application, the preset voltage and preset statistical times of the motor are first obtained through an electronic device, and the motor rotation is controlled by an external force to obtain the first phase voltage, second phase voltage, and motor deflection angle of the motor. If the first phase voltage, second phase voltage, and preset voltage meet the first preset condition, the motor deflection angle is stored in the motor deflection angle set, and the current statistical times are obtained. If the current statistical times are greater than or equal to the preset statistical times, the position deviation of the motor is calculated based on the motor deflection angle set and the preset statistical times. Thus, the output information of the position sensor can be screened and analyzed through certain voltage discrimination conditions to obtain the motor position deviation. This method does not add additional hardware and has the characteristics of low cost and easy operation. The position deviation solved by this method is used to compensate the sensor output, refer to Figure 3 、 Figure 4 and Figure 5 As shown, the accurate motor position can be obtained, thereby improving the motor control performance and control accuracy.
[0061] In order to make those skilled in the art understand the present invention more clearly, Figure 2 : is a flowchart of a method for obtaining a motor position deviation according to a specific example of the present invention. The preset voltage can be represented by z, the preset statistical number can be represented by m, the first phase voltage can be represented by UA, the second phase voltage can be represented by UB, the motor deflection angle can be represented by θ, the current statistical number can be represented by k, and the motor position deviation can be represented by δ. Figure 2 As shown, the motor position deviation acquisition method may include the following steps:
[0062] S101, obtaining a preset voltage and a preset statistical number of times of the motor.
[0063] S102, controlling the motor to rotate by external force, and obtaining UA, UB and θ of the motor.
[0064] S103, determine whether |UA |<z. If so, execute step S104; if not, return to step S102.
[0065] S104: Determine whether UB > z. If so, proceed to step S105; if not, return to step S102.
[0066] S105, storing θ into the motor deflection angle set, and obtaining k.
[0067] S106, determine k≥m. If yes, execute step S108; if not, execute step S107 and return to step S102.
[0068] S108, calculate δ.
[0069] In summary, according to the motor position deviation acquisition method of the embodiment of the present application, the motor's z and m are acquired through electronic equipment. Then, the motor's rotation is controlled by an external force to obtain the motor's UA , UB , and θ. First, a determination is made whether |UA | < z. If so, a determination is made whether UB > z. If so, θ is stored in the motor deflection angle set and k is obtained. Then, a determination is made whether k ≥ m. If so, δ is calculated. This allows for quick and efficient acquisition of motor position deviation, thereby improving motor control accuracy and performance.
[0070] In the description of this specification, the terms "first" and "second" are used for descriptive purposes only and should not be understood to indicate or imply relative importance or implicitly specify the number of the technical features indicated. Therefore, a feature specified as "first" or "second" may explicitly or implicitly include at least one of such features. In the description of this application, "plurality" means at least two, for example, two, three, etc., unless otherwise specifically defined.
[0071] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art can combine and combine different embodiments or examples described in this specification and features of different embodiments or examples without contradiction.
[0072] Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limitations on the present application. Ordinary technicians in this field can change, modify, replace and modify the above embodiments within the scope of the present application.
Claims
1. A method for obtaining a motor position deviation, characterized in that: include: Get the preset voltage and preset statistical times of the motor; Controlling the rotation of the motor by an external force, and obtaining a first phase voltage, a second phase voltage, and a motor deflection angle of the motor; If the first phase voltage, the second phase voltage, and the preset voltage meet a first preset condition, the motor deflection angle is stored in a motor deflection angle set, and a current statistical number is obtained; If the current statistical number is greater than or equal to the preset statistical number, calculating the position deviation of the motor according to the motor deflection angle set and the preset statistical number; If the first phase voltage, the second phase voltage, and the preset voltage meet a first preset condition, the deflection angle is stored in a motor deflection angle set, and a current statistical number is obtained, including: If the absolute value of the first phase voltage is less than the preset voltage, and the second phase voltage is greater than the preset voltage, the deflection angle is stored in the motor deflection angle set, and the current statistical number is obtained; The position deviation of the motor is calculated using the following formula: Wherein, δ is the position deviation of the motor, m is the preset statistical number, k is the stored value sequence number of the motor deflection angle set, and f k is the kth stored value in the motor deflection angle set.
2. The method for obtaining the motor position deviation according to claim 1, wherein: After obtaining the preset voltage and the preset statistical times of the motor, the method further includes: Disconnect the external drive circuit of the motor.
3. The method for obtaining the motor position deviation according to claim 1, wherein: Also includes: If the first phase voltage, the second phase voltage and the preset voltage do not meet the first preset condition, the first phase voltage, the second phase voltage and the motor deflection angle of the motor are reacquired.
4. The method for obtaining the motor position deviation according to claim 1, wherein: Also includes: If the current statistical number is less than the preset statistical number, the current statistical number is controlled to be +1 to generate a new current statistical number, and the first phase voltage, the second phase voltage and the motor deflection angle of the motor are re-acquired.
5. The method for obtaining the motor position deviation according to claim 1, wherein: After obtaining the preset voltage and the preset statistical times of the motor, the method further includes: Create the motor yaw angle set.
6. The method for obtaining the motor position deviation according to claim 3, wherein: If the first phase voltage, the second phase voltage, and the preset voltage do not satisfy the first preset condition, reacquiring the first phase voltage, the second phase voltage, and the motor deflection angle of the motor, including: If the absolute value of the first phase voltage is greater than or equal to the preset voltage, or the second phase voltage is less than or equal to the preset voltage, the first phase voltage, the second phase voltage and the motor deflection angle of the motor are reacquired.
Citation Information
Patent Citations
Rotor position estimation and correction method for permanent magnet synchronous generator
CN101505130A
Motor rotor position correcting method, device and equipment thereof and storage medium
CN107947649A