A displacement detection method and system

By converting relative Hall values ​​to absolute Hall values, the problem of complex signal processing in high-resolution magnetic linear encoders in existing technologies is solved, and displacement information acquisition and lens focusing are simplified in various scenarios.

CN117268437BActive Publication Date: 2026-11-06WUHAN GUIDE SENSMART TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311218294.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-09-19
Publication Date
2026-11-06
Estimated Expiration
2043-09-19

AI Technical Summary

Technical Problem

Existing technologies require the use of dedicated FPGAs to process high-resolution magnetic linear encoder signals and require multiple communication signal pins, resulting in a narrow range of applications and difficulty in expanding to various usage scenarios.

Method used

The relative Hall value is converted into an absolute Hall value. The displacement information of the magnetic strip is obtained through the absolute Hall value. The correspondence between each absolute Hall value and the displacement of the magnetic strip is established, and the displacement information of the magnetic strip is directly obtained without the need for multiple interfaces and protocols.

Benefits of technology

It enables direct acquisition of magnetic stripe displacement information in various usage scenarios, simplifies signal transmission and conversion processes, and is suitable for operations such as precise lens focusing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117268437B_ABST
    Figure CN117268437B_ABST
Patent Text Reader

Abstract

This invention discloses a displacement detection method and system, comprising the following steps: driving a magnetic strip to move, causing relative motion between the magnetic strip and a high-resolution magnetic linear encoder; during the magnetic strip's movement, acquiring the relative Hall value of the magnetic strip through the high-resolution magnetic linear encoder; acquiring an absolute Hall value range based on the relative Hall value, and establishing a correspondence between each absolute Hall value and the magnetic strip's displacement within the absolute Hall value range; acquiring the current absolute Hall value based on the absolute Hall value range; acquiring the magnetic strip's displacement corresponding to the current absolute Hall value based on the correspondence between the absolute Hall value and the magnetic strip's displacement; first converting the relative Hall value to an absolute Hall value, then directly acquiring the magnetic strip's displacement information through the absolute Hall value, and completing subsequent operations based on this displacement information. This invention eliminates the need for setting up multiple different types of interfaces and protocols to complete signal transmission and conversion, making it applicable to various different application scenarios.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of signal technology, specifically to a displacement detection method and system. Background Technology

[0002] In certain motion displacement control scenarios, such as controlling the focusing lens of a camera, or when precise motion displacement at the μm level is required, high-resolution magnetic linear encoders (also known as Hall sensors) are often needed.

[0003] In the relative motion between a high-resolution magnetic linear encoder and a magnetic strip, the encoder outputs a corresponding digital signal. This digital signal, after processing according to a specific protocol or timing sequence, yields the relative displacement between the encoder and the magnetic strip. The precise position of the controlled object can then be derived using structural parameters. For example, when focusing a camera lens, it's not only necessary to control the motor's rotation but also to convert the signal output by the high-resolution magnetic encoder into a correspondence with the distance to the magnetic strip. This allows for the acquisition of the lens's position information, and the motor is used to control the lens's forward and backward movement to control image sharpness.

[0004] The signals of a high-resolution magnetic linear encoder can be output through the SSI (Synchronous Serial Interface), PWM (Pulse Width Modulation) interface, and AB phase signal interface. Typically, an FPGA (Field-Programmable Gate Array) is used to acquire encoder data according to the SSI interface timing. This is because the FPGA can use a high-speed clock and flexible timing control to adapt to the specific timing protocol of the encoder.

[0005] However, the above solution requires the use of a dedicated FPGA to process the signals of the high-resolution magnetic linear encoder and needs to communicate according to the specified SSI interface protocol, which has a narrow scope of application. In addition, implementing the SSI interface protocol requires at least three communication signal pins: CS chip select signal, CLK clock signal and DO data output signal. The pin requirements are numerous, which is also not conducive to the expansion of application scenarios. Summary of the Invention

[0006] To address the shortcomings of existing technologies, this invention provides a displacement detection method and system. It first converts relative Hall values ​​into absolute Hall values, then directly obtains the displacement information of the magnetic strip through the absolute Hall values, and completes subsequent operations based on this displacement information. It does not require setting up multiple different types of interfaces and protocols to complete signal transmission and conversion, and can be applied to a variety of different application scenarios.

