Linear encoder, and method and device for calculating displacement by using linear encoder

By using Hall modules evenly distributed around the magnetic steel in the linear encoder and calculating the Hall voltage signal and phase angle, the displacement measurement problem of the linear encoder in a small space is solved, and high-precision and high-resolution displacement measurement effects are achieved.

CN120702313APending Publication Date: 2025-09-26HARBIN INST OF TECH
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410355831.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-03-26
Publication Date
2025-09-26

AI Technical Summary

Technical Problem

Existing linear encoders cannot effectively measure displacement in small spaces or vertical application scenarios, and grating scales or magnetic scales are expensive and complex to process, making them difficult to meet measurement needs in small spaces.

Method used

Multiple Hall modules are evenly distributed around the magnet, and a voltage signal is generated through the Hall effect. The Hall voltage signal and phase angle are calculated. Combined with the preset regional position relationship, the cycle number is determined, and the relative displacement of the magnet relative to the Hall module is calculated.

Benefits of technology

It realizes high-precision and high-resolution displacement measurement in a small space, suppresses radial swing interference, improves the signal-to-noise ratio and solution success rate, and is suitable for displacement measurement needs in a small space.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120702313A_ABST
    Figure CN120702313A_ABST
Patent Text Reader

Abstract

The invention provides a linear encoder, a method and a device for calculating displacement by using the linear encoder, electronic equipment and a non-instantaneous computer readable storage medium. The linear encoder comprises magnetic steel; and a plurality of Hall modules, wherein the plurality of Hall modules are uniformly distributed in pairs around the magnetic steel. According to the embodiment of the invention, the Hall modules are uniformly arranged in pairs around the magnetic steel, so that the Hall modules can generate corresponding voltage signals in a variable magnetic field by using the Hall effect, and the linear Hall element can generate the corresponding voltage signals by using the relative displacement between the magnetic steel and the linear Hall element. And a mapping relation from an actual position to a relative displacement measurement value is established in a measurement stroke, so that the calculation of the displacement of the measured object on a linear axis is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of servo systems, and in particular to a linear encoder, a method and apparatus for calculating displacement using the linear encoder, an electronic device, and a non-transitory computer-readable storage medium. Background Art

[0002] In the field of servo systems, high-precision displacement sensors are essential. A linear encoder is a sensor that works based on the magnetic principle and is used to measure the displacement of an object on a linear axis.

[0003] Current linear encoders include magnetic or optical scale encoders, but these are only suitable for applications requiring large displacement measurements. In both cases, the readhead typically moves linearly, while the magnetic or optical grating is fixed on a guide rail. The optical or magnetic grating signals recorded by the readhead are converted into displacement signals. However, in small spaces or vertical applications, optical or magnetic scale sensors cannot achieve measurement. Furthermore, these scales are expensive and require complex surface treatment, making them difficult to manufacture and complex in structure.

[0004] The inventors of the present application have discovered that there is currently a lack of linear encoders suitable for small spaces. Summary of the Invention

[0005] The present application proposes a linear encoder, a method and apparatus for calculating displacement using the linear encoder, an electronic device, and a non-transitory computer-readable storage medium to solve at least one of the above-mentioned problems.

[0006] According to one aspect of the present application, a linear encoder is provided, comprising: a magnet; and a plurality of Hall modules, wherein the plurality of Hall modules are evenly distributed in pairs around the magnet.

[0007] According to some embodiments, each of the Hall modules includes a plurality of Hall units, and corresponding Hall units in different Hall modules are Hall units in the same layer.

[0008] According to some embodiments, the magnetic steel includes an annular magnetic steel and a cylindrical magnetic steel.

[0009] According to some embodiments, each of the Hall modules is arranged to detect an axial or radial magnetic induction intensity component.

[0010] According to one aspect of the present application, a method for calculating displacement using a linear encoder as described in any of the preceding items is proposed, the method comprising: calculating the sum of the Hall voltage signals of the Hall units in the same layer of the multiple Hall modules; calculating the phase angle using the sum of the Hall voltage signals; determining a period number based on the correspondence between the phase angle and the regional position of a preset Hall voltage signal and the Hall voltage signal; and calculating the relative displacement of the magnetic steel relative to the multiple Hall modules using the phase angle and the period number.

[0011] According to some embodiments, calculating the phase angle using the Hall voltage signal and the phase angle includes: performing differential processing on the Hall voltage signal and the phase angle to obtain a differential signal with an electrical angle difference of 180°; and calculating the phase angle using the differential signal.

