Rotary encoder angle error correction method and device, equipment and storage medium

By constructing the relationship between the ideal projection function and the observation projection channel, the angle error of the rotary encoder in the CT scanning system is corrected, the problem of the integral angle error in the equiangular scheme is solved, and the accuracy of rearrangement of CT scanning data and the system precision are improved.

CN118670437APending Publication Date: 2024-09-20SAINUO WEISHENG SCI & TECH BEIJING
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410733620.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-07
Publication Date
2024-09-20

AI Technical Summary

Technical Problem

In existing CT scanning systems, the circumferential rotation angle encoder based on the equiangular scheme has high-frequency angular step jitter, which leads to integrated angle errors and thus affects the accuracy of rearrangement of CT scan data.

Method used

By determining the target scanning data of the target phantom, the ideal projection function of the target phantom on the detector module under different ideal rotation angles is constructed, and based on the relationship between the observation projection channel and the ideal projection function, the rotation angle of the rotary encoder at each rotation angle is determined. The angle error below is realized to correct the angle of the rotary encoder.

Benefits of technology

It improves the accuracy of CT scan data rearrangement, reduces the angle error of the rotary encoder, and enhances the accuracy of the CT scan system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118670437A
    Figure CN118670437A
Patent Text Reader

Abstract

The embodiment of the invention provides a rotary encoder angle error correction method and device, equipment and a medium. The method comprises the steps of determining target scanning data of a target motif; according to the target scanning data, determining an observation projection channel of the target die body in the detector module under different rotation angles; according to a first distance from a light source to a rotation center, a central channel position of a detector module, channel angle stepping of a rotary encoder, a second distance between an intersection point of a target die body and a rotation plane and the rotation center of the rotary encoder, and a phase angle difference between an eccentric position angle vector of the target die body and a rotation angle of the rotary encoder, a rotation angle of the rotary encoder is determined. Constructing ideal projection functions of the target motif in the detector module under different ideal rotation angles; according to the observation projection channel and an ideal projection function, determining an ideal projection channel of the target die body under different ideal rotation angles; and determining the angle error of the rotary encoder at each rotation angle according to the relationship between the observation projection channel and the ideal projection channel.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of CT scanning and related technical fields, and in particular to a method, device, equipment and storage medium suitable for correcting the angle error of a rotary encoder. Background Art

[0002] CT scanning systems are widely used in industry and medicine.

[0003] In the prior art, the CT scanning system usually collects data by adopting an equiangular scheme, which is characterized by simple and clear geometry, and is clear and easy to maintain for rearranging the CT scanning reconstruction data. However, in the prior art, the equiangular scheme is dependent on the integral angle accuracy. In order to meet the integral angle accuracy, the CT scanning system usually adopts a circumferential rotation angle encoder with high angle accuracy. However, the use of a circumferential rotation angle encoder with high angle accuracy will still have high-frequency angular stepping jumps, so that the integral angle determined based on the circumferential rotation angle encoder will have a certain error, and thus the accuracy of rearranging the CT scanning data based on the integral angle cannot be well guaranteed. Summary of the invention

[0004] The embodiments described herein provide a method, device, apparatus and storage medium for correcting the angle error of a rotary encoder, which solve the problems existing in the prior art.

[0005] In a first aspect, according to the present disclosure, a method for correcting an angle error of a rotary encoder is provided, comprising:

[0006] Determining target scanning data of a target phantom, wherein the target phantom is perpendicular to a rotation plane of the rotary encoder, and an intersection point between the target phantom and the rotation plane and a rotation center of the rotary encoder does not overlap;

[0007] Determining, according to the target scanning data, an observation projection channel of the target phantom on the detector module at different rotation angles;

[0008] According to a first distance from a light source to a rotation center, a central channel position of the detector module, a channel angle step of the rotary encoder, a second distance between an intersection of the target phantom with the rotation plane and a rotation center of the rotary encoder, and a phase angle difference between an eccentric position vector angle of the target phantom and a rotation angle of the rotary encoder, an ideal projection function of the target phantom on the detector module at different ideal rotation angles is constructed;

[0009] Determining the ideal projection channel of the target phantom at different ideal rotation angles according to the observed projection channel and the ideal projection function;

[0010] According to the relationship between the observed projection channel and the ideal projection channel, the angle error of the rotary encoder at each rotation angle is determined.

[0011] In some embodiments of the present disclosure, determining target scanning data of the target phantom includes:

