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

By using a combination of annular magnets and Hall modules in a linear encoder, the Hall voltage signal and the square sum are calculated to determine the absolute electrical angle value, thus solving the problem of high-precision displacement measurement in a small space, achieving high-precision, low-cost displacement measurement, and suppressing radial swing interference.

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

Patent Information

Application Number
CN202410355836.7
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 achieve high-precision displacement measurement in a small space, and have problems such as complex structure, high price and susceptibility to vibration during measurement.

Method used

A ring magnet and multiple Hall modules evenly distributed around it are used to determine the absolute electrical angle value by calculating the sum and square sum of the Hall voltage signals of the Hall modules. The relative displacement is calculated using the preset threshold and code value relationship, radial swing interference is suppressed, and a mapping relationship from actual position to relative displacement is established.

Benefits of technology

It realizes high-precision displacement measurement in a small space, suppresses radial swing interference, improves measurement accuracy and anti-interference ability, and reduces equipment cost.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120702314A_ABST
    Figure CN120702314A_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 plurality of Hall modules which are uniformly distributed in pairs around the magnetic steel establish a mapping relation from an actual position to a relative displacement measurement value.
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 scales or optical scales, but these two types of encoders are suitable for applications requiring large displacement testing. However, existing magnetic scales or optical scales have the following problems:

[0004] 1) It is impossible to achieve linear displacement measurement in small spaces and large measuring strokes such as electromechanical brake boosters;

[0005] 2) The structure of the grating scale or magnetic scale is complex, the sensor is large, and the price is expensive, with low cost performance;

[0006] 3) When oscillation occurs during measurement, the measurement error cannot be suppressed.

[0007] The inventors of the present application have discovered that there is currently a lack of linear encoders suitable for small spaces, and that linear encoders may suffer from measurement failures due to the presence of jump points during use. Summary of the Invention

[0008] 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.

[0009] 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.

[0010] 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.

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

[0012] According to some embodiments, each of the Hall modules is arranged in a manner of detecting an axial or radial magnetic induction intensity component.

[0013] According to some embodiments, an axial spacing among the plurality of Hall modules is half of the pole pitch of the magnet.

[0014] According to one aspect of the present application, a method for calculating displacement using a linear encoder as described in any of the previous embodiments 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 sum of the squares of the sums of the Hall voltage signals of the Hall units in adjacent layers; determining the code value corresponding to the square sum value based on a preset threshold and the correspondence between the preset threshold and the code value; determining the absolute electrical angle value based on the preset correspondence between the code value and the absolute electrical angle value; and calculating the relative displacement of the magnetic steel relative to the multiple Hall modules using the absolute electrical angle value.

[0015] According to some embodiments, before determining the absolute electrical angle value according to the preset correspondence between the code value and the absolute electrical angle value, the method further includes determining the correspondence between the code value and the absolute electrical angle value.

[0016] According to some embodiments, determining the correspondence between the code value and the absolute electrical angle value includes calculating the sum of the Hall voltage signals of the Hall units in the same layer in the multiple Hall modules; calculating the sum of the squares of the Hall voltage signals of the Hall units in adjacent layers; using the square sum value to calculate the threshold through step filtering; determining the code values ​​corresponding to different positions of the square sum value based on the calculated threshold; calculating the absolute electrical angle value using the square sum value and the code value; and determining the correspondence between the code value and the absolute electrical angle value using the code value and the absolute electrical angle value.

[0017] According to some embodiments, the threshold includes an upper threshold and a lower threshold, and the threshold is calculated using the square sum value through step-length filtering, including using the square sum value to determine the minimum value, maximum value and second-to-last maximum value of the trough of the square sum value through step-length filtering; using the maximum value and the second-to-last maximum value of the trough to calculate the upper threshold; and using the minimum value of the trough to calculate the lower threshold.

[0018] According to some embodiments, the absolute electrical angle value is calculated using the square sum value and the code value, including performing an inverse tangent solution on the square sum value to obtain an electrical angle combination signal; determining an interval position based on the code value; and calculating the absolute electrical angle value based on the interval position and the electrical angle combination signal.

[0019] According to some embodiments, calculating the relative displacement of the magnetic steel relative to the plurality of Hall modules using the absolute electrical angle value includes: calculating the relative displacement using the following formula:

[0020]

[0021] Wherein, θ is the absolute electrical angle value, and x is the relative displacement.