[0007] To achieve the above objectives, the present invention provides the following technical solution:

[0008] On the one hand, a displacement detection method is provided, which includes the following steps:

[0009] The magnetic stripe is driven to move, causing relative motion between the magnetic stripe and the high-resolution magnetic linear encoder. During the movement of the magnetic stripe, the relative Hall value of the magnetic stripe is obtained through the high-resolution magnetic linear encoder.

[0010] The absolute Hall value range is obtained based on the relative Hall value, and the correspondence between each absolute Hall value and the magnetic strip displacement is established within the absolute Hall value range.

[0011] Obtain the current absolute Hall value based on the absolute Hall value range;

[0012] Based on the correspondence between the absolute Hall value and the magnetic strip displacement, the magnetic strip displacement corresponding to the current absolute Hall value is obtained.

[0013] Preferably, obtaining the relative Hall value includes the following steps:

[0014] During the movement of the magnetic strip, the PWM edge trigger signal output by the high-resolution magnetic linear encoder is detected in real time. If a high-level rising edge trigger signal is detected for the first time, the current time is recorded as the start time t0. If a low-level falling edge trigger signal is detected for the first time, the current time is recorded as the end time t1.

[0015] According to the formula, the relative Hall value H i =t1-t0 to obtain the relative Hall value at the current time.

[0016] Preferably, the relative Hall value is obtained during the process of the magnetic strip moving from the first extreme position to the second extreme position.

[0017] Preferably, obtaining the absolute Hall value range based on the relative Hall value includes the following steps:

[0018] Obtain the initial value S0 according to formula (1):

[0019]

[0020] Among them, H i Let m be the i-th relative Hall value, where m and n are both positive integers and m < n;

[0021] Iterate through each relative Hall value in turn. If the i-th relative Hall value H i ≥T1, and the (i+1)th relative Hall value H i+1 If ≤T2, then add 1 to the number N of SN pairs of the magnetic strip, thereby obtaining the total number of SN pairs in the magnetic strip;

[0022] Obtain the final value S1 according to formula (2):

[0023]

[0024] Among them, H i Let p and q be the i-th relative Hall value, where p and q are both positive integers and p < q;

[0025] The absolute Hall value range T is obtained according to formula (3):

[0026] T = S0 + N * Maximum relative Hall value H max +S1;

[0027] And establish the correspondence between each absolute Hall value and the magnetic strip displacement within the absolute Hall value range.

[0028] Preferably, the value range of T1 is [maximum relative Hall value H]. max *75%, maximum relative Hall value H max *95%], the range of T2 is [maximum relative Hall value H] max *5%, maximum relative Hall value H max *10%].

[0029] Preferably, the relationship between each absolute Hall value and the magnetic strip displacement is linear.

[0030] Preferably, obtaining the current absolute Hall value based on the absolute Hall value range includes the following steps:

[0031] Obtain the difference б in the relative Hall value change;

[0032] According to formula T d =T-б Get the current absolute Hall value T d .

[0033] Preferably, the difference in relative Hall value change б is obtained in the following manner:

[0034] If the i-th relative Hall value H i >T1, and the (i+1)th relative Hall value H i+1 If <T2, then the difference in relative Hall value change б = the maximum relative Hall value H max -H i +H i+1 ;

[0035] The i-th relative Hall value H i >T2, and the (i+1)th relative Hall value H i+1 If the relative Hall value change is greater than T1, then the difference in relative Hall value change is б = -(maximum relative Hall value H). max -H i+1 +H i );

[0036] In other cases, the difference in relative Hall value change is б = H i+1 -H i .

[0037] On the other hand, a displacement detection system for implementing the above displacement detection method is also provided, comprising:

[0038] The magnetic strip is composed of multiple SN pairs connected in sequence.

[0039] A high-resolution magnetic linear encoder is used to sense changes in the magnetic field strength of the SN pole pair and output a corresponding signal.

