Calibration processing method and device for incremental displacement signal and displacement encoder
The target calibration parameters are determined through the gradient descent algorithm, and linear error correction is performed on the sine cosine signal in the displacement encoder, which solves the problem of non-orthogonal error of the sine cosine signal in the displacement encoder, and realizes high-precision displacement solution.
Patent Information
- Application Number
- CN202510343291.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-21
- Publication Date
- 2025-07-08
AI Technical Summary
The existing arctangent demodulation algorithms have high requirements for cosine signal quality in displacement encoders, and are susceptible to interference to cause DC bias, AC inequality and non-orthogonal errors, affecting the displacement solution accuracy.
The gradient descent algorithm is used to determine the target calibration parameters, and the non-orthogonal error of the cosine signal is corrected through linear error correction and arctangent demodulation processing to achieve efficient and accurate error correction.
The measurement accuracy of the displacement encoder is improved and high-precision displacement solution is achieved.
Smart Images

Figure CN120274696A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of precise displacement measurement, and particularly to a calibration processing method and device for incremental displacement signals and a displacement encoder. Background Art
[0002] Phase resolution is the core technology for laser interferometers and grating interferometers to achieve high-precision displacement measurement. In this technical field, the arctangent demodulation method is currently the most commonly used phase resolution means. However, the arctangent demodulation algorithm faces many challenges in practical applications. This algorithm has extremely high quality requirements for the input incremental displacement signals, including sine signals and cosine signals.
[0003] However, in actual application scenarios, the sine and cosine signals of the displacement encoder are often interfered by various factors, resulting in problems such as DC bias, AC inequality, and non-orthogonal error in the sine and cosine signals. These errors will introduce periodic non-linear errors, seriously affecting the accuracy of displacement resolution.
[0004] Therefore, finding a calibration processing method for incremental displacement signals that can efficiently and accurately correct errors has become a current research hotspot. Summary of the Invention
[0005] The present invention provides a calibration processing method, device and displacement encoder for incremental displacement signals, which can efficiently and accurately correct errors in incremental displacement signals, thereby achieving high-precision displacement resolution.
[0006] The present invention provides a calibration processing method for incremental displacement signals. The method is applied to a displacement encoder and includes: obtaining an incremental displacement signal to be processed, where the incremental displacement signal to be processed is output by the displacement encoder, the incremental displacement signal to be processed includes a sine signal and a cosine signal, and there is a non-orthogonal error between the sine signal and the cosine signal; determining target calibration parameters, where the target calibration parameters at least include calibration error parameters regarding the non-orthogonal error; and based on the target calibration parameters, performing linear error correction on the incremental displacement signal to be processed to obtain a corrected incremental displacement signal.
[0007] According to a calibration processing method for incremental displacement signals provided by the present invention, after obtaining the corrected incremental displacement signal, the method further includes: performing arctangent demodulation processing on the corrected incremental displacement signal to obtain target phase information corresponding to the corrected incremental displacement signal; and based on the target phase information, determining displacement information corresponding to the incremental displacement signal to be processed.
[0008] According to an incremental displacement signal calibration processing method provided by the present invention, the corrected incremental displacement signal includes a corrected sine signal and a corrected cosine signal; based on the target calibration parameter, performing linear error correction on the incremental displacement signal to be processed to obtain the corrected incremental displacement signal, specifically including: based on the target calibration parameter, correcting the sine signal in the incremental displacement signal to be processed to obtain the corrected sine signal; based on the target calibration parameter, correcting the cosine signal in the incremental displacement signal to be processed to obtain the corrected cosine signal.
[0009] According to an incremental displacement signal calibration processing method provided by the present invention, the target calibration parameter is determined in the following manner: based on the target calibration parameter and the sine signal, obtaining a standard sine signal expression represented by the target calibration parameter; based on the target calibration parameter and the cosine signal, obtaining a standard cosine signal expression represented by the target calibration parameter; based on the sine and cosine properties between the standard sine signal expression and the standard cosine signal expression having an orthogonal relationship, determining a loss function; based on the loss function, iteratively updating the target calibration parameter according to the gradient descent algorithm to obtain the final target calibration parameter, so that the loss function corresponding to the final target calibration parameter converges, and taking the final target calibration parameter as the target calibration parameter.
[0010] According to an incremental displacement signal calibration processing method provided by the present invention, determining the loss function based on the sine and cosine properties between the standard sine signal expression and the standard cosine signal expression having an orthogonal relationship is implemented in the following manner: based on the sine and cosine properties between the standard sine signal expression and the standard cosine signal expression having an orthogonal relationship, determining a sine and cosine square relationship expression between the standard sine signal expression and the standard cosine signal expression; based on the sine and cosine square relationship expression and the relationship value of the standard sine and cosine squares, determining the loss function.
[0011] According to an incremental displacement signal calibration processing method provided by the present invention, iteratively updating the target calibration parameter according to the gradient descent algorithm based on the loss function specifically includes: determining the partial derivative of the loss function with respect to the target calibration parameter; adaptively determining the learning rate based on the partial derivatives at different times; iteratively updating the target calibration parameter according to the gradient descent algorithm based on the loss function and the learning rate.
[0012] The present invention also provides a calibration processing device for incremental displacement signals. The device is applied to a displacement encoder and includes: an acquisition module for acquiring an incremental displacement signal to be processed, where the incremental displacement signal to be processed is output by the displacement encoder, and the incremental displacement signal to be processed includes a sine signal and a cosine signal, and there is a non-orthogonal error between the sine signal and the cosine signal; a determination module for determining target calibration parameters, where the target calibration parameters at least include calibration error parameters regarding the non-orthogonal error; and a processing module for performing linear error correction on the incremental displacement signal to be processed based on the target calibration parameters to obtain a corrected incremental displacement signal.
[0013] The present invention also provides a displacement encoder, which includes: a displacement encoder body and a processor, where the processor is used to execute the calibration processing method for incremental displacement signals according to any one of the above.
[0014] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, it implements the calibration processing method for incremental displacement signals as described in any one of the above.
[0015] The present invention also provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it implements the calibration processing method for incremental displacement signals as described in any one of the above.
[0016] The present invention also provides a computer program product, including a computer program. When the computer program is executed by a processor, it implements the calibration processing method for incremental displacement signals as described in any one of the above.
[0017] The calibration processing method, device, and displacement encoder for incremental displacement signals provided by the present invention are applied to a displacement encoder and include: acquiring an incremental displacement signal to be processed, where the incremental displacement signal to be processed is output by the displacement encoder, the incremental displacement signal to be processed includes a sine signal and a cosine signal, and there is a non-orthogonal error between the sine signal and the cosine signal; determining target calibration parameters, where the target calibration parameters at least include calibration error parameters regarding the non-orthogonal error; and performing linear error correction on the incremental displacement signal to be processed based on the target calibration parameters to obtain a corrected incremental displacement signal. It realizes efficient and accurate error correction for the incremental displacement signal to be processed, thereby enabling high-precision displacement calculation. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] To more clearly illustrate the technical solutions in the present invention or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.
[0019] Figure 1 It is one of the schematic flowcharts of the calibration processing method for the incremental displacement signal provided by the present invention.
[0020] Figure 2 It is another schematic flowchart of the calibration processing method for the incremental displacement signal provided by the present invention.
[0021] Figure 3 It is the schematic flowchart of the process for determining the target calibration parameters provided by the present invention.
[0022] Figure 4 It is the schematic flowchart of the process for iteratively updating the target calibration parameters based on the loss function according to the gradient descent algorithm provided by the present invention.
[0023] Figure 5 It is the schematic structural diagram of the calibration processing device for the incremental displacement signal provided by the present invention.
[0024] Figure 6 It is the schematic structural diagram of the electronic device provided by the present invention. Detailed Embodiments
[0025] To make the objectives, technical solutions, and advantages of the present invention clearer, the following will clearly and completely describe the technical solutions in the present invention in conjunction with the drawings in the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts fall within the scope of protection of the present invention.
[0026] The calibration processing method for the incremental displacement signal provided by the present invention uses the gradient descent algorithm to correct the periodic non - linear error in the displacement encoder, thereby improving the measurement accuracy of the displacement encoder.
[0027] Figure 1 It is one of the schematic flowcharts of the calibration processing method for the incremental displacement signal provided by the present invention.
[0028] The following will be combined with Figure 1 to illustrate the process of the calibration processing method for the incremental displacement signal provided by the present invention.
[0029] In an exemplary embodiment of the present invention, the calibration processing method for incremental displacement signals can be applied to a displacement encoder. Among them, the displacement encoder can be an encoder involved in a homodyne, heterodyne interference displacement measurement system, and a laser interference displacement measurement system. Combining Figure 1 it can be known that the calibration processing method for incremental displacement signals can include steps 110 to 130, and each step will be introduced separately below.
[0030] In step 110, an incremental displacement signal to be processed is acquired. Among them, the incremental displacement signal to be processed is output by a displacement encoder, and the incremental displacement signal to be processed includes a sine signal and a cosine signal, and there is a non-orthogonal error between the sine signal and the cosine signal.
[0031] In one embodiment, an incremental displacement signal to be processed output by a displacement encoder can be acquired. Among them, the incremental displacement signal to be processed can include a sine signal and a cosine signal, and there is a non-orthogonal error between the sine signal and the cosine signal.
[0032] In yet another embodiment, the sine signal and the cosine signal included in the incremental displacement signal to be processed can be represented by the following formulas (1)-(2): (1) (2) Among them, and represent the non-zero biases of the two signals, and represent the amplitudes of the two signals, represents the non-orthogonal error of the two signals. can represent the cosine signal in the incremental displacement signal to be processed; can represent the sine signal in the incremental displacement signal to be processed. Due to the existence of , it shows that there is a non-orthogonal error between the sine signal and the cosine signal.
[0033] In step 120, target calibration parameters are determined. Among them, the target calibration parameters at least include calibration error parameters regarding non-orthogonal errors.
[0034] In step 130, based on the target calibration parameters, linear error correction is performed on the incremental displacement signal to be processed to obtain a corrected incremental displacement signal.
[0035] In one embodiment, a calibration parameter (corresponding to the target calibration parameter) can be introduced, where . It can be understood that if the parameter is known, then the ideal sine and cosine signals can be represented by formulas (3) and (4) respectively: (3) (4) Wherein, is an ideal cosine signal, that is, the cosine signal in the corrected incremental displacement signal; is an ideal sine signal, that is, the sine signal in the corrected incremental displacement signal.
[0036] In another embodiment, a target calibration parameter can be determined, wherein the target calibration parameter at least includes a calibration error parameter regarding non-orthogonal error; further, based on the target calibration parameter, a linear error correction is performed on the incremental displacement signal to be processed, so as to obtain a corrected incremental displacement signal. Through this embodiment, it is realized that the incremental displacement signal to be processed can be efficiently and accurately error-corrected, so as to achieve high-precision displacement calculation.
[0037] The calibration processing method for incremental displacement signals provided by the present invention is applied to a displacement encoder, and includes: obtaining an incremental displacement signal to be processed, wherein the incremental displacement signal to be processed is output by the displacement encoder, and the incremental displacement signal to be processed includes a sine signal and a cosine signal, and there is a non-orthogonal error between the sine signal and the cosine signal; determining a target calibration parameter, wherein the target calibration parameter at least includes a calibration error parameter regarding non-orthogonal error; based on the target calibration parameter, performing a linear error correction on the incremental displacement signal to be processed to obtain a corrected incremental displacement signal. It is realized that the incremental displacement signal to be processed can be efficiently and accurately error-corrected, so as to achieve high-precision displacement calculation.
[0038] Figure 2 is the second schematic flow chart of the calibration processing method for incremental displacement signals provided by the present invention.
[0039] Next, the process of another calibration processing method for incremental displacement signals provided by the present invention will be described in conjunction with Figure 2 In step 240, an arctangent demodulation process is performed on the corrected incremental displacement signal to obtain target phase information corresponding to the corrected incremental displacement signal.
[0040] In an exemplary embodiment of the present invention, in conjunction with Figure 2 it can be known that the calibration processing method for incremental displacement signals may include steps 210 to 230, wherein steps 210 to 230 are the same as or similar to steps 110 to 130 respectively, and their specific implementation manners and beneficial effects are referred to the previous description and will not be elaborated in this embodiment. Next, steps 240 and 250 will be introduced respectively.
[0041]
[0042] In step 240, based on the target phase information, the displacement information corresponding to the incremental displacement signal to be processed is determined.
[0043] In one embodiment, continuing with the embodiment described above, according to the properties of sine and cosine, there is the following relationship between equations (4) and (5): . Furthermore, by using the previous equations (3) and (4) to calculate the arctangent, the phase change of the displacement sensor can be obtained, that is, formula (5): (5) In the application process, based on calculating the arctangent, the phase change of the displacement sensor can be obtained, that is, the target phase information corresponding to the corrected incremental displacement signal is obtained, and the displacement information corresponding to the incremental displacement signal to be processed can be determined, thereby achieving high-precision displacement calculation.
[0044] In another exemplary embodiment of the present invention, continuing with the Figure 1 embodiment described above, the corrected incremental displacement signal includes a corrected sine signal and a corrected cosine signal; wherein, based on the target calibration parameter, linear error correction is performed on the incremental displacement signal to be processed to obtain the corrected incremental displacement signal, which can be achieved in the following manner: Based on the target calibration parameter, the sine signal in the incremental displacement signal to be processed is corrected to obtain the corrected sine signal; Based on the target calibration parameter, the cosine signal in the incremental displacement signal to be processed is corrected to obtain the corrected cosine signal.
[0045] In one embodiment, as shown in equations (3) and (4) above, is the target calibration parameter, represents the obtained corrected cosine signal; represents the obtained corrected sine signal. It can be understood that since the target calibration parameter is unknown, therefore, it is necessary to solve the target calibration parameter , so as to obtain the corrected incremental displacement signal, and then high-efficient and accurate error correction of the incremental displacement signal to be processed can be achieved, and high-precision displacement calculation can be realized.
[0046] Figure 3 is a schematic flow chart of determining the target calibration parameter provided by the present invention.
[0047] Next, the process of determining the target calibration parameter provided by the present invention will be described in conjunction with Figure 3 .
[0048] In an exemplary embodiment of the present invention, in conjunction with Figure 3It can be known that determining the target calibration parameter may include steps 310 to 340, and each step will be introduced separately below.
[0049] In step 310, based on the target calibration parameter and the sine signal, a standard sine signal expression represented by the target calibration parameter is obtained.
[0050] In step 320, based on the target calibration parameter and the cosine signal, a standard cosine signal expression represented by the target calibration parameter is obtained.
[0051] It should be noted that in this embodiment, the target calibration parameter is determined based on the gradient descent algorithm. Then, there will be process parameters regarding the target calibration parameter, that is, the target calibration parameter during the process of determining the target calibration parameter. For the sake of distinction, can be used to represent the target calibration parameter during the process. The corrected cosine signal during the corresponding process can be expressed as , that is, corresponding to the standard cosine signal expression represented by the target calibration parameter; the corrected sine signal during the corresponding process can be expressed as , that is, corresponding to the standard sine signal expression represented by the target calibration parameter.
[0052] In step 330, based on the sine-cosine property between the standard sine signal expression and the standard cosine signal expression with an orthogonal relationship, a loss function is determined.
[0053] In step 340, based on the loss function, the target calibration parameter is iteratively updated according to the gradient descent algorithm to obtain the final target calibration parameter, so that the loss function corresponding to the final target calibration parameter converges, and the final target calibration parameter is used as the target calibration parameter.
[0054] In another embodiment, a loss function can be determined based on the sine-cosine property between the standard sine signal expression and the standard cosine signal expression with an orthogonal relationship . Further, the stochastic gradient descent algorithm is used to minimize the loss function, and the calibration parameter can be continuously updated , and finally the calibration parameter can be converged, thereby realizing the correction of the sine-cosine signal. That is, based on the loss function, the target calibration parameter is iteratively updated according to the gradient descent algorithm , to obtain the final target calibration parameter , so that the loss function corresponding to the final target calibration parameter converges, and the final target calibration parameter is used as the target calibration parameter . It can be understood that is 's process value.
[0055] In an exemplary embodiment of the present invention, taking the embodiment described above as an example, based on the sine-cosine property between the standard sine signal expression and the standard cosine signal expression with an orthogonal relationship, a loss function can be determined, which can be implemented in the following manner: Based on the sine-cosine property between the standard sine signal expression and the standard cosine signal expression with an orthogonal relationship, determine the sine-cosine square relationship expression between the standard sine signal expression and the standard cosine signal expression; Based on the sine-cosine square relationship expression and the relationship value of the standard sine-cosine square relationship, determine the loss function.
[0056] In one embodiment, the loss function can be expressed as formula (6): (6) Wherein, represents the loss function; represents the sine-cosine square relationship expression; 1 is the relationship value of the standard sine-cosine square relationship. It can be understood that if the target calibration parameter is more ideal, then the value of is smaller, that is, L is more convergent. Through this embodiment, a relatively ideal target calibration parameter can be quickly determined, thereby laying a foundation for linearly correcting the linear error of the to-be-processed incremental displacement signal based on the target calibration parameter to obtain the corrected incremental displacement signal.
[0057] Figure 4 is a schematic flowchart of the present invention for iteratively updating the target calibration parameter based on the loss function according to the gradient descent algorithm.
[0058] Next, the process of iteratively updating the target calibration parameter based on the loss function according to the gradient descent algorithm will be described in conjunction with Figure 4
[0059] In an exemplary embodiment of the present invention, in conjunction with Figure 4 it can be seen that based on the loss function, iteratively updating the target calibration parameter according to the gradient descent algorithm may include steps 410 to 430, and each step will be introduced separately below.
[0060] In step 410, determine the partial derivative of the loss function with respect to the target calibration parameter.
[0061] In step 420, adaptively determine the learning rate based on the partial derivatives at different times.
[0062] In step 430, based on the loss function and the learning rate, iteratively update the target calibration parameter according to the gradient descent algorithm.
[0063] In one embodiment, the partial derivative of the loss function with respect to the target calibration parameter can be expressed as formula (7): (7) Update the calibration parameter As shown in formula (8): (8) where LR represents the learning rate. By this iterative method, the tracking of the calibration parameter can be achieved, thereby realizing the dynamic suppression of periodic nonlinear errors.
[0064] However, the selection of the learning rate is crucial, and different learning rates affect the final suppression accuracy. Therefore, in order to obtain the optimal learning rate and be able to adapt to different application scenarios, here the adaptive learning rate gradient descent algorithm is used to optimize the calibration parameter, thereby improving the phase resolution accuracy of the displacement encoder.
[0065] In one embodiment, the learning rate can be adaptively determined based on the partial derivatives at different times; further, based on the loss function and the learning rate, the target calibration parameter is iteratively updated according to the gradient descent algorithm.
[0066] In one example, the adaptive learning rate gradient descent algorithm studies the learning rate component by dividing the learning rate by the square root of S, where S represents the cumulative sum of the current and past squared gradients, that is, the cumulative sum of the squares of the partial derivatives, and can be expressed as formula (9): (9) where , represents the cumulative sum of the squares of the partial derivatives at the current time, t represents the time information; the initial value of the initial S is set to 0, and ϵ is a fuzzy factor, which is a very small floating-point value to ensure that the denominator will never be equal to zero.
[0067] As a variation, gradient descent can also be based on the momentum algorithm. Among them, the momentum algorithm uses the gradient with momentum instead of the current gradient to update the parameter, and can be expressed as formula (10): (10) where α is the learning rate, represents the gradient with momentum, and the initial value can be set to 0, and is generally set to 0.9.
[0068] As another variation, gradient descent can also be based on the root mean square propagation algorithm. It uses exponentially weighted averaging instead of using the cumulative squared gradient sum. The root mean square propagation algorithm can be expressed as formula (11): , (11) Among them, the initial value can be set to 0, can be set to 0.001, can be set to 0.9, and ϵ can be set to 10 -6 .
[0069] As another variation, gradient descent can also be performed based on an adaptive increment algorithm, which is an algorithm that adapts to the learning rate. By introducing exponentially weighted averages D and S, the learning rate in the stochastic gradient descent algorithm is replaced. Its formula is expressed as formula (12): (12) Among them, , the initial values of D and S are set to 0, can be set to 0.9, and ϵ can be set to 10 -6 , where D represents the cumulative sum of changes in the target calibration parameter; S represents the cumulative sum of changes in the descending gradient.
[0070] According to the foregoing description, it can be seen that for the calibration processing method of the incremental displacement signal provided by the present invention, the periodic nonlinear error suppression algorithm based on gradient descent is simpler and consumes less resources. Therefore, its applicable range is wider; for the time-varying periodic nonlinear error caused by environmental factors, higher-precision suppression can be achieved, and the periodic nonlinear error can be suppressed in real time and dynamically.
[0071] Next, the calibration processing device for the incremental displacement signal provided by the present invention will be described. The calibration processing device for the incremental displacement signal described below can be correspondingly referred to the calibration processing method for the incremental displacement signal described above.
[0072] Figure 5 is a schematic structural diagram of the calibration processing device for the incremental displacement signal provided by the present invention.
[0073] Next, the structure of the calibration processing device for the incremental displacement signal provided by the present invention will be described in conjunction with Figure 5 to illustrate the structure of the calibration processing device for the incremental displacement signal provided by the present invention.
[0074] In an exemplary embodiment of the present invention, the calibration processing device for the incremental displacement signal can be applied to a displacement encoder. Combining Figure 5 it can be seen that the calibration processing device for the incremental displacement signal includes an acquisition module 510, a determination module 520, and a processing module 530. Each module will be introduced separately below.
[0075] An acquisition module 510 can be configured to acquire an incremental displacement signal to be processed, where the incremental displacement signal to be processed is output by the displacement encoder, and the incremental displacement signal to be processed includes a sine signal and a cosine signal, and there is a non - orthogonal error between the sine signal and the cosine signal; A determination module 520 can be configured to determine target calibration parameters, where the target calibration parameters at least include calibration error parameters regarding the non - orthogonal error; A processing module 530 can be configured to perform linear error correction on the incremental displacement signal to be processed based on the target calibration parameters to obtain a corrected incremental displacement signal.
[0076] In an exemplary embodiment of the present invention, the processing module 530 can also be configured to: Perform arctangent demodulation processing on the corrected incremental displacement signal to obtain target phase information corresponding to the corrected incremental displacement signal; Determine displacement information corresponding to the incremental displacement signal to be processed based on the target phase information.
[0077] In an exemplary embodiment of the present invention, the corrected incremental displacement signal includes a corrected sine signal and a corrected cosine signal; The processing module 530 can implement performing linear error correction on the incremental displacement signal to be processed based on the target calibration parameters to obtain a corrected incremental displacement signal in the following manner: Correct the sine signal in the incremental displacement signal to be processed based on the target calibration parameters to obtain the corrected sine signal; Correct the cosine signal in the incremental displacement signal to be processed based on the target calibration parameters to obtain the corrected cosine signal.
[0078] In an exemplary embodiment of the present invention, the determination module 520 can implement determining the target calibration parameters in the following manner: Based on the target calibration parameters and the sine signal, obtain a standard sine signal expression represented by the target calibration parameters; Based on the target calibration parameters and the cosine signal, obtain a standard cosine signal expression represented by the target calibration parameters; Based on the sine - cosine property between the standard sine signal expression and the standard cosine signal expression having an orthogonal relationship, determine a loss function; Based on the loss function, iteratively update the target calibration parameters according to the gradient descent algorithm to obtain the final target calibration parameters, so that the loss function corresponding to the final target calibration parameters converges, and use the final target calibration parameters as the target calibration parameters.
[0079] In an exemplary embodiment of the present invention, the determining module 520 may implement the determination of the loss function based on the sine-cosine property between the standard sine signal expression and the standard cosine signal expression having an orthogonal relationship in the following manner: Based on the sine-cosine property between the standard sine signal expression and the standard cosine signal expression having an orthogonal relationship, determine the sine-cosine square relationship expression between the standard sine signal expression and the standard cosine signal expression; Based on the sine-cosine square relationship expression and the relational value of the standard sine-cosine square relationship, determine the loss function.
[0080] In an exemplary embodiment of the present invention, the determining module 520 may implement the iterative update of the target calibration parameter according to the gradient descent algorithm based on the loss function in the following manner: Determine the partial derivative of the loss function with respect to the target calibration parameter; Based on the partial derivatives at different times, adaptively determine the learning rate; Based on the loss function and the learning rate, iteratively update the target calibration parameter according to the gradient descent algorithm.
[0081] Based on the same inventive concept, the present invention further provides a displacement encoder, and the structure of the displacement encoder will be described below in conjunction with the following embodiments.
[0082] In an exemplary embodiment of the present invention, the displacement encoder may include: a displacement encoder body and a processor, wherein the processor is configured to execute the calibration processing method of the incremental displacement signal described in any one of the foregoing items. Through this embodiment, it is possible to efficiently and accurately correct the error of the incremental displacement signal to be processed, thereby enabling high-precision displacement calculation.
[0083] Figure 6 Illustrates a schematic physical structure diagram of an electronic device, such as Figure 6As shown in the figure, the electronic device may include: a processor 610, a communications interface 620, a memory 630, and a communication bus 640. Among them, the processor 610, the communications interface 620, and the memory 630 complete communication with each other through the communication bus 640. The processor 610 may call logic instructions in the memory 630 to execute a calibration processing method for incremental displacement signals. The method is applied to a displacement encoder and includes: obtaining an incremental displacement signal to be processed, where the incremental displacement signal to be processed is output by the displacement encoder, and the incremental displacement signal to be processed includes a sine signal and a cosine signal, and there is a non-orthogonal error between the sine signal and the cosine signal; determining target calibration parameters, where the target calibration parameters at least include calibration error parameters regarding the non-orthogonal error; and based on the target calibration parameters, performing linear error correction on the incremental displacement signal to be processed to obtain a corrected incremental displacement signal.
[0084] In addition, when the logic instructions in the above-mentioned memory 630 are implemented in the form of software functional units and sold or used as independent products, they may be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of this technical solution, may be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present invention. The foregoing storage medium includes: various media such as a USB flash drive, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk, or an optical disc that can store program codes.
[0085] On the other hand, the present invention also provides a computer program product, which includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the calibration processing method of the incremental displacement signal provided by the above-mentioned various methods. The method is applied to a displacement encoder, and the method includes: obtaining an incremental displacement signal to be processed, where the incremental displacement signal to be processed is output by the displacement encoder, the incremental displacement signal to be processed includes a sine signal and a cosine signal, and there is a non-orthogonal error between the sine signal and the cosine signal; determining target calibration parameters, where the target calibration parameters at least include calibration error parameters regarding the non-orthogonal error; and based on the target calibration parameters, performing linear error correction on the incremental displacement signal to be processed to obtain a corrected incremental displacement signal.
[0086] In another aspect, the present invention also provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it is implemented to execute the calibration processing method of the incremental displacement signal provided by the above-mentioned various methods. The method is applied to a displacement encoder, and the method includes: obtaining an incremental displacement signal to be processed, where the incremental displacement signal to be processed is output by the displacement encoder, the incremental displacement signal to be processed includes a sine signal and a cosine signal, and there is a non-orthogonal error between the sine signal and the cosine signal; determining target calibration parameters, where the target calibration parameters at least include calibration error parameters regarding the non-orthogonal error; and based on the target calibration parameters, performing linear error correction on the incremental displacement signal to be processed to obtain a corrected incremental displacement signal.
[0087] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art can understand and implement it without creative efforts.
[0088] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on such an understanding, the essence of the above technical solution, or the part that contributes to the prior art, can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0089] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A calibration processing method for incremental displacement signals, characterized in that The method is applied to a displacement encoder, and the method includes: Obtain an incremental displacement signal to be processed, where the incremental displacement signal to be processed is output by the displacement encoder, the incremental displacement signal to be processed includes a sine signal and a cosine signal, and there is a non-orthogonal error between the sine signal and the cosine signal; Determine target calibration parameters, where the target calibration parameters at least include calibration error parameters regarding the non-orthogonal error; Based on the target calibration parameters, perform linear error correction on the incremental displacement signal to be processed to obtain a corrected incremental displacement signal.
2. The calibration processing method for the incremental displacement signal according to claim 1, wherein After obtaining the corrected incremental displacement signal, the method further includes: Perform arctangent demodulation processing on the corrected incremental displacement signal to obtain target phase information corresponding to the corrected incremental displacement signal; Based on the target phase information, determine displacement information corresponding to the incremental displacement signal to be processed.
3. The calibration processing method for the incremental displacement signal according to claim 1 or 2, characterized in that The corrected incremental displacement signal includes a corrected sine signal and a corrected cosine signal; The step of performing linear error correction on the incremental displacement signal to be processed based on the target calibration parameters to obtain a corrected incremental displacement signal specifically includes: Based on the target calibration parameters, correct the sine signal in the incremental displacement signal to be processed to obtain the corrected sine signal; Based on the target calibration parameters, correct the cosine signal in the incremental displacement signal to be processed to obtain the corrected cosine signal.
4. The calibration processing method for the incremental displacement signal according to claim 3, characterized in that, The target calibration parameters are determined in the following manner: Based on the target calibration parameters and the sine signal, obtain a standard sine signal expression represented by the target calibration parameters; Based on the target calibration parameters and the cosine signal, obtain a standard cosine signal expression represented by the target calibration parameters; Based on the sine and cosine properties between the standard sine signal expression and the standard cosine signal expression having an orthogonal relationship, determine a loss function; Based on the loss function, iteratively update the target calibration parameters according to the gradient descent algorithm to obtain the final target calibration parameters, so that the loss function corresponding to the final target calibration parameters converges, and use the final target calibration parameters as the target calibration parameters.
5. The calibration processing method for the incremental displacement signal according to claim 4, wherein Determining the loss function based on the sine and cosine properties between the standard sine signal expression and the standard cosine signal expression having an orthogonal relationship is implemented in the following manner: Based on the sine and cosine properties between the standard sine signal expression and the standard cosine signal expression having an orthogonal relationship, determine a sine-cosine square relationship expression between the standard sine signal expression and the standard cosine signal expression; Based on the sine-cosine square relationship expression and the relationship value of the standard sine-cosine square, determine the loss function.
6. The calibration processing method for the incremental displacement signal according to claim 4, characterized in that The step of iteratively updating the target calibration parameters according to the gradient descent algorithm based on the loss function specifically includes: Determine the partial derivative of the loss function with respect to the target calibration parameters; Based on the partial derivatives at different times, adaptively determine the learning rate; Based on the loss function and the learning rate, iteratively update the target calibration parameters according to the gradient descent algorithm.
7. A calibration processing device for incremental displacement signals, characterized in that, The device is applied to a displacement encoder, and the device includes: An acquisition module, configured to acquire an incremental displacement signal to be processed, where the incremental displacement signal to be processed is output by the displacement encoder, the incremental displacement signal to be processed includes a sine signal and a cosine signal, and there is a non-orthogonal error between the sine signal and the cosine signal; A determination module, configured to determine target calibration parameters, where the target calibration parameters at least include calibration error parameters regarding the non-orthogonal error; A processing module, configured to perform linear error correction on the incremental displacement signal to be processed based on the target calibration parameters to obtain a corrected incremental displacement signal.
8. A displacement encoder, characterized in that, The displacement encoder includes: A displacement encoder body, and A processor, where the processor is configured to execute the calibration processing method of the incremental displacement signal according to any one of claims 1 to 6.
9. An electronic device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein, When the processor executes the computer program, it implements the calibration processing method of the incremental displacement signal according to any one of claims 1 to 6.
10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the calibration processing method of the incremental displacement signal according to any one of claims 1 to 6.