Automatic parameter adjustment test method for electromagnetic angular displacement sensor
By constructing a closed-loop control flow and adaptive control algorithm, combined with mechanical actuators and environmental perception, fully automatic and high-precision calibration of electromagnetic angular displacement sensors was achieved. This solved the problems of insufficient dynamic working condition simulation and low efficiency of manual maintenance in traditional calibration methods, and improved the stability and consistency of the sensors.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-25
- Publication Date
- 2026-03-10
AI Technical Summary
Traditional electromagnetic angular displacement sensors are susceptible to temperature changes and external magnetic field fluctuations in practical applications. Mechanical structure vibrations lead to a decrease in accuracy. Existing calibration methods cannot simulate dynamic working conditions. Mechanical testing and electrical parameter adjustment are disconnected. Manual maintenance is inefficient and inconsistent, and cannot meet the needs of mass production.
A closed-loop control flow of detection-analysis-adjustment-verification is constructed. An adaptive control algorithm is adopted, and the gain error and orthogonality phase error are accurately calculated through multi-point sampling and ellipse fitting algorithm. Combined with zero position deviation and excitation amplitude deviation, fully automatic and high-precision calibration is achieved. Real-time compensation is performed by combining mechanical actuators and environmental perception.
It achieves fully automatic and efficient calibration of sensor parameters, shortens parameter adjustment time, avoids human error, ensures consistency of products in the same batch, improves the stability and anti-interference ability of sensors in complex environments, and meets the needs of industrial mass production.
Smart Images