[0012] According to some embodiments, before determining the period number based on the phase angle and the correspondence between the regional position of the preset Hall voltage signal and the Hall voltage signal, the method further includes: determining the correspondence between the regional position of the Hall voltage signal and the Hall voltage signal.

[0013] According to some embodiments, the regional position of the Hall voltage signal includes multiple sub-regions, and determining the correspondence between the regional position of the Hall voltage signal and the Hall voltage signal includes: calculating the sum of the squares of the Hall voltage signals of the Hall units in adjacent layers; and calculating the code values ​​corresponding to the multiple sub-regions using the square sum according to a preset threshold; wherein the correspondence between the regional position of the Hall voltage signal and the Hall voltage signal includes the correspondence between the code value and the multiple sub-regions.

[0014] According to some embodiments, the periodic number of the Hall voltage signal is determined based on the correspondence between the phase angle and the preset regional position of the Hall voltage signal and the Hall voltage signal, including: determining the periodic number of the Hall voltage signal using the correspondence between the phase angle, the code value and the multiple sub-regions.

[0015] According to some embodiments, calculating the relative displacement between the Hall module and the magnetic steel using the phase angle and the period number includes: calculating the relative displacement using the following formula:

[0016]

[0017] Among them, θ e is the phase angle, N is the cycle number, and x is the relative displacement.

[0018] According to one aspect of the present application, a device for calculating displacement using a linear encoder as described in any of the preceding items is proposed, and the device includes: a Hall voltage signal and calculation unit for calculating the Hall voltage signal sum of the Hall units in the same layer of the multiple Hall modules; a phase angle calculation unit for calculating the phase angle using the Hall voltage signal sum; a period number determination unit for determining the period number based on the correspondence between the phase angle and the regional position of the preset Hall voltage signal and the Hall voltage signal; and a relative displacement calculation unit for calculating the relative displacement of the magnetic steel relative to the multiple Hall modules using the phase angle and the period number.

[0019] According to one aspect of the present application, an electronic device is proposed, comprising: one or more processing units; a storage unit for storing one or more programs; when the one or more programs are executed by the one or more processing units, the one or more processing units implement the method described in any of the previous embodiments.

[0020] According to one aspect of the present application, a non-transitory computer-readable storage medium is provided, on which computer-readable instructions are stored. When the instructions are executed by a processor, the processor executes the method as described in any of the above embodiments.

[0021] According to an example embodiment of the present application, multiple Hall modules are evenly arranged in pairs around a magnet, so that the Hall modules can generate corresponding voltage signals using the Hall effect in a changing magnetic field. By utilizing the relative displacement between the magnet and the linear Hall element, a mapping relationship from the actual position to the relative displacement measurement value is established within the measurement range, thereby realizing the calculation of the displacement of the measured object on the linear axis. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for describing the embodiments.

[0023] Figure 1 A device block diagram of a linear encoder according to an exemplary embodiment of the present application is shown.

[0024] Figure 2 A Hall element arrangement for detecting an axial magnetic induction intensity component according to an exemplary embodiment of the present application is shown.

[0025] Figure 3 A Hall cell arrangement for detecting radial magnetic induction intensity components according to an exemplary embodiment of the present application is shown.

[0026] Figure 4 A schematic structural diagram of a linear encoder according to an exemplary embodiment of the present application is shown.

[0027] Figure 5 A flow chart of a method for calculating displacement using a linear encoder according to an exemplary embodiment of the present application is shown.

[0028] Figure 6 A flow chart of another method for calculating displacement using a linear encoder according to an exemplary embodiment of the present application is shown.

[0029] Figure 7 A schematic diagram of the waveforms of the Hall voltage signal and the sum after amplitude normalization according to an exemplary embodiment of the present application is shown.

[0030] Figure 8a A waveform diagram of a differential signal changing with the axial position of a magnetic steel according to an exemplary embodiment of the present application is shown.

[0031] Figure 8b A schematic diagram of a trajectory of differential signal quality changing with the axial position of a magnetic steel according to an exemplary embodiment of the present application is shown.

[0032] Figure 9 A schematic diagram of a phase angle calculated based on the inverse tangent method according to an exemplary embodiment of the present application is shown.

[0033] Figure 10 A schematic diagram of region division based on modulus square value and threshold according to an exemplary embodiment of the present application is shown.

[0034] Figure 11 A schematic diagram of a table of coding values ​​corresponding to divided sub-regions according to an exemplary embodiment of the present application is shown.

[0035] Figure 12 A schematic diagram showing the correspondence between code values ​​and phase angles according to an exemplary embodiment of the present application is shown.

[0036] Figure 13 A schematic diagram showing the correspondence between code values, phase angles, and cycle numbers according to an exemplary embodiment of the present application is shown.

