Motor movement control method, device and electronic device

CN121193177BActive Publication Date: 2026-09-15SHANGHAI AWINIC TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511319021.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-15
Publication Date
2026-09-15
Estimated Expiration
2045-09-15

AI Technical Summary

Technical Problem

然而,在实际应用场景中,由于传动结构存在结构间隙的原因,使得马达带动镜头运动的目标位置与微控制系统通过马达上的位置传感器所读出的检测位置无法做到完全对应,导致镜头的实际位置与期望位置存在偏置,影响了相机的成像效果

Benefits of technology

[0009] The travel compensation schemes provided in the embodiments of this disclosure improve the consistency problem of forward and return control caused by mechanical backlash by determining the direction of motor movement corresponding to the target position and collecting the detected position of the motor after moving to the target position.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121193177B_ABST
    Figure CN121193177B_ABST
Patent Text Reader

Abstract

The present disclosure provides a motor movement control method and device, and an electronic device. The method comprises: driving a motor to move from a current position to a target position, obtaining a detection position of the motor in a given detection stroke and a movement direction of the motor relative to the given detection stroke; based on the detection position and the movement direction of the motor, obtaining a compensation position of the motor in the given detection stroke, and driving the motor to move according to the compensation position, so that a target object moves to an ideal position in a given transmission stroke. In this way, the present disclosure compensates the movement position of the motor by judging the movement direction of the motor and identifying the detection position of the motor, thereby improving the motor back-and-forth stroke control consistency problem caused by mechanical clearance and improving the movement accuracy of the motor.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of motor control technology, and in particular to a motor movement control method, apparatus, electronic device, and storage medium. Background Technology

[0002] Autofocus (AF) is the most commonly used focusing method in mobile phone cameras. It can automatically adjust the lens focal length to make the subject appear clearly on the camera sensor.

[0003] Most current autofocus systems utilize voice coil motors (VCMs). The accuracy of motor movement is a key factor in evaluating autofocus performance. However, in practical applications, due to structural gaps in the transmission mechanism, the target position moved by the motor and the detected position read by the position sensor on the motor by the microcontroller system cannot perfectly correspond. This results in a misalignment between the actual and desired position of the lens, affecting the camera's imaging performance. Summary of the Invention

[0004] In view of this, the present disclosure provides a motor movement control scheme that can improve the consistency problem of motor forward and return control caused by structural clearance, thereby improving the movement accuracy of the motor.

[0005] According to a first aspect of this disclosure, a motor movement control method is provided, comprising: acquiring a target position of the motor in a given detection stroke; driving the motor to move from a current position to the target position to obtain a detection position of the motor in the given detection stroke and a movement direction of the motor relative to the given detection stroke; obtaining a compensation position of the motor in the given detection stroke based on the detection position and movement direction of the motor, and driving the motor to move according to the compensation position, so that a target object moves to an ideal position in the given transmission stroke.

[0006] According to a second aspect of this disclosure, a motor movement control device is provided, comprising: a position acquisition module for acquiring a target position of the motor in a given detection stroke; a motor drive module for driving the motor to move from a current position to the target position; a position detection module for detecting the actual movement position of the motor in the given detection stroke to obtain a detection position of the motor in the given detection stroke; a direction determination module for determining the movement direction of the motor relative to the given detection stroke based on the current position and the target position of the motor; and a position compensation module for obtaining a compensation position of the motor in the given detection stroke based on the detection position and the movement direction of the motor. The motor drive module is further configured to drive the motor to perform compensation movement according to the compensation position, so that the target object moves to an ideal position in the given transmission stroke.

[0007] According to a third aspect of this disclosure, an electronic device is provided, comprising: a processor, a communication interface, a memory, and a bus, wherein the processor, the communication interface, and the memory communicate with each other via the bus; the memory is used to store at least one executable instruction, the executable instruction causing the processor to perform an operation corresponding to the method described in the first aspect.

[0008] According to a fourth aspect of this disclosure, a computer-readable storage medium is provided that stores computer instructions that, when executed by a processor, cause the processor to perform the method as described in the first aspect.

[0009] The travel compensation schemes provided in the embodiments of this disclosure improve the consistency problem of forward and return control caused by mechanical backlash by determining the direction of motor movement corresponding to the target position and collecting the detected position of the motor after moving to the target position.

[0010] The motor movement control schemes provided in the embodiments of this disclosure utilize the movement stroke compensation schemes provided in the above embodiments to compensate for the movement stroke of the motor, thereby solving the problem of inconsistent forward and return stroke control of the motor throughout the entire stroke stage caused by mechanical backlash, and improving the movement accuracy of the motor. Attached Figure Description

[0011] To more clearly illustrate the technical solutions in the embodiments of this disclosure or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the embodiments of this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings.

[0012] Figures 1A to 1CThis is a schematic diagram of the structure of a motor movement control method or a transmission structure suitable for performing the various embodiments of this disclosure.

[0013] Figure 2 This is a flowchart illustrating a motor movement control method as an exemplary embodiment of the present disclosure.

[0014] Figure 3 This is a flowchart illustrating a motor movement control method according to another exemplary embodiment of the present disclosure.

[0015] Figure 4 This is a flowchart illustrating a motor movement control method according to another exemplary embodiment of the present disclosure.

