Sensor Angle Nonlinear Error Calibration Method, System, Electronic Device and Medium
The dynamic iterative calibration method for angle sensors addresses non-linear errors by integrating reference angles with actual sensor readings to compensate for high-order harmonics, enhancing precision and adaptability, thus improving servo motor and robotic joint accuracy and reducing recalibration frequency.
Patent Information
- Application Number
- CN202510551632.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-29
- Publication Date
- 2025-07-15
- Estimated Expiration
- 2045-04-29
AI Technical Summary
Existing angle sensors have nonlinear errors in precision control systems such as servo motors and robot joints, resulting in positioning deviations and vibration abnormalities. The traditional linear verification method cannot effectively deal with the time-varying characteristics of errors caused by higher-order harmonic components and mechanical wear.
The dynamic iterative verification mechanism is adopted to obtain the reference angle through the inductive angle integral algorithm, and compare it with the actual angle, extract the basic error value, combine the loop-partition error calculation model to perform nonlinear error separation compensation, and build a double closed-loop calibration verification system to realize adaptive iterative verification.
The calibration accuracy and system adaptability are significantly improved, and the calibration success rate reaches 99.7%, reducing dependence on additional sensors, reducing manual intervention, and improving the long-term operation accuracy and stability of the motor control system.
Smart Images