[0022] According to one aspect of the present application, a device for calculating displacement using a linear encoder as described in any of the previous embodiments is proposed, wherein the device includes a Hall voltage signal and calculation unit for calculating the sum of the Hall voltage signals of the Hall units in the same layer of the multiple Hall modules; a square sum value calculation unit for calculating the square sum of the Hall voltage signals of the Hall units in adjacent layers; a code value determination unit for determining the code values ​​corresponding to different positions of the square sum value according to a preset threshold; an absolute electrical angle value determination unit for determining the absolute electrical angle value according to a preset correspondence between the code value and the absolute electrical angle value; and a relative displacement calculation unit for calculating the relative displacement of the magnetic steel relative to the multiple Hall modules using the absolute electrical angle value.

[0023] 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.

[0024] 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.

[0025] According to an exemplary embodiment of the present application, a mapping relationship between actual position and relative displacement measurement value is established by a plurality of Hall modules uniformly distributed in pairs around the magnetic steel.

[0026] According to other embodiments, the interference of radial vibration of the magnetic steel on the Hall signal is suppressed by calculating the sum of the Hall voltage signals of the Hall cells in the same layer of multiple Hall modules. The absolute electrical angle value corresponding to the Hall signal is determined using the sum of the squares of the Hall voltage signals. Based on the correspondence between the absolute electrical angle value and the relative displacement, the relative displacement of the magnetic steel relative to the multiple Hall modules is obtained, thereby establishing a mapping relationship between actual position and relative displacement measurement within the measurement range of the Hall signal. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] 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.

[0028] Figure 1 A schematic diagram of the measurement principle of a linear encoder according to an exemplary embodiment of the present application is shown.

[0029] Figure 2 A schematic diagram of the measurement principle of a linear encoder according to an exemplary embodiment of the present application is shown.

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

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

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

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

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

[0035] Figure 8 A schematic diagram showing four Hall elements arranged in an axial direction according to an exemplary embodiment of the present application is shown.

[0036] Figure 9 A flow chart of a method for determining the correspondence between code values ​​and absolute electrical angle values ​​according to an exemplary embodiment of the present application is shown.

[0037] Figure 10 A schematic diagram of a waveform of normalized summed Hall signal amplitudes on the same horizontal plane according to an exemplary embodiment of the present application is shown.

[0038] Figure 11 A waveform diagram of the sum of squares of Hall voltage signals of Hall cells in adjacent layers according to an exemplary embodiment of the present application is shown.

[0039] Figure 12 A schematic diagram of the modulus slope of the sum of squares of a Hall voltage signal according to an exemplary embodiment of the present application is shown.

[0040] Figure 13 A schematic diagram of code values ​​according to an exemplary embodiment of the present application is shown.

[0041] Figure 14 A schematic diagram of the relative relationship between an electrical angle synthesis signal and a code value according to an exemplary embodiment of the present application is shown.

[0042] Figure 15 A schematic diagram of the relative relationship between the electrical angle synthesis signal and the code value after intersection merging according to an exemplary embodiment of the present application is shown.

[0043] Figure 16A schematic diagram of a fuzzy transition angle synthesis algorithm according to an exemplary embodiment of the present application is shown.

[0044] Figure 17 A schematic diagram of an absolute electrical angle value obtained after a fuzzy transition of an electrical angle synthesis signal according to an exemplary embodiment of the present application is shown.

[0045] Figure 18 A schematic diagram showing a correspondence between a code value and an absolute electrical angle value according to an exemplary embodiment of the present application is shown.

[0046] Figure 19 A correspondence table between code values ​​and absolute electrical angle values ​​according to an exemplary embodiment of the present application is shown.

[0047] Figure 20 A schematic diagram of a test bench for a linear encoder according to an exemplary embodiment of the present application is shown.

[0048] Figure 21 A schematic diagram of displacement measurement of a linear encoder according to an exemplary embodiment of the present application is shown.

[0049] Figure 22 A schematic diagram of displacement measurement of another linear encoder according to an exemplary embodiment of the present application is shown.

[0050] Figure 23 A resolution diagram of a linear encoder according to an exemplary embodiment of the present application is shown.

[0051] Figure 24a A single signal schematic diagram of a third-layer Hall element according to an exemplary embodiment of the present application is shown.

[0052] Figure 24b A schematic diagram of the summed signal of a third-layer Hall element according to an exemplary embodiment of the present application is shown.

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

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

[0055] 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.