[0040] The drive unit is used to drive the magnetic stripe to move, so that the magnetic stripe and the high-resolution magnetic linear encoder move relative to each other.

[0041] The relative Hall value acquisition unit is used to detect the PWM edge trigger signal output by the high-resolution magnetic linear encoder in real time during the displacement of the magnetic strip, and acquire the relative Hall value based on the PWM edge trigger signal.

[0042] An absolute Hall value range acquisition unit is used to acquire an absolute Hall value range based on the relative Hall value, and to establish the correspondence between each absolute Hall value and the magnetic strip displacement in the absolute Hall value range.

[0043] An absolute Hall value acquisition unit is used to acquire the current absolute Hall value based on the absolute Hall value range.

[0044] The displacement acquisition unit is used to acquire the magnetic strip displacement corresponding to the current absolute Hall value based on the above correspondence between the absolute Hall value and the magnetic strip displacement.

[0045] On the other hand, a lens focusing device is also provided, which includes the above-mentioned displacement detection system, wherein the magnetic strip is installed on the lens of the imaging device, and the displacement of the magnetic strip is linearly related to the linear motion displacement of the lens.

[0046] Compared with the prior art, the present invention has the following beneficial effects:

[0047] This invention first converts the relative Hall value into an absolute Hall value and establishes a correspondence between the displacement of the magnetic strip and the relative Hall values ​​and absolute Hall values ​​obtained in different sequences. Therefore, the displacement information of the magnetic strip can be directly obtained through the absolute Hall value, and subsequent operations can be completed based on this displacement information. For example, the distance the lens moves back and forth can be adjusted based on the displacement information of the magnetic strip to achieve precise lens focusing. It does not require setting up multiple different types of interfaces and protocols to complete signal transmission and conversion, and can be applied to a variety of different application scenarios. Attached Figure Description

[0048] Figure 1This is a diagram showing the positional relationship between the magnetic stripe and the high-resolution magnetic linear encoder in this invention.

[0049] Figure 2 This is a graph showing the relationship between the displacement of the SN pole pair and the PW signal in this invention.

[0050] Figure 3 This is a flowchart of the displacement detection method in this invention;

[0051] Figure 4 This is a flowchart of the steps for obtaining the relative Hall value in this invention;

[0052] Figure 5 This is a graph of the relative Hall values ​​obtained in this invention;

[0053] Figure 6 This is a flowchart of the steps for obtaining the absolute Hall value range in this invention;

[0054] Figure 7 This is a diagram showing the correspondence between the relative Hall value and the absolute Hall value ranges in this invention.

[0055] Figure 8 This is a flowchart of the steps for obtaining the absolute Hall value in this invention;

[0056] Figure 9 This is a schematic diagram of the displacement detection system in this invention. Detailed Implementation

[0057] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0058] Example 1:

[0059] like Figure 1 As shown, the S magnetic pole (i.e. "S") and the N magnetic pole (i.e. "N") form a pair of magnetic poles (abbreviated as SN pair). The width D of a pair of SN poles is a fixed value, such as 2mm. Multiple SN poles connected in sequence form a magnetic strip 100.

[0060] The magnetic strip 100 is mounted on the lens of the imaging device and can rotate under the drive of the motor. During the movement, the high-resolution magnetic linear encoder 200 can sense the change in the magnetic field strength of the SN pole and output the corresponding signal. For example, different duty cycle waveforms (i.e. PWM signals) can be output through the PWM pin. The duty cycle waveform is related to the position of the SN pole.

[0061] Furthermore, such as Figure 2 As shown, the high-resolution magnetic linear encoder 200 detects a set of SN pole pairs at the starting point of motion (i.e., position 0 μm) with PW. MIN (PW stands for Pulse Width) = 1 μs, PW at the end of the motion (i.e., at position 1999.5 μm). MAX =4097μs, indicating that the displacement of the SN pair is related to PW. That is, when the position of the SN pair changes from 0μm to 1999.5μm, the corresponding PW changes from 1μs to 4097μs.

[0062] Therefore, the displacement of a certain set of SN poles can be calculated based on the change of the PW signal, and the displacement of the entire magnetic strip 100 can be obtained further.

