Method, device and equipment for synchronizing motor and sensor zero alignment, and storage medium
Patent Information
- Application Number
- CN202311811206.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-25
- Publication Date
- 2026-10-09
- Estimated Expiration
- 2043-12-25
AI Technical Summary
[0005]本发明的主要目的在于提供一种同步电机与传感器零位对齐方法、装置、设备及存储介质,旨在解决同步电机中由于工艺等诸多因素导致角度传感器的零位磁铁也无法与极对的零位严格对齐,得到的示数存在误差的技术问题
[0036]This invention involves repeatedly performing the calibration data acquisition process during the manufacturing stage until the calibration data corresponding to each pole slot on the synchronous motor is obtained. After data cleaning and preprocessing, the calibration data corresponding to each pole slot is arranged in an orderly manner, and the arrangement result is used as a calibration data sequence. During user operation, the calibration data sequence is compared with the real-time measurement values of the angle sensor. Based on the calibration data sequence, the calibration reference data required for the real-time measurement values of the angle sensor is determined. Based on the calibration reference data, the displayed values of the angle sensor are corrected. Through the above steps, the accuracy and stability of the vehicle control system are improved, and the user experience is enhanced.
Smart Images

Figure CN117895846B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of motor system control, and in particular to a method, apparatus, device, and storage medium for aligning the zero position of a synchronous motor and a sensor. Background Technology
[0002] In synchronous motor applications, angle sensors are widely used to feed back angular position information to the control system for precise position and motion control. However, due to installation process limitations, the zero point of the angle sensor and the zero point of the motor drive are often not perfectly aligned, resulting in a certain zero-position error in practical applications.
[0003] In synchronous motors, each pole pair represents a zero position. However, due to manufacturing limitations, the pole pairs cannot be perfectly evenly distributed on the rotor, resulting in errors in the zero-position of the pole pairs. Furthermore, the zero-position magnet of the angle sensor cannot be perfectly aligned with the zero position of the pole pair, which also introduces measurement errors.
[0004] The zero-position error caused by the manufacturing process is currently difficult to overcome. It is necessary to design a zero-position alignment technology solution for these motors and sensors at the level of the relevant control system to reduce the error of the final angle sensor reading. Summary of the Invention
[0005] The main objective of this invention is to provide a method, apparatus, device, and storage medium for aligning the zero position of a synchronous motor and a sensor, aiming to solve the technical problem that, due to various factors such as manufacturing processes, the zero-position magnet of the angle sensor cannot be strictly aligned with the zero position of the pole pair, resulting in errors in the obtained readings.
[0006] To achieve the above objectives, the present invention provides a method for zero-position alignment of a synchronous motor and a sensor, comprising:
[0007] Acquire calibration data sequences and real-time measurement values from the angle sensor;
[0008] Based on the calibration data sequence, determine the calibration reference data required for the real-time measurement values of the angle sensor;
[0009] The angle sensor display value is corrected based on the calibration reference data.
[0010] Optionally, before acquiring the calibration data sequence and the real-time measurement values of the angle sensor, the method further includes:
[0011] The calibration data acquisition process is repeated multiple times until the calibration data corresponding to each pole slot on the synchronous motor is obtained.
[0012] The calibration data at the same zero position are processed to make the remaining number of calibration data the same as the number of pole slots of the synchronous motor to which the angle sensor is applied.
[0013] The calibration data corresponding to each pole slot are arranged in order of size, and the arrangement result is used as the calibration data sequence.
[0014] Optionally, the calibration data acquisition process includes:
[0015] A constant current is input to the synchronous motor, causing the rotor of the synchronous motor to rotate at a preset speed, and the constant current is within the safe current-carrying range;
[0016] When the rotor reaches a predetermined number of revolutions while in a stable rotational state, the current input is stopped.
[0017] Once the rotor stops rotating naturally, the displayed values of the angle sensor are recorded and processed to obtain calibration data.
[0018] Optionally, after the rotor naturally stops rotating, the displayed value of the angle sensor is recorded and processed to obtain calibration data, including:
[0019] During the process of the rotor speed gradually decreasing until it stops rotating, the rate of change of the displayed value of the angle sensor is acquired;
[0020] When the rate of change of the displayed value of the angle sensor decreases to the sampling threshold, the sampling is repeated multiple times according to the preset sampling interval to obtain multiple sampled values;
[0021] Calculate the average value of the multiple sampled values, and use the average value of the sampled values as calibration data.
[0022] Optionally, determining the calibration data corresponding to the adjacent pole slot on the synchronous motor based on the calibration data sequence includes:
[0023] Based on the calibration data sequence, determine the two calibration data points that are closest to the real-time measurement value of the angle sensor;
[0024] When the numerical range formed by the two nearest calibration data contains the angle sensor measurement value, the two nearest calibration data are used as the calibration reference data;
[0025] When the numerical range formed by the nearest calibration data does not include the angle sensor measurement value, the angle sensor measurement value can be considered to be between the first and last pole pairs, and the first and last values of the calibration data sequence can be used as the calibration reference data.
[0026] Optionally, the step of correcting the real-time measured values of the angle sensor based on the polar groove interval includes:
[0027] When the calibration reference data is the two calibration data closest to the real-time measurement value of the angle sensor, the difference between the real-time measurement value and the calibration reference value is calculated to obtain the difference result;
[0028] Compare the absolute values of the difference results, and use the difference result corresponding to the smaller absolute value as the corrected angle sensor display value.
[0029] Optionally, the calibration data sequence is stored in the flash memory of the drive MCU outside the synchronous motor.
[0030] Furthermore, the present invention provides a synchronous motor and sensor zero-position alignment device, comprising:
[0031] The data acquisition module is used to acquire calibration data sequences and real-time measurement values from the angle sensor;
[0032] The data analysis module is used to determine the calibration reference data required for the real-time measurement value of the angle sensor based on the calibration data sequence.
[0033] The data processing module is used to correct the angle sensor display value based on the calibration reference data.
[0034] Furthermore, the present invention provides a synchronous motor and sensor zero-position alignment device, the synchronous motor and sensor zero-position alignment device comprising: a memory, a processor, and a synchronous motor and sensor zero-position alignment program stored in the memory and executable on the processor, the synchronous motor and sensor zero-position alignment program being configured to implement the steps of any of the synchronous motor and sensor zero-position alignment methods described herein.
[0035] Furthermore, the present invention provides a storage medium storing a synchronous motor and sensor zero-position alignment program, wherein when the synchronous motor and sensor zero-position alignment program is executed by a processor, the steps of any of the synchronous motor and sensor zero-position alignment methods described herein are implemented.
[0036] This invention involves repeatedly performing the calibration data acquisition process during the manufacturing stage until the calibration data corresponding to each pole slot on the synchronous motor is obtained. After data cleaning and preprocessing, the calibration data corresponding to each pole slot is arranged in an orderly manner, and the arrangement result is used as a calibration data sequence. During user operation, the calibration data sequence is compared with the real-time measurement values of the angle sensor. Based on the calibration data sequence, the calibration reference data required for the real-time measurement values of the angle sensor is determined. Based on the calibration reference data, the displayed values of the angle sensor are corrected. Through the above steps, the accuracy and stability of the vehicle control system are improved, and the user experience is enhanced. Attached Figure Description
[0037] Figure 1 This is a schematic diagram of the hardware operating environment of the synchronous motor and sensor zero-position alignment device involved in the synchronous motor and sensor zero-position alignment method of the present invention.
[0038] Figure 2 This is a flowchart illustrating the first embodiment of the synchronous motor and sensor zero-position alignment method of the present invention;
[0039] Figure 3 This is a flowchart illustrating a second embodiment of the synchronous motor and sensor zero-position alignment method of the present invention;
[0040] Figure 4 This is a flowchart illustrating the third embodiment of the synchronous motor and sensor zero-position alignment method of the present invention;
[0041] Figure 5 This is a flowchart illustrating the fourth embodiment of the synchronous motor and sensor zero-position alignment method of the present invention;
[0042] Figure 6 This is a structural block diagram of the first embodiment of the synchronous motor and sensor zero-position alignment method of the present invention.
[0043] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0044] It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
[0045] Reference Figure 1 , Figure 1 This is a schematic diagram of the synchronous motor and sensor zero-position alignment device structure in the hardware operating environment involved in the embodiments of the present invention.
[0046] like Figure 1As shown, the synchronous motor and sensor zero-position alignment device may include: a processor 1001, such as a central processing unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. The communication bus 1002 is used to enable communication between these components. The user interface 1003 may include a display screen or an input unit such as a keyboard; optionally, the user interface 1003 may also include a standard wired interface or a wireless interface. The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface). The memory 1005 may be a high-speed random access memory (RAM) or a stable non-volatile memory (NVM), such as a disk drive. The memory 1005 may also optionally be a storage device independent of the aforementioned processor 1001.
[0047] Those skilled in the art will understand that Figure 1 The structure shown does not constitute a limitation on the synchronous motor and sensor zero-position alignment device, and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0048] like Figure 1 As shown, the memory 1005, which serves as a storage medium, may include an operating system, a data storage module, a network communication module, a user interface module, and a synchronous motor and sensor zero-position alignment program.
[0049] exist Figure 1 In the synchronous motor and sensor zero-position alignment device shown, the network interface 1004 is mainly used for data communication with other devices; the user interface 1003 is mainly used for data interaction with the user; the processor 1001 and memory 1005 in the synchronous motor and sensor zero-position alignment device of the present invention can be set in the synchronous motor and sensor zero-position alignment device. The synchronous motor and sensor zero-position alignment device calls the synchronous motor and sensor zero-position alignment program stored in the memory 1005 through the processor 1001 and executes the synchronous motor and sensor zero-position alignment method provided in the embodiment of the present invention.
[0050] This invention provides a method for aligning the zero position of a synchronous motor and a sensor, referring to... Figure 2 , Figure 2 This is a flowchart illustrating the first embodiment of the synchronous motor and sensor zero-position alignment method of the present invention.
[0051] The method for aligning the synchronous motor and the sensor at zero position includes:
[0052] Step S10: Obtain the calibration data sequence and the real-time measurement values of the angle sensor.
[0053] It's important to note that a synchronous motor is an electric motor capable of precisely controlling its rotational angle, speed, and position. It typically consists of the motor body, a driver, and a control system. The motor body includes a stator (or stator-rotor) and a rotor (or moving rotor). The stator is the stationary part of the motor, usually composed of an iron core and coils (windings). The rotor is the rotating part of the motor, rotating under the influence of a magnetic field. Synchronous motor systems require angle sensors or encoders to detect the rotor's position, speed, and acceleration in real time, providing this information to the control system for closed-loop control. The sensors are usually mounted on the rotor to ensure real-time feedback. The driver adjusts the output current or voltage based on the signals from the sensors, thereby controlling the motor's speed and position.
[0054] Step S20: Determine the calibration reference data required for the real-time measurement values of the angle sensor based on the calibration data sequence.
[0055] Understandably, based on the calibration data sequence, the two calibration data closest to the real-time measurement value of the angle sensor are determined. The purpose of this step is to find the two calibration data closest to the real-time measurement value as the basis for subsequent calibration reference data. By uniformly dividing the calibration data, it can be ensured that the real-time measurement value can find two adjacent calibration data, so that it can be correctly matched even when the reading is looped back.
[0056] Step S30: Correct the angle sensor display value according to the calibration reference data.
[0057] Understandably, the difference is calculated by taking the difference between the real-time measured value and the calibration reference value. Based on the sign, magnitude, and order of the difference, the gap and deviation between the angle sensor's measured value and the reference data can be determined. Since segmenting the calibration data sequence ensures that the real-time measured value can find two adjacent calibration data points, this process is highly accurate. By comparing the absolute values of the difference results, the one with the smaller absolute value is selected as the corrected angle sensor display value. This correction process reduces the angle sensor's error and deviation, aligning it with the motor's zero position. During this process, the sign is preserved; therefore, the corrected display value may be positive or negative.
[0058] In this embodiment, the calibration data acquisition process is repeated multiple times during the factory stage until the calibration data corresponding to each pole slot on the synchronous motor is obtained. After data cleaning and preprocessing, the calibration data corresponding to each pole slot is arranged in an orderly manner, and the arrangement result is used as a calibration data sequence. During user operation, the calibration data sequence is used to measure the values in real time by the angle sensor. Based on the calibration data sequence, the calibration reference data required for the real-time measurement values of the angle sensor is determined. Based on the calibration reference data, the displayed values of the angle sensor are corrected. Through the above steps, the accuracy and stability of the vehicle control system are improved.
[0059] Reference Figure 3 , Figure 3 This is a flowchart illustrating the second embodiment of the synchronous motor and sensor zero-position alignment method of the present invention.
[0060] Based on the first embodiment described above, before step S10 in the synchronous motor and sensor zero-position alignment method of this embodiment, the method further includes:
[0061] Step S01: Repeat the calibration data acquisition process multiple times until the calibration data corresponding to each pole slot on the synchronous motor is obtained.
[0062] As is understandable, a pole pair in a synchronous motor refers to the magnetic poles on the motor rotor. A synchronous motor rotor has multiple magnetic poles, which interact with the electromagnetic coils on the stator to generate torque and axial force, driving the motor to rotate. In a synchronous motor, the number of pole pairs is usually equal to the number of phases and directly affects the motor's characteristics, such as torque and angular velocity. By accurately controlling and detecting the positional relationship between the pole pairs, more precise motor control and positioning can be achieved.
[0063] It should be noted that the calibration data acquisition process involves applying a specific constant current to the synchronous motor under test. Under suitable conditions, the rotor inside the motor will maintain a constant speed of rotation. After maintaining stable rotation for a certain period of time, the current is removed, and the rotor will gradually stop rotating under the interference of internal magnets, friction, and other factors. The stopping position at this point is equivalent to rotating to the vicinity of the zero position corresponding to a certain pole pair. Theoretically, when the friction or other interference factors are sufficiently small, the stable position of the rotor must be when the pole pairs of the rotor and stator are exactly aligned. Based on this idea, by repeatedly applying the same constant current to the motor and maintaining the same motion state for a period of time, the readings of the angle sensor at the final point of stopping rotation are collected. The accurate position of each pole pair can be represented by the readings of the angle sensor.
[0064] It should be understood that, theoretically, the number of pole pairs will correspond to the number of readings. For example, if there are seven pole pairs, the angle sensor readings should be distributed around the seven equal division points of the entire reading range. Furthermore, considering that the angle sensor readings cycle like a circle, the first and last readings within the range should theoretically be at the same position on the motor. For instance, taking a seven-pole motor as an example, the zero positions of two adjacent pole pairs should theoretically be approximately 51.42° apart. Based on this standard, when multiple calibration data are obtained, the calibration data should be spaced apart by an integer multiple of 51.42°. However, considering factors such as manufacturing processes and friction in practice, actual calibration data will have some errors compared to theoretical values, thus requiring subsequent data processing.
[0065] Step S02: Process the calibration data at the same zero position so that the remaining amount of calibration data is the same as the number of pole slots of the synchronous motor used by the angle sensor.
[0066] Understandably, when the calibration data acquisition process is repeated multiple times, multiple calibration data points will be obtained. To ensure that the calibration data for each pole pair is covered, the process can be adjusted based on the distribution of the calibration data to determine whether it needs to be repeated multiple times. For example, when experimenting with a seven-pole motor, if 10 calibration data points are collected, and the data falls within the 0–360° range, and within the allowable error range, the closed-loop energy corresponding to that range can be roughly divided into seven parts, meaning that the zero-point data for all seven pole pairs has been measured, then the data from the repeated positions can be averaged to obtain the zero-point data for that pole pair.
[0067] It should be understood that the above calibration data acquisition process is executed at least as many times as the number of pole pairs. If the obtained calibration data does not meet the distribution conditions, the process needs to be repeated until the calibration data for each pole pair is not missed.
[0068] Step S03: Arrange the calibration data corresponding to each pole slot in order of size, and use the arrangement result as the calibration data sequence.
[0069] Furthermore, storing the calibration data sequence in the flash memory unit of the drive MCU outside the synchronous motor will help the motor control system to obtain the sequence values in a timely manner and perform subsequent adjustment measures.
[0070] It should be understood that the calibration data obtained in the previous step should correspond to the number of pole pairs. Therefore, after the sequence is arranged in ascending order, it should correspond exactly to each pole pair in the motor in sequence, and any reading of the angle sensor should be able to be found in the sequence.
[0071] In this embodiment, the calibration data acquisition process is repeated multiple times until the calibration data corresponding to each pole slot on the synchronous motor is obtained. The calibration data at the same zero position are processed so that the number of remaining calibration data is the same as the number of pole slots of the synchronous motor to which the angle sensor is applied. Finally, the calibration data corresponding to each pole slot is arranged in order of size, and the arrangement result is used as the calibration data sequence. According to the above steps, the calibration data sequence of the motor can be obtained, which provides a reference for subsequent calibration steps.
[0072] Reference Figure 4 , Figure 4 This is a flowchart illustrating the third embodiment of the synchronous motor and sensor zero-position alignment method of the present invention.
[0073] Based on the second embodiment described above, the calibration data acquisition process in the synchronous motor and sensor zero-position alignment method of this embodiment includes:
[0074] Step S011: Input a constant current to the synchronous motor so that the rotor of the synchronous motor keeps rotating at a preset speed, and the constant current is within the safe current carrying range.
[0075] Understandably, for DC or AC synchronous motors, if a constant current is applied, the motor will generate a continuous constant torque, causing the rotor to rotate at a constant speed. In this case, without external disturbances or load changes, the motor will rotate at a constant speed. On the other hand, for safety reasons, the applied constant current should be within the safe current-carrying range of the motor model to avoid data anomalies and other issues.
[0076] Step S012: When the rotor reaches a predetermined number of revolutions in a stable rotational state, the current input is stopped.
[0077] Understandably, the rotor of a motor will rotate at a constant speed under the action of a constant current. After the rotor has maintained this motion state for a certain number of revolutions, the current input can be removed. For example, when the rotor enters a state of uniform rotation, the predetermined number of revolutions is set to 10 revolutions. That is, if the rotor has rotated ten times or the angle sensor has shown the same reading ten times, it can be considered that the rotor inside the motor has reached a standard stable motion state under the action of a constant current. At this time, the current can be removed, and the rotor will gradually reduce its rotation speed to zero due to internal factors of the motor.
[0078] Step S013: After the rotor stops rotating naturally, record and process the displayed value of the angle sensor to obtain calibration data.
[0079] It should be noted that during the process of the rotor naturally stopping rotation, the readings read by the angle sensor will gradually stabilize, but the change in the angle sensor readings per unit time will also gradually decrease. When the change in the angle sensor readings within a certain time is very small and less than the preset sampling threshold, the current readings of the angle sensor can be read and used as calibration data.
[0080] Furthermore, during the process of the rotor speed gradually decreasing until it stops rotating, the rate of change of the displayed value of the angle sensor is obtained.
[0081] Understandably, the rotor will gradually lose kinetic energy under the combined effects of its own inertia, the magnetic field inside the motor, and friction. However, during this process, because the deceleration effect of the internal magnetic field on the rotor is uneven, it is necessary to use the rate of change of the angle sensor to determine approximately when the rotor can stop completely.
[0082] Furthermore, when the rate of change of the displayed value of the angle sensor decreases to the sampling threshold, sampling is repeated multiple times according to the preset sampling interval to obtain multiple sampled values.
[0083] Understandably, the rate of change of the displayed value is lowest during the last period of time before the rotor stops rotating. When the rate of change of the displayed value is lower than the preset sampling threshold, sampling can begin, and multiple real-time displayed values can be obtained at certain time intervals. For example, when the set sampling threshold is 0.1° / s, sampling can begin when the change of the reading on the dial is less than the threshold, and the current angle sensor reading is obtained at a sampling interval of 100ms.
[0084] It should be understood that when the rate of change of the displayed value is lower than the sampling threshold, the rotor will stop rotating completely within several sampling cycles. That is, the preset sampling threshold should be relatively small so that the rotor will stop rotating during the sampling process to reduce sampling errors. For example, when the rate of change of the displayed value is lower than 0.1° / s, the rotor will stop rotating in about 1 second. Then, sampling should be performed continuously for more than 10 times at a sampling interval of 100ms until the rotor stops completely.
[0085] Furthermore, the average value of the plurality of sampled values is calculated, and the average value of the sampled values is used as calibration data.
[0086] Understandably, because the rotor may not come to a stable stop at the zero position corresponding to the pole pair during the final stage of deceleration, a small deviation may occur. Therefore, the final calibration data needs to be obtained by sampling multiple times before the vehicle comes to a complete stop, and the final average result is used as the calibration data to ensure the accuracy of the sampling results.
[0087] In this embodiment, a constant current is input to the synchronous motor, causing its rotor to rotate at a preset speed. The constant current is within a safe current-carrying range. When the rotor reaches a predetermined number of revolutions in a stable rotational state, the current input is stopped, and the rotor naturally stops rotating. The displayed value of the angle sensor is recorded and processed to obtain calibration data. Furthermore, as the rotor speed gradually decreases until it stops rotating, the rate of change of the displayed value of the angle sensor is acquired. When the rate of change of the displayed value of the angle sensor decreases to a sampling threshold, sampling is repeated multiple times at a preset sampling interval to obtain multiple sampled values. The average value of these multiple sampled values is calculated and used as the calibration data. These steps improve the accuracy of the calibration data during actual data acquisition and reduce errors in subsequent adjustments to the displayed values.
[0088] Reference Figure 5 , Figure 5 This is a flowchart illustrating the fourth embodiment of the synchronous motor and sensor zero-position alignment method of the present invention.
[0089] Based on the first embodiment described above, step S20 in the synchronous motor and sensor zero-position alignment method of this embodiment includes:
[0090] Step S201: Based on the calibration data sequence, determine the two calibration data points that are closest to the real-time measurement value of the angle sensor.
[0091] It should be noted that because the data in the calibration data sequence can evenly divide the reading range of the angle sensor, the real-time measurement value of the angle sensor can always find two physically adjacent calibration data points in the sequence. For example, when the angle sensor reading is distributed from 0 to 65535, and the calibration data sequence is: 9296, 18713, 27917, 37365, 46741, 56058, 65354, the approximate interval can be determined from the sequence as 9392. Since the reading starts counting again after a full revolution, when the reading of a certain angle sensor falls exactly between the values in the sequence, the two nearest calibration data points of that angle sensor reading can be determined.
[0092] Step S202: When the numerical range formed by the two nearest calibration data contains the angle sensor measurement value, the two nearest calibration data are used as the calibration reference data.
[0093] Furthermore, when the numerical range formed by the nearest calibration data does not include the angle sensor measurement value, the angle sensor measurement value can be considered to be between the first and last pole pairs, and the first and last values of the calibration data sequence can be used as the calibration reference data.
[0094] Understandably, using the example above, since the displayed reading range is wider than the actual sequence range, when the displayed value is between 9296 and 65354, the two nearest calibration data can be directly found, and subsequent calibration steps can be performed. Conversely, when the actual displayed value is between 0 and 9296 or between 65354 and 65535, the nearest calibration data for this displayed value are the calibration data corresponding to the first pole pair and the calibration data corresponding to the last pole pair, and only based on these two can subsequent calibration steps be performed.
[0095] Based on the first embodiment described above, step S30 in the synchronous motor and sensor zero-position alignment method of this embodiment includes:
[0096] Step S301: When the calibration reference data is the two calibration data closest to the real-time measurement value of the angle sensor, calculate the difference between the real-time measurement value and the calibration reference value to obtain the difference result.
[0097] Understandably, once two adjacent calibration reference data are determined, the difference between the two calibration reference data is calculated. Since the original calibration data sequence is arranged sequentially, the resulting difference should be one positive and one negative.
[0098] Step S302: Compare the absolute values of the difference results, and use the difference result corresponding to the smaller absolute value as the corrected angle sensor display value.
[0099] It should be noted that the closer the angle sensor reading is to the calibration reference data, the closer the zero point of the angle sensor is to the zero point of the pole pair. At the same time, since the error after zero alignment may be less or more, the reading after alignment should be a value near zero.
[0100] It should be understood that the difference result corresponding to the smaller absolute value is used as the corrected angle sensor display value. This process retains the original sign, meaning that the actual result may be negative. However, this negative value will only appear once during the calibration process. When the motor is calibrated and performs other tasks, it will return to the original display range and function normally.
[0101] like Figure 6 As shown, the synchronous motor and sensor zero-position alignment device proposed in this embodiment of the invention includes:
[0102] Data acquisition module 10 is used to acquire calibration data sequences and real-time measurement values from the angle sensor;
[0103] Data analysis module 20 is used to determine the calibration reference data required for the real-time measurement value of the angle sensor based on the calibration data sequence;
[0104] The data processing module 30 is used to correct the value displayed by the angle sensor based on the calibration reference data.
[0105] In one embodiment, the data analysis module 20 is further configured to repeat the calibration data acquisition process multiple times until the calibration data corresponding to each pole slot on the synchronous motor is obtained; process the calibration data at the same zero position so that the number of remaining calibration data is the same as the number of pole slots of the synchronous motor to which the angle sensor is applied; arrange the calibration data corresponding to each pole slot in order of size, and use the arrangement result as the calibration data sequence.
[0106] In one embodiment, the data processing module 30 is further configured to input a constant current to the synchronous motor, so that the rotor of the synchronous motor keeps rotating at a preset speed, and the constant current is within a safe current carrying range; when the rotor reaches a predetermined number of revolutions in a stable rotation state, the input of current is stopped; after the rotor naturally stops rotating, the displayed value of the angle sensor is recorded and processed to obtain calibration data.
[0107] In one embodiment, the data acquisition module 10 is further configured to acquire the rate of change of the displayed value of the angle sensor during the process of the rotor speed gradually decreasing to stop rotating; when the rate of change of the displayed value of the angle sensor decreases to a sampling threshold, the sampling is repeated multiple times according to a preset sampling interval to obtain multiple sampled values; the average value of the multiple sampled values is calculated, and the average value of the sampled values is used as calibration data.
[0108] In one embodiment, the data processing module 30 is further configured to determine the two nearest calibration data points to the real-time measured value of the angle sensor based on the calibration data sequence; when the numerical interval formed by the two nearest calibration data points contains the measured value of the angle sensor, the two nearest calibration data points are used as the calibration reference data; when the numerical interval formed by the two nearest calibration data points does not contain the measured value of the angle sensor, the measured value of the angle sensor can be considered to be between the first pole pair and the last pole pair, and the first and last values of the calibration data sequence are used as the calibration reference data.
[0109] In one embodiment, the data processing module 30 is further configured to: calculate the difference between the real-time measured value and the calibration reference value when the calibration reference data are the two nearest calibration data of the real-time measured value of the angle sensor, and obtain a difference result; compare the absolute values of the difference results, and use the difference result corresponding to the smaller absolute value as the corrected angle sensor display value.
[0110] In one embodiment, the data acquisition module 10 is further configured to store the calibration data sequence in the flash memory unit of the drive MCU outside the synchronous motor.
[0111] Furthermore, to achieve the above objectives, the present invention provides a synchronous motor and sensor zero-position alignment device, the synchronous motor and sensor zero-position alignment device comprising: a memory, a processor, and a synchronous motor and sensor zero-position alignment program stored in the memory and executable on the processor, the synchronous motor and sensor zero-position alignment program being configured to implement the steps of any of the synchronous motor and sensor zero-position alignment methods described above.
[0112] Furthermore, to achieve the above objectives, the present invention provides a storage medium storing a synchronous motor and sensor zero-position alignment program, wherein when the synchronous motor and sensor zero-position alignment program is executed by a processor, the steps of any of the synchronous motor and sensor zero-position alignment methods described above are implemented.
[0113] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or system. 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 system that includes that element.
[0114] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0115] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of the present invention.
[0116] The above are merely preferred embodiments of the present invention and do not limit the patent scope of the present invention. Any equivalent structural or procedural transformations made based on the content of the present invention's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of the present invention.
Claims
1. A method for aligning the zero position of a synchronous motor and a sensor, characterized in that, The method for aligning the synchronous motor and the sensor at zero position includes: Acquire calibration data sequences and real-time measurement values from the angle sensor; Based on the calibration data sequence, determine the calibration reference data required for the real-time measurement values of the angle sensor; The angle sensor display value is corrected based on the calibration reference data. Before acquiring the calibration data sequence and the real-time measurement values of the angle sensor, the process also includes: The calibration data acquisition process is repeated multiple times until the calibration data corresponding to each pole slot on the synchronous motor is obtained. The calibration data at the same zero position are processed to make the remaining number of calibration data the same as the number of pole slots of the synchronous motor to which the angle sensor is applied. The calibration data corresponding to each pole slot are arranged in order of size, and the arrangement result is used as the calibration data sequence. The calibration data acquisition process includes: A constant current is input to the synchronous motor, causing the rotor of the synchronous motor to rotate at a preset speed, and the constant current is within the safe current-carrying range; When the rotor reaches a predetermined number of revolutions while in a stable rotational state, the current input is stopped. Once the rotor has naturally stopped rotating, the displayed value of the angle sensor is recorded and processed to obtain calibration data; Once the rotor naturally stops rotating, the displayed values of the angle sensor are recorded and processed to obtain calibration data, including: During the process of the rotor speed gradually decreasing until it stops rotating, the rate of change of the displayed value of the angle sensor is acquired; When the rate of change of the displayed value of the angle sensor decreases to the sampling threshold, the sampling is repeated multiple times according to the preset sampling interval to obtain multiple sampled values; Calculate the average value of the multiple sampled values, and use the average value of the sampled values as calibration data.
2. The method for aligning the synchronous motor and sensor zero position according to claim 1, characterized in that, The step of determining the calibration reference data required for the real-time measurement value of the angle sensor based on the calibration data sequence includes: Based on the calibration data sequence, determine the two calibration data points that are closest to the real-time measurement value of the angle sensor; When the numerical range formed by the two nearest calibration data contains the angle sensor measurement value, the two nearest calibration data are used as the calibration reference data; When the numerical range formed by the two nearest calibration data does not contain the angle sensor measurement value, the angle sensor measurement value is between the first pole pair and the last pole pair, and the first and last values of the calibration data sequence are used as the calibration reference data.
3. The method for aligning the synchronous motor and sensor zero position according to claim 1, characterized in that, The step of correcting the angle sensor display value based on the calibration reference data includes: When the calibration reference data is the two calibration data closest to the real-time measured value of the angle sensor, the difference between the real-time measured value and the calibration reference data is calculated to obtain the difference result. Compare the absolute values of the difference results, and use the difference result corresponding to the smaller absolute value as the corrected angle sensor display value.
4. The method for aligning the synchronous motor and sensor zero position according to claim 1, characterized in that, The calibration data sequence is stored in the flash memory of the drive MCU located outside the synchronous motor.
5. A synchronous motor and sensor zero-position alignment device, characterized in that, The synchronous motor and sensor zero-position alignment device includes: The data acquisition module is used to acquire calibration data sequences and real-time measurement values from the angle sensor; The data analysis module is used to determine the calibration reference data required for the real-time measurement value of the angle sensor based on the calibration data sequence. The data processing module is used to correct the angle sensor display value based on the calibration reference data; The data acquisition and arrangement module is used to repeatedly perform a calibration data acquisition process until the calibration data corresponding to each pole slot on the synchronous motor is obtained; the calibration data at the same zero position is processed to make the remaining number of calibration data the same as the number of pole slots of the synchronous motor to which the angle sensor is applied; the calibration data corresponding to each pole slot is arranged in order of size, and the arrangement result is used as the calibration data sequence; a constant current is input to the synchronous motor to keep the rotor of the synchronous motor rotating at a preset speed, and the constant current is within the safe current carrying range; when the rotor reaches a predetermined number of revolutions in a stable rotation state, the current input is stopped; after the rotor stops rotating naturally, the displayed value of the angle sensor is recorded and processed to obtain calibration data; as the rotor speed gradually decreases until it stops rotating, the rate of change of the displayed value of the angle sensor is acquired; when the rate of change of the displayed value of the angle sensor decreases to a sampling threshold, sampling is repeated multiple times at a preset sampling interval to obtain multiple sampled values; the average value of the multiple sampled values is calculated, and the average value of the sampled values is used as the calibration data.
6. A synchronous motor and sensor zero-position alignment device, characterized in that, The synchronous motor and sensor zero-position alignment device includes: a memory, a processor, and a synchronous motor and sensor zero-position alignment program stored in the memory and executable on the processor, wherein the synchronous motor and sensor zero-position alignment program is configured to implement the steps of the synchronous motor and sensor zero-position alignment method as described in any one of claims 1 to 4.
7. A storage medium, characterized in that, The storage medium stores a synchronous motor and sensor zero-position alignment program, which, when executed by a processor, implements the steps of the synchronous motor and sensor zero-position alignment method as described in any one of claims 1 to 4.
Citation Information
Patent Citations
Motor zero initial angle calibration method, device, motor controller and system
CN116566268A
Calibration method and calibration apparatus for angle sensor
WO2023201513A1