[0037] Figure 14 The figure shows a schematic diagram of the correspondence between code value, phase angle and cycle number according to an exemplary embodiment of the present application.

[0038] Figure 15 A schematic diagram showing the correspondence between the axial position and the relative position within the entire area of ​​a Hall signal according to an exemplary embodiment of the present application is shown.

[0039] Figure 16 A block diagram of a device for calculating displacement using a linear encoder according to an exemplary embodiment of the present application is shown.

[0040] Figure 17An electronic device according to an exemplary embodiment of the present application is shown. DETAILED DESCRIPTION

[0041] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be embodied in many forms and should not be construed as limited to the embodiments set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete and will fully convey the concepts of the example embodiments to those skilled in the art. Like reference numerals in the drawings represent like or similar parts, and thus repetitive description thereof will be omitted.

[0042] The described features, structures or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure may be practiced without one or more of these specific details, or other modes, components, materials, devices or operations may be employed. In these cases, well-known structures, methods, devices, implementations, materials or operations will not be shown or described in detail.

[0043] The flowcharts shown in the accompanying drawings are for illustrative purposes only and do not necessarily include all contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may be decomposed, while others may be combined or partially combined. Therefore, the actual execution order may vary depending on the actual situation.

[0044] The terms "first," "second," and the like in the specification and claims of this application and the accompanying drawings are used to distinguish between different objects, not to describe a particular order. Furthermore, the terms "including," "having," and any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or apparatus comprising a series of steps or elements is not limited to the listed steps or elements but may optionally include steps or elements not listed, or may optionally include other steps or elements inherent to the process, method, product, or apparatus.

[0045] The specific embodiments of the present application are described in detail below with reference to the accompanying drawings.

[0046] Figure 1 A device block diagram of a linear encoder according to an exemplary embodiment of the present application is shown. Figure 1 The linear encoder shown includes a magnet 101 and a plurality of Hall modules 103. The Hall modules 103 are evenly distributed in pairs around the magnet 101. The magnet includes an annular magnet and a cylindrical magnet.

[0047] According to an embodiment of the present application, each of the Hall modules includes a plurality of Hall units, the corresponding Hall units in different Hall modules are Hall units of the same layer, and each of the Hall units adopts a detection method such as Figure 2 Axial as shown or Figure 3 The arrangement of the radial magnetic induction intensity components is shown.

[0048] For example, each Hall module includes a Hall array composed of a plurality of Hall units, and in each Hall array, the plurality of Hall units are sequentially arranged in layers in a direction parallel to the center line of the magnetic steel.

[0049] according to Figure 1 In the embodiment shown, multiple Hall modules are evenly arranged in pairs around a magnet, so that the Hall modules can generate corresponding voltage signals using the Hall effect in a changing magnetic field. By utilizing the relative displacement between the magnet and the linear Hall element, a mapping relationship from the actual position to the relative displacement measurement value is established within the measurement range, thereby realizing the calculation of the displacement of the measured object on the linear axis.

[0050] Figure 4 A schematic diagram of a linear encoder structure according to an exemplary embodiment of the present application is shown in FIG. Figure 4 The linear encoder shown includes a ring magnet and four Hall modules, and each Hall module includes four Hall units. The Hall units on the same layer are arranged to detect the axial magnetic induction intensity component.

[0051] like Figure 4 As shown, the first Hall module includes a Hall element H 11 、H 21 、H 31 and H 41 The second Hall module includes a Hall element H 12 、H 22 、H 32 and H 42 The third Hall module includes a Hall element H 13 、H 23 、H 33 and H 43 The fourth Hall module includes a Hall element H 14 、H 24 、H 34 and H 44 .

[0052] Since the magnet and encoder are in relative radial motion, the annular magnet will inevitably produce radial swing, thus interfering with the encoder's position signal. Figure 2 In the embodiment shown, four groups of Hall arrays are arranged radially around the annular magnet to suppress interference caused by radial swing of the annular magnet.

[0053] Figure 5 FIG. 1 shows a flow chart of a method for calculating displacement using a linear encoder according to an exemplary embodiment of the present application. Figure 5 The method shown includes steps S501 , S503 , S505 and S507 .

[0054] According to the embodiments of the present application, Figure 5 The method shown is to use Figure 1 or Figure 4 The linear encoder calculates the displacement.

[0055] like Figure 5 As shown, in step S501, the sum of the Hall voltage signals of the Hall units in the same layer of the multiple Hall modules is calculated.

[0056] According to an embodiment of the present application, in step S501 , assuming that the initial position of the magnet is equidistant from the radial distances of the four Hall elements, the magnet only performs radial swing without generating axial displacement.