[0063] Based on this, this embodiment provides a displacement detection method, such as... Figure 3 As shown, it includes the following steps:

[0064] S1. Drive the magnetic strip 100 to move (e.g., rotate), so that the magnetic strip 100 and the high-resolution magnetic linear encoder 200 move relative to each other, and during the movement of the magnetic strip 100, the high-resolution magnetic linear encoder 200 obtains the relative Hall value of the magnetic strip 100; in this embodiment, the magnetic strip 100 can be driven to move by a drive unit such as a motor.

[0065] Specifically, such as Figure 4 As shown, step S1 includes:

[0066] Drive the magnetic strip 100 to move, so that the magnetic strip 100 moves to the first limit position (e.g., the motor rotates counterclockwise, driving the magnetic strip 100 to move to the right limit position);

[0067] The drive magnetic strip 100 moves from the first extreme position to the second extreme position (e.g., the motor rotates clockwise, driving the magnetic strip 100 to the right extreme position), and during this process, the high-resolution magnetic linear encoder 200 acquires several relative Hall values ​​H in real time according to the time sequence. i ,like Figure 5 As shown, the vertical axis represents the relative Hall value Hi, and the horizontal axis represents the order in which the relative Hall values ​​were obtained. For example, the 73rd relative Hall value is 4097.

[0068] Among them, such as Figure 5 As shown, obtaining the relative Hall value includes the following steps:

[0069] During the process of the magnetic strip 100 moving from the first extreme position to the second extreme position, the PWM edge trigger signal output by the high-resolution magnetic linear encoder 200 is detected in real time. If a high-level rising edge trigger signal is detected for the first time, the current time is recorded as the start time t0. If a low-level falling edge trigger signal is detected for the first time, the current time is recorded as the end time t1.

[0070] According to the formula, the relative Hall value H i =t1-t0 to obtain the relative Hall value at the current time;

[0071] Repeat the above process to obtain K relative Hall values, and cache the obtained L relative Hall values, where L≤K and both are positive integers.

[0072] like Figure 5 As shown, this embodiment completes the sampling of more than 960 relative Hall values. The initial detected relative Hall value is about 3100. As the magnetic strip 100 moves, the relative Hall value increases to a maximum value of 4097, and then becomes 1 in the next moment, and then gradually increases. This process is caused by the PW change of the adjacent two sets of SN poles when the magnetic strip 100 moves.

[0073] At the same time, from Figure 5 As can be seen, the relative Hall value is generated by the movement of two incomplete SN pairs (i.e., the relative Hall values ​​corresponding to the two intervals of horizontal coordinates 0-73 and 817-961) and six complete SN pairs (i.e., the six sets of relative Hall values ​​corresponding to the interval of horizontal coordinates 73-817). When the 961st relative Hall value is obtained, the displacement of the magnetic strip 100 is approximately... The width D of each SN pole pair is calculated as 2mm; where, complete SN pole pair movement means that a group of SN pole pairs passes through the detection point of the high-resolution magnetic linear encoder 200 as a whole, and incomplete SN pole pair movement means that a group of SN pole pairs only partially passes through the detection point of the high-resolution magnetic linear encoder 200.

[0074] Furthermore, such as Figure 5 As shown in the complete SN pole pair motion diagram, when a set of SN pole pairs passes through the detection of the high-resolution magnetic linear encoder 200, the displacement of the SN pole pair is linearly related to the change of the relative Hall value. That is, when the SN pole pairs pass through the detection point of the high-resolution magnetic linear encoder 200, the displacement of the SN pole pair is D, and at the same time, the relative Hall value changes from 1 to 4097.

[0075] However, since the magnetic strip 100 has multiple SN pairs, and different SN pairs will produce the same relative Hall value when the magnetic strip 100 moves (for example, the relative Hall value obtained by different SN pairs at different time points can all be 2500), the relative position change of the magnetic strip 100 cannot be determined by the relative Hall value at a certain moment. Therefore, it is necessary to correspond the relative Hall value and the order of acquisition of the relative Hall value with the displacement of the magnetic strip 100.