[0016] Figure 5 This is a diagram showing the data fitting effect of each compensation interval in the motor movement control method of an exemplary embodiment of this disclosure.

[0017] Figure 6 This is a frame diagram of a motor movement control device that is an exemplary embodiment of the present disclosure.

[0018] Figure 7 A frame diagram of an electronic device that is an exemplary embodiment of this disclosure. Detailed Implementation

[0019] To enable those skilled in the art to better understand the technical solutions in the embodiments of the present invention, the technical solutions in the embodiments of the present invention will be clearly and thoroughly 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 should fall within the protection scope of the present invention.

[0020] Reference is made to the accompanying drawings, which form part of the detailed description and illustrate exemplary embodiments. Furthermore, it should be understood that other embodiments may be utilized, and structural and / or logical changes may be made without departing from the scope of the claimed subject matter. It should also be noted that orientations and references (e.g., up, down, top, bottom, etc.) may be used merely to facilitate the description of features in the drawings. Therefore, the following detailed description is not to be construed in a limiting sense, and the scope of the claimed subject matter is defined only by the appended claims and their equivalents.

[0021] Numerous details are set forth in the following description. However, it will be apparent to those skilled in the art that the embodiments described herein can be practiced without these specific details. In some instances, well-known methods and apparatus are shown in block diagram form rather than in detail to avoid obscuring the embodiments described herein. Throughout this specification, references to “embodiment,” “one embodiment,” or “some embodiments” mean that a particular feature, structure, function, or characteristic described in connection with that embodiment is included in at least one embodiment herein. Therefore, the phrases “in an embodiment,” “in one embodiment,” or “some embodiments” appearing throughout this specification do not necessarily refer to the same embodiment. Furthermore, in one or more embodiments, particular features, structures, functions, or characteristics can be combined in any suitable manner. For example, a first embodiment can be combined with a second embodiment in any way that does not mutually exclude particular features, structures, functions, or characteristics associated with two embodiments.

[0022] As used in the description and appended claims, the singular forms “a” and “the” are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will also be understood that the term “and / or” as used herein refers to and includes any and all possible combinations of one or more of the associated listed items.

[0023] The terms “coupling” and “connection”, along with their derivatives, are used herein to describe functional or structural relationships between components. It should be understood that these terms are not intended to be synonyms for each other. Rather, in certain embodiments, “connection” can be used to indicate that two or more elements are in direct physical, optical, or electrical contact with each other. “Coupling” can be used to indicate that two or more elements are in direct or indirect physical or electrical contact with each other (with other intermediary elements between them), and / or that two or more elements cooperate or interact with each other (e.g., as in a causal relationship).

[0024] As used herein, the terms “above,” “below,” “between,” and “on” refer to the relative position of a component or material with respect to other components or materials, where such physical relationships are noteworthy. For example, in the context of materials, a material positioned above or below another material may be in direct contact with it, or may have one or more intermediate materials. Furthermore, a material positioned between two materials may be in direct contact with both layers, or may have one or more intermediate layers. In contrast, a first material or material “on” a second material or material is in direct contact with that second material / material. Similar distinctions are made in the context of component assembly.

[0025] As described throughout this document and in the claims, a list of items connected by the terms “at least one of” or “one or more of” may mean any combination of the listed items. For example, the phrase “at least one of A, B, or C” may mean A; B; C; A and B; A and C; B and C; or A, B, and C.

[0026] The terms “circuit” or “module” can refer to one or more passive and / or active components arranged to cooperate with each other to provide a desired function. The term “signal” can refer to at least one current signal, voltage signal, or magnetic signal. The terms “substantially,” “close to,” “approximately,” “near,” and “about” generally refer to within ±10% of the target value.

[0027] Autofocus (AF) is currently the most commonly used focusing method in mobile phone cameras. Among them, the movement accuracy of the autofocus motor is one of the key factors in evaluating autofocus performance.

[0028] In existing technologies, voice coil motors are typically used to achieve autofocus in mobile phone camera lenses. (Reference) Figure 1A and Figure 1B It shows a schematic diagram of a transmission structure 100 that enables automatic focusing of the lens via a voice coil motor.

[0029] As shown in the figure, the transmission structure 100 is, for example, a strip-shaped transmission shaft, on which a motor (e.g., a voice coil motor) and a target object (e.g., a camera lens) are mounted. The motor can move along a first direction F1 (refer to...) within a given detection stroke H. Figure 1A ) or along the second direction of movement F2 (reference) Figure 1B The transmission structure 100 reciprocates around the pivot point P0 along the first rotation direction R1 (reference). Figure 1A ) or the second rotation direction R2 (reference) Figure 1B The motor rotates back and forth, and drives the target object (lens) to move back and forth within a given transmission stroke L (wherein, the direction of movement of the target object within the given transmission stroke is the same as the direction of movement of the motor).

[0030] In practical applications, Hall effect sensors can be used to detect the position of the motor in a given detection stroke H (or detection position) by sensing changes in the magnetic field in the horizontal direction, and then determine the physical position of the lens (target object) in a given transmission stroke L.