[0057] When steel undergoes radial oscillation, the Hall effect voltage at the radial position will generate an interference signal of equal magnitude and opposite polarity. Therefore, the same-layer summed voltage signal calculated in step S501 no longer contains the interference voltage caused by radial oscillation, thereby improving the encoder's anti-interference ability against radial oscillation.

[0058] In step S503, the phase angle is calculated using the Hall voltage signal and .

[0059] According to an embodiment of the present application, step S503 includes performing differential processing on the Hall voltage signals φ and φ to obtain a differential signal with an electrical angle difference of 180°, and calculating the phase angle using the differential signal.

[0060] According to the magnetic field characteristics of the magnet, the axial position is linearly related to the phase of the Hall voltage signal. Therefore, it is necessary to implement phase demodulation of the Hall signal.

[0061] According to an embodiment of the present application, by performing differential processing on the Hall voltage signal and, the signal-to-noise ratio of the Hall signal can be increased and the signal quality can be improved.

[0062] In step S505 , a period number is determined according to the phase angle and a corresponding relationship between a preset regional position of the Hall voltage signal and the Hall voltage signal.

[0063] According to an embodiment of the present application, before step S505 , it is necessary to determine the corresponding relationship between the regional position of the Hall voltage signal and the Hall voltage signal.

[0064] According to some embodiments, the regional position of the Hall voltage signal includes multiple sub-regions, and determining the correspondence between the regional position of the Hall voltage signal and the Hall voltage signal includes:

[0065] Calculate the sum of the squares of the Hall voltage signals of the Hall cells in adjacent layers;

[0066] Calculating code values ​​corresponding to the plurality of sub-regions using the square sum value according to a preset threshold;

[0067] The corresponding relationship between the regional position of the Hall voltage signal and the Hall voltage signal includes the corresponding relationship between the code value and the multiple sub-regions.

[0068] In step S507, the relative displacement of the magnetic steel relative to the plurality of Hall modules is calculated using the phase angle and the cycle number.

[0069] In some embodiments, step S507 includes determining a period sequence number of the Hall voltage signal using a correspondence between the phase angle, the code value, and the plurality of sub-regions.

[0070] In a specific embodiment, the relative displacement is calculated using formula (1).

[0071]

[0072] Among them, θ e is the phase angle, N is the cycle number, and x is the relative displacement.

[0073] according to Figure 5 In the embodiment shown, the full measurement area of ​​the Hall signal is divided and encoded into sub-areas using the squared value of the Hall signal vector modulus, the corresponding period number is determined, and the relative displacement of the magnet relative to the Hall module is obtained using the period number, thereby establishing a mapping relationship from the actual position to the relative displacement measurement value within the value range of the Hall signal.

[0074] Figure 6 FIG. 1 shows a flow chart of another method for calculating displacement using a linear encoder according to an exemplary embodiment of the present application, wherein: Figure 6 The method shown is to use Figure 4 The displacement calculated by the linear encoder is shown.

[0075] like Figure 6 As shown, in step S601, the sum of the Hall voltage signals of the Hall units in the same layer of multiple Hall modules is calculated.

[0076] like Figure 2 As described above, the four Hall elements H in the first layer can be 11 、H 12 、H13 and H 14 For example, assuming that the initial position of the magnet is at the same radial distance from the four Hall elements, the magnet only swings radially without generating axial displacement.

[0077] Note that the magnet is in H 11 and H 14 The radial displacement component on the connecting line is △r x , close to H 11 The direction of H is positive. 12 and H 13 The radial displacement component on the connecting line is △r y , close to H 12 The direction is positive. Then the induced voltage u of the four Hall elements is 11 、u 12 、u 13 and u 14 As shown in formula (2).

[0078]

[0079] Where r0 is the theoretical position of the center of the magnetic ring from the Hall group when no swing occurs.

[0080] When the magnet oscillates radially, the Hall induced voltage (e.g., u 11 and u 14 、u 12 and u 13 ) generates interference signals of equal magnitude and opposite polarity. The four Hall voltage signals on the same layer are summed to obtain the Hall voltage signal sum shown in formula (2).

[0081] u1=u 11 +u 12 +u 13 +u 14 =4u(r0) (3)

[0082] Since the Hall voltage signal u1 summed on the same layer no longer contains the interference voltage caused by radial swing, the encoder's anti-interference ability to radial swing is improved.

