Motor cogging torque measurement method and device, motor driver and storage medium

By sending drive signals from the motor driver and receiving feedback from the encoder, combined with current measurement, the problem of inaccurate cogging torque measurement in low-speed, high-torque permanent magnet synchronous motors is solved, achieving higher precision measurement results.

CN120601793BActive Publication Date: 2026-07-21GUANGZHOU LEICHEN ELECTROMECHANICAL TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
GUANGZHOU LEICHEN ELECTROMECHANICAL TECH CO LTD
Filing Date
2024-03-05
Publication Date
2026-07-21

AI Technical Summary

Technical Problem

Existing technology cannot accurately measure the cogging torque of low-speed, high-torque permanent magnet synchronous motors, resulting in inaccurate measurement results.

Method used

By sending continuous drive signals to the motor under test through a motor driver, including sub-signals for running to and stabilizing at a specified position, and combining encoder feedback and current value measurement, the cogging torque is calculated, thus avoiding dependence on the prime mover and the need for low-speed stabilization.

Benefits of technology

It improves the measurement accuracy of cogging torque of low-speed, high-torque permanent magnet synchronous motors, reduces measurement costs, avoids the impact of speed fluctuations on measurement accuracy at low speeds, and achieves higher measurement performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120601793B_ABST
    Figure CN120601793B_ABST
Patent Text Reader

Abstract

Embodiments of the present application disclose a motor cogging torque measurement method and device, a motor driver and a storage medium. The method comprises: sequentially sending a plurality of continuous driving signals to a motor to be measured, each driving signal comprising a first sub-signal and a second sub-signal, the first sub-signal being sent before the second sub-signal, the first sub-signal being used to make the motor to be measured run to a first position, and the second sub-signal being used to make the motor to be measured stabilize at the first position; after each time the second sub-signal is started to be sent, a current value of a q-axis is obtained after a first time interval; and after the motor to be measured runs one position cycle based on the plurality of driving signals, the cogging torque of the motor to be measured at each first position is obtained based on the current value corresponding to each first position and the flux linkage of the motor to be measured. The above method can solve the technical problem that the original motor cannot accurately measure the cogging torque of a permanent magnet synchronous motor with low speed and large torque in the related art.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of permanent magnet synchronous motor technology, and in particular to a method, device, motor driver, and storage medium for measuring motor cogging torque. Background Technology

[0002] Cogging torque is a phenomenon in permanent magnet synchronous motors (PMSMs). It is the torque generated in the circumferential direction by the interaction between the magnetic field of the permanent magnet and the cogging teeth of the armature core when the motor windings are not energized. Cogging torque is an important indicator for evaluating the quality of motor design and manufacturing processes. Measuring cogging torque can verify the product quality of a PMSM. In related technologies, cogging torque of PMSMs is measured using a prime mover; however, this method is not suitable for low-speed, high-torque PMSMs, as it can lead to inaccurate measurement results. Summary of the Invention

[0003] This application provides a method, device, motor driver, and storage medium for measuring the cogging torque of a motor, in order to solve the technical problem in related technologies where the cogging torque of a low-speed, high-torque permanent magnet synchronous motor cannot be accurately measured using a prime mover.

[0004] In a first aspect, one embodiment of this application provides a method for measuring the cogging torque of a motor, applied to a motor driver, the method comprising:

[0005] A series of consecutive drive signals are sent to the motor under test in sequence. Each drive signal includes a first sub-signal and a second sub-signal. The first sub-signal is sent before the second sub-signal. Each drive signal corresponds to a first position. The first sub-signal is used to make the motor under test move to the corresponding first position, and the second sub-signal is used to make the motor under test stabilize at the corresponding first position.

[0006] After each transmission of the second sub-signal, the current value of the q-axis is obtained after a first time interval, where the first time interval is less than the duration of continuous transmission of the second sub-signal.

[0007] After determining that the motor under test has operated for one position cycle based on the multiple drive signals, the cogging torque of the motor under test at each of the first positions is obtained based on the current current value corresponding to each first position and the magnetic flux linkage of the motor under test.

[0008] The above describes a method that sequentially sends multiple drive signals to the motor under test via a motor driver. Each drive signal includes a first sub-signal for moving the motor to a first position and a second sub-signal for stabilizing the motor at the first position. The first sub-signal is sent before the second sub-signal. After each transmission of the second sub-signal, the current value of the q-axis of the motor driver is acquired at first intervals. Once the motor under test has completed one position cycle, the cogging torque of the motor under test at each first position is obtained based on the current current value corresponding to each first position and the flux linkage of the motor under test. This method solves the technical problem in related technologies where the cogging torque of a low-speed, high-torque permanent magnet synchronous motor cannot be accurately measured using a prime mover. Measuring cogging torque by replacing the prime mover with a motor driver avoids dependence on the prime mover, reducing the cost of measurement. Furthermore, the motor driver drives the motor under test to various positions within a single position cycle and measures the cogging torque corresponding to each position, bypassing the speed cycle. By obtaining cogging torque through operation and stopping at a specified position, it eliminates the need to maintain a stable speed at low speeds, avoiding the impact of large speed fluctuations at low speeds on the measurement accuracy of cogging torque. This allows for higher accuracy cogging torque measurements even at low speeds, improving measurement performance.

[0009] In one embodiment of this application, the method further includes:

[0010] After sending the first sub-signal to the motor under test, the second sub-signal is sent to the motor under test when the second position fed back by the encoder of the motor under test is determined to be the first position corresponding to the first sub-signal.

[0011] In one embodiment of this application, the method further includes:

[0012] Obtain the flux linkage, moment of inertia, current loop closed-loop bandwidth, speed loop mid-frequency bandwidth coefficient, number of magnetic poles, winding inductance parameters, and winding resistance parameters of the motor under test.

[0013] Send the first position that the tested motor needs to operate to to the position adjuster;

[0014] The position adjuster obtains the first current command based on the first position that the motor under test needs to operate to, the second position of the motor under test fed back by the encoder in the motor under test, the current actual speed fed back by the motor under test, and the flux linkage, moment of inertia, current loop closed-loop bandwidth, speed loop mid-frequency bandwidth coefficient, and number of magnetic poles of the motor under test.

[0015] Based on the first current command, the actual current value of the q-axis, the closed-loop bandwidth of the current loop of the motor under test, the winding inductance parameters, and the winding resistance parameters, the first sub-signal corresponding to the first position is obtained.

[0016] In one embodiment of this application, the step of obtaining a first current command by the position adjuster based on the first position that the motor under test needs to operate to, the second position of the motor under test fed back by the encoder in the motor under test, the current actual speed fed back by the motor under test, and the flux linkage, moment of inertia, current loop closed-loop bandwidth, speed loop mid-frequency bandwidth coefficient, and number of magnetic poles of the motor under test includes:

[0017] The position adjuster obtains the position error based on the first position that the motor under test needs to operate to and the second position of the motor under test fed back by the encoder in the motor under test.

[0018] The position adjuster obtains a first speed command based on the position error and the position loop gain of the motor under test. The speed indicated by the first speed command is the speed that the motor under test needs to reach.

[0019] The position adjuster obtains the first speed error based on the first speed command and the current actual speed fed back by the tested motor;

[0020] The position adjuster obtains the first current command based on the first speed error, the flux linkage, moment of inertia, closed-loop bandwidth of the current loop, mid-frequency bandwidth coefficient of the speed loop, and the number of magnetic poles of the motor under test.

[0021] In one embodiment of this application, the formula for determining the current value represented by the first current command is as follows:

[0022] I q_cmd =spdKp·V err +spdKi·∫V err

[0023] spdKp=1 / (ω curr *δ 2 )

[0024] spdKi=δ*spdKp / K

[0025] K = 3P * Ψ r / (4*J)