[0076] S2. Obtain the absolute Hall value range based on the relative Hall value, and establish the correspondence between each absolute Hall value and the magnetic strip displacement in the absolute Hall value range;

[0077] Furthermore, such as Figure 6 As shown, obtaining the absolute Hall value range based on the relative Hall value includes the following steps:

[0078] Obtain the initial value S0 according to formula (1):

[0079]

[0080] Among them, H i Let m and n be the i-th relative Hall value in the cache. Both m and n are positive integers and are less than the total number of relative Hall values ​​in the cache, L. For example, in this embodiment, m < n and the values ​​of m and n are 10 and 20, respectively.

[0081] Iterate through each relative Hall value in the cache order. If the i-th relative Hall value H i ≥T1, and the (i+1)th relative Hall value H i+1 If T2 ≤ T2, then the number of splicing points of SN pairs is increased by 1, and correspondingly, the number of SN pairs N is increased by 1, thus obtaining the total number of SN pairs in magnetic stripe 100; where, as Figure 1 As shown, the SN pair splicing point refers to the splicing point P between two adjacent SN pairs, and the value range of T1 is [maximum relative Hall value H]. max *75%, maximum relative Hall value H max *95%], the range of T2 is [maximum relative Hall value H] max *5%, maximum relative Hall value H max *10%], Maximum relative Hall value H max The maximum relative Hall value generated by the same set of SN pairs when displacement occurs; for example, in this embodiment, the maximum relative Hall value H. max The value is 4097, and the values ​​of T1 and T2 can be 3500 and 500 respectively. If the i-th relative Hall value H i ≥3500, and the (i+1)th relative Hall value H i+1 ≤500, then from Figure 6It can be directly seen that there is an SN pair splicing point between the i-th and i+1-th relative Hall values, then the number of SN pairs is increased by 1 at this time;

[0082] Obtain the final value S1 according to formula (2):

[0083]

[0084] Among them, H i Let p and q be the i-th relative Hall value in the cache, where p and q are both positive integers and both are less than the total number of relative Hall values ​​in the cache, and n < p < q.

[0085] The absolute Hall value range T is obtained according to formula (3):

[0086] T = S0 + N * Maximum relative Hall value H max +S1;

[0087] And establish the correspondence between each absolute Hall value and the displacement of the magnetic strip in the absolute Hall value range, and the correspondence is linear (monotonically increasing or decreasing). For example, in this embodiment, it can be defined that when the magnetic strip moves 1 unit to the left, the absolute Hall value decreases by 1, and when the magnetic strip moves 1 unit to the right, the absolute Hall value increases by 1.

[0088] From this, we can obtain, as follows Figure 7 The absolute Hall value range T is shown, and the absolute Hall value range T changes monotonically (e.g., monotonically increasing or decreasing), such that each relative Hall value H i Each of these values ​​uniquely corresponds to a single value on the absolute Hall value range T.

[0089] S3. Obtain the current absolute Hall value based on the absolute Hall value range T, which includes the following steps:

[0090] like Figure 8 As shown, the difference in relative Hall value change, б, is first obtained, which is obtained in the following way:

[0091] If the i-th relative Hall value H i >T1, and the (i+1)th relative Hall value H i+1 If <T2, then the difference in relative Hall value change б = the maximum relative Hall value H max -H i +H i+1 ;

[0092] The i-th relative Hall value H i >T2, and the (i+1)th relative Hall value H i+1 If the relative Hall value change is greater than T1, then the difference in relative Hall value change is б = -(maximum relative Hall value H). max -H i+1 +H i );

[0093] In other cases, the difference in relative Hall value change is б = H i+1 -H i ;

[0094] Then according to formula T d =T-б Get the current absolute Hall value T d ;

[0095] And S4, based on the above correspondence between the absolute Hall value and the magnetic strip displacement, obtain the current absolute Hall value T. d The corresponding magnetic stripe displacement.