[0083] In order to improve the success rate of linear encoder solution and make the linearity of the solution signal better, according to some embodiments of the present application, before step S601, each Hall signal (such as Figure 4 The 16 Hall signals shown in FIG4 are used to perform DC offset compensation.

[0084] For example, each Hall signal is compensated for its DC offset according to a preset compensation value table. In a specific embodiment, the compensation value table uses a fixed offset of the AD sampled Hall signal in the absence of a magnetic field; when offline, this fixed offset is used as the preset compensation value to compensate the Hall signal in real time.

[0085] In step S603, a difference calculation is performed using the calculated sum of the Hall voltage signals of each layer of the Hall cells.

[0086] when Figure 4 When the ring magnet shown moves from its lower limit to its upper limit, the Hall elements in the four horizontal planes sequentially generate voltage signals with 90-degree phase shifts. The Hall signals from the same horizontal plane are summed to produce four voltage signals, which are labeled u1, u2, u3, and u4, respectively, from top to bottom, based on their spatial positions.

[0087] Due to the magnetic field characteristics of the ring magnet, the axial position is linearly related to the phase of the Hall voltage signal. Therefore, phase demodulation of the Hall signal is required. Before phase demodulation, the four Hall signals need to be differentially processed to increase the signal-to-noise ratio of the Hall signal and improve signal quality.

[0088] According to an embodiment of the present application, before step S603, the Hall voltage signal is first normalized, such as Figure 7 As shown in FIG, a schematic diagram of the waveform of the amplitude-normalized Hall voltage signal and .

[0089] In order to suppress the common-mode interference of the Hall signal, according to an embodiment of the present application, it is also necessary to perform differential processing on the Hall signal. The Hall signal after differential processing does not contain common-mode interference, thereby improving the signal-to-noise ratio of the Hall signal and greatly improving the resolution of the displacement. In a specific embodiment, the Hall voltage signals of adjacent or spaced layers with the same number of layers can be differentially calculated. It should be noted here that when performing differential calculations, the differential value needs to have a phase difference of 180° so that the phase angle subsequently calculated based on the differential value is within the range of [-180°, 180°).

[0090] According to an embodiment of the present application, the differential calculation is performed using the method shown in formula (4).

[0091]

[0092] According to the embodiment of the present application, after the differential calculation, it is also necessary to compensate u A and u B Amplitude error and interference from mis-assembly of magnetic steel.

[0093] Figure 8a The figure shows the waveform of the differential signal changing with the axial position of the magnetic steel. Figure 8bFigure 2 shows a schematic diagram of the trajectory of the differential signal quality changing with the axial position of the magnet. Figure 8a and Figure 8b As shown, u A and u B The amplitude of the Hall effect signal varies with the axial position of the magnet, but the amplitudes of the two voltage signals have the same variation trend. In a specific embodiment, to reduce the impact of amplitude variation on the angle calculation, step S605 is performed to calculate the phase angle of the Hall effect signal using the inverse tangent method, as shown in formula (5).

[0094]

[0095] The inverse tangent method described in formula 5 is to find the phase angle of each point on the voltage vector trajectory in the plane rectangular coordinate system. The inverse tangent method can determine the quadrant where the phase angle is located by the signs of the two Hall signals. The phase angle θ is then calculated by the ratio of the two Hall signals. e , the phase angle range is [-180°, 180°). Figure 9 As shown in FIG, a schematic diagram of the phase angle calculated based on the inverse tangent method.

[0096] According to an embodiment of the present application, after the arc tangent is calculated, it is also necessary to compensate for the amplitude errors of u1, u2, u3 and u4 and the interference caused by the misassembly of the magnetic steel.

[0097] In a specific embodiment, when performing amplitude compensation, the first signal (for example, u1) is used as the basis, and the amplitude ratio of the remaining signals (for example, u2, u3 or u4) to the first signal (for example, u1) is used to make the signal amplitudes the same. After amplitude compensation, the module value layering can be made clearer, thereby greatly improving the success rate of threshold setting and decoding.

[0098] In other embodiments, when compensating for interference from mis-assembly of a magnetic steel, the complete Hall signal is first sampled offline. Since the Hall signal can be positive or negative, in a specific embodiment, the positive or negative of the initial Hall signal is used as the basis. If there is inconsistency during actual operation, the positive or negative of the signal is flipped by multiplying it by negative one to ensure that the order of all solved signals is consistent.

[0099] For each axial position, the corresponding Hall phase angle is calculated. However, the Hall phase angle alone cannot achieve position discrimination in the entire area. Figure 9 Points A and B shown have the same Hall phase angle but are located at different axial positions.

[0100] Because the full-area position contains multiple cycles of the Hall signal phase angle, the phase angles repeat between different cycles. Therefore, in a specific embodiment, the entire area is divided into multiple sub-areas so that the Hall phase angles within the sub-areas do not repeat themselves, ensuring that a one-to-one mapping from the axial position to the Hall phase angle is established within the sub-areas. The sub-areas are then encoded to identify the sub-areas corresponding to the linear encoder position. In this way, each position within the linear encoder's measurement range is mapped to a specific phase angle in a specific sub-area to ensure that each position can be distinguished.

[0101] In order to achieve a finer area division, three Hall signal vectors are constructed. The modulus square values ​​Mo1, Mo2 and Mo3 of the three Hall signal vectors are used as region division feature quantities, and step S607 is executed to calculate the square sum of the Hall voltage signals, as shown in formula (6).

[0102]

[0103] In step S609 , the Hall signal is divided into regions, and the code value K corresponding to each region is calculated, thereby determining the period number N.

[0104] According to an embodiment of the present application, a threshold is preset, and the relationship between the modulus square values ​​Mo1, Mo2 and Mo3 and the preset threshold is compared to achieve division of the entire area.

[0105] For example, two thresholds 0.5 and 0.1 are preset to quantify the relative size relationship between the modulus square value and the threshold. i (i=1,2,3) all have c i , as shown in formula (7).

[0106]

[0107] According to the calculated ci value, the full area of ​​the Hall signal is divided into 13 sub-areas, such as Figure 10 shown.

[0108] The relationship between each modulus square value and the preset threshold is compared to realize the division of the entire area into 13 sub-areas.

[0109] This division method prevents the Hall phase angle from being repeated in each sub-region, thereby ensuring a one-to-one correspondence between the axial position and the Hall phase angle in each sub-region.

[0110] Encoding subregions effectively represents the uniqueness of each subregion with a different code value. This allows the code value to be used to determine which subregion the actual position lies within, thus enabling identification of subregions. Due to the encoder's absolute measurement requirements, only the Hall effect signal at a specific axial position can be used to calculate the code value.

[0111] Because sub-regions are divided based on the relative size of the squared modulus value and the threshold, the relative size of the squared modulus value and the threshold at a certain location can well characterize the "uniqueness" of the region at that location. The polarity of the Hall voltage signal also helps to encode the sub-regions.

[0112] According to an embodiment of the present application, a code value K is constructed for each axial position of the magnetic steel according to the method shown in formula (8).

[0113] v=9c3+3c2+c1 (8)

[0114] Among them, if v=13 and u2<0, K=-v; otherwise, K=v.

[0115] Calculate formula (7) to get the code value K corresponding to each sub-region, and get Figure 11 The corresponding table diagram is shown.

[0116] like Figure 11 As described above, this encoding method calculates a code value for each position in each sub-region. Positions within the same sub-region correspond to the same code value, while positions in different sub-regions correspond to different code values ​​(regions 1 and 13 are considered the same sub-region). Since regions 4 and 10 have the same code value K, regions 4 and 10 are distinguished by using both the code value K and the polarity value of u2.

[0117] Therefore, after the code value is calculated, the sub-region where the position is located can be queried according to the above table to achieve identification of the sub-region.

[0118] Figure 12 A schematic diagram showing the corresponding relationship between the code value K and the phase angle calculated in step S605 is shown. In a specific embodiment, as shown in FIG. Figure 2 As mentioned above, due to the distortion of the magnetic field strength at a position far from the magnet, the linearity of the Hall phase angle calculated in sub-areas 1, 2, 12 and 13 is very poor. In order to ensure the overall linearity of the linear encoder throughout the entire stroke, sub-areas 1, 2, 12 and 13 are all determined to be outside the effective stroke. The middle areas 3 to 11 are all considered to be the effective stroke of the linear encoder. According to the coding characteristics of the sub-areas, unique coding is achieved for the sub-areas within the effective stroke, and the areas within the effective stroke and the invalid stroke have different coding, such as Figure 12 shown.

[0119] according to Figure 12 The code value K and the calculated phase angle correspond to the position diagram shown in FIG. Figure 13 The corresponding relationship diagram of the code value K, phase angle and cycle number shown in FIG, and Figure 14 The corresponding relationship between the code value K, phase angle and cycle number is shown in FIG.

[0120] according to Figure 13 or Figure 14 After calculating the sub-region number and the Hall phase angle polarity, the period number corresponding to the current position can be determined, and according to the formula shown in formula (1), step S611 is executed to calculate the relative displacement of the magnet relative to the multiple Hall modules.

[0121] In a specific embodiment, for the position within the effective stroke, the corresponding relative displacement is calculated according to formula (1). For the data outside the stroke, the position measurement value is set to 25mm, and the final result is as follows Figure 15 Schematic diagram of the corresponding relationship between the axial position and relative position in the entire area of ​​the Hall signal.

[0122] according to Figure 6 In the embodiment shown, the squared value of the Hall signal vector modulus is used as a characteristic quantity to divide and encode the full measurement area of ​​the Hall signal into sub-areas, thereby realizing the identification of the cycle number, thereby establishing a mapping relationship from the actual position of the magnet to the relative displacement of the magnet relative to multiple Hall modules within the measurement range of the magnet.

[0123] The encoder structure proposed in the embodiment of the present application has a good suppressing effect on the swing error in the actual linear displacement measurement for small space measurement occasions, and through Figure 6 The method shown achieves a large measuring stroke and obtains high-resolution and high-precision measurement results.

[0124] The above mainly introduces the embodiments of the present application from the perspective of methods. Those skilled in the art should readily appreciate that, in combination with the operations or steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Those skilled in the art may use different methods to implement the described functions for each specific operation or method, and such implementation should not be considered to be beyond the scope of this application.

[0125] The following describes the device embodiments of the present application. For details not described in the device embodiments of the present application, reference can be made to the method embodiments of the present application.

[0126] Figure 16 FIG. 1 shows a block diagram of a device for calculating displacement using a linear encoder according to an exemplary embodiment of the present application. Figure 16The device shown includes a Hall voltage signal sum calculation unit 1601, a phase angle calculation unit 1603, a cycle number determination unit 1605, and a relative displacement calculation unit 1607. The Hall voltage signal sum calculation unit 1601 is used to calculate the Hall voltage signal sum of the Hall cells in the same layer of the multiple Hall modules; the phase angle calculation unit 1603 is used to calculate the phase angle using the Hall voltage signal sum; the cycle number determination unit 1605 is used to determine the cycle number based on the phase angle and the correspondence between the preset regional position of the Hall voltage signal and the Hall voltage signal; and the relative displacement calculation unit 1607 is used to calculate the relative displacement of the magnetic steel relative to the multiple Hall modules using the phase angle and the cycle number.

[0127] Figure 17 An electronic device according to an exemplary embodiment of the present application is shown. Figure 17 hereinafter, an electronic device 200 according to this embodiment of the present application is described. Figure 17 The electronic device 200 shown is merely an example and should not limit the functions and scope of use of the embodiments of the present application.

[0128] like Figure 17 As shown, electronic device 200 is implemented as a general-purpose computing device. Components of electronic device 200 may include, but are not limited to, at least one processing unit 210, at least one storage unit 220, a bus 230 connecting various system components (including storage unit 220 and processing unit 210), a display unit 240, and the like.

[0129] The storage unit stores program codes, which can be executed by the processing unit 210, so that the processing unit 210 executes the methods described in this specification according to various exemplary embodiments of the present application. For example, the processing unit 210 can execute the following Figure 5 The method shown in .

[0130] The storage unit 220 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 2201 and / or a cache memory unit 2202 , and may further include a read-only memory unit (ROM) 2203 .

[0131] The storage unit 220 may also include a program / utility 2204 having a set (at least one) of program modules 2205, such program modules 2205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.

[0132] Bus 230 may represent one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.

[0133] The electronic device 200 can also communicate with one or more external devices 300 (e.g., a keyboard, a pointing device, a Bluetooth device, etc.), one or more devices that enable a user to interact with the electronic device 200, and / or any device that enables the electronic device 200 to communicate with one or more other computing devices (e.g., a router, a modem, etc.). Such communication can occur via an input / output (I / O) interface 250. Furthermore, the electronic device 200 can communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network such as the Internet) via a network adapter 260. The network adapter 260 can communicate with other modules of the electronic device 200 via the bus 230. It should be understood that, although not shown in the figures, other hardware and / or software modules can be used in conjunction with the electronic device 200, including but not limited to microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0134] Through the description of the above embodiments, it is easy for those skilled in the art to understand that the example embodiments described here can be implemented by software or by combining software with necessary hardware. The technical solution according to the embodiment of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, or a network device, etc.) to execute the above method according to the embodiment of the present application.