[0031] However, due to the structural gap between the motor and the transmission structure 100, the transmission position of the lens in a given transmission stroke L and the detection position of the motor in a given detection stroke H cannot be completely correlated. Furthermore, when the motor moves relative to the given detection stroke H in different directions (which can also be understood as the motor moving forward or backward relative to the given detection stroke H), the transmission position of the target object in the given transmission stroke L is not the same when the motor is at the same detection position in the given detection stroke H. This forward and backward position deviation formed during the forward and backward movement is called forward and backward control accuracy in the industry, and it is also one of the important indicators for evaluating autofocus performance.

[0032] Specifically, refer to Figure 1A and Figure 1C When the motor moves along the first moving direction F1 relative to the given detection stroke H to drive the transmission structure 100 to rotate along the first rotation direction R1, due to the rotational loss caused by the structural gap between the motor (mover) and the given detection stroke (guide rail), the lens (target object) only begins to move after the motor has moved a certain distance. Therefore, when the motor moves to position P12, the laser radar detects that the lens (target object) is at position P22 (measured position), while the ideal position of the lens (target object) calculated by the system should be at position P21; similarly, refer to Figure 1B and Figure 1C When the motor drives the transmission structure 100 to rotate in the second rotation direction R2 relative to the given detection stroke H along the second moving direction F2, when the motor moves to position P12, the laser radar detects that the lens (target object) is located at position P23 (actual position), while the ideal position of the lens (target object) calculated by the system should be at position P21.

[0033] Therefore, reference Figure 1C When the motor moves relative to the given detection stroke H in different directions (F1 or F2), the actual measured position of the lens corresponding to the same detection position (reference position P12) is not the same (reference positions P22, P23). This will cause a significant difference in the actual physical position of the lens in the outward and return strokes when the same target position is sent to the control system. Moreover, as the transmission magnification of the transmission structure increases, this difference will also increase exponentially, which will seriously affect the focusing and imaging effect of the lens.

[0034] In existing technologies, closed-loop control systems are mainly used to control the motor to oscillate repeatedly at the target position, thereby reducing positional offsets in the transmission structure. Another approach is to improve control accuracy to indirectly reduce the impact of back-end control consistency. However, none of these solutions can effectively solve the problem of back-end control consistency.

[0035] Based on this, the embodiments of this disclosure provide a travel compensation scheme for a transmission structure, which can improve the consistency problem of forward and return control caused by the structural gap between the transmission structure and the motor.

[0036] The specific implementation of the embodiments of this disclosure will be described in detail below with reference to the accompanying drawings.

[0037] Motor movement control method Figure 2 The processing flow of the motor movement control method, which is an exemplary embodiment of this disclosure, is applicable to, for example... Figure 1A and Figure 1B The transmission structure 100 shown is equipped with a motor and a target object, so that the motor and the target object can be driven to move in conjunction within a given detection stroke and a given transmission stroke of the transmission structure, respectively.

[0038] Specifically, the drive motor can reciprocate within a given detection stroke H to drive the transmission structure 100 to reciprocate around the pivot point P0, so that the target object reciprocates within a given transmission stroke L.

[0039] In some embodiments, the transmission structure 100 can be applied to the autofocus scenario of a camera. The target object set in the transmission structure 100 is the camera lens. The motor on the transmission structure 100 is closer to the pivot point P0 than the target object, and can drive the camera to reciprocate within a given transmission stroke.

[0040] like Figure 2 As shown, this embodiment mainly includes: Step 202: Obtain the target position of the motor in the given detection stroke.

[0041] For example, in an autofocus scenario, the target position of the motor in a given detection stroke can be automatically calculated and generated by the camera's autofocus system based on the subject being photographed.

[0042] Step 204: Drive the motor to move from the current position to the target position to obtain the detection position of the motor in the given detection stroke and the direction of movement of the motor relative to the given detection stroke.

[0043] In some embodiments, after obtaining the target position of the motor, the current position of the motor in a given detection stroke can be obtained by a position sensor, and the difference between the current position and the target position can be calculated to determine the direction of movement of the motor relative to the given detection stroke.

[0044] For example, in Figure 1A and Figure 1BIn the example shown, the coordinates of each position corresponding to each detection position in the given detection stroke H gradually increase from the lower limit stroke endpoint H_bottom to the upper limit stroke endpoint H_top. If the current position of the motor is less than the target position, the direction of movement of the motor can be determined as the first direction of movement F1 (or the outward direction); conversely, if the current position of the motor is greater than the target position, the direction of movement of the motor can be determined as the second direction of movement F2 (or the return direction).

[0045] In some embodiments, the motor can move relative to a given detection stroke based on the target position to drive the transmission structure 100 to rotate around the pivot point P0, and after the rotation is completed, the position sensor detects the new current position of the motor in the given detection stroke to obtain the detection position of the motor in the given detection stroke.

[0046] In some embodiments, the detection position of the motor during a given detection stroke can be obtained using a Hall sensor. It should be noted that the position of the motor during a given detection stroke can be obtained using any other position sensor, and this disclosure does not impose any limitations on this.

[0047] In some embodiments, the target position can be input into the closed-loop controller to drive the motor to move within a given detection stroke. After the motor completes its movement, the new current position of the motor within the given detection stroke can be detected again by the position sensor to obtain the detection position of the motor within the given detection stroke.

[0048] In some embodiments, a magnet may be provided in the motor of the transmission structure, and a Hall sensor may be used to determine the detection position of the motor in a given detection stroke by sensing changes in the magnetic field in the horizontal direction.