[0096] Therefore, this embodiment converts the relative Hall value into an absolute Hall value, so that the displacement of the magnetic strip (SN pole pair), the relative Hall value of different acquisition sequences and the absolute Hall value correspond one-to-one. Thus, the displacement information of the magnetic strip can be directly obtained through the absolute Hall value, and subsequent operations can be completed based on the displacement information. For example, the displacement information of the magnetic strip may be related to the linear motion of the imaging device lens, so the distance of the lens moving back and forth can be adjusted through the displacement information of the magnetic strip to complete the precise focusing of the lens.

[0097] Example 2:

[0098] This embodiment provides a displacement detection system for implementing the displacement detection method described in Embodiment 1, such as... Figure 9 As shown, it includes:

[0099] The magnetic stripe 100 is composed of multiple SN pairs connected in sequence.

[0100] A high-resolution magnetic linear encoder 200 is used to sense changes in the magnetic field strength of the SN pole pair and output a corresponding signal.

[0101] The drive unit 300 (such as a motor) is used to drive the magnetic strip 100 to move (such as rotate), so that the magnetic strip 100 and the high-resolution magnetic linear encoder 200 move relative to each other.

[0102] The relative Hall value acquisition unit 400 is used to detect the PWM edge trigger signal output by the high-resolution magnetic linear encoder 200 in real time during the displacement of the magnetic strip 100, acquire the relative Hall value according to the PWM edge trigger signal, and cache the acquired relative Hall value. The process is the same as step S1.

[0103] The absolute Hall value range acquisition unit 500 is used to acquire the absolute Hall value range based on the relative Hall value and establish the correspondence between each absolute Hall value and the magnetic strip displacement in the absolute Hall value range. The process is the same as step S2.

[0104] The absolute Hall value acquisition unit 600 is used to acquire the current absolute Hall value according to the absolute Hall value range T, and its process is the same as step S3.

[0105] The displacement acquisition unit 700 is used to acquire the magnetic strip displacement corresponding to the current absolute Hall value based on the above correspondence between the absolute Hall value and the magnetic strip displacement.

[0106] Example 3:

[0107] This embodiment provides a lens focusing device, which includes the displacement detection system described in Embodiment 2, wherein the magnetic strip 100 is installed on the lens of the imaging device, and the displacement of the magnetic strip 100 is linearly related to the linear motion displacement of the lens.

[0108] Therefore, the displacement of the lens during linear motion can be determined by the displacement of the magnetic strip 100, and the focus can be adjusted according to the displacement of the lens.

[0109] In summary, this invention establishes a correspondence between the displacement of the magnetic strip (SN pole pair), the relative Hall value, and the absolute Hall value for different acquisition sequences by converting the relative Hall value to the absolute Hall value. Therefore, the displacement information of the magnetic strip can be directly obtained through the absolute Hall value, and subsequent operations can be completed based on this displacement information. For example, the distance the lens moves back and forth can be adjusted based on the displacement information of the magnetic strip to achieve precise lens focusing. The method is simple and easy to implement, and does not require setting up multiple different types of interfaces and protocols to complete signal transmission and conversion, thereby greatly simplifying the structural design and making it applicable to a variety of different application scenarios.

[0110] It should be noted that the technical features in embodiments 1 to 3 above can be combined arbitrarily, and the resulting technical solutions all fall within the protection scope of this application. Furthermore, in this document, terms such as "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0111] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.

Claims

1. A displacement detection method, characterized in that, Includes the following steps: The magnetic stripe is driven to move, causing relative motion between the magnetic stripe and the high-resolution magnetic linear encoder. During the movement of the magnetic stripe, the relative Hall value of the magnetic stripe is obtained through the high-resolution magnetic linear encoder. The absolute Hall value range is obtained based on the relative Hall value, and the correspondence between each absolute Hall value and the magnetic strip displacement is established within the absolute Hall value range. Obtain the current absolute Hall value based on the absolute Hall value range; Based on the correspondence between the absolute Hall value and the magnetic strip displacement, the magnetic strip displacement corresponding to the current absolute Hall value is obtained; Obtaining the absolute Hall value range based on the relative Hall value includes the following steps: Obtain the initial value S0 according to formula (1): (1) wherein H i is the ith relative Hall value, m, n are both positive integers, and m < n; Iterate through each relative Hall value in turn. If the i-th relative Hall value H i ≥T1, and the (i+1)th relative Hall value H i+1 If T1 is less than or equal to T2, then the number of SN pairs N of the magnetic strip is increased by 1 to obtain the total number of SN pairs in the magnetic strip. Here, T1 is the upper limit of the relative Hall value and T2 is the lower limit of the relative Hall value. Obtain the final value S1 according to formula (2): (2); Among them, H i Let p and q be the i-th relative Hall value, where p and q are both positive integers and p < q; The absolute Hall value range T is obtained according to formula (3): T=S0+N Maximum relative Hall value H max +S1; And establish the correspondence between each absolute Hall value and the magnetic strip displacement within the absolute Hall value range.