[0135] The software product can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can be, for example, but not limited to, a system, device or component of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination thereof. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof.

[0136] Computer-readable storage media may include a data signal propagated in baseband or as part of a carrier wave, which carries readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The readable storage medium may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the readable storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination thereof.

[0137] The program code for performing the operations of the present application can be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java, C++, and the like, as well as conventional procedural programming languages ​​such as "C" or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, as a stand-alone software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device can be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (e.g., via the Internet using an Internet service provider).

[0138] The computer-readable medium carries one or more programs. When the one or more programs are executed by the device, the computer-readable medium implements the aforementioned functions.

[0139] Those skilled in the art will appreciate that the modules described above can be distributed in the device according to the description of the embodiment, or can be modified accordingly to be used in one or more devices that are different from the embodiment. The modules of the above embodiment can be combined into one module or further divided into multiple submodules.

[0140] According to an embodiment of the present application, a computer program is provided, including a computer program or instructions. When the computer program or instructions are executed by a processor, the method described above can be executed.

[0141] The embodiments of the present application are described in detail above. Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only intended to help understand the method and core ideas of the present application. At the same time, changes or modifications made by those skilled in the art based on the ideas of the present application, the specific implementation methods, and the scope of application of the present application, all fall within the scope of protection of the present application. In summary, the contents of this specification should not be construed as limiting the present application.