[0056] 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.

[0057] 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.

[0058] 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.

[0059] The linear encoder in this application is a magnetoelectric linear encoder that provides absolute linear position measurement. This is achieved by establishing a one-to-one mapping from actual position to position measurement. For each actual position within the linear encoder's measurement range, the linear encoder maps it to a position measurement.

[0060] like Figure 2 As shown, the linear encoder according to an embodiment of the present application establishes a mapping using a magnetic field and Hall elements. For example, a mapping from actual position to Hall signals is established by generating a magnetic field from a permanent magnet and arranging the position of the Hall elements relative to the permanent magnet. Furthermore, a mapping from the Hall signals to position measurements is established based on the characteristics of the Hall signals. Ultimately, through the action of these two mappings, a "one-to-one" mapping from actual position to position measurement is established, giving the linear encoder a measurement function.

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

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

[0063] 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 4 Axial as shown or Figure 5 The radial magnetic induction intensity components are arranged in the manner shown.

[0064] 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.

[0065] according to Figure 3 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.

[0066] Figure 6 A schematic diagram of a linear encoder structure according to an exemplary embodiment of the present application is shown in FIG. Figure 6 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.

[0067] like Figure 6 As shown, the first Hall module includes Hall elements H11, H21, H31 and H41, the second Hall module includes Hall elements H12, H22, H32 and H42, the third Hall module includes Hall elements H13, H23, H33 and H43, and the fourth Hall module includes Hall elements H14, H24, H34 and H44.

[0068] 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 6 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.

[0069] Figure 7 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 7 The method shown includes steps S701 , S703 , S705 , S707 and S709 .

[0070] According to the embodiments of the present application, Figure 5 The method shown is to use Figure 3 or Figure 6 The linear encoder calculates the displacement.

[0071] like Figure 7 As shown, in step S701, the sum of the Hall voltage signals of the Hall units in the same layer of the multiple Hall modules is calculated.

[0072] According to the embodiments of the present application, in step S701, the initial position of the magnet is equidistant radially from the four Hall elements, and the magnet oscillates radially without generating axial displacement. Radial oscillation of the magnet generates interference signals of equal magnitude and opposite polarity in the Hall effect voltages at the radially opposite positions. Therefore, the summed voltage signal on the same level calculated in step S701 no longer contains the interference voltage caused by radial oscillation, thereby improving the linear encoder's ability to resist radial oscillation.

[0073] In step S703 , the square sum of the Hall voltage signals of the Hall cells in adjacent layers is calculated.

[0074] In a specific real-time example, Figure 8 As shown, four Hall elements are arranged axially, with their axial spacing equal to half the magnet pole pitch. This allows the induction of four sinusoidal voltage signals, with the induced voltages of adjacent Hall elements differing by 90°. As the annular magnet moves through its entire travel from top to bottom, Hall elements H1, H2, H3, and H4 generate induced voltages of u1, u2, u3, and u4, respectively.

[0075] In step S703, three Hall signal vectors are constructed. The square sums of the Hall voltage signals of the Hall cells in adjacent layers, Mo1, Mo2 and Mo3, are calculated as shown in formula (1).

[0076]

[0077] In step S705, the code value corresponding to the square sum value is determined according to a preset threshold value and a correspondence between the preset threshold value and the code value.

[0078] In the embodiment of the present application, since the calculation is based on the Hall signal of the same layer, the relationship between the code value and the electrical angle is determined, and the code value is also called the Hall code value or the electrical angle code value.

[0079] Since the calculated sum of the squares of the Hall voltage signals is close to 0 on both sides of the measurement range of the linear encoder, it cannot effectively reflect the position information.

[0080] In a specific embodiment, the preset threshold includes an upper threshold and a lower threshold, and three segmented areas are determined based on the upper threshold and the lower threshold, and different code values ​​are configured for the three segmented areas to distinguish different segmented areas, thereby determining the code value corresponding to the square sum value.

[0081] In step S707, the absolute electrical angle value is determined according to the preset correspondence between the code value and the absolute electrical angle value.

[0082] According to an embodiment of the present application, before step S709 , it is necessary to first determine the correspondence between the code value and the absolute electrical angle value.

[0083] In a specific embodiment, when determining the correspondence between the code value and the absolute electrical angle value, first, the inverse tangent of the square sum of the Hall voltage signals is solved to obtain an electrical angle combination signal; then, the interval position is determined according to the code value; finally, the absolute electrical angle value is calculated based on the interval position and the electrical angle combination signal.