Figure CN121631951A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of sensor measurement and calibration technology, and in particular to an automatic parameter adjustment test method for an electromagnetic angular displacement sensor. Background Technology
[0002] Electromagnetic angular displacement sensors are key measuring components, and their accuracy and stability directly affect the performance of motion control systems. Traditional encoders are mainly based on optical or magnetic principles, with magnetic encoders becoming increasingly widely used in industrial environments due to their superior durability and continuously improving resolution. However, traditional inductive encoders still face serious challenges in practical applications: First, the sensor output is susceptible to drift caused by factors such as temperature changes and external magnetic field fluctuations; second, long-term vibration or impact can lead to deformation of the mechanical structure, such as bearing wear and coil displacement, causing the sensor accuracy to decline year by year.
[0003] To address the aforementioned issues, existing technologies mainly employ the following solutions: First, a fixed-environment calibration device is used to perform static parameter calibration within a constant-temperature chamber. However, this method completely ignores the impact of dynamic mechanical disturbances under actual working conditions. Second, an offline vibration test bench is used to conduct independent mechanical durability tests on the sensors. However, the mechanical testing and electrical parameter adjustment systems are separate, and the data cannot be linked, making it difficult to establish a mapping relationship between mechanical deformation and electrical parameters. Third, on-site maintenance relies on manual experience, with technicians diagnosing faults and manually adjusting parameters or replacing components. This approach is inefficient and prone to introducing human error.
[0004] The existing technical solutions described above have significant drawbacks: they cannot simulate dynamic working conditions in a fixed environment, leading to a severe disconnect between the sensor's factory calibration results and actual field performance; the separation of mechanical testing and electrical parameter tuning prevents the system from achieving a closed loop for disturbance sensing and parameter prediction; manual maintenance is time-consuming and cannot meet the needs of mass production, and the inconsistent manual operation of sensors in the same batch results in significant deviations in output angles, seriously affecting product quality stability. Therefore, there is an urgent need for an efficient parameter tuning method and testing system that can achieve automation and closed-loop feedback to fundamentally solve the above problems. Summary of the Invention
[0005] The purpose of this invention is to provide an automatic parameter adjustment and testing method for electromagnetic angular displacement sensors. By constructing a closed-loop control flow of "detection-analysis-adjustment-verification" and adopting an adaptive control algorithm, the method achieves fully automatic, high-precision, and high-efficiency calibration of the zero position, sensitivity, and excitation signal parameters of electromagnetic angular displacement sensors.
[0006] To address the aforementioned technical problems, a first aspect of this invention provides an automatic parameter adjustment and testing method for an electromagnetic angular displacement sensor, comprising the following steps: Step S100: Inject a standard angle signal into the sensor under test and acquire the output response signal of the sensor under test; Step S200: Based on the output response signal and the standard angle signal, calculate the deviation of the sensor parameters and determine whether the deviation exceeds a preset threshold. Step S300: If the deviation exceeds the limit, then based on the deviation amount, an adaptive control algorithm is used to generate control commands for zero position, sensitivity and excitation signal amplitude compensation, and to adjust the mechanical zero position or the relative position of the internal electromechanical conversion element of the sensor under test. Step S400: Based on the adjusted output response signal, repeat steps S200 to S300 to iteratively update the sensor parameters; Step S500: When the deviation is lower than the preset threshold, it is determined that the output accuracy of the sensor under test meets the preset requirements, and the current sensor parameters are saved to complete the parameter adjustment process of the sensor under test.
[0007] Further, the step of calculating the deviation of the sensor parameters based on the output response signal and the standard angle signal includes: The rotor of the sensor under test is positioned at the mechanical zero point, multiple sets of original values of sine and cosine signals are collected, their average value is calculated and compared with the ideal output value of the mechanical zero point to obtain the sine zero position deviation and cosine zero position deviation. The rotor is sequentially positioned to multiple preset angle positions. At each preset angle position, a sine compensation signal and a cosine compensation signal after zero-position deviation compensation are collected. Based on the compensation signals of all positions, model parameters characterizing sensor gain error and orthogonality phase error are obtained by ellipse fitting. The rotor is positioned at a preset amplitude calibration angle position. The sine verification signal and cosine verification signal are collected after zero position deviation and model parameter compensation. The synthesized vector amplitude is calculated and its average value is compared with the preset ideal amplitude to obtain the excitation signal amplitude deviation. Based on the zero-position deviation, model parameters and excitation signal amplitude deviation, the sensor output is compensated in real time and the angle is calculated to obtain the actual measured angle value of the sensor. The difference between the measured angle value of the sensor and the actual angle value corresponding to the standard angle signal is calculated to obtain the deviation.
[0008] Furthermore, the compensation signals based on all locations are used to obtain model parameters characterizing the sensor gain error and orthogonality phase error through elliptic fitting, including: An elliptic equation model is established with sinusoidal compensation signal and cosine compensation signal as variables. The elliptic equation model includes the sinusoidal channel gain coefficient, the cosine channel gain coefficient, and the actual phase angle between the two channels. The sinusoidal compensation signal values and cosine compensation signal values collected at multiple preset angle positions are used as the observation dataset and substituted into the elliptic equation model. The least squares method is used to fit an ellipse to the observation dataset, and the numerical solutions of the sine channel gain coefficient, cosine channel gain coefficient and actual phase angle are calculated. Based on the sine channel gain coefficient and the cosine channel gain coefficient, their reciprocals are calculated as the sine channel gain correction factor and the cosine channel gain correction factor, respectively. The phase compensation angle is obtained by calculating the difference between the ideal orthogonal phase angle and the actual phase angle of the sensor. The sine channel gain correction factor, the cosine channel gain correction factor, and the phase compensation angle are used together as model parameters for signal compensation.
[0009] Furthermore, the real-time compensation and angle calculation of the sensor output based on the zero-position deviation, model parameters, and excitation signal amplitude deviation to obtain the measured angle value of the sensor includes: The sine zero-position deviation and cosine zero-position deviation are subtracted from the currently acquired original values of the sine signal and cosine signal, respectively, to obtain the sine compensation signal and cosine compensation signal. The sinusoidal compensation signal is multiplied by the sinusoidal channel gain correction factor, and the cosine compensation signal is multiplied by the cosine channel gain correction factor to perform gain matching compensation. The phase compensation angle is used to perform coordinate rotation correction on the sinusoidal and cosine signals after gain matching compensation to eliminate orthogonal phase error and obtain the final compensated sinusoidal and cosine signal values. Perform a four-quadrant arctangent operation on the final compensated sine and cosine signal values to obtain the measured angle value of the sensor.
[0010] Further, the step of generating control commands for zero-point, sensitivity, and excitation signal amplitude compensation using an adaptive control algorithm based on the deviation, and adjusting the mechanical zero point or relative position of the internal electromechanical conversion element of the sensor under test, includes: Based on the sine zero-position deviation and cosine zero-position deviation corresponding to the deviation, calculate the zero-position compensation angle required for the sensor shaft, generate a first control command, and adjust the mechanical angular position of the shaft according to the first control command. Based on the sine channel gain correction factor, cosine channel gain correction factor and phase compensation angle corresponding to the deviation, a second control command is generated. The relative spatial position between the sensing element inside the sensor and the electromagnetic excitation source is adjusted according to the second control command to complete the sensitivity correction. Based on the amplitude deviation of the excitation signal corresponding to the deviation, a third control command is generated. The output code value of the digital-to-analog converter or the duty cycle of the pulse width modulation signal is adjusted according to the third control command to optimize the output amplitude of the sensor excitation source.
[0011] Further, the step of calculating the required zero-position compensation angle for the sensor shaft based on the sinusoidal zero-position deviation and cosine zero-position deviation corresponding to the deviation amount, and generating the first control command, includes: Based on the sinusoidal zero-position deviation and the cosine zero-position deviation, the zero-position compensation angle estimate of the sensor shaft is calculated using the arctangent function. Determine whether the absolute value of the zero-position compensation angle estimate exceeds a preset angle deviation threshold; If the preset angle deviation threshold is exceeded, the zero-position compensation angle estimate will be used as the zero-position compensation angle required for the sensor shaft. The zero-position compensation angle is converted into a first control command for the drive actuator to adjust the mechanical angular position of the rotating shaft.
[0012] Further, the generation of the second control command based on the sine channel gain correction factor, cosine channel gain correction factor, and phase compensation angle corresponding to the deviation includes: The difference between the sinusoidal channel gain correction factor and the unity gain value is used as the first gain adjustment amount, and the difference between the cosine channel gain correction factor and the unity gain value is used as the second gain adjustment amount. The absolute value of the phase compensation angle is used as the phase adjustment amount; The target displacement is calculated based on the weighted sum of the first gain adjustment, the second gain adjustment, and the phase adjustment. The displacement direction is determined based on the magnitude relationship between the sinusoidal channel gain correction factor and the cosine channel gain correction factor. The target displacement and displacement direction are converted into a second control command that drives the actuator to adjust the relative spatial position of the sensor's internal sensing element and the electromagnetic excitation source.
[0013] Further, the step of generating a third control command based on the amplitude deviation of the excitation signal corresponding to the deviation includes: The amplitude deviation of the excitation signal is input into the adaptive control algorithm to calculate the adjustment amount of the excitation source control parameters; The adjustment amount is mapped to the corresponding digital-to-analog converter output code value or pulse width modulation signal duty cycle; A third control command is generated based on the mapping result, and the third control command is output to the excitation source drive circuit; Collect the adjusted sensor output signal and verify whether the amplitude deviation of the excitation signal meets the requirements. If it does not meet the requirements, repeat the above steps until the deviation reaches the preset range.
[0014] Furthermore, after saving the current sensor parameters, the method further includes: The rotor of the sensor under test is moved sequentially to several verification angle positions that are different from the calibration point; At each verification angle position, the angle is calculated using the saved sensor parameters to obtain the verification angle value; Calculate the error between the verification angle value and the actual angle value, and determine whether all errors are less than the preset verification threshold; If the error exceeds the verification threshold, the saved sensor parameters are optimized and corrected based on the error distribution of each verification point using an interpolation algorithm. The optimized sensor parameters are saved back to memory to complete the post-validation optimization of the parameters.
[0015] Furthermore, the step of generating control commands for zero-position, sensitivity, and excitation signal amplitude compensation via an adaptive control algorithm further includes: Real-time acquisition of environmental parameters of the test environment, including ambient temperature, external magnetic field strength and mechanical vibration frequency; The environmental parameters are input into a preset environmental compensation model to obtain the influence coefficients of environmental factors on the sensor output. The deviation is dynamically corrected based on the influence coefficient to obtain the environmentally compensated deviation. The control command is generated using the environmentally compensated deviation, thereby achieving adaptive parameter tuning based on environmental perception.
[0016] Accordingly, a second aspect of the present invention provides an electronic device, including: at least one processor; and a memory connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to cause the at least one processor to perform the above-described automatic parameter adjustment test method for an electromagnetic angular displacement sensor.
[0017] Accordingly, a third aspect of the present invention provides a computer-readable storage medium having computer instructions stored thereon, which, when executed by a processor, implement the above-described automatic parameter adjustment test method for an electromagnetic angular displacement sensor.
[0018] The above-described technical solutions of the embodiments of the present invention have the following beneficial technical effects: 1. By constructing a closed-loop control flow of "detection-analysis-adjustment-verification", the traditional manual parameter tuning process that relies on the experience of technical personnel is transformed into a fully automated iterative process. Under this framework, a multi-parameter collaborative calibration process from zero position, gain / phase to excitation amplitude is integrated. Finally, the full-range accuracy is ensured through a post-verification optimization mechanism. This reduces the parameter tuning time of a single sensor from tens of minutes of traditional manual operation to minutes, while completely avoiding human-introduced errors. This greatly ensures the consistency of output performance of products in the same batch and can fully meet the needs of industrial mass production. 2. An algorithm based on multi-point sampling and ellipse fitting is adopted, which can accurately calculate the inherent gain error and orthogonality phase error of the sensor. Combined with zero-point deviation and excitation amplitude deviation, a complete error model is formed. Then, a sophisticated real-time compensation algorithm is used to coordinately correct all error sources. Finally, the calibration verification and parameter re-optimization are combined to ensure that the sensor can maintain high linearity and low angle calculation error throughout its entire measurement range. Its comprehensive calibration accuracy and reliability far exceed those of traditional single-point or static calibration methods. 3. Going beyond the scope of software compensation in pure signal processing, it creatively combines adaptive control algorithms with precision mechanical actuators. It can directly drive the worm gear mechanism to adjust the mechanical zero position and change the relative spatial position of internal components through the fine-tuning mechanism to correct the sensitivity, realizing the precise mapping and adjustment from electrical parameters to physical position. Furthermore, it introduces environmental perception and dynamic compensation mechanisms, enabling the parameter adjustment process to respond in real time to environmental disturbances such as temperature and magnetic fields. This not only compensates for parameter drift caused by mechanical aging and assembly stress at the source, but also significantly improves the long-term stability and anti-interference capability of the sensor in complex industrial environments. Attached Figure Description
[0019] Figure 1 This is a flowchart of the automatic parameter adjustment and testing method for an electromagnetic angular displacement sensor provided in an embodiment of the present invention; Figure 2 This is a schematic diagram of the automatic parameter adjustment and testing device for an electromagnetic angular displacement sensor provided in an embodiment of the present invention.
[0020] 1. Top plate, 2. Stator adapter plate, 3. Stator housing, 4. Rotor housing, 5. Rotor adapter plate, 6. Zero-position adjustment assembly, 7. Actuator, 8. Sensitivity fine-tuning knob, 9. Adapter plate, 10. Base plate, 11. Stud, 12. Test interface module, 13. Feedback calibration module, 14. Main control module, 15. Dedicated interface. Detailed Implementation
[0021] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to specific embodiments and the accompanying drawings. It should be understood that these descriptions are merely exemplary and not intended to limit the scope of the invention. Furthermore, descriptions of well-known structures and techniques are omitted in the following description to avoid unnecessarily obscuring the concept of the invention.
[0022] Please refer to Figure 1 The first aspect of this invention provides an automatic parameter adjustment and testing method for an electromagnetic angular displacement sensor, comprising the following steps: Step S100: Inject a standard angle signal into the sensor under test and collect the output response signal of the sensor under test.
[0023] The testing system positions the sensor rotor to a specific angular reference using a precise angle positioning mechanism, while a standard signal source injects a corresponding standard angle excitation signal into the sensor. In practice, the test interface module establishes an electrical connection between the sensor and the testing system, and the high-precision data acquisition unit synchronously acquires the raw voltage signals from the sensor's sine and cosine channels. This step ensures that the testing system can obtain accurate response characteristics of the sensor at a known angular position, providing a reliable data foundation for subsequent parameter analysis.
[0024] Step S200: Based on the output response signal and the standard angle signal, calculate the deviation of the sensor parameters and determine whether the deviation exceeds a preset threshold.
[0025] The acquired sensor output signals undergo multi-dimensional analysis and processing. First, by positioning the rotor to its mechanical zero point, multiple sets of raw sine and cosine signals are acquired, and their average values are calculated and compared with the ideal output value to obtain the zero-position deviation. Then, the rotor is sequentially positioned to multiple preset angular positions, and signals after zero-position compensation are acquired. Gain error and orthogonality phase error are then solved using an ellipse fitting algorithm. Finally, the excitation signal amplitude deviation is verified at specific angular positions. Based on these parameter deviations, the system performs a comprehensive evaluation. The comprehensive deviation is obtained by calculating the difference between the measured angle and the actual angle of the sensor, and compared with a preset threshold to accurately determine the sensor's state.
[0026] In step S300, if the deviation exceeds the limit, an adaptive control algorithm is used to generate control commands for zero position, sensitivity and excitation signal amplitude compensation, and to adjust the mechanical zero position or the relative position of the internal electromechanical conversion element of the sensor under test.
[0027] When the deviation exceeds a threshold, the system activates a multi-channel collaborative control mechanism. Based on the zero-position deviation, the zero-position compensation angle is calculated using the arctangent function, generating a first control command to drive the worm gear mechanism to adjust the mechanical position of the shaft. Based on the gain correction factor and phase compensation angle, the target displacement is calculated through weighted summation, generating a second control command to drive the fine-tuning mechanism to change the relative positions of internal components. Based on the excitation signal amplitude deviation, a third control command is generated using an adaptive control algorithm to adjust the excitation source output. These three control channels work independently yet collaboratively to achieve comprehensive optimization of sensor parameters.
[0028] In step S400, based on the adjusted output response signal, steps S200 to S300 are repeated to iteratively update the sensor parameters.
[0029] In the iterative optimization phase, the sensor output signal is re-acquired after each parameter adjustment, and the deviation calculation and parameter adjustment process is repeated. This iterative process employs a closed-loop control strategy, using a continuous "detection-analysis-adjustment" cycle to gradually converge the sensor parameters to their optimal state. In each iteration, the system dynamically updates the compensation parameters based on real-time acquired data, ensuring the correct direction and optimal efficiency of the calibration process.
[0030] In step S500, when the deviation is lower than the preset threshold, it is determined that the output accuracy of the sensor under test meets the preset requirements, and the current sensor parameters are saved to complete the parameter adjustment process of the sensor under test.
[0031] When the system detects that the deviation is consistently below the preset threshold, it determines that the sensor has met the target accuracy requirements. At this point, the system performs a parameter saving operation, writing the final parameter set obtained after multiple rounds of optimization, including zero-point compensation value, gain correction factor, phase compensation angle, and excitation source control parameters, into the sensor's non-volatile memory. After saving the parameters, the system exits the calibration mode, and the sensor can be put into normal use or enter the next production stage, completing the entire automatic parameter adjustment and testing process.
[0032] By establishing a complete automated testing and calibration system, intelligent and standardized sensor parameter calibration has been achieved, significantly improving calibration accuracy and efficiency. At the same time, the reliability of calibration results is ensured through an iterative optimization mechanism, providing a solid technical foundation for the large-scale production and high-precision application of sensors.
[0033] Further, in step S200, calculating the deviation of the sensor parameters based on the output response signal and the standard angle signal includes: Step S210: Position the rotor of the sensor under test to the mechanical zero point, collect multiple sets of original values of sine and cosine signals, calculate their average value and compare it with the ideal output value of the mechanical zero point to obtain the sine zero position deviation and cosine zero position deviation.
[0034] At the beginning of the calibration process, the test system precisely adjusts the sensor rotor to the mechanical zero reference point using a high-precision positioning mechanism. After stabilization at this position, the data acquisition system continuously acquires 100 sets of raw voltage signals from the sine and cosine channels at a sampling frequency of 1kHz, calculating the average value of each channel signal to eliminate the influence of random noise. The calculated average value of the sine signal, Sin... avg And the average value of the cosine signal Cos avg The value is compared with the ideal output value corresponding to the mechanical zero position, where the ideal output value is determined according to the sensor design specifications and is usually set to Sin. ideal =0V, Cos ideal =+5V. The sinusoidal zero-position deviation Sin is obtained through difference calculation. err =Sin ideal -Sin avg Cosine zero deviation err =Cos ideal -Cos avg These two parameters will be stored in a temporary register as the basis for subsequent signal compensation. This step ensures the accuracy of the sensor's output signal at the reference position, establishing a reliable reference benchmark for subsequent calibration.
[0035] Step S220: Position the rotor sequentially to multiple preset angle positions, and collect the sine compensation signal and cosine compensation signal after zero position deviation compensation at each preset angle position. Based on the compensation signals of all positions, obtain the model parameters characterizing the sensor gain error and orthogonality phase error through elliptic fitting.
[0036] After zero-position calibration, the test system controls the positioning mechanism to sequentially drive the rotor to four key angular positions: 0°, 90°, 180°, and 270°. The rotor remains stably positioned for 500ms at each angular position, during which time the sinusoidal compensated signal (Sin) after zero-position compensation is acquired. comp Sum and cosine compensation signal Cos comp Fifty sets of data were collected from each of the four locations. Using the compensation signal datasets acquired at these four locations, an elliptic equation model was established and fitted using the least squares method. The sinusoidal channel gain coefficient K was obtained by solving the elliptic fitting algorithm. sin Cosine channel gain coefficient K cos And the actual phase angle φ between the two channels. Based on these parameters, the sinusoidal channel gain correction factor Gain is further calculated. sin =1 / K sin Cosine channel gain correction factor Gain cos =1 / K cos and phase compensation angle φ comp=90°-φ. These model parameters fully characterize the sensor's gain matching characteristics and orthogonality error, providing an accurate mathematical basis for sensitivity correction.
[0037] Step S230: Position the rotor to the preset amplitude calibration angle position, collect the sine verification signal and cosine verification signal after zero position deviation and model parameter compensation, calculate the synthesized vector amplitude and compare its average value with the preset ideal amplitude to obtain the excitation signal amplitude deviation.
[0038] After completing zero-position and gain phase calibration, the system positions the rotor at a 45° amplitude calibration angle. This angle was chosen because the ideal amplitudes of the sine and cosine signals are equal at this angle, facilitating excitation signal amplitude evaluation. At this position, a sinusoidal verification signal (Sin) after double compensation for zero-position deviation and model parameters is acquired. verify Cosine verification signal verify Calculate the magnitude of the composite vector Mag = √(Sin verify ²+Cos verify ²). 30 sets of amplitude data were continuously collected and the average value Mag was calculated. avg Compare it with the ideal amplitude V specified in the sensor design specifications. desired A comparison is performed. The amplitude deviation Mag of the excitation signal is calculated through the difference. err =V desired -Mag avg This parameter reflects the degree of deviation between the output amplitude of the sensor excitation source and the expected value, providing an accurate adjustment basis for excitation source calibration.
[0039] Step S240: Based on the zero-position deviation, model parameters and excitation signal amplitude deviation, perform real-time compensation and angle calculation on the sensor output to obtain the actual measured angle value of the sensor.
[0040] During actual angle measurement, the system acquires the original sinusoidal signal value Sin from the sensor in real time. raw The original value of the cosine signal Cos raw First, zero-position compensation is performed, and Sin is calculated. comp =Sin raw -Sin err and Cos comp =Cos raw -Cos err Next, gain matching compensation is performed, and Sin is calculated. gain =Sin comp ×Gain sin and Cos gain =Cos comp ×Gain cosThen, orthogonality compensation is performed, phase error is eliminated through a coordinate rotation algorithm, and the final compensated sinusoidal signal value Sin is calculated. final Sum of cosine signal values Cos final This series of signal processing steps ensures the accuracy of the sensor output signal in terms of zero position, gain, and orthogonality, providing high-quality input data for precise angle calculation.
[0041] Step S250: Calculate the difference between the actual angle value measured by the sensor and the actual angle value corresponding to the standard angle signal to obtain the deviation.
[0042] After completing all signal compensations, the system is based on the final compensated sinusoidal signal value Sin final Sum of cosine signal values Cos final The measured angle value θ of the sensor is obtained by calculating the arctangent function in the four quadrants. measured =arctan2(Sin final Cos final Simultaneously, the actual angular position θ of the rotor is obtained from the positioning mechanism. actual Use this as a standard reference value. Calculate the angular deviation Δθ = θ between the two. actual -θ measured This deviation comprehensively reflects the overall accuracy level of the sensor after calibration with the current parameters. The system compares this deviation with a preset accuracy threshold as the final basis for determining whether the calibration is complete, and also provides guidance for subsequent iterative optimization.
[0043] Further, in step S220, the compensation signals based on all locations are used to obtain model parameters characterizing the sensor gain error and orthogonality phase error through elliptic fitting, including: Step S221: Establish an elliptic equation model with sine compensation signal and cosine compensation signal as variables. The elliptic equation model includes the sine channel gain coefficient, the cosine channel gain coefficient, and the actual phase angle between the two channels.
[0044] An elliptic equation mathematical model is established based on the working principle of an electromagnetic angular displacement sensor. This model uses the sinusoidal and cosine compensation signals after zero-position compensation as input variables. The model structure includes three key parameters: the sinusoidal channel gain coefficient K. sin Cosine channel gain coefficient K cosAnd the actual phase angle φ between the two channels. Ideally, the gain coefficient of the two channels should be 1, and the phase angle should be 90 degrees. However, due to differences in manufacturing processes and material properties, these parameters deviate from the ideal values in actual sensors, causing the acquired signals to exhibit an elliptical distribution in the coordinate system rather than a standard circle. This elliptical equation accurately describes the amplitude ratio and phase orthogonality of the two output signals under actual working conditions, providing a complete mathematical framework for subsequent parameter solving.
[0045] Step S222: The sine compensation signal values and cosine compensation signal values collected at multiple preset angle positions are used as the observation dataset and substituted into the elliptic equation model.
[0046] The sensor rotor was sequentially and precisely positioned at four standard angular locations: 0°, 90°, 180°, and 270°. After stabilization at each location, sinusoidal and cosine-compensated signal values, processed with zero-position compensation, were acquired. These four locations were chosen to best reflect the sensor's gain and phase characteristics. Fifty sets of data were collected at each location, and the average was taken to eliminate random errors. The data collected at all locations constituted an observation dataset containing complete output characteristic information of the sensor at different angular positions. The system substituted this dataset into a pre-established elliptic equation model to prepare sufficient and reliable experimental data for subsequent parameter solving.
[0047] Step S223: Use the least squares method to perform elliptic fitting on the observation dataset and calculate the numerical solutions for the sine channel gain coefficient, cosine channel gain coefficient, and actual phase angle.
[0048] The least squares method is used to perform ellipse fitting calculations on the observation dataset. This algorithm solves for the optimal model parameters by minimizing the sum of squared residuals between the observation data and the ellipse model. Specifically, the algorithm iteratively adjusts the sinusoidal channel gain coefficient K during the calculation process. sin Cosine channel gain coefficient K cos The numerical values of the actual phase angle φ are used to achieve the best match between the elliptical model and the observation data collected at the four angular positions. The entire fitting process is implemented through matrix operations and parameter optimization algorithms, ultimately obtaining the optimal numerical solutions for the three parameters. These numerical solutions accurately quantify the degree of gain mismatch and the magnitude of phase deviation of the sensor under actual operating conditions.
[0049] Step S224: Calculate the reciprocals of the sine channel gain coefficient and the cosine channel gain coefficient respectively as the sine channel gain correction factor and the cosine channel gain correction factor.
[0050] The sinusoidal channel gain coefficient K obtained by the least squares method sin Cosine channel gain coefficient K cosThe system calculates their reciprocals as the corresponding gain correction factors. The specific calculation process is as follows: Sine channel gain correction factor Gain sin =1 / K sin Cosine channel gain correction factor Gain cos =1 / K cos These correction factors will be used to compensate for the gain of the sensor output signal in subsequent signal processing. When the sensor output signal is multiplied by the corresponding gain correction factor, the difference in signal amplitude caused by the gain mismatch between the two channels can be effectively eliminated, so that the two signals achieve a matching state in amplitude.
[0051] Step S225: Calculate the difference between the ideal orthogonal phase angle and the actual phase angle of the sensor to obtain the phase compensation angle.
[0052] The actual phase angle φ obtained by the least squares method is compared with the ideal orthogonal phase angle of the sensor. In the design of electromagnetic angular displacement sensors, the ideal orthogonal phase angle is fixed at 90 degrees, which corresponds to the ideal state where the two output signals are completely orthogonal. The system calculates the difference between the actual phase angle and the ideal value to obtain the phase compensation angle φ. comp =90°-φ. This phase compensation angle accurately reflects the magnitude and direction of the phase deviation between the two output signals of the sensor. In subsequent signal processing, it will be used to perform phase compensation on the output signal to restore the orthogonality of the two signals.
[0053] Step S226: The sine channel gain correction factor, cosine channel gain correction factor, and phase compensation angle are used together as model parameters for signal compensation.
[0054] The calculated sine channel gain correction factor, cosine channel gain correction factor, and phase compensation angle are integrated to form a complete parameter set for the sensor error compensation model. These parameters, including the gain correction factor Gain, are stored in the system's non-volatile memory in the form of a data structure. sin and Gain cos Each occupies 4 bytes of floating-point data, with a phase compensation angle φ. comp It occupies 4 bytes of floating-point data. In the normal operating mode of the sensor, the system calls these model parameters in real time to compensate for the raw output signal, ensuring that the sensor maintains high-precision angle output throughout the entire measurement range.
[0055] Further, in step S240, the sensor output is compensated in real time and the angle is calculated based on the zero-position deviation, model parameters, and excitation signal amplitude deviation to obtain the measured angle value of the sensor, including: Step S241: Subtract the sine zero-position deviation and cosine zero-position deviation from the currently acquired original values of the sine signal and cosine signal, respectively, to obtain the sine compensation signal and cosine compensation signal.
[0056] Under normal sensor operation, the system acquires the original sinusoidal channel signal Sin in real time at a sampling frequency of 10kHz. raw The original signal Cosine channel raw These raw signals first enter the zero-point compensation stage, where the system reads the pre-calibrated sinusoidal zero-point deviation Sin from the parameter memory. err Cosine zero deviation err The compensation process uses direct subtraction to calculate the zero-position compensated sine signal Sin. comp =Sin raw -Sin err Sum of cosine signals Cos comp =Cos raw -Cos err In practice, this compensation operation is implemented through the arithmetic logic unit of a digital signal processor, performing two subtraction operations within each sampling period. For example, when the acquired original signal Sin raw =0.15V, Cos raw =4.92V, while the stored zero-point deviation Sin err =0.12V, Cos err When =0.08V, after compensation, Sin is obtained. comp =0.03V, Cos comp =4.84V. This compensation process effectively eliminates DC bias errors caused by factors such as sensor installation deviation and temperature drift, laying an accurate foundation for subsequent gain and phase compensation.
[0057] Step S242: Multiply the sine compensation signal by the sine channel gain correction factor, and multiply the cosine compensation signal by the cosine channel gain correction factor to perform gain matching compensation.
[0058] The signal after zero-position compensation immediately enters the gain matching compensation stage. The system reads the sinusoidal channel gain correction factor Gain from the model parameter memory. sin and cosine channel gain correction factor Gain cos These parameters were determined during the initial ellipse fitting calibration process. Gain compensation was achieved through multiplication operations, yielding the gain-matched sine signal Sin. gain =Sin comp ×Gain sin Sum of cosine signals Cos gain =Cos comp ×Gaincos In practical applications, let's assume Gain sin =1.05, Gain cos =0.98, then Sin gain =0.03×1.05=0.0315V, Cos gain =4.84 × 0.98 = 4.7432V. This step effectively corrects the gain mismatch between the two channels caused by differences in component parameters and asymmetry in signal conditioning circuits, ensuring the consistency of amplitude between the two signals. All multiplication operations are implemented through the hardware multiplier of the digital signal processor, ensuring the real-time performance and accuracy of the calculations.
[0059] Step S243: Use the phase compensation angle to perform coordinate rotation correction on the sine and cosine signals after gain matching compensation, eliminate orthogonal phase error, and obtain the final compensated sine and cosine signal values.
[0060] The signal after gain matching then enters the orthogonal phase compensation stage. The system reads the phase compensation angle φ stored in the parameter memory. comp This parameter reflects the degree to which the actual phase of the two output signals of the sensor deviates from the ideal orthogonal state. The compensation process uses a coordinate rotation algorithm, which constructs a rotation matrix to perform a linear transformation on the two signals after gain matching. The specific calculation process is as follows: the final compensated sinusoidal signal value Sin final =Sin gain ×cos(φ comp )+Cos gain ×sin(φ comp The final compensated cosine signal value Cos final =Cos gain ×cos(φ comp )-Sin gain ×sin(φ comp For example, when φ comp When the angle is 2°, we calculate cos(2°) = 0.9994 and sin(2°) = 0.0349. Substituting these values into the formula, we get Sin... final =0.0315×0.9994+4.7432×0.0349=0.0315+0.1655=0.1970V, Cos final =4.7432×0.9994-0.0315×0.0349=4.7407-0.0011=4.7396V. This compensation process effectively eliminates the orthogonality error caused by factors such as asymmetric electromagnetic coupling inside the sensor and differences in signal transmission delay, restoring the strict orthogonality characteristics of the two signals.
[0061] Step S244: Perform a four-quadrant arctangent operation on the final compensated sine signal value and cosine signal value to obtain the actual measured angle value of the sensor.
[0062] After completing all signal compensations, the system calculates the final compensated sine signal value Sin_final and cosine signal value Cos_final. final Performing arctangent calculations in the four quadrants yields the measured angle value θ = arctan2(Sin final Cos final The four-quadrant arctangent function can correctly determine the quadrant of an angle based on the signs of two input signals, and outputs a continuous angle value ranging from -180° to +180°. For example, when Sin final =0.1970V, Cos final When the voltage is 4.7396V, the calculated angle value θ = arctan2(0.1970, 4.7396) = 2.38° is obtained. This calculation is achieved through a lookup table combined with linear interpolation, ensuring the accuracy and real-time performance of the angle calculation. In actual implementation, a pre-stored 1024-point lookup table is used, combined with the fast computing power of the digital signal processor, to complete the angle calculation within each sampling period, providing accurate angle position information for the real-time control system.
[0063] Further, in step S300, based on the deviation, an adaptive control algorithm generates control commands for zero-point, sensitivity, and excitation signal amplitude compensation, adjusting the mechanical zero point or the relative position of the internal electromechanical conversion element of the sensor under test, including: Step S310: Based on the sine zero-position deviation and cosine zero-position deviation corresponding to the deviation amount, calculate the zero-position compensation angle required for the sensor shaft, generate a first control command, and adjust the mechanical angular position of the shaft according to the first control command.
[0064] Based on the sinusoidal zero-point deviation Sin obtained during the calibration process err Cosine zero deviation err The required zero-position compensation angle θ of the sensor shaft is calculated using the arctangent function. comp =arctan(Sin err / Cos errThe calculation process is implemented through a dedicated computing unit of a digital signal processor, ensuring a calculation accuracy of 0.01 degrees. The calculated zero-position compensation angle is compared with a preset angle deviation threshold. When the threshold is exceeded, the system generates a first control command based on the magnitude and direction of the compensation angle. This command includes the motor rotation direction, target angle, and motion speed parameters, and is sent to the motor driver via the RS485 communication protocol. The driver controls the stepper motor to operate according to the command, converting the motor's rotational motion into precise angular adjustment of the shaft through a worm gear transmission mechanism with a reduction ratio of 50:1. For example, when the calculated zero-position compensation angle is 0.5 degrees, the system controls the motor to rotate 25 degrees, achieving a precise 0.5-degree adjustment of the shaft after reduction via the worm gear. The entire adjustment process is fed back in real time by a photoelectric encoder mounted on the shaft, ensuring the accuracy and reliability of the mechanical zero-position adjustment.
[0065] Step S320: Based on the sine channel gain correction factor, cosine channel gain correction factor and phase compensation angle corresponding to the deviation, a second control command is generated. The relative spatial position between the sensing element inside the sensor and the electromagnetic excitation source is adjusted according to the second control command to complete the sensitivity correction.
[0066] Gain, a sinusoidal channel gain correction factor obtained based on elliptic fitting. sin Cosine channel gain correction factor Gain cos and phase compensation angle φ comp The system generates a second control command through a specific control algorithm. First, the system calculates the difference between the gain correction factor and the ideal gain value to obtain the gain adjustment amount ΔGain. sin =Gain sin -1 and ΔGain cos =Gain cos -1. Simultaneously, the phase compensation angle is converted into a phase adjustment amount Δφ=φ comp Then, the system performs a weighted sum of the three adjustment values according to preset weighting coefficients to calculate the target displacement D of the fine-tuning mechanism: D = w1 × ΔGain. sin +w2×ΔGain cos +w3×Δφ, where the weighting coefficients w1, w2, and w3 are pre-calibrated according to the specific structural characteristics of the sensor. The displacement direction is determined based on the relative magnitudes of the two gain correction factors. sin Gain cos The first control command moves the target displacement in the forward direction and the second control command moves it in the reverse direction. The second control command converts the target displacement into the number of drive pulses and the direction signal of the fine-tuning stepper motor. The pulse drive circuit controls the fine-tuning mechanism to change the relative distance between the induction coil and the permanent magnet inside the sensor, thereby adjusting the electromagnetic coupling strength and achieving precise correction of the sensitivity parameters.
[0067] Step S330: Based on the amplitude deviation of the excitation signal corresponding to the deviation, a third control command is generated, and the output code value of the digital-to-analog converter or the duty cycle of the pulse width modulation signal is adjusted according to the third control command to optimize the output amplitude of the sensor excitation source.
[0068] Based on the amplitude deviation of the excitation signal Mag err The system generates a third control command through an adaptive PID control algorithm. Based on the magnitude and trend of the amplitude deviation, the control algorithm calculates the adjustment amount of the excitation source control parameters in real time. This adjustment amount is converted into the corresponding output voltage via a digital-to-analog converter (DAC), or the output amplitude of the excitation source is adjusted by changing the duty cycle of the pulse width modulation (PWM) signal. In specific implementation, the system uses a 16-bit DAC with an output range of 0-5V, corresponding to control code values of 0-65535. When an excitation signal amplitude deviation of +0.1V is detected, the control algorithm calculates that the DAC code value needs to be reduced by 1310 steps, correspondingly lowering the excitation source output voltage. After adjustment, the system re-acquires the sensor output signal to verify whether the excitation signal amplitude deviation is less than the preset amplitude verification threshold (usually set to 0.01V). If the requirement is not met, the system will continue iterative adjustment until the excitation signal amplitude stabilizes within the target range. The entire adjustment process is implemented through closed-loop control to ensure the accuracy and stability of the excitation source output amplitude.
[0069] This invention achieves fully automated adjustment of key sensor parameters. The first control command ensures precise calibration of the mechanical zero point, the second control command enables fine-tuning of sensitivity, and the third control command guarantees the optimal operating point of the excitation signal. These three control channels work together to ensure the sensor operates under optimal parameter conditions, significantly improving the sensor's measurement accuracy and long-term stability, while greatly reducing the time cost and skill requirements of manual parameter adjustment, providing a reliable technical guarantee for the large-scale standardized production of sensors.
[0070] Further, in step S310, based on the sinusoidal and cosine zero-position deviations corresponding to the deviation amount, the required zero-position compensation angle for the sensor shaft is calculated, and a first control command is generated, including: Step S311: Based on the sine zero-position deviation and the cosine zero-position deviation, the zero-position compensation angle estimate of the sensor shaft is calculated using the arctangent function.
[0071] Based on the sinusoidal zero-position deviation Sin obtained from previous calibration err Cosine zero deviation err The zero-position compensation angle estimate of the sensor shaft is calculated using the four-quadrant arctangent function. The specific calculation process is as follows: θ comp_est =arctan2(Sin err Cos errThe arctan2 function automatically determines the quadrant of the angle based on the signs of the two deviation values, ensuring the calculation result is within the range of -180° to +180°. In practical implementation, assuming the measured Sin... err =0.12V, Cos err =-0.08V, then θ is calculated. comp_est =arctan2(0.12,-0.08)=123.69°. This calculation is performed using a dedicated mathematical coprocessor built into the digital signal processor, employing a lookup table method combined with a linear interpolation algorithm to ensure an angle calculation accuracy of 0.01 degrees. The calculation process also includes an outlier detection mechanism; when the input deviation value exceeds a reasonable range, the system automatically flags it and initiates a recalibration process.
[0072] Step S312: Determine whether the absolute value of the zero-position compensation angle estimate exceeds the preset angle deviation threshold.
[0073] The absolute value of the calculated zero-position compensation angle estimate is compared with a preset angle deviation threshold. The angle deviation threshold is preset based on the sensor's accuracy level and application requirements, typically ranging from 0.1° to 0.5°. For example, in high-precision applications, the threshold is set to 0.1°; in general industrial applications, it can be set to 0.3°. The comparison process is implemented using a comparator circuit. When |θ... comp_est |>θ threshold When the signal is high, the system outputs a high level to trigger subsequent processing. Simultaneously, the system records historical adjustment data and optimizes threshold settings through statistical analysis to ensure the accuracy and adaptability of adjustment decisions. In actual operation, the system performs a judgment operation every 5 milliseconds to ensure real-time response to changes in sensor status.
[0074] Step S313: If the preset angle deviation threshold is exceeded, the zero-position compensation angle estimate is used as the zero-position compensation angle required for the sensor shaft.
[0075] When the absolute value of the zero-position compensation angle estimate exceeds a preset threshold, the system uses the calculated estimate as the valid zero-position compensation angle. This angle value undergoes digital filtering, employing a first-order inertial filtering algorithm to eliminate random interference. The filtering time constant is set to 100 milliseconds based on the sensor's dynamic characteristics. The processed zero-position compensation angle θ comp The angle value is stored in the system register as a 32-bit floating-point number and simultaneously backed up to a specific address area of non-volatile memory. The system also performs a validity check on the angle value to ensure it is within the adjustment range allowed by the sensor's mechanical structure (typically ±5°). If an abnormal angle value is detected, the system will abort the adjustment process and issue a fault alarm signal, prompting the operator to perform inspection and maintenance.
[0076] Step S314: Convert the zero-position compensation angle into a first control command for the drive actuator to adjust the mechanical angular position of the rotating shaft.
[0077] The determined zero-position compensation angle is converted into specific control commands for the drive actuator. The conversion process first calculates the target angle θ that the motor needs to rotate based on the reduction ratio of the worm gear transmission mechanism (e.g., 50:1). motor =θ comp ×50. Then, convert the target angle into the number of stepper motor drive pulses. Assuming the stepper motor step angle is 1.8° and the microstepping driver is set to 16 microsteps, each pulse corresponds to a rotation angle of 0.1125°. The required number of pulses N pulse =θ motor / 0.1125. The control command, including the number of pulses, pulse frequency, and rotation direction, is sent to the driver via a dedicated motor control interface. For example, when θ comp When θ = 0.5°, θ is calculated. motor =25°, approximately 222 pulses need to be sent. Command transmission uses differential signaling to ensure interference resistance and transmission reliability in industrial environments.
[0078] By calculating mechanical compensation amounts based on electrical signal deviations and then converting them into specific control commands for the actuators, a complete closed loop from signal sensing to mechanical adjustment is achieved. This digital adjustment method not only improves the accuracy and efficiency of zero-point calibration but also significantly reduces the need for manual intervention through automated judgment and execution processes. This provides crucial technical support for the large-scale production and high-precision applications of sensors, ensuring that sensors maintain optimal measurement performance throughout their entire lifecycle.
[0079] Further, in step S320, based on the sine channel gain correction factor, cosine channel gain correction factor, and phase compensation angle corresponding to the deviation, a second control command is generated, including: Step S321: The difference between the sine channel gain correction factor and the unity gain value is used as the first gain adjustment amount, and the difference between the cosine channel gain correction factor and the unity gain value is used as the second gain adjustment amount.
[0080] The system reads the sinusoidal channel gain correction factor Gain, obtained through elliptic fitting calibration, from the parameter memory. sin and cosine channel gain correction factor Gain cos These parameters are then compared and calculated with the unity-gain reference value. The specific calculation process is as follows: First gain adjustment ΔGain sin =Gain sin -1.0, second gain adjustment ΔGain cos =Gain cos-1.0. For example, when the Gain obtained through calibration... sin =1.05, Gain cos When ΔGain = 0.98, the calculated ΔGain sin =+0.05, ΔGain cos =-0.02. These gain adjustments accurately reflect the degree of deviation of the two channels from the ideal gain state. Positive values indicate that the gain is too high and needs to be reduced, while negative values indicate that the gain is insufficient and needs to be increased. The calculation process is implemented through the floating-point unit of the digital signal processor, ensuring a calculation accuracy of 0.001. The system also performs range checks on these adjustments to ensure that they are within the adjustment range allowed by the sensor structure.
[0081] Step S322: Use the absolute value of the phase compensation angle as the phase adjustment amount.
[0082] The system reads the phase compensation angle φ comp This parameter is the difference between the actual phase angle of the sensor and the ideal orthogonal phase angle, calculated during the ellipse fitting process. To facilitate subsequent control calculations, the system uses the absolute value of the phase compensation angle as the phase adjustment amount, i.e., Δφ = |φ comp |. For example, when φ comp When the angle is -2.5°, the phase adjustment Δφ = 2.5°. This ensures that the phase adjustment is always positive, facilitating unified processing with the gain adjustment. The system also records the original sign information of the phase compensation angle for subsequent adjustment direction determination. The phase adjustment is calculated using absolute value instructions, and the processed value is stored in a specific data register for subsequent weighted sum calculations.
[0083] Step S323: Calculate the target displacement based on the weighted sum of the first gain adjustment, the second gain adjustment, and the phase adjustment.
[0084] The target displacement of the fine-tuning mechanism is calculated by weighting and summing the three adjustment values according to preset weighting coefficients. The weighting coefficients are pre-calibrated based on the specific structural characteristics and sensitivity of the sensors, typically set to w1=0.4, w2=0.4, and w3=0.2. The formula for calculating the target displacement is: D=w1×ΔGain sin +w2×ΔGain cos +w3×Δφ. For example, when ΔGain sin =0.05, ΔGain cosWhen Δφ = -0.02 and Δφ = 2.5, the calculated D = 0.4 × 0.05 + 0.4 × (-0.02) + 0.2 × 2.5 = 0.02 - 0.008 + 0.5 = 0.512 mm. This calculation process comprehensively considers the impact of gain mismatch and phase error on the overall performance of the sensor. By weighted summation, the electrical parameter deviations are converted into a unified mechanical displacement, providing an accurate quantitative basis for subsequent mechanical adjustments.
[0085] Step S324: Determine the displacement direction based on the relationship between the magnitudes of the sine channel gain correction factor and the cosine channel gain correction factor.
[0086] The displacement direction of the fine-tuning mechanism is determined based on the relative magnitudes of the sine channel gain correction factor and the cosine channel gain correction factor. The judgment rule is: when Gain... sin Gain cos When Gain is reached, the displacement direction is set to positive; when Gain is reached... sin <Gain cos When the gain is equal to the loss, the displacement direction is set to the opposite direction; when the two are equal, the current position is maintained. For example, when gain is equal to the loss... sin =1.05, Gain cos When the value is 0.98, since 1.05 > 0.98, the system determines the displacement direction to be positive. This judgment logic is based on the physical characteristics of electromagnetic coupling inside the sensor; positive movement enhances the sensitivity of the cosine channel, and negative movement enhances the sensitivity of the sine channel. The direction signal is stored in the control register in the form of a digital quantity, with one bit representing the direction state: 0 for negative and 1 for positive.
[0087] Step S325: The target displacement and displacement direction are converted into a second control command to drive the actuator to adjust the relative spatial position of the sensor's internal sensing element and the electromagnetic excitation source.
[0088] The calculated target displacement and determined displacement direction are converted into specific second control commands. The conversion process first converts the target displacement into the number of drive pulses required for the fine-tuning stepper motor. Assuming the transmission accuracy of the fine-tuning mechanism is 0.001 mm / pulse, the number of pulses N = D / 0.001. For example, when D = 0.512 mm, 512 drive pulses are required. The control command consists of three main parts: the number of pulses (16-bit unsigned integer), the pulse frequency (determining the movement speed), and the direction signal (1-bit Boolean value). These command parameters are sent to the driver of the fine-tuning mechanism via a dedicated motor control interface using a specific communication protocol. The driver precisely controls the movement of the stepper motor according to the commands, thereby adjusting the relative distance between the sensor's internal induction coil and the permanent magnet, achieving precise correction of the sensor's sensitivity.
[0089] Through the systematic implementation of these five steps, this invention establishes a precise automatic sensor sensitivity adjustment mechanism. This mechanism converts electrical parameter deviations into mechanical displacements using a weighted algorithm, and then adjusts the relative positions of internal sensor components via a precise actuator. This effectively solves the problems of traditional methods that rely on manual experience for sensitivity calibration and suffer from low adjustment accuracy. This digital sensitivity calibration method not only improves the accuracy and consistency of calibration but also significantly enhances calibration efficiency through automated control processes, providing reliable technical support for the large-scale production and high-precision applications of sensors.
[0090] Further, in step S330, a third control command is generated based on the amplitude deviation of the excitation signal corresponding to the deviation amount, including: Step S331: Input the amplitude deviation of the excitation signal into the adaptive control algorithm to calculate the adjustment amount of the excitation source control parameters.
[0091] The amplitude deviation of the excitation signal Mag err The input is processed by an adaptive proportional-integral-derivative (PID) controller. This controller adjusts the control parameters in real time based on the magnitude and trend of the deviation. The proportional term provides a fast response, the integral term eliminates steady-state error, and the derivative term suppresses overshoot oscillations. The specific calculation process is as follows: Control parameter adjustment ΔP = K p ×Mag err +K i ×∫Mag err dt+K d ×d(Mag err ) / dt, where K p K i K d These are the proportional, integral, and derivative coefficients, which are tuned online based on the system's dynamic response characteristics. For example, when Mag is detected... err When the voltage is +0.15V, the controller outputs a control parameter adjustment ΔP = -320 in real time. This adjustment reflects the degree to which the excitation source output needs to be reduced. The calculation is performed in a digital signal processor, using 32-bit floating-point arithmetic to ensure calculation accuracy, and includes an anti-saturation mechanism to prevent integral term overflow.
[0092] Step S332: Map the adjustment amount to the corresponding digital-to-analog converter output code value or pulse width modulation signal duty cycle.
[0093] The control parameter adjustment is mapped to a specific actuator control signal. For digital-to-analog converter (DAC) control, the adjustment is converted into the corresponding output code value through a linear mapping relationship. Assuming the DAC has a 16-bit resolution and an output range of 0-5V, the code value adjustment ΔCode = ΔP × (65535 / 5000). For example, when ΔP = -320, ΔCode = -4194 is calculated, and the new output code value is New. Code =Current Code +ΔCode. For pulse width modulation (PWM) control, the adjustment amount is converted into a duty cycle change. Assuming the PWM reference frequency is 100kHz, the duty cycle adjustment ΔDuty = ΔP × (100 / 4096)%. The mapping process includes amplitude limiting to ensure that the output value is always within the allowable operating range and to prevent damage to the sensor components due to over-adjustment.
[0094] Step S333: Generate a third control command based on the mapping result and output the third control command to the excitation source drive circuit.
[0095] Based on the mapping result, a complete third control instruction is generated. This instruction includes parameters such as the target code value or target duty cycle, adjustment rate, and effective time. The instruction is encapsulated using the standard Modbus RTU communication protocol and includes the device address, function code, data field, and checksum. For example, the control instruction format is: 010600200FA0CRC, where 01 is the device address, 06 is the write function code for a single register, 0020 is the register address, 0FA0 is the target code value, and CRC is the cyclic redundancy check code. The instruction is sent to the excitation source driver circuit via the RS485 bus. After receiving the instruction, the driver circuit parses and executes it, adjusting the output voltage or current of the excitation source in real time. The system simultaneously monitors the instruction execution status to ensure that the control instruction is correctly received and executed.
[0096] Step S334: Acquire the adjusted sensor output signal and verify whether the amplitude deviation of the excitation signal meets the requirements. If it does not meet the requirements, repeat the above steps until the deviation reaches the preset range.
[0097] After adjusting the excitation source, the system re-acquires the sensor output signal for verification. The verification process includes: positioning the rotor at the amplitude calibration angle, acquiring multiple sets of sine and cosine verification signals, and calculating the average value Mag of the synthesized vector amplitude. avg_new and the preset ideal amplitude V desired The comparison yields a new amplitude deviation, Mag. err_new =V desired -Mag avg_new The system determines whether the new deviation meets the requirements, and the verification standard is |Mag err_new|≤0.01V. If the requirement is not met, the system will re-execute steps S331 to S334, adjusting the control parameters based on the latest deviation value in each iteration. During the iteration process, the system records the adjustment history to avoid oscillations, and sets a maximum number of iterations (usually 10) to prevent infinite loops. When the preset accuracy requirement or the maximum number of iterations is reached, the system terminates the adjustment process and saves the final parameters.
[0098] Through the systematic implementation of these four steps, this invention establishes a precise automatic calibration mechanism for excitation signals. This mechanism optimizes the output parameters of the excitation source in real time using an adaptive control algorithm, and then ensures the calibration effect through closed-loop verification, achieving precise control and rapid convergence of the excitation signal amplitude. This intelligent calibration method not only significantly improves the control accuracy and stability of the excitation signal, but also greatly reduces manual intervention through automated adjustment processes, ensuring that the sensor always operates in the optimal excitation state, providing an important guarantee for obtaining accurate and reliable measurement results.
[0099] Furthermore, after saving the current sensor parameters in step S500, the process also includes: Step S510: Move the rotor of the sensor under test sequentially to several verification angle positions that are different from the calibration point.
[0100] After calibrating and saving the main sensor parameters to memory, the post-verification optimization program is initiated. The high-precision positioning mechanism sequentially moves the sensor rotor to multiple verification angle positions different from the calibration points. These positions are typically chosen as midpoints between calibration points. For example, in addition to the four calibration points of 0°, 90°, 180°, and 270°, eight verification points are added: 30°, 60°, 120°, 150°, 210°, 240°, 300°, and 330°. The positioning accuracy of each verification point is controlled within ±0.01 degrees, and after stabilization, it is held for 500 milliseconds to ensure stable sensor output. The selection principle for verification points is to cover the entire measurement range of the sensor as much as possible, with particular attention paid to the area between calibration points, to comprehensively evaluate the sensor's accuracy performance across the entire measurement range. The system monitors the rotor position in real time through encoder feedback to ensure the accuracy of the verification angles.
[0101] In step S520, at each verification angle position, the angle is calculated using the saved sensor parameters to obtain the verification angle value.
[0102] After stabilizing at each verification angle position, the system acquires the real-time output signal of the sensor, including the raw voltage values of the sine and cosine channels. Using calibration parameters stored in memory, including zero-point deviation, gain correction factor, and phase compensation angle, the raw signal undergoes complete compensation processing. The compensation process follows a standard signal processing flow: first, zero-point compensation; then, gain matching compensation; and finally, orthogonal phase compensation. The processed signal is then used to calculate the sensor's measured angle value using a four-quadrant arctangent function. For example, at the 120° verification position, the system acquires the raw signal, applies the stored calibration parameters, and calculates the sensor's measured angle value. This process completely simulates the angle calculation process of the sensor in actual use, ensuring the verification results are accurate and reliable.
[0103] Step S530: Calculate the error between the verification angle value and the actual angle value, and determine whether all errors are less than the preset verification threshold.
[0104] The verification angle value calculated by the sensor is compared with the actual angle reference value provided by the positioning mechanism to calculate the angle error at each verification point. The error is calculated by direct subtraction: Error i =θ actual_i -θ measured_i Here, i represents the i-th verification point. The system analyzes the errors of all verification points, calculating statistical indicators such as maximum error, average error, and root mean square error. The judgment criterion is that the absolute value of the angle error of all verification points must be less than a preset verification threshold, which is set according to the accuracy level of the sensor, typically between 0.05 degrees and 0.1 degrees. If the error of any verification point exceeds the threshold, the system will mark the sensor as needing further optimization. Simultaneously, the system records complete error distribution data to provide a basis for subsequent parameter optimization.
[0105] In step S540, if an error exceeds the verification threshold, the saved sensor parameters are optimized and corrected based on the error distribution of each verification point using an interpolation algorithm.
[0106] When the error at a verification point exceeds a threshold, the system initiates a parameter optimization procedure. Based on the error distribution characteristics of each verification point, the system uses an interpolation algorithm to construct an error curve model. By analyzing the variation of error across different angle ranges, the characteristics and trends of systematic errors are identified. The optimization algorithm calculates the correction amount of the original calibration parameters according to the error distribution, with particular focus on optimizing angle ranges with larger errors. For example, if a systematic positive error occurs in the 90° to 180° range, the system will adjust the gain compensation parameter for that range accordingly. The optimization process is iterative, with re-verification after each optimization until the errors at all verification points meet the accuracy requirements. The system also ensures that the optimized parameter changes are within a reasonable range to avoid overfitting.
[0107] Step S550: Save the optimized sensor parameters back to the memory to complete the post-verification optimization of the parameters.
[0108] After parameter optimization, the system performs a parameter update operation. First, the optimized parameter set undergoes integrity verification to ensure all parameters are within valid ranges and their logical relationships are correct. Then, the optimized parameter set is written to the sensor's non-volatile memory, overwriting the original calibration parameters. A checksum mechanism is used during storage to ensure data integrity, while the previous version of the parameters is retained as a backup. The system records the timestamp of this optimization operation and the parameter changes before and after optimization, forming a complete calibration history. After the parameter update is complete, the system performs final verification, randomly selecting several verification points for rapid testing to confirm the optimization effect. Once the entire process is complete, the sensor enters standby mode, ready for normal use.
[0109] Furthermore, step S300, which generates control commands for zero-position, sensitivity, and excitation signal amplitude compensation using an adaptive control algorithm, also includes: Step S341: Real-time acquisition of environmental parameters of the test environment, including ambient temperature, external magnetic field strength and mechanical vibration frequency.
[0110] The system utilizes multi-sensor fusion technology to collect various parameters of the test environment in real time. These include a PT100 platinum resistance temperature sensor to monitor ambient temperature (range -40℃ to +85℃, accuracy ±0.1℃); a triaxial magnetoresistive sensor to detect external magnetic field strength (range ±2 Gauss, resolution 0.1 milligauss); and a MEMS accelerometer to collect mechanical vibration frequencies (range 0-2000Hz, sampling rate 10kHz). These environmental sensors synchronously collect data at 100Hz and transmit it to the main control unit via SPI bus. The system also performs digital filtering on the collected data, employing a moving average filter to eliminate transient interference and ensure the accuracy and stability of the environmental parameter data. In practice, the environmental monitoring module is installed within 50mm of the sensor under test to ensure that the monitoring data accurately reflects the sensor's operating environment.
[0111] Step S342: Input the environmental parameters into the preset environmental compensation model to obtain the influence coefficient of environmental factors on the sensor output.
[0112] The collected environmental parameters are input into a pre-defined environmental compensation model. This model, built upon extensive experimental data, employs a multiple regression algorithm to construct the mapping relationship between environmental parameters and sensor performance parameters. The environmental compensation model comprises three main sub-models: a temperature effect model describing the impact of temperature changes on sensor zero-point drift and sensitivity; a magnetic field effect model quantifying the interference of external magnetic fields on the sensor's output signal; and a vibration effect model analyzing the signal noise characteristics caused by mechanical vibration. The model output includes the zero-point temperature coefficient α. temp Sensitivity temperature coefficient β temp Magnetic field interference coefficient γ mag and vibration correction factor δ vib For example, when the ambient temperature rises from 25°C to 60°C, the model outputs α. temp =0.02mV / ℃, β temp =-0.05% / ℃, the system calculates the comprehensive impact of environmental factors on the sensor output in real time based on these coefficients.
[0113] Step S343: Dynamically correct the deviation based on the influence coefficient to obtain the deviation after environmental compensation.
[0114] Based on the influence coefficients output by the environmental compensation model, the sensor parameter deviations are dynamically corrected. The correction process employs a multi-dimensional compensation algorithm to compensate for zero-position deviation, sensitivity deviation, and excitation signal deviation respectively. For zero-position deviation, the correction formula is: Sin err_comp =Sin err ×(1+α temp ×ΔT), Cos err_comp =Cos err ×(1+α temp ×ΔT); For sensitivity deviation, the gain correction factor is corrected to: Gain sin_comp =Gain sin ×(1+β temp ×ΔT+γ mag For excitation signal deviation, the amplitude deviation is corrected as follows: Mag err_comp =Mag err ×(1+δ vib ΔT represents the difference between the current temperature and the reference temperature. The system performs environmental compensation calculations every 10 milliseconds to ensure real-time response to environmental changes.
[0115] Step S344: Use the environmentally compensated deviation to generate control commands to achieve adaptive parameter tuning based on environmental perception.
[0116] The final control commands are generated using the environmentally compensated deviation. The compensated deviation more accurately reflects the sensor's true error state under current environmental conditions, giving the control commands environmental adaptability. The control command generation module recalculates various control parameters based on the compensated deviation: it generates mechanical zero-point adjustment commands based on the compensated zero-point deviation, internal component position adjustment commands based on the compensated sensitivity deviation, and excitation source output adjustment commands based on the compensated excitation signal deviation. These commands are sent to each actuator via a real-time control bus, achieving dynamic matching between sensor parameters and environmental conditions. The system also establishes a historical environmental parameter database and continuously optimizes the environmental compensation model parameters through machine learning algorithms, constantly improving environmental adaptability.
[0117] Please refer to Figure 2 This paper provides a hardware implementation method based on the above testing method, including: The testing system adopts a modular mechanical structure design, which is composed of a base plate (10), four studs (11) and a top plate (1) to form a stable rigid frame. This frame provides a precise installation reference and reliable mechanical support for each component of the system. The actuator (7) is the core actuating component of the system and is rigidly fixed to the base plate (10) through the adapter plate (9). The actuator contains two independent adjustment units: one is a zero-position adjustment component (6) driven by a motor, which adopts a worm gear transmission structure inside and can realize high-precision angular fine adjustment of the sensor shaft; the other is a sensitivity fine adjustment knob (8) used to finely adjust the relative position of the electromechanical conversion element inside the sensor.
[0118] The sensor mounting structure adopts a split design: the sensor rotor housing (4) is connected to the zero-position adjustment component (6) through the rotor adapter plate (5) to ensure that the rotor position can be precisely controlled; the sensor stator housing (3) is fixed to the top plate (1) through the stator adapter plate (2), forming a stable measurement reference. This mounting method with an adjustable rotor and a fixed stator provides the necessary mechanical conditions for the accurate calibration of the sensor.
[0119] The electrical control section of the system consists of three core modules. The main control module (14) serves as the control center, with a built-in parameter optimization algorithm, and is responsible for signal processing, logic judgment, and generation of control commands. The test interface module (12) provides sensor signal input terminals and standard signal source output terminals, realizing the electrical connection between the main control module, the feedback calibration module, and the sensor under test. The feedback calibration module (13) is specifically responsible for the real-time acquisition and accuracy verification of the sensor output signal.
[0120] In terms of connectivity, the main control module (14) establishes a control link with the actuator (7) through a dedicated interface (15) and exchanges data with the sensor under test through the test interface module (12). The main control module (14) and the feedback calibration module (13) achieve high-speed data communication through a dedicated cable, forming a complete closed-loop control circuit.
[0121] When the system is working, the sensor under test is first connected to the system through the test interface module (12). The main control module (14) injects a standard angle signal into the sensor and simultaneously collects the sensor's output response signal. The feedback calibration module (13) compares the difference between the sensor's output signal and the standard signal in real time and feeds back the deviation data to the main control module. When the zero-position deviation is detected to exceed the preset threshold, the main control module generates a control command to drive the motor of the actuator to drive the worm gear mechanism and adjust the sensor shaft to the reference position. Subsequently, the system finely corrects the sensor sensitivity through the fine-tuning knob. The entire process is carried out in a loop under the real-time monitoring of the feedback calibration module until the sensor output linearity reaches the preset accuracy requirement, completing the automatic parameter adjustment process.
[0122] This hardware architecture fully considers the calibration characteristics of electromagnetic angular displacement sensors, and through a precise mechanical structure and intelligent control system, it achieves automated, accurate, and efficient adjustment of sensor parameters.
[0123] Accordingly, a second aspect of the present invention provides an electronic device, including: at least one processor and a memory connected to the at least one processor. The memory stores instructions executable by the at least one processor, which, when executed by the at least one processor, cause the at least one processor to perform the aforementioned automatic parameter adjustment test method for an electromagnetic angular displacement sensor.
[0124] Accordingly, a third aspect of the present invention provides a computer-readable storage medium having computer instructions stored thereon, which, when executed by a processor, implement the above-described automatic parameter adjustment test method for an electromagnetic angular displacement sensor.
[0125] The embodiments of the present invention aim to protect an automatic parameter adjustment and testing method for an electromagnetic angular displacement sensor, which has the following effects: 1. By constructing a closed-loop control flow of "detection-analysis-adjustment-verification", the traditional manual parameter tuning process that relies on the experience of technical personnel is transformed into a fully automated iterative process. Under this framework, a multi-parameter collaborative calibration process from zero position, gain / phase to excitation amplitude is integrated. Finally, the full-range accuracy is ensured through a post-verification optimization mechanism. This reduces the parameter tuning time of a single sensor from tens of minutes of traditional manual operation to minutes, while completely avoiding human-introduced errors. This greatly ensures the consistency of output performance of products in the same batch and can fully meet the needs of industrial mass production. 2. An algorithm based on multi-point sampling and ellipse fitting is adopted, which can accurately calculate the inherent gain error and orthogonality phase error of the sensor. Combined with zero-point deviation and excitation amplitude deviation, a complete error model is formed. Then, a sophisticated real-time compensation algorithm is used to coordinately correct all error sources. Finally, the calibration verification and parameter re-optimization are combined to ensure that the sensor can maintain high linearity and low angle calculation error throughout its entire measurement range. Its comprehensive calibration accuracy and reliability far exceed those of traditional single-point or static calibration methods. 3. Going beyond the scope of software compensation in pure signal processing, it creatively combines adaptive control algorithms with precision mechanical actuators. It can directly drive the worm gear mechanism to adjust the mechanical zero position and change the relative spatial position of internal components through the fine-tuning mechanism to correct the sensitivity, realizing the precise mapping and adjustment from electrical parameters to physical position. Furthermore, it introduces environmental perception and dynamic compensation mechanisms, enabling the parameter adjustment process to respond in real time to environmental disturbances such as temperature and magnetic fields. This not only compensates for parameter drift caused by mechanical aging and assembly stress at the source, but also significantly improves the long-term stability and anti-interference capability of the sensor in complex industrial environments.
[0126] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0127] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0128] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0129] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0130] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the specific implementation of the present invention. Any modifications or equivalent substitutions that do not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. An automatic parameter adjustment test method for an electromagnetic angular displacement sensor, characterized in that, The method comprises the following steps: Step S100, injecting a standard angle signal into a to-be-tested sensor and collecting an output response signal of the to-be-tested sensor; Step S200, calculating a deviation of a sensor parameter based on the output response signal and the standard angle signal, and determining whether the deviation exceeds a preset threshold; Step S300, if the deviation exceeds the preset threshold, generating a control instruction for zero position, sensitivity and excitation signal amplitude compensation based on the deviation through an adaptive control algorithm, and adjusting a mechanical zero position of the to-be-tested sensor or a relative position of an internal electromechanical conversion element; Step S400, repeatedly executing steps S200 to S300 based on the adjusted output response signal, and iteratively updating the sensor parameter; Step S500, when the deviation is lower than the preset threshold, determining that the output precision of the to-be-tested sensor meets a preset requirement, saving a current sensor parameter, and completing a parameter adjustment process of the to-be-tested sensor.
2. The automatic parameter adjustment test method of the electromagnetic angular displacement sensor according to claim 1, characterized in that, The calculation of the deviation of the sensor parameter based on the output response signal and the standard angle signal comprises: positioning a rotor of the to-be-tested sensor to a mechanical zero point, collecting a plurality of sets of original values of sine signals and cosine signals, calculating average values of the original values of the sine signals and the cosine signals, and comparing the average values with ideal output values of the mechanical zero point to obtain sine zero position deviation and cosine zero position deviation; positioning the rotor to a plurality of preset angle positions in sequence, collecting sine compensation signals and cosine compensation signals compensated by the zero position deviation at each preset angle position, and obtaining model parameters representing gain error and orthogonality phase error of the sensor through elliptical fitting based on the compensation signals at all positions; positioning the rotor to a preset amplitude calibration angle position, collecting sine verification signals and cosine verification signals compensated by the zero position deviation and the model parameters, calculating an average value of a synthesized vector amplitude, and comparing the average value with a preset ideal amplitude to obtain excitation signal amplitude deviation; performing real-time compensation and angle calculation on a sensor output based on the zero position deviation, the model parameters and the excitation signal amplitude deviation to obtain a sensor measured angle value; calculating a difference between the sensor measured angle value and an actual angle value corresponding to the standard angle signal to obtain the deviation.
3. The automatic parameter adjustment test method of the electromagnetic angular displacement sensor according to claim 2, characterized in that, The obtaining of the model parameters representing the gain error and the orthogonality phase error of the sensor through elliptical fitting based on the compensation signals at all positions comprises: establishing an elliptical equation model with the sine compensation signals and the cosine compensation signals as variables, the elliptical equation model including a sine channel gain coefficient, a cosine channel gain coefficient and an actual phase angle between the two channels; taking the sine compensation signal values and the cosine compensation signal values collected at the plurality of preset angle positions as an observation data set, and substituting the observation data set into the elliptical equation model; performing elliptical fitting on the observation data set by using a least square method to calculate numerical solutions of the sine channel gain coefficient, the cosine channel gain coefficient and the actual phase angle; calculating inverses of the sine channel gain coefficient and the cosine channel gain coefficient as a sine channel gain correction factor and a cosine channel gain correction factor, respectively; calculating a difference between an ideal orthogonal phase angle of the sensor and the actual phase angle to obtain a phase compensation angle. The sine channel gain correction factor, the cosine channel gain correction factor and the phase compensation angle are used as model parameters for signal compensation.
4. The automatic parameter adjustment test method of the electromagnetic angular displacement sensor according to claim 3, characterized in that, The sensor output is compensated and angle calculation in real time based on the zero deviation, the model parameters and the excitation signal amplitude deviation, and a sensor measured angle value is obtained, including: The sine zero deviation and the cosine zero deviation are subtracted from the currently collected sine signal original value and the cosine signal original value respectively to obtain a sine compensation signal and a cosine compensation signal; The sine compensation signal is multiplied by the sine channel gain correction factor, and the cosine compensation signal is multiplied by the cosine channel gain correction factor for gain matching compensation; The gain matching compensated sine signal and the gain matching compensated cosine signal are rotated and corrected in coordinates by using the phase compensation angle to eliminate the quadrature phase error, and finally compensated sine signal values and finally compensated cosine signal values are obtained; Four quadrant inverse tangent operations are performed on the finally compensated sine signal values and the finally compensated cosine signal values to obtain the sensor measured angle value.
5. The automatic parameter adjustment test method of the electromagnetic angular displacement sensor according to any one of claims 2-4, characterized in that, The control instructions for zero, sensitivity and excitation signal amplitude compensation are generated by an adaptive control algorithm based on the deviation amount, and the mechanical zero of the sensor to be measured or the relative position of the internal electromechanical conversion element is adjusted, including: The sine zero deviation and the cosine zero deviation corresponding to the deviation amount are used to calculate the zero compensation angle required by the sensor shaft, and a first control instruction is generated to adjust the mechanical angular position of the shaft; The sine channel gain correction factor, the cosine channel gain correction factor and the phase compensation angle corresponding to the deviation amount are used to generate a second control instruction to adjust the relative spatial position between the internal sensing element and the electromagnetic excitation source of the sensor to complete the sensitivity correction; The excitation signal amplitude deviation corresponding to the deviation amount is used to generate a third control instruction to adjust the output code value of the digital-to-analog converter or the duty cycle of the pulse width modulation signal to optimize the output amplitude of the sensor excitation source.
6. The automatic parameter adjustment test method of the electromagnetic angular displacement sensor according to claim 5, characterized in that, The sine zero deviation and the cosine zero deviation corresponding to the deviation amount are used to calculate the zero compensation angle required by the sensor shaft, and a first control instruction is generated, including: The sine zero deviation and the cosine zero deviation are used to calculate the zero compensation angle estimate value of the sensor shaft by an inverse tangent function; It is judged whether the absolute value of the zero compensation angle estimate value exceeds a preset angle deviation threshold value; If the preset angle deviation threshold value is exceeded, the zero compensation angle estimate value is taken as the zero compensation angle required by the sensor shaft; The zero compensation angle is converted into a first control instruction for driving an execution mechanism to adjust the mechanical angular position of the shaft.
7. The automatic parameter adjustment test method of the electromagnetic angular displacement sensor according to claim 5, characterized in that, The sine channel gain correction factor and the cosine channel gain correction factor corresponding to the deviation amount are used to generate a second control instruction, including: The difference between the sine channel gain correction factor and the unit gain value is taken as a first gain adjustment amount, and the difference between the cosine channel gain correction factor and the unit gain value is taken as a second gain adjustment amount; The absolute value of the phase compensation angle is taken as a phase adjustment amount; The target displacement is calculated according to a weighted sum of the first gain adjustment, the second gain adjustment and the phase adjustment; The displacement direction is determined based on the size relationship between the sine channel gain correction factor and the cosine channel gain correction factor; The target displacement and the displacement direction are converted into a second control instruction for adjusting the relative spatial position between the internal sensing element and the electromagnetic excitation source of the sensor.
8. The automatic parameter adjustment test method of the electromagnetic angular displacement sensor according to claim 5, characterized in that, The third control instruction is generated based on the excitation signal amplitude deviation corresponding to the deviation, including: The excitation signal amplitude deviation is input into an adaptive control algorithm to calculate an adjustment amount of the excitation source control parameter; The adjustment amount is mapped to a corresponding digital-to-analog converter output code value or pulse width modulation signal duty cycle; A third control instruction is generated based on the mapping result and output to the excitation source driving circuit; The adjusted sensor output signal is collected to verify whether the excitation signal amplitude deviation meets the requirements, and if not, the above steps are re-executed until the deviation reaches the preset range.
9. The automatic parameter adjustment test method of the electromagnetic angular displacement sensor according to claim 1, characterized in that, After saving the current sensor parameters, the method further includes: The rotor of the sensor to be tested is moved to a plurality of verification angle positions different from the calibration points; At each verification angle position, the saved sensor parameters are used for angle calculation to obtain a verification angle value; The error between the verification angle value and the actual angle value is calculated, and it is determined whether all errors are less than a preset verification threshold; If there is an error exceeding the verification threshold, the saved sensor parameters are optimized and corrected based on the error distribution of each verification point through an interpolation algorithm; The optimized sensor parameters are saved to the memory again to complete the post-verification optimization of the parameters.
10. The automatic parameter adjustment test method of the electromagnetic angular displacement sensor according to claim 1, characterized in that, The control instruction for zero position, sensitivity and excitation signal amplitude compensation is generated by the adaptive control algorithm, further including: The environmental parameters of the test environment are collected in real time, including the environmental temperature, the external magnetic field strength and the mechanical vibration frequency; The environmental parameters are input into a preset environmental compensation model to obtain an influence coefficient of the environmental factors on the sensor output; The deviation is dynamically corrected based on the influence coefficient to obtain an environmental compensation deviation; The control instruction is generated using the environmental compensation deviation to realize adaptive parameter adjustment based on environmental perception.
Citation Information
Cited By
Self-adaptive temperature drift resistance control method suitable for NV color center magnetic sensor
CN121831625A
Adaptive anti-wandering control method for NV center magnetic sensor
CN121831625B
Anti-interference pipeline angle deviation detection method and device
CN121918055A
An anti-interference pipeline angle deviation detection method and device
CN121918055B
Full range measurement method and system for linear variable differential transformer displacement sensors
CN122237424A