[0012] Acquire observation scanning data of the target phantom, wherein the observation data includes channels and angles, and the total number of samplings of the angles is the same as the number of circumferential holes of the code disk of the rotary encoder;

[0013] Acquire air scan data;

[0014] The observation scan data is corrected based on the air scan data to obtain target scan data.

[0015] In some embodiments of the present disclosure, determining, according to the target scanning data, an observation projection channel of the target phantom in the detector module at different rotation angles includes:

[0016] Construct channel index row vector;

[0017] According to the channel index row vector and the target scanning data, the observation projection channel of the target phantom in the detector module at different rotation angles is determined, wherein the observation projection channel of the target phantom in the detector module at different rotation angles satisfies:

[0018]

[0019] ChannelVec(c) is the channel index row vector, and A(c,v) is the target scan data.

[0020] In some embodiments of the present disclosure, the ideal projection function of the target phantom on the detector module at different rotation angles satisfies:

[0021]

[0022] Wherein, S2I is the first distance from the light source to the rotation center, CentChannelIdx is the central channel position of the detector module, α is the channel angle step of the rotary encoder, and R is the second distance between the intersection of the target model and the rotation plane and the rotation center of the rotary encoder. is the phase angle difference between the eccentric position vector angle of the target phantom and the rotation angle of the rotary encoder.

[0023] In some embodiments of the present disclosure, determining the ideal projection channel of the target phantom at different ideal rotation angles according to the observed projection channel and the ideal projection function includes:

[0024] Constructing an objective function according to the observed projection channel and the ideal projection function;

[0025] By solving the minimum value of the objective function, a second target distance and a target phase angle difference are obtained;

[0026] The second target distance and the target phase angle difference are brought into the ideal projection function to determine the ideal projection channel of the target phantom at different ideal rotation angles.

[0027] In some embodiments of the present disclosure, determining the angle error of the rotary encoder at each rotation angle according to the relationship between the observed projection channel and the ideal projection channel includes:

[0028] Determine the channel position error at each rotation angle according to the observed projection channel and the ideal projection channel;

[0029] The angle error of the rotary encoder at each rotation angle is determined according to the channel position error and the ideal projection channel.

[0030] In some embodiments of the present disclosure, determining the angle error of the rotary encoder at each rotation angle according to the channel position error and the ideal projection channel includes:

[0031] Solving the inverse of the derivative of the ideal projection channel;

[0032] The inverse of the derivative of the ideal projection channel is multiplied by the channel position error to obtain the angle error of the rotary encoder at each rotation angle.

[0033] In a second aspect, according to the content of the present disclosure, a rotary encoder angle error correction device is provided, comprising:

[0034] a target scanning data determining module, configured to determine target scanning data of a target phantom, wherein the target phantom is perpendicular to a rotation plane of the rotary encoder, and an intersection point between the target phantom and the rotation plane and a rotation center of the rotary encoder do not overlap;

[0035] An observation projection channel determination module, used to determine the observation projection channel of the target phantom in the detector module at different rotation angles according to the target scanning data;

[0036] an ideal projection function construction module, for constructing an ideal projection function of the target phantom on the detector module at different ideal rotation angles according to a first distance from a light source to a rotation center, a central channel position of the detector module, a channel angle step of the rotary encoder, a second distance between an intersection of the target phantom with the rotation plane and a rotation center of the rotary encoder, and a phase angle difference between an eccentric position vector angle of the target phantom and a rotation angle of the rotary encoder;

[0037] An ideal projection channel determination module, used to determine the ideal projection channel of the target phantom at different ideal rotation angles according to the observed projection channel and the ideal projection function;

[0038] The angle error determination module is used to determine the angle error of the rotary encoder at each rotation angle according to the relationship between the observed projection channel and the ideal projection channel.

[0039] In a third aspect, according to the present disclosure, there is provided a computer device, including:

[0040] one or more processors;

[0041] a storage device for storing one or more programs,

[0042] When the one or more programs are executed by the one or more processors, the one or more processors implement any method as described in the first aspect.

[0043] In a fourth aspect, according to the content of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, it implements any method as described in the first aspect.