[0049] Step 206: Based on the detection position and movement direction of the motor, obtain the compensation position of the motor in the given detection stroke, and drive the motor to move according to the compensation position so that the target object moves to the ideal position of the given transmission stroke.

[0050] In some embodiments, the compensation position can be input to the closed-loop controller to drive the motor to make a compensation movement in a given detection stroke, so that the target object moves to the ideal position of the given transmission stroke.

[0051] In this embodiment, the ideal position of the target object within a given transmission stroke is determined based on the target position of the motor within a given detection stroke. Specifically, the ideal position of the target object refers to the theoretical position of the target object within a given transmission stroke when the motor is positioned at the target position within the given detection stroke, excluding the movement offset caused by structural clearance.

[0052] For example, refer to Figure 1AWhen the motor moves along the first direction of movement F1 relative to the given detection stroke, when the motor is positioned at the target position P12, the ideal position of the target object in the given transmission stroke is P21; for example, refer to Figure 1B When the motor moves along the second direction of movement F2 relative to the given detection stroke, when the motor is positioned at the target position P12, the ideal position of the target object in the given transmission stroke is P21.

[0053] In some embodiments, after completing step 206, the process can return to step 202 to obtain the next target position of the motor and execute the next round of motor movement position compensation control scheme.

[0054] In summary, the motor movement control method of this embodiment, by capturing the detected position (actual position) of the motor in a given detection stroke and determining the direction of motor movement, and performing compensation calculations on the movement position of the motor in a given detection stroke, can improve the consistency problem of motor forward and return control caused by mechanical backlash and improve the position control accuracy of the target object.

[0055] Figure 3 The following is a processing flow of a motor movement control method according to another exemplary embodiment of this disclosure, which illustrates a specific implementation scheme for calculating the compensation position of the motor in a given detection stroke in step 206 above.

[0056] like Figure 3 As shown, this embodiment mainly includes the following steps: Step 302: Determine a target interval from multiple compensation intervals based on the motor's direction of movement and the detection position.

[0057] In some embodiments, each compensation interval is designated as one of a first movement direction and a second movement direction, wherein the first movement direction is opposite to the second movement direction. For example, in an embodiment of this disclosure, the first movement direction F1 corresponds to the direction of movement from the lower limit travel endpoint position H_bottom to the upper limit travel endpoint position H_top (see reference). Figure 1A The second movement direction F2 corresponds to the direction of movement from the upper limit travel endpoint position H_top to the lower limit travel endpoint position H_bottom (see reference). Figure 1B ).

[0058] In this embodiment, each compensation interval includes two interval compensation coefficients and two interval endpoint positions, wherein the two interval compensation coefficients of each compensation interval are composed of an upper limit interval compensation coefficient. A lower limit interval compensation coefficient The structure consists of two endpoints of each compensation interval, determined by an upper limit interval endpoint. and the endpoint of a lower limit interval constitute.

[0059] In some embodiments, each compensation interval whose marking direction is the same as the motor's movement direction can be determined as a candidate interval based on the motor's movement direction and the marking direction corresponding to each compensation interval. Then, based on the motor's detection position and the positions of the two endpoints of each candidate interval, a candidate interval containing the motor's detection position can be determined as the target interval.

[0060] For example, if the motor's movement direction is determined to be a first movement direction, each compensation interval marked as the first movement direction can be identified as a candidate interval. Based on the upper and lower limit endpoint positions of each candidate interval, a candidate interval containing the detection position is identified as the target interval.

[0061] Step 304: Based on the detection position, the two interval compensation coefficients of the target interval, and the positions of the two interval endpoints, perform movement compensation calculation to obtain the compensation position of the motor in the given detection stroke.

[0062] In some embodiments, the motor's detection position in a given detection stroke, the upper and lower limit compensation coefficients of the target interval, the upper and lower limit endpoints of the target interval, the upper and lower limit endpoints of the given detection stroke, and the upper and lower limit compensation coefficients of the given transmission stroke can be substituted into a given compensation stroke calculation formula to obtain the motor's compensation position in the given detection stroke.

[0063] In some embodiments, the formula for calculating the compensation stroke can be expressed as:

[0064] in, This indicates the compensation position of the motor within a given detection stroke. This indicates the upper limit endpoint position of a given detection range. This indicates the lower limit endpoint position of a given detection travel distance. This represents the upper limit travel compensation coefficient for a given transmission stroke. This represents the lower limit of the travel compensation coefficient for a given transmission stroke. Indicates the detection position of the motor within a given detection stroke. The lower limit of the target interval is represented by the compensation coefficient. The upper limit of the target interval is represented by the compensation coefficient. Indicates the lower limit endpoint position of the target interval. This indicates the upper limit endpoint of the target interval.

[0065] In some embodiments, the compensation intervals are continuous within a given detection path, and adjacent compensation intervals share a common endpoint position (for example, the upper limit endpoint position of the (N-1)th compensation interval is the same as the lower limit endpoint position of the Nth compensation interval). Based on this, in practical applications of this scheme, only the endpoint positions of each compensation interval and the corresponding compensation coefficients need to be stored for the target interval determination processing in step 302 and the compensation position calculation processing in step 304.

