Incremental displacement signal processing method and device, displacement encoder and electronic equipment
通过泰勒级数展开和解卷绕处理的增量位移信号处理方法,解决了传统编码器在高精度测量中精度不足的问题,实现了nm级的位移信息测量精度。
Patent Information
- Application Number
- CN202510343289.5
- 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
Traditional displacement encoders find it difficult to achieve the expected accuracy level when high-precision measurement requirements, and existing measurement methods and interpolation algorithms are difficult to meet the requirements of resolution, accuracy and response speed.
The incremental displacement signal processing method is adopted to obtain the sinusoidal signal and cosine signal, and the linear triangular wave function is constructed by performing Taylor series expansion, combining the unwinding process and slope correction to realize linearization of the displacement signal.
The measurement accuracy of displacement information is improved, the encoder position error caused by model error is reduced, and the nm-level precision measurement is realized.
Smart Images

Figure CN120274693A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of precise displacement measurement, and particularly relates to an incremental displacement signal processing method, device, displacement encoder and electronic device. Background Art
[0002] As known from related technologies, displacement encoders are widely used in advanced manufacturing, precision measurement equipment, precision motion control systems, and fault diagnosis systems. Displacement encoders usually use sine signals to represent displacement information, and usually use the grating pitch as the measurement reference, and their measurement accuracy can reach the um level.
[0003] With the development of technology and the increasing improvement of user requirements, the requirements for the resolution, accuracy, and response speed of displacement encoders are becoming increasingly strict. Traditional measurement methods and interpolation algorithms often fail to reach the expected accuracy level when facing high-precision precision measurement requirements, which to a certain extent limits the technological progress and application expansion in related fields.
[0004] Therefore, finding an incremental displacement signal processing method that can perform high-precision processing on incremental displacement signals has become a current research hotspot. Summary of the Invention
[0005] The present invention provides an incremental displacement signal processing method, device, displacement encoder and electronic device, which can perform linearization processing on incremental displacement signals, thereby improving the measurement accuracy of displacement information obtained based on incremental displacement signals.
[0006] The present invention provides an incremental displacement signal processing method, which is applied to a displacement encoder. The method includes: 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 two sine signals and cosine signals with a 90-degree phase difference; obtaining a processed linear triangular wave corresponding to the incremental displacement signal to be processed based on the incremental displacement signal to be processed, where the processed linear triangular wave has a linear relationship with the sine signal and the cosine signal in the incremental displacement signal to be processed; performing an unwrapping process on the processed linear triangular wave to obtain an unwrapped phase; and determining displacement information corresponding to the incremental displacement signal to be processed based on the unwrapped phase.
[0007] An incremental displacement signal processing method provided by the present invention, before obtaining a processed linear triangular wave corresponding to the incremental displacement signal to be processed based on the incremental displacement signal to be processed, the method further includes: obtaining a standard triangular wave function, and performing Taylor series expansion on the standard triangular wave function with the sine function and the cosine function as variables respectively, to obtain the arcsine function after Taylor series expansion and the arccosine function after Taylor series expansion; constructing a linear triangular wave function about the standard triangular wave function based on the arcsine function after Taylor series expansion and the arccosine function after Taylor series expansion, wherein the linear triangular wave function has a linear relationship with the sine function and the cosine function; the obtaining a processed linear triangular wave corresponding to the incremental displacement signal to be processed based on the incremental displacement signal to be processed specifically includes: obtaining a processed linear triangular wave corresponding to the incremental displacement signal to be processed based on the sine signal and the cosine signal in the incremental displacement signal to be processed and the linear triangular wave function about the standard triangular wave function.
[0008] An incremental displacement signal processing method provided by the present invention, after obtaining a processed linear triangular wave corresponding to the incremental displacement signal to be processed, the method further includes: correcting the slope of the processed linear triangular wave to obtain a sawtooth wave corresponding to the processed linear triangular wave; the performing an unwrapping process on the processed linear triangular wave to obtain an unwrapped phase specifically includes: performing an unwrapping process on the sawtooth wave corresponding to the processed linear triangular wave to obtain an unwrapped phase.
[0009] An incremental displacement signal processing method provided by the present invention, the correcting the slope of the processed linear triangular wave to obtain a sawtooth wave corresponding to the processed linear triangular wave specifically includes: respectively converting the sine signal and the cosine signal in the incremental displacement signal to be processed into square wave signals, wherein the value of the square wave signal is 0 or 1; correcting the slope of the processed linear triangular wave based on the square wave signals to obtain a sawtooth wave corresponding to the processed linear triangular wave.
[0010] An incremental displacement signal processing method provided by the present invention, wherein the square wave signal includes a first square wave signal and a second square wave signal. Among them, the first square wave signal matches the sine signal; the second square wave signal matches the cosine signal; based on the square wave signal, the slope of the processed linear triangular wave is corrected to obtain a sawtooth wave corresponding to the processed linear triangular wave, specifically including: performing a logical exclusive OR operation on the first square wave signal and the second square wave signal to obtain a first judgment value; when the first judgment value is 1, multiplying the processed linear triangular wave by a negative value to obtain a sawtooth wave corresponding to the processed linear triangular wave.
[0011] An incremental displacement signal processing method provided by the present invention, wherein the square wave signal includes a first square wave signal and a second square wave signal. Among them, the first square wave signal matches the sine signal; the second square wave signal matches the cosine signal; based on the square wave signal, the slope of the processed linear triangular wave is corrected to obtain a sawtooth wave corresponding to the processed linear triangular wave, specifically including: performing a logical exclusive OR operation on the first square wave signal and the second square wave signal to obtain a first judgment value; when the first judgment value is 0, using the processed linear triangular wave as the sawtooth wave corresponding to the processed linear triangular wave.
[0012] The present invention also provides an incremental displacement signal processing device, which is applied to a displacement encoder. The device includes: an acquisition module for acquiring 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 two sine signals and cosine signals with a phase difference of 90 degrees; a processing module for obtaining a processed linear triangular wave corresponding to the incremental displacement signal to be processed based on the incremental displacement signal to be processed, wherein the processed linear triangular wave has a linear relationship with the sine signal and the cosine signal in the incremental displacement signal to be processed; an unwrapping module for performing an unwrapping process on the processed linear triangular wave to obtain an unwrapped phase; a generation module for determining displacement information corresponding to the incremental displacement signal to be processed based on the unwrapped phase.
[0013] The present invention also provides a displacement encoder, which includes: a displacement encoder body and a processor, wherein the processor is used to execute any one of the incremental displacement signal processing methods.
[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 any one of the above-mentioned incremental displacement signal processing methods.
[0015] The present invention also provides a non-transitory computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the incremental displacement signal processing method as described in any one of the above is implemented.
[0016] The present invention also provides a computer program product, including a computer program, and when the computer program is executed by a processor, the incremental displacement signal processing method as described in any one of the above is implemented.
[0017] The incremental displacement signal processing method, device, displacement encoder and electronic device provided by the present invention, the method is applied to a displacement encoder, and the method includes: obtaining an incremental displacement signal to be processed, wherein the incremental displacement signal to be processed is output by a displacement encoder, and the incremental displacement signal to be processed includes two sine signals and cosine signals with a phase difference of 90 degrees; based on the incremental displacement signal to be processed, obtaining a processed linear triangular wave corresponding to the incremental displacement signal to be processed, wherein the processed linear triangular wave has a linear relationship with the sine signal and the cosine signal in the incremental displacement signal to be processed; performing an unwrapping process on the processed linear triangular wave to obtain an unwrapped phase; and determining displacement information corresponding to the incremental displacement signal to be processed based on the unwrapped phase. The linearization process of the incremental displacement signal is realized, so that the measurement accuracy of the displacement information obtained based on the incremental displacement signal can be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order 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, other drawings can be obtained based on these drawings without creative efforts.
[0019] Figure 1 It is a schematic flowchart of the incremental displacement signal processing method provided by the present invention.
[0020] Figure 2 It is a schematic flowchart of obtaining a processed linear triangular wave corresponding to the incremental displacement signal to be processed based on the incremental displacement signal to be processed provided by the present invention.
[0021] Figure 3 It is a schematic flowchart of performing an unwrapping process on the processed linear triangular wave to obtain an unwrapped phase provided by the present invention.
[0022] Figure 4 It is a schematic flowchart of correcting the slope of the processed linear triangular wave based on the square wave signal to obtain a sawtooth wave corresponding to the processed linear triangular wave provided by the present invention.
[0023] Figure 5 It is a schematic structural diagram of the incremental displacement signal processing device provided by the present invention.
[0024] Figure 6 It is a schematic structural diagram of the electronic device provided by the present invention. Specific embodiments
[0025] To make the objectives, technical solutions and advantages of the present invention clearer, the technical solutions in the present invention will be clearly and completely described below with reference to the accompanying drawings in the present invention. Apparently, 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 in the present invention without making creative efforts shall fall within the protection scope of the present invention.
[0026] The incremental displacement signal processing method provided by the present invention proposes a new linearization model (corresponding to the processing process of the incremental displacement signal processing method) based on Taylor expansion. This model can achieve higher-precision interpolation and can meet the application of encoders in the field of nm-level precision measurement. The incremental displacement signal processing method provided by the present invention can better linearize the sine signal of the encoder, thereby reducing the encoder position error caused by model errors and improving the accuracy of position measurement. This algorithm has the advantages of a simple model, no need to correct the linearization coefficient later, and small memory resource consumption.
[0027] The incremental displacement signal processing method provided by the present invention is to convert the high-order non-linear terms of the sine and cosine signals output by the encoder into a very perfect linear signal. There is a strong linear relationship between this signal and the encoder displacement, so the displacement signal of the encoder can be calculated by linear transformation.
[0028] Figure 1 It is a schematic flow diagram of the incremental displacement signal processing method provided by the present invention.
[0029] The following will be combined with Figure 1 to illustrate the process of the incremental displacement signal processing method provided by the present invention.
[0030] In an exemplary embodiment of the present invention, the incremental displacement signal processing method can be applied to a displacement encoder. Combining Figure 1 it can be seen that the incremental displacement signal processing method provided by the present invention may include steps 110 to 140, and each step will be introduced below.
[0031] In step 110, an incremental displacement signal to be processed is obtained, where the incremental displacement signal to be processed is output by a displacement encoder, and the incremental displacement signal to be processed includes two sine signals and cosine signals with a phase difference of 90 degrees.
[0032] In one embodiment, an incremental displacement signal to be processed can be obtained. Among them, the incremental displacement signal to be processed can be output by a displacement encoder. In one example, the incremental displacement signal to be processed can include a sine signal and a cosine signal with a 90-degree phase difference. In another example, the sine signal and the cosine signal with a 90-degree phase difference can be respectively expressed as the following formulas (1) and (2): (1) (2) Where A is the amplitude, is the electronic phase. It can be understood that the corresponding displacement information can be determined based on the electronic phase. It can be understood that the conversion relationship between the displacement information and the phase can be expressed as the following formula (3): (3) Where represents the grating pitch of the grating interferometer. To demodulate the displacement of the encoder, it is necessary to perform phase resolution and direction identification on the and signals.
[0033] In step 120, based on the incremental displacement signal to be processed, a processed linear triangular wave corresponding to the incremental displacement signal to be processed is obtained, where the processed linear triangular wave has a linear relationship with the sine signal and the cosine signal in the incremental displacement signal to be processed.
[0034] In another embodiment, a processed linear triangular wave corresponding to the incremental displacement signal to be processed can be obtained based on the incremental displacement signal to be processed, where the processed linear triangular wave has a linear relationship with the sine signal and the cosine signal in the incremental displacement signal to be processed.
[0035] In the application process, through Taylor series expansion, a processed linear triangular wave corresponding to the incremental displacement signal to be processed can be obtained based on the incremental displacement signal to be processed, so as to convert the high-order non-linear terms of the sine and cosine signals output by the encoder into linear signals. Among them, the specific process of obtaining the processed linear triangular wave corresponding to the incremental displacement signal to be processed based on the incremental displacement signal to be processed will be described below and will not be elaborated here.
[0036] In step 130, the unwrapping process is performed on the processed linear triangular wave to obtain the phase after the unwrapping process.
[0037] In step 140, based on the phase after the unwrapping process, the displacement information corresponding to the incremental displacement signal to be processed is determined.
[0038] In yet another embodiment, the processed linear triangular wave can be unwrapped to obtain the unwrapped phase. Through this embodiment, it is possible to and perform phase resolution on the signals to obtain the unwrapped phase . Further, based on the linear correspondence between the unwrapped phase and the displacement information, the displacement information corresponding to the incremental displacement signal to be processed can be obtained. Through this embodiment, linearization processing of the incremental displacement signal is realized, thereby improving the measurement accuracy of the displacement information obtained based on the incremental displacement signal.
[0039] The method for processing an incremental displacement signal provided by the present invention is applied to a displacement encoder. 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 and includes two sine signals and cosine signals with a phase difference of 90 degrees; based on the incremental displacement signal to be processed, obtaining a processed linear triangular wave corresponding to the incremental displacement signal to be processed, where the processed linear triangular wave has a linear relationship with the sine signal and the cosine signal in the incremental displacement signal to be processed; performing an unwrapping process on the processed linear triangular wave to obtain an unwrapped phase; and based on the unwrapped phase, determining the displacement information corresponding to the incremental displacement signal to be processed. Realize linearization processing of the incremental displacement signal, thereby improving the measurement accuracy of the displacement information obtained based on the incremental displacement signal.
[0040] Figure 2 is a schematic flow chart of obtaining a processed linear triangular wave corresponding to the incremental displacement signal to be processed provided by the present invention.
[0041] Next, the process of obtaining a processed linear triangular wave corresponding to the incremental displacement signal to be processed will be described in conjunction with Figure 2 .
[0042] In an exemplary embodiment of the present invention, in conjunction with Figure 2 it can be seen that obtaining a processed linear triangular wave corresponding to the incremental displacement signal to be processed may include steps 210 to 230, and each step will be introduced separately below.
[0043] In step 210, a standard triangular wave function is obtained, and the standard triangular wave function is expanded into a Taylor series with the sine function and the cosine function as variables respectively, to obtain the Taylor series-expanded arcsine function and the Taylor series-expanded arccosine function.
[0044] In one embodiment, a standard triangular wave function can be obtained, such as a normalized standard triangular wave function. Further, the standard triangular wave function is expanded into a Taylor series with the sine function and the cosine function as variables respectively, to obtain the arcsine function after Taylor series expansion and the arccosine function after Taylor series expansion.
[0045] In another embodiment, the standard triangular wave function can be expressed as formula (4): (4) where represents the standard triangular wave function; represents the sine function.
[0046] Further, formula (4) can be expanded into a Taylor series with as the variable, and the arcsine function after Taylor series expansion can be obtained, as shown in formula (5): (5) where represents the arcsine function after Taylor series expansion; …… represents the coefficient.
[0047] Further, formula (4) can be expanded into a Taylor series with as the variable, and the arccosine function after Taylor series expansion can be obtained, as shown in formula (6): (6) where represents the arccosine function after Taylor series expansion; …… represents the coefficient.
[0048] In step 220, a linear triangular wave function with respect to the standard triangular wave function is constructed based on the arcsine function after Taylor series expansion and the arccosine function after Taylor series expansion, where the linear triangular wave function has a linear relationship with the sine function and the cosine function.
[0049] In another embodiment, a linear combination of , can be made, that is, a linear triangular wave function with respect to the standard triangular wave function is constructed based on the arcsine function after Taylor series expansion and the arccosine function after Taylor series expansion, and formula (7) can be obtained: (7) where n is a positive integer. It can be seen from formula (7) that It is mainly composed of |sin(θ)|, |cos(θ)| and their higher-order terms. Therefore, as long as the order n is large enough, theoretically, and The error between can be infinitely close to 0. The coefficients A and B can be obtained by linear fitting. When n is equal to 9, and The error between is less than . It shows that the linear triangular wave function of the standard triangular wave function obtained based on the foregoing processing has a very small difference from the standard triangular wave function, so that the linearization of the incremental signal can be realized, and the linearization accuracy is very high, greatly reducing the position error introduced by the signal linearization.
[0050] In step 230, based on the sine signal and cosine signal in the incremental displacement signal to be processed, and the linear triangular wave function of the standard triangular wave function, a processed linear triangular wave corresponding to the incremental displacement signal to be processed is obtained.
[0051] In another embodiment, based on the sine signal and cosine signal in the incremental displacement signal to be processed, and the linear triangular wave function of the standard triangular wave function, a processed linear triangular wave corresponding to the incremental displacement signal to be processed can be obtained. It can be understood that the difference between the processed linear triangular wave corresponding to the incremental displacement signal to be processed and the linear triangular wave function of the standard triangular wave function lies in substituting specific values, and their underlying physical meanings are the same. In this embodiment, the processed linear triangular wave corresponding to the incremental displacement signal to be processed can also be expressed as . Through this embodiment, the linearization of the incremental signal can be realized, and the linearization accuracy is very high, greatly reducing the position error introduced by the signal linearization.
[0052] Figure 3 is a schematic flow chart of the unwrapping process of the processed linear triangular wave provided by the present invention to obtain the unwrapped phase.
[0053] Next, the process of unwrapping the processed linear triangular wave to obtain the unwrapped phase will be described in conjunction with Figure 3 .
[0054] In an exemplary embodiment of the present invention, in conjunction with Figure 3 it can be seen that the process of unwrapping the processed linear triangular wave to obtain the unwrapped phase may include step 310 and step 320. Each step will be introduced separately below.
[0055] In step 310, the slope of the processed linear triangular wave is corrected to obtain a sawtooth wave corresponding to the processed linear triangular wave.
[0056] In step 320, the unwrapping process is performed on the sawtooth wave corresponding to the processed linear triangular wave to obtain the unwrapped phase.
[0057] In one embodiment, in order to make the displacement signal and the phase have a completely linear relationship, it is also necessary to correct the slope of the processed linear triangular wave so as to obtain a sawtooth wave corresponding to the processed linear triangular wave. Further, the unwrapping process is performed on the sawtooth wave corresponding to the processed linear triangular wave, so as to obtain the unwrapped phase. Through this embodiment, the completely linear relationship between the displacement signal and the phase (corresponding to the unwrapped phase) can be further improved, laying a foundation for obtaining displacement information with higher measurement accuracy.
[0058] In another exemplary embodiment of the present invention, continuing with the example described above Figure 3 as an example for illustration, wherein, the correction of the slope of the processed linear triangular wave to obtain the sawtooth wave corresponding to the processed linear triangular wave can be implemented in the following manner: The sine signal and the cosine signal in the displacement signal to be processed are respectively converted into square wave signals, wherein the value of the square wave signal is 0 or 1; Based on the square wave signals, the slope of the processed linear triangular wave is corrected to obtain a sawtooth wave corresponding to the processed linear triangular wave.
[0059] In one embodiment, the sine signal and the cosine signal in the displacement signal to be processed can be respectively converted into square wave signals, that is, converted into a first square wave signal and a second square wave signal . Wherein, the value of the square wave signal can be 0 or 1. Further, based on the square wave signals, the slope of the processed linear triangular wave is corrected to obtain a sawtooth wave corresponding to the processed linear triangular wave.
[0060] In another embodiment, the sine signal and the cosine signal in the displacement signal to be processed are converted into square wave signals, that is, converted into a first square wave signal and a second square wave signal , which can be represented by the following formulas (8) and (9): (8) (9) Figure 4 is a schematic flow chart provided by the present invention for correcting the slope of the processed linear triangular wave based on the square wave signals to obtain a sawtooth wave corresponding to the processed linear triangular wave.
[0061] Next, it will be combined with Figure 4A process of correcting the slope of the processed linear triangular wave based on the square wave signal to obtain a sawtooth wave corresponding to the processed linear triangular wave will be described.
[0062] In an exemplary embodiment of the present invention, in combination with Figure 4 it can be known that correcting the slope of the processed linear triangular wave based on the square wave signal to obtain a sawtooth wave corresponding to the processed linear triangular wave may include steps 410 to 430, and each step will be introduced separately below.
[0063] In step 410, a logical exclusive OR operation is performed on the first square wave signal and the second square wave signal to obtain a first judgment value.
[0064] In step 420, when the first judgment value is 1, the processed linear triangular wave is multiplied by a negative value to obtain a sawtooth wave corresponding to the processed linear triangular wave.
[0065] In step 430, when the first judgment value is 0, the processed linear triangular wave is used as the sawtooth wave corresponding to the processed linear triangular wave.
[0066] In one embodiment, it can be obtained by performing a logical exclusive OR operation with to obtain , that is, obtaining the first judgment value. Among them, can be represented by the following formula (10): (10) In another embodiment, when has a value of 1, is multiplied by -1, and when has a value of 0, remains unchanged. That is, when the first judgment value is 1, the processed linear triangular wave is multiplied by a negative value to obtain a sawtooth wave corresponding to the processed linear triangular wave; when the first judgment value is 0, the processed linear triangular wave is used as the sawtooth wave corresponding to the processed linear triangular wave. This process can be expressed as formula (11): (11) Among them, represents the sawtooth wave corresponding to the processed linear triangular wave.
[0067] In another embodiment, formula (12) can also be set: (12) That is, performs a logical NOT operation to obtain .
[0068] During the application process, by combining formulas (10), (11), and (12), it is possible to perform unwinding to obtain the phase , that is, the phase after the unwinding process. Among them, the phase after the unwinding process can be expressed as formula (13): (13) Furthermore, based on formula (3), the displacement information corresponding to the phase after the unwinding process can be obtained. Thus, precise measurement of the displacement is achieved. In this embodiment, the accuracy between its displacement error and the theoretical value is not restricted. The Taylor expansion order n can be appropriately adjusted according to actual requirements to meet the user's accuracy requirements. In this embodiment, when the Taylor expansion order n is equal to 9, the phase error caused by its algorithm model is less than .
[0069] According to the foregoing description, for the incremental displacement signal processing method provided by the present invention, the accuracy of the obtained displacement information theoretically approaches 0 infinitely. The appropriate Taylor expansion order can be selected according to actual requirements; the linear fitting coefficient does not need to be corrected multiple times. As long as the expansion order n remains unchanged, the fitting coefficient will not change, and there is no need for repeated calculations; the linearization scheme occupies less resources, facilitating the subsequent development of related electronic interpolation technologies.
[0070] Next, the incremental displacement signal processing device provided by the present invention will be described. The incremental displacement signal processing device described below can be correspondingly referred to the incremental displacement signal processing method described above.
[0071] Figure 5 is a schematic structural diagram of the incremental displacement signal processing device provided by the present invention.
[0072] Next, the structure of the incremental displacement signal processing device provided by the present invention will be described in conjunction with Figure 5 .
[0073] In an exemplary embodiment of the present invention, the incremental displacement signal processing device can be applied to a displacement encoder. Combining Figure 5 , it can be known that the incremental displacement signal processing device may include an acquisition module 510, a processing module 520, an unwinding module 530, and a generation module 540. Each module will be introduced separately below.
[0074] The acquisition module 510 can be configured to acquire the incremental displacement signal to be processed. Among them, the incremental displacement signal to be processed is output by the displacement encoder, and the incremental displacement signal to be processed includes two sine signals and cosine signals with a 90-degree phase difference; The processing module 520 can be configured to obtain a processed linear triangular wave corresponding to the to-be-processed incremental displacement signal based on the to-be-processed incremental displacement signal, wherein the processed linear triangular wave has a linear relationship with the sine signal and the cosine signal in the to-be-processed incremental displacement signal; The unwrapping module 530 can be configured to perform an unwrapping process on the processed linear triangular wave to obtain an unwrapped phase; The generating module 540 can be configured to determine displacement information corresponding to the to-be-processed incremental displacement signal based on the unwrapped phase.
[0075] In an exemplary embodiment of the present invention, the processing module 520 can implement obtaining a processed linear triangular wave corresponding to the to-be-processed incremental displacement signal based on the to-be-processed incremental displacement signal in the following manner: Obtain a standard triangular wave function, and perform Taylor series expansion on the standard triangular wave function with the sine function and the cosine function as variables respectively to obtain the Taylor series-expanded arcsine function and the Taylor series-expanded arccosine function; Construct a linear triangular wave function about the standard triangular wave function based on the Taylor series-expanded arcsine function and the Taylor series-expanded arccosine function, wherein the linear triangular wave function has a linear relationship with the sine function and the cosine function; Based on the sine signal and the cosine signal in the to-be-processed incremental displacement signal and the linear triangular wave function about the standard triangular wave function, obtain a processed linear triangular wave corresponding to the to-be-processed incremental displacement signal.
[0076] In an exemplary embodiment of the present invention, the processing module 520 can implement performing an unwrapping process on the processed linear triangular wave to obtain an unwrapped phase in the following manner: Correct the slope of the processed linear triangular wave to obtain a sawtooth wave corresponding to the processed linear triangular wave; Perform an unwrapping process on the sawtooth wave corresponding to the processed linear triangular wave to obtain an unwrapped phase.
[0077] In an exemplary embodiment of the present invention, the processing module 520 can implement correcting the slope of the processed linear triangular wave to obtain a sawtooth wave corresponding to the processed linear triangular wave in the following manner: Convert the sine signal and the cosine signal in the to-be-processed incremental displacement signal into square wave signals respectively, wherein the value of the square wave signal is 0 or 1; Based on the square wave signal, correct the slope of the processed linear triangular wave to obtain a sawtooth wave corresponding to the processed linear triangular wave.
[0078] In an exemplary embodiment of the present invention, the square wave signal includes a first square wave signal and a second square wave signal, wherein the first square wave signal matches the sine signal; the second square wave signal matches the cosine signal; The processing module 520 can implement the following method to correct the slope of the processed linear triangular wave based on the square wave signal to obtain a sawtooth wave corresponding to the processed linear triangular wave: Perform a logical exclusive OR operation on the first square wave signal and the second square wave signal to obtain a first judgment value; When the first judgment value is 1, perform a negative multiplication operation on the processed linear triangular wave to obtain a sawtooth wave corresponding to the processed linear triangular wave.
[0079] In an exemplary embodiment of the present invention, the square wave signal includes a first square wave signal and a second square wave signal, wherein the first square wave signal matches the sine signal; the second square wave signal matches the cosine signal; The processing module 520 can implement the following method to correct the slope of the processed linear triangular wave based on the square wave signal to obtain a sawtooth wave corresponding to the processed linear triangular wave: Perform a logical exclusive OR operation on the first square wave signal and the second square wave signal to obtain a first judgment value; When the first judgment value is 0, use the processed linear triangular wave as the sawtooth wave corresponding to the processed linear triangular wave.
[0080] Based on the same inventive concept, the present invention also provides a displacement encoder. The following will describe a displacement encoder provided by the present invention in conjunction with the following embodiments.
[0081] In an exemplary embodiment of the present invention, the displacement encoder may include a displacement encoder body and a processor, wherein the processor is used to execute any one of the incremental displacement signal processing methods to linearly process the incremental displacement signal, thereby improving the measurement accuracy of the displacement information obtained based on the incremental displacement signal.
[0082] Figure 6 Illustrates a schematic diagram of the physical structure 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 an incremental displacement signal processing method, which is applied to a displacement encoder. 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, and the incremental displacement signal to be processed includes two sine signals and cosine signals with a 90-degree phase difference; based on the incremental displacement signal to be processed, obtaining a processed linear triangular wave corresponding to the incremental displacement signal to be processed, where the processed linear triangular wave has a linear relationship with the sine signal and the cosine signal in the incremental displacement signal to be processed; performing an unwrapping process on the processed linear triangular wave to obtain an unwrapped phase; and determining displacement information corresponding to the incremental displacement signal to be processed based on the unwrapped phase.
[0083] In addition, when the logic instructions in the above-mentioned memory 630 are implemented in the form of a software functional unit and sold or used as an independent product, 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 the 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), a random access memory (RAM), a magnetic disk, or an optical disc that can store program codes.
[0084] 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 incremental displacement signal processing method provided by each of the above methods. 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 includes two sine signals and cosine signals with a 90-degree phase difference; based on the incremental displacement signal to be processed, obtaining a processed linear triangular wave corresponding to the incremental displacement signal to be processed, where the processed linear triangular wave has a linear relationship with the sine signal and the cosine signal in the incremental displacement signal to be processed; performing an unwrapping process on the processed linear triangular wave to obtain an unwrapped phase; and based on the unwrapped phase, determining displacement information corresponding to the incremental displacement signal to be processed.
[0085] In yet 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 configured to execute the incremental displacement signal processing method provided by each of the above methods. 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 includes two sine signals and cosine signals with a 90-degree phase difference; based on the incremental displacement signal to be processed, obtaining a processed linear triangular wave corresponding to the incremental displacement signal to be processed, where the processed linear triangular wave has a linear relationship with the sine signal and the cosine signal in the incremental displacement signal to be processed; performing an unwrapping process on the processed linear triangular wave to obtain an unwrapped phase; and based on the unwrapped phase, determining displacement information corresponding to the incremental displacement signal to be processed.
[0086] 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. A person of ordinary skill in the art can understand and implement it without creative efforts.
[0087] 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 to enable 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.
[0088] 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. These modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. An incremental displacement signal processing method, 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, and the incremental displacement signal to be processed includes a sine signal and a cosine signal with a 90-degree phase difference; Based on the incremental displacement signal to be processed, obtain a processed linear triangular wave corresponding to the incremental displacement signal to be processed, where the processed linear triangular wave has a linear relationship with the sine signal and the cosine signal in the incremental displacement signal to be processed; Perform an unwrapping process on the processed linear triangular wave to obtain an unwrapped phase; Based on the unwrapped phase, determine displacement information corresponding to the incremental displacement signal to be processed.
2. The incremental displacement signal processing method according to claim 1, wherein, Before obtaining the processed linear triangular wave corresponding to the incremental displacement signal to be processed based on the incremental displacement signal to be processed, the method further includes: Obtain a standard triangular wave function, and perform Taylor series expansion on the standard triangular wave function with the sine function and the cosine function as variables respectively to obtain an arcsine function after Taylor series expansion and an arccosine function after Taylor series expansion; Based on the arcsine function after Taylor series expansion and the arccosine function after Taylor series expansion, construct a linear triangular wave function for the standard triangular wave function, where the linear triangular wave function has a linear relationship with the sine function and the cosine function; The obtaining of the processed linear triangular wave corresponding to the incremental displacement signal to be processed based on the incremental displacement signal to be processed specifically includes: Based on the sine signal and the cosine signal in the incremental displacement signal to be processed and the linear triangular wave function for the standard triangular wave function, obtain a processed linear triangular wave corresponding to the incremental displacement signal to be processed.
3. The incremental displacement signal processing method according to claim 2, wherein, After obtaining the processed linear triangular wave corresponding to the incremental displacement signal to be processed, the method further includes: Correct the slope of the processed linear triangular wave to obtain a sawtooth wave corresponding to the processed linear triangular wave; The performing of the unwrapping process on the processed linear triangular wave to obtain an unwrapped phase specifically includes: Perform an unwrapping process on the sawtooth wave corresponding to the processed linear triangular wave to obtain an unwrapped phase.
4. The incremental displacement signal processing method according to claim 3, characterized in that The correcting of the slope of the processed linear triangular wave to obtain a sawtooth wave corresponding to the processed linear triangular wave specifically includes: Convert the sine signal and the cosine signal in the incremental displacement signal to be processed into square wave signals respectively, where the value of the square wave signal is 0 or 1; Based on the square wave signals, correct the slope of the processed linear triangular wave to obtain a sawtooth wave corresponding to the processed linear triangular wave.
5. The incremental displacement signal processing method according to claim 4, characterized in that The square wave signals include a first square wave signal and a second square wave signal, where the first square wave signal matches the sine signal; the second square wave signal matches the cosine signal; The correcting of the slope of the processed linear triangular wave based on the square wave signals to obtain a sawtooth wave corresponding to the processed linear triangular wave specifically includes: Perform a logical exclusive OR operation on the first square wave signal and the second square wave signal to obtain a first judgment value; In the case where the first judgment value is 1, perform a negative multiplication process on the processed linear triangular wave to obtain a sawtooth wave corresponding to the processed linear triangular wave.
6. The incremental displacement signal processing method according to claim 4, wherein The square wave signal includes a first square wave signal and a second square wave signal, wherein the first square wave signal matches the sine signal; the second square wave signal matches the cosine signal; Based on the square wave signal, correct the slope of the processed linear triangular wave to obtain a sawtooth wave corresponding to the processed linear triangular wave, specifically including: Perform a logical exclusive OR operation on the first square wave signal and the second square wave signal to obtain a first judgment value; In the case where the first judgment value is 0, use the processed linear triangular wave as the sawtooth wave corresponding to the processed linear triangular wave.
7. An incremental displacement signal processing device, 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, wherein the incremental displacement signal to be processed is output by the displacement encoder, and the incremental displacement signal to be processed includes two sine signals and cosine signals with a 90-degree phase difference; A processing module, configured to obtain a processed linear triangular wave corresponding to the incremental displacement signal to be processed based on the incremental displacement signal to be processed, wherein the processed linear triangular wave has a linear relationship with the sine signal and the cosine signal in the incremental displacement signal to be processed; An unwrapping module, configured to perform an unwrapping process on the processed linear triangular wave to obtain an unwrapped phase; A generation module, configured to determine displacement information corresponding to the incremental displacement signal to be processed based on the unwrapped phase.
8. A displacement encoder, characterized in that, The displacement encoder includes: A displacement encoder body, and A processor, wherein the processor is configured to execute the incremental displacement signal processing method 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, characterized in that, When the processor executes the computer program, it implements the incremental displacement signal processing method 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 incremental displacement signal processing method according to any one of claims 1 to 6.