Displacement sensor nonlinear periodic error correction method and displacement sensor
By collecting error data from displacement sensors, performing Fourier transforms and correcting mathematical models, the problem of nonlinear periodic errors in displacement sensors was solved, improving the sensor's detection accuracy and reducing costs.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GUANGZHOU HAOZHI MEASURING INSTRUMENT CO LTD
- Filing Date
- 2026-01-21
- Publication Date
- 2026-05-12
AI Technical Summary
In existing technologies, the nonlinear periodic error of displacement sensors cannot be effectively corrected, resulting in low detection accuracy, which prevents their widespread application, especially in applications requiring high precision.
By collecting error data of the actual displacement range of the displacement sensor within multiple repetition cycles, Fourier transform is performed to obtain harmonic parameters, an error mathematical model is established, and the error value of any original displacement value is calculated and corrected based on the model.
It effectively compensates for nonlinear periodic errors, improves the output accuracy of displacement sensors, reduces dependence on manufacturing processes, and achieves high-precision displacement measurement.
Smart Images

Figure CN122015745A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of sensor technology, and in particular to a method for correcting nonlinear periodic errors in a displacement sensor and a displacement sensor itself. Background Technology
[0002] With the development of electronic circuits and information technology, sensor technology has rapidly advanced. Displacement sensors, including angular and linear displacement sensors, play a crucial role in high-end equipment and CNC machine tools, their accuracy determining the precision level of the machined workpiece. Because the manufacturing process of displacement sensors significantly impacts their systematic errors—constant errors remaining within the sensor—they are generally eliminated by improving manufacturing precision. This places extremely high demands on processing equipment and processes, requiring high-precision sub-micron PCB processing equipment and high-precision nanometer-level machining equipment. This undoubtedly increases the manufacturing cost of sensors exponentially. Even if high-precision sensors are manufactured, widespread application is hindered by cost. Moreover, the nanometer- and sub-micron-level machining equipment used for sensor processing is difficult or even impossible to achieve. Without increasing the requirements for processing equipment and processes, an economical and effective method to improve the accuracy of displacement sensors is error correction technology.
[0003] In related technologies, error correction is one of the commonly used and effective methods to eliminate sensor system errors. When the system error in a displacement sensor is linear or can be approximated as linear by small units, simple linear correction or least squares correction can be used to eliminate the system error. While these error correction methods are simple, the accuracy after correction is not high, and the residual error is large, resulting in low sensor output accuracy after error correction. When the system error in a displacement sensor is a nonlinear periodic error, the above error correction methods cannot achieve high-precision error correction or may even fail to correct it. This is mainly because the harmonic components contained in nonlinear periodic errors are more complex, making it impossible to accurately establish an error mathematical model using simple linear fitting to reconstruct the error curve for error correction, thus affecting the detection accuracy of the displacement sensor.
[0004] In summary, the problems with the relevant technologies urgently need to be addressed. Summary of the Invention
[0005] The purpose of this application is to at least partially solve one of the technical problems existing in the related art.
[0006] Therefore, one objective of this application is to provide a method for correcting nonlinear periodic errors in a displacement sensor and a displacement sensor in general.
[0007] To achieve the above-mentioned technical objectives, the technical solutions adopted in the embodiments of this application include: On one hand, embodiments of this application provide a method for correcting nonlinear periodic errors in a displacement sensor, wherein the error acquisition range is the actual displacement range of the displacement sensor within multiple repetition periods; the method includes: The actual displacement range is calculated according to the theoretical range, and the displacement values are collected at equal intervals. Multiple error data corresponding to the displacement sensor are also collected. The error data is subjected to Fourier transform to obtain multiple sets of harmonic parameters; wherein each set of harmonic parameters includes harmonic frequency, harmonic amplitude and harmonic phase; The harmonic parameters are sorted according to the magnitude of the harmonic amplitude, and several groups of harmonic parameters corresponding to the larger harmonic amplitudes are selected to establish an error mathematical model. Based on the aforementioned error mathematical model, the error value corresponding to any original displacement value is calculated; The original displacement value is corrected based on the error value to obtain the corrected target displacement value.
[0008] On the other hand, embodiments of this application provide a displacement sensor, including: At least one processor; At least one memory for storing at least one program; When the at least one program is executed by the at least one processor, the at least one processor implements the aforementioned method for correcting nonlinear periodic errors in a displacement sensor.
[0009] The advantages and beneficial effects of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this application: This application discloses a method for correcting nonlinear periodic errors in a displacement sensor. The error acquisition range is the actual displacement range of the displacement sensor within multiple repetition periods. The sensor calculates equally spaced displacement values according to its theoretical range and acquires corresponding error data. Fourier transform is performed on the error data to obtain multiple sets of harmonic parameters, each set including harmonic frequency, harmonic amplitude, and harmonic phase. The harmonic parameters are sorted according to their amplitude, and several sets of harmonic parameters corresponding to larger amplitudes are selected to establish an error mathematical model. Based on this model, the error value corresponding to any original displacement value is calculated. The original displacement value is then corrected based on the error value to obtain the corrected target displacement value. This technical solution effectively compensates for nonlinear periodic errors, improves the output accuracy of the displacement sensor, and reduces dependence on manufacturing processes. Attached Figure Description
[0010] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the following description is provided with accompanying drawings of the relevant technical solutions in the embodiments of this application or the prior art. It should be understood that the accompanying drawings described below are only for the purpose of clearly illustrating some embodiments of the technical solutions in this application. For those skilled in the art, other drawings can be obtained based on these drawings without any creative effort.
[0011] Figure 1 This is a flowchart illustrating a nonlinear periodic error correction method for a displacement sensor provided in an embodiment of this application. Figure 2 This is a schematic diagram illustrating the acquisition of errors based on equally spaced displacement values, as provided in an embodiment of this application. Figure 3 This is a schematic diagram of a corrected nonlinear periodic error residual curve provided in an embodiment of this application; Figure 4 This is a schematic diagram of the theoretical and actual displacement coordinates before and after splicing multiple repeating periodic displacements, provided in an embodiment of this application. Figure 5 This is a schematic diagram of an error acquisition device and a displacement sensor provided in an embodiment of this application. Detailed Implementation
[0012] The present application will be further described below with reference to the accompanying drawings and specific embodiments. The described embodiments should not be considered as limitations on the present application, and all other embodiments obtained by those skilled in the art without inventive effort are within the scope of protection of the present application.
[0013] In the following description, references are made to “some embodiments,” which describe a subset of all possible embodiments. However, it is understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0014] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.
[0015] With the development of electronic circuits and information technology, sensor technology has rapidly advanced. Displacement sensors, including angular and linear displacement sensors, play a crucial role in high-end equipment and CNC machine tools, their accuracy determining the precision level of the machined workpiece. Because the manufacturing process of displacement sensors significantly impacts their systematic errors—constant errors remaining within the sensor—they are generally eliminated by improving manufacturing precision. This places extremely high demands on processing equipment and processes, requiring high-precision sub-micron PCB processing equipment and high-precision nanometer-level machining equipment. This undoubtedly increases the manufacturing cost of sensors exponentially. Even if high-precision sensors are manufactured, widespread application is hindered by cost. Moreover, the nanometer- and sub-micron-level machining equipment used for sensor processing is difficult or even impossible to achieve. Without increasing the requirements for processing equipment and processes, an economical and effective method to improve the accuracy of displacement sensors is error correction technology.
[0016] In related technologies, error correction is one of the commonly used and effective methods to eliminate sensor system errors. When the system error in a displacement sensor is linear or can be approximated as linear by small units, simple linear correction or least squares correction can be used to eliminate the system error. While these error correction methods are simple, the accuracy after correction is not high, and the residual error is large, resulting in low sensor output accuracy after error correction. When the system error in a displacement sensor is a nonlinear periodic error, the above error correction methods cannot achieve high-precision error correction or may even fail to correct it. This is mainly because the harmonic components contained in nonlinear periodic errors are more complex, making it impossible to accurately establish an error mathematical model using simple linear fitting to reconstruct the error curve for error correction, thus affecting the detection accuracy of the displacement sensor.
[0017] In view of this, this application provides a method for correcting nonlinear periodic errors in a displacement sensor and a displacement sensor in its embodiments. In this method, the error acquisition range is the actual displacement range of the displacement sensor within multiple repetition cycles. The sensor calculates equally spaced displacement values according to its theoretical range and acquires corresponding error data. Fourier transform is performed on the error data to obtain multiple sets of harmonic parameters, each set including harmonic frequency, harmonic amplitude, and harmonic phase. The harmonic parameters are sorted according to their harmonic amplitudes, and several sets of harmonic parameters corresponding to larger amplitudes are selected to establish an error mathematical model. Based on this model, the error value corresponding to any original displacement value is calculated. The original displacement value is corrected based on the error value to obtain the corrected target displacement value. The technical solution of this application can effectively compensate for nonlinear periodic errors, improve the output accuracy of the displacement sensor, and reduce dependence on manufacturing processes.
[0018] Below, we will first explain and describe the nonlinear periodic error correction method for displacement sensors in the embodiments of this application.
[0019] Reference Figure 1 In this embodiment, the error acquisition range is the actual displacement range of the displacement sensor within multiple repetition cycles; the nonlinear periodic error correction method for the displacement sensor mainly includes: Step 110: Calculate the equally spaced displacement values for the actual displacement range according to the theoretical range, and collect multiple error data corresponding to the displacement sensor; Step 120: Perform a Fourier transform on the error data to obtain multiple sets of harmonic parameters; wherein each set of harmonic parameters includes harmonic frequency, harmonic amplitude, and harmonic phase. Step 130: Sort the harmonic parameters according to the magnitude of the harmonic amplitude, and select several groups of harmonic parameters corresponding to the larger harmonic amplitudes to establish an error mathematical model; Step 140: Based on the error mathematical model, calculate the error value corresponding to any original displacement value; Step 150: Correct the original displacement value according to the error value to obtain the corrected target displacement value.
[0020] This application provides a method for correcting nonlinear periodic errors in displacement sensors. This method offers an effective software compensation scheme for system errors exhibiting nonlinear periodic characteristics that are difficult to completely eliminate due to manufacturing limitations. First, the actual displacement range is calculated with equally spaced displacement values according to the theoretical range to obtain the corresponding error data. Then, Fourier transform is used to perform spectral analysis on the acquired error data, decomposing it into a series of harmonic components with specific frequencies, amplitudes, and phases. Next, based on the magnitude of each harmonic component's amplitude, several major harmonics that contribute the most to the overall error pattern are selected, and a mathematical model that accurately describes the nonlinear periodic error is constructed. During the actual operation of the sensor, this model is used to calculate the error value corresponding to any original displacement reading in real time. By subtracting this error value from the original value, dynamic compensation of the system error is achieved, thereby outputting a high-precision target displacement value. This method accurately captures the inherent harmonic structure of the error through frequency domain analysis and reconstructs the error curve using a mathematical model, ultimately significantly improving the output accuracy of the displacement sensor without increasing the stringency of the hardware manufacturing process.
[0021] In step 110, the actual displacement range is calculated into equally spaced displacement values according to the theoretical range, and multiple error data corresponding to the displacement sensor are collected. In this embodiment, the nonlinear periodic error characteristics of the displacement sensor over the full range can first be determined to identify whether it contains multiple repetitive cycles. For a repetitive periodic error with a cycle number of p (p≥2), the theoretical displacement range corresponding to each repetitive cycle is set to [0, l), where the theoretical range l is the full range L divided by the cycle number p. The actual displacement range of each repetitive cycle may vary slightly due to manufacturing errors, and is denoted as [0, l). k ′), where l k = l + e k e k This represents the error value at full scale for that cycle. Subsequently, within the actual displacement range of each repetition cycle, the theoretical range l is divided into equal intervals, and m error data points (m is an even number ≥ 2) are collected to obtain the original error dataset for subsequent analysis.
[0022] Step 120: Perform a Fourier transform on the collected error data to obtain multiple sets of harmonic parameters. The Fourier transform is used to convert the error sequence in the time domain (or displacement domain) to the frequency domain, thereby analyzing the complex harmonic components contained in the error sequence. After the transform, M sets (M = m / 2) of harmonic parameters are obtained, each set of parameters being characterized by three key elements: the harmonic frequency N, which reflects the periodicity of the error variation; the harmonic amplitude A, which characterizes the contribution of that frequency component to the total error; and the harmonic phase φ, which determines the initial position or offset of that harmonic component. Thus, the detailed characteristics of each harmonic constituting the nonlinear periodic error can be revealed through spectral analysis.
[0023] Step 130: Sort all harmonic parameters according to the calculated amplitude of each harmonic, and select several groups of harmonic parameters corresponding to the larger harmonic amplitudes to establish the error mathematical model. Generally, not all harmonic components have a decisive influence on the error pattern; harmonics with smaller amplitudes can often be ignored. Therefore, after sorting all M groups of harmonic parameters according to their amplitude A from largest to smallest, based on the balance between accuracy requirements and computational complexity, select the first n groups (n ≤ M) of harmonic parameters corresponding to the amplitudes. These n key parameters constitute the core foundation of the error mathematical model, ensuring that the model can accurately reflect the main characteristics of the error.
[0024] Step 140: Based on the established error mathematical model, calculate the error value corresponding to any original displacement value of the displacement sensor within its full range. This mathematical model can be expressed as a linear superposition of the selected harmonic sine functions. By substituting the original displacement value that needs to be corrected into this model, the theoretically existing systematic error value at that point can be calculated.
[0025] Step 150: Correct the original displacement value based on the calculated error value to obtain a high-precision target displacement value. The correction process involves subtracting the corresponding model calculation error value from the original displacement value. Through this calculation, the systematic nonlinear periodic error contained in the sensor output value is effectively compensated, resulting in a corrected target displacement value with significantly improved accuracy. By correcting all displacement points within the full range of the sensor using this method, the overall accuracy of the sensor can be improved.
[0026] The following is a detailed introduction and explanation of a nonlinear periodic error correction method for displacement sensors provided in this application embodiment, with reference to specific application examples.
[0027] Example 1: The displacement sensor nonlinear periodic error correction method in this application embodiment is applicable to various displacement sensors containing multiple repetitive nonlinear periodic errors, including but not limited to angular displacement and linear displacement, and can meet the high-precision measurement requirements (using the error data of one repetitive period to correct the error of all repetitive periods before displacement splicing).
[0028] Please refer to Figure 2 In this embodiment, an angular displacement sensor is used as an example for illustration. The full range of the angular displacement sensor is L=360°, and the number of repetition cycles is... p =120, then the theoretical range for each repetition cycle is l =3°, refer to Figure 2 201, in any number k Each repetition cycle calculates the equally spaced displacement values based on the theoretical range of 3° and collects them. m =240 error data points, then the th k The 240 error data points for each repetition period correspond to equally spaced displacement values of 0°, 0.0125°, 0.025°…2.9875°. A Fourier transform is performed on the 240 error sequences to obtain harmonic parameters for group M1=120, and these parameters are then sorted according to harmonic amplitude. A 1 i Sort by size from largest to smallest, as shown in the table below:
[0029] In the table, A 11≥ A 12≥ A 13≥…≥ A 1 12 ≥…≥ A 1 120 Take the front n A mathematical model for multiple repetition period errors is established using 1=12 sets of harmonic parameters, with arbitrary displacement values in each repetition period. Corresponding error The mathematical model is determined by the following formula:
[0030] In the formula, The value range is [0, ), This represents the error value at full scale for any repetition period; Then the arbitrary displacement value of the repetition period Displacement value after error correction Determine using the following formula:
[0031] After correcting all displacement values across multiple repetition cycles using the aforementioned error correction method, the sensor error is compensated, resulting in a higher-precision displacement value output. The corrected error residual is shown below. Figure 3 As shown in 301, the residual is generally less than ±3″, which meets the requirements of high-precision measurement.
[0032] In the embodiments of this application, the harmonic amplitude in the mathematical model of the error and the error correction formula Harmonic phase During the calculation process, the conversion of unit systems may introduce constant coefficients, but this does not affect the generality and implementation of the error correction method. For example, in the embodiments of this application, if the unit of the collected error data is arcseconds (″), and the harmonic phase after Fourier transform... The unit is radians, and the harmonic phase needs to be considered. To convert the unit to arcseconds, if storing it in an 18-bit memory, you need to... Multiply by a coefficient of 41722; similarly, harmonic amplitude. If a 36-bit memory is used for storage, the harmonic amplitude needs to be... Multiply by a coefficient of 6362915; if the unit of the collected error data is another unit or the number of bits stored changes, the coefficient will also change after unit conversion, but this will not affect the implementation of this application.
[0033] In this embodiment, an angular displacement sensor is used as an example for illustration. If it is a linear displacement sensor, the full range L of the sensor is in units of length displacement (nanometers, micrometers, millimeters, meters, etc.), and the harmonic amplitude is... Harmonic phase The coefficients after unit conversion will also change, but this will not affect the implementation of this application, and will not be elaborated here. Moreover, the same applies to the other embodiments, including the cases of unit systems and linear displacement sensors, which will not be described in detail later.
[0034] Example 2: The displacement sensor nonlinear periodic error correction method in this application embodiment is applicable to various displacement sensors containing multiple repetitive nonlinear periodic errors, including but not limited to angular displacement and linear displacement, and can meet the high-precision measurement requirements (using the errors and data of all repetitive periods to correct the errors of all repetitive periods before displacement splicing).
[0035] Please refer to Figure 2 In this embodiment, an angular displacement sensor is used as an example for illustration. The full range of the angular displacement sensor is L=360°, and the number of repetition cycles is... p =120, then the theoretical range for each repetition cycle is l =3°, refer to Figure 2 For 202 and 203, the displacement values were calculated at equal intervals according to the theoretical range of 3° in all 120 repetition cycles, and data were collected. m =240 error data points, then the total number of errors collected at equal intervals over the full range L of the sensor is q =28800, then the 240 error data points in each repetition cycle correspond to equally spaced displacement values of 0°, 0.0125°, 0.025°…2.9875°. By summing the error values corresponding to the same equally spaced displacement values in each repetition cycle, we can obtain 240 error sums, denoted as... , , … This sequence is used to create a discrete error sum sequence. A Fourier transform is performed on the 240 error sum sequences to obtain M²=120 sets of harmonic parameters, which are then sorted by harmonic amplitude. A 2 i Sort by size from largest to smallest, as shown in the table below:
[0036] In the table, A 21≥ A 22≥ A 23≥…≥ A 2 12 ≥…≥ A 2 120 Take the front n A mathematical model for multiple repetition period errors is established using 2=12 sets of harmonic parameters, with arbitrary displacement values in each repetition period. Corresponding error The mathematical model is determined by the following formula:
[0037] In the formula, The value range is [0, ), This represents the error value at full scale for any repetition period; Then the arbitrary displacement value of the repetition period Displacement value after error correction Determine using the following formula:
[0038] After correcting all displacement values across multiple repetition cycles using the aforementioned error correction method, the sensor error is compensated, resulting in a higher-precision displacement value output. The corrected error residual is shown below. Figure 3 As shown in 301, the residual is generally less than ±3″, which meets the requirements of high-precision measurement.
[0039] Example 3: The displacement sensor nonlinear periodic error correction method in this application embodiment is applicable to various displacement sensors containing multiple repetitive nonlinear periodic errors, including but not limited to angular displacement and linear displacement, and can meet the high-precision measurement requirements (correcting the errors of all repetitive periods before displacement splicing by using the error and average value data of all repetitive periods).
[0040] Please refer to Figure 2 In this embodiment, an angular displacement sensor is used as an example for illustration. The full range of the angular displacement sensor is L=360°, and the number of repetition cycles is... p =120, then the theoretical range for each repetition cycle is l =3°, refer to Figure 2 For values 202, 203, and 204, the equally spaced displacement values were calculated and collected over all 120 repetition cycles according to the theoretical range of 3°. m =240 error data points, then the total number of errors collected at equal intervals over the full range L of the sensor is q =28800, then the 240 error data points in each repetition cycle correspond to equally spaced displacement values of 0°, 0.0125°, 0.025°…2.9875°. By summing the error values corresponding to the same equally spaced displacement values in each repetition cycle, we can obtain 240 error sums, denoted as... , , … For each error, the average is taken 120 times to obtain the error and average value sequence. , , … This sequence is used to form a discrete sequence of errors and average values. Fourier transforms are performed on these 240 sequences to obtain M3=120 sets of harmonic parameters, which are then sorted by harmonic amplitude. A 3 i Sort by size from largest to smallest, as shown in the table below:
[0041] In the table, A 31≥ A 32≥ A 33≥…≥ A 3 12 ≥…≥ A 3 120 Take the front n A mathematical model for multiple repetition period errors is established using 3 sets of 12 harmonic parameters, with arbitrary displacement values for each repetition period. Corresponding error The mathematical model is determined by the following formula:
[0042] In the formula, The value range is [0, ), This represents the error value at full scale for any repetition period; Then the arbitrary displacement value of the repetition period Displacement value after error correction Determine using the following formula:
[0043] After correcting all displacement values across multiple repetition cycles using the aforementioned error correction method, the sensor error is compensated, resulting in a higher-precision displacement value output. The corrected error residual is shown below. Figure 3 As shown in 301, the residual is generally less than ±3″, which meets the requirements of high-precision measurement.
[0044] Example 4: The displacement sensor nonlinear periodic error correction method in this application embodiment is applicable to various displacement sensors containing multiple repetitive nonlinear periodic errors, including but not limited to angular displacement and linear displacement, and can meet the high-precision measurement requirements (using the error data of one repetitive period to correct the error of all repetitive periods after displacement splicing).
[0045] The difference between this embodiment and Embodiment 1 is that: 1) By collecting any number of... k Fourier transform of the repetition period error data yields harmonic parameters for group M4=120. The first... n The error mathematical model and error correction formula for continuous actual displacement after splicing multiple repetition cycles using 4=12 sets of harmonic parameters are different. Specifically, the actual displacement range of p repetition cycles is spliced into a continuous actual displacement range across the entire range; where the th... k The actual displacement corresponding to each repetition cycle is [ , The continuous actual displacement range after splicing p repeated cycles is [0, ... See before and after displacement splicing. Figure 4 As shown in 401 and 402; Arbitrary displacement value within the continuous actual displacement after splicing multiple repeating periods Corresponding error The mathematical model is determined by the following formula:
[0046] In the formula, The value range is [0, , This represents the error value of the displacement sensor at full scale. Then, any displacement value within the continuous actual displacement after splicing multiple repeating periods Displacement value after error correction Determine using the following formula:
[0047] After correcting all displacement values within the continuous actual displacement range following multiple repetition cycles using the aforementioned error correction method, the sensor error is compensated, resulting in a high-precision displacement value output. The corrected error residual is shown below. Figure 3 As shown in 301, the residual is generally less than ±3″, which meets the requirements of high-precision measurement.
[0048] 2) When the number of storage bits is the same, because The range of values changes, therefore the harmonic amplitude The coefficient after unit conversion is 53024.
[0049] Everything else is the same as in Example 1.
[0050] Example 5: The displacement sensor nonlinear periodic error correction method in this application embodiment is applicable to various displacement sensors containing multiple repetitive nonlinear periodic errors, including but not limited to angular displacement and linear displacement, and can meet the high-precision measurement requirements (correcting the error of all repetitive periods after displacement splicing with the error and data of all repetitive periods).
[0051] The difference between this embodiment and Embodiment 2 is as follows: 1) By collecting all 120 repetitive periodic error data and summing them at the same equally spaced displacement values, a Fourier transform is performed on the error and sequence to obtain the harmonic parameters of group M5=120. The first few... nThe error mathematical model and error correction formula for continuous actual displacement after splicing multiple repetition cycles using 5=12 sets of harmonic parameters are different. Specifically, the actual displacement range of p repetition cycles is spliced into a continuous actual displacement range across the entire measurement range; where the th... k The actual displacement corresponding to each repetition cycle is [ , The continuous actual displacement range after splicing p repeated cycles is [0, ... See before and after displacement splicing. Figure 4 As shown in 401 and 402; Arbitrary displacement value within the continuous actual displacement after splicing multiple repeating periods Corresponding error The mathematical model is determined by the following formula:
[0052] In the formula, The value range is [0, , This represents the error value of the displacement sensor at full scale. Then, any displacement value within the continuous actual displacement after splicing multiple repeating periods Displacement value after error correction Determine using the following formula:
[0053] After correcting all displacement values within the continuous actual displacement range following multiple repetition cycles using the aforementioned error correction method, the sensor error is compensated, resulting in a high-precision displacement value output. The corrected error residual is shown below. Figure 3 As shown in 301, the residual is generally less than ±3″, which meets the requirements of high-precision measurement.
[0054] 2) When the number of storage bits is the same, because The range of values changes, therefore the harmonic amplitude The coefficient after unit conversion is 53024.
[0055] Everything else is the same as in Example 2.
[0056] Example 6: The displacement sensor nonlinear periodic error correction method in this application embodiment is applicable to various displacement sensors containing nonlinear periodic errors, including but not limited to angular displacement and linear displacement, and can meet the high-precision measurement requirements (correcting the error of all repeated periods after displacement splicing by using the error and average value data of all repeated periods).
[0057] The difference between this embodiment and Embodiment 3 is as follows: 1) By collecting all 120 repetitive periodic error data and summing them at the same equally spaced displacement values, the average value of each error sum is calculated. A Fourier transform is then performed on the error and average value sequence to obtain the harmonic parameters of group M6=120. The first... n The error mathematical model and error correction formula for continuous actual displacement after splicing multiple repetition cycles using 6=12 sets of harmonic parameters are different. Specifically, the actual displacement range of p repetition cycles is spliced into a continuous actual displacement range across the entire range; where the th... k The actual displacement corresponding to each repetition cycle is [ , The continuous actual displacement range after splicing p repeated cycles is [0, ... See before and after displacement splicing. Figure 4 As shown in 401 and 402; Arbitrary displacement value within the continuous actual displacement after splicing multiple repeating periods Corresponding error The mathematical model is determined by the following formula:
[0058] In the formula, The value range is [0, , This represents the error value of the displacement sensor at full scale. Then, any displacement value within the continuous actual displacement after splicing multiple repeating periods Displacement value after error correction Determine using the following formula:
[0059] After correcting all displacement values within the continuous actual displacement range following multiple repetition cycles using the aforementioned error correction method, the sensor error is compensated, resulting in a high-precision displacement value output. The corrected error residual is shown below. Figure 3 As shown in 301, the residual is generally less than ±3″, which meets the requirements of high-precision measurement.
[0060] 2) When the number of storage bits is the same, because The range of values changes, therefore the harmonic amplitude The coefficient after unit conversion is 53024.
[0061] Everything else is the same as in Example 3.
[0062] Example 7: The displacement sensor nonlinear periodic error correction method in this application embodiment is applicable to various displacement sensors containing a single nonlinear periodic error, including but not limited to angular displacement and linear displacement, and can meet the high-precision measurement requirements (correcting the error of the entire range L with the error data of a single period).
[0063] Please refer to Figure 2 In this embodiment, an angular displacement sensor is used as an example for illustration. The full range of the angular displacement sensor is L=360°. (Refer to...) Figure 2 205, calculates and collects equally spaced displacement values within the full 360° range of the displacement sensor. m =120 error data points, then the equally spaced displacement values corresponding to the 120 error data points in a single period are 0°, 3°, 6°…357°. Perform a Fourier transform on the 120 error sequences to obtain the harmonic parameters of M7=60 groups, and then sort them according to the harmonic amplitude. A 7 i Sort by size from largest to smallest, as shown in the table below:
[0064] In the table, A 71≥ A 72≥ A 73≥…≥ A 76≥…≥ A 7 60 Take the front n A mathematical model for a single-cycle error is established using 7 sets of 6 harmonic parameters, allowing for arbitrary displacement values across the full range L of the displacement sensor. Corresponding error The mathematical model is determined by the following formula:
[0065] In the formula, The value range is [0, ); Then any displacement value within the full range L of the displacement sensor Displacement value after error correction Determine using the following formula:
[0066] After correcting all displacement values of the displacement sensor using the above error correction method, the sensor error is compensated, resulting in a higher-precision displacement value output. The corrected error residual is shown below. Figure 3 As shown in Figure 302, the residual is generally less than ±3″, which meets the requirements for high-precision measurement.
[0067] The technical solution of this application analyzes the harmonic components of the nonlinear periodic error in the displacement sensor and establishes a high-precision mathematical model using a nonlinear method, which can achieve high-precision error correction. By processing the original error data in different ways through error processing and analysis software, different mathematical models can be established, which can be conveniently and flexibly adapted to the processors of different displacement sensors for calculation, effectively improving the accuracy of the sensor while significantly reducing the cost and making it more practical.
[0068] In this embodiment of the application, a displacement sensor is also provided, including: At least one processor; At least one memory for storing at least one program; When at least one program is executed by at least one processor, the at least one processor implements the above-described method for correcting nonlinear periodic errors in a displacement sensor.
[0069] Similarly, the content of the above method embodiments is applicable to the embodiments of this electronic device. The specific functions implemented by the embodiments of this electronic device are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0070] This application also provides a computer-readable storage medium storing a processor-executable program, which, when executed by a processor, is used to perform the above-described method for correcting nonlinear periodic errors in a displacement sensor.
[0071] Similarly, the content of the above method embodiments is applicable to the present computer-readable storage medium embodiments. The specific functions implemented by the present computer-readable storage medium embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0072] This application also provides a computer program product, which includes a computer program stored in a computer-readable storage medium. The processor of a computer device reads the computer program from the computer-readable storage medium and executes the computer program, causing the computer device to perform the above-described method for correcting nonlinear periodic errors of a displacement sensor.
[0073] In this embodiment of the application, an error acquisition device is also provided, such as... Figure 5 As shown, it includes: Platform 501, reference instrument 502, data acquisition card 503, and error processing and analysis software 504; The platform 501 is used to physically connect the reference instrument 502 and the displacement sensor; The reference instrument 502 is an instrument of the same type as the displacement sensor, and the error of the reference instrument 502 is less than 1 / 3 of the error of the displacement sensor; The data acquisition card 503 is used to receive the displacement values of the reference instrument 502 and the displacement sensor, and send them to the error processing and analysis software 504 for data processing. The error processing and analysis software 504 is used to subtract the displacement value of the reference instrument from the displacement value of the displacement sensor to obtain the error sequence value of the displacement sensor, and then perform Fourier transform on the error sequence value according to the error correction method provided in the embodiment of this application to obtain the harmonic parameters of the error sequence.
[0074] The harmonic parameters can be transmitted to the displacement sensor, so that the processor can retrieve the harmonic parameters from the memory, calculate the error according to the mathematical model of the error based on the current displacement value of the displacement sensor, and complete the error correction operation to compensate for the error contained in the current displacement value and output a high-precision displacement value.
[0075] In some alternative embodiments, the functions / operations mentioned in the block diagrams may not occur in the order shown in the operation diagrams. For example, depending on the functions / operations involved, two consecutively shown blocks may actually be executed substantially simultaneously, or the blocks may sometimes be executed in reverse order. Furthermore, the embodiments presented and described in the flowcharts of this application are provided by way of example to provide a more comprehensive understanding of the technology. The disclosed methods are not limited to the operations and logic flows presented herein. Alternative embodiments are contemplated in which the order of various operations is changed and sub-operations described as part of a larger operation are executed independently.
[0076] Furthermore, although this application is described in the context of functional modules, it should be understood that, unless otherwise stated to the contrary, one or more of the functions and / or features may be integrated into a single physical device and / or software module, or one or more functions and / or features may be implemented in a separate physical device or software module. It is also understood that a detailed discussion of the actual implementation of each module is unnecessary for understanding this application. Rather, given the properties, functions, and internal relationships of the various functional modules in the apparatus disclosed herein, the actual implementation of the module will be understood within the scope of conventional technology for an engineer. Therefore, those skilled in the art can implement the application set forth in the claims using ordinary techniques without excessive experimentation. It is also understood that the specific concepts disclosed are merely illustrative and not intended to limit the scope of this application, which is determined by the full scope of the appended claims and their equivalents.
[0077] If a function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0078] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-including system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device.
[0079] More specific examples (a non-exhaustive list) of computer-readable media include: electrical connections (electronic devices) having one or more wires, portable computer disk drives (magnetic devices), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Furthermore, computer-readable media can even be paper or other suitable media on which programs can be printed, because programs can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in computer memory.
[0080] It should be understood that various parts of this application can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented using software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0081] In the foregoing description of this specification, the references to terms such as "one embodiment," "another embodiment," or "some embodiments," etc., indicate that a specific feature, structure, material, or characteristic described in connection with an embodiment or example is included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0082] Although embodiments of this application have been shown and described, those skilled in the art will understand that various changes, modifications, substitutions and variations can be made to these embodiments without departing from the principles and spirit of this application, the scope of which is defined by the claims and their equivalents.
[0083] The foregoing has provided a detailed description of the preferred embodiments of this application. However, this application is not limited to these embodiments. Those skilled in the art can make various equivalent modifications or substitutions without departing from the spirit of this application. All such equivalent modifications or substitutions are included within the scope defined by the claims of this application. In the description of this specification, the references to terms such as "one embodiment," "another embodiment," or "some embodiments," etc., indicate that a specific feature, structure, material, or characteristic described in connection with an embodiment or example is included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0084] Although embodiments of this application have been shown and described, those skilled in the art will understand that various changes, modifications, substitutions and variations can be made to these embodiments without departing from the principles and spirit of this application, the scope of which is defined by the claims and their equivalents.
Claims
1. A method for correcting nonlinear periodic errors in a displacement sensor, characterized in that, The error acquisition range is the actual displacement range of the displacement sensor within multiple repetition cycles; the method includes: The actual displacement range is calculated according to the theoretical range, and the displacement values are collected at equal intervals. Multiple error data corresponding to the displacement sensor are also collected. The error data is subjected to Fourier transform to obtain multiple sets of harmonic parameters; wherein each set of harmonic parameters includes harmonic frequency, harmonic amplitude and harmonic phase; The harmonic parameters are sorted according to the magnitude of the harmonic amplitude, and several groups of harmonic parameters corresponding to the larger harmonic amplitudes are selected to establish an error mathematical model. Based on the aforementioned error mathematical model, the error value corresponding to any original displacement value is calculated; The original displacement value is corrected based on the error value to obtain the corrected target displacement value.
2. The method for correcting nonlinear periodic errors in a displacement sensor according to claim 1, characterized in that, The error acquisition range is the actual displacement range of the displacement sensor within p repetition cycles; where p is a positive integer, and the actual displacement range of the displacement sensor in the k-th repetition cycle is [0, ..., ...]. k is a positive integer, and is less than or equal to p. , This represents the theoretical range of the displacement sensor in each of the repetition cycles. This represents the error value at full scale during the k-th repetition cycle. L represents the full range of the displacement sensor.
3. The method for correcting nonlinear periodic errors in a displacement sensor according to claim 2, characterized in that: The step of calculating equally spaced displacement values according to the theoretical range based on the actual displacement range, and collecting multiple error data corresponding to the displacement sensor, includes: Within the actual displacement range of the k-th repetition cycle, equally spaced displacement values are calculated according to the theoretical range, and m error data points are collected; where m is an even number greater than or equal to 2, and the equally spaced displacement values corresponding to the m error data points of the k-th repetition cycle are 0, ..., ... , … ; The error data is subjected to Fourier transform to obtain multiple sets of harmonic parameters, including Perform a Fourier transform on m error data points to obtain M1 sets of harmonic parameters; where M1 = m / 2, and the harmonic parameters include harmonic frequencies. Harmonic amplitude Harmonic phase ; The step of sorting the harmonic parameters according to the magnitude of the harmonic amplitude and selecting several groups of harmonic parameters corresponding to the larger harmonic amplitudes to establish an error mathematical model includes: The M1 group of harmonic parameters are arranged according to harmonic amplitude. Sort the harmonic parameters from largest to smallest, and use the first n1 groups to establish a mathematical model for multiple repetition cycles of error. The original displacement value within the k-th repetition cycle is then used. The corresponding error value The following error mathematical model was used to determine: in, The range of values for is [0, ...]. ; The step of correcting the original displacement value based on the error value to obtain the corrected target displacement value includes: The corrected target displacement value is determined using the following formula: ; In the formula, This is the corrected target displacement value.
4. The method for correcting nonlinear periodic errors in a displacement sensor according to claim 2, characterized in that: The step of calculating equally spaced displacement values according to the theoretical range based on the actual displacement range, and collecting multiple error data corresponding to the displacement sensor, includes: Within the actual displacement range of each of the p repetition cycles, equally spaced displacement values are calculated according to the theoretical range, and m error data points are collected to obtain a total of q error data points; where m is an even number greater than or equal to 2, and the equally spaced displacement values corresponding to the m error data points of each repetition cycle are 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 1, 2, 1, 2, 3 ... , … , q=mp; The error data is subjected to Fourier transform to obtain multiple sets of harmonic parameters, including The error data corresponding to the same equally spaced displacement values in each of the repetition cycles are summed to obtain m error sum data. Perform a Fourier transform on m error data points to obtain M2 sets of harmonic parameters; where M2 = m / 2, and the harmonic parameters include harmonic frequencies. Harmonic amplitude Harmonic phase ; The step of sorting the harmonic parameters according to the magnitude of the harmonic amplitude and selecting several groups of harmonic parameters corresponding to the larger harmonic amplitudes to establish an error mathematical model includes: The M2 group of harmonic parameters are arranged according to harmonic amplitude. Sort the harmonic parameters from largest to smallest, and use the first n2 groups to establish a mathematical model for multiple repetition cycles of error. For each repetition cycle, any original displacement value... The corresponding error value The following error mathematical model was used to determine: Wherein, the original displacement value in the kth repetition period The range of values for is [0, ...]. ; The step of correcting the original displacement value based on the error value to obtain the corrected target displacement value includes: The corrected target displacement value is determined using the following formula: ; In the formula, This is the corrected target displacement value.
5. The method for correcting nonlinear periodic errors in a displacement sensor according to claim 2, characterized in that: The step of calculating equally spaced displacement values according to the theoretical range based on the actual displacement range, and collecting multiple error data corresponding to the displacement sensor, includes: Within the actual displacement range of each of the p repetition cycles, equally spaced displacement values are calculated according to the theoretical range, and m error data points are collected to obtain a total of q error data points; where m is an even number greater than or equal to 2, and the equally spaced displacement values corresponding to the m error data points of each repetition cycle are 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 1, 2, 1, 2, 3 ... , … , q=mp; The error data is subjected to Fourier transform to obtain multiple sets of harmonic parameters, including The error data corresponding to the same equally spaced displacement values in each of the repetition cycles are summed to obtain m error sum data. For each error and data point, the average is taken p times to obtain the error and average data. Perform Fourier transforms on m error and average data points to obtain M3 sets of harmonic parameters; where M3 = m / 2, and the harmonic parameters include harmonic frequencies. Harmonic amplitude Harmonic phase ; The step of sorting the harmonic parameters according to the magnitude of the harmonic amplitude and selecting several groups of harmonic parameters corresponding to the larger harmonic amplitudes to establish an error mathematical model includes: The M3 group harmonic parameters are arranged according to harmonic amplitude. Sort the harmonic parameters from largest to smallest, and use the first n3 groups to establish a mathematical model for multiple repetition cycles of error. For each repetition cycle, any original displacement value... The corresponding error value The following error mathematical model was used to determine: Wherein, the original displacement value in the kth repetition period The range of values for is [0, ...]. ; The step of correcting the original displacement value based on the error value to obtain the corrected target displacement value includes: The corrected target displacement value is determined using the following formula: ; In the formula, This is the corrected target displacement value.
6. The nonlinear periodic error correction method for a displacement sensor according to claim 3, characterized in that: Before acquiring multiple error data corresponding to the displacement sensor, the method further includes: The actual displacement ranges of p repeated cycles are concatenated to form a continuous actual displacement range across the entire measurement range; where, the first... k The actual displacement corresponding to each repetition cycle is [ , The continuous actual displacement range after splicing p repeated cycles is [0, ... ]; The step of performing a Fourier transform on the error data to obtain multiple sets of harmonic parameters also includes: Perform a Fourier transform on m error data points to obtain M4 sets of harmonic parameters; where M4 = m / 2, and the harmonic parameters include harmonic frequencies. Harmonic amplitude Harmonic phase ; The step of sorting the harmonic parameters according to the magnitude of the harmonic amplitude and selecting several groups of harmonic parameters corresponding to the larger harmonic amplitudes to establish an error mathematical model further includes: The M4 group of harmonic parameters are arranged according to harmonic amplitude. Sort the harmonic parameters from largest to smallest, and use the first n4 groups to establish an error mathematical model for the continuous actual displacement range after splicing multiple repetition cycles. Any original displacement value within the continuous actual displacement range after splicing multiple repetition cycles... The corresponding error value The following error mathematical model was used to determine: in, The range of values for is [0, ...]. ; The step of correcting the original displacement value based on the error value to obtain the corrected target displacement value includes: The corrected target displacement value is determined using the following formula: In the formula, This is the corrected target displacement value.
7. The nonlinear periodic error correction method for a displacement sensor according to claim 4, characterized in that: Before acquiring multiple error data corresponding to the displacement sensor, the method further includes: The actual displacement ranges of p repeated cycles are concatenated to form a continuous actual displacement range across the entire measurement range; where, the first... k The actual displacement corresponding to each repetition cycle is [ , The continuous actual displacement range after splicing p repeated cycles is [0, ... ]; The step of performing a Fourier transform on the error data to obtain multiple sets of harmonic parameters also includes: The error data corresponding to the same equally spaced displacement values in each of the repetition cycles are summed to obtain m error sum data. Perform a Fourier transform on m error data points to obtain M5 sets of harmonic parameters; where M5 = m / 2, and the harmonic parameters include harmonic frequencies. Harmonic amplitude Harmonic phase ; The step of sorting the harmonic parameters according to the magnitude of the harmonic amplitude and selecting several groups of harmonic parameters corresponding to the larger harmonic amplitudes to establish an error mathematical model further includes: The M5 group harmonic parameters are arranged according to harmonic amplitude. Sort the harmonic parameters from largest to smallest, and use the first n5 groups to establish an error mathematical model for the continuous actual displacement range after splicing multiple repetition cycles. Any original displacement value within the continuous actual displacement range after splicing multiple repetition cycles... The corresponding error value The following error mathematical model was used to determine: in, The range of values for is [0, ...]. ]; The step of correcting the original displacement value based on the error value to obtain the corrected target displacement value includes: The corrected target displacement value is determined using the following formula: In the formula, This is the corrected target displacement value.
8. The method for correcting nonlinear periodic errors in a displacement sensor according to claim 5, characterized in that: Before acquiring multiple error data corresponding to the displacement sensor, the method further includes: The actual displacement ranges of p repeated cycles are concatenated to form a continuous actual displacement range across the entire measurement range; where, the first... k The actual displacement corresponding to each repetition cycle is [ , The continuous actual displacement range after splicing p repeated cycles is [0, ... ]; The step of performing a Fourier transform on the error data to obtain multiple sets of harmonic parameters also includes: The error data corresponding to the same equally spaced displacement values in each of the repetition cycles are summed to obtain m error sum data. For each error and data point, the average is taken p times to obtain the error and average data. Perform Fourier transforms on m error and average data points to obtain M6 sets of harmonic parameters; where M6 = m / 2, and the harmonic parameters include harmonic frequencies. Harmonic amplitude Harmonic phase ; The step of sorting the harmonic parameters according to the magnitude of the harmonic amplitude and selecting several groups of harmonic parameters corresponding to the larger harmonic amplitudes to establish an error mathematical model includes: The M6 group of harmonic parameters are arranged according to harmonic amplitude. Sort the harmonic parameters from largest to smallest, and use the first n6 groups to establish an error mathematical model for the continuous actual displacement range after splicing multiple repetition cycles. Any original displacement value within the continuous actual displacement range after splicing multiple repetition cycles... The corresponding error value The following error mathematical model was used to determine: Among them, the original displacement value The range of values for is [0, ...]. ; The step of correcting the original displacement value based on the error value to obtain the corrected target displacement value includes: The corrected target displacement value is determined using the following formula: ; In the formula, This is the corrected target displacement value.
9. The method for correcting nonlinear periodic errors in a displacement sensor according to claim 1, characterized in that, The nonlinear periodic error of the displacement sensor over the full range L is a single-period error; the method further includes: Within the full range L of the displacement sensor, m error data points are sampled at equal displacement intervals. Performing a Fourier transform on m error data points yields M7 sets of harmonic parameters; where M7 = m / 2, and the harmonic parameters include harmonic frequencies. Harmonic amplitude Harmonic phase ; The M7 group harmonic parameters are arranged according to harmonic amplitude. Sort the harmonic parameters from largest to smallest, and use the first n7 groups to establish a mathematical model for the error of a single period. This model is based on any original displacement value within the full range L of the displacement sensor. The corresponding error value The following error mathematical model was used to determine: In the formula, The value range is [0, ; The corrected target displacement value is determined using the following formula: ; In the formula, This is the corrected target displacement value.
10. A displacement sensor, characterized in that, include: At least one processor; At least one memory for storing at least one program; When the at least one program is executed by the at least one processor, the at least one processor implements a nonlinear periodic error correction method for a displacement sensor as described in any one of claims 1-9.