[0066] In summary, the motor movement control method of this embodiment, by determining the movement direction of the motor relative to a given detection stroke and acquiring the detection position of the motor in the given detection stroke after moving based on the target position, performs motor movement compensation calculation, which can improve the consistency problem of forward and return control caused by the mechanical backlash of the transmission structure and reduce the movement deviation problem of the target object in the given transmission stroke.

[0067] Figure 4 This embodiment mainly discloses the processing flow of a motor movement control method as another exemplary embodiment of the present disclosure. Figure 3 The embodiment describes the method for determining the two interval compensation coefficients and the positions of the two interval endpoints for each compensation interval. The following will combine... Figure 1A , Figure 1B The specific implementation of this embodiment is described in detail, such as Figure 4 As shown, this embodiment mainly includes: Step 402: Determine the first or second moving direction as the target moving direction. Based on the multiple equally divided travel intervals in the given detection travel, determine the upper limit interval endpoint position and lower limit interval endpoint position of each travel interval under the target moving direction in the given detection travel.

[0068] For example, in Figure 5 In the example shown, based on the n marker positions set at equal intervals in a given detection travel path, n+1 travel intervals under the target movement direction can be obtained, and the upper limit interval endpoint position and lower limit interval endpoint position of each travel interval under the target movement direction can be determined.

[0069] It should be noted that this disclosure does not limit the number of travel intervals to be divided in a given detection travel, and those skilled in the art can set them arbitrarily according to the actual motion compensation accuracy requirements.

[0070] Step 404: Drive the motor to move along the target movement direction in the given detection stroke, and synchronously collect the detection positions of the motor in the given detection stroke and the transmission positions of the target object in the given transmission stroke to obtain the correspondence between the detection positions and the transmission positions in the target movement direction.

[0071] refer to Figure 1A The motor on the drive transmission structure 100 can move along the first direction of movement F1 from the lower limit end position of the given detection stroke H. Upper limit travel endpoint position The direction (or outgoing direction) of the transmission structure 100 moves so that the first rotation direction R1 rotates around the pivot point P0. During the rotation, the detection positions of the motor in the given detection stroke H and the transmission positions of the target object in the given transmission stroke L are collected synchronously to determine the correspondence between the detection positions and the transmission positions of F1 in the first moving direction.

[0072] Similarly, refer to Figure 1B The motor on the drive transmission structure 100 can move along the second direction of movement F2 from the upper limit end position of the given detection stroke H. Lower limit travel endpoint position The direction of movement (or return direction) causes the transmission structure 100 to rotate around the pivot point P0 along the second rotation direction R2. During the rotation, the detection positions of the motor in the given detection stroke H and the transmission positions of the target object in the given transmission stroke L are synchronously collected to determine the correspondence between the detection positions and transmission positions of F2 in the second movement direction. For example, in Figure 5 In the graph shown, the horizontal axis represents the detection position of the motor in a given detection stroke H, and the vertical axis represents the transmission position of the target object (e.g., a lens) in a given transmission stroke L.

[0073] In some embodiments, the detection positions of the motor in a given detection stroke H can be acquired by a Hall sensor, and the transmission positions of the target object in a given transmission stroke L can be acquired by a laser sensor.

[0074] In this embodiment, normalization processing can be performed on each detection position acquired by the Hall sensor and each transmission position acquired by the laser sensor to map each acquired data to a given data range (e.g., from the upper limit stroke end position). and lower limit travel endpoint position (Limited data range).

[0075] Step 406: Based on the upper limit and lower limit endpoint positions of each stroke interval in the given detection stroke under the target movement direction, and the correspondence between each detection position and each transmission position under the target movement direction, perform fitting to obtain the slope value and intercept value of each stroke interval under the target movement direction.

[0076] Specifically, refer to Figure 5Based on the correspondence between each detection position and each transmission position in the target movement direction, and the endpoint positions of the two intervals within a given detection stroke for each stroke interval in the target movement direction, piecewise fitting can be performed to obtain the slope value K and intercept value b for each stroke interval in the target movement direction (see reference). Figure 5 The two fitted curves are presented as solid lines. Each fitted curve consists of multiple straight line segments, and each straight line segment corresponds to a travel interval.

[0077] Step 408: Based on the slope and intercept values, upper limit interval endpoint positions and lower limit interval endpoint positions of each travel interval under the target movement direction, obtain the upper limit interval compensation coefficient and lower limit interval compensation coefficient for each travel interval under the target movement direction.

[0078] Specifically, for any current interval in each travel interval under the target movement direction, the upper limit interval compensation coefficient corresponding to the upper limit interval endpoint position and the lower limit interval compensation coefficient corresponding to the lower limit interval endpoint position can be calculated based on the slope value and intercept value of the current interval, the upper limit interval endpoint position and the lower limit interval endpoint position of the current interval.

[0079] In summary, this embodiment determines the correspondence between each detection position and each transmission position under different movement directions and performs data fitting to determine the two interval compensation coefficients and two interval endpoint positions of each compensation interval under different movement directions, so as to perform compensation calculations for the motor movement position. This effectively solves the problem of poor consistency of the motor during the forward and return strokes caused by structural clearances and improves the accuracy of the movement stroke compensation results.