[0084] In step S709, the relative displacement of the magnetic steel relative to the plurality of Hall modules is calculated using the absolute electrical angle value.

[0085] According to an embodiment of the present application, the relative displacement is calculated using formula (2).

[0086]

[0087] Wherein, θ is the absolute electrical angle value, and x is the relative displacement.

[0088] according to Figure 7 The illustrated embodiment suppresses interference from radial magnetic swing on the Hall signal by calculating the sum of the Hall voltage signals from Hall cells in the same layer of multiple Hall modules. The square sum of the Hall voltage signals is used to determine the absolute electrical angle corresponding to the Hall signal. Based on the correspondence between the absolute electrical angle and relative displacement, the relative displacement of the magnetic element relative to the multiple Hall modules is derived, thereby establishing a mapping relationship between actual position and relative displacement within the Hall signal measurement range.

[0089] Figure 9 A flow chart of a method for determining the correspondence between code values ​​and absolute electrical angle values ​​according to an exemplary embodiment of the present application is shown, wherein: Figure 9 The method shown is to use Figure 8 The displacement calculated by the linear encoder is shown.

[0090] like Figure 9 As shown, in step S901, the sum of the Hall voltage signals of the Hall units in the same layer of the multiple Hall modules is calculated.

[0091] like Figure 8 As shown in Figure 1, when the annular magnet moves from the lower limit position to the upper limit position, the Hall sensors in the four horizontal planes sequentially generate voltage signals with a phase difference of 90 degrees. After summing the Hall sensors signals on the same horizontal plane, four voltage signals are obtained. They are recorded as Hall-sum1, Hall-sum2, Hall-sum3, and Hall-sum4 from top to bottom according to their spatial positions. The four voltage signals are shown in formula (3).

[0092]

[0093] Among them, u i is the Hall element H i Induction signal, A is the Hall signal amplitude, x is the axial position of the magnet, p is the displacement period of the Hall signal, is the phase of the Hall signal at the initial position, n c It is a common mode interference signal.

[0094] The four amplitude normalized voltage signals are as follows Figure 10 As shown in the figure, the Hall waveform shows that the Hall signal is close to 0 at both ends of the measurement range and cannot effectively reflect the position information. Therefore, it is necessary to find a useful Hall signal segment. According to an embodiment of the present application, the square sum of the Hall voltage signals of adjacent layers of Hall cells is used to perform regional segmentation.

[0095] In step S903 , the square sum of the Hall voltage signals of the Hall cells in adjacent layers is calculated.

[0096] In this embodiment, three Hall signal vectors are constructed using the sum of the squares of the Hall voltage signals of the Hall cells in adjacent layers. And calculate the square sum of the Hall voltage signals of the adjacent layer Hall units Mo1, Mo2 and Mo3, as shown in formula (1), the modulus function waveforms of the three Hall signals are as follows: Figure 11 shown.

[0097] like Figure 11 As shown in FIG, the function waveforms of the three Hall signals are segmented, with six small peaks on the left and right sides of the center area of ​​the modulus and six large peak areas in the middle. The modulus is nonlinear.

[0098] In order to facilitate encoding, the modulus value needs to be converted into a digital value that can be encoded. Therefore, two threshold interval signals are set based on the segmented characteristics of the modulus value, and step S905 is executed.

[0099] In step S905, a threshold is calculated using the square sum value through step-size filtering.

[0100] According to an embodiment of the present application, the threshold includes an upper threshold and a lower threshold. In step S905, first, the square sum value is used to determine the minimum value, maximum value and second-to-last maximum value of the trough of the square sum value by step filtering; then, the upper threshold is calculated using the maximum value and the second-to-last maximum value of the trough; finally, the lower threshold is calculated using the minimum value of the trough.

[0101] In a specific embodiment, a step size filtering method is used, for example, the square sum value calculated in step S903 is filtered with a step size of 50, and the obtained modulus slope Mod_SLO is as follows: Figure 12 shown.

[0102] like Figure 12 As shown, when the modulus slope Mod_SLO switches from a positive value to a negative value, the slope switching point is the maximum value point of the modulus. When the modulus slope switches from a negative value to a positive value, the slope switching position can be found at the minimum value point of the modulus.