[0026] Among them, I q_cmd This indicates the current value represented by the first current command, V. err ω represents the first velocity error. curr δ represents the closed-loop bandwidth of the current loop of the motor under test, δ represents the mid-frequency bandwidth coefficient of the speed loop of the motor under test, P represents the number of magnetic poles of the motor under test, and Ψ represents the number of magnetic poles of the motor under test. r J represents the flux linkage of the motor under test, and J represents the moment of inertia of the motor under test.

[0027] The above-described method involves acquiring the flux linkage, moment of inertia, current loop closed-loop bandwidth, speed loop mid-frequency bandwidth coefficient, number of magnetic poles, winding inductance parameters, and winding resistance parameters of the motor under test. Then, a first position to be reached by the motor under test is sent to the position controller. The position controller, combining the first position, the second position fed back from the encoder of the motor under test, the current actual speed fed back from the motor under test, and the flux linkage, moment of inertia, current loop closed-loop bandwidth, speed loop mid-frequency bandwidth coefficient, and number of magnetic poles, obtains a first current command. The motor driver then uses this first current command, the actual current value of the q-axis, the current loop closed-loop bandwidth, the winding inductance parameters, and the winding resistance parameters to obtain a first sub-signal corresponding to the first position. This method generates a first sub-signal for the motor under test to move to the first position, enabling the motor under test to move to the first position based on the first sub-signal, thus achieving the operation of the motor under test within one position cycle.

[0028] In one embodiment of this application, the method includes:

[0029] The position adjuster obtains the second current command based on the preset second speed command, the current actual speed fed back by the motor under test, and the flux linkage, moment of inertia, current loop closed-loop bandwidth, speed loop mid-frequency bandwidth coefficient, and number of magnetic poles of the motor under test. The speed represented by the second speed command is the speed that the motor under test needs to reach.

[0030] Based on the second current command, the actual current value of the q-axis, the closed-loop bandwidth of the current loop of the motor under test, the winding inductance parameters, and the winding resistance parameters, the second sub-signal corresponding to the first position is obtained.

[0031] In one embodiment of this application, the speed indicated by the second speed command is zero.

[0032] The above-described method involves a position regulator obtaining a second current command based on a preset second speed command, the current actual speed fed back by the motor under test, and parameters such as flux linkage, moment of inertia, current loop closed-loop bandwidth, speed loop mid-frequency bandwidth coefficient, and number of magnetic poles. The motor driver then generates a second sub-signal corresponding to the first position based on the second current command, the actual current value of the q-axis, the current loop closed-loop bandwidth, winding inductance parameters, and winding resistance parameters. This method enables the generation of a second sub-signal to stabilize the motor under test in the first position, allowing the motor to stop at the first position based on the second sub-signal. This allows the measurement of the corresponding cogging torque when the motor stops at the first position.

[0033] In one embodiment of this application, the method further includes: determining that the motor under test operates for one position cycle based on multiple drive signals by reading each second position fed back by the encoder of the motor under test.

[0034] As described above, by determining whether the motor under test has run for one position cycle through the second position fed back by the encoder of the motor under test, it is possible to ensure that the motor driver accurately determines whether the motor under test has run to the corresponding first position, and thus determines whether the motor under test has run for one position cycle.

[0035] In one embodiment of this application, obtaining the cogging torque of the motor under test at each of the first positions based on the current value corresponding to each first position and the flux linkage of the motor under test includes:

[0036] Multiply the current value corresponding to each of the first positions by 1.5 times the flux linkage of the motor under test to obtain the cogging torque of the motor under test at each of the first positions.

[0037] As described above, the cogging torque is obtained by using the flux linkage and the current current of the q-axis. This method ensures the accuracy of the cogging torque and is simple to calculate and easy to implement.

[0038] In one embodiment of this application, after determining that the motor under test has operated for one position cycle based on the plurality of drive signals, and after obtaining the cogging torque of the motor under test at each of the first positions based on the current value corresponding to each first position and the flux linkage of the motor under test, the method further includes:

[0039] The cogging torque and the current current value of the q-axis at each of the first positions are sent to the host computer so that the user can view the cogging torque and the current current value of the q-axis through the host computer.

[0040] As mentioned above, the measured cogging torque is sent to the host computer, which allows the user to view the cogging torque and thus make a reasonable determination of the motor's quality.

[0041] Secondly, one embodiment of this application also provides a motor cogging torque measuring device, applied to a motor driver, the device comprising:

[0042] A signal transmitting unit is used to sequentially send a plurality of continuous drive signals to the motor under test. Each drive signal includes a first sub-signal and a second sub-signal. The first sub-signal is sent before the second sub-signal. Each drive signal corresponds to a first position. The first sub-signal is used to make the motor under test move to the corresponding first position, and the second sub-signal is used to make the motor under test stabilize at the corresponding first position.

[0043] The current acquisition unit is used to acquire the current value of the q-axis after each start of transmission of the second sub-signal, at a first time interval, wherein the first time interval is less than the continuous transmission duration of the second sub-signal;

[0044] The torque determination unit is used to determine the cogging torque of the motor under test at each of the first positions after the motor under test has operated for one position cycle based on the plurality of drive signals, based on the current current value corresponding to each first position and the flux linkage of the motor under test.

[0045] Thirdly, one embodiment of this application also provides a motor driver, comprising:

[0046] One or more processors and memory,

[0047] Memory, used to store one or more programs;

[0048] When the one or more programs are executed by the one or more processors, the one or more processors implement the motor cogging torque measurement method as described in the first aspect.

[0049] Fourthly, one embodiment of this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the motor cogging torque measurement method as described in the first aspect.

[0050] The beneficial effects of the aforementioned motor cogging torque measuring device, motor driver, and storage medium can be referenced in light of the beneficial effects of the aforementioned motor cogging torque measuring method. Attached Figure Description

[0051] Figure 1 A flowchart illustrating a method for measuring motor cogging torque according to one embodiment of this application;

[0052] Figure 2 This is a schematic diagram of the structure of a motor cogging torque measuring device provided in one embodiment of this application;

[0053] Figure 3 This is a schematic diagram of the structure of a motor driver provided in one embodiment of this application. Detailed Implementation

[0054] The present application will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are for illustrative purposes only and not for limiting the scope of the application. Furthermore, it should be noted that, for ease of description, only the parts relevant to the present application are shown in the drawings, not the entire structure.

[0055] Permanent magnet synchronous motors (PMSMs) are mainly composed of components such as rotors, end covers, and stators. They have advantages such as simple structure, small size, high efficiency, and high power factor. Cogging torque is an inherent phenomenon of PMSMs and is an important indicator for evaluating the design and manufacturing process. Therefore, measuring cogging torque can be used to verify the product quality of PMSMs.

[0056] Traditional instruments for measuring cogging torque primarily use prime movers. Specifically, a prime mover drives the permanent magnet synchronous motor (PMSM) under test (referred to as the motor) in a constant-speed mode. A dynamic torque sensor is connected between the output shaft of the prime mover and the motor shaft of the motor under test. By recording the changes in the output signal of the dynamic torque sensor, the cogging torque curve of the motor under test can be obtained.

[0057] While the aforementioned method can measure the cogging torque curve, for low-speed, high-torque motors operating in constant-speed mode, the control performance deteriorates, leading to decreased speed stability and larger speed fluctuations at low speeds. In this case, the cogging torque (i.e., torque) measured by the dynamic torque sensor is not the true cogging torque. Only a portion of the measured cogging torque is the true cogging torque; the other portion is used to accelerate or decelerate the motor shaft of the tested motor. This makes the measured cogging torque inaccurate.

[0058] Based on this, this application provides a method for measuring motor cogging torque. This method no longer relies on a prime mover, but uses a motor driver to drive the motor. During the drive, a position mode is used, that is, the motor is driven to the corresponding position and then kept stable to obtain the cogging torque corresponding to that position. Instead of driving the motor to work in a constant speed mode, this method avoids the speed stage and does not require the motor to maintain a stable speed at low speeds, thus improving the accuracy of the measured cogging torque at low speeds. This method is especially suitable for motors with low speed and high torque.