Claims

1. A linear encoder, characterized in that: include: magnetic steel; as well as A plurality of Hall modules are evenly distributed in pairs around the magnetic steel.

2. The linear encoder according to claim 1, wherein: Each of the Hall modules includes a plurality of Hall units, and the corresponding Hall units in different Hall modules are Hall units in the same layer.

3. The linear encoder according to claim 1, wherein: The magnetic steel includes an annular magnetic steel and a cylindrical magnetic steel.

4. The linear encoder according to claim 1, wherein: Each of the Hall modules is arranged to detect an axial or radial magnetic induction intensity component.

5. A method for calculating displacement using a linear encoder according to any one of claims 2 to 4, characterized in that: The method comprises: Calculating the sum of the Hall voltage signals of the Hall units in the same layer in the multiple Hall modules; Calculating a phase angle using the Hall voltage signal; Determining a period number according to a correspondence between the phase angle and a preset regional position of the Hall voltage signal and the Hall voltage signal; The relative displacement of the magnetic steel relative to the plurality of Hall modules is calculated using the phase angle and the period sequence number.

6. The method according to claim 5, characterized in that Utilizing the Hall voltage signal and calculating the phase angle, including: Performing differential processing on the Hall voltage signals and to obtain differential signals with an electrical angle difference of 180°; The phase angle is calculated using the differential signal.