[0103] Because the slopes of the modulus values ​​on both sides are very small, noise causes the Mod_SLO value to fluctuate significantly, resulting in many false positives. In a specific embodiment, when the slope value on the left side of the modulus value is less than 200, a fixed slope of, for example, 200 is set for the three modulus values. On the right side, the slopes of the three modulus values ​​are determined to be -200 to determine whether to perform an extreme value solution. If the slope is greater than -200, all three slopes are given a negative fixed slope.

[0104] like Figure 12 As shown, each modulus slope signal Mod_SLO can determine three minimum trough values ​​Min_pot_v[1,3] and four maximum peak values ​​Max_pot_v[1,3]. In step S905, first, the minimum value MOD_down_min and the maximum value MOD_up_min of the trough of each modulus are determined. Then, the maximum values ​​of the troughs of the three modulus values ​​are sorted in descending order to determine the maximum value Middle_big_pot of the second-to-last trough. Finally, the lower threshold Small_limit and the upper threshold Big_limit are determined using formulas (4) and (5).

[0105] Big_limit=(MOD_up_min+Middle_big_pot) / 2+Middle_big_pot (4)

[0106] Small_limit=MOD_down_min / 2 (5)

[0107] In step S907, code values ​​corresponding to different positions of the square sum value are determined according to the calculated threshold.

[0108] A three-bit KK code value is constructed by the lower threshold Small_limit and the upper threshold Big_limit calculated in step S905, as shown in formula (6). The KK code can be used to determine the displacement information of each corresponding interval, thereby establishing a corresponding relationship between the threshold and the code value.

[0109]

[0110] Using the KK code value and the calculated lower and upper thresholds, we can get Figure 13 The KK code waveform shown.

[0111] In step S909, the absolute electrical angle value is calculated using the square sum value and the code value.

[0112] According to an embodiment of the present application, in step S909, first, the electrical angle synthesis signal is determined using the square sum value, and then the absolute electrical angle value is calculated using the electrical angle synthesis signal and the code value.

[0113] In a specific embodiment, the arc tangent of three adjacent groups of sinusoidal signals is solved to obtain three electrical angle signals. In order to achieve a larger measurement stroke, since the two electrical angles xita1 and xita3 at the edge of the stroke cover a larger displacement range, and the xita3 signal noise is the smallest on the left side of the stroke and the xita1 signal noise is the smallest on the right side of the stroke, therefore, the signal-to-noise ratio of xita1 and xita3 is higher when the angle is combined into a complete angle, and the measurement resolution is better. Figure 14 shown.

[0114] like Figure 14 As shown, angle merging is performed at the intersection of two electrical angles. However, there are three intersections between the two electrical angles. Since the signal-to-noise ratio of the Xita3 signal to the left of the first and second intersections is high, the noise of the Xita3 signal at the third intersection is too high, affecting the resolution of the merged signal. Furthermore, the usage range of the Xita3 signal at the second intersection is large, so the middle intersection is selected as the merging point.

[0115] For example, the point where the KK3 code value switches from 2 to 1 is recorded as P1, and the point where the KK2 code value switches from 2 to 1 is recorded as P2. The interval length delta is obtained by taking the difference between P1 and P2, as shown in formula (7). The one-third O1 and two-thirds O2 of the interval are found through the interval base point P1 and delta, as shown in formulas (8) and (9). The difference between point O1 and point O2 is shown in formula (10), and the corresponding waveform is as follows: Figure 15 shown.

[0116] delta=P2-P1 (7)

[0117] O1=P1+1 / 3×delta (8)

[0118] O2=P1+2 / 3×delta (9)

[0119] Shift_Value=abs(xita3(O1)-xita1(O1)) (10)

[0120]

[0121] like Figure 15 As shown, if xita1 and xita3 are directly spliced, the synthesized electrical angle will have an angle jump at the intersection, and a smooth and continuous electrical angle cannot be synthesized. According to an embodiment of the present application, through a fuzzy transition method, the weight formula (12) is used in the switching part from the electrical angle P1 to O2 to achieve a smooth transition of the switching part from the electrical angle P1 to O2, and obtain the absolute electrical angle value. The principle corresponding to formula (12) is as follows Figure 16 shown.

[0122]

[0123] The final absolute electrical angle value is as follows: Figure 17 As shown in FIG, the absolute electrical angle value realizes smooth switching in the angle synthesis interval, thereby solving the problem of discontinuous angle synthesis in multiple intervals.