[0044] The rotary encoder angle error correction method, device, equipment and medium provided by the embodiment of the present disclosure first determine the target scanning data of the target model; then determine the observation projection channel of the target model in the detector module at different rotation angles according to the target scanning data; construct the ideal projection function of the target model in the detector module at different ideal rotation angles according to the first distance from the light source to the rotation center, the central channel position of the detector module, the channel angle step of the rotary encoder, the second distance between the intersection of the target model and the rotation plane and the rotation center of the rotary encoder, and the phase angle difference between the eccentric position vector angle of the target model and the rotation angle of the rotary encoder; determine the ideal projection channel of the target model at different rotation angles according to the observation projection channel and the ideal projection function; finally, determine the angle error of the rotary encoder at each rotation angle according to the relationship between the observation projection channel and the ideal projection channel. Since the observation projection channel of the target model in the detector module at different rotation angles is determined based on the scanning data, and the scanning data is related to the rotation accuracy of the rotary encoder, when the rotary encoder has a rotation error, the scanning data collected by the detector module is erroneous, and therefore, the observation projection channel of the target model in the detector module at different rotation angles determined based on the scanning data is also erroneous. The present application constructs an ideal projection function of the target model on the detector module at an ideal rotation angle, and determines the ideal projection channel of the scanning model at the ideal rotation angle based on the ideal projection function, and then determines the angular error of the rotary encoder at each rotation angle based on the ideal projection channel and the observation projection channel, thereby realizing the correction of the angle of the rotary encoder.

[0045] The above description is only an overview of the technical solution of the embodiment of the present application. In order to more clearly understand the technical means of the embodiment of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the embodiment of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings of the embodiments will be briefly described below. It should be noted that the drawings described below only relate to some embodiments of the present disclosure, but are not intended to limit the present disclosure, wherein:

[0047] Figure 1 It is a flow chart of a rotary encoder angle error correction method provided by an embodiment of the present disclosure;

[0048] Figure 2 is a structural schematic diagram of a CT scanning system provided by an embodiment of the present disclosure;

[0049] Figure 3It is a structural schematic diagram of a rotary encoder angle error correction method provided by an embodiment of the present disclosure;

[0050] Figure 4 It is a structural diagram of a computer device provided in an embodiment of the present disclosure.

[0051] In the drawings, reference numerals with the same last two digits correspond to the same elements. It should be noted that the elements in the drawings are schematic and not drawn to scale. DETAILED DESCRIPTION

[0052] In order to make the purpose, technical solution and advantages of the embodiments of the present disclosure clearer, the technical solution of the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present disclosure, rather than all of the embodiments. Based on the described embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without creative work also fall within the scope of protection of the present disclosure.

[0053] Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by a person skilled in the art to which the subject matter of the present disclosure belongs. It will be further understood that terms such as those defined in commonly used dictionaries should be interpreted as having a meaning consistent with their meaning in the context of the specification and the relevant art, and will not be interpreted in an idealized or overly formal form unless otherwise explicitly defined herein. As used herein, a statement that two or more parts are "connected" or "coupled" together shall mean that the parts are joined together directly or through one or more intermediate components.

[0054] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase "embodiments" in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0055] The term "and / or" in this article is only a description of the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists, A and B exist at the same time, and B exists. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.

[0056] Furthermore, in all embodiments of the present disclosure, terms such as “first” and “second” are used only to distinguish one component (or a part of a component) from another component (or another part of a component).

[0057] In the description of the present application, unless otherwise specified, "plurality" means more than two (including two), and similarly, "multiple groups" means more than two groups (including two).

[0058] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings.

[0059] Based on the problems existing in the prior art, the present invention provides a method for correcting the angle error of a rotary encoder. Figure 1 is a flow chart of a rotary encoder angle error correction method provided by an embodiment of the present disclosure, such as Figure 1 As shown, the specific process of the rotary encoder angle error correction method includes:

[0060] S110 , determining target scanning data of the target model.

[0061] The target model is perpendicular to the rotation plane of the rotary encoder, and the intersection of the target model and the rotation plane does not overlap with the rotation center of the rotary encoder.

[0062] In a specific implementation, since the target model is in a stationary state and the rotary encoder is in a rotating state, it can also be understood that the target model rotates relative to the rotary encoder. At this time, it can be understood that the rotary encoder is in a stationary state and the target model is in a rotating state. Figure 2 , the trajectory of the target model at a fixed rotation angle is Figure 2 As shown in the dotted circle, at this time, the rotation center of the rotary encoder is the rotation center O of the rotation plane, the intersection of the target model and the rotation plane is point A, and the intersection A of the target model and the rotation plane does not overlap with the rotation center O of the rotary encoder. In an exemplary embodiment, the target model is a metal needle.