[0080] In summary, the motor movement control method of this embodiment, through the motor movement control methods provided in the above embodiments, compensates for the motor's movement stroke by performing calculations. This ensures that when the motor moves in different directions relative to a given detection stroke, the same target position of the motor corresponds to the same physical position of the lens, achieving high-precision consistency control in both forward and return strokes. This allows the motor to achieve high-precision linear output throughout its entire stroke, effectively solving the problem of poor control consistency of the motor during forward and return strokes caused by manufacturing process issues, and improving the camera's focusing quality.

[0081] Motor movement control device Figure 6 This is a simplified structural diagram of a motor movement control device 600 according to an exemplary embodiment of the present disclosure. This embodiment is applicable to... Figure 1A and Figure 1B The transmission structure 100 shown has a motor and a target object on it, so that the motor and the target object can be driven to move in conjunction within a given detection stroke and a given transmission stroke of the transmission structure, respectively.

[0082] Specifically, the drive motor can reciprocate within a given detection stroke H to drive the transmission structure 100 to reciprocate around the pivot point P0, so that the target object reciprocates within a given transmission stroke L.

[0083] In some embodiments, the transmission structure 100 is suitable for camera autofocus applications, wherein the target object disposed on the transmission structure 100 is the camera lens, and the motor on the transmission structure 100 is closer to the pivot point P0 than the target object, and can drive the camera to reciprocate within a given transmission stroke.

[0084] like Figure 6 As shown, the motor movement control device 600 mainly includes a position acquisition module 602, a motor drive module 604, a position detection module 606, a direction determination module 608, and a position compensation module 609.

[0085] The position acquisition module 602 is used to acquire the target position of the motor in a given detection stroke.

[0086] The motor drive module 604 is connected to the position acquisition module 602 and is used to drive the motor 610 to move from the current position to the target position.

[0087] The position detection module 606 is used to detect the actual movement position of the motor in the given detection stroke, and obtain the detection position of the motor 610 in the given detection stroke.

[0088] The direction determination module 608 is used to determine the direction of movement of the motor 610 relative to the given detection stroke based on the current position and the target position of the motor.

[0089] The position compensation module 609 is used to obtain the compensated position of the motor in the given detection stroke based on the detected position of the motor and the direction of movement.

[0090] The motor drive module 604 is also used to drive the motor 610 to perform compensatory movement according to the compensated position, so that the target object moves to the ideal position of the given transmission stroke.

[0091] In some embodiments, the ideal position of the target object within the given transmission stroke is determined based on the target position of the motor within the given detection stroke.

[0092] In some embodiments, the position detection module 606 includes a Hall sensor.

[0093] In some embodiments, the motor drive module 604 includes a closed-loop controller.

[0094] In some embodiments, the motor drive module 604 is further configured to input the target position or at least one compensation position corresponding to the target position into the closed-loop controller to drive the motor to move in the given detection stroke via the closed-loop controller.

[0095] In some embodiments, the position compensation module 609 is used to: determine a target interval from multiple compensation intervals based on the moving direction and detection position of the motor; and perform movement compensation calculation based on the detection position, the two interval compensation coefficients of the target interval, and the two interval endpoint positions to obtain the compensation position of the motor in the given detection stroke.

[0096] In some embodiments, each compensation interval is labeled as one of a first moving direction and a second moving direction, wherein the first moving direction is opposite to the second moving direction.

[0097] In some embodiments, the position compensation module 609 is used to: determine each compensation interval whose marker direction is the same as the moving direction of the motor as a candidate interval according to the moving direction of the motor and the marker direction corresponding to each compensation interval; and determine a candidate interval containing the detection position as a target interval according to the detection position and the two interval endpoint positions of each candidate interval.

[0098] In some embodiments, the position compensation module 609 is used to: substitute the detection position of the motor in the given detection stroke, the upper limit interval compensation coefficient and the lower limit interval compensation coefficient of the target interval, the upper limit interval endpoint position and the lower limit interval endpoint position of the target interval, the upper limit stroke endpoint position and the lower limit stroke endpoint position of the given detection stroke, and the upper limit stroke compensation coefficient and the lower limit stroke compensation coefficient of the given transmission stroke into a given compensation stroke calculation formula to obtain the compensation position of the motor in the given detection stroke; The formula for calculating the compensation stroke is expressed as follows:

[0099] in, This indicates the compensation position of the motor during the given detection stroke. This indicates the upper limit endpoint position of the given detection range. Indicates the lower limit endpoint position of the given detection travel distance. This represents the upper limit travel compensation coefficient of the given transmission stroke. This represents the lower limit of the travel compensation coefficient for the given transmission stroke. Indicates the detection position of the motor during the given detection stroke. The lower limit interval compensation coefficient of the target interval is represented by... The upper limit compensation coefficient of the target interval is represented by the following: Indicates the lower limit interval endpoint position of the target interval, This indicates the position of the upper limit endpoint of the target interval.

[0100] In some embodiments, the motor movement control device 600 further includes a compensation interval construction module (not shown), used to determine the first movement direction or the second movement direction as the target movement direction; determine the upper limit interval endpoint position and lower limit interval endpoint position of each stroke interval under the target movement direction in the given detection stroke according to multiple stroke intervals evenly divided in the given detection stroke; drive the motor to move along the target movement direction in the given detection stroke; synchronously collect the detection positions of the motor in the given detection stroke and the transmission positions of the target object in the given transmission stroke to obtain the correspondence between each detection position and each transmission position under the target movement direction; perform fitting based on the upper limit interval endpoint position and lower limit interval endpoint position of each stroke interval under the target movement direction in the given detection stroke, and the correspondence between each detection position and each transmission position under the target movement direction to obtain the slope value and intercept value of each stroke interval under the target movement direction; and obtain the upper limit interval compensation coefficient and lower limit interval compensation coefficient of each stroke interval under the target movement direction based on the slope value and intercept value, the upper limit interval endpoint position and the lower limit interval endpoint position of each stroke interval under the target movement direction.