[0124] In step S911, the corresponding relationship between the code value and the absolute electrical angle value is determined by using the code value and the absolute electrical angle value.

[0125] In a specific embodiment, the absolute electrical angle value xita5 is combined with the KK code value, and the multi-interval xita5 is translated and merged into a complete angle, thereby obtaining the measurement signal MAG_xita, and establishing a corresponding relationship between the code value and the absolute electrical angle value, such as Figure 18 Shown and Figure 19 shown.

[0126] Figure 20 A schematic diagram of a test bench for a linear encoder according to an exemplary embodiment of the present application is shown below. Figure 20 Taking as an example, the verification process of the linear encoder of the exemplary embodiment of the present application is described in detail.

[0127] Before verification, the angle interval with a KK code value of 0 is first identified as the over-range part, and this interval is assigned a value of 0xFFFFFFF5, and the corresponding measured displacement value is preset to 25mm, so as to distinguish the effective range from the over-range.

[0128] The linear encoder test bench is based on a ball screw linear module. To achieve low-speed movement of the slider, the screw has a small lead of 5mm, thereby increasing the number of data points collected within the travel range. The linear encoder, along with its supporting triangular plate or tripod, is fixed to the slider and moves axially with the slider. The pedal push rod, equipped with an annular magnet, is located in the inner hole of the tripod and cannot move axially, but can only make a small radial swing within the tripod. A coupling connects the screw coaxially with the photoelectric encoder shaft. The photoelectric encoder is used to obtain the screw's rotation angle, which is converted into a linear displacement value, thereby converting the actual displacement of the slider.

[0129] Since the linearity of the calibrated magnetoelectric displacement signal is better, the magnetoelectric encoder displacement and the photoelectric encoder displacement values ​​are collected at the same time, and the error of the two signals is obtained by difference. The error value is burned into the single chip microcomputer to compensate the error of the magnetoelectric displacement sensor in real time. Figure 21 and Figure 22 As shown, Figure 21 FIG2 shows a schematic diagram of displacement measurement of a linear encoder according to an exemplary embodiment of the present application. Figure 22 The diagram shows another linear encoder measuring displacement according to an exemplary embodiment of the present application, wherein the horizontal axis is the photoelectric displacement and the vertical axis is the magnetoelectric displacement value. Figure 22 For Figure 21 Based on the error calibration, we can get Figure 21 As shown in FIG22 , the final measurement stroke of the linear encoder is 17.6635 mm.

[0130] Figure 23 A schematic diagram of the resolution of a linear encoder according to an exemplary embodiment of the present application is shown in FIG. Figure 23 It can be seen that the measurement resolution of the linear encoder of the embodiment of the present application is ±1.3 μm. The measurement resolution is the peak-to-peak value of the static signal fluctuation of the linear encoder, which is the resolution of the linear encoder.

[0131] In order to verify the anti-interference characteristics of the linear encoder of the exemplary embodiment of the present application, the lead screw is not rotated, so that the slider is self-locked in a fixed position. The push rod with the annular magnetic steel is radially shaken, so that the magnetic steel makes radial swing relative to the linear encoder without axial movement. The final sampling data of the Hall signal is as follows Figure 24a and Figure 24b As shown, Figure 24a is a single signal from the third-layer Hall element. Figure 24b is the sum signal of the third layer Hall element. Figure 24a and Figure 24bAs shown, the fluctuation of the average value of the four circumferentially arranged Hall signals is smaller. Therefore, the same-layer summation method effectively weakens the interference of radial swing on the Hall signal, verifying the effectiveness of the anti-swing structure design of the linear encoder in the embodiment of the present application.

[0132] The embodiments of the present application are described above mainly from the perspective of methods. Those skilled in the art should readily appreciate that, in conjunction 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 beyond the scope of this application.

[0133] 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.

[0134] Figure 25 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 25 The device shown includes a Hall voltage signal sum calculation unit 2501, a square sum value calculation unit 2503, a code value determination unit 2505, an absolute electrical angle value determination unit 2507, and a relative displacement calculation unit 2509. The Hall voltage signal sum calculation unit 2501 is used to calculate the Hall voltage signal sum of the Hall cells in the same layer of the multiple Hall modules; the square sum value calculation unit 2503 is used to calculate the square sum of the Hall voltage signal sums of the Hall cells in adjacent layers; the code value determination unit 2505 determines the code values ​​corresponding to different positions of the square sum value based on a preset threshold; the absolute electrical angle value determination unit 2507 is used to determine the absolute electrical angle value based on a preset correspondence between the code value and the absolute electrical angle value; and the relative displacement calculation unit 2509 is used to calculate the relative displacement of the magnetic steel relative to the multiple Hall modules using the absolute electrical angle value.

