Encoder for linear motor, linear motor and position detection method of linear motor
By setting up two encoder reader heads and signal conversion modules on the linear motor, the motor outage caused by the breakpoint of the position sensor is solved, and position detection and smooth control are realized in the case of breakpoint.
Patent Information
- Application Number
- CN202510496051.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-21
- Publication Date
- 2025-07-25
AI Technical Summary
Existing encoders cannot work properly when there is a breakpoint in the position sensor, resulting in the motor being out of control or alarm, and cannot be used in application scenarios where coded media is interrupted.
The design of two encoder read heads and signal conversion modules is adopted to read the position signal of the position sensor and perform fusion processing to realize normal position detection of breakpoints.
In the case where the position sensor has a breakpoint, position detection can be performed normally to achieve smooth control of the linear motor.
Smart Images

Figure CN120377589A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to an encoder, and in particular to an encoder for a linear motor, a linear motor using the encoder, and a position detection method thereof. Background Art
[0002] Currently, the encoders applied to linear motors mainly include two types: optical linear encoders and magnetic induction linear encoders. The optical linear encoder needs to install a linear grating on the motor body, and then the read head of the encoder reads the optical signal and converts it into position information for output; the magnetic encoder needs to install a linear magnetic grating on the motor body, and then the read head of the encoder reads the magnetic signal and converts it into position information for output.
[0003] In actual use, no matter what type of encoder, a position sensor (magnetic grating, grating) usually needs to be configured on the motor body for position feedback, so as to achieve high-precision position closed-loop control. Usually, the magnetic grating or grating needs to be continuous without breakpoints or defects to achieve control, otherwise problems such as motor runaway or alarm will occur.
[0004] Taking the magnetic grating as an example, if some positions on the magnetic grating are magnetized, or in some application scenarios, the magnetic grating needs to be disconnected into two sections, the traditional magnetic grating position read head cannot be used at this time. The grating or inductive sensor, etc. are similar to the magnetic grating, and all require the position coding medium to be continuous and undamaged. Once damage is encountered, a new one must be replaced, so the existing encoders cannot be used in some application scenarios where the coding medium needs to be interrupted. Summary of the Invention
[0005] The first technical problem to be solved by the present invention is directed to the above-mentioned prior art, and provides an encoder for a linear motor that can detect the position in the case where there is a breakpoint in the position sensor.
[0006] The second technical problem to be solved by the present invention is directed to the above-mentioned prior art, and provides a linear motor applied with the above encoder.
[0007] The third technical problem to be solved by the present invention is directed to the above-mentioned prior art, and provides a position detection method for the linear motor as above, which can detect the position in the case where there is a breakpoint in the position sensor.
[0008] The technical solution adopted by the present invention to solve the above first technical problem is: an encoder for a linear motor, which is used to detect the position in the case where there is a breakpoint in the position sensor installed along the length extension direction of the linear motor. Its characteristics are: the encoder includes
[0009] Two encoder heads, including a first encoder head and a second encoder head spaced along the length extension direction of the linear motor, both the first encoder head and the second encoder head are used to read the position signals of the position sensor on the linear motor;
[0010] A signal conversion module, the signal output ends of the first encoder head and the second encoder head are both connected to the input end of the signal conversion module, the signal conversion module acquires the position signals read by the first encoder head and the second encoder head, and fuses the two position signals read by the first encoder head and the second encoder head to obtain the fused position.
[0011] Preferably, it further includes a slider for installing the first encoder head and the second encoder head, and the slider can slide along the length extension direction of the linear motor.
[0012] Preferably, the first encoder head and the second encoder head are symmetrically arranged with respect to the center line of the slider.
[0013] The technical solution adopted by the present invention to solve the above second technical problem is: a linear motor, including a motor body and a position sensor installed along the length extension direction of the motor body, characterized in that: it further includes an encoder as described above.
[0014] Preferably, the position sensor is a magnetic grating or a grating.
[0015] In order to realize the automatic control of the linear motor, it further includes a driver connected to the motor body, and the driver is also connected to the signal conversion module.
[0016] The technical solution adopted by the present invention to solve the above third technical problem is: a position detection method of a linear motor as described above, characterized by including the following steps:
[0017] Step 1: Divide the entire area of the position sensor into 2N + 1 areas in advance, and sequentially record the entire area of the position sensor along the length extension direction as area 0, area 1,... area 2N; N is the number of breakpoints of the position sensor;
[0018] The specific process of area division is: when the center line between the first encoder head and the second encoder head is successively at each breakpoint position, obtain the position values read by the first encoder head and the second encoder head, that is, obtain PA1, PB1,... PA j , PB j ,... PA N , PB N ; where, PA j is the position value read by the first encoder head when the center line between the first encoder head and the second encoder head is at the j-th breakpoint position, PBj is the position value read by the second encoder head when the center line between the first encoder head and the second encoder head is at the j-th break point position; j ∈ [1, … N];
[0019] According to the position values PA1, PB1, … PA read by the first encoder head and the second encoder head j , PB j , … PA N , PB N , the entire area of the position sensor is divided into 2N + 1 areas;
[0020] Step 2: Determine in real time the area A0 where the center line between the first encoder head and the second encoder head is located, and obtain in real time the position values read by the first encoder head and the second encoder head. Determine the area A1 where the first encoder head is located according to the position value S1 read by the first encoder head and determine the area A2 where the second encoder head is located according to the position value S2 read by the second encoder head;
[0021] Step 3: When both area A1 and area A2 are in legal areas, switch in real time the area A0 where the center line between the first encoder head and the second encoder head is located in the following manner, and fuse the two position signals read by the first encoder head and the second encoder head to obtain the fused position value S;
[0022] Specifically, it is divided into the following two cases:
[0023] Case 1: If the current area A0 is in area 0, then S = S1; once S1 > PA1, then switch the current area A0 to area 1;
[0024] Case 2: If the current area A0 is in area 1 to area 2N, then make the following judgment:
[0025] 2.1 When A0 is in an even area, then switch in the following manner:
[0026] If S1 > PA x1 , INT(.) represents the integer function, then add 1 to the A0 value, that is: switch the current area A0 to area A0 + 1;
[0027] If S1 < PB x2 , then subtract 1 from the A0 value, that is: switch the current area A0 to area A0 - 1;
[0028] The calculation formula for the fused position value S is:
[0029] Among them, L is the distance between the second encoder head and the first encoder head, D x is the distance value of the x-th break point, D x = PB x - PA x ;
[0030] 2.2. When A0 is in the odd region, the switching is performed in the following manner:
[0031] If S2 > PB x3 , then add 1 to the value of A0, that is: switch the current region A0 to region A0 + 1;
[0032] If S2 < PA x4 , then subtract 1 from the value of A0, that is: switch the current region A0 to region A0 - 1;
[0033] The calculation formula for the fused position value S is:
[0034] Preferably, the specific process of determining whether both region A1 and region A2 are in the legal region in step 3 is as follows:
[0035] If the region difference between region A2 and region A1 is greater than 2, or region A2 is smaller than the region value of region A1, or the region value of region A1 is not within the range of 0 to 2N, or the region value of region A2 is not within the range of 0 to 2N, it means that at least one of region A1 and region A2 is in the illegal region; otherwise, it means that both region A1 and region A2 are in the legal region.
[0036] Furthermore, the following judgment is also included in step 3:
[0037] If the region value of region A1 is within the range of 0 to 2N, then judge that region A1 is a legal region; otherwise, judge that region A1 is an illegal region;
[0038] If the region value of region A2 is within the range of 0 to 2N, then judge that region A2 is a legal region; otherwise, judge that region A2 is an illegal region;
[0039] If region A1 is an illegal region, region A2 is a legal region, and region A2 is in the region where the break point is located, then determine the region A0 where the center line between the current first encoder head and the second encoder head is located according to region A2;
[0040] If region A1 is a legal region, region A2 is an illegal region, and region A1 is in the region where the break point is located, then determine the region A0 where the center line between the current first encoder head and the second encoder head is located according to region A1;
[0041] If both Region A1 and Region A2 are illegal regions, an alarm is given.
[0042] Compared with the prior art, the advantages of the present invention are as follows: by providing a first encoder head and a second encoder head arranged at intervals, position signals at two different positions on the position sensor are obtained, and through a signal conversion module, the two position signals read by the first encoder head and the second encoder head are fused to obtain a fused position, so that the encoder can fuse incorrect position signals into normal position data when there is a break point in the position sensor. Therefore, the encoder can normally perform position detection when there is a break point in the position sensor, thereby realizing smooth control of the linear motor to leap over break points and defect points. Description of the Drawings
[0043] Figure 1 It is a schematic diagram of the encoder in an embodiment of the present invention;
[0044] Figure 2 It is a schematic diagram of the entire area division of the position sensor in an embodiment of the present invention. Detailed Embodiments
[0045] The present invention will be further described in detail below in conjunction with the embodiments of the drawings.
[0046] As Figure 1 shown, the encoder for the linear motor in this embodiment is used to realize position detection when there is a break point in the position sensor installed along the length extension direction of the linear motor.
[0047] The encoder includes two encoder heads and a signal conversion module. The two encoder heads include a first encoder head 1a and a second encoder head 1b arranged at intervals along the length extension direction of the linear motor. Both the first encoder head 1a and the second encoder head 1b are used to read the position signals of the position sensor on the linear motor; the signal output ends of the first encoder head 1a and the second encoder head 1b are both connected to the input end of the signal conversion module. The signal conversion module obtains the position signals read by the first encoder head 1a and the second encoder head 1b, and fuses the two position signals read by the first encoder head 1a and the second encoder head 1b to obtain a fused position. The first encoder head 1a and the second encoder head 1b in this embodiment are both absolute value encoders.
[0048] The encoder further includes a slider 30 for installing the first encoder head 1a and the second encoder head 1b. The slider 30 can slide along the length extension direction of the linear motor. The first encoder head 1a and the second encoder head 1b are symmetrically arranged with respect to the center line of the slider 30.
[0049] The above linear motor can be composed of multiple adjacent motor bodies. For example, Figure 1 As shown, the linear motor in this embodiment is composed of a first motor body and a second motor body. A first magnetic grating 10 (which can also be a grating) is pasted on the first motor body, and a second magnetic grating 20 (which can also be a grating) is pasted on the second motor body. There is a break point 100 between the first magnetic grating 10 and the second magnetic grating 20. Of course, the break point can also exist on the first magnetic grating 10 or the second magnetic grating 20. In addition, the linear motor can also be composed of only one motor body, and then the break point exists on the position sensor (magnetic grating or grating) installed on one motor body.
[0050] This embodiment also relates to a linear motor, which includes a motor body, a position sensor installed along the length extension direction of the motor body, and the above encoder. The position sensor in this embodiment is a magnetic grating or a grating.
[0051] The linear motor further includes a driver connected to the motor body, and the driver is also connected to the signal conversion module. In this embodiment, the position signal fusion function in the signal conversion module can also be set on the driver.
[0052] This embodiment also relates to a position detection method for a linear motor, including the following steps:
[0053] Step 1: Divide the entire area of the position sensor into 2N + 1 areas in advance, and sequentially record the entire area of the position sensor in the length extension direction as area 0, area 1,... area 2N; N is the number of break points of the position sensor;
[0054] The specific process of area division is as follows: When the center line between the first encoder head and the second encoder head is successively at each break point position, obtain the position values read by the first encoder head and the second encoder head, that is, obtain PA1, PB1,... PA j , PB j ,... PA N , PB N ; where, PA j is the position value read by the first encoder head when the center line between the first encoder head and the second encoder head is at the jth break point position, and PB j is the position value read by the second encoder head when the center line between the first encoder head and the second encoder head is at the jth break point position; j ∈ [1,... N];
[0055] According to the position values PA1, PB1,... PA j , PB j ,... PA N , PB N, divide the entire area of the position sensor into 2N + 1 areas;
[0056] As Figure 2 shown, in this embodiment, N = 3, that is, the entire area of the position sensor is sequentially denoted as area 0, area 1,... area 6 along the length extension direction;
[0057] Step 2: Determine the area A0 where the center line between the first encoder head and the second encoder head is located in real time, and obtain the position values read by the first encoder head and the second encoder head in real time. Determine the area A1 where the first encoder head is located according to the position value S1 read by the first encoder head and determine the area A2 where the second encoder head is located according to the position value S2 read by the second encoder head;
[0058] Step 3: When both area A1 and area A2 are in the legal area, switch the area A0 where the center line between the first encoder head and the second encoder head is located in real time in the following manner, and fuse the two position signals read by the first encoder head and the second encoder head to obtain the fused position value S;
[0059] Specifically, it is divided into the following two cases:
[0060] Case 1: If the current area A0 is located in area 0, then S = S1; once S1 > PA1, then switch the current area A0 to area 1;
[0061] Case 2: If the current area A0 is located in area 1 to area 2N, then make the following judgment:
[0062] 2.1 When A0 is located in an even area, then switch in the following manner:
[0063] If S1 > PA x1 , INT(.) represents the integer function, then add 1 to the value of A0, that is: switch the current area A0 to area A0 + 1;
[0064] If S1 < PB x2 , then subtract 1 from the value of A0, that is: switch the current area A0 to area A0 - 1;
[0065] The calculation formula for the fused position value S is:
[0066] where L is the distance between the second encoder head and the first encoder head, D x is the distance value of the xth break point, D x = PB x - PA x ;
[0067] 2.2. When A0 is in the odd region, the switching is performed in the following manner:
[0068] If S2 > PB x3 , then add 1 to the value of A0, that is: switch the current region A0 to region A0 + 1;
[0069] If S2 < PA x4 , then subtract 1 from the value of A0, that is: switch the current region A0 to region A0 - 1;
[0070] The calculation formula for the merged position value S is:
[0071] The specific process of determining whether both region A1 and region A2 are in the legal region in step 3 is as follows:
[0072] If the region difference between region A2 and region A1 is greater than 2, or, the region value of region A2 is smaller than that of region A1, or, the region value of region A1 is not within the range of 0 to 2N, or, the region value of region A2 is not within the range of 0 to 2N, then it means that at least one of region A1 and region A2 is in the illegal region; otherwise, it means that both region A1 and region A2 are in the legal region.
[0073] As long as any one of the following situations occurs: the region difference between region A2 and region A1 is greater than 2, the region value of region A2 is smaller than that of region A1, the region value of region A1 is not within the range of 0 to 2N, and the region value of region A2 is not within the range of 0 to 2N, then it means that at this time the encoder head is just at the break point, and the position it feeds back is abnormal data.
[0074] Step 3 also includes the following judgment:
[0075] If the region value of region A1 is within the range of 0 to 2N, then judge that region A1 is a legal region; otherwise, judge that region A1 is an illegal region;
[0076] If the region value of region A2 is within the range of 0 to 2N, then judge that region A2 is a legal region; otherwise, judge that region A2 is an illegal region;
[0077] If region A1 is an illegal region, region A2 is a legal region, and region A2 is in the region where the break point is located, then determine the region A0 where the center line between the current first encoder head and the second encoder head is located according to region A2;
[0078] If area A1 is a legal area, area A2 is an illegal area, and area A1 is located in the area where the break point is located, then the area A0 where the center line between the current first encoder head and the second encoder head is located is determined according to area A1;
[0079] If both area A1 and area A2 are illegal areas, an alarm is given.
[0080] In this embodiment, the signal conversion module can transmit the position value S obtained by fusing the above position detection method to the driver, so that the driver can control the linear motor according to the position value S. The position detection method of this linear motor can be applied to the position detection in the case where there is a break point in the position sensor on a single linear motor, and can also realize the position detection in scenarios such as a production line or a connecting line formed by reconstructing multiple linear motors.
[0081] The above are only the preferred embodiments of the present invention. It should be noted that for those of ordinary skill in the art, without departing from the technical principle of the present invention, several improvements and refinements can be made, and these improvements and refinements should also be regarded as the protection scope of the present invention.
Claims
1. An encoder for a linear motor, which is used to realize position detection in the case of a break in a position sensor installed along the length extension direction of the linear motor, and is characterized in that: The encoder includes two encoder heads, including a first encoder head and a second encoder head that are spaced apart along the length extension direction of the linear motor. Both the first encoder head and the second encoder head are used to read the position signals of the position sensors on the linear motor; a signal conversion module. The signal output ends of the first encoder head and the second encoder head are both connected to the input end of the signal conversion module. The signal conversion module acquires the position signals read by the first encoder head and the second encoder head, and fuses the two position signals read by the first encoder head and the second encoder head to obtain the fused position.
2. The encoder according to claim 1, characterized in that: It further includes a slider for installing the first encoder head and the second encoder head, and the slider can slide along the length extension direction of the linear motor.
3. The encoder according to claim 2, wherein: The first encoder head and the second encoder head are symmetrically arranged with respect to the center line of the slider.
4. A linear motor, comprising a motor body and a position sensor installed along the length extension direction of the motor body, characterized in that: It further includes the encoder according to any one of the above claims 1 to 3.
5. The linear motor according to claim 4, wherein: The position sensor is a magnetic grating or an optical grating.
6. The linear motor according to claim 4, characterized in that: It further includes a driver connected to the motor body, and the driver is also connected to the signal conversion module.
7. A position detection method for a linear motor according to any one of claims 4 to 6, characterized in that It includes the following steps: Step 1: Divide the entire area of the position sensor into 2N + 1 areas in advance, and sequentially record the entire area of the position sensor as area 0, area 1,... area 2N along the length extension direction; N is the number of breakpoints of the position sensor; The specific process of area division is as follows: when the center line between the first encoder head and the second encoder head is successively at each break point position, the position values read by the first encoder head and the second encoder head are obtained, namely PA1, PB1, … PA j , PB j , … PA N , PB N ; Among them, PA j is the position value read by the first encoder head when the center line between the first encoder head and the second encoder head is at the j-th break point position, and PB j is the position value read by the second encoder head when the center line between the first encoder head and the second encoder head is at the j-th break point position; j ∈ [1, … N]; Based on the position values PA1, PB1, … PA read by the first encoder head and the second encoder head j , PB j , … PA N , PB N , the entire area of the position sensor is divided into 2N + 1 regions; Step 2: Determine the area A0 where the center line between the first encoder head and the second encoder head is located in real time, and acquire the position values read by the first encoder head and the second encoder head in real time. Determine the area A1 where the first encoder head is located according to the position value S1 read by the first encoder head and determine the area A2 where the second encoder head is located according to the position value S2 read by the second encoder head; Step 3: When both area A1 and area A2 are in legal areas, switch the area A0 where the center line between the first encoder head and the second encoder head is located in real time in the following manner, and fuse the two position signals read by the first encoder head and the second encoder head to obtain the fused position value S; Specifically, it is divided into the following two situations: Situation 1: If the current area A0 is located in area 0, then S = S1; once S1 > PA1, then switch the current area A0 to area 1; Situation 2: If the current area A0 is located in areas 1 to 2N, then make the following judgments: 2.1 When A0 is located in an even area, then switch in the following manner: If S1 > PA x1 , If INT(.) represents the integer function, then add 1 to the value of A0, that is: switch the current area A0 to area A0 + 1; If S1 < PB x2 , then subtract 1 from the value of A0, that is: switch the current area A0 to area A0 - 1; The calculation formula for the fused position value S is as follows: Among them, L is the distance between the second encoder head and the first encoder head, D x is the spacing value of the x-th break point, D x = PB x - PA x ; 2.2 When A0 is located in an odd area, then switch in the following manner: If S2 > PB x3 , then add 1 to the value of A0, that is: switch the current area A0 to area A0 + 1; If S2 < PA x4 , then subtract 1 from the value of A0, i.e., switch the current area A0 to area A0 - 1; The calculation formula for the fused position value S is as follows:
8. The position detection method according to claim 7, characterized in that: The specific process of judging whether both area A1 and area A2 are in legal areas in step 3 is: If the area difference between area A2 and area A1 is greater than 2, or area A2 is smaller than the area value of area A1, or the area value of area A1 is not within the range of 0 to 2N, or the area value of area A2 is not within the range of 0 to 2N, it means that at least one of area A1 and area A2 is in an illegal area; otherwise, it means that both area A1 and area A2 are in legal areas.
9. The position detection method according to claim 8, wherein: The following judgment is also included in step 3: If the area value of area A1 is within the range of 0 to 2N, then it is determined that area A1 is a legal area; otherwise, it is determined that area A1 is an illegal area; If the area value of area A2 is within the range of 0 to 2N, then it is determined that area A2 is a legal area; otherwise, it is determined that area A2 is an illegal area; If area A1 is an illegal area, area A2 is a legal area, and area A2 is located in the area where the breakpoint is located, then the area A0 where the center line between the current first encoder head and the second encoder head is located is determined according to area A2; If area A1 is a legal area, area A2 is an illegal area, and area A1 is located in the area where the breakpoint is located, then the area A0 where the center line between the current first encoder head and the second encoder head is located is determined according to area A1; If both area A1 and area A2 are illegal areas, then an alarm is given.