Data correction method and system of optomagnetic all-in-one machine
By training a target machine learning model and analyzing the real-time environment, the optical-magnetic integrated machine automatically adjusts the sensor weight allocation, solving the accuracy and stability problems of the encoder under dynamic factors, and realizing high-precision and flexible encoder applications.
Patent Information
- Application Number
- CN202511804278.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-03
- Publication Date
- 2026-03-03
AI Technical Summary
Existing encoders struggle to maintain high accuracy and stable output when faced with dynamic factors such as temperature drift, load changes, and sensor aging, resulting in data deviations in the optical-magnetic integrated machine.
By acquiring relevant datasets from photoelectric and magnetoelectric sensors, a target machine learning model is trained, environmental data is analyzed in real time, sensor weight allocation is automatically adjusted, and data correction is performed through artificial intelligence self-learning function, thereby realizing the intelligence and integration of the encoder.
To ensure that the encoder maintains high accuracy in dynamic working scenarios, adapts to different environmental conditions, reduces the risk of misjudgment and downtime, improves the flexibility and adaptability of the system, and reduces debugging costs.
Smart Images

Figure CN121594944A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of encoder technology, specifically to a data correction method and system for an opto-magnetic integrated machine. Background Technology
[0002] Encoders are sensors used to detect angle, position, and speed. In servo systems, they provide position or speed feedback and are classified into photoelectric and magnetoelectric types based on their detection principle. A photoelectric encoder is a sensor that converts the mechanical geometric displacement of the output shaft into pulses or digital signals through photoelectric conversion. It is currently the most widely used sensor. It obtains the absolute position of the rotor through a multi-track photoelectric code disk, photoelectric receiver, and transmitter. Its advantages are high accuracy, but as accuracy increases, the number of tracks on the photoelectric code disk increases exponentially, leading to a larger size. A magnetoelectric encoder uses a magnetic induction device to generate and provide the absolute position of the rotor by utilizing changes in the magnetic field. Its advantages are small size, but lower accuracy.
[0003] An integrated opto-magnetic sensor is a composite positioning system that integrates photoelectric and magnetoelectric sensors. It can simultaneously meet the size and accuracy design requirements of encoders, realizing the intelligence and integration of encoders. Currently, encoder debugging methods rely on fixed parameters, which are difficult to cope with dynamic factors such as temperature drift, load changes, and sensor aging. For example, high temperatures can cause thermal expansion of photoelectric sensors, leading to positioning deviations, or the magnetism of magnetoelectric sensors can weaken after long-term use, causing output offsets. These factors result in deviations in the output data of the integrated opto-magnetic sensor. Summary of the Invention
[0004] This application provides a data correction method and system for an integrated optical-magnetic sensor, which can correct encoder deviations, ensure encoder accuracy, and automatically adjust the weight distribution of photoelectric sensors and magnetoelectric sensors by analyzing environmental data in real time (such as temperature, vibration, and pollution levels), making it suitable for dynamic working scenarios.
[0005] The data correction method for the opto-magnetic integrated machine according to this application embodiment includes: acquiring a first correlation dataset of the photoelectric sensor and a second correlation dataset of the magnetoelectric sensor, wherein the first correlation dataset includes uncalibrated actual angle data and calibrated reference angle data of the photoelectric sensor under different environmental conditions, and the second correlation dataset includes uncalibrated actual angle data and calibrated reference angle data of the magnetoelectric sensor under different environmental conditions; training an original machine learning model based on the first correlation dataset and the second correlation dataset to obtain a target machine learning model; inputting the detection parameters at the current moment into the target machine learning model to determine the target correction model and the working mode of the opto-magnetic integrated machine; controlling the operation of the photoelectric sensor and / or the magnetoelectric sensor according to the working mode of the opto-magnetic integrated machine; and correcting the output values of the photoelectric sensor and / or the magnetoelectric sensor in the working state according to the target correction model.
[0006] In some implementations, training the original machine learning model based on the first relevant dataset and the second relevant dataset to obtain the target machine learning model includes: setting a set of hyperparameters to be tuned and a range of hyperparameters in the original machine learning model; determining initial samples under different working environments based on the set of hyperparameters to be tuned, the first relevant dataset, and the second relevant dataset; initializing a Bayesian optimization model by designing and training a meta-feature extractor based on the initial samples under different working environments; and training the Bayesian optimization model based on the first relevant dataset and the second relevant dataset to obtain the target machine learning model.
[0007] In some implementations, determining the initial samples under different working environments based on the set of hyperparameters to be tuned, the first relevant dataset, and the second relevant dataset includes: generating multiple sets of hyperparameters without performance metrics based on the set of hyperparameters to be tuned; inputting each set of hyperparameters without performance metrics into the original machine learning model using different relevant datasets for training to obtain multiple sets of performance metrics; and merging the set of hyperparameters without performance metrics and the performance metrics as initial samples.
[0008] In some implementations, the step of initializing the Bayesian optimization model by designing and training a meta-feature extractor based on the initial samples under different working environments includes: designing and training a meta-feature extractor based on the initial samples to obtain a trained extractor; and extracting meta-features of the first related dataset and the second related dataset based on the trained extractor.
[0009] By calculating the Spearman correlation coefficient between the meta-features, the most similar dataset and the optimal hyperparameter corresponding to the most similar dataset are obtained.
[0010] In some implementations, training the Bayesian optimization model based on the first relevant dataset and the second relevant dataset to obtain the target machine learning model includes: The tree-structured Parento estimation is chosen as the surrogate model, and the expected improvement is used as the acquisition function. Multiple sets of optimal hyperparameters are randomly selected as observation points, and the early performance value and the final performance value after training are recorded for each set of hyperparameters after a fixed number of training iterations. The decision to continue training the set of hyperparameters is made by comparing the early performance values, and the objective function is estimated using the surrogate model through the observation points. The next observation point is determined by maximizing the acquisition function until the optimal observation point is selected to approximate the minimum value of the objective function.
[0011] In some implementations, the target machine learning model is a trained target spatiotemporal graph neural network model. The step of inputting the detection parameters at the current moment into the target machine learning model to determine the target correction model and the operating mode of the opto-magnetic integrated machine includes: constructing the node and edge relationships of the target spatiotemporal graph neural network based on the detection parameters at the current moment; performing spatial convolution processing on the nodes of the spatiotemporal graph neural network based on the edge relationships to obtain a first processing feature; performing temporal convolution processing on the first processing feature based on the historical sequence of the nodes of the spatiotemporal graph neural network to obtain a second processing feature; and processing the second processing feature based on a graph attention mechanism to determine the target correction model and the operating mode of the opto-magnetic integrated machine.
[0012] In some implementations, the step of inputting the detection parameters at the current moment into the target machine learning model to determine the target correction model and the working mode of the opto-magnetic integrated machine includes: determining, based on the environmental parameters at the current moment and the target machine learning model, a correction model for the photoelectric sensor and a correction model for the magnetoelectric sensor that match the current environmental parameters; and determining, based on the environmental parameters at the current moment and the target machine learning model, the working mode of the opto-magnetic integrated machine that matches the current environmental parameters.
[0013] In some implementations, the step of inputting the detection parameters at the current moment into the target machine learning model to determine the target correction model and the working mode of the opto-magnetic integrated machine further includes: determining whether the photoelectric sensor and the magnetoelectric sensor are faulty based on the current working parameters of the opto-magnetic integrated machine and the target machine learning model; and determining the working mode of the opto-magnetic integrated machine based on whether the photoelectric sensor and the magnetoelectric sensor are faulty.
[0014] In some embodiments, the step of inputting the detection parameters at the current moment into the target machine learning model to determine the target correction model and the working mode of the opto-magnetic integrated machine further includes: determining the working mode of the opto-magnetic integrated machine based on the photoelectric signal sensed by the photoelectric sensor and the magnetoelectric signal sensed by the magnetoelectric sensor; if the difference between the photoelectric signal sensed by the photoelectric sensor and the magnetoelectric signal sensed by the magnetoelectric sensor is lower than a preset value, determining that the working mode of the opto-magnetic integrated machine is a hybrid working mode; if the difference between the photoelectric signal sensed by the photoelectric sensor and the magnetoelectric signal sensed by the magnetoelectric sensor is higher than a preset value, determining whether the machine is operating in photoelectric encoder mode or magnetoelectric encoder mode based on whether the photoelectric sensor and the magnetoelectric sensor are faulty and based on the environmental parameters at the current moment.
[0015] The opto-magnetic integrated machine system of this application embodiment includes a photoelectric sensor and a magnetoelectric sensor, and the opto-magnetic integrated machine system is configured to execute the above-described opto-magnetic integrated machine data correction method through a program.
[0016] This application embodiment acquires a first correlation dataset of the photoelectric sensor and a second correlation dataset of the magnetoelectric sensor. The first correlation dataset includes uncalibrated actual angle data and calibrated reference angle data of the photoelectric sensor under different environmental conditions. The second correlation dataset includes uncalibrated actual angle data and calibrated reference angle data of the magnetoelectric sensor under different environmental conditions. Based on the first and second correlation datasets, an original machine learning model is trained to obtain a target machine learning model. The detection parameters at the current moment are input into the target machine learning model to determine the target correction model and the working mode of the integrated opto-magnetic sensor. According to the working mode of the integrated opto-magnetic sensor, the operation of the photoelectric sensor and / or the magnetoelectric sensor is controlled. According to the target correction model, the output values of the photoelectric sensor and / or the magnetoelectric sensor in the working state are corrected. This can realize encoder deviation correction, ensure the accuracy of encoder operation, and automatically adjust the weight allocation of the photoelectric sensor and the magnetoelectric sensor by analyzing environmental data in real time (such as temperature, vibration, and pollution level), which is suitable for dynamic working scenarios. Attached Figure Description
[0017] To more clearly illustrate the technical solutions in the embodiments of this application, 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 this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0018] Figure 1 This is a schematic diagram of the optomagnetic integrated machine system provided in the embodiments of this application.
[0019] Figure 2 A schematic diagram of the data correction method for the opto-magnetic integrated machine provided in the embodiments of this application.
[0020] Figure 3 This is a schematic diagram illustrating the process of obtaining relevant datasets as provided in an embodiment of this application.
[0021] Figure 4 This is a flowchart illustrating the training objective learning model provided in an embodiment of this application.
[0022] Figure 5 This is a schematic diagram illustrating the operation of the target spatiotemporal graph neural network model provided in the embodiments of this application. Detailed Implementation
[0023] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0024] This application provides a data correction method and system for an opto-magnetic integrated machine.
[0025] An integrated opto-magnetic encoder is a composite positioning system that integrates photoelectric and magnetoelectric sensors. It can simultaneously meet the size and accuracy design requirements of encoders, achieving both intelligent and integrated encoder functionality. In related technologies, encoder debugging methods rely on fixed parameters, making it difficult to cope with dynamic factors such as temperature drift, load changes, and sensor aging. For example, high temperatures can cause thermal expansion of photoelectric sensors, leading to positioning deviations, or long-term use can weaken the magnetism of magnetoelectric sensors, causing output offsets. These factors result in deviations in the output data of the integrated opto-magnetic encoder.
[0026] The embodiments of this application can be applied to an integrated opto-magnetic machine to realize encoder deviation correction, ensure the accuracy of encoder operation, and automatically adjust the weight allocation of photoelectric sensors and magnetoelectric sensors by analyzing environmental data in real time (such as temperature, vibration, pollution level), which is suitable for dynamic working scenarios.
[0027] The data correction method for the opto-magnetic integrated machine provided in this application introduces the self-learning function of artificial intelligence, enabling the system to analyze environmental data (such as temperature, vibration, and pollution level) in real time and automatically adjust the weight allocation of photoelectric and magnetoelectric sensors. For example, in a clean room, optical encoders are given priority to ensure accuracy, while in a metal processing workshop, the weight of magnetic sensors is increased to resist cutting fluid interference.
[0028] The data correction method for the opto-magnetic integrated machine provided in this application embodiment, through training with historical data, allows artificial intelligence to identify encoder fault modes (such as signal changes when the photoelectric sensor is blocked) or environmental changes (such as sudden mechanical vibration), triggering fault tolerance mechanisms (such as switching to the magnetoelectric sensor-dominated mode), thus avoiding misjudgments or shutdowns caused by fixed threshold settings in traditional methods.
[0029] The data correction method for the opto-magnetic integrated machine provided in this application supports "task-oriented" adaptive control through artificial intelligence self-learning function. In high-speed grasping tasks, the system can optimize the sampling rate and filtering parameters to improve response speed; in precision assembly tasks, it enhances noise suppression capability to ensure micron-level precision, achieving the flexibility of "one machine for multiple uses".
[0030] The data correction method for the opto-magnetic integrated machine provided in this application continuously updates model parameters through artificial intelligence self-learning, eliminating the need for periodic shutdown calibration (traditional methods require offline calibration using equipment such as laser interferometers). Combined with transfer learning technology, calibration experience from other robots can be quickly transferred to new equipment, significantly shortening the debugging cycle. The small sample learning capability allows the system to adapt to new scenarios with only a small amount of data, reducing data acquisition costs.
[0031] The integration of the optomagnetic integrated machine system and artificial intelligence self-learning provided in this application not only solves the triangular contradiction of "precision-robustness-efficiency" in traditional technology, but also promotes the intelligent transformation of robots from "passive execution" to "active adaptation", providing key technical support for high-end applications such as flexible manufacturing and unmanned production lines.
[0032] The solutions provided in this application relate to the field of sensor technology, and are specifically illustrated through the following embodiments. Detailed descriptions are provided below. It should be noted that the order of description of the following embodiments is not intended to limit the priority of the embodiments.
[0033] The data correction method for the opto-magnetic integrated machine provided by the exemplary embodiments of this application will be described below with reference to the accompanying drawings and the application scenarios described above. It should be noted that the above application scenarios are only shown for the purpose of understanding the principles of this application, and the embodiments of this application are not limited in any way.
[0034] Figure 1 This is a schematic diagram of the optomagnetic integrated machine system provided in an embodiment of this application. Figure 1 As shown, in the data correction method of the opto-magnetic integrated machine provided in the embodiments of this application, the opto-magnetic integrated machine system may include photoelectric sensors and magnetoelectric sensors.
[0035] The opto-magnetic integrated machine can operate in photoelectric encoder mode, magneto-electric encoder mode, and hybrid mode. In photoelectric encoder mode, the photoelectric sensor in the integrated machine dominates the operation, and the machine outputs digital values based on the photoelectric conversion principle. In magneto-electric encoder mode, the magneto-electric sensor in the integrated machine dominates the operation, and the machine outputs digital values based on the magneto-electric conversion principle. In hybrid mode, both the photoelectric sensor and the magneto-electric sensor in the integrated machine dominate the operation, and the machine outputs digital values based on both photoelectric and magneto-electric conversion principles.
[0036] Figure 2 This is a flowchart illustrating the data correction method for the opto-magnetic integrated machine provided in an embodiment of this application. Figure 2 As shown, the specific implementation process of this method includes: Step 010: Obtain the first correlation dataset of the photoelectric sensor and the second correlation dataset of the magnetoelectric sensor. The first correlation dataset includes the uncalibrated actual angle data and the calibrated reference angle data of the photoelectric sensor under different environmental conditions. The second correlation dataset includes the uncalibrated actual angle data and the calibrated reference angle data of the magnetoelectric sensor under different environmental conditions.
[0037] Specifically, in step 010, to obtain the relevant datasets of photoelectric sensors and magnetoelectric sensors, it is necessary to simultaneously collect raw uncalibrated data and high-precision reference calibration data for the two types of sensors under multiple environmental conditions.
[0038] Figure 3 This is a schematic diagram illustrating the process of obtaining relevant datasets as provided in an embodiment of this application. Figure 3 As shown, in some embodiments, step 010: obtaining the first correlation dataset of the photoelectric sensor and the second correlation dataset of the magnetoelectric sensor includes: Step 011: Obtain the first mixed dataset of the photoelectric sensor and the second mixed dataset of the magnetoelectric sensor. The first mixed dataset includes the uncalibrated actual angle data and the calibrated reference angle data of the photoelectric sensor. The second mixed dataset includes the uncalibrated actual angle data and the calibrated reference angle data of the magnetoelectric sensor. Subsets of the first and second mixed datasets include temperature set, vibration set, magnetic field set and visibility set.
[0039] Specifically, the first mixed dataset of photoelectric sensors and the second mixed dataset of magnetoelectric sensors were constructed by simultaneously collecting the raw output data and high-precision reference data of the two types of sensors under multiple environmental conditions.
[0040] Environmental factors such as temperature, vibration, magnetic fields, and visibility can all affect sensor performance. Specifically, temperature changes can cause temperature drift in the sensor, changes in vibration frequency can cause signal fluctuations, changes in magnetic fields can cause electromagnetic disturbances, and changes in visibility can affect the intensity of the light signal sensed by the sensor.
[0041] In some embodiments, step 011: acquiring a first mixed dataset of photoelectric sensors and a second mixed dataset of magnetoelectric sensors includes: Step 0111: Initialize the optical-magnetic integrated machine.
[0042] The initialization of the optical-magnetic integrated machine must strictly follow the mechanical installation calibration and electrical environment optimization process to ensure measurement accuracy and long-term stability.
[0043] Specifically, the mechanical installation and calibration steps may include: Shaft alignment: Ensure that the coaxiality between the shaft of the optical-magnetic integrated machine and the motor / load shaft is ≤0.01mm (using a laser alignment instrument or dial indicator for detection) to avoid eccentricity error.
[0044] Installation temperature: Calibrate at the stable operating temperature of the equipment (e.g., after the motor has been running for 30 minutes) to prevent axial displacement caused by thermal expansion.
[0045] Specifically, the steps for optimizing the electrical environment may include: Power quality: Use a linear power supply or a low-noise switching power supply, with voltage fluctuations ≤ ±1%.
[0046] Signal shielding: The optical-magnetic integrated machine cable uses twisted-pair shielded wire and is kept away from strong electromagnetic interference sources (such as frequency converters and welding machines).
[0047] Grounding treatment: The outer casing of the optical-magnetic integrated machine is grounded at a single point to avoid ground loop interference.
[0048] Step 0112: Collect temperature data, vibration data, magnetic field data, and visibility data under the current working environment.
[0049] Step 0113: Obtain the initial output value data of the photoelectric sensor and the magnetoelectric sensor to determine the uncalibrated actual angle data of the photoelectric sensor and the magnetoelectric sensor.
[0050] Step 0114: Calibrate the photoelectric sensor and the magnetoelectric sensor respectively to obtain initial calibration curves, so as to determine the calibrated reference angle data of the photoelectric sensor and the magnetoelectric sensor.
[0051] Specifically, using a standard encoder, a standard turntable, and a laser interferometer, the photoelectric sensor and the magnetoelectric sensor are calibrated to obtain initial calibration curves, which in turn generate calibrated reference angle data.
[0052] Specifically, the standard encoder, used as the calibration reference, needs to have a resolution 1-2 orders of magnitude higher than the encoder being calibrated (e.g., using a 25-bit standard encoder to calibrate a 17-bit encoder). Laser interferometers can achieve linear displacement measurement accuracy of ±0.1µm, suitable for long-stroke calibration (e.g., machine tool guideways). Standard rotary tables can be used for angular position calibration, with an angular resolution ≤0.001° and a backlash error ≤0.005°.
[0053] In some embodiments, the calibration methods for photoelectric sensors and magnetoelectric sensors may include static calibration, dynamic calibration, reverse calibration, temperature-compensated calibration, and least squares calibration.
[0054] Taking the accurate calibration of encoder initial data using the least squares method as an example, the key step is to eliminate systematic errors by fitting the error model between the encoder output and the true position through mathematical optimization methods. The least squares method fits a data model by minimizing the sum of squared errors and is suitable for linear or nonlinear error compensation. For encoder calibration, the core objective is to establish a mapping relationship between the encoder reading x and the true position y: y = f(x) + ϵ Where ϵ is the random error and f(x) is the compensation function to be fitted.
[0055] Linear error model Assume that the encoder error mainly consists of gain error (proportional coefficient k) and bias error (b): y=k x+b The least squares objective function is: Nonlinear error model If the error contains higher-order terms (such as quadratic or cubic terms), the model can be expanded as follows: The steps for calibration using the least squares method include: Data acquisition: The real position yi is acquired using a high-precision reference benchmark (such as a laser interferometer or optical encoder), and the encoder output xi is recorded simultaneously.
[0056] Sampling strategies can include uniform distribution, dynamic acquisition, and multi-cycle averaging. Uniform distribution involves selecting n calibration points evenly within the encoder's range (e.g., n≥20). Dynamic acquisition uses constant-speed motion to collect continuous data, reducing the impact of static noise. Multi-cycle averaging collects m cycles of data at each calibration point and averages the results to reduce random errors.
[0057] Construct the matrix equation: For the linear model y=k⋅x+b, the data is arranged in matrix form: in: Least squares solution: By solving the normal equation The coefficients are obtained as follows: Nonlinear model extension: For higher-order models (such as quadratic terms), modify matrix X: Different working environments can be set, and the temperature, vibration, magnetic field, and visibility data corresponding to each working environment can be different. By repeating steps 0111 to 0114 above, the uncalibrated actual angle data and calibrated reference angle data of the photoelectric sensor under different working environments, as well as the uncalibrated actual angle data and calibrated reference angle data of the magnetoelectric sensor under different working environments, can be obtained.
[0058] Step 012: Preprocess the first mixed dataset and the second mixed dataset to obtain the first related dataset and the second related dataset.
[0059] Data preprocessing is a crucial step in transforming raw data into a standardized format suitable for model training. The core of this process is data cleaning (handling missing and outlier values) and data standardization (eliminating dimensional differences), which lays the foundation for subsequent modeling.
[0060] In some embodiments, step 012: preprocessing the first mixed dataset and the second mixed dataset includes: Step 0121: Remove individual abnormal data that exceed the approved range in the first mixed dataset and the second mixed dataset.
[0061] Specifically, box plot method (IQR) or Z-score method (|Z|>3) can be used to identify and remove abnormal data that exceeds the approved range (such as pulse jumps caused by vibration or angle drift under magnetic field interference) to ensure that the data conforms to the normal distribution or business logic boundary.
[0062] Step 0122: Issue an alert for data that appears frequently in the first mixed dataset and the second mixed dataset to indicate whether manual exclusion is necessary; Specifically, an alarm mechanism is triggered for frequently occurring data points (such as repetitive angle values caused by sudden temperature changes or continuous vibrations) to prompt manual verification to determine whether they are systematic errors (such as sensor hardware failures) or actual operating conditions, thus avoiding the accidental deletion of valid data.
[0063] Step 0123: Based on the data integrity of the first mixed dataset and the second mixed dataset, determine whether it is necessary to collect data again.
[0064] Specifically, the missing data rate of each environmental subset (temperature, vibration, etc.) is calculated. If the missing rate of key dimensions is >10% or the spatiotemporal continuity does not meet the modeling requirements (such as data gaps in high-temperature segments), the re-collection process is initiated to ensure that the dataset covers all working conditions.
[0065] Step 020: Train the original machine learning model based on the first and second relevant datasets to obtain the target machine learning model.
[0066] Figure 4 This is a flowchart illustrating the training objective learning model provided in an embodiment of this application. Figure 4 As shown, in some embodiments, step 020: training the original machine learning model based on the first relevant dataset and the second relevant dataset to obtain the target machine learning model includes: Step 021: Set the set of hyperparameters to be tuned and the range of hyperparameters in the original machine learning model.
[0067] The set and range of hyperparameters to be tuned refer to the key parameters and their value ranges that need to be predefined before training a machine learning model. These parameters directly affect the model performance and need to be selected through tuning methods (such as grid search, random search, and Bayesian optimization).
[0068] Specifically, the original machine learning model can be a Spatiotemporal Graph Neural Network (STGNN). This allows the trained target STGNN model to achieve multi-sensor data fusion and interference compensation. Its core is to model the physical relationships and temporal dependencies between sensors through graph structures, thereby improving the system's robustness in complex environments. As an extension of Graph Neural Networks (GNNs), STGNNs are specifically designed to process graph-structured data with spatiotemporal characteristics, such as time-varying physical quantities (temperature, vibration, etc.) and their spatial relationships in sensor networks. GNNs extend deep learning to graph-structured data, and their core lies in fusing structural and feature information through domain aggregation mechanisms, supporting multi-scale analysis from nodes to graphs.
[0069] Step 022: Determine the initial samples under different working environments based on the set of hyperparameters to be tuned, the first correlation dataset, and the second correlation dataset.
[0070] In some embodiments, step 022: determining initial samples under different working environments based on the set of hyperparameters to be tuned, the first correlation dataset, and the second correlation dataset includes: Step 0221: Generate multiple sets of hyperparameters without performance metrics based on the set of hyperparameters to be adjusted.
[0071] Step 0222: Input each set of hyperparameters without performance metrics into the original machine learning model using different related datasets for training, and obtain multiple sets of performance metrics.
[0072] Step 0223: Merge the set of hyperparameters without performance metrics and the performance metrics as the initial sample.
[0073] Specifically, Latin hypercube sampling can be used to generate k sets of hyperparameters without performance metrics from the set of hyperparameters to be adjusted. Each set of hyperparameters without performance metrics is then input into the original machine learning model of m relevant datasets for training, resulting in m... k performance metrics.
[0074] Step 023: Based on the initial samples under different working environments, initialize the Bayesian optimization model by designing and training a meta-feature extractor.
[0075] In some embodiments, step 023: Based on initial samples under different working environments, the Bayesian optimization model is initialized by designing and training a meta-feature extractor, including: Step 0231: Based on the initial samples, design and train the meta-feature extractor to obtain the trained extractor.
[0076] Step 0232: Extract meta-features from the first and second relevant datasets based on the post-training extractor.
[0077] Step 0233: Obtain the most similar dataset and the optimal hyperparameters corresponding to the most similar dataset by calculating the Spearman correlation coefficient between the meta-features.
[0078] Step 0234: Initialize the Bayesian optimization model based on the optimal hyperparameters corresponding to the most similar dataset.
[0079] Specifically, a feature extractor (such as a deep autoencoder) can be trained using initial samples to learn the statistical properties of the dataset (such as mean, variance, and entropy). The trained extractor is then applied to extract higher-order meta-features (such as autocorrelation and distribution skewness in time-series data) from the first and second related datasets. The Spearman correlation coefficient (a non-parametric correlation measure) of the meta-features of the two datasets is calculated, and the historical dataset with the highest similarity is selected, along with its validated optimal hyperparameter combination (such as learning rate and regularization coefficient). The matched optimal hyperparameters are then used as the initial prior distribution for a Bayesian optimizer (such as a Gaussian process), accelerating the hyperparameter search process for new datasets (reducing the number of iterations by ≥40%).
[0080] Step 024: Train the Bayesian optimization model based on the first and second relevant datasets to obtain the target machine learning model.
[0081] In some embodiments, step 024: training the Bayesian optimization model based on the first and second relevant datasets to obtain the target machine learning model includes: Step 0241: Select the tree-structured Parento estimate (TPE) as the surrogate model and the expected improvement (EI) as the acquisition function.
[0082] Step 0242: Train the Bayesian optimization model using an automatic early stopping strategy to obtain the target machine learning model.
[0083] Step 0242: The steps for training the Bayesian optimization model using an automatic early stopping strategy include: Multiple sets of optimal hyperparameters are randomly selected as observation points, and the early performance value and the final performance value after training are recorded for each set of hyperparameters after a fixed number of training iterations.
[0084] The decision to continue training the set of hyperparameters is made by comparing early performance values, and the objective function is estimated using a surrogate model through observation points. The next observation point is determined by maximizing the acquisition function until the optimal observation point is selected to approximate the minimum value of the objective function.
[0085] Specifically, if the hyperparameters of this group are higher than those of other groups, training continues, and the hyperparameters of this group are used as observation points to update the surrogate model. The surrogate model is used to estimate the objective function through the observation points, and the next observation point is determined by maximizing the acquisition function, until the best observation point is selected to approximate the minimum value of the objective function. The optimal parameter combination is determined based on the best observation point; otherwise, training is terminated early.
[0086] Step 030: Input the detection parameters at the current moment into the target machine learning model to determine the target correction model and the working mode of the optical-magnetic integrated machine.
[0087] In some embodiments, step 030: inputting the detection parameters at the current moment into the target machine learning model to determine the target correction model and the working mode of the opto-magnetic integrated machine, including: Step 031: Input the detection parameters at the current moment into the trained target spatiotemporal graph neural network model to determine the target correction model and the working mode of the optomagnetic integrated machine.
[0088] Figure 5 This is a schematic diagram illustrating the operation of the target spatiotemporal graph neural network model provided in the embodiments of this application. Figure 5 As shown, in some embodiments, step 031: inputting the detection parameters at the current moment into the trained target spatiotemporal graph neural network model to determine the target correction model and the working mode of the optomagnetic integrated machine, including: Step 0311: Based on the detection parameters at the current moment, construct the node and edge relationships of the target spatiotemporal graph neural network.
[0089] Specifically, the nodes of the spatiotemporal graph neural network can be various data from photoelectric and electromagnetic sensors (temperature values, vibration amplitude, etc.). Edge relationships are constructed based on the statistical correlations between nodes (such as the covariant relationship between temperature and electromagnetic interference). The data of each node is updated in real time as various data change at different times.
[0090] Step 0312: Based on the edge relationships of the spatiotemporal graph neural network, perform spatial convolution processing on the nodes of the spatiotemporal graph neural network to obtain the first processed features.
[0091] Step 0313: Based on the historical sequence of nodes in the spatiotemporal graph neural network, perform temporal convolution on the first processing feature to obtain the second processing feature.
[0092] Specifically, multi-source data can be aggregated first through spatial convolution, and then input into a temporal convolutional layer to predict state evolution (e.g., first fuse temperature-vibration data, and then predict sensor error in the next 5ms).
[0093] Step 0314: Process the second processing feature based on the graph attention mechanism to determine the target correction model and the working mode of the optomagnetic integrated machine.
[0094] The weight allocation for graph attention can be determined based on the environmental parameters at the current moment. For example, in a high-temperature environment, the temperature weight of a node increases, triggering a temperature compensation model as the target correction model, and determining the operating mode of the opto-magnetic integrated machine based on the current temperature environment. In an environment with high electromagnetic interference, the magnetic field weight of a node increases, triggering a Kalman filter correction model as the target correction model, and determining the operating mode of the opto-magnetic integrated machine based on the current electromagnetic environment.
[0095] In some embodiments, step 030: inputting the detection parameters at the current moment into the target machine learning model to determine the target correction model and the working mode of the opto-magnetic integrated machine, further includes: Step 032: Based on the environmental parameters at the current moment and the target machine learning model, determine the correction model of the photoelectric sensor and the correction model of the magnetoelectric sensor that match the current environmental parameters.
[0096] Specifically, the first and second relevant datasets used in model training include calibration curves of photoelectric sensors and magnetoelectric sensors under different working environments. This allows the target machine learning model to select the corrected models of the photoelectric sensors and magnetoelectric sensors that match the preset environment parameter-calibration curve mapping library, thereby achieving real-time calibration of the sensor outputs.
[0097] Step 033: Based on the current environmental parameters and the target machine learning model, determine the working mode of the optical-magnetic integrated machine that matches the current environmental parameters.
[0098] Specifically, the first and second relevant datasets used in model training include the output deviations of photoelectric sensors and magnetoelectric sensors under different working environments, enabling the target machine learning model to select the working mode of the opto-magnetic integrated machine based on preset environmental parameters and output deviations.
[0099] In some embodiments, step 030: inputting the detection parameters at the current moment into the target machine learning model to determine the target correction model and the working mode of the optomagnetic integrated machine, further includes: Step 034: Based on the current operating parameters of the opto-magnetic integrated machine and the target machine learning model, determine whether the photoelectric sensor and the magneto-electric sensor are faulty; Step 035: Determine the working mode of the opto-magnetic integrated machine based on whether there are faults in the photoelectric sensor and the magneto-electric sensor.
[0100] Specifically, through training with historical data, artificial intelligence can identify encoder fault modes (such as signal abrupt changes when photoelectric sensors are blocked) or environmental abrupt changes (such as sudden mechanical vibrations), triggering fault-tolerant mechanisms (such as switching to the magnetoelectric sensor-dominated mode) to avoid misjudgments or shutdowns caused by fixed threshold settings in traditional methods.
[0101] In some embodiments, step 030: inputting the detection parameters at the current moment into the target machine learning model to determine the target correction model and the working mode of the optomagnetic integrated machine, further includes: Step 036: Determine the working mode of the opto-magnetic integrated machine based on the photoelectric signal sensed by the photoelectric sensor and the magneto-electric signal sensed by the magneto-electric sensor.
[0102] Specifically, if the difference between the photoelectric signal sensed by the photoelectric sensor and the magnetoelectric signal sensed by the magnetoelectric sensor is lower than a preset value, the working mode of the opto-magnetic integrated machine is determined to be a hybrid working mode.
[0103] If the difference between the photoelectric signal sensed by the photoelectric sensor and the magnetoelectric signal sensed by the magnetoelectric sensor is higher than the preset value, the system determines whether to operate in photoelectric encoder mode or magnetoelectric encoder mode based on whether the photoelectric sensor and the magnetoelectric sensor are faulty and the environmental parameters at the current moment.
[0104] In some embodiments, the data correction method for the optical-magnetic integrated machine further includes: inputting current environmental parameters into a target machine learning model to determine the operating parameters of the optical-magnetic integrated machine.
[0105] Specifically, the system supports "task-oriented" adaptive control through artificial intelligence self-learning function. In high-speed grasping tasks, the system can optimize the sampling rate and filtering parameters to improve response speed; in precision assembly tasks, it enhances noise suppression capabilities to ensure micron-level precision, achieving the flexibility of "one machine for multiple uses".
[0106] Step 040: Control the photoelectric sensor and / or magnetoelectric sensor to work according to the working mode of the opto-magnetic integrated machine.
[0107] Step 050: Correct the output values of the photoelectric sensor and / or magnetoelectric sensor in operation according to the target correction model.
[0108] Specifically, if the integrated opto-magnetic sensor operates in a hybrid mode, integrating the photoelectric and magnetoelectric sensors, then Kalman filtering is applied for signal co-fitting. The core application of Kalman filtering is precise positioning, achieved through signal preprocessing to denoise the original signal. For example, magnetoelectric sensors are susceptible to electromagnetic interference (such as motor PWM noise). By fusing multi-cycle observation data through Kalman filtering, high-frequency noise is suppressed, and the noise covariance is dynamically adjusted to adapt to changes in signal-to-noise ratio at different speeds.
[0109] The target correction model is a real-time updated dynamic correction model. Taking the construction of the temperature drift compensation model as an example, the state variables are set as [angle, angular velocity, temperature drift coefficient], and the observation equation is set as the original signal + real-time input of temperature data. Compared with the traditional table lookup method, the dynamic correction model can significantly reduce the error.
[0110] The multi-sensor fusion process can align photoelectric and magnetoelectric signals. By adding [installation offset angle, time delay difference] as an estimate, and using the chi-square test to eliminate abnormal synchronization data, the alignment error can be controlled within ±0.01°.
[0111] The target correction model can also predict the output angle of the cycle in advance based on real-time angle prediction, which is suitable for high-precision positioning of servo motors (such as semiconductor equipment). It also implements fault detection and recovery functions, automatically switching to redundant sensor mode when a sensor malfunction is detected, ensuring the normal operation of the opto-magnetic integrated machine.
[0112] The processor in the opto-magnetic integrated machine system provided in this application embodiment can be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method embodiment can be completed by the integrated logic circuit in the processor's hardware or by software instructions. The processor can be a general-purpose processor, a microcontroller, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor, etc.
[0113] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0114] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0115] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0116] In the embodiments of this application, the terms "module" or "unit" refer to a program or part of a program that has a predetermined function and works with other related parts to achieve a predetermined goal, and can be implemented wholly or partially using software, hardware (such as processing circuitry or memory), or a combination thereof. Similarly, a processor (or multiple processors or memory) can be used to implement one or more modules or units. Furthermore, each module or unit can be part of an overall module or unit that includes the functionality of that module or unit.
[0117] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0118] In addition, the functional units in the embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0119] If a function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, ROM, RAM, magnetic disks, or optical disks.
[0120] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A data correction method for an optical-magnetic integrated machine, characterized in that, The integrated optical-magnetic device includes a photoelectric sensor and a magnetoelectric sensor, and the data correction method of the integrated optical-magnetic device includes: A first correlation dataset of the photoelectric sensor and a second correlation dataset of the magnetoelectric sensor are obtained. The first correlation dataset includes uncalibrated actual angle data and calibrated reference angle data of the photoelectric sensor under different environmental conditions. The second correlation dataset includes uncalibrated actual angle data and calibrated reference angle data of the magnetoelectric sensor under different environmental conditions. Based on the first relevant dataset and the second relevant dataset, the original machine learning model is trained to obtain the target machine learning model; The detection parameters at the current moment are input into the target machine learning model to determine the target correction model and the working mode of the optical-magnetic integrated machine; According to the working mode of the optical-magnetic integrated machine, control the operation of the photoelectric sensor and / or the magnetoelectric sensor; The output values of the photoelectric sensor and / or the magnetoelectric sensor in operation are corrected according to the target correction model.
2. The data correction method for the optomagnetic integrated machine as described in claim 1, characterized in that, The step of training the original machine learning model based on the first relevant dataset and the second relevant dataset to obtain the target machine learning model includes: Set the set of hyperparameters to be tuned and the range of hyperparameters in the original machine learning model; Initial samples under different working environments are determined based on the set of hyperparameters to be tuned, the first relevant dataset, and the second relevant dataset; Based on the initial samples under different working environments, a Bayesian optimization model is initialized by designing and training a meta-feature extractor. The Bayesian optimization model is trained based on the first relevant dataset and the second relevant dataset to obtain the target machine learning model.
3. The data correction method for the optomagnetic integrated machine as described in claim 2, characterized in that, The step of determining initial samples under different working environments based on the set of hyperparameters to be tuned, the first correlation dataset, and the second correlation dataset includes: Based on the set of hyperparameters to be adjusted, generate multiple sets of hyperparameters without performance metrics; Each set of hyperparameters without performance metrics is input into the original machine learning model using different related datasets for training, resulting in multiple sets of performance metrics. The set of hyperparameters without performance metrics and the performance metrics are combined as the initial sample.
4. The data correction method for the opto-magnetic integrated machine as described in claim 2, characterized in that, The initialization of the Bayesian optimization model based on the initial samples under different working environments, through designing and training a meta-feature extractor, includes: Based on the initial samples, a meta-feature extractor is designed and trained to obtain the trained extractor. Meta-features of the first and second related datasets are extracted based on the post-training extractor; By calculating the Spearman correlation coefficient between the meta-features, the most similar dataset and the optimal hyperparameter corresponding to the most similar dataset are obtained.
5. The data correction method for the optomagnetic integrated machine as described in claim 2, characterized in that, The step of training the Bayesian optimization model based on the first relevant dataset and the second relevant dataset to obtain the target machine learning model includes: The tree-structured Parento estimation was chosen as the surrogate model, with the expected improvement as the acquisition function. Multiple sets of optimal hyperparameters are randomly selected as observation points, and the early performance value and the final performance value after training are recorded for each set of hyperparameters after a fixed number of training iterations. The decision to continue training the set of hyperparameters is made by comparing early performance values, and the objective function is estimated using a surrogate model through observation points. The next observation point is determined by maximizing the acquisition function until the optimal observation point is selected to approximate the minimum value of the objective function.
6. The data correction method for the optomagnetic integrated machine as described in claim 1, characterized in that, The target machine learning model is a trained target spatiotemporal graph neural network model. The step of inputting the detection parameters at the current moment into the target machine learning model to determine the target correction model and the operating mode of the opto-magnetic integrated machine includes: Based on the detection parameters at the current moment, construct the node and edge relationships of the target spatiotemporal graph neural network; Based on the edge relationships of the spatiotemporal graph neural network, spatial convolution processing is performed on the nodes of the spatiotemporal graph neural network to obtain the first processed feature; Based on the historical sequence of the nodes of the spatiotemporal graph neural network, the first processed feature is subjected to temporal convolution to obtain the second processed feature; The second processing feature is processed based on a graph attention mechanism to determine the target correction model and the working mode of the optomagnetic integrated machine.
7. The data correction method for the opto-magnetic integrated machine as described in claim 1, characterized in that, The step of inputting the detection parameters at the current moment into the target machine learning model to determine the target correction model and the working mode of the opto-magnetic integrated machine includes: Based on the environmental parameters at the current moment and the target machine learning model, determine the correction model of the photoelectric sensor and the correction model of the magnetoelectric sensor that match the current environmental parameters; Based on the current environmental parameters and the target machine learning model, determine the working mode of the opto-magnetic integrated machine that matches the current environmental parameters.
8. The data correction method for the opto-magnetic integrated machine as described in claim 1, characterized in that, The step of inputting the detection parameters at the current moment into the target machine learning model to determine the target correction model and the working mode of the opto-magnetic integrated machine also includes: Based on the current operating parameters of the optical-magnetic integrated machine and the target machine learning model, determine whether the photoelectric sensor and the magnetoelectric sensor are faulty; The operating mode of the opto-magnetic integrated machine is determined based on whether the photoelectric sensor and the magneto-electric sensor are faulty.
9. The data correction method for the optomagnetic integrated machine as described in claim 1, characterized in that, The step of inputting the detection parameters at the current moment into the target machine learning model to determine the target correction model and the working mode of the opto-magnetic integrated machine also includes: The working mode of the opto-magnetic integrated machine is determined based on the photoelectric signal sensed by the photoelectric sensor and the magnetoelectric signal sensed by the magnetoelectric sensor. If the difference between the photoelectric signal sensed by the photoelectric sensor and the magnetoelectric signal sensed by the magnetoelectric sensor is lower than a preset value, the working mode of the opto-magnetic integrated machine is determined to be a hybrid working mode. If the difference between the photoelectric signal sensed by the photoelectric sensor and the magnetoelectric signal sensed by the magnetoelectric sensor is higher than a preset value, the system determines whether to operate in photoelectric encoder mode or magnetoelectric encoder mode based on whether the photoelectric sensor and the magnetoelectric sensor are faulty and based on the environmental parameters at the current time.
10. A photoelectric integrated machine system, characterized in that, The opto-magnetic integrated machine system includes a photoelectric sensor and a magnetoelectric sensor, and the opto-magnetic integrated machine system is configured to execute the data correction method of the opto-magnetic integrated machine as described in any one of claims 1 to 9 through a program.
Citation Information
Cited By
Absolute value encoder of photomagnetic dual-detection module collaborative layout structure
CN122083831A