[0135] Figure 26 An electronic device according to an exemplary embodiment of the present application is shown. Figure 26 hereinafter, an electronic device 200 according to this embodiment of the present application is described. Figure 26 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.

[0136] like Figure 26As 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.

[0137] 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 .

[0138] 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 .

[0139] 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.

[0140] 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.

[0141] 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.

[0142] 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.

[0143] 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.

[0144] 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.

[0145] 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).

[0146] 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.

[0147] 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.

[0148] 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.

[0149] 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 2, wherein: The magnetic steel includes an annular magnetic steel and a cylindrical magnetic steel.

4. The linear encoder according to claim 2, wherein: Each of the Hall modules is arranged in a manner of detecting an axial or radial magnetic induction intensity component.

5. The linear encoder according to claim 2, wherein: The axial spacing between the multiple Hall modules is half of the magnetic steel pole pitch.

6. A method for calculating displacement using a linear encoder according to any one of claims 2 to 5, 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; Calculate the sum of the squares of the Hall voltage signals of the Hall cells in adjacent layers; Determining a code value corresponding to the square sum value according to a preset threshold and a correspondence between the preset threshold and the code value; Determine the absolute electrical angle value according to the preset correspondence between the code value and the absolute electrical angle value; The relative displacement of the magnetic steel relative to the plurality of Hall modules is calculated using the absolute electrical angle value.

7. The method according to claim 6, characterized in that Before determining the absolute electrical angle value according to the preset correspondence between the code value and the absolute electrical angle value, the method further includes: Determine the correspondence between the code value and the absolute electrical angle value.

8. The method according to claim 7, characterized in that Determining the correspondence between the code value and the absolute electrical angle value includes: Calculating the sum of the Hall voltage signals of the Hall units in the same layer in the multiple Hall modules; Calculate the sum of the squares of the Hall voltage signals of the Hall cells in adjacent layers; Calculating a threshold using the square sum value through step-size filtering; Determining code values ​​corresponding to different positions of the square sum value according to the calculated threshold value; Calculating an absolute electrical angle value using the square sum value and the code value; The code value and the absolute electrical angle value are used to determine a corresponding relationship between the code value and the absolute electrical angle value.

9. The method according to claim 8, characterized in that The threshold value includes an upper threshold value and a lower threshold value, and the threshold value is calculated by using the square sum value through a step-size filtering method, including: Using the square sum value, determining the minimum value, the maximum value and the second-to-last maximum value of the trough of the square sum value by step size filtering; Calculating the upper threshold value using the trough maximum value and the penultimate maximum value of the trough; The lower threshold is calculated using the minimum value of the trough.

10. The method according to claim 8, characterized in that Calculating an absolute electrical angle value using the square sum value and the code value includes: performing arc tangent calculation on the square sum value to obtain an electrical angle combination signal; determining an interval position according to the code value; An absolute electrical angle value is calculated according to the interval position and the electrical angle combination signal.

11. The method according to claim 6, characterized in that Calculating the relative displacement of the magnetic steel relative to the plurality of Hall modules using the absolute electrical angle value includes: calculating the relative displacement using the following formula: Wherein, θ is the absolute electrical angle value, and x is the relative displacement.

12. A device for calculating displacement using the linear encoder according to any one of claims 2 to 5, 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 square sum calculation unit, used to calculate the square sum of the Hall voltage signals of the Hall units in adjacent layers; a code value determining unit, for determining code values ​​corresponding to different positions of the square sum value according to a preset threshold; an absolute electrical angle value determining unit, configured to determine the absolute electrical angle value according to a preset correspondence between the code value and the absolute electrical angle value; The relative displacement calculation unit is used to calculate the relative displacement of the magnetic steel relative to the multiple Hall modules using the absolute electrical angle value.

13. 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 6 to 11.

14. 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 6 to 11.

Citation Information

Patent Citations

  • High resolution absolute encoder

    CN109642782A

  • Method, device and equipment for adjusting position of sensor in encoder and storage medium

    CN113063450A

  • Torque measurement method based on Hall effect

    CN117647345A

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

    CN120702313A

  • Cylinder-type linear motor

    CN204517630U