Calibration method and device of absolute magnetic encoder, electronic equipment and storage medium
By utilizing the magnetic field data of the absolute magnetic encoder itself to establish a closed-loop calibration system, the problems of high cost and low efficiency in traditional calibration methods are solved, high-precision calibration is achieved across the entire range, dependence on external equipment is reduced, and calibration accuracy and efficiency are improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- KINGKONG TECH
- Filing Date
- 2026-02-05
- Publication Date
- 2026-05-01
AI Technical Summary
Traditional absolute magnetic encoder calibration methods rely on expensive and complex high-precision reference equipment, which is difficult to meet the needs of rapid calibration on the production site and suffers from insufficient accuracy and low efficiency.
A closed-loop calibration system is established using the magnetic field data of the absolute magnetic encoder itself. By collecting magnetic field data, calculating the error distribution matrix, and generating error compensation parameters, real-time angle correction is achieved, reducing dependence on external equipment.
It achieves continuous high-precision calibration of the encoder throughout the entire measurement range, reduces human error, improves calibration efficiency and accuracy, adapts to actual working scenarios, and enhances measurement reliability.
Smart Images

Figure CN121954086A_ABST
Abstract
Description
Calibration methods, devices, electronic equipment and storage media for absolute magnetic encoders Technical Field
[0002] This invention relates to the field of motor equipment technology, and in particular to a calibration method, apparatus, electronic device, and storage medium for an absolute magnetic encoder. Background Technology
[0004] Absolute magnetic encoders are widely used in high-precision position detection and feedback settings, such as in robot joints, rotary axes of CNC machine tools, and high-precision rotary tables. Their calibration methods typically employ traditional static calibration techniques, often relying on external high-precision reference equipment such as laser interferometers, polyhedra, and circular gratings.
[0005] Traditional calibration methods for absolute magnetic encoders have many shortcomings:
[0006] (1) High-precision reference equipment is expensive, such as high-end laser interferometers, which can cost hundreds of thousands of yuan or even more, increasing calibration costs; (2) High-precision reference equipment is large in size and complex in structure, and the installation and debugging process is cumbersome, requiring high technical skills from operators and also having certain limitations on the calibration site. Moreover, the calibration process is time-consuming and difficult to meet the rapid calibration needs of the production site; (3) Using discrete point calibration, the selected angle positions are limited, which cannot fully reflect the error characteristics of the encoder that change continuously throughout the entire range. There may be large errors in the unmeasured areas, reducing accuracy; (4) Manual operation of the rotating platform is required to rotate the platform, which is inefficient and easily introduces human operation errors, affecting the accuracy of the calibration results. In addition, the calibration time for a single unit is long, making it difficult to meet the needs of mass production. Summary of the Invention
[0008] This invention provides a calibration method, apparatus, electronic device, and storage medium for an absolute magnetic encoder, thereby addressing many shortcomings of traditional calibration methods for absolute magnetic encoders.
[0009] According to one aspect of the present invention, a calibration method for an absolute magnetic encoder is provided, comprising:
[0010] Collect magnetic field data of the rotor of the absolute magnetic encoder during the rotation of the working motor;
[0011] Based on the preset physical model of the absolute magnetic encoder and the preprocessed magnetic field data, the error distribution matrix of the absolute magnetic encoder in the current installation environment is calculated.
[0012] Based on the error distribution matrix, an error compensation model is calculated using a preset optimization algorithm to generate error compensation parameters.
[0013] The error compensation parameters are used to correct the angle measurement values of the absolute magnetic encoder in real time during actual operation.
[0014] Optionally, based on the preset physical model of the absolute magnetic encoder and the preprocessed magnetic field data, the error distribution matrix of the absolute magnetic encoder in the current installation environment is calculated, including:
[0015] Based on the preset physical model of the absolute magnetic encoder, the initial angle is calculated using the preprocessed magnetic field data.
[0016] Based on the current installation environment parameters of the absolute magnetic encoder, the preprocessed magnetic field data is analyzed to extract the magnetic field characteristics of the absolute magnetic encoder.
[0017] Based on the magnetic field characteristics and the initial angle, a "magnetic field-angle" relationship model is established, and the model predicts the angle.
[0018] The predicted angle of the model is compared with the angle reference value built into the absolute magnetic encoder to calculate the error distribution matrix of the absolute magnetic encoder under the current installation environment.
[0019] Optionally, before acquiring the magnetic field data of the absolute magnetic encoder rotor during the rotation of the working motor, the following steps are also included:
[0020] The stator and rotor of the absolute magnetic encoder are installed in the preset positions of the working motor, and the preset installation requirements are met.
[0021] Optionally, before calculating the error distribution matrix of the absolute magnetic encoder under the current installation environment based on the preset physical model of the absolute magnetic encoder and the preprocessed magnetic field data, the following steps are also included:
[0022] The magnetic field data is preprocessed to obtain preprocessed magnetic field data.
[0023] Optionally, the installation environment parameters include the installation positions of the stator and rotor of the absolute magnetic encoder on the working motor and the surrounding electromagnetic environment; the magnetic field characteristics include magnetic field strength and magnetic field amplitude.
[0024] Optionally, the error compensation model is used to characterize the error characteristics of the absolute magnetic encoder throughout its entire range.
[0025] Optionally, the preprocessing employs a filtering algorithm to remove abnormal impulse noise caused by electromagnetic interference and eliminate the influence of random noise in the magnetic field data.
[0026] According to another aspect of the present invention, a calibration device for an absolute magnetic encoder is provided, comprising:
[0027] The acquisition module is used to acquire the magnetic field data of the rotor of the absolute magnetic encoder during the rotation of the working motor.
[0028] An error distribution matrix calculation module is used to calculate the error distribution matrix of an absolute magnetic encoder under the current installation environment based on a preset physical model of the absolute magnetic encoder and preprocessed magnetic field data.
[0029] An error compensation parameter generation module is used to generate error compensation parameters based on the error distribution matrix and an error compensation model calculated using a preset optimization algorithm.
[0030] The correction module is used to correct the angle measurement value of the absolute magnetic encoder in real time using the error compensation parameters.
[0031] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:
[0032] At least one processor; and
[0033] A memory communicatively connected to the at least one processor; wherein,
[0034] The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the calibration method of the absolute magnetic encoder according to any embodiment of the present invention.
[0035] According to another aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing computer instructions for causing a processor to execute and implement the calibration method of an absolute magnetic encoder according to any embodiment of the present invention.
[0036] This invention provides a calibration method, apparatus, electronic device, and storage medium for an absolute magnetic encoder. The method includes: acquiring magnetic field data of the absolute magnetic encoder rotor during motor rotation; calculating the error distribution matrix of the absolute magnetic encoder under the current installation environment based on a preset physical model of the absolute magnetic encoder and the preprocessed magnetic field data; generating error compensation parameters based on the error distribution matrix using an error compensation model calculated by a preset optimization algorithm; and using the error compensation parameters to correct the angle measurement values of the absolute magnetic encoder during actual operation in real time. The technical solution provided by this invention eliminates the need for external high-precision reference equipment, establishing a closed-loop calibration system using the encoder's own magnetic field data. This overcomes technical bottlenecks such as discrete point calibration and poor environmental adaptability, integrating data acquisition and intelligent data processing and calibration to achieve a miniaturized and automated calibration process. Through the synergistic effect of algorithms, the entire process from data preprocessing and feature extraction to relationship modeling and error correction is optimized, significantly improving the accuracy and reliability of the calibration. By innovating calibration technology, continuous high-precision calibration of the encoder is achieved throughout the entire measurement range, reducing the impact of human operation factors on the calibration results, improving calibration efficiency and convenience, and making the calibration results more consistent with actual working scenarios, thereby significantly improving the measurement accuracy and reliability of absolute magnetic encoders.
[0037] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description
[0039] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0040] Figure 1 is a flowchart of a calibration method for an absolute magnetic encoder provided in an embodiment of the present invention;
[0041] Figure 2 is a flowchart of another calibration method for an absolute magnetic encoder provided in an embodiment of the present invention;
[0042] Figure 3 is a flowchart of another calibration method for an absolute magnetic encoder provided by an embodiment of the present invention;
[0043] Figure 4 is a schematic diagram of the structure of a calibration device for an absolute magnetic encoder provided in an embodiment of the present invention;
[0044] Figure 5 is a schematic diagram of the structure of an electronic device for a calibration method of an absolute magnetic encoder provided in an embodiment of the present invention. Detailed Implementation
[0046] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0047] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0048] Figure 1 is a flowchart of a calibration method for an absolute magnetic encoder provided by an embodiment of the present invention. This embodiment is applicable to situations where encoder calibration is costly, inefficient, inaccurate, and dependent on external devices. The method can be executed by an absolute magnetic encoder calibration device, which can be implemented in hardware and / or software. This calibration device can be configured in any electronic device with communication capabilities. Referring to Figure 1, the method includes:
[0049] S110: Collect magnetic field data of the absolute magnetic encoder rotor during the rotation of the working motor.
[0050] Specifically, during the dynamic process of the absolute magnetic encoder rotor rotating driven by the working motor, the high-speed acquisition module built into the stator of the absolute magnetic encoder collects the magnetic field data of the rotor during the rotation of the working motor. Through dynamic rotation, the rotor's magnetic field continuously changes with the angle, thereby acquiring complete magnetic field data covering the entire range or target range of the encoder—solving the deficiency of traditional static discrete-point calibration in reflecting the complete error across the entire range, and providing data support for subsequent calculation of the error distribution matrix. Magnetic field data refers to the physical quantity data related to the magnetic field that varies with the angle when the absolute magnetic encoder rotor rotates, including magnetic field strength and magnetic field amplitude.
[0051] S120. Based on the preset physical model of the absolute magnetic encoder and the preprocessed magnetic field data, calculate the error distribution matrix of the absolute magnetic encoder under the current installation environment.
[0052] The preset physical model is a model that is pre-set during the design phase of the absolute magnetic encoder based on the working principle of the magnetic encoder.
[0053] Specifically, the high-speed acquisition module built into the stator of the absolute magnetic encoder collects the magnetic field data of the rotor during the rotation of the working motor. The processing unit on the encoder stator then transmits the magnetic field data to the host computer in real time via the Serial Peripheral Interface (SPI). The host computer uses a filtering algorithm to remove abnormal pulse noise and random noise caused by electromagnetic interference, minor installation vibrations, etc., to ensure the authenticity and validity of the data. Then, the host computer inputs the pre-processed magnetic field data into the preset physical model of the absolute magnetic encoder to calculate the initial angle. Combining the current installation environment parameters of the absolute magnetic encoder (e.g., stator and rotor installation positions, electromagnetic environment, etc.), the pre-processed data is analyzed in depth to extract key features such as magnetic field strength and amplitude. These magnetic field features are then combined with the calculated initial angle to establish a "magnetic field-angle" relationship model, ultimately yielding the model's predicted angle. The model's predicted angle is compared with the encoder's factory-preset reference angle, i.e., the static reference value, angle by angle, and the error value at each angle position is calculated (error = model predicted angle - preset reference angle). These error values are then organized according to the correspondence between the full-range angle position and the error to form an error distribution matrix. The core value of the matrix is to transform abstract error patterns into calculable and modelable structured data.
[0054] S130. Based on the error distribution matrix, the error compensation model is calculated using a preset optimization algorithm to generate error compensation parameters.
[0055] The error compensation model is used to characterize the error characteristics of the absolute magnetic encoder throughout its entire range. The preset optimization algorithm can be pre-set according to computational requirements; for example, it could be the least squares method, regularization algorithm, or genetic algorithm, etc. This invention does not limit this. The preset optimization algorithm aims to minimize error, ensuring that the calculated error compensation model can accurately match the real data of the error distribution matrix while maintaining stable predictive ability throughout the entire range, avoiding local error deviations.
[0056] Specifically, the host computer software imports the error distribution matrix and then calls a pre-defined optimization algorithm to iteratively optimize the parameters of the error compensation model with the goal of minimizing the error. After optimization, the "error-angle" functional relationship is obtained, and the error compensation model is generated. The core coefficients (such as polynomial coefficients) in the error compensation model are extracted to form a concise set of parameters, namely, the error compensation parameters. The error compensation parameters are stored in the storage unit of the absolute magnetic encoder through communication interfaces such as SPI to prepare for subsequent real-time correction.
[0057] S140. The angle measurement value of the absolute magnetic encoder is corrected in real time during actual operation using error compensation parameters.
[0058] Specifically, the process involves four steps: First, real-time acquisition of magnetic field data. The high-speed acquisition module built into the encoder stator continuously acquires magnetic field data from the encoder rotor as the motor rotates, transmitting the data to the encoder's processing unit in real time. Second, calculation of the uncorrected angle measurement. The processing unit calls the built-in magnetic encoder physical model, substituting the real-time acquired magnetic field data into the model to quickly calculate the uncorrected initial angle, i.e., the actual angle measurement value during operation. Third, calculation of the real-time compensation value using error compensation parameters. The processing unit reads the error compensation parameters written during the calibration phase from its own storage unit and substitutes the uncorrected initial angle into the preset compensation formula to calculate the error compensation value corresponding to the current angle in real time, i.e., the magnitude of the deviation that needs to be offset. Fourth, dynamic correction and output of high-precision results. The processing unit performs calculations between the uncorrected initial angle and the real-time compensation value (usually "corrected angle = uncorrected angle - compensation value," the specific logic of which is determined by the calibration model) to offset the measurement error of the current angle, ultimately outputting a precise angle result.
[0059] The entire process takes only microseconds, achieving correction as soon as rotation occurs and output as soon as correction is achieved. The compensation parameters for this step are modeled based on a full-range error distribution matrix, covering the error patterns of all angles in actual operation, rather than discrete point errors, ensuring that the correction for each angle is based on a valid basis. The encoder's built-in processing unit has fast computing capabilities, and the compensation formula is a simple polynomial calculation, achieving real-time response without complex computing power. The error compensation parameters are customized for the current installation environment (such as a stator-rotor installation distance of 0.6mm, concentricity ≤0.05mm, and electromagnetic interference), accurately offsetting environmental errors in actual operation and avoiding the problem of discrepancies between ideal environment calibration and actual scenarios.
[0060] The technical solution provided by this invention eliminates the need for external high-precision reference equipment. It utilizes the encoder's own magnetic field data to establish a closed-loop calibration system, overcoming technical bottlenecks such as discrete-point calibration and poor environmental adaptability. It integrates data acquisition and intelligent data processing and calibration, achieving a miniaturized and automated calibration process. Through the synergistic effect of algorithms, it optimizes the entire process from data preprocessing and feature extraction to relationship modeling and error correction, significantly improving calibration accuracy and reliability. This innovative calibration technology enables continuous high-precision calibration of the encoder throughout its entire measurement range, reducing the impact of human intervention on calibration results, improving calibration efficiency and convenience, and making the calibration results more consistent with actual working scenarios. This significantly improves the measurement accuracy and reliability of absolute magnetic encoders.
[0061] Figure 2 is a flowchart of another calibration method for an absolute magnetic encoder provided by an embodiment of the present invention. This embodiment further refines the aforementioned embodiments based on the previous embodiments. Referring to Figure 2, step S120 specifically includes:
[0062] S210: Based on the preset physical model of the absolute magnetic encoder, the initial angle is calculated using the preprocessed magnetic field data.
[0063] Specifically, the preprocessed magnetic field data is substituted into a preset physical model, and the initial angle is obtained by activating a fixed mathematical formula. For example, the angle = k × magnetic field phase + b, where k and b are inherent parameters of the preset physical model, determined based on the encoder design.
[0064] S220. Based on the current installation environment parameters of the absolute magnetic encoder, the preprocessed magnetic field data is analyzed to extract the magnetic field characteristics of the absolute magnetic encoder.
[0065] The installation environment parameters include the installation positions of the stator and rotor of the absolute magnetic encoder on the working motor and the surrounding electromagnetic environment; the magnetic field characteristics include magnetic field strength and magnetic field amplitude, etc.
[0066] Specifically, the host computer first reads the current installation environment parameters of the absolute magnetic encoder to determine the core dimensions of the analysis data—for example, due to electromagnetic interference, it is necessary to focus on whether there is an abnormal shift in the magnetic field phase; due to the fixed installation distance, it is necessary to lock in the reasonable fluctuation range of the magnetic field strength. Based on the determined analysis dimensions, the preprocessed magnetic field data is further decomposed—for example, filtering out abnormal data that exceeds the reasonable range due to the fixed installation distance (not caused by electromagnetic interference), focusing on analyzing the changing law of magnetic field characteristics with motor rotation, and at the same time, combining electromagnetic environment parameters to distinguish the relative magnetic field relationships that meet the conditions. From the effective data after analysis, core indicators that can stably reflect the relationship between magnetic field and angle under the current environment are extracted—for example, extracting the slope of the linear change of magnetic field strength with angle under the current electromagnetic environment, the peak magnetic field strength corresponding to an installation distance of 0.6mm, the stable fluctuation range of magnetic field amplitude, etc., ultimately forming a feature mapping relationship of "magnetic field strength-angle".
[0067] S230. Establish a "magnetic field-angle" relationship model based on the magnetic field characteristics and the initial angle, and output the predicted angle of the model.
[0068] Specifically, the host computer maps continuous initial angles to synchronously extracted magnetic field features in a one-to-one correspondence of time and angle position—for example, when the initial angle is 30.002°, it synchronously matches the magnetic field strength (520mT) and magnetic field amplitude (±10mT) at that angle, forming a pairwise dataset of "angle-feature". Based on the above pairwise datasets, the mapping relationship is constructed through optimization algorithms: for example, through a multivariate regression algorithm, the optimal combination of "magnetic field strength × weight a + magnetic field amplitude × weight b + initial angle × weight c" is calculated, so that the angle output by the model can offset environmental interference to the greatest extent. After the model training and optimization are completed, any set of magnetic field features in the current environment + the corresponding initial angle can be input to output the model's predicted angle in real time—for example, with an initial angle of 30.002°, after calculation with the current magnetic field features, the output is 30.000° (which has offset the 0.002° environmental error), and this angle is continuously generated as the motor rotates, covering the entire range.
[0069] S240. Compare the model-predicted angle with the angle reference value built into the absolute magnetic encoder, and calculate the error distribution matrix of the absolute magnetic encoder under the current installation environment.
[0070] Specifically, the host computer software synchronously acquires two sets of continuous data: ① the model-predicted angle sequence (e.g., 0.000°, 0.001°, ..., 360.000°, continuously generated as the motor rotates); ② the encoder's built-in angle reference value sequence (e.g., 0.000°, 0.001°, ..., 360.000°, a factory-preset ideal angle sequence), ensuring that the angle position indices of the two sets of data are completely consistent, i.e., the angles at the same moment / at the same rotation position correspond one-to-one. For each angle position, the error value is calculated according to a fixed formula: Single angle error value = Model-predicted angle - Built-in angle reference value. Note: The error value can be positive or negative; positive indicates that the model-predicted angle is greater than the built-in reference value, and negative indicates that it is less than the built-in reference value. The core is to quantify the magnitude and direction of the deviation. The angle indices of all angle positions and their corresponding error values are organized in a structured form to form an error distribution matrix.
[0071] This step utilizes the model's predicted angles in the current installation environment, compares them to the encoder's own inherent reference angle (i.e., the built-in angle reference value), and quantifies the error of each angle through a point-by-point comparison across the entire measurement range. The results are then organized into a structured error distribution matrix. This approach replaces traditional external reference devices for calibration and achieves full-range error quantification.
[0072] Figure 3 is a flowchart of another calibration method for an absolute magnetic encoder provided by an embodiment of the present invention. This embodiment further refines the aforementioned embodiments based on the previous embodiments. Referring to Figure 3, optionally, before step S110, the method further includes:
[0073] S310. Install the stator and rotor of the absolute magnetic encoder in the preset positions of the working motor, and meet the preset installation requirements.
[0074] The preset position is a standard installation position that is defined during the encoder design phase and is compatible with the working motor. It is not an arbitrary position. The core is to ensure that the rotor rotates synchronously with the motor shaft, while the stator remains fixed and does not rotate with the motor. For example, the preset position of the rotor is the designated installation section of the motor shaft, which must be firmly fixed to prevent slippage or displacement during rotation. The preset position of the stator is the position on the stationary parts of the motor, such as the housing or mounting bracket, corresponding to the rotor. It is necessary to ensure that the installation distance and relative posture of the stator and rotor meet the design requirements. The preset installation requirements mean that the centers of the rotor and stator are aligned and their planes are parallel. That is, the rotation centers of the two are completely coincident, and the relative end faces of the stator and rotor remain parallel, while the installation gap is fixed. For example, concentricity (center alignment accuracy): ≤0.05mm (i.e., the center deviation between the rotor and the stator does not exceed 0.05 mm); flatness (end face parallelism accuracy): ≤0.05mm (i.e., the non-parallelism deviation between the relative end faces of the stator and the rotor does not exceed 0.05 mm); installation distance (stator-rotor gap): 0.6mm (fixed gap to avoid collisions due to excessive proximity or weakening of the magnetic field signal due to excessive distance).
[0075] After installation, the working motor is rotated using a sensorless control or manual drive method. The rotation can be a full rotation or a partial rotation. Then, the magnetic field data of the absolute magnetic encoder rotor is collected during the rotation of the working motor.
[0076] Referring again to Figure 3, optionally, prior to step S120, the following steps are also included:
[0077] S320. Preprocess the magnetic field data to obtain preprocessed magnetic field data.
[0078] Optionally, the preprocessing uses median filtering and moving average filtering algorithms to remove abnormal impulse noise caused by electromagnetic interference and eliminate the influence of random noise in the magnetic field data.
[0079] The calibration of an absolute magnetic encoder provided in this application will be described in detail below with a specific embodiment:
[0080] Taking an absolute magnetic encoder used in robot joints as an example, the encoder rotor is mounted on the motor shaft, and the encoder stator is mounted on the stationary part of the motor. The mounting distance between the stator and rotor is 0.6 mm, while ensuring that the concentricity and flatness of the stator and rotor are both less than 0.05 mm. A sensorless control method is used to make the motor rotate continuously at 50 rpm for 3 revolutions. The internal acquisition module of the encoder stator collects the magnetic field data of the rotor under the current installation environment and transmits it to the host computer in real time via the SPI interface.
[0081] The host computer preprocesses the received magnetic field data, extracts features, establishes an error compensation model, and writes the error compensation parameters into the encoder.
[0082] After calibration, the encoder's accuracy was improved from 0.1° to arcsecond level, enabling it to handle high speeds, such as 8000 rpm. The entire calibration process was reduced to 3 minutes.
[0083] The counting method scheme provided in this invention eliminates the need for external high-precision reference equipment. It utilizes the encoder's own magnetic field data to establish a closed-loop calibration system, overcoming technical bottlenecks such as discrete-point calibration and poor environmental adaptability. It integrates data acquisition and intelligent data processing and calibration, achieving a miniaturized and automated calibration process. Through the synergistic effect of algorithms, it optimizes the entire process from data preprocessing and feature extraction to relationship modeling and error correction, significantly improving calibration accuracy and reliability. This innovative calibration technology enables continuous high-precision calibration of the encoder throughout its entire range, reducing the impact of human intervention on calibration results, improving calibration efficiency and convenience, and making the calibration results more consistent with actual working scenarios. This significantly improves the measurement accuracy and reliability of absolute magnetic encoders.
[0084] Figure 4 is a schematic diagram of the structure of a calibration device for an absolute magnetic encoder provided in an embodiment of the present invention. Referring to Figure 4, the device includes: an acquisition module 410, an error distribution matrix calculation module 420, an error compensation parameter generation module 430, and a correction module 440.
[0085] The acquisition module 410 is used to acquire the magnetic field data of the rotor of the absolute magnetic encoder during the rotation of the working motor.
[0086] The error distribution matrix calculation module 420 is used to calculate the error distribution matrix of the absolute magnetic encoder under the current installation environment based on the preset physical model of the absolute magnetic encoder and the preprocessed magnetic field data.
[0087] The error compensation parameter generation module 430 is used to generate error compensation parameters based on the error compensation model calculated by the preset optimization algorithm according to the error distribution matrix.
[0088] The correction module 440 is used to correct the angle measurement value of the absolute magnetic encoder in real time using error compensation parameters.
[0089] The calibration device for an absolute magnetic encoder provided in this embodiment of the invention can execute the calibration method for an absolute magnetic encoder provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method, which will not be elaborated here.
[0090] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:
[0091] At least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores a computer program executable by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the calibration method of the absolute magnetic encoder provided in any embodiment of the present invention.
[0092] According to another aspect of the present invention, a computer-readable storage medium is provided, which stores computer instructions for causing a processor to execute and implement the calibration method of the absolute magnetic encoder provided in any embodiment of the present invention.
[0093] Figure 5 is a schematic diagram of the structure of an electronic device for a calibration method of an absolute magnetic encoder provided in an embodiment of the present invention. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workbenches, 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, smartphones, 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 illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.
[0094] As shown in Figure 5, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 and a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer programs stored in the ROM 12 or loaded into the RAM 13 from storage unit 18. The RAM 13 can also store various programs and data required for the operation of the electronic device 10. The processor 11, the ROM 12, and the RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0095] Multiple components in electronic device 10 are connected to input / output I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of monitors, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0096] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as a calibration method for an absolute magnetic encoder.
[0097] In some embodiments, a calibration method for an absolute magnetic encoder may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or mounted on electronic device 10 via read-only memory ROM 12 and / or communication unit 19. When the computer program is loaded into random access memory RAM 13 and executed by processor 11, one or more steps of the calibration method for an absolute magnetic encoder described above may be performed. Alternatively, in other embodiments, processor 11 may be configured in any other suitable manner to perform a calibration method for an absolute magnetic encoder.
[0098] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transferring data and instructions to the storage system, the at least one input device, and the at least one output device.
[0099] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0100] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0101] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device for displaying information to a user; and a keyboard and pointing device through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with a user; for example, feedback provided to the user can be any form of sensory feedback; and input from the user can be received in any form.
[0102] The systems and technologies described herein can be implemented in computing systems that include backend components, middleware components, or frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium. Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.
[0103] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.
[0104] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.
[0105] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.
Claims
1. A calibration method for an absolute magnetic encoder, characterized in that, include: Collect magnetic field data of the rotor of the absolute magnetic encoder during the rotation of the working motor; Based on the preset physical model of the absolute magnetic encoder and the preprocessed magnetic field data, the error distribution matrix of the absolute magnetic encoder under the current installation environment is calculated; according to the error distribution matrix, the error compensation model calculated by the preset optimization algorithm is used to generate error compensation parameters; the angle measurement value of the absolute magnetic encoder during actual operation is corrected in real time using the error compensation parameters.
2. The calibration method for an absolute magnetic encoder according to claim 1, characterized in that, Based on the preset physical model of the absolute magnetic encoder and the preprocessed magnetic field data, the error distribution matrix of the absolute magnetic encoder under the current installation environment is calculated as follows: Based on the preset physical model of the absolute magnetic encoder, the initial angle is calculated using the preprocessed magnetic field data; combined with the current installation environment parameters of the absolute magnetic encoder, the preprocessed magnetic field data is analyzed to extract the magnetic field characteristics of the absolute magnetic encoder; a "magnetic field-angle" relationship model is established based on the magnetic field characteristics and the initial angle, and the model predicts the angle; the model predicts the angle and compares it with the angle reference value built into the absolute magnetic encoder to calculate the error distribution matrix of the absolute magnetic encoder under the current installation environment.
3. The calibration method for an absolute magnetic encoder according to claim 1, characterized in that, Before collecting the magnetic field data of the absolute magnetic encoder rotor during the rotation of the working motor, the process also includes: installing the stator and rotor of the absolute magnetic encoder in the preset positions of the working motor, and meeting the preset installation requirements.
4. The calibration method for an absolute magnetic encoder according to claim 1, characterized in that, Before calculating the error distribution matrix of the absolute magnetic encoder under the current installation environment based on the preset physical model of the absolute magnetic encoder and the preprocessed magnetic field data, the method further includes: preprocessing the magnetic field data to obtain preprocessed magnetic field data.
5. The calibration method for an absolute magnetic encoder according to claim 2, characterized in that, The installation environment parameters include the installation positions of the stator and rotor of the absolute magnetic encoder on the working motor and the surrounding electromagnetic environment; the magnetic field characteristics include magnetic field strength and magnetic field amplitude.
6. The calibration method for an absolute magnetic encoder according to claim 1, characterized in that, The error compensation model is used to characterize the error characteristics of an absolute magnetic encoder throughout its entire range.
7. The calibration method for an absolute magnetic encoder according to claim 4, characterized in that, The preprocessing uses a filtering algorithm to remove abnormal impulse noise caused by electromagnetic interference and eliminate the influence of random noise in the magnetic field data.
8. A calibration device for an absolute magnetic encoder, characterized in that, include: The acquisition module is used to acquire the magnetic field data of the rotor of the absolute magnetic encoder during the rotation of the working motor. An error distribution matrix calculation module is used to calculate the error distribution matrix of an absolute magnetic encoder under the current installation environment based on a preset physical model of the absolute magnetic encoder and preprocessed magnetic field data. An error compensation parameter generation module is used to generate error compensation parameters based on the error distribution matrix and an error compensation model calculated using a preset optimization algorithm. The correction module is used to correct the angle measurement value of the absolute magnetic encoder in real time using the error compensation parameters.
9. An electronic device, characterized in that, The electronic device includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores a computer program executable by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the calibration method of the absolute magnetic encoder according to any one of claims 1-6.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that, when executed by a processor, implement the calibration method for the absolute magnetic encoder as described in any one of claims 1-6.