Figure CN120063104B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of sensors, and particularly to a method, a system, an electronic device, and a medium for calibrating the angular non-linear error of a sensor. Background Art
[0002] In an angular sensor, an accelerometer is used to detect the angle by measuring the gravity component. With the rapid development of industrial automation technology, angular sensors are widely used in precision control systems such as servo motors and robot joints. However, due to factors such as manufacturing process deviation, temperature drift, and mechanical installation error, angular sensors generally have non-linear angular detection errors, resulting in problems such as positioning deviation and abnormal vibration in the motor control system.
[0003] Currently, the mainstream calibration methods mainly focus on linear error compensation. For example, the linear calibration method of an angular sensor based on the least squares method constructs a linear error model by collecting multiple groups of angular sample data. However, this method has two significant defects:
[0004] Insufficient non-linear error processing: Only the linear error component is compensated, and the non-linear error caused by high-order harmonic components is not considered;
[0005] Limitations of single calibration: The one-time calibration strategy is adopted, and the time-varying characteristics of the error caused by mechanical wear during the operation of the motor are not considered. In practical applications, frequent re-calibration is required.
[0006] There are also some methods that use an externally deployed high-precision encoder as a reference benchmark. This method significantly increases the system complexity and hardware cost. Therefore, there is an urgent need to develop an angular sensor calibration method that can effectively eliminate non-linear errors, has an adaptive iterative calibration ability, and does not rely on expensive detection equipment to improve the long-term operation accuracy and stability of the motor control system. Summary of the Invention
[0007] The present invention aims to at least solve one of the technical problems existing in the prior art. For this purpose, the object of the present invention is to provide a method, a system, an electronic device, and a medium for calibrating the angular non-linear error of a sensor to solve the non-linear error problem of the angular sensor.
[0008] The object of the present invention is achieved by the following technical solutions:
[0009] The first aspect of the present invention discloses a method for calibrating the angular non-linear error of a sensor, which includes:
[0010] Receiving a first reference angle of a motor equipped with an angular sensor and a first actual angle of the angular sensor during the rotation of the motor;
[0011] Determine a basic error value based on the first reference angle and the first actual angle, and calibrate the angle sensor according to the basic error value;
[0012] Obtain the calibrated second reference angle and the second actual angle. The second actual angle is the sum of the first actual angle and the basic error value. Determine the comparison value between the second reference angle and the second actual angle. When the maximum value of the comparison value is less than or equal to a preset value, the verification is completed;
[0013] Receive the first reference angle of the motor equipped with the angle sensor, including:
[0014] Perform a zero-crossing detection on the angle sensor;
[0015] When the angle sensor is at zero, after setting the first reference angle to zero, obtain the first reference angle of the rotation of the motor through the sensorless angle integration algorithm;
[0016] When the angle sensor is not at zero, determine the number of zero-crossing times of the angle sensor. When the number of zero-crossing times is greater than 1, obtain the first reference angle of the rotation of the motor through the sensorless angle integration algorithm.
[0017] The sensor angle non-linear error verification method provided by the present invention adopts a dynamic iterative verification mechanism, extracts the first reference angle (theoretical value) in a sensorless manner, and compares it with the first actual angle collected by the angle sensor itself, so as to extract the basic error value containing high-order harmonic components, which can effectively identify the high-order harmonic errors that cannot be captured by traditional linear verification methods. Through the non-linear error separation and compensation technology, the verification accuracy and system adaptability are significantly improved. Then, dynamically judge the verification completion condition (verification step), and the error convergence can be achieved without manual intervention. Compared with the single verification scheme, the verification success rate is increased to 99.7% (test sample N = 1000).
[0018] It can be verified and validated at the time of factory shipment, and the corresponding basic error value is stored in the memory. When in use, the system adds this basic error value to the basis of the actual data collected by the angle sensor to obtain the actual rotation angle of the motor or other rotating devices. In addition, when used in conjunction with the motor, periodic verification can also be set or non-periodic verification can be performed as needed. For example, the periodic verification can be performed once a month, and for non-periodic verification, a verification button can be set on the housing. When needed, the verification button can be pressed to start the verification.
[0019] The sensorless angle integration algorithm not only emphasizes that the calibration process is user-free, but also directly calculates the true angle of the motor rotor through the sensorless angle integration algorithm, eliminating the dependence on additional position sensors. The sensorless angle integration algorithm integrates the motor back electromotive force observer to correct the integral accumulation error caused by the sudden change of speed in real time.
[0020] By forcibly resetting the reference angle at the zero point of the angle sensor through zero-crossing detection, the angle accumulation error caused by temperature drift / noise in the traditional integration algorithm can be eliminated. The first reference angle and the first actual angle are obtained only after the number of zero-crossings is greater than 1, that is, the motor rotates smoothly, thereby ensuring the accuracy of calibration. The same method is used to obtain the second reference angle and the second actual angle.
[0021] In a preferred embodiment, the sensorless angle integration algorithm uses a nonlinear flux observer.
[0022] The nonlinear flux observer is used to accurately track the waveform distortion of the motor back EMF. While being non-sensing, it can also reduce the angle solution error from ±1.2° of the traditional linear observer to ±0.15°, breaking through the speed bottleneck of the non-sensing algorithm. The adaptive notch filter of the flux observer can suppress PWM carrier harmonics in real time, significantly improving the angle solution signal-to-noise ratio. When the nonlinear flux observer adopts discretization processing, it can achieve 10μs single-cycle operation, which saves computing resources compared with traditional model predictive control solutions and supports deployment on low-cost MCUs.
[0023] In a preferred embodiment, determining a basic error value based on the first reference angle and the first actual angle, and calibrating the angle sensor according to the basic error value includes:
[0024] Determine a basic error value based on the first reference angle and the first actual angle:
[0025]
[0026] in, A e is the basic error value, A 1ij For the i Circle j The first reference angle of the sector, A 2ij For the i Circle j The first actual angle collected by the angle sensor corresponding to the sector, 1≤ i ≤ m , 1≤ j ≤ n , m is the total number of motor revolutions set during the calibration process, nThe total number of sectors divided for the motor;
[0027] Calibrate the angle sensor according to the basic error value:
[0028]
[0029] A 2 is the actual value collected by the angle sensor, A' 2 is the calibrated value after calibrating the actual value collected by the angle sensor.
[0030] Through the multi-turn and multi-sector error calculation model and the linear compensation mechanism, the present invention realizes the collaborative optimization of error calibration accuracy and efficiency. By setting the number of calibration turns, such as 5 turns, and dividing the motor into multiple sectors, such as 256 sectors, etc., through the separate statistics of multiple turns and multiple sectors, and then based on the average value of their errors as the basic error value, the influence of instantaneous interference (such as electromagnetic pulses, mechanical vibrations) can be eliminated. In other embodiments, separate compensation can also be performed according to different sectors, that is, the average error value of a certain sector of multiple turns is used as the compensation angle of this sector.
[0031] In a preferred embodiment, obtaining the calibrated second reference angle and the second actual angle, and determining the comparison value of the second reference angle and the second actual angle includes:
[0032] Receiving the second reference angle of the motor equipped with the angle sensor and the second actual angle of the angle sensor during the rotation of the motor;
[0033] Determining the comparison value of the second reference angle and the second actual angle to verify the calibrated angle sensor:
[0034] A kj = A' 1kj -( A' 2kj + A e )
[0035] Wherein, A kj is the comparison value of the k th j sector of the k ≤ p ≤ p is the total number of turns of the motor rotation during the verification process; A' 1kj is the second reference angle of the k th j sector of the A' 2kj is the angle sensor at thek The actual value collected by the j sector in a circle.
[0036] Combining calibration and verification to construct a double-closed-loop calibration and verification system. In the calibration stage, through a secondary error verification mechanism for each circle and each sector, the actual value collected by the angle sensor is compensated to obtain a second actual angle, and then the comparison value between the second actual angle and the second reference angle is used as the condition for whether the calibration result meets the requirements, thus ensuring the reliability of the angle verification.
[0037] In a preferred embodiment, when any one or more of the comparison values are greater than a preset value, the angle sensor is recalibrated.
[0038] When recalibrating the angle sensor, the basic error value can be discarded as the compensation value and the calibration process and verification process can be re-executed, or a new compensation value can be added through the calibration process on the basis of the basic error value, and the sum of the two is used as the new compensation value for verification until all the comparison values are less than or equal to the preset value.
[0039] The second aspect of the present invention discloses a sensor angle non-linear error calibration system, which includes:
[0040] A receiving unit, configured to receive a first reference angle of a motor equipped with an angle sensor and a first actual angle of the angle sensor during the rotation of the motor;
[0041] A calibration unit, configured to determine a basic error value based on the first reference angle and the first actual angle, and calibrate the angle sensor according to the basic error value;
[0042] A verification unit, configured to obtain a calibrated second reference angle and a second actual angle, where the second actual angle is the sum of the first actual angle and the basic error value, determine a comparison value between the second reference angle and the second actual angle, and when the maximum value of the comparison value is less than or equal to a preset value, the calibration is completed;
[0043] Receiving the first reference angle of a motor equipped with an angle sensor includes:
[0044] Performing a zero-crossing detection on the angle sensor;
[0045] When the angle sensor is at zero, after setting the first reference angle to zero, the first reference angle of the motor rotation is obtained through a sensorless angle integration algorithm;
[0046] When the angle sensor is not at zero, judging the number of zero-crossing times of the angle sensor, and when the number of zero-crossing times is greater than 1, the first reference angle of the motor rotation is obtained through a sensorless angle integration algorithm.
[0047] The sensor angle non - linear error calibration method provided by the present invention adopts a dynamic iterative calibration mechanism. It extracts the first reference angle (theoretical value) in a non - inductive manner and compares it with the first actual angle collected by the angle sensor itself, thereby extracting the basic error value containing high - order harmonic components. It can effectively identify high - order harmonic errors that cannot be captured by traditional linear calibration methods. Through the non - linear error separation and compensation technology, the calibration accuracy and system adaptability are significantly improved. Then, it dynamically judges the calibration completion condition (verification step), and error convergence can be achieved without manual intervention.
[0048] A third aspect of an embodiment of the present invention discloses an electronic device, including a memory, a processor, and a computer program stored in the memory and capable of running on the processor. When the processor executes the computer program, it implements the steps of the sensor angle non - linear error calibration method disclosed in the first aspect of the embodiment of the present invention.
[0049] A fourth aspect of an embodiment of the present invention discloses a computer - readable storage medium storing a computer program, wherein the computer program causes a computer to execute the steps of the sensor angle non - linear error calibration method disclosed in the first aspect of the embodiment of the present invention.
[0050] A fifth aspect of an embodiment of the present invention discloses a computer program product. When the computer program product runs on a computer, it causes the computer to execute the steps of the sensor angle non - linear error calibration method disclosed in the first aspect of the embodiment of the present invention.
[0051] A sixth aspect of an embodiment of the present invention discloses an application publishing platform. The application publishing platform is used to publish a computer program product. When the computer program product runs on a computer, it causes the computer to execute the steps of the sensor angle non - linear error calibration method disclosed in the first aspect of the embodiment of the present invention.
[0052] The specification drawings forming a part of this application are used to provide a further understanding of the present invention. The schematic embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation to the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] Figure 1 It is a schematic flowchart of the sensor angle non - linear error calibration method according to an embodiment of the present invention;
[0054] Figure 2 It is a schematic structural diagram of the sensor angle non - linear error calibration system according to an embodiment of the present invention;
[0055] Figure 3 It is a schematic structural diagram of the electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0056] This specific implementation manner is only an interpretation of the embodiments of the present invention, and it does not limit the embodiments of the present invention. After reading this specification, those skilled in the art can make modifications to this embodiment without creative contributions as needed, but as long as they are within the scope of the claims of the embodiments of the present invention, they are protected by the patent law.
[0057] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in the embodiments of the present invention without making creative efforts fall within the scope of protection of the embodiments of the present invention.
[0058] The term "including" and any variations thereof in the description and claims of this application are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products, or devices.
[0059] In the embodiments of the present invention, words such as "exemplarily" or "for example" are used to represent examples, illustrations, or explanations. Any embodiment or design solution described as "exemplarily" or "for example" in the embodiments of the present invention should not be construed as being more preferred or having more advantages than other embodiments or design solutions. Rather, the use of words such as "exemplarily" or "for example" is intended to present the relevant concepts in a specific manner.
[0060] The sensor angle non-linear error calibration method provided by the present invention adopts a dynamic iterative calibration mechanism. It extracts the first reference angle (theoretical value) in a non-sensing manner and compares it with the first actual angle collected by the angle sensor itself, thereby extracting the basic error value containing high-order harmonic components. It can effectively identify high-order harmonic errors that cannot be captured by traditional linear calibration methods. Through the non-linear error separation and compensation technology, the calibration accuracy and system adaptability are significantly improved. Then, it dynamically judges the calibration completion condition (verification step), and the error convergence can be achieved without manual intervention. Compared with the single calibration scheme, the calibration success rate is greatly improved. The following will be described in detail with reference to the accompanying drawings.
[0061] Embodiment 1
[0062] In the embodiment of the present invention, the sensor angle non - linear error calibration method can calibrate and verify at the time of factory, store the corresponding basic error value in the memory, and when in use, the system adds the basic error value on the basis of the actual data collected by the angle sensor, so as to obtain the actual rotation angle of the motor or other rotating devices. In addition, when used in cooperation with the motor, periodic calibration or non - periodic calibration can be set as required. For example, the periodic calibration can be performed once a month, and for non - periodic calibration, a calibration button can be set on the housing. When needed, the calibration button can be pressed to start the calibration.
[0063] The calibration in the embodiment of the present invention includes a calibration process (calibration stage or calibration step) and a verification process (verification stage or verification step).
[0064] Please refer to Figure 1 , Figure 1 which is a schematic flow chart of a sensor angle non - linear error calibration method disclosed in an embodiment of the present invention. As Figure 1 shown, the sensor angle non - linear error calibration method includes the following steps:
[0065] S110: Receive the first reference angle of the motor equipped with an angle sensor and the first actual angle of the angle sensor during the rotation of the motor.
[0066] The first reference angle is realized by the sensorless angle integration algorithm. On the one hand, it emphasizes the user - unaware nature of the calibration process. On the other hand, it directly calculates the true angle of the motor rotor through the sensorless angle integration algorithm, getting rid of the dependence on an additional position sensor. The sensorless angle integration algorithm integrates the motor back - electromotive - force observer, which can correct the integral cumulative error caused by sudden speed changes in real time. The sensorless angle integration algorithm can be implemented by using a sliding - mode observer, a Luenberger observer, and a non - linear flux observer, etc.
[0067] Exemplarily, when using a permanent - magnet synchronous motor to calibrate the angle sensor, a non - linear flux observer can be used to accurately track the waveform distortion of the motor back - electromotive force, and then obtain the rotor speed. While being sensorless, it can also reduce the angle calculation error from ±1.2° of the traditional linear observer to ±0.15°, breaking through the speed bottleneck of the sensorless algorithm. The adaptive notch filter of the flux observer can suppress the PWM carrier harmonics in real time, significantly improving the signal - to - noise ratio of the angle calculation.
[0068] When the non-linear flux observer is discretized, it can also achieve single-cycle operation at the 10 μs level, saving computational resources compared to traditional model predictive control schemes and supporting deployment on low-cost MCUs. Since the angle sensor is used to monitor the rotation angle of the motor, the motor angle obtained through non-linear flux can be used as the reference angle for calibrating the angle sensor. To distinguish it from the verification stage, it is denoted here as the first reference angle.
[0069] Before obtaining the first reference angle, it is first necessary to perform a zero-crossing detection on the angle sensor and forcibly reset the reference angle at the sensor zero point, that is, after setting the reference angle to zero, obtain the first reference angle of the motor rotation through the sensorless angle integration algorithm, which can eliminate the angle accumulation error caused by temperature drift / noise in the traditional integration algorithm.
[0070] When the angle sensor is at a non-zero point, first judge the number of zero-crossings of the angle sensor. When the number of zero-crossings is greater than 1, that is, after the motor rotates smoothly, start to obtain the first reference angle of the motor rotation through the sensorless angle integration algorithm, so as to ensure the accuracy of calibration.
[0071] When obtaining the second reference angle, the same method is used to achieve it.
[0072] S120. Determine the basic error value based on the first reference angle and the first actual angle, and calibrate the angle sensor according to the basic error value.
[0073] In a preferred embodiment of the present invention, the co-optimization of error calibration accuracy and efficiency can be achieved by rotating the motor multiple turns (setting the total number of turns of the motor during the calibration process) and multiple sectors. By setting the calibration number of turns, such as 5 turns, and dividing the motor into multiple sectors, such as 256 sectors, etc., through the separate statistics of multiple turns and multiple sectors, and then using the average value of their errors as the basic error value, the influence of instantaneous interference (such as electromagnetic pulses, mechanical vibrations) can be eliminated.
[0074] Specifically, to determine the basic error value based on the first reference angle and the first actual angle, the following formula can be used:
[0075]
[0076] where A e is the basic error value, A 1ij is the first reference angle of the i th turn and the j th sector, A 2ij is the first actual angle collected by the angle sensor corresponding to the i th turn and the j th sector, 1 ≤i ≤ m ,1 ≤ j ≤ n , m is the total number of turns of the motor rotation set during the calibration process, n is the total number of sectors into which the motor is divided.
[0077] The basic error value can be determined through a low-pass filter, that is, by inputting each difference ( A 1ij - A 2ij ) into the low-pass filter, and the basic error value is obtained through low-pass filtering. This method can avoid some interferences from causing inaccurate calculation results.
[0078] Calibration can be performed by adding this basic error value to the actual value collected by the angle sensor to obtain the calibrated value, that is:
[0079]
[0080] A 2 is the actual value collected by the angle sensor, A' 2 is the calibrated value after calibrating the actual value collected by the angle sensor.
[0081] In other embodiments, separate compensation can also be performed according to different sectors, that is, using the average error value of a certain sector of multiple turns as the compensation angle of this sector.
[0082] Or it can be implemented by using a turn-by-turn compensation method, that is:
[0083]
[0084] Among them, A ie is the basic error value of the i th turn, A (i-1)e is the basic error value of the ( i -1)th turn, A me is the basic error value of the last 1 turn (the m th turn) during the calibration process.
[0085] On the basis of this turn-by-turn compensation, a double-stop strategy can also be set, that is, when the total number of turns set during the calibration process is reached, or when A ie is less than or equal to the preset error, the calibration is stopped.
[0086] S130. Obtain the calibrated second reference angle and the second actual angle. The second actual angle is the sum of the first actual angle and the base error value. Determine the comparison value between the second reference angle and the second actual angle. When the maximum value of the comparison value is less than or equal to the preset value, the verification is completed.
[0087] Combining calibration and verification, a double-closed-loop calibration and verification system is constructed. In the calibration stage, through a secondary error verification mechanism for each revolution and each sector, the actual value collected by the angle sensor is compensated to obtain the second actual angle. Then, using the comparison value between the second actual angle and the second reference angle as the condition for whether the calibration result meets the requirements, the reliability of the angle verification is ensured.
[0088] Specifically, it may include the following steps:
[0089] Receive the second reference angle of the motor equipped with the angle sensor and the second actual angle of the angle sensor during the rotation of the motor;
[0090] Determine the comparison value between the second reference angle and the second actual angle to verify the calibrated angle sensor:
[0091] A kj = A' 1kj -( A' 2kj + A e )
[0092] Wherein, A kj is the comparison value of the k th revolution and the j th sector, 1 ≤ k ≤ p , p is the total number of revolutions of the motor during the verification process; A' 1kj is the second reference angle of the k th revolution and the j th sector, A' 2kj is the actual value collected by the angle sensor in the k th revolution and the j th sector.
[0093] Therefore, p × n comparison values can be obtained, and then find the maximum value among these p × n comparison values. When the maximum value is less than or equal to the preset value (such as 1 Deg), the verification is successful and the entire verification process is completed. On the contrary, if thisp × n When the maximum value among the × comparison values is greater than the preset value, the angle sensor is recalibrated.
[0094] When recalibrating the angle sensor, the basic error value can be discarded as the compensation value to re - execute the calibration process and the verification process, or a new compensation value can be added through the calibration process on the basis of the basic error value, and the sum of the two is used as the new compensation value for verification until the p × n maximum value among the × comparison values is less than or equal to the preset value.
[0095] Embodiment 2
[0096] Please refer to Figure 2 , Figure 2 which is a schematic structural diagram of a sensor angle non - linear error calibration system disclosed in an embodiment of the present invention. As Figure 2 shown, the sensor angle non - linear error calibration system may include:
[0097] A receiving unit 210, configured to receive a first reference angle of a motor equipped with an angle sensor, and a first actual angle of the angle sensor during the rotation of the motor;
[0098] A calibration unit 220, configured to determine a basic error value based on the first reference angle and the first actual angle, and calibrate the angle sensor according to the basic error value;
[0099] A verification unit 230, configured to obtain a second reference angle and a second actual angle after calibration, where the second actual angle is the sum of the first actual angle and the basic error value, determine a comparison value between the second reference angle and the second actual angle, and when the maximum value of the comparison value is less than or equal to the preset value, the verification is completed;
[0100] Receiving the first reference angle of a motor equipped with an angle sensor includes:
[0101] Performing a zero - crossing detection on the angle sensor;
[0102] When the angle sensor is at zero, after setting the first reference angle to zero, the first reference angle of the rotation of the motor is obtained through a non - inductive angle integration algorithm;
[0103] When the angle sensor is not at zero, judge the number of zero - crossing times of the angle sensor. When the number of zero - crossing times is greater than 1, the first reference angle of the rotation of the motor is obtained through a non - inductive angle integration algorithm.
[0104] Embodiment 3
[0105] Please refer toFigure 3 , Figure 3 shows a schematic structural diagram of an electronic device that can be used to implement the embodiments of the present invention. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the embodiments of the present invention described herein and / or claimed.
[0106] As Figure 3 shown, the electronic device includes at least one processor 310, and a memory communicatively connected to the at least one processor 310, such as ROM (Read Only Memory) 320, RAM (Random Access Memory) 330, etc. Among them, the memory stores a computer program executable by the at least one processor. The processor 310 can perform various appropriate actions and processes according to the computer program stored in the ROM 320 or the computer program loaded from the storage unit 380 into the random access memory RAM 330. In the RAM 330, various programs and data required for the operation of the electronic device can also be stored. The processor 310, ROM 320, and RAM 330 are connected to each other through a bus 340. The I / O (Input / Output) interface 350 is also connected to the bus 340.
[0107] Multiple components in the electronic device are connected to the I / O interface 350, including: an input unit 360, such as a keyboard, a mouse, etc.; an output unit 370, such as various types of displays, speakers, etc.; a storage unit 380, such as a magnetic disk, an optical disk, etc.; and a communication unit 390, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 390 allows the electronic device to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0108] The processor 310 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the processor 310 include but are not limited to a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 310 executes one or more steps of a sensor angle non-linear error calibration method described in Embodiment 1 above.
[0109] In some embodiments, a method for calibrating the non - linear error of a sensor angle can be implemented as a computer program, which is tangibly contained in a computer - readable storage medium, such as the storage unit 380. In some embodiments, part or all of the computer program can be loaded and / or installed onto the electronic device via the ROM 320 or / and the communication unit 390. When the computer program is loaded into the RAM 330 and executed by the processor 310, one or more steps of the method for calibrating the non - linear error of a sensor angle described in the above - mentioned Embodiment 1 can be executed. Alternatively, in other embodiments, the processor 310 can be configured to execute a method for calibrating the non - linear error of a sensor angle by any other suitable means (e.g., by means of firmware).
[0110] The various embodiments of the systems and technologies described above in this article can be implemented in digital electronic circuit systems, integrated circuit systems, field - programmable gate arrays (FPGA), application - specific integrated circuits (ASIC), application - specific standard products (ASSP), systems - on - a - chip (SOC), complex programmable logic devices (CPLD), computer hardware, firmware, software, or / and combinations thereof. These various embodiments can include: being implemented in one or more computer programs, which can be executed and / or interpreted on a programmable system including at least one programmable processor. The programmable processor can be a special or general - purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit the data and instructions to the storage system, the at least one input device, and the at least one output device.
[0111] The computer programs for implementing the methods of the embodiments of the present invention can be written in any combination of one or more programming languages. These computer programs can be provided to the processors of general - purpose computers, special - purpose computers, or other programmable data - processing devices, such that when the computer programs are executed by the processors, the functions / operations specified in the flowcharts or / and block diagrams are implemented. The computer programs can be executed entirely on the machine, partially on the machine, as an independent software package partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0112] In the context of embodiments of the present invention, a computer-readable storage medium may be a tangible medium that can contain or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. Alternatively, the computer-readable storage medium may be a machine-readable signal medium. More specific examples of the machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0113] To provide for interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the electronic device. Other kinds of devices can also be used to provide for interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic, speech, or tactile input).
[0114] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer having a graphical user interface or a web browser through which the user can interact with an implementation of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local area network (LAN), wide area network (WAN), blockchain network, and the Internet.
[0115] A computing system may include a client and a server. The client and the server are generally far from each other and usually interact via a communication network. The relationship between the client and the server is created by computer programs running on respective computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or a cloud host, which is a host product in the cloud computing service system, and solves the defects of difficult management and weak business scalability existing in traditional physical hosts and VPS services.
[0116] The above has introduced in detail a method, system, electronic device and medium for calibrating the non-linear error of the sensor angle disclosed in the present invention. Specific examples are used in this article to elaborate on the principle and implementation manner of the present invention. The description of the above embodiments is only used to help understand the method and its core idea of the present invention; at the same time, for those of ordinary skill in the art, according to the idea of the present invention, there will be changes in the specific implementation manner and application scope. In summary, the content of this specification should not be construed as a limitation to the present invention.
Claims
1. A method for calibrating the non-linear error of the sensor angle, characterized in that, It includes: Receiving a first reference angle of a motor equipped with an angle sensor and a first actual angle of the angle sensor during the rotation of the motor; Determining a basic error value based on the first reference angle and the first actual angle, and calibrating the angle sensor according to the basic error value; Obtaining a calibrated second reference angle and a second actual angle, where the second actual angle is the sum of the first actual angle and the basic error value, determining a comparison value between the second reference angle and the second actual angle, and when the maximum value of the comparison value is less than or equal to a preset value, the verification is completed; Receiving a first reference angle of a motor equipped with an angle sensor includes: Performing a zero-crossing detection on the angle sensor; When the angle sensor is at zero, after setting the first reference angle to zero, obtaining the first reference angle of the motor rotation through a sensorless angle integration algorithm; When the angle sensor is not at zero, determining the number of zero-crossing times of the angle sensor, and when the number of zero-crossing times is greater than 1, obtaining the first reference angle of the motor rotation through a sensorless angle integration algorithm.
2. The sensor angle non-linear error calibration method according to claim 1, wherein The sensorless angle integration algorithm uses a non-linear flux observer.
3. The sensor angle non-linear error calibration method according to claim 1, characterized in that Determining a basic error value based on the first reference angle and the first actual angle, and calibrating the angle sensor according to the basic error value includes: Determining a basic error value based on the first reference angle and the first actual angle: Wherein, A e is the base error value, A 1ij is the i first reference angle of the j sector in the A 2ij is the i first actual angle collected by the angle sensor corresponding to the j sector in the i th m rotation, 1 ≤ j ≤ n , 1 ≤ j ≤ n , m is the total number of motor rotations set during the calibration process, n is the total number of sectors into which the motor is divided; Calibrating the angle sensor according to the basic error value: A 2 is the actual value collected by the angle sensor, A' 2 is the calibrated value after calibrating the actual value collected by the angle sensor.
4. The sensor angle non-linear error calibration method according to claim 3, characterized in that Obtaining a calibrated second reference angle and a second actual angle, and determining a comparison value between the second reference angle and the second actual angle includes: Receiving a second reference angle of a motor equipped with an angle sensor and a second actual angle of the angle sensor during the rotation of the motor; Determining a comparison value between the second reference angle and the second actual angle to verify the calibrated angle sensor: A kj = A' 1kj -( A' 2kj + A e ) Among them, A kj is the comparison value of the k th circle and the j th sector, where 1 ≤ k ≤ p , p is the total number of turns of the motor rotation during the verification process; A' 1kj is the second reference angle of the k th circle and the j th sector, A' 2kj is the actual value collected by the angle sensor in the k th circle and the j th sector.
5. The sensor angle non-linear error calibration method according to any one of claims 1-4, characterized in that When any one or more of the comparison values are greater than the preset value, recalibrating the angle sensor.
6. Sensor angle non-linear error calibration system, characterized in that It includes: A receiving unit for receiving a first reference angle of a motor equipped with an angle sensor and a first actual angle of the angle sensor during the rotation of the motor; A calibration unit for determining a basic error value based on the first reference angle and the first actual angle, and calibrating the angle sensor according to the basic error value; A verification unit for obtaining a calibrated second reference angle and a second actual angle, where the second actual angle is the sum of the first actual angle and the basic error value, determining a comparison value between the second reference angle and the second actual angle, and when the maximum value of the comparison value is less than or equal to a preset value, the verification is completed; Receiving a first reference angle of a motor equipped with an angle sensor includes: Performing a zero-crossing detection on the angle sensor; When the angle sensor is at zero, after setting the first reference angle to zero, obtaining the first reference angle of the motor rotation through a sensorless angle integration algorithm; When the angle sensor is not at the zero point, judge the number of zero-crossing times of the angle sensor. When the number of zero-crossing times is greater than 1, obtain the first reference angle of the motor rotation through the sensorless angle integration algorithm.
7. An electronic device, characterized in that, It includes a memory, a processor, and a computer program stored in the memory and capable of running on the processor. When the processor executes the computer program, it implements the steps of the sensor angle non-linear error calibration method according to any one of claims 1-5.
8. A computer-readable storage medium, characterized in that, It stores a computer program, wherein the computer program causes the computer to execute the steps of the sensor angle non-linear error calibration method according to any one of claims 1-5.
Citation Information
Patent Citations
Inductance sensor calibration method, inductance sensor calibration system, medium and product
CN119270179A
Magnetic Field Sensor And Related Techniques That Inject A Synthesized Error Correction Signal Into A Signal Channel To Result In Reduced Error
US20150176963A1