[0063] In a specific embodiment, determining the target scanning data of the target model includes: obtaining the observation scanning data of the target model, wherein the observation data includes channels and angles, and the total number of angle samples is the same as the number of circumferential holes of the code disk of the rotary encoder; obtaining air scanning data; and correcting the observation scanning data based on the air scanning data to obtain the target scanning data.

[0064] Specifically, first, by controlling the rotation of the rotary encoder, the observation scanning data of the target model collected by the detector module at different rotation angles of the rotary encoder is obtained. The detector module includes multiple channels arranged in an array. The observation scanning data of the target model is P(c,v), where c is the channel of the detector module and v is the rotation angle of the rotary encoder. That is, the obtained observation scanning data is the scanning data collected by each channel of the detector module at different rotation angles. In addition, by obtaining the air scanning data Air(c,v) of the air model collected by the detector module at different rotation angles of the rotary encoder, the observation scanning data is corrected based on the air scanning data to obtain the target scanning data. The target scanning data satisfies: The target scan data is a matrix with c rows and v columns.

[0065] S120, determining the observation projection channel of the target model in the detector module at different rotation angles according to the target scanning data.

[0066] In a specific implementation, according to the target scanning data, the observation projection channel of the target phantom in the detector module at different rotation angles is determined, including: constructing a channel index row vector; determining the observation projection channel of the target phantom in the detector module at different rotation angles according to the channel index row vector and the target scanning data, wherein the observation projection channel of the target phantom in the detector module at different rotation angles satisfies:

[0067]

[0068] ChannelVec(c) is the channel index row vector, and A(c,v) is the target scan data.

[0069] Specifically, in determining the target scanning data, a channel index row vector is first constructed. The channel index row vector is used to index the channel corresponding to the observed projection of the target model on the detector module at each rotation angle. The constructed channel index row vector satisfies: ChannelVec(c) = [1, 2, ..., cNum], where cNum is the maximum number of detector channels in the detector module. After the channel index row vector is constructed, according to the formula Obtain the observation projection channel of the target model on the detector module at different rotation angles. In the above formula, ChannelVec(c) is a matrix with 1 row and c columns, A(c,v) is a matrix with c rows and v columns, and ChannelVec(c)*A(c,v) is a matrix with 1 row and v columns. is a matrix with 1 row and v columns, then ChannelVec(c)*A(c,v) and Perform point division to obtain the observation projection channel of the target model on the detector module at different rotation angles.

[0070] S130. Construct an ideal projection function of the target model on the detector module at different ideal rotation angles based on the first distance from the light source to the rotation center, the central channel position of the detector module, the channel angle step of the rotary encoder, the second distance between the intersection of the target model and the rotation plane and the rotation center of the rotary encoder, and the phase angle difference between the eccentric position vector angle of the target model and the rotation angle of the rotary encoder.

[0071] Among them, the ideal projection function of the target model on the detector module at different rotation angles satisfies:

[0072]

[0073] Among them, S2I is the first distance from the light source to the rotation center, CentChannelIdx is the central channel position of the detector module, α is the channel angle step of the rotary encoder, and R is the second distance between the intersection of the target model and the rotation plane and the rotation center of the rotary encoder. is the phase angle difference between the eccentric position vector angle of the target phantom and the rotation angle of the rotary encoder.

[0074] It should be noted that in the ideal projection function of the target phantom on the detector module at different rotation angles, the first distance from the light source to the rotation center, the central channel position of the detector module, and the channel angle step of the rotary encoder are determined under the ideal rotation angle vector, and the ideal rotation angle vector satisfies:

[0075] S140, determining the ideal projection channel of the target phantom at different ideal rotation angles according to the observed projection channel and the ideal projection function.

[0076] In a specific implementation, the ideal projection channel of the target phantom at different ideal rotation angles is determined based on the observed projection channel and the ideal projection function, including: constructing an objective function based on the observed projection channel and the ideal projection function; obtaining a second target distance and a target phase angle difference by solving the minimum value of the objective function; substituting the second target distance and the target phase angle difference into the ideal projection function to determine the ideal projection channel of the target phantom at different ideal rotation angles.

[0077] After obtaining the observation projection channel in step S120 and constructing the ideal projection function in step S130, an objective function is constructed based on the observation projection channel and the ideal projection function, wherein the constructed objective function satisfies: By solving the objective function, we can get the second target distance R = R 0 Phase angle difference with target

[0078] After determining the second target distance and the target phase angle difference based on the objective function, the ideal projection channel can be determined by substituting the second target distance and the target phase angle difference into the ideal projection function. The ideal projection channel satisfies:

[0079] It should be noted that the observation projection channel of the target phantom in the detector module at different rotation angles is determined based on the scanning data, and the scanning data is related to the rotation accuracy of the rotary encoder. When the rotary encoder has a rotation error, the observation scanning data collected by the detector module is erroneous, and the target scanning data will be erroneous. Therefore, based on the target scanning data, the observation projection channel of the target phantom in the detector module at different rotation angles is also erroneous. The ideal projection channel of the target phantom at different rotation angles is determined based on the ideal projection function, and the ideal projection function is determined based on the ideal rotation angle. Therefore, the ideal projection channel of the target phantom in the detector module at different ideal rotation angles has better accuracy.

[0080] S150, determining the angle error of the rotary encoder at each rotation angle according to the relationship between the observed projection channel and the ideal projection channel.

[0081] In a specific implementation, the angular error of the rotary encoder at each rotation angle is determined based on the relationship between the observed projection channel and the ideal projection channel, including: determining the channel position error at each rotation angle based on the observed projection channel and the ideal projection channel; determining the angular error of the rotary encoder at each rotation angle based on the channel position error and the ideal projection channel.

[0082] Among them, according to the channel position error and the ideal projection channel, the angular error of the rotary encoder at each rotation angle is determined, including: solving the inverse of the derivative of the ideal projection channel; multiplying the inverse of the derivative of the ideal projection channel and the channel position error to obtain the angular error of the rotary encoder at each rotation angle.

[0083] Specifically, after determining the observed projection channel and the ideal projection channel, the channel position error at each rotation angle can be determined. The channel position error at each rotation angle satisfies: ErrorPos(v) = ChannelPos observe (v)-ChannelPos ideal (v).

[0084] After determining the channel position error at each rotation angle, first solve the derivative of the ideal projection channel, that is, find the product of the differential of the ideal projection channel relative to the rotation angle, then solve the derivative of the differential of the ideal projection channel relative to the rotation angle, and finally find the product of the reciprocal of the derivative of the ideal projection channel and the channel position error to obtain the angle error of the rotary encoder at each rotation angle. The obtained angle error of the rotary encoder at each rotation angle satisfies:

[0085] The rotary encoder angle error correction method provided by the embodiment of the present disclosure first determines the target scanning data of the target model; then, according to the target scanning data, determines the observation projection channel of the target model in the detector module at different rotation angles; according to the first distance from the light source to the rotation center, the central channel position of the detector module, the channel angle step of the rotary encoder, the second distance between the intersection of the target model and the rotation plane and the rotation center of the rotary encoder, and the phase angle difference between the eccentric position angle vector of the target model and the rotation angle of the rotary encoder, constructs the ideal projection function of the target model in the detector module at different ideal rotation angles; according to the observation projection channel and the ideal projection function, determines the ideal projection channel of the target model at different rotation angles; finally, according to the relationship between the observation projection channel and the ideal projection channel, determines the angle error of the rotary encoder at each rotation angle. Since the observation projection channel of the target model in the detector module at different rotation angles is determined based on the scanning data, and the scanning data is related to the rotation accuracy of the rotary encoder, when the rotary encoder has a rotation error, the scanning data collected by the detector module is erroneous, and therefore, the observation projection channel of the target model in the detector module at different rotation angles determined based on the scanning data is also erroneous. The present application constructs an ideal projection function of the target model on the detector module at an ideal rotation angle, and determines the ideal projection channel of the scanning model at the ideal rotation angle based on the ideal projection function, and then determines the angular error of the rotary encoder at each rotation angle based on the ideal projection channel and the observation projection channel, thereby realizing the correction of the angle of the rotary encoder.

[0086] Based on the above embodiments, Figure 3 is a schematic diagram of the structure of a rotary encoder angle error correction device provided by an embodiment of the present disclosure, such as Figure 3 As shown, the rotary encoder angle error correction device includes:

[0087] A target scanning data determination module 310 is used to determine target scanning data of a target phantom, wherein the target phantom is perpendicular to a rotation plane of the rotary encoder, and an intersection point between the target phantom and the rotation plane does not overlap with a rotation center of the rotary encoder;

[0088] The observation projection channel determination module 320 is used to determine the observation projection channel of the target phantom in the detector module at different rotation angles according to the target scanning data;

[0089] An ideal projection function construction module 330 is used to construct an ideal projection function of the target phantom on the detector module at different ideal rotation angles according to a first distance from the light source to the rotation center, a central channel position of the detector module, a channel angle step of the rotary encoder, a second distance between an intersection of the target phantom and the rotation plane and the rotation center of the rotary encoder, and a phase angle difference between an eccentric position vector angle of the target phantom and a rotation angle of the rotary encoder;