2. The displacement detection method as described in claim 1, characterized in that, The acquisition of the relative Hall value includes the following steps: During the movement of the magnetic strip, the PWM edge trigger signal output by the high-resolution magnetic linear encoder is detected in real time. If a high-level rising edge trigger signal is detected for the first time, the current time is recorded as the start time t0. If a low-level falling edge trigger signal is detected for the first time, the current time is recorded as the end time t1. According to the formula, the relative Hall value H i =t1-t0 obtains the relative Hall value at the current time.

3. The displacement detection method as described in claim 2, characterized in that, The relative Hall value is obtained during the process of the magnetic strip moving from the first extreme position to the second extreme position.

4. The displacement detection method as described in claim 1, characterized in that, The range of T1 is [maximum relative Hall value H]. max 75%, maximum relative Hall value H max 95%], the range of T2 is [maximum relative Hall value H] max 5%, maximum relative Hall value H max 10% 5. The displacement detection method as described in claim 1, characterized in that, The relationship between each absolute Hall value and the magnetic strip displacement is linear.

6. The displacement detection method as described in claim 1, characterized in that, Obtaining the current absolute Hall value based on the absolute Hall value range includes the following steps: Obtain the difference б in the relative Hall value change; According to formula T d =T-б Obtain the current absolute Hall value T d .

7. The displacement detection method as described in claim 6, characterized in that, The difference in relative Hall value change б is obtained as follows: If the i-th relative Hall value H i >T1, and the (i+1)th relative Hall value H i+1 If <T2, then the difference in relative Hall value change б = the maximum relative Hall value H max -H i +H i+1 ; The i-th relative Hall value H i >T2, and the (i+1)th relative Hall value H i+1 If the relative Hall value change is greater than T1, then the difference in relative Hall value change is б = - (maximum relative Hall value H). max -H i+1 +H i ); In other cases, the difference in relative Hall value change is б=H i+1 -H i .

8. A displacement detection system for implementing the displacement detection method according to any one of claims 1-7, characterized in that, include: The magnetic strip is composed of multiple SN pairs connected in sequence. A high-resolution magnetic linear encoder is used to sense changes in the magnetic field strength of the SN pole pair and output a corresponding signal. The drive unit is used to drive the magnetic stripe to move, so that the magnetic stripe and the high-resolution magnetic linear encoder move relative to each other. The relative Hall value acquisition unit is used to detect the PWM edge trigger signal output by the high-resolution magnetic linear encoder in real time during the displacement of the magnetic strip, and acquire the relative Hall value based on the PWM edge trigger signal. An absolute Hall value range acquisition unit is used to acquire an absolute Hall value range based on the relative Hall value, and to establish the correspondence between each absolute Hall value and the magnetic strip displacement in the absolute Hall value range. An absolute Hall value acquisition unit is used to acquire the current absolute Hall value based on the absolute Hall value range. The displacement acquisition unit is used to acquire the magnetic strip displacement corresponding to the current absolute Hall value based on the above correspondence between the absolute Hall value and the magnetic strip displacement.

9. A lens focusing device, characterized in that, The system includes the displacement detection system of claim 8, wherein the magnetic strip is mounted on the lens of the imaging device, and the displacement of the magnetic strip is linearly related to the linear displacement of the lens.

Citation Information

Patent Citations

  • Rotation angle detection device and detection method

    JP2003315093A

  • Device for positional and / or length determination

    US20060071818A1