[0101] electronic devices Reference Figure 7 This document illustrates a schematic diagram of an electronic device according to an exemplary embodiment of the present application. The specific embodiments of the present application do not limit the specific implementation of the electronic device.

[0102] like Figure 7 As shown, the electronic device may include: a processor 702, a communications interface 704, a memory 706, and a communications bus 708.

[0103] in: The processor 702, communication interface 704, and memory 706 communicate with each other via communication bus 708.

[0104] Communication interface 704 is used to communicate with other electronic devices or servers.

[0105] The processor 702 is used to execute program 710, specifically to execute the relevant steps in the above-described motor movement control method or the embodiments of the motor movement control method.

[0106] Specifically, program 710 may include program code that includes computer operation instructions.

[0107] The processor 702 may be a CPU, an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of this application. The smart device includes one or more processors, which may be processors of the same type, such as one or more CPUs; or processors of different types, such as one or more CPUs and one or more ASICs.

[0108] Memory 706 is used to store program 710. Memory 706 may include high-speed RAM memory, and may also include non-volatile memory, such as at least one disk storage device.

[0109] Program 710 may include multiple computer instructions. Specifically, program 710 can cause processor 702 to execute the operation corresponding to the motor movement control method described in any of the foregoing multiple method embodiments through multiple computer instructions.

[0110] The specific implementation of each step in program 710 can be found in the corresponding steps and units described in the above method embodiments, and has corresponding beneficial effects, which will not be repeated here. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the devices and modules described above can be referred to the corresponding process descriptions in the foregoing method embodiments, and will not be repeated here.

[0111] This application also provides a computer storage medium storing a computer program thereon, which, when executed by a processor, implements the method described in any of the foregoing method embodiments. The computer storage medium includes, but is not limited to, compact disc read-only memory (CD-ROM), random access memory (RAM), floppy disk, hard disk, or magneto-optical disk.

[0112] This application also provides a computer program product, including computer instructions that instruct a computing device to perform operations corresponding to the motor movement control method described in any of the above embodiments.

[0113] Furthermore, it should be noted that the user-related information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to sample data used for training the model, data used for analysis, stored data, displayed data, etc.) involved in the embodiments of this application are all information and data authorized by the user or fully authorized by all parties. Moreover, the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation entry points are provided for users to choose to authorize or refuse.

[0114] It should be noted that, depending on the implementation needs, the various components / steps described in the embodiments of this application can be broken down into more components / steps, or two or more components / steps or parts of the operation of components / steps can be combined into new components / steps to achieve the purpose of the embodiments of this application.

[0115] The methods described in the embodiments of this application can be implemented in hardware, firmware, or as software or computer code that can be stored in a recording medium (such as a CD-ROM, RAM, floppy disk, hard disk, or magneto-optical disk), or as computer code downloaded over a network that is originally stored in a remote recording medium or a non-transitory machine-readable medium and will be stored in a local recording medium. Thus, the methods described herein can be stored on a recording medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware (such as an Application Specific Integrated Circuit (ASIC) or a Field Programmable Gate Array (FPGA)). It is understood that the computer, processor, microprocessor controller, or programmable hardware includes storage components (e.g., Random Access Memory (RAM), Read-Only Memory (ROM), Flash Memory, etc.) capable of storing or receiving software or computer code, which, when accessed and executed by the computer, processor, or hardware, implements the methods described herein. Furthermore, when a general-purpose computer accesses code used to implement the methods shown herein, the execution of the code transforms the general-purpose computer into a dedicated computer for executing the methods shown herein.

[0116] Those skilled in the art will recognize that the units and method steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the embodiments of this application.

[0117] The above embodiments are only used to illustrate the embodiments of this application, and are not intended to limit the embodiments of this application. Those skilled in the art can make various changes and modifications without departing from the spirit and scope of the embodiments of this application. Therefore, all equivalent technical solutions also fall within the scope of the embodiments of this application, and the patent protection scope of the embodiments of this application should be defined by the claims.

Claims

1. A method for controlling motor movement, comprising: Obtain the target position of the motor during a given detection stroke; Drive the motor to move from the current position to the target position to obtain the detection position of the motor in the given detection stroke and the direction of movement of the motor relative to the given detection stroke; Based on the detection position and direction of movement of the motor, a target interval is determined from multiple compensation intervals; The motor's detection position in the given detection stroke, the upper and lower limit compensation coefficients of the target interval, the upper and lower limit endpoints of the target interval, the upper and lower limit endpoints of the given detection stroke, and the upper and lower limit compensation coefficients of the given transmission stroke are substituted into the given compensation stroke calculation formula to obtain the motor's compensation position in the given detection stroke. The motor is then driven to move according to the compensation position, so that the target object moves to the ideal position in the given transmission stroke. The formula for calculating the compensation stroke is expressed as follows: in, This indicates the compensation position of the motor during the given detection stroke. This indicates the upper limit endpoint position of the given detection range. Indicates the lower limit endpoint position of the given detection travel distance. This represents the upper limit travel compensation coefficient of the given transmission stroke. This represents the lower limit of the travel compensation coefficient for the given transmission stroke. Indicates the detection position of the motor during the given detection stroke. The lower limit interval compensation coefficient of the target interval is represented by... The upper limit compensation coefficient of the target interval is represented by the following: Indicates the lower limit interval endpoint position of the target interval, This indicates the position of the upper limit endpoint of the target interval.