[0090] An ideal projection channel determination module 340 is used to determine the ideal projection channel of the target phantom at different ideal rotation angles according to the observed projection channel and the ideal projection function;

[0091] The angle error determination module 350 is used to determine the angle error of the rotary encoder at each rotation angle according to the relationship between the observed projection channel and the ideal projection channel.

[0092] The rotary encoder angle error correction device provided by the embodiment of the present disclosure first determines the target scanning data of the target model; then determines the observation projection channel of the target model in the detector module at different rotation angles according to the target scanning data; constructs the ideal projection function of the target model in the detector module at different ideal rotation angles according to the first distance from the light source to the rotation center, the central channel position of the detector module, the channel angle step of the rotary encoder, the second distance between the intersection of the target model and the rotation plane and the rotation center of the rotary encoder, and the phase angle difference between the eccentric position angle vector of the target model and the rotation angle of the rotary encoder; determines the ideal projection channel of the target model at different rotation angles according to the observation projection channel and the ideal projection function; finally, determines the angle error of the rotary encoder at each rotation angle according to the relationship between the observation projection channel and the ideal projection channel. Since the observation projection channel of the target model in the detector module at different rotation angles is determined based on the scanning data, and the scanning data is related to the rotation accuracy of the rotary encoder, when the rotary encoder has a rotation error, the scanning data collected by the detector module is erroneous, and therefore, the observation projection channel of the target model in the detector module at different rotation angles determined based on the scanning data is also erroneous. The present application constructs an ideal projection function of the target model on the detector module at an ideal rotation angle, and determines the ideal projection channel of the scanning model at the ideal rotation angle based on the ideal projection function, and then determines the angular error of the rotary encoder at each rotation angle based on the ideal projection channel and the observation projection channel, thereby realizing the correction of the angle of the rotary encoder.

[0093] In a specific embodiment, the target scanning data determination module includes an observation scanning data acquisition unit, an air scanning data acquisition unit, and a target scanning data determination unit;

[0094] An observation scanning data acquisition unit is used to acquire observation scanning data of a target phantom, wherein the observation data includes channels and angles, and the total number of angle samples is the same as the number of circumferential holes of a code disk of a rotary encoder;

[0095] An air scanning data acquisition unit, used for acquiring air scanning data;

[0096] The target scanning data determining unit is used to correct the observation scanning data based on the air scanning data to obtain the target scanning data.

[0097] In a specific implementation, the observed projection channel determination module includes a channel index row vector construction unit and an observed projection channel determination unit;

[0098] A channel index row vector construction unit, used to construct a channel index row vector;

[0099] The observation projection channel determination unit is used to determine the observation projection channel of the target phantom in the detector module at different rotation angles according to the channel index row vector and the target scanning data, wherein the observation projection channel of the target phantom in the detector module at different rotation angles satisfies:

[0100]

[0101] ChannelVec(c) is the channel index row vector, and A(c,v) is the target scan data.

[0102] In a specific embodiment, the ideal projection function of the target phantom on the detector module at different rotation angles satisfies:

[0103]

[0104] Among them, S2I is the first distance from the light source to the rotation center, CentChannelIdx is the central channel position of the detector module, α is the channel angle step of the rotary encoder, and R is the second distance between the intersection of the target model and the rotation plane and the rotation center of the rotary encoder. is the phase angle difference between the eccentric position vector angle of the target phantom and the rotation angle of the rotary encoder.

[0105] In a specific implementation, the ideal projection channel determination module includes an objective function construction unit, a parameter determination unit, and an ideal projection channel determination unit;

[0106] An objective function construction unit is used to construct an objective function according to an observed projection channel and an ideal projection function;

[0107] A parameter determination unit, used to obtain a second target distance and a target phase angle difference by solving a minimum value of an objective function;

[0108] The ideal projection channel determination unit is used to bring the second target distance and the target phase angle difference into the ideal projection function to determine the ideal projection channel of the target phantom at different ideal rotation angles.

[0109] In a specific implementation, the angle error determination module includes a channel position error determination unit and an angle error determination unit;

[0110] A channel position error determination unit, used to determine the channel position error at each rotation angle according to the observed projection channel and the ideal projection channel;

[0111] The angle error determination unit is used to determine the angle error of the rotary encoder at each rotation angle according to the channel position error and the ideal projection channel.