[0059] The motor cogging torque measurement method provided in one embodiment of this application can be executed by a motor cogging torque measuring device, which can be a single physical entity or composed of multiple physical entities. Currently, the motor cogging torque measuring device is a motor driver that drives the motor.

[0060] In this embodiment, the motor driver refers to a controller that can drive the permanent magnet synchronous motor to run and collect current and output voltage. It can control parameters such as current, voltage, speed and torque of the permanent magnet synchronous motor.

[0061] Currently, the cogging torque of a permanent magnet synchronous motor is measured using a motor driver. The permanent magnet synchronous motor being measured is denoted as the motor under test.

[0062] A motor driver includes one or more processors and memory. When the processor has storage capabilities, the memory and processor can also be integrated into a single physical entity.

[0063] The processor can be one or more of the following: a microcontroller unit (MCU), a field-programmable gate array (FPGA), or a central processing unit (CPU). By running computer-executable programs (i.e., computer programs, including software programs, instructions, and modules), the processor can implement various functions of the motor driver and its data processing capabilities. Currently, the processor of a motor driver can implement a method for measuring motor cogging torque by running computer-executable programs.

[0064] As a storage medium, the memory can store various computer-executable programs, operating systems, and other contents required during the operation of the motor drive, so that the processor can read and run them to enable the processor to implement the software part of the motor cogging torque measurement method.

[0065] In addition, the motor driver may include multiple connection terminals (such as connectors, connecting cables, etc.) to connect to other devices. In one embodiment, the connection to the motor under test is achieved through the connection terminals; for example, three connection terminals are connected to the three-phase power lines of the motor under test, and one connection terminal is connected to the encoder on the motor under test. After connecting to the motor under test, the motor driver can drive the motor under test to operate and move it to the desired position, thereby obtaining the cogging torque at that position. In one embodiment, the connection terminals also achieve connection to a host computer. The host computer can be a desktop computer, laptop computer, or other device with a display screen and data processing and calculation functions. After connecting to the host computer, the motor driver can transmit data with the host computer, for example, sending the measured cogging torque to the host computer.

[0066] In one embodiment, Figure 1 A flowchart illustrating a method for measuring motor cogging torque according to an embodiment of this application is provided, with reference to... Figure 1 When the motor driver performs the motor cogging torque measurement method, it specifically includes steps 110-130:

[0067] Step 110: Send multiple consecutive drive signals to the motor under test in sequence. Each drive signal includes a first sub-signal and a second sub-signal. The first sub-signal is sent before the second sub-signal. Each drive signal corresponds to a first position. The first sub-signal is used to make the motor under test move to the corresponding first position, and the second sub-signal is used to make the motor under test stabilize at the corresponding first position.

[0068] For example, the motor under test can rotate to different angles during operation, each angle being considered a position. One rotation of the motor under test is 360 degrees. The angular resolution can be represented by the encoder harness. The encoder, installed in the motor under test, measures the current position of the motor. For instance, if the encoder harness is 5000, it means there are 5000 positions during one rotation of the motor under test, dividing the 360 ​​degrees into 5000 parts. Each position the motor under test passes represents a rotation of 360 / 5000 degrees. A 360-degree rotation of the motor under test represents one position cycle, also known as a mechanical cycle, which is 360 degrees. By repeating these position cycles, the normal operation of the motor under test can be achieved.

[0069] When measuring the cogging torque of the motor under test, the motor shaft of the motor under test is first unlocked, and the motor under test is kept in a free-rotation state. At this time, the load force of the motor under test is zero. Then, the motor driver controls the motor under test to rotate sequentially to each position (i.e., rotate to each angle between 0 and 360 degrees) within one position cycle. When the motor under test reaches each position, it is controlled to stabilize, that is, the motor under test is controlled to stop at the corresponding position. Then, the cogging torque of the motor under test at each position can be measured. In one embodiment, the motor driver drives the motor under test to operate by sending a drive signal to the motor under test. The drive signal is used to drive the motor under test to operate, and during the operation, it can operate to a specified position and then stabilize at the specified position. Currently, the position specified by the motor driver is recorded as the first position. It can be understood that each drive signal has a corresponding first position, and the first position corresponding to each drive signal is different. At this time, it can also be understood that the motor driver is in position mode, so that the motor under test rotates to each position sequentially and stops at the corresponding position.

[0070] In one embodiment, the drive signal consists of a first sub-signal and a second sub-signal. The first sub-signal is used to move the motor under test to a first position, and the second sub-signal is used to stabilize the motor under test in the first position. When the motor driver sends the drive signal to the motor under test, it first sends the first sub-signal to move the motor under test to the first position according to the first sub-signal, and then sends the second sub-signal to stabilize the motor under test in the first position. The first and second sub-signals are sent consecutively. It can be understood that stabilizing the motor under test in the first position can be understood as the motor under test stopping in the first position. At this time, since the motor shaft of the motor under test is in a free rotation state, the torque output by the motor under test counteracts the cogging torque to keep the motor under test stationary. The cogging torque at the corresponding first position can be obtained based on the torque output by the motor under test.

[0071] In one embodiment, the motor driver sequentially and continuously sends drive signals along the encoder scale, causing the motor under test to operate sequentially along the positions corresponding to each scale based on the drive signals. After each drive signal is sent, the motor under test completes one position cycle. The specific value of the encoder scale is related to the encoder wiring harness. For example, if the encoder wiring harness is 5000, it means that the encoder has 5000 scales, each scale corresponding to a position, i.e., a corresponding angle. For example, when the encoder scale is 0, the corresponding position is 0; when the encoder scale is 1, the corresponding position is 360 / 5000; when the encoder scale is 2, the corresponding position is 2*360 / 5000, and so on. When the motor driver drives the motor under test, it starts from the encoder scale of 0 and sends the drive signal corresponding to scale 0 to the motor under test, so that the motor under test operates to 0 degrees and stabilizes for a period of time (i.e., first a first sub-signal is sent to make the motor under test operate to the first position, and then a second sub-signal is sent to make the motor under test stabilize in the first position). Then, the motor driver sends the drive signal corresponding to scale 1 to the motor under test, causing the motor under test to rotate to 360 / 5000 degrees and stabilize for a period of time. After that, the motor driver sends the drive signal corresponding to scale 2 to the motor under test, and so on.

[0072] For example, when a motor driver sequentially sends multiple drive signals, these signals are sent continuously without intervals, and the motor under test continuously receives each drive signal sequentially. In other words, the motor driver continuously sends signals to the motor driver, only the content of the signals changes. Specifically, the motor driver sequentially and continuously sends multiple drive signals as follows: first, it continuously sends a first sub-signal corresponding to a first position, then it continuously sends a second sub-signal corresponding to the same first position, then it continuously sends a first sub-signal for another first position, then it continuously sends a second sub-signal corresponding to the same first position, and so on, until the motor under test completes one position cycle. During the continuous transmission, there is no interruption between adjacent signals.

[0073] Optionally, after the motor driver sends the first sub-signal, it can determine whether the motor under test has reached the first position based on the encoder, and then determine whether it is necessary to switch to sending the second sub-signal. In this case, the method provided in the embodiments of this application may further include: after sending the first sub-signal to the motor under test, determining, by reading the second position fed back by the encoder of the motor under test, that the motor under test has moved to the corresponding first position based on the first sub-signal, sending the second sub-signal to the motor under test.