2. The motor movement control method according to claim 1, wherein, The motor is connected to a closed-loop controller; Furthermore, the method further includes: The target position or at least one compensation position corresponding to the target position is input to the closed-loop controller to drive the motor to move in the given detection stroke via the closed-loop controller.

3. The motor movement control method according to claim 1, wherein, Each compensation interval is marked as one of a first moving direction and a second moving direction, wherein the first moving direction is opposite to the second moving direction; Furthermore, the step of determining a target interval from multiple compensation intervals based on the detected position and direction of movement of the motor includes: Based on the direction of movement of the motor and the direction of each mark corresponding to each compensation interval, each compensation interval whose mark direction is the same as the direction of movement of the motor is determined as a candidate interval; Based on the detection location and the two endpoints of each candidate interval, a candidate interval containing the detection location is determined as the target interval.

4. The motor movement control method according to claim 3, wherein, The upper limit compensation coefficient, lower limit compensation coefficient, upper limit endpoint position, and lower limit endpoint position of each compensation interval are obtained in the following way: The first or second movement direction is determined as the target movement direction. Based on the multiple equally divided travel intervals in the given detection travel, the upper limit interval endpoint position and the lower limit interval endpoint position of each travel interval under the target movement direction in the given detection travel are determined. The motor is driven to move along the target moving direction in a given detection stroke, and the detection positions of the motor in the given detection stroke and the transmission positions of the target object in the given transmission stroke are collected simultaneously to obtain the correspondence between each detection position and each transmission position in the target moving direction; Based on the upper limit and lower limit endpoints of each travel interval under the target movement direction in the given detection travel, and the correspondence between each detection position and each transmission position under the target movement direction, a fitting is performed to obtain the slope value and intercept value of each travel interval under the target movement direction. Based on the slope and intercept values, upper limit interval endpoint positions and lower limit interval endpoint positions of each travel interval under the target movement direction, the upper limit interval compensation coefficient and lower limit interval compensation coefficient are obtained for each travel interval under the target movement direction.

5. The motor movement control method according to claim 1, wherein, The motor and the target object are mounted on a transmission structure, and the method further includes: The transmission structure drives the motor and the target object to move in tandem within the given detection stroke and the given transmission stroke, respectively.

6. The motor movement control method according to claim 5, wherein, The transmission structure is applied to the camera; The target object is a camera lens; The transmission structure also includes a pivot point. By driving the motor to move back and forth within the given detection stroke, the transmission structure is driven to rotate back and forth around the pivot point, and the target object is driven to move back and forth within the given transmission stroke. The motor is closer to the pivot point than the target object.

7. A motor movement control device, comprising: The position acquisition module is used to acquire the target position of the motor in a given detection stroke; A motor drive module is used to drive the motor to move from the current position to the target position; The position detection module is used to detect the actual movement position of the motor in the given detection stroke, and obtain the detection position of the motor in the given detection stroke; The direction determination module is used to determine the direction of movement of the motor relative to the given detection stroke based on the current position and the target position of the motor. The position compensation module is used to determine a target interval from multiple compensation intervals based on the detected position and direction of movement of the motor. Substituting the motor's detection position in the given detection stroke, the upper and lower limit compensation coefficients of the target interval, the upper and lower limit endpoints of the target interval, the upper and lower limit endpoints of the given detection stroke, and the upper and lower limit compensation coefficients of the given transmission stroke into the given compensation stroke calculation formula, we obtain the motor's compensation position in the given detection stroke. The motor drive module is also used to drive the motor to perform compensatory movement according to the compensation position, so that the target object moves to the ideal position in the given transmission stroke; The formula for calculating the compensation stroke is expressed as follows: in, This indicates the compensation position of the motor during the given detection stroke. This indicates the upper limit endpoint position of the given detection range. Indicates the lower limit endpoint position of the given detection travel distance. This represents the upper limit travel compensation coefficient of the given transmission stroke. This represents the lower limit of the travel compensation coefficient for the given transmission stroke. Indicates the detection position of the motor during the given detection stroke. The lower limit interval compensation coefficient of the target interval is represented by... The upper limit compensation coefficient of the target interval is represented by the following: Indicates the lower limit interval endpoint position of the target interval, This indicates the position of the upper limit endpoint of the target interval.

8. An electronic device, comprising: The processor, the communication interface, the memory, and the bus are connected, and the processor, the communication interface, and the memory communicate with each other via the bus. The memory is used to store at least one executable instruction that causes the processor to perform an operation corresponding to the method as described in any one of claims 1 to 6.

9. A computer-readable storage medium storing computer instructions that, when executed by a processor, cause the processor to perform the method as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Motor control system which corrects backlash

    CN103676779A

  • Holder correction control method and device, electronic equipment and readable medium

    CN116233609A