[0112] In a specific implementation, determining the angle error of the rotary encoder at each rotation angle according to the channel position error and the ideal projection channel includes:

[0113] Solve for the inverse of the derivative of the ideal projection channel;

[0114] The inverse of the derivative of the ideal projection channel is multiplied by the channel position error to obtain the angle error of the rotary encoder at each rotation angle.

[0115] The present application also provides a computer device. Figure 4 , Figure 4 This is a basic structural block diagram of the computer device in this embodiment.

[0116] The computer device includes a memory 510 and a processor 520 that are connected to each other through a system bus. It should be noted that the figure only shows a computer device with components 510-520, but it should be understood that it is not required to implement all the components shown, and more or fewer components can be implemented instead. Among them, those skilled in the art can understand that the computer device here is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application specific integrated circuits (Application Specific Integrated Circuit, ASIC), programmable gate arrays (Field-Programmable Gate Array, FPGA), digital processors (Digital Signal Processor, DSP), embedded devices, etc.

[0117] Computer devices can be computing devices such as desktop computers, notebooks, PDAs, and cloud servers. Computer devices can interact with users through keyboards, mice, remote controls, touch pads, or voice control devices.

[0118] The memory 510 includes at least one type of readable storage medium, and the readable storage medium includes a non-volatile memory or a volatile memory, such as a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory, etc.), a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, etc., and the RAM may include a static RAM or a dynamic RAM. In some embodiments, the memory 510 may be an internal storage unit of a computer device, such as a hard disk or a memory of the computer device. In other embodiments, the memory 510 may also be an external storage device of a computer device, such as a plug-in hard disk, a smart memory card (SMC), a secure digital (SD) card, or a flash card (Flash Card), etc., equipped on the computer device. Of course, the memory 510 may also include both an internal storage unit of the computer device and an external storage device thereof. In this embodiment, the memory 510 is generally used to store an operating system and various application software installed on the computer device, such as the program code of the above method, etc. In addition, the memory 510 may also be used to temporarily store various data that have been output or are to be output.

[0119] The processor 520 is generally used to perform the overall operation of the computer device. In this embodiment, the memory 510 is used to store program codes or instructions, the program code includes computer operation instructions, and the processor 520 is used to execute the program codes or instructions stored in the memory 510 or process data, such as running the program code of the above method.

[0120] In this article, the bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus system can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0121] Another embodiment of the present application also provides a computer-readable medium, which may be a computer-readable signal medium or a computer-readable medium. A processor in a computer reads a computer-readable program code stored in the computer-readable medium, so that the processor can execute the functional actions specified in each step or a combination of steps in the above method; and generate a device for implementing the functional actions specified in each block or a combination of blocks in the block diagram.

[0122] Computer-readable media include but are not limited to electronic, magnetic, optical, electromagnetic, infrared memory or semiconductor systems, devices or apparatuses, or any appropriate combination of the foregoing, the memory is used to store program codes or instructions, the program codes include computer operating instructions, and the processor is used to execute the program codes or instructions of the above methods stored in the memory.

[0123] For the definitions of memory and processor, please refer to the description of the aforementioned computer device embodiment and will not be repeated here.

[0124] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0125] Each functional unit or module in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0126] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) or a processor (processor) to perform all or part of the steps of each embodiment method of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), disk or optical disk and other media that can store program code.

[0127] Unless the context clearly indicates otherwise, the singular form of the words used herein and in the appended claims includes the plural and vice versa. Thus, when referring to the singular, the plural form of the corresponding term is generally included. Similarly, the words "comprise" and "include" are to be interpreted as inclusive rather than exclusive. Likewise, the terms "include" and "or" should be interpreted as inclusive unless such interpretation is expressly prohibited herein. Where the term "example" is used herein, particularly when it is located after a group of terms, the "example" is merely exemplary and illustrative and should not be considered exclusive or comprehensive.

[0128] Further aspects and scopes of adaptability become apparent from the description provided herein. It should be understood that various aspects of the present application can be implemented individually or in combination with one or more other aspects. It should also be understood that the description and specific embodiments herein are intended for purposes of illustration only and are not intended to limit the scope of the present application.

[0129] Several embodiments of the present disclosure are described in detail above, but it is obvious that those skilled in the art can make various modifications and variations to the embodiments of the present disclosure without departing from the spirit and scope of the present disclosure. The protection scope of the present disclosure is defined by the attached claims.

Claims