[0074] Understandably, the encoder can provide the motor driver with the scale corresponding to the current position of the motor. For example, when the motor under test rotates to the position corresponding to scale 1, the encoder is at scale 1. At this time, the encoder can send the electrical signal corresponding to scale 1 to the motor driver, so that the motor driver can determine that the encoder is at the position corresponding to scale 1 based on the electrical signal. Based on this, when the motor under test rotates according to the first sub-signal, the encoder can send an electrical signal corresponding to the current position of the motor under test to the motor driver. In one embodiment, the position corresponding to the electrical signal fed back by the encoder is recorded as the second position. After receiving the electrical signal, the motor driver can determine that the motor under test has now rotated to the second position. Then, the motor driver can determine whether the second position fed back by the encoder is the same as the first position that the motor needs to rotate to. If they are the same, it is determined that the motor under test has reached the first position. At this time, the motor driver changes to sending the corresponding second sub-signal to make the motor under test stabilize in the first position. Optionally, if they are different, the motor driver continues to drive the motor under test to rotate through the first sub-signal to make the motor under test reach the first position.

[0075] The motor driver first generates a first sub-signal, then generates a second sub-signal, and then sends the first and second sub-signals. The generation time of the first and second sub-signals is not currently limited; only the sequential and continuous transmission of the drive signals needs to be ensured.

[0076] During the process of the motor driver sending each drive signal sequentially and continuously, step 120 is executed.

[0077] Step 120: After each transmission of the second sub-signal, after an interval of the first duration, obtain the current value of the q-axis. The first duration is less than the duration of continuous transmission of the second sub-signal.

[0078] For example, after the motor driver starts sending the second sub-signal, the motor under test stabilizes at the first position based on the second sub-signal. Stabilization at the first position can be understood as the motor stopping at the first position. At this time, it takes a certain amount of time for the motor under test to move from the first position to stop at the first position. That is, after the motor under test reaches the first position, there will be a period of wobbling when it stops via the second sub-signal. Once the wobbling disappears, the motor under test can be considered stable. During this process, the motor under test continuously receives the second sub-signal. The q-axis current will only stabilize after the motor under test stabilizes at the first position. Therefore, after the motor driver starts sending the second sub-signal, a certain time interval is needed before the q-axis current can be obtained. Currently, this interval is recorded as the first duration, which can be set empirically. For example, if the motor under test typically takes 20ms to stabilize at the first position, i.e., to completely stop at the first position, then the first duration can be set to 20ms. Generally, the first duration is shorter than the duration of the second sub-signal to ensure that the accurate q-axis current is obtained after the motor under test has stabilized (i.e., stopped). That is, when the q-axis current is obtained, the motor under test is in the state of being stopped in the first position.

[0079] For example, after the motor driver sends the second sub-signal each time, it starts timing. When the timing duration reaches the first duration, the motor driver obtains the current value of the q-axis. At this time, there is a corresponding q-axis current value at each first position.

[0080] In the field of permanent magnet synchronous motors, the q-axis, also known as the cross-axis, is perpendicular to the N and S pole magnets, i.e., intersecting. The cross-axis controls the magnitude of the force. The motor's output torque is related to the q-axis current. Currently, cogging torque is obtained through the q-axis current. Therefore, when the duration of sending the second sub-signal reaches the first duration, the motor driver obtains the current value of the q-axis current. The current value of the q-axis refers to the current value on the q-axis of the motor driver at the current moment. After the tested motor has operated for one position cycle, the motor driver can obtain the current value of the q-axis corresponding to each first position, and these current values ​​can form a current value sequence.

[0081] In one embodiment, after the motor driver obtains the current current value of the q-axis corresponding to the current first position, it can stop sending the second sub-signal and send the first sub-signal corresponding to the next first position, so that the motor under test can run to the next first position. Then, when the encoder determines that the motor under test has run to the next first position, it stops sending the first sub-signal and sends the second sub-signal corresponding to the next first position. After obtaining the current current value of the q-axis corresponding to the next first position, it stops sending the second sub-signal and sends the first sub-signal corresponding to the next next first position again, and so on.

[0082] In one embodiment, the motor driver is also connected to a host computer. After obtaining the current current value of the q-axis, the motor driver sends the current current value of the q-axis to the host computer so that the host computer can obtain the current current value of the q-axis. After the motor under test has run for one position cycle, the host computer can obtain a sequence of current values, which records the current current value of the q-axis corresponding to each first position.

[0083] Step 130: After the motor under test has been running for one position cycle based on multiple drive signals, the cogging torque of the motor under test at each first position is obtained based on the current current value corresponding to each first position and the magnetic flux linkage of the motor under test.

[0084] For example, when the motor under test operates for one position cycle, it can also be considered to have rotated 360 degrees. At this time, each first position has a current corresponding to the q-axis.

[0085] In one embodiment, the motor driver determines that the motor under test has operated for one position cycle based on multiple drive signals by reading the second positions fed back by the encoder of the motor under test. It can be understood that each time the motor under test reaches a first position, the encoder can feed back the electrical signal corresponding to the current first position to the motor driver, so that the motor driver knows that the motor under test has reached the first position. At this time, based on the sequential feedback from the encoder, the motor driver can determine whether the motor under test has completed one position cycle. Currently, for ease of distinction, the position obtained based on the encoder feedback is recorded as the second position.

[0086] Once the motor driver determines that the motor under test has completed one position cycle, it can determine the cogging torque of the motor at each of the first positions within that position cycle based on the current value of the q-axis corresponding to each first position and the flux linkage of the motor under test. Here, flux linkage can also refer to the magnetic flux linked by the conductive coil or current loop; in permanent magnet synchronous motors, torque is related to flux linkage. Currently, flux linkage can be pre-input manually into the motor driver for use.

[0087] Specifically, the torque formula for a permanent magnet synchronous motor is:

[0088] 1.5Ψ r *I q -T ripple =T load

[0089] Taking the tested motor as an example, Ψ r I represents the flux linkage of the motor under test. q T represents the current value along the q-axis. ripple T represents the tooth groove positioning force. load It represents the load force, and can also be understood as the torque output by the motor being tested.

[0090] Currently, because the motor shaft can rotate freely, therefore, T load =0, then, transforming the above formula, we can obtain T ripple =1.5Ψ r *I q Because of T ripple This can be considered as cogging torque, so the cogging torque can be calculated as 1.5Ψ. r *I q At this point, based on the current value corresponding to each first position and the flux linkage of the motor under test, the cogging torque of the motor under test at each first position can be obtained specifically as follows: multiply the current value corresponding to each first position by 1.5 times the flux linkage of the motor under test to obtain the cogging torque of the motor under test at each first position. For example, multiplying the current value of the q-axis corresponding to the first position by 1.5 times the flux linkage yields the cogging torque corresponding to the first position. Following this method, the cogging torque corresponding to each first position can be obtained. The cogging torques at each first position can form a cogging torque sequence.

[0091] In one embodiment, after obtaining the cogging torque at each first position (i.e., after this step), the process may further include: sending the cogging torque at each first position and the current current value of the q-axis to a host computer so that the user can view the cogging torque and the current current value of the q-axis through the host computer. For example, after obtaining the cogging torque at each first position, each cogging torque (or a cogging torque sequence) can be sent to the host computer for the user to view. Furthermore, the motor driver can also send the current current value of the q-axis corresponding to each first position to the host computer for the user to view. Alternatively, the cogging torque and the q-axis current value can be sent to the host computer together or separately. For example, the motor driver sends the current current value of the q-axis to the host computer each time it obtains it, and after calculating the cogging torque corresponding to each first position, sends the cogging torque sequence to the host computer.

[0092] Optionally, once the motor driver determines that the motor under test has completed one position cycle, it can stop sending drive signals to the motor under test. At this point, the motor under test can stop operating.

[0093] The above describes a method that sequentially sends multiple drive signals to the motor under test via a motor driver. Each drive signal includes a first sub-signal for moving the motor to a first position and a second sub-signal for stabilizing the motor at the first position. The first sub-signal is sent before the second sub-signal. After each transmission of the second sub-signal, the current value of the q-axis of the motor driver is acquired at first intervals. Once the motor under test has completed one position cycle, the cogging torque of the motor under test at each first position is obtained based on the current current value corresponding to each first position and the flux linkage of the motor under test. This method solves the technical problem in related technologies where the cogging torque of a low-speed, high-torque permanent magnet synchronous motor cannot be accurately measured using a prime mover. Measuring cogging torque by replacing the prime mover with a motor driver avoids dependence on the prime mover, reducing measurement costs. Furthermore, the motor driver drives the motor under test to each position within a single position cycle, measuring the corresponding cogging torque at each position. This bypasses the speed-related stage, acquiring cogging torque through a cycle of operation and stopping at designated positions. It eliminates the need to maintain a stable speed at low speeds, avoiding the impact of large speed fluctuations on measurement accuracy at low speeds. This allows for higher accuracy cogging torque measurements even at low speeds, improving measurement performance. The measured cogging torque is then sent to a host computer, allowing users to view the measurement and make reasonable assessments of motor quality. The second position feedback from the motor's encoder determines whether the motor has completed a position cycle, ensuring the motor driver accurately identifies whether the motor has reached the corresponding first position, thus confirming the completion of a position cycle. Finally, obtaining cogging torque from the flux linkage and the current of the q-axis ensures accuracy, and the calculation process is simple and easy to implement.

[0094] In one embodiment of this application, the motor driver also needs to generate a first sub-signal. The process of the motor driver generating the first sub-signal can be referred to steps 210-240:

[0095] Step 210: Obtain the flux linkage, moment of inertia, current loop closed-loop bandwidth, speed loop mid-frequency bandwidth coefficient, number of magnetic poles, winding inductance parameters, and winding resistance parameters of the motor under test.

[0096] For example, the flux linkage, moment of inertia, current loop closed-loop bandwidth, speed loop mid-frequency bandwidth coefficient, number of magnetic poles, winding inductance parameters, and winding resistance parameters of the motor under test are manually input into the motor driver for use by the motor driver.

[0097] Specifically, the moment of inertia of the motor under test refers to the moment of inertia of the motor shaft, which is a physical quantity characterizing the magnitude of the rotational inertia of the motor shaft. The closed-loop bandwidth of the current loop of the motor under test can be understood as the maximum signal frequency that the current closed-loop system (i.e., the current loop) can track. The mid-frequency bandwidth coefficient of the speed loop of the motor under test can be understood as the coefficient of the mid-frequency range that the speed loop can control. The number of magnetic poles of the motor under test refers to the number of magnets or magnetic materials installed in the motor under test. The winding inductance and winding resistance parameters of the motor under test can be understood as the inductance and resistance of the windings, respectively. The above parameters are commonly used in the operation of permanent magnet synchronous motors, and their functions and meanings will not be explained further here.

[0098] Step 220: Send the first position that the motor under test needs to run to to the position adjuster.

[0099] The position regulator, also known as a position controller, is located within the motor driver. Its function is implemented by the corresponding software program running within the motor driver; in other words, the position regulator can be considered software. The position regulator outputs a current command to the driver, which contains (or represents) a specific current value. This command causes the motor driver to output a corresponding current. This current is converted into a voltage and applied to the three-phase power lines of the motor under test, generating torque. This torque causes the motor to rotate. After the motor rotates, the encoder can feed back an electrical signal to the motor driver corresponding to the position the motor has reached. The applied voltage signal can be considered the drive signal (i.e., it can be the first sub-signal and the second sub-signal). By continuously adjusting the current command output to the motor driver, the position regulator enables the motor driver to control the motor under test to rotate to and stabilize at the corresponding position.

[0100] For example, the motor driver sends the first position that the tested motor is expected to reach (or needs to reach) to the position regulator. It can be understood that each time the motor driver generates the first sub-signal, it needs to first send the first position to be reached to the position regulator.

[0101] Step 230: The position adjuster obtains the first current command based on the first position that the motor under test needs to operate to, the second position of the motor under test fed back by the encoder in the motor under test, the current actual speed fed back by the motor under test, and the flux linkage, moment of inertia, current loop closed-loop bandwidth, speed loop mid-frequency bandwidth coefficient, and number of magnetic poles of the motor under test.

[0102] In one embodiment, after obtaining the first position, the position adjuster adjusts its output current command based on the position of the motor under test fed back by the encoder. Currently, the position fed back by the encoder is recorded as the second position. That is, the encoder sends the electrical signal corresponding to the second position to the motor driver. At this time, the position adjuster in the motor driver can determine the current second position of the motor under test based on this electrical signal. In other words, the second position is the actual current position of the motor under test, and the motor under test can be moved from the second position to the first position by a first sub-signal. That is, each time the first sub-signal is determined, there is a corresponding first position and a second position.

[0103] Currently, the current command output by the position regulator when the first sub-signal is generated is recorded as the first current command, and the motor driver can obtain the first sub-signal based on the first current command.

[0104] In one embodiment, step 230 may further include steps 231-234:

[0105] Step 231: The position adjuster obtains the position error based on the first position that the motor under test needs to operate to and the second position of the motor under test fed back by the encoder in the motor under test.

[0106] For example, the first position is denoted as P. cmd This is determined by the motor driver and sent to the position adjuster. Let the second position be denoted as P. fbk The encoder feeds back the information to the position adjuster. Based on the first and second positions, the position adjuster can determine the expected position span (or the required rotation angle) of the motor under test when it moves from the second position to the first position. This position span can be recorded as the position error, which reflects the difference between the actual current position (i.e., the second position) and the expected position (i.e., the first position) of the motor under test.

[0107] Currently, the position error is denoted as P. err P err =P cmd -P fbk P cmd and P fbk Substituting the aforementioned relation, we can obtain P err .

[0108] Step 232: The position adjuster obtains the first speed command based on the position error and the position loop gain of the motor under test. The speed indicated by the first speed command is the speed that the motor under test needs to reach.

[0109] Position loop, speed loop, and current loop are commonly used concepts in the operation of permanent magnet synchronous motors, and will not be explained further here. After the position regulator obtains the position error, it can determine the speed required for the tested motor to operate in order to compensate for the position error (i.e., to move from the second position to the first position), that is, the speed that the tested motor needs to reach. Currently, the signal representing the required speed is recorded as the first speed command.

[0110] Currently, the first speed command is denoted as V. cmd V cmd With P err The relationship is: P err =V cmd *KP. Here, KP represents the position loop gain, the specific value of which is set according to the actual situation, generally based on the principle of fast, stable, and non-prolonged oscillation of the position loop. The position regulator, based on the aforementioned relationship, substitutes P... err With KP, you can get V. cmd .

[0111] Step 233: The position adjuster obtains the first speed error based on the first speed command and the current actual speed fed back by the tested motor.

[0112] For example, the motor under test can also feed back its current actual speed during operation to the position controller. Based on the desired speed (i.e., the speed represented by the first speed command) and the actual speed currently fed back by the motor under test, the position controller can obtain the difference between the actual speed and the desired speed (i.e., the speed represented by the first speed command), which is currently denoted as the first speed error.

[0113] Currently, the actual speed of the motor under test during operation is denoted as V. fbk Let the first speed error be denoted as V. err V err =V cmd -V fbk V cmd and V fbk Substituting the aforementioned relation, we can obtain V. err .

[0114] Step 234: The position regulator obtains the first current command based on the first speed error, the flux linkage, moment of inertia, closed-loop bandwidth of the current loop, mid-frequency bandwidth coefficient of the speed loop, and number of magnetic poles of the motor under test.

[0115] Once the position adjuster obtains the first speed error, it can determine the first current command required for the tested motor to compensate for the first speed error. That is, the motor driver outputs the corresponding current through the first current command, which can adjust the tested motor from its current actual speed to the speed represented by the first speed command.

[0116] In one embodiment, the formula for determining the current value represented by the first current command is:

[0117] I q_cmd =spdKp·V err +spdKi·∫V err

[0118] spdKp=1 / (ω curr *δ 2 )

[0119] spdKi=δ*spdKp / K

[0120] K = 3P * Ψ r / (4*J)

[0121] Among them, I q_cmd This indicates the current value represented by the first current command, V. err ω represents the first velocity error. curr δ represents the closed-loop bandwidth of the current loop of the motor under test, δ represents the mid-frequency bandwidth coefficient of the speed loop of the motor under test, P represents the number of magnetic poles of the motor under test, and Ψ represents the number of magnetic poles of the motor under test. r ω represents the flux linkage of the motor under test, and J represents the moment of inertia of the motor under test. spdKp can be understood as the proportional parameter of the speed loop of the motor under test, and spdKi can be understood as the integral parameter of the speed loop of the motor under test. curr The specific value can be set according to the matching between the motor under test and the motor driver. Generally, for small servo motors (such as the permanent magnet synchronous motor used in this embodiment), ω curr The value range of ω is generally 600Hz-1.2kHz. Currently, a reasonable ω can be selected within this range. curr The value of δ is generally in the range of 10-100. Currently, a reasonable value of δ can be selected within this range.

[0122] Based on the above formula, it can be seen that based on P and Ψ r K can be obtained from J, based on ω curr spdKp can be obtained from δ, and spdKi can be obtained from δ, spdKp, and K. Then, spdKp, spdKi, and V are used to further derive the results. err Then I can get q_cmd This means that the first speed command is obtained.

[0123] Step 240: Based on the first current command, the actual current value of the q-axis, the closed-loop bandwidth of the current loop of the motor under test, the winding inductance parameters, and the winding resistance parameters, obtain the first sub-signal corresponding to the first position.

[0124] The actual current value of the q-axis can be understood as the current value of the q-axis of the motor driver at the current acquisition moment. It has the same physical meaning as the current current value of the q-axis used when measuring cogging torque, both representing the current value on the q-axis.

[0125] In one embodiment, the motor driver can obtain the voltage that the motor driver needs to output to the q-axis based on the current value in the first current command and the current actual current value of the q-axis.

[0126] Specifically, the motor driver can obtain the current error of the q-axis based on the first current command and the current actual current value of the q-axis. This current error represents the difference between the current value indicated by the first current command and the actual current value of the q-axis. Currently, the current actual current value of the q-axis is denoted as I. q Let the current error of the q-axis be denoted as I. q_err Among them, I q_err =I q_cmd -I q . Will I q_cmd and I q Substituting into the aforementioned relation, we can obtain I. q_err Furthermore, the motor driver can also obtain the current loop proportional parameters of the motor under test using the closed-loop bandwidth of the current loop and the winding inductance parameters. Currently, the winding inductance parameters of the motor under test are denoted as Ls, and the current loop proportional parameters are denoted as currkp. Where currkp = ω curr *Ls. ω curr Substituting Ls into the aforementioned relationship, we can obtain currkp. Similarly, the motor driver can also obtain the current loop integral parameters of the motor under test using the closed-loop bandwidth of the current loop and the winding resistance parameters. Currently, the winding resistance parameters of the motor under test are denoted as Rs, and the current loop integral parameters are denoted as currki. Where currki = ω curr *Rs. ω curr Substituting Rs into the aforementioned relation, we can obtain currki. Then, based on currki, currkp, and I... q_err This allows us to obtain the voltage that the motor driver needs to output to the q-axis. Currently, the voltage of the q-axis is denoted as V. q V q The calculation formula is as follows:

[0127] V q =currKp·L q_err +currKi·∫I q_err

[0128] Based on the above formula, currki, currkp, and I... q_err By substituting these values, we can obtain the voltage V that needs to be output to the q-axis.q Based on this voltage, the q-axis current can be adjusted from the current actual current value to the current value indicated by the first current command.

[0129] Then, based on the voltage output to the q-axis, three-phase voltages can be generated using inverse Park transform and Space Vector Pulse Width Modulation (SVPWM). These three-phase voltages can be denoted as Ua, Ub, and Uc, respectively. Ua, Ub, and Uc can be understood as the first sub-signal obtained at this point. Subsequently, the motor driver uses its own power loop to apply Ua, Ub, and Uc to the three-phase power lines of the motor under test (denoted as U / V / W), thereby causing the motor under test to operate at the first position.

[0130] It should be noted that the generation time of the first sub-signal can be set based on the actual operating conditions of the motor driver and the actual operation of the motor under test.

[0131] The above describes a method for generating a first sub-signal for the tested motor to move to the first position by acquiring the flux linkage, moment of inertia, current loop closed-loop bandwidth, speed loop mid-frequency bandwidth coefficient, number of magnetic poles, winding inductance parameters, and winding resistance parameters. This involves obtaining the first position the tested motor needs to reach, which is then sent to the position controller. The position controller combines this first position with the second position fed back from the encoder in the tested motor, the current actual speed fed back from the tested motor, and the flux linkage, moment of inertia, current loop closed-loop bandwidth, speed loop mid-frequency bandwidth coefficient, and number of magnetic poles to obtain a first current command. The motor driver then uses this first current command, the actual current value of the q-axis, the current loop closed-loop bandwidth, the winding inductance parameters, and the winding resistance parameters to generate the first sub-signal. This allows the tested motor to move to the first position based on the first sub-signal, thus enabling the tested motor to operate within one position cycle.

[0132] In one embodiment of this application, in addition to generating the first sub-signal, the motor driver also needs to generate a second sub-signal. The process of the motor driver generating the second sub-signal can be referred to steps 310-320:

[0133] Step 310: The position adjuster obtains the second current command based on the preset second speed command, the current actual speed fed back by the motor under test, and the flux linkage, moment of inertia, current loop closed-loop bandwidth, speed loop mid-frequency bandwidth coefficient, and number of magnetic poles of the motor under test. The speed indicated by the second speed command is the speed that the motor under test needs to reach.

[0134] For example, since the second sub-signal is used to stabilize the motor under test in the first position (i.e., without changing the position of the motor under test) and to stop the motor under test in the first position, i.e., to make the rotational speed of the motor under test zero), when generating the second sub-signal, it is not necessary to use the second position feedback from the encoder to calculate the position error. Instead, a speed can be directly preset, which represents the speed required for the motor under test to stop in the first position, even if the target rotational speed of the motor under test is zero. Currently, the signal representing the speed that the motor under test needs to reach when generating the second sub-signal is denoted as the second speed command. In one embodiment, the speed represented by the second speed command is zero, so that the motor under test can stop in the first position.

[0135] When generating the second sub-signal, the position controller directly uses the preset second speed command, i.e., determines that the speed of the motor under test is expected to be zero, so as to stop at the first position. Furthermore, the motor under test can also provide feedback to the position controller regarding its actual speed during operation. Based on the desired speed (i.e., the speed represented by the second speed command) and the actual speed currently fed back by the motor under test, the position controller can obtain the difference between the actual speed and the speed reached (i.e., the speed represented by the second speed command), which is currently denoted as the second speed error. The calculation method for the second speed error can refer to the calculation method for the first speed error.

[0136] After the position adjuster obtains the second speed error, it can determine the current command required for the tested motor to compensate for the second speed error, currently denoted as the second current command. At this time, the motor driver outputs the corresponding current through the second current command, which can adjust the tested motor from its current actual speed to the speed represented by the second speed command, thus stopping the tested motor at the first position. The calculation method of the second current command can refer to the calculation method of the first current command, the difference being that the second speed error is used when determining the second current command.

[0137] Step 320: Based on the second current command, the actual current value of the q-axis, the closed-loop bandwidth of the current loop of the motor under test, the winding inductance parameters, and the winding resistance parameters, obtain the second sub-signal corresponding to the first position.

[0138] In one embodiment, the motor driver determines the voltage to be output to the q-axis based on the current value in the second current command and the current actual current value of the q-axis. This process is similar to the process by which the motor driver determines the voltage to be output to the q-axis based on the current value in the first current command and the current actual current value of the q-axis, except that a second current command is used. Then, based on the voltage output to the q-axis, a three-phase voltage is generated using inverse Park transform and Space Vector Pulse Width Modulation (SVPWM). This three-phase voltage can be understood as the obtained second sub-signal. The motor driver then uses its power loop to apply the three-phase voltage to the three-phase power lines of the motor under test, thereby stabilizing the motor in the first position.