7. The method according to claim 6, characterized in that Before determining the period number according to the phase angle and the corresponding relationship between the preset regional position of the Hall voltage signal and the Hall voltage signal, the method further includes: Determine a corresponding relationship between the regional position of the Hall voltage signal and the Hall voltage signal.

8. The method according to claim 7, characterized in that The regional position of the Hall voltage signal includes a plurality of sub-regions, and determining the corresponding relationship between the regional position of the Hall voltage signal and the Hall voltage signal includes: Calculate the sum of the squares of the Hall voltage signals of the Hall cells in adjacent layers; Calculating code values ​​corresponding to the plurality of sub-regions using the square sum value according to a preset threshold; The corresponding relationship between the regional position of the Hall voltage signal and the Hall voltage signal includes the corresponding relationship between the code value and the multiple sub-regions.

9. The method according to claim 8, characterized in that Determining a period sequence number of the Hall voltage signal according to a correspondence between the phase angle and a preset regional position of the Hall voltage signal and the Hall voltage signal includes: The period sequence number of the Hall voltage signal is determined using the corresponding relationship between the phase angle, the code value and the multiple sub-regions.

10. The method according to claim 9, characterized in that Calculating the relative displacement between the Hall module and the magnetic steel using the phase angle and the cycle number includes: calculating the relative displacement using the following formula: Among them, θ e is the phase angle, N is the cycle number, and x is the relative displacement.

11. A device for calculating displacement using the linear encoder according to any one of claims 2 to 4, characterized in that: The device comprises: A Hall voltage signal sum calculation unit, configured to calculate the sum of the Hall voltage signals of the Hall units in the same layer of the multiple Hall modules; A phase angle calculation unit, configured to calculate a phase angle using the Hall voltage signal; a cycle number determining unit, configured to determine a cycle number according to a correspondence between the phase angle and a preset regional position of the Hall voltage signal and the Hall voltage signal; A relative displacement calculation unit is used to calculate the relative displacement of the magnetic steel relative to the multiple Hall modules using the phase angle and the period sequence number.

12. An electronic device, characterized in that: include: one or more processing units; a storage unit for storing one or more programs; When the one or more programs are executed by the one or more processing units, the one or more processing units implement the method according to any one of claims 5 to 10.

13. A non-transitory computer-readable storage medium having computer-readable instructions stored thereon, which, when executed by a processor, causes the processor to perform the method according to any one of claims 5 to 10.

Citation Information

Cited By

  • Linear encoder, and method and device for calculating displacement by using linear encoder

    CN120702314A