1. A method for correcting an angle error of a rotary encoder, characterized in that: include: Determining target scanning data of a target phantom, wherein the target phantom is perpendicular to a rotation plane of the rotary encoder, and an intersection point between the target phantom and the rotation plane and a rotation center of the rotary encoder does not overlap; Determining, according to the target scanning data, an observation projection channel of the target phantom on the detector module at different rotation angles; According to a first distance from a light source to a rotation center, a central channel position of the detector module, a channel angle step of the rotary encoder, a second distance between an intersection of the target phantom with the rotation plane and a rotation center of the rotary encoder, and a phase angle difference between an eccentric position vector angle of the target phantom and a rotation angle of the rotary encoder, an ideal projection function of the target phantom on the detector module at different ideal rotation angles is constructed; Determining the ideal projection channel of the target phantom at different ideal rotation angles according to the observed projection channel and the ideal projection function; According to the relationship between the observed projection channel and the ideal projection channel, the angle error of the rotary encoder at each rotation angle is determined.

2. The method according to claim 1, characterized in that The step of determining target scanning data of the target phantom includes: Acquire observation scanning data of the target phantom, wherein the observation data includes channels and angles, and the total number of samplings of the angles is the same as the number of circumferential holes of the code disk of the rotary encoder; Acquire air scan data; The observation scan data is corrected based on the air scan data to obtain target scan data.

3. The method according to claim 1, characterized in that The step of determining, according to the target scanning data, an observation projection channel of the target phantom on the detector module at different rotation angles comprises: Construct channel index row vector; According to the channel index row vector and the target scanning data, the observation projection channel of the target phantom in the detector module at different rotation angles is determined, wherein the observation projection channel of the target phantom in the detector module at different rotation angles satisfies: ChannelVec(c) is the channel index row vector, and A(c,v) is the target scan data.

4. The method according to claim 1, characterized in that: The ideal projection function of the target model on the detector module at different rotation angles satisfies: Among them, S2I is the first distance from the light source to the rotation center, CentChannelIdx is the central channel position of the detector module, α is the channel angle step of the rotary encoder, R is the second distance between the intersection of the target model and the rotation plane and the rotation center of the rotary encoder, and θ is the phase angle difference between the eccentric position vector angle of the target model and the rotation angle of the rotary encoder.

5. The method according to claim 1, characterized in that The step of determining the ideal projection channel of the target phantom at different ideal rotation angles according to the observed projection channel and the ideal projection function includes: Constructing an objective function according to the observed projection channel and the ideal projection function; By solving the minimum value of the objective function, a second target distance and a target phase angle difference are obtained; The second target distance and the target phase angle difference are brought into the ideal projection function to determine the ideal projection channel of the target phantom at different ideal rotation angles.

6. The method according to claim 1, characterized in that Determining the angle error of the rotary encoder at each rotation angle according to the relationship between the observed projection channel and the ideal projection channel includes: Determine the channel position error at each rotation angle according to the observed projection channel and the ideal projection channel; The angle error of the rotary encoder at each rotation angle is determined according to the channel position error and the ideal projection channel.

7. The method according to claim 6, characterized in that The step of determining the angle error of the rotary encoder at each rotation angle according to the channel position error and the ideal projection channel comprises: Solving the inverse of the derivative of the ideal projection channel; The inverse of the derivative of the ideal projection channel is multiplied by the channel position error to obtain the angle error of the rotary encoder at each rotation angle.

8. A rotary encoder angle error correction device, characterized in that: include: a target scanning data determining module, configured to determine target scanning data of a target phantom, wherein the target phantom is perpendicular to a rotation plane of the rotary encoder, and an intersection point between the target phantom and the rotation plane and a rotation center of the rotary encoder do not overlap; An observation projection channel determination module, used to determine the observation projection channel of the target phantom in the detector module at different rotation angles according to the target scanning data; an ideal projection function construction module, for constructing an ideal projection function of the target phantom on the detector module at different ideal rotation angles according to a first distance from a light source to a rotation center, a central channel position of the detector module, a channel angle step of the rotary encoder, a second distance between an intersection of the target phantom with the rotation plane and a rotation center of the rotary encoder, and a phase angle difference between an eccentric position vector angle of the target phantom and a rotation angle of the rotary encoder; An ideal projection channel determination module, used to determine the ideal projection channel of the target phantom at different ideal rotation angles according to the observed projection channel and the ideal projection function; The angle error determination module is used to determine the angle error of the rotary encoder at each rotation angle according to the relationship between the observed projection channel and the ideal projection channel.

9. A computer device, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.