[0139] It should be noted that the generation time of the second sub-signal can be set according to the actual operating conditions of the motor driver and the actual operation of the motor under test.

[0140] The above-described method involves a position regulator obtaining a second current command based on a preset second speed command, the current actual speed fed back by the motor under test, and parameters such as flux linkage, moment of inertia, current loop closed-loop bandwidth, speed loop mid-frequency bandwidth coefficient, and number of magnetic poles. The motor driver then generates a second sub-signal corresponding to the first position based on the second current command, the actual current value of the q-axis, the current loop closed-loop bandwidth, winding inductance parameters, and winding resistance parameters. This method enables the generation of a second sub-signal to stabilize the motor under test in the first position, allowing the motor to stop at the first position based on the second sub-signal. This allows the measurement of the corresponding cogging torque when the motor stops at the first position.

[0141] One embodiment of this application also provides a motor cogging torque measuring device, which is used in a motor driver. Figure 2 This is a schematic diagram of the structure of a motor cogging torque measuring device according to an embodiment of this application, with reference to... Figure 2 The motor cogging torque measuring device includes: a signal sending unit 401, a current acquisition unit 402, and a torque determination unit 403.

[0142] The signal transmitting unit 401 is used to sequentially transmit multiple driving signals to the motor under test. Each driving signal includes a first sub-signal and a second sub-signal. The first sub-signal is transmitted before the second sub-signal. Each driving signal corresponds to a first position. The first sub-signal is used to make the motor under test move to the corresponding first position, and the second sub-signal is used to make the motor under test stabilize at the corresponding first position. The current acquisition unit 402 is used to acquire the current value of the q-axis after each transmission of the second sub-signal, after an interval of a first time duration. The first time duration is less than the continuous transmission duration of the second sub-signal. The torque determination unit 403 is used to determine the cogging torque of the motor under test at each of the first positions after the motor under test has operated for one position cycle based on the multiple driving signals, based on the current value corresponding to each first position and the flux linkage of the motor under test.

[0143] In one embodiment of this application, the motor cogging torque measuring device further includes: a position determination unit, which, after sending a first sub-signal to the motor under test, determines when the motor under test has moved to the corresponding first position based on the first sub-signal by reading the second position fed back by the encoder of the motor under test, and then sends a second sub-signal to the motor under test.

[0144] In one embodiment of this application, the motor cogging torque measuring device further includes: a parameter acquisition unit, used to acquire the flux linkage, moment of inertia, current loop closed-loop bandwidth, speed loop mid-frequency bandwidth coefficient, number of magnetic poles, winding inductance parameters, and winding resistance parameters of the motor under test; a position sending unit, used to send a first position to which the motor under test needs to operate at the current position to the position adjuster; a first current determination unit, used by the position adjuster to obtain a first current command based on the first position to which the motor under test needs to operate at the current position, the second position of the motor under test fed back by the encoder in the motor under test, the current actual speed fed back by the motor under test, and the flux linkage, moment of inertia, current loop closed-loop bandwidth, speed loop mid-frequency bandwidth coefficient, and number of magnetic poles of the motor under test; and a first sub-signal generation unit, used to obtain a first sub-signal corresponding to the first position based on the first current command, the actual current value of the q-axis, the current loop closed-loop bandwidth of the motor under test, the winding inductance parameters, and the winding resistance parameters.

[0145] In one embodiment of this application, the first current determination unit includes: a first error determination subunit, used by the position regulator to obtain a position error based on a first position that the motor under test needs to operate to and a second position of the motor under test fed back by the encoder in the motor under test; a speed determination subunit, used by the position regulator to obtain a first speed command based on the position error and the position loop gain of the motor under test, wherein the speed indicated by the first speed command is the speed that the motor under test needs to reach; a second error determination subunit, used by the position regulator to obtain a first speed error based on the first speed command and the current actual speed fed back by the motor under test; and a current command determination subunit, used by the position regulator to obtain a first current command based on the first speed error, the flux linkage, moment of inertia, current loop closed-loop bandwidth, speed loop mid-frequency bandwidth coefficient, and number of magnetic poles of the motor under test.

[0146] In one embodiment of this application, the formula for determining the current value represented by the first current command is as follows:

[0147] I q_cmd =spdKp·V err +spdKi·∫V err

[0148] spdKp=1 / (ω curr *δ 2 )

[0149] spdKi=δ*spdKp / K

[0150] K = 3P * Ψ r / (4*J)

[0151] Among them, I q_cmd This indicates the current value represented by the first current command, V. err ω represents the first velocity error. curr δ represents the closed-loop bandwidth of the current loop of the motor under test, δ represents the mid-frequency bandwidth coefficient of the speed loop of the motor under test, P represents the number of magnetic poles of the motor under test, and Ψ represents the number of magnetic poles of the motor under test. r J represents the flux linkage of the motor under test, and J represents the moment of inertia of the motor under test.

[0152] In one embodiment of this application, the motor cogging torque measuring device further includes: a second current determination unit, used to obtain a second current command from the position adjuster based on a preset second speed command, the current actual speed fed back by the motor under test, and the flux linkage, moment of inertia, current loop closed-loop bandwidth, speed loop mid-frequency bandwidth coefficient, and number of magnetic poles of the motor under test, wherein the speed represented by the second speed command is the speed that the motor under test needs to reach; and a second sub-signal generation unit, used to obtain a second sub-signal corresponding to the first position based on the second current command, the actual current value of the q-axis, the current loop closed-loop bandwidth of the motor under test, winding inductance parameters, and winding resistance parameters.

[0153] In one embodiment of this application, the second speed command represents a speed of zero.

[0154] In one embodiment of this application, the motor cogging torque measuring device further includes: a position cycle determination unit, used to determine that the motor under test operates for one position cycle based on multiple drive signals by reading each second position fed back by the encoder of the motor under test.

[0155] In one embodiment of this application, the torque determination unit 403 is specifically used to: after determining that the motor under test has operated for one position cycle based on the plurality of drive signals, multiply the current value corresponding to each first position by 1.5 times the flux linkage of the motor under test to obtain the cogging torque of the motor under test at each first position.

[0156] In one embodiment of this application, the motor cogging torque measuring device further includes: a torque transmitting unit, configured to determine that after the motor under test has operated for one position cycle based on the plurality of drive signals, and based on the current current value corresponding to each first position and the flux linkage of the motor under test, obtain the cogging torque of the motor under test at each first position, and then transmit the cogging torque at each first position and the current current value of the q-axis to a host computer so that a user can view the cogging torque and the current current value of the q-axis through the host computer.

[0157] The motor cogging torque measuring device provided in this application embodiment is included in the motor driver and can be used to execute the motor cogging torque measuring method provided in any of the above embodiments, and has corresponding functions and beneficial effects.

[0158] It is worth noting that in the above embodiments of the motor cogging torque measuring device, the various units and modules included are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be achieved; in addition, the specific names of each functional unit are only for easy differentiation and are not used to limit the scope of protection of this application.

[0159] One embodiment of this application also provides a motor driver. Figure 3 This is a schematic diagram of the structure of a motor driver according to one embodiment of this application, with reference to... Figure 3 The motor driver includes one or more processors 51 and a memory 52.

[0160] Memory 52 is used to store one or more programs; when the one or more programs are executed by the one or more processors, the one or more processors implement the motor cogging torque measurement method provided in any of the foregoing embodiments. It is understood that the relevant descriptions of processor 51 and memory 52 can be found in the foregoing. Furthermore, the motor driver may also include connection terminals and other devices.

[0161] The aforementioned motor driver includes a motor cogging torque measurement device, which can be used to execute any motor cogging torque measurement method, possessing corresponding functions and beneficial effects. It is understood that technical details not provided in this embodiment and related content not referred to in the foregoing embodiments are excluded.

