Motor encoder, motor calibration detection device, detection method and motor system
Through the collaborative design of the main control module, angle detection module, and auxiliary motor module, the dual reading heads are used to eliminate the eccentricity error of the grating ruler, realize the automated and accurate calibration of the encoder, and integrate torque detection. This solves the problems of high cost and low efficiency of DC brushless motor encoder testing equipment, and improves production efficiency and motor performance.
Patent Information
- Application Number
- CN202511656248.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-12
- Publication Date
- 2026-02-13
AI Technical Summary
Existing DC brushless motor encoder testing equipment is costly and slow, making it unsuitable for mass production. Inaccurate position information caused by encoder installation bias affects motor performance and reliability.
The system employs a collaborative design of a main control module, an angle detection module, and a drive motor module. It utilizes dual reading heads to eliminate eccentricity errors in the grating ruler, achieves encoder calibration through data alignment and fitting algorithms, integrates torque detection functionality, and simplifies the testing process.
It improves encoder calibration efficiency and accuracy, reduces production costs, shortens testing time, enhances production efficiency, and ensures the accuracy and efficiency of motor rotation angle and torque control.
Smart Images

Figure CN121521174A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of electrical automation technology, and in particular to a motor encoder, a motor calibration and testing device, a testing method, and a motor system. Background Technology
[0002] Brushless DC motors (BLDC motors), as a typical mechatronics product, have been widely used in various corners of modern industry and consumer fields due to their excellent characteristics such as high power density, high torque, high efficiency, long life and low noise.
[0003] To achieve precise control of brushless DC motors, especially in applications requiring accurate position, speed, or torque control, it is essential to acquire the rotor's magnetic pole position in real time and accurately. This crucial task is typically accomplished by position sensors, with encoders being the most commonly used type. An encoder is a sensor that converts mechanical geometric displacement (rotational or linear) into an electrical signal. In a brushless DC motor control system, it is mounted on the motor shaft to detect the rotor's real-time rotational angle, speed, and direction. Based on the position information fed back by the encoder, the control system calculates the current vector to be applied to the motor windings using specific algorithms (such as field-oriented control, FOC), thereby achieving smooth, efficient, and precise torque output. Therefore, the encoder's accuracy directly determines the control performance of the entire servo system.
[0004] However, during the manufacturing and assembly of the motor, errors inevitably exist in the mechanical installation between the encoder and the motor rotor. This error is mainly manifested as a fixed offset angle between the encoder's zero position (electrical zero position) and the motor rotor's magnetic pole zero position (i.e., the position of the permanent magnet's magnetic field centerline, d-axis), commonly referred to as "encoder installation offset" or "phase deviation." If the control system directly uses the raw readings from the uncalibrated encoder, its perceived rotor position will not match the actual magnetic pole position. This misalignment of position information will lead to incorrect commutation timing, resulting in unstable motor output, vibration, noise, and significantly reduced efficiency. In extreme cases, it may even cause the motor to lose steps or fail to start, severely impacting the system's performance and reliability.
[0005] In related technologies, when producing brushless DC motor modules, defective products can usually be screened by measuring the torque curve of the brushless DC motor using dynamometers, torque testing equipment, etc.
[0006] However, current DC brushless motor encoder testing equipment has the following technical problems:
[0007] Existing testing methods are costly and slow, which is not conducive to mass production and needs to be optimized. Summary of the Invention
[0008] Therefore, it is necessary to provide a motor encoder, a motor calibration and testing device, and a testing method that can improve the efficiency and accuracy of motor encoder calibration.
[0009] In a first aspect, this application provides a motor encoder and a motor calibration and testing device, comprising:
[0010] The main control module is connected to the motor under test and is used to realize data acquisition, calculation and motor drive control;
[0011] An angle detection module is connected to the main control module. The angle detection module includes a grating ruler and dual reading heads. The dual reading heads are arranged opposite to each other on the grating ruler. The dual reading heads of the angle detection module are configured to synchronously collect angle data and transmit it to the main control module. The main control module is configured to perform an arithmetic mean calculation based on the angle data collected by the dual reading heads to eliminate the self-eccentricity error of the grating ruler.
[0012] The auxiliary motor module is connected to the main control module. The auxiliary motor module is also connected to the motor under test via a coupling to drive the main shaft to rotate concentrically with the motor under test.
[0013] The main control module is configured to align the encoder angle data of the grating ruler and the angle data of the motor under test, output angle error data, and perform angle calibration of the motor under test and the encoder based on the angle error data.
[0014] In one embodiment, the device further includes:
[0015] A torque detection module is connected to the main control module. The torque detection module is used to measure the torque data of the motor under test during operation and transmit the measured torque data to the main control module.
[0016] The main control module is also configured to perform linear fitting and harmonic component analysis on the angle error data, torque data and power data according to a preset fitting algorithm. The main control module is also used to generate compensation parameters based on the analysis results and to calibrate the motor under test and the encoder.
[0017] In one embodiment, the main control module includes:
[0018] Control unit;
[0019] The torque data unit is connected to both the control unit and the torque detection module. The torque data unit is used to convert the torque data transmitted by the torque detection module from an analog signal to a digital signal and transmit it to the control unit.
[0020] The torque data unit includes an analog-to-digital converter and a programmable gain amplifier. The analog-to-digital converter is signal-connected to the programmable gain amplifier. The programmable gain amplifier is used to adjust the gain of the torque data. The analog-to-digital converter is used to convert the adjusted torque data from an analog signal to a digital signal.
[0021] In one embodiment, the main control module includes:
[0022] A motor drive unit is connected to the control unit, and the motor drive unit includes a drive chip and a current detection circuit;
[0023] The driver chip is electrically connected to the control unit and is used to receive the pulse width modulation signal output by the control unit and drive the motor under test to run.
[0024] The current detection unit is connected to both the drive chip and the control unit, and is used to detect the d-axis current and q-axis current of the motor under test, and to feed the current detection data back to the control unit.
[0025] Secondly, embodiments of this application provide a motor encoder and a motor calibration and testing method, the method comprising:
[0026] In response to the verification of the motor under test, the motor under test is driven to rotate and the reference angle data of the grating ruler and the encoder angle data of the motor under test are collected simultaneously.
[0027] Based on the deviation values of the reference angle data and the encoder angle data, angle compensation parameters are generated, and the encoder is calibrated based on the angle compensation parameters.
[0028] Based on the angle compensation parameters, several sets of preset d-axis current and q-axis current are injected into the motor under test, and the torque data corresponding to each set of current is obtained.
[0029] The torque calibration of the motor under test is completed based on the torque data.
[0030] In one embodiment, the step of driving the motor under test to rotate and simultaneously acquiring the reference angle data of the grating ruler and the encoder angle data of the motor under test includes:
[0031] The angle data of the grating ruler are collected synchronously by two reading heads that are set in opposite directions, and the arithmetic mean of the angles of the two reading heads is obtained.
[0032] The reference angle data is obtained by eliminating the eccentricity error in the angle data based on the arithmetic mean of the angles.
[0033] In one embodiment, generating angle compensation parameters based on the deviation value between the reference angle data and the encoder angle data, and calibrating the encoder based on the angle compensation parameters, includes:
[0034] In response to the calibration of the encoder, the 0-360° angle range is divided into an even number of intervals according to a preset step size;
[0035] Map the deviation values of the reference angle data and the encoder angle data to the angle domain and plot an error image;
[0036] Calculate the compensation value for each interval separately, and verify the compensation value until the compensation value meets the preset constraint conditions.
[0037] In one embodiment, the method further includes:
[0038] Several sets of preset d-axis and q-axis currents are injected into the motor under test, and the torque data corresponding to each set of currents is obtained.
[0039] The torque data is fitted with a straight line to obtain the motor constant of the motor under test.
[0040] In one embodiment, the method further includes:
[0041] Maintain the q-axis current at 0 and inject several preset d-axis currents, and collect d-axis voltage data;
[0042] The winding resistance of the motor under test is obtained by fitting and analyzing the d-axis current and the corresponding d-axis voltage data.
[0043] The spindle angular velocity of the motor under test is obtained, and the winding inductance is calculated based on the spindle angular velocity and the winding resistance.
[0044] Thirdly, this application also provides a motor system, including a motor encoder and a motor calibration and testing device according to any one of the first aspects, wherein the device implements control based on a motor encoder and a motor calibration and testing method as described in any one of the second aspects during operation.
[0045] The aforementioned motor encoder, motor calibration and testing device, testing method, and motor system, derived from the technical features in the embodiments, can achieve the following beneficial effects to address the technical problems raised in the background art:
[0046] This application provides a motor encoder and a motor calibration and testing device, including a main control module, a torque detection module, an angle detection module, and a driven motor module. In implementation, the collaborative design of the main control module, torque detection module, dual-reading-head angle detection module, and driven motor module achieves multiple technological breakthroughs and forms a coherent technological advantage. First, the angle detection module uses dual reading heads arranged in opposite directions. The arithmetic mean of the angles from the two reading heads can offset the eccentricity error of the grating ruler itself, providing a high-precision angle reference for the main control module. This solves the problem of inaccurate angle measurement caused by grating ruler installation deviation in traditional single-reading heads, laying a precise data foundation for encoder calibration. Second, the driven motor module drives the motor under test to rotate concentrically, simultaneously acquiring grating ruler angle data and motor under test angle data with the main control module. Through data alignment and error analysis, it overcomes the industry pain points of low efficiency in manual calibration and the inability of zero-point calibration to eliminate periodic errors, achieving automated and precise encoder calibration. Meanwhile, the torque detection module transmits torque data in real time. The main control module, combined with a preset fitting algorithm, performs linear fitting and harmonic component analysis on angle error, torque, and power data. It can calculate the motor constant Kt, detect winding resistance and inductance, and generate compensation parameters based on the analysis results to complete motor torque calibration, eliminating the need for separate multi-test stations. The overall device integrates encoder calibration, motor parameter detection, and torque calibration functions, significantly shortening testing time, reducing investment in dynamometers and other equipment, lowering production costs, improving production efficiency, and adapting to the batch production requirements of brushless DC motors, ensuring that the motor rotation angle accuracy and torque control efficiency meet the standards. Attached Figure Description
[0047] To more clearly illustrate the technical solutions in the embodiments of this application or the conventional technology, the drawings used in the description of the embodiments or the conventional technology will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0048] Figure 1 This is a schematic diagram of the architecture of a motor encoder and a motor calibration and testing device according to an embodiment of this application;
[0049] Figure 2 This is a schematic diagram of the architecture of a motor encoder and a motor calibration and testing device according to another embodiment of this application;
[0050] Figure 3 This is a partial connection diagram of the main control module in one embodiment of this application;
[0051] Figure 4 This is a flowchart illustrating a motor encoder and a motor calibration and testing method according to an embodiment of this application;
[0052] Figure 5 This is a flowchart illustrating a motor encoder and a motor calibration and testing method according to an embodiment of this application;
[0053] Figure 6 This is a flowchart illustrating a motor encoder and a motor calibration and testing method according to an embodiment of this application;
[0054] Figure 7 This is a flowchart illustrating a motor encoder and a motor calibration and testing method according to an embodiment of this application;
[0055] Figure 8 This is a flowchart illustrating a motor encoder and a motor calibration and testing method according to an embodiment of this application. Detailed Implementation
[0056] To facilitate understanding of this application, a more complete description will be provided below with reference to the accompanying drawings, which illustrate embodiments of the present application. However, the present application can be implemented in many different forms and is not limited to the embodiments described herein. Rather, these embodiments are provided so that the disclosure of this application will be thorough and complete.
[0057] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application.
[0058] It is understood that the terms "first," "second," etc., used herein may be used to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish one element from another. For example, without departing from the scope of this application, a first resistor may be referred to as a second resistor, and similarly, a second resistor may be referred to as a first resistor. Both the first resistor and the second resistor are resistors, but they are not the same resistor.
[0059] It is understood that the term "connection" in the following embodiments should be understood as "electrical connection," "communication connection," etc., if the connected circuits, modules, units, etc., have electrical signal or data transmission with each other.
[0060] It is understandable that "at least one" refers to one or more, and "multiple" refers to two or more. "At least a part of an element" refers to part or all of an element.
[0061] When used herein, the singular forms of “a,” “an,” and “the” may also include the plural forms unless the context clearly indicates otherwise. It should also be understood that the terms “comprising / including” or “having,” etc., specify the presence of the stated features, wholes, steps, operations, components, parts, or combinations thereof, but do not preclude the possibility of the presence or addition of one or more other features, wholes, steps, operations, components, parts, or combinations thereof. Meanwhile, the term “and / or” as used in this specification includes any and all combinations of the associated listed items.
[0062] This application was made by the inventor based on his understanding and research into the following issues:
[0063] In related technologies, when producing brushless DC motor modules, defective products can usually be screened by measuring the torque curve of the brushless DC motor using dynamometers, torque testing equipment, etc.
[0064] However, current DC brushless motor encoder testing equipment has the following technical problems:
[0065] Existing testing methods are costly and slow, which is not conducive to mass production and needs to be optimized.
[0066] To address the aforementioned issues, this application provides a motor encoder, a motor calibration and testing device, and a testing method.
[0067] In one embodiment, it can be as follows Figure 1 and Figure 2 As shown, this embodiment provides a motor encoder and a motor calibration and testing device, including a main control module, an angle detection module, and a drag motor module.
[0068] The main control module is connected to the motor under test and is used to realize data acquisition, calculation and motor drive control.
[0069] The angle detection module is connected to the main control module. The angle detection module includes a grating ruler and dual reading heads. The dual reading heads are arranged opposite to each other on the grating ruler. The dual reading heads of the angle detection module are configured to synchronously collect angle data and transmit it to the main control module. The main control module is configured to perform an arithmetic mean calculation based on the angle data collected by the dual reading heads to eliminate the self-eccentricity error of the grating ruler.
[0070] The auxiliary motor module is connected to the main control module, and the auxiliary motor module is also connected to the motor under test via a coupling to drive the main shaft to rotate concentrically with the motor under test.
[0071] The main control module is configured to align the encoder angle data of the grating ruler and the angle data of the motor under test, output angle error data, and perform angle calibration of the motor under test and the encoder based on the angle error data.
[0072] In specific implementation, it can be as follows: Figure 1 and Figure 2 As shown, the main control module can be implemented based on an MCU main control board, the angle detection module can be implemented based on a grating ruler and dual reading heads, and the drag motor module can be implemented by a drag motor and coupled and driven to the motor under test via a coupling. The main control board can be connected to a controller via a host computer to drive the drag motor. The grating ruler and dual reading heads are signal-connected to the main control board, and the motor under test is also simultaneously signal-connected to the main control board.
[0073] By implementing the above-described motor encoder and motor calibration and testing device, the following beneficial effects can be achieved:
[0074] In implementation, the collaborative design of the main control module, torque detection module, dual-reading head angle detection module, and opposing motor module achieves multiple technological breakthroughs and forms a coherent technological advantage. First, the angle detection module employs dual reading heads arranged in opposite directions. The arithmetic mean of the angles from the two reading heads can offset the eccentricity error of the grating ruler itself, providing a high-precision angle reference for the main control module. This solves the problem of inaccurate angle measurement caused by grating ruler installation deviations in traditional single-reading heads, laying a precise data foundation for encoder calibration. Second, the opposing motor module drives the motor under test to rotate concentrically, simultaneously acquiring grating ruler angle data and motor angle data from the main control module. Through data alignment and error analysis, it overcomes the industry pain points of low efficiency in manual calibration and the inability to eliminate periodic errors in zero-point calibration, achieving automated and precise encoder calibration. Simultaneously, the torque detection module transmits torque data in real time. The main control module, combined with a preset fitting algorithm, performs linear fitting and harmonic component analysis on angle error, torque, and power data. This allows for the calculation of the motor constant Kt, detection of winding resistance and inductance, and the generation of compensation parameters based on the analysis results to complete motor torque calibration, eliminating the need for separate multi-test stations. The overall device integrates encoder calibration, motor parameter detection and torque calibration functions, which greatly shortens the testing time, reduces the investment in equipment such as dynamometers, lowers production costs, improves production efficiency, adapts to the batch production needs of brushless DC motors, and ensures that the accuracy of motor rotation angle and torque control efficiency meet the standards.
[0075] In one embodiment, it can be as follows Figure 1 and Figure 2 As shown, the device also includes a torque detection module.
[0076] The torque detection module is connected to the main control module. The torque detection module is used to measure the torque data of the motor under test during operation and transmit the measured torque data to the main control module. The main control module is also configured to perform linear fitting and harmonic component analysis on the angle error data, torque data and power data according to a preset fitting algorithm. The main control module is also used to generate compensation parameters based on the analysis results and to calibrate the motor under test and the encoder.
[0077] The torque detection module can be a torque sensor, which is coupled to the drive motor and the motor under test via a coupling, and is also connected to the main control board for signal transmission.
[0078] In one embodiment, it can be as follows Figure 3 As shown, the main control module includes a control unit and a torque data unit.
[0079] The torque data unit is connected to both the control unit and the torque detection module. The torque data unit is used to convert the torque data transmitted by the torque detection module from an analog signal to a digital signal and then transmit it to the control unit.
[0080] The torque data unit includes an analog-to-digital converter (ADC) and a programmable gain amplifier (PDA). The ADC is signal-connected to the PDA, which is used to adjust the gain of the torque data. The ADC is used to convert the adjusted torque data from an analog signal to a digital signal.
[0081] In this embodiment, the torque data unit precisely adjusts the gain of the analog torque data transmitted by the torque detection module through a programmable gain amplifier to adapt to torque signals of different ranges. The adjusted signal is then converted into a digital signal by an analog-to-digital converter, ensuring distortion-free and high-precision torque data transmission. This provides reliable data support for subsequent torque analysis and motor calibration by the control unit, ensuring accurate motor torque calibration results and improving the overall detection accuracy of the device.
[0082] In one embodiment, it can be as follows Figure 3 As shown, the main control module includes a motor drive unit.
[0083] The motor drive unit is connected to the control unit, and the motor drive unit includes a drive chip and a current detection circuit. The drive chip is electrically connected to the control unit and is used to receive the pulse width modulation signal output by the control unit and drive the motor under test to run. The current detection unit is connected to both the drive chip and the control unit and is used to detect the d-axis current and q-axis current of the motor under test and feed the current detection data back to the control unit.
[0084] In this embodiment, in the motor drive unit, the drive chip receives the pulse width modulation signal from the control unit to precisely drive the motor under test, and the current detection unit captures the d-axis and q-axis currents in real time and feeds them back to the control unit, forming a current closed-loop control. This ensures accurate motor current adjustment, provides reliable current data for torque calibration and parameter calculation, improves motor calibration accuracy and control stability, and ensures the overall reliability of the device.
[0085] In one embodiment, the dual reading heads of the angle detection module are configured to synchronously acquire angle data and transmit it to the main control module. The main control module is configured to perform an arithmetic mean calculation based on the angle data acquired by the dual reading heads to eliminate the self-eccentricity error of the grating ruler.
[0086] In this embodiment, the dual reading heads of the angle detection module synchronously collect angle data, providing the main control module with real-time, matched raw data. The main control module directly cancels out the reverse complementary error caused by the self-eccentricity of the grating ruler through arithmetic mean calculation, significantly reducing the interference of eccentricity on angle measurement. This improves the accuracy of the angle reference data without additional mechanical adjustment, providing a precise reference for the subsequent encoder angle calibration of the motor under test, ensuring the reliability of the encoder calibration results, and thus optimizing the control accuracy of the motor rotation angle.
[0087] Based on the same inventive concept, embodiments of this application also provide a motor encoder and a motor calibration and testing method, which can be as follows: Figure 4 As shown, the method includes...
[0088] Step 402: In response to calibrating the motor under test, drive the motor under test to rotate and simultaneously collect the reference angle data of the grating ruler and the encoder angle data of the motor under test.
[0089] Step 404: Based on the deviation value of the reference angle data and the encoder angle data, generate angle compensation parameters, and complete the encoder calibration based on the angle compensation parameters.
[0090] Step 406: Based on the angle compensation parameters, inject several sets of preset d-axis current and q-axis current into the motor under test, and obtain the torque data corresponding to each set of currents.
[0091] Step 408: Complete the torque calibration of the motor under test based on the torque data.
[0092] In this embodiment, reference and encoder angle data are first collected synchronously. The deviation is used to generate compensation parameters to complete encoder calibration. Then, a preset current is injected based on these parameters, and torque data is obtained to finally achieve motor torque calibration. This eliminates encoder periodic errors and accurately correlates current and torque. It eliminates the need for switching between multiple workstations, improves calibration accuracy and efficiency, and is suitable for batch motor testing needs.
[0093] In one embodiment, it can be as follows Figure 5 As shown, step 402 includes:
[0094] Step 502: Simultaneously acquire the angle data of the grating ruler using two reading heads set in opposite directions, and obtain the arithmetic mean of the angles of the two reading heads.
[0095] Step 504: Eliminate the eccentricity error in the angle data based on the arithmetic mean of the angles to obtain the reference angle data.
[0096] In this embodiment, dual reading heads arranged in opposite directions synchronously acquire the angle data of the grating ruler. The arithmetic mean of the angles is used to accurately offset the error introduced by the eccentricity of the grating ruler itself, thereby obtaining high-precision reference angle data. This design eliminates eccentricity interference without complex mechanical calibration, ensuring the accuracy of synchronous acquisition and comparison between the reference angle and the encoder angle of the motor under test. This provides a reliable data foundation for the subsequent generation of angle compensation parameters, improving the encoder calibration accuracy from the source.
[0097] In one embodiment, it can be as follows Figure 6 As shown, step 404 includes:
[0098] Step 602: In response to calibrating the encoder, the 0-360° angle domain is divided into an even number of intervals according to a preset step size.
[0099] Step 604: Map the deviation values of the reference angle data and the encoder angle data to the angle domain and draw an error image.
[0100] Step 606: Calculate the compensation value for each interval, and verify the compensation value until the compensation value meets the preset constraint conditions.
[0101] In this embodiment, the 0-360° angle range is divided into even-numbered intervals by a preset step size. The angle deviation between the reference and the encoder is mapped to the corresponding intervals, and an error image is plotted. Then, the compensation value for each interval is calculated and verified to meet the constraints. This method achieves precise compensation for angle errors in different zones, overcomes periodic errors, and ensures the effectiveness of compensation by verifying to the constraint conditions. This significantly improves the encoder calibration accuracy and lays a reliable foundation for subsequent motor torque calibration.
[0102] In one embodiment, such as Figure 7 As shown, the method further includes:
[0103] Step 702: Inject several sets of preset d-axis current and q-axis current into the motor under test, and obtain the torque data corresponding to each set of current.
[0104] Step 704: Perform linear fitting on the torque data to obtain the motor constants of the motor under test.
[0105] In this embodiment, multiple sets of preset d-axis and q-axis currents are injected into the motor under test, and corresponding torque data is collected. The motor constant is then obtained by linear fitting of the torque data. This method relies on the accurate angle foundation of the previous encoder calibration and reduces random errors through fitting multiple sets of data. It eliminates the need for separate equipment such as a dynamometer, achieving efficient and accurate measurement of the motor constant. Furthermore, it reuses the current and torque acquisition modules with the torque calibration process, further simplifying operation, improving testing efficiency, and adapting to the needs of mass production.
[0106] In one embodiment, such as Figure 8 As shown, the method further includes:
[0107] Step 802: Maintain the q-axis current at 0 and inject several preset d-axis currents, and collect d-axis voltage data.
[0108] Step 804: Perform fitting analysis on the d-axis current and the corresponding d-axis voltage data to obtain the winding resistance of the motor under test.
[0109] Step 806: Obtain the spindle angular velocity of the motor under test, and calculate the winding inductance based on the spindle angular velocity and the winding resistance.
[0110] For example, due to the presence of the counter-motor, the main control module can operate the motor under test while the spindle system maintains a stable speed. To maintain stability, the main control module can inject a constant q-axis current of 0 into the motor under test through a current loop control algorithm and a motor drive circuit, causing it to passively rotate under the drive of the counter-motor system. Specifically, the motor's drive equation can be shown as follows:
[0111]
[0112] Where Ud and Uq are the voltages along the d and q axes, respectively; Id and Iq are the currents along the d and q axes, respectively; We is the electric angular velocity during rotation; and Ψd and Ψq are the magnetic flux linkages along the d and q axes, respectively. Once the motor reaches steady state under the drive of the tractor motor, the differential term becomes 0. The magnetic flux linkage along the q axis follows: When the injected q-axis current is 0A, the motor produces no torque, and the flux linkage Ψq term on the q-axis is 0. Injecting five different d-axis currents at this point yields five points of Ud voltage. Thus, by using the ratio of the five d-axis voltages to the five d-axis currents, a linear fit can be performed to obtain the final Rs resistance. Furthermore, according to the flux linkage equation: When a five-point d-axis current Id is injected, five pairs of d-axis flux linkages Ψd and Id can be obtained. Since Ψf is the flux linkage of the permanent magnet in the motor and cannot be precisely controlled, the slope Ld is also solved by linear fitting of the five-point data. The Rs coil resistance and Ld inductance of the motor can be tested using the above method.
[0113] In this embodiment, by maintaining the q-axis current at 0, injecting multiple sets of d-axis currents and acquiring the corresponding d-axis voltages, the winding resistance is obtained through fitting analysis, and the winding inductance is calculated in conjunction with the spindle angular velocity. This approach eliminates q-axis current interference while reusing the current and voltage acquisition modules to achieve efficient winding parameter detection without requiring a separate workstation. This ensures the accuracy of parameter calculations and seamlessly integrates with the encoder and torque calibration processes, further improving device integration and detection efficiency while reducing production costs.
[0114] Based on the same inventive concept, this application also provides a motor system, including a motor encoder and a motor calibration and testing device according to any one of the above embodiments, wherein the device implements control based on a motor encoder and a motor calibration and testing method as described in any one of the above embodiments during operation.
[0115] It is understood that the above-mentioned motor encoder, motor calibration and testing device, testing method and motor system can also take other forms, and are not limited to the forms mentioned in the above embodiments, as long as they can achieve the function of improving the efficiency and accuracy of motor encoder calibration.
[0116] In the description of this specification, references to terms such as "some embodiments," "other embodiments," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this application. In this specification, the illustrative descriptions of the above terms do not necessarily refer to the same embodiments or examples.
[0117] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0118] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these modifications and improvements all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A motor encoder and a motor calibration and testing device, characterized in that, include: The main control module is connected to the motor under test and is used to realize data acquisition, calculation and motor drive control; An angle detection module is connected to the main control module. The angle detection module includes a grating ruler and dual reading heads. The dual reading heads are arranged opposite to each other on the grating ruler. The dual reading heads of the angle detection module are configured to synchronously collect angle data and transmit it to the main control module. The main control module is configured to perform an arithmetic mean calculation based on the angle data collected by the dual reading heads to eliminate the self-eccentricity error of the grating ruler. The auxiliary motor module is connected to the main control module. The auxiliary motor module is also connected to the motor under test via a coupling to drive the main shaft to rotate concentrically with the motor under test. The main control module is configured to align the encoder angle data of the grating ruler and the angle data of the motor under test, output angle error data, and perform angle calibration of the motor under test and the encoder based on the angle error data.
2. The motor encoder and motor calibration and testing device according to claim 1, characterized in that, The device further includes: A torque detection module is connected to the main control module. The torque detection module is used to measure the torque data of the motor under test during operation and transmit the measured torque data to the main control module. The main control module is also configured to perform linear fitting and harmonic component analysis on the angle error data, torque data and power data according to a preset fitting algorithm. The main control module is also used to generate compensation parameters based on the analysis results and to calibrate the motor under test and the encoder.
3. The motor encoder and motor calibration and testing device according to claim 2, characterized in that, The main control module includes: Control unit; The torque data unit is connected to both the control unit and the torque detection module. The torque data unit is used to convert the torque data transmitted by the torque detection module from an analog signal to a digital signal and transmit it to the control unit. The torque data unit includes an analog-to-digital converter and a programmable gain amplifier. The analog-to-digital converter is signal-connected to the programmable gain amplifier. The programmable gain amplifier is used to adjust the gain of the torque data. The analog-to-digital converter is used to convert the adjusted torque data from an analog signal to a digital signal.
4. The motor encoder and motor calibration and testing device according to claim 1, characterized in that, The main control module includes: A motor drive unit is connected to the control unit, and the motor drive unit includes a drive chip and a current detection circuit; The driver chip is electrically connected to the control unit and is used to receive the pulse width modulation signal output by the control unit and drive the motor under test to run. The current detection unit is connected to both the drive chip and the control unit, and is used to detect the d-axis current and q-axis current of the motor under test, and to feed the current detection data back to the control unit.
5. A motor encoder and a motor calibration and testing method, characterized in that, The method includes: In response to the verification of the motor under test, the motor under test is driven to rotate and the reference angle data of the grating ruler and the encoder angle data of the motor under test are collected simultaneously. Based on the deviation values of the reference angle data and the encoder angle data, angle compensation parameters are generated, and the encoder is calibrated based on the angle compensation parameters. Based on the angle compensation parameters, several sets of preset d-axis current and q-axis current are injected into the motor under test, and the torque data corresponding to each set of current is obtained. The torque calibration of the motor under test is completed based on the torque data.
6. The motor encoder and motor calibration and testing method according to claim 5, characterized in that, The process of driving the motor under test to rotate and simultaneously acquiring the reference angle data of the grating ruler and the encoder angle data of the motor under test includes: The angle data of the grating ruler are collected synchronously by two reading heads that are set in opposite directions, and the arithmetic mean of the angles of the two reading heads is obtained. The reference angle data is obtained by eliminating the eccentricity error in the angle data based on the arithmetic mean of the angles.
7. The motor encoder and motor calibration and testing method according to claim 5, characterized in that, The step of generating angle compensation parameters based on the deviation values of the reference angle data and the encoder angle data, and calibrating the encoder based on the angle compensation parameters, includes: In response to the calibration of the encoder, the 0-360° angle range is divided into an even number of intervals according to a preset step size; Map the deviation values of the reference angle data and the encoder angle data to the angle domain and plot an error image; Calculate the compensation value for each interval separately, and verify the compensation value until the compensation value meets the preset constraint conditions.
8. The motor encoder and motor calibration and testing method according to claim 5, characterized in that, The method further includes: Several sets of preset d-axis and q-axis currents are injected into the motor under test, and the torque data corresponding to each set of currents is obtained. The torque data is fitted with a straight line to obtain the motor constant of the motor under test.
9. The motor encoder and motor calibration and testing method according to claim 5, characterized in that, The method further includes: Maintain the q-axis current at 0 and inject several preset d-axis currents, and collect d-axis voltage data; The winding resistance of the motor under test is obtained by fitting and analyzing the d-axis current and the corresponding d-axis voltage data. The spindle angular velocity of the motor under test is obtained, and the winding inductance is calculated based on the spindle angular velocity and the winding resistance.
10. A motor system, characterized in that, The invention includes a motor encoder and a motor calibration and testing device according to any one of claims 1-4, wherein the device is controlled during operation based on a motor encoder and a motor calibration and testing method according to any one of claims 5-9.