[0162] One embodiment of this application also provides a motor cogging torque measurement system, which includes a motor driver, a host computer, and a motor under test. The motor driver is connected to both the host computer and the motor under test. The functions of the motor driver, the host computer, and the motor under test can be found in the descriptions of the motor cogging torque measurement methods provided in any of the foregoing embodiments, and they have corresponding functions and beneficial effects, which will not be elaborated upon here.

[0163] One embodiment of this application also provides a storage medium (i.e., a computer-readable storage medium) containing computer-executable instructions (i.e., a computer program), which, when executed by the processor of a motor driver, are used to perform relevant operations in the motor cogging torque measurement method provided in any embodiment of this application, and have corresponding functions and beneficial effects.

[0164] Those skilled in the art will understand that embodiments of this application may be provided as methods, systems, or computer program products.

[0165] Therefore, this application may take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code. This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, produce implementations of the flowchart... Figure 1 One or more processes and / or boxes Figure 1 The computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The functions specified in one or more boxes. These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable apparatus for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0166] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0167] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0168] Note that the above are merely preferred embodiments and the technical principles employed in this application. Those skilled in the art will understand that this application is not limited to the specific embodiments described herein, and various obvious changes, readjustments, and substitutions can be made without departing from the scope of protection of this application. Therefore, although this application has been described in detail through the above embodiments, this application is not limited to the above embodiments, and may include many other equivalent embodiments without departing from the concept of this application, the scope of which is determined by the scope of the appended claims.

Claims

1. A method for measuring the cogging torque of a motor, applied to a motor driver, characterized in that, include: A series of consecutive drive signals are sent to the motor under test in sequence. Each drive signal includes a first sub-signal and a second sub-signal. The first sub-signal is sent before the second sub-signal. Each drive signal corresponds to a first position. The first sub-signal is used to make the motor under test move to the corresponding first position, and the second sub-signal is used to make the motor under test stabilize at the corresponding first position. After each transmission of the second sub-signal, the current value of the q-axis is obtained after a first time interval, where the first time interval is less than the duration of continuous transmission of the second sub-signal. After determining that the motor under test has operated for one position cycle based on the multiple drive signals, the cogging torque of the motor under test at each of the first positions is obtained based on the current current value corresponding to each first position and the magnetic flux linkage of the motor under test.

2. The method for measuring motor cogging torque according to claim 1, characterized in that, Also includes: After sending the first sub-signal to the motor under test, the second sub-signal is sent to the motor under test when the second position fed back by the encoder of the motor under test is determined to be the first position corresponding to the first sub-signal.

3. The method for measuring motor cogging torque according to claim 1, characterized in that, Also includes: Obtain the flux linkage, moment of inertia, current loop closed-loop bandwidth, speed loop mid-frequency bandwidth coefficient, number of magnetic poles, winding inductance parameters, and winding resistance parameters of the motor under test. Send the first position that the tested motor needs to operate to to the position adjuster; The position adjuster obtains the first current command based on the first position that the motor under test needs to operate to, the second position of the motor under test fed back by the encoder in the motor under test, the current actual speed fed back by the motor under test, and the flux linkage, moment of inertia, current loop closed-loop bandwidth, speed loop mid-frequency bandwidth coefficient, and number of magnetic poles of the motor under test. Based on the first current command, the actual current value of the q-axis, the closed-loop bandwidth of the current loop of the motor under test, the winding inductance parameters, and the winding resistance parameters, the first sub-signal corresponding to the first position is obtained.

4. The method for measuring motor cogging torque according to claim 3, characterized in that, The process of obtaining the first current command by the position adjuster based on the first position that the motor under test needs to operate to, the second position of the motor under test fed back by the encoder in the motor under test, the current actual speed fed back by the motor under test, and the flux linkage, moment of inertia, current loop closed-loop bandwidth, speed loop mid-frequency bandwidth coefficient, and number of magnetic poles of the motor under test includes: The position adjuster obtains the position error based on the first position that the motor under test needs to operate to and the second position of the motor under test fed back by the encoder in the motor under test. The position adjuster obtains a first speed command based on the position error and the position loop gain of the motor under test. The speed indicated by the first speed command is the speed that the motor under test needs to reach. The position adjuster obtains the first speed error based on the first speed command and the current actual speed fed back by the tested motor; The position adjuster obtains the first current command based on the first speed error, the flux linkage, moment of inertia, closed-loop bandwidth of the current loop, mid-frequency bandwidth coefficient of the speed loop, and the number of magnetic poles of the motor under test.

5. The method for measuring motor cogging torque according to claim 4, characterized in that, The formula for determining the current value represented by the first current command is as follows: I q_cmd =spdKp·V err +spdKi·∫V err spdKp=1 / (ω curr *δ 2 ) spdKi=δ*spdKp / K K=3P*Ψ r / (4*J) Among them, I q_cmd This indicates the current value represented by the first current command, V. err ω represents the first velocity error. curr δ represents the closed-loop bandwidth of the current loop of the motor under test, δ represents the mid-frequency bandwidth coefficient of the speed loop of the motor under test, P represents the number of magnetic poles of the motor under test, and Ψ represents the number of magnetic poles of the motor under test. r J represents the flux linkage of the motor under test, and J represents the moment of inertia of the motor under test.

6. The method for measuring motor cogging torque according to claim 3, characterized in that, Also includes: The position adjuster obtains the second current command based on the preset second speed command, the current actual speed fed back by the motor under test, and the flux linkage, moment of inertia, current loop closed-loop bandwidth, speed loop mid-frequency bandwidth coefficient, and number of magnetic poles of the motor under test. The speed represented by the second speed command is the speed that the motor under test needs to reach. Based on the second current command, the actual current value of the q-axis, the closed-loop bandwidth of the current loop of the motor under test, the winding inductance parameters, and the winding resistance parameters, the second sub-signal corresponding to the first position is obtained.

7. The method for measuring motor cogging torque according to claim 6, characterized in that, The second speed command indicates a speed of zero.

8. The method for measuring motor cogging torque according to claim 1, characterized in that, Also includes: The position cycle of the motor under test is determined by reading the second positions fed back by the encoder of the motor under test.

9. The method for measuring motor cogging torque according to claim 1, characterized in that, The step of obtaining the cogging torque of the motor under test at each of the first positions based on the current value corresponding to each of the first positions and the flux linkage of the motor under test includes: Multiply the current value corresponding to each of the first positions by 1.5 times the flux linkage of the motor under test to obtain the cogging torque of the motor under test at each of the first positions.

10. The method for measuring motor cogging torque according to claim 1, characterized in that, After determining that the motor under test has operated for one position cycle based on the plurality of drive signals, and after obtaining the cogging torque of the motor under test at each of the first positions based on the current value corresponding to each first position and the flux linkage of the motor under test, the method further includes: The cogging torque and the current current value of the q-axis at each of the first positions are sent to the host computer so that the user can view the cogging torque and the current current value of the q-axis through the host computer.

11. A motor cogging torque measuring device, applied to a motor driver, characterized in that, include: A signal transmitting unit is used to sequentially send a plurality of continuous drive signals to the motor under test. Each drive signal includes a first sub-signal and a second sub-signal. The first sub-signal is sent before the second sub-signal. Each drive signal corresponds to a first position. The first sub-signal is used to make the motor under test move to the corresponding first position, and the second sub-signal is used to make the motor under test stabilize at the corresponding first position. The current acquisition unit is used to acquire the current value of the q-axis after each start of transmission of the second sub-signal, at a first time interval, wherein the first time interval is less than the continuous transmission duration of the second sub-signal; The torque determination unit is used to determine the cogging torque of the motor under test at each of the first positions after the motor under test has operated for one position cycle based on the plurality of drive signals, based on the current current value corresponding to each first position and the flux linkage of the motor under test.

12. A motor driver, characterized in that, include: One or more processors and memory, Memory, used to store one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the motor cogging torque measurement method as described in any one of claims 1-10.

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