Motor testing method, apparatus, and storage medium

CN122824893APending Publication Date: 2026-09-25SHANGHAI GLORY SMART TECH DEV CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611291009.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-25
Publication Date
2026-09-25

Smart Images

  • Figure CN122824893A_ABST
    Figure CN122824893A_ABST
Patent Text Reader

Abstract

The application provides a motor testing method, device and storage medium. In the method, a first reference axis is determined according to a fixed component in a motor to be tested, and / or a second reference axis is determined according to a movable component in the motor to be tested; a first angle is determined according to the first reference axis and a target reference axis, a second angle is determined according to the second reference axis and the target reference axis, and a crosstalk value caused by the motor to be tested being placed obliquely; a measurement value of a laser displacement sensor is processed to obtain testing data corresponding to the motor to be tested, the crosstalk caused by the motor to be tested being placed obliquely is reduced, and the testing precision of the motor to be tested is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a motor testing method, apparatus and storage medium. Background Technology

[0002] With the rapid development of electronic technology, users have increasingly higher requirements for electronic devices with photo and video functions. Electronic devices include motors. When the electronic device shakes, the motor drives the lens to move along a trajectory opposite to the direction of the shake, thereby achieving optical image stabilization (OIS) and improving image quality.

[0003] When the motor undergoes OIS testing, existing technologies may experience crosstalk issues due to factors such as motor tilt, which can affect the motor's OIS test results, thereby impacting the image stabilization effect and resulting in low image quality. Summary of the Invention

[0004] This application provides a motor testing method, apparatus, and storage medium. In this method, a first reference axis and a second reference axis corresponding to the motor under test are determined, and the corresponding angle value and crosstalk value caused by the tilted placement of the motor under test are calculated based on the target reference axis. The measured values ​​of the laser displacement sensor are then processed to reduce crosstalk caused by the tilted placement of the motor under test.

[0005] Firstly, embodiments of this application provide a motor testing method. The method includes: At least one of a first reference axis and a second reference axis corresponding to the motor under test is determined. The first reference axis is determined based on the fixed components in the motor under test, and the second reference axis is determined based on the movable components in the motor under test. A target reference axis is determined based on a first laser emitted by a first laser displacement sensor and a second laser emitted by a second laser displacement sensor. A first angle is determined based on the first reference axis and the target reference axis, and a second angle is determined based on the second reference axis and the target reference axis. The motor under test is driven to move, and a first measurement value is obtained through the first laser displacement sensor, and a second measurement value is obtained through the second laser displacement sensor. The first measurement value is the difference between the readings of the first laser displacement sensor before and after the motor under test moves, and the second measurement value is the difference between the readings of the second laser displacement sensor before and after the motor under test moves. Test data corresponding to the motor under test is obtained based on at least one of the first angle, the second angle, the first measurement value, and the second measurement value.

[0006] In this way, by determining the first and second reference axes corresponding to the motor under test, and calculating the corresponding angle value and crosstalk value caused by the tilted placement of the motor under test based on the target reference axis, the measured value of the laser displacement sensor is processed to reduce the crosstalk caused by the tilted placement of the motor under test, improve the test accuracy of the motor under test, and better evaluate the performance of the motor under test.

[0007] According to the first aspect, test data corresponding to the motor under test is obtained based on at least one of the following: a first angle, a second angle, a first measured value, and a second measured value: Based on trigonometric relationships, a first crosstalk value is calculated from at least one of the first angle, the second angle, and the second measured value. The first crosstalk value is the crosstalk to the direction corresponding to the first laser when the motor under test moves. Test data is obtained based on the first crosstalk value and the first measured value.

[0008] For example, the actual X-axis movement distance in a specific embodiment is obtained based on the first crosstalk value and the first measurement value. Specific implementation details can be found below. Figure 7 The corresponding implementation examples will not be described in detail here.

[0009] In this way, the crosstalk value is calculated based on trigonometric function relationships, and the measured value of the laser displacement sensor is processed to reduce crosstalk caused by the tilted placement of the motor under test, thereby improving the test accuracy of the motor under test.

[0010] According to the first aspect, or any implementation of the first aspect above, the motor under test is driven to move, a first measurement value is obtained through a first laser displacement sensor, a second measurement value is obtained through a first laser displacement sensor, and a first crosstalk value is calculated based on trigonometric relationships, according to at least one of the first angle, the second angle, and the second measurement value, including: when the value of the first angle is non-zero, adjusting the position of the motor under test until the value of the first angle is zero, and redetermining the second reference axis and the second angle corresponding to the motor under test after the adjustment; when the value of the first angle is zero, driving the motor under test to move, obtaining the first measurement value through the first laser displacement sensor, and obtaining the second measurement value through a second laser displacement sensor; and calculating the first crosstalk value based on trigonometric relationships, according to at least one of the second angle and the second measurement value corresponding to the motor under test after the adjustment.

[0011] For details, please refer to the embodiment corresponding to Method 1 in the specific embodiments, which will not be elaborated here.

[0012] In this way, the position of the motor under test is first adjusted to eliminate crosstalk caused by the tilt of the fixed component, then the crosstalk caused by the tilt of the movable component is calculated, and the measurement value of the laser displacement sensor is processed to reduce the amount of calculation and improve the testing efficiency of the motor under test.

[0013] According to the first aspect, or any implementation of the first aspect above, based on trigonometric relationships, the first crosstalk value is calculated according to at least one of the first angle, the second angle, and the second measured value, including: Based on trigonometric relationships, the target angle is obtained from the first angle and the second angle; the first crosstalk value is calculated from the target angle and at least one of the second measured values.

[0014] For details, please refer to the embodiment corresponding to Method 2 in the specific embodiments, which will not be elaborated here.

[0015] In this way, there is no need to adjust the position of the motor under test, calculate and eliminate crosstalk caused by the tilt of fixed and movable components, and process the measurement values ​​of the laser displacement sensor, thereby improving the testing efficiency of the motor under test.

[0016] According to the first aspect, or any implementation of the first aspect above, test data corresponding to the motor under test is obtained based on at least one of the first angle, second angle, first measured value, and second measured value, including: Based on trigonometric relationships, a second crosstalk value is calculated from at least one of the first angle, the second angle, and the first measured value. The second crosstalk value is the crosstalk to the corresponding direction of the second laser when the motor under test moves. Test data is obtained based on the second crosstalk value and the second measured value.

[0017] For example, the actual Y-axis movement distance in a specific embodiment is obtained based on the second crosstalk value and the second measurement value. Specific implementation details can be found below. Figure 7 The corresponding implementation examples will not be described in detail here.

[0018] In this way, the crosstalk value is calculated based on trigonometric function relationships, and the measured value of the laser displacement sensor is processed to reduce crosstalk caused by the tilted placement of the motor under test, thereby improving the test accuracy of the motor under test.

[0019] According to the first aspect, or any implementation of the first aspect above, the motor under test is driven to move, a first measurement value is obtained through a first laser displacement sensor, a second measurement value is obtained through the first laser displacement sensor, and a first crosstalk value is calculated based on trigonometric relationships, according to at least one of the first angle, the second angle, and the second measurement value, including: When the value of the first angle is non-zero, the position of the motor under test is adjusted until the value of the first angle is zero, and the second reference axis and the second angle corresponding to the motor under test after the adjustment are redefined; when the value of the first angle is zero, the motor under test is driven to move, and the first measurement value is obtained through the first laser displacement sensor and the second measurement value is obtained through the second laser displacement sensor; based on the trigonometric function relationship, the second crosstalk value is calculated according to at least one of the second angle corresponding to the motor under test after the adjustment and the first measurement value.

[0020] For details, please refer to the embodiment corresponding to Method 1 in the specific embodiments, which will not be elaborated here.

[0021] In this way, the position of the motor under test is first adjusted to eliminate crosstalk caused by the tilt of the fixed component, then the crosstalk caused by the tilt of the movable component is calculated, and the measurement value of the laser displacement sensor is processed to reduce the amount of calculation and improve the testing efficiency of the motor under test.

[0022] According to the first aspect, or any implementation of the first aspect above, based on trigonometric relationships, the first crosstalk value is calculated according to at least one of the first angle, the second angle, and the second measured value, including: Based on trigonometric relationships, the target angle is obtained from the first angle and the second angle; the second crosstalk value is calculated from the target angle and at least one of the first measured values.

[0023] For details, please refer to the embodiment corresponding to Method 2 in the specific embodiments, which will not be elaborated here.

[0024] In this way, there is no need to adjust the position of the motor under test, calculate and eliminate crosstalk caused by the tilt of fixed and movable components, and process the measurement values ​​of the laser displacement sensor, thereby improving the testing efficiency of the motor under test.

[0025] Based on the first aspect, or any implementation of the first aspect above, the first reference axis and the second reference axis corresponding to the motor under test are determined, including: The target region feature is extracted from the target image corresponding to the motor to be tested to obtain the image corresponding to the first target region; the center line of the image corresponding to the first target region is extracted to obtain the first reference axis; the first target region includes at least one of the following: the outer region of the fixed component and the inner region of the fixed component.

[0026] For example, the target image is a motor image in a specific embodiment.

[0027] Based on the first aspect, or any implementation of the first aspect above, the first reference axis and the second reference axis corresponding to the motor under test are determined, including: The target region feature is extracted from the target image corresponding to the motor under test to obtain the image corresponding to the second target region; the center line of the image corresponding to the second target region is extracted to obtain the second reference axis; the second target region includes at least one of the following: movable component region, lens region.

[0028] According to the first aspect, or any implementation of the first aspect above, the target region feature extraction method includes at least one of the following methods: threshold segmentation method, edge detection method, and deep learning segmentation method.

[0029] According to the first aspect, or any implementation of the first aspect above, the centerline extraction method includes at least one of the following methods: principal component analysis method, Hough line transform method, least squares line fitting method based on edge detection, and skeletonization method.

[0030] According to the first aspect, or any implementation of the first aspect above, the target reference axis includes a first target reference axis and a second target reference axis; determining the target reference axis based on a first laser emitted by a first laser displacement sensor and a second laser emitted by a second laser displacement sensor includes: Determine the first straight line of the first laser in the image coordinate system; based on the coordinate mapping relationship, convert the first straight line into the first target reference axis; determine the second straight line of the second laser in the image coordinate system; based on the coordinate mapping relationship, convert the second straight line into the second target reference axis.

[0031] According to the first aspect, or any implementation of the first aspect above, before determining the target reference axis based on the first laser emitted by the first laser displacement sensor and the second laser emitted by the second laser displacement sensor, the method further includes: The test object is driven to move a target distance, and a third measurement value is obtained through the first laser displacement sensor, and a fourth measurement value is obtained through the first laser displacement sensor. The third measurement value is the difference between the readings of the first laser displacement sensor before and after the test motor moves, and the fourth measurement value is the difference between the readings of the second laser displacement sensor before and after the test motor moves. Based on at least one of the third and fourth measurement values, the positions of the first and second laser displacement sensors are adjusted so that no position crosstalk occurs when the test object moves.

[0032] For example, the target distance can be the first displacement value and the second displacement value in the specific embodiment. The method for adjusting the position of the first laser displacement sensor and the second laser displacement sensor can refer to the content corresponding to step S701, which will not be repeated here.

[0033] According to the first aspect, or any implementation of the first aspect above, the positions of the first laser displacement sensor and the second laser displacement sensor are adjusted based on at least one of the third and fourth measurement values ​​to prevent position crosstalk when the object under test moves, including: The first laser displacement sensor is mounted on the first slide, and its position is adjusted by adjusting the first slide; the second laser displacement sensor is mounted on the second slide, and its position is adjusted by adjusting the second slide.

[0034] This allows for rapid adjustment of the positions of the first and second laser displacement sensors.

[0035] Secondly, embodiments of this application provide an electronic device. The electronic device includes: one or more processors; a memory; and one or more computer programs, wherein the one or more computer programs are stored in the memory, and when executed by the one or more processors, the electronic device performs the motor testing method of the first aspect and any one thereof.

[0036] The second aspect and any implementation thereof correspond to the first aspect and any implementation thereof, respectively. The technical effects of the second aspect and any implementation thereof are similar to those of the first aspect and any implementation thereof, and will not be repeated here.

[0037] Thirdly, embodiments of this application provide a computer-readable storage medium. This computer-readable storage medium includes a computer program that, when run on an electronic device, causes the electronic device to perform the motor testing method of the first aspect and any one thereof.

[0038] The third aspect and any implementation thereof correspond to the first aspect and any implementation thereof, respectively. The technical effects of the third aspect and any implementation thereof are similar to those of the first aspect and any implementation thereof, and will not be repeated here.

[0039] Fourthly, embodiments of this application provide a computer program product, including a computer program that, when run, causes a computer to execute a motor testing method as described in the first aspect or any one of the first aspects.

[0040] The fourth aspect and any implementation thereof correspond to the first aspect and any implementation thereof, respectively. The technical effects of the fourth aspect and any implementation thereof are similar to those of the first aspect and any implementation thereof, and will not be repeated here.

[0041] Fifthly, this application provides a chip including a processing circuit and transceiver pins. The transceiver pins and the processing circuit communicate with each other via an internal connection path. The processing circuit executes a motor testing method as described in the first aspect or any one thereof, to control the receiving pin to receive signals and to control the transmitting pin to transmit signals.

[0042] The fifth aspect and any implementation thereof correspond to the first aspect and any implementation thereof, respectively. The technical effects of the fifth aspect and any implementation thereof are similar to those of the first aspect and any implementation thereof, and will not be repeated here. Attached Figure Description

[0043] Figure 1 Hardware structure diagram of an electronic device as an example Figure 1 .

[0044] Figure 2 This is a schematic diagram illustrating the OIS circle drawing accuracy test of a motor under ideal conditions, as an example.

[0045] Figure 3 This is an example of an OIS circle drawing accuracy test diagram for a motor in a tilted state.

[0046] Figure 4 Hardware structure diagram of an electronic device as an example Figure 2 .

[0047] Figure 5 This is a schematic diagram of the software structure of an electronic device as an example.

[0048] Figure 6 This is a schematic diagram of a motor testing device provided in an embodiment of this application, which is shown as an example.

[0049] Figure 7 This is a schematic diagram illustrating a motor testing method provided in an embodiment of this application, which is an example of such a method.

[0050] Figure 8 This is a schematic diagram of a reference point provided for an exemplary embodiment of this application.

[0051] Figure 9This is a schematic diagram of a motor provided as an example embodiment of this application.

[0052] Figure 10 This is a schematic diagram of a first reference axis corresponding to the outer region of a fixed component, provided as an example of an embodiment of this application.

[0053] Figure 11 This is a schematic diagram of a first reference axis corresponding to an internal region of a fixed component, provided as an example of an embodiment of this application.

[0054] Figure 12 This is a schematic diagram of a second reference axis corresponding to a movable component area provided in an exemplary embodiment of this application.

[0055] Figure 13 This is a schematic diagram of a second reference axis corresponding to a lens area, provided as an exemplary embodiment of this application.

[0056] Figure 14 This is a schematic diagram of the acquisition points corresponding to an OIS accuracy test provided in an exemplary embodiment of this application.

[0057] Figure 15 This is a schematic diagram illustrating the trigonometric function relationship between a first scrambling value and a second scrambling value, provided as an example of an embodiment of this application.

[0058] Figure 16 This is a schematic diagram illustrating the angular direction corresponding to a first angle and a second angle, provided as an example of an embodiment of this application.

[0059] Figure 17 This is a schematic diagram of the structure of an exemplary device. Detailed Implementation

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

[0061] In this article, the term "and / or" is merely a description of the relationship between related objects, indicating that there can be three relationships. For example, A and / or B can represent three situations: A exists alone, A and B exist simultaneously, and B exists alone.

[0062] The terms "first" and "second," etc., used in the specification and claims of this application are used to distinguish different objects, not to describe a specific order of objects. For example, "first target object" and "second target object," etc., are used to distinguish different target objects, not to describe a specific order of target objects.

[0063] In the embodiments of this application, the terms "exemplary" or "for example" are used to indicate that something is an example, illustration, or description. Any embodiment or design that is described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design. Specifically, the use of the terms "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.

[0064] In the description of the embodiments in this application, unless otherwise stated, "multiple" means two or more. For example, multiple processing units means two or more processing units; multiple systems means two or more systems.

[0065] For ease of explanation, the following embodiments use a mobile phone as an example to illustrate the structure of the electronic device.

[0066] like Figure 1 As shown, Figure 1 This is a schematic diagram of the structure of an electronic device according to an embodiment of this application. The electronic device includes a screen 10, a back cover 20, and a motor 30. It is understood that... Figure 1 This illustration schematically shows some components of an electronic device, the actual shape, size, location, and construction of which are not subject to change. Figure 1 Restrictions.

[0067] Screen 10 is used to display images, videos, etc. Screen 10 includes a light-transmitting cover plate 11 and a display screen 12. The light-transmitting cover plate 11 and the display screen 12 are stacked together. The light-transmitting cover plate 11 is mainly used to protect the display screen 12 and prevent dust. The material of the light-transmitting cover plate 11 includes, but is not limited to, glass. The display screen 12 can be a flexible display screen or a rigid display screen. For example, the display screen 12 can be an Organic Light-Emitting Diode (OLED) display screen, an Active-Matrix Organic Light-Emitting Diode (AMOLED) display screen, a mini-organic light-emitting diode (MLED) display screen, a microorganic light-emitting diode (LED) display screen, a quantum dot light-emitting diode (QLED) display screen, or a liquid crystal display (LCD).

[0068] The back cover 20 is used to protect the internal electronic components of the electronic device. The back cover 20 includes a back cover 21 and a frame 22. The back cover 21 is located on the side of the display screen 12 away from the light-transmitting cover plate 11 and is stacked on top of the light-transmitting cover plate 11 and the display screen 12. The frame 22 is located between the back cover 21 and the light-transmitting cover plate 11 and is fixed to the back cover 21. For example, the frame 22 can be fixed to the back cover 21 by adhesive. Alternatively, the frame 22 can be integrally formed with the back cover 21, i.e., the frame 22 and the back cover 21 are a single integral structure. The light-transmitting cover plate 11 is fixed to the frame 22 by adhesive. The light-transmitting cover plate 11, the back cover 21, and the frame 22 form an internal housing space for the electronic device. This internal housing space houses the display screen 12.

[0069] The motor 30 is fixed in the internal cavity of the electronic device. The motor 30 can be fixed and supported on the back cover 21 by means of threaded connection, snap-fit, welding or other methods.

[0070] Motor 30 is used when the user is taking photos or videos. The gyroscope detects minute vibrations of the electronic device in the horizontal (X-axis) and vertical (Y-axis) directions in real time. When the gyroscope detects vibrations in the electronic device, the motor drives the lens to move along a trajectory opposite to the direction of the vibration to compensate for external vibrations caused by the user's hand or the electronic device, thereby achieving optical image stabilization and effectively reducing motion blur during the capture of optical signals, thus improving image quality.

[0071] With the rapid development of electronic technology, users have increasingly higher demands for electronic devices with photography and video recording functions. They not only pursue higher pixel counts and richer colors, but also value image stability in dynamic scenes. To meet this demand, optical image stabilization (OIS) technology is widely used. The response accuracy and motion control capability of its core actuator, the motor, directly determine the stabilization effect. Therefore, before leaving the factory, the motor under test must undergo OIS circular accuracy testing to systematically evaluate its stabilization performance. Through OIS circular accuracy testing, motors that fail to meet performance standards can be eliminated before assembly, ensuring that the motors assembled into electronic devices have stable stabilization capabilities, thereby meeting users' requirements for image stability in dynamic scenes.

[0072] OIS (Optical Image Stabilization) circular accuracy testing involves driving a motor to perform micron-level displacement along a preset circular trajectory (usually a standard uniform circular motion). A laser displacement sensor then collects the motor's actual motion trajectory in real time and compares it to the preset circular trajectory. During the test, the motor moves simultaneously in both the X and Y axes to simulate real-world hand tremor compensation. Data such as radial deviation, roundness error, and trajectory tracking phase lag between the actual trajectory and the preset circular trajectory are calculated. If these data are within a preset threshold range, the motor is considered to have passed performance testing and possesses stable anti-shake capabilities.

[0073] Related technologies can perform OIS circular accuracy testing on the motor under test using a dual-laser testing method. This method employs two laser displacement sensors: a first laser displacement sensor and a second laser displacement sensor, which acquire the motor's actual motion trajectory in real time and compare it with a preset circular trajectory. The first laser displacement sensor measures the motor's displacement along the X-axis, while the second laser displacement sensor measures the motor's displacement along the Y-axis. The laser displacement sensor includes a laser, a receiving lens, and a photodetector (such as a linear array photodetector or a planar array photodetector).

[0074] For example, the first laser displacement sensor includes a first laser, a first receiving lens, and a first photodetector. The first laser emits laser light (i.e., the first laser beam) and illuminates the lens surface at a fixed angle (e.g., 45 degrees). The first laser beam causes diffuse reflection (or partial specular reflection) on the lens surface. The reflected light is collected by the first receiving lens and focused onto the first photodetector, which then obtains a corresponding first spot image. When the motor drives the lens to move in the X-axis direction, the position of the laser illumination point on the lens changes, causing a slight change in the direction of the reflected light. This results in a significant shift in the position of the spot in the first spot image received by the first photodetector. The first photodetector calculates the centroid position of the spot in real time using its internal processor (e.g., by weighted averaging of pixel gray values) to obtain the change in the first pixel coordinates corresponding to the spot. It then converts the change in the first pixel coordinates into an actual X-axis displacement value according to a pre-set scaling factor.

[0075] For example, the second laser displacement sensor includes a second laser, a second receiving lens, and a second photodetector. The second laser emits laser light (i.e., the second laser beam) and illuminates the lens surface at a fixed angle (e.g., 45 degrees). The second laser beam causes diffuse reflection (or partial specular reflection) on the lens surface. The reflected light is collected by the second receiving lens and focused onto the second photodetector, which then obtains the corresponding second spot image. When the motor drives the lens to move in the Y-axis direction, the position of the laser illumination point on the lens changes, causing a slight change in the direction of the reflected light. This results in a significant shift in the spot position in the second spot image received by the second photodetector. The second photodetector calculates the centroid position of the spot in real time using its internal processor (e.g., by weighted averaging of pixel gray values) to obtain the second pixel coordinate change value corresponding to the spot. Based on a pre-set scaling factor, the second pixel coordinate change value is converted into the actual Y-axis displacement value.

[0076] The following is combined with Figure 2 This paper provides a detailed explanation of the OIS circle drawing accuracy test for a motor under ideal conditions.

[0077] like Figure 2 As shown in Figure (1), under ideal conditions, the motor 200 does not have a tilting problem. The first laser displacement sensor measures the displacement of the motor 200 in the X-axis direction through the first laser, and the second laser displacement sensor measures the displacement of the motor 200 in the Y-axis direction through the second laser. The displacement of the motor 200 in the X-axis direction and the displacement in the Y-axis direction under ideal conditions will be explained below with reference to the attached figures.

[0078] like Figure 2As shown in (2), if the motor 200 does not have a position tilt problem under ideal conditions, when the test system drives the motor 200 to move along the X-axis direction by the first test displacement value (that is, from the first position to the second position, the displacement value in the X-axis direction between the first position and the second position is the first test displacement value), the actual moving direction of the motor 200 is the X-axis direction, and only the displacement in the X-axis direction is generated. There is no displacement in the Y-axis direction. The first laser displacement sensor obtains the actual X-axis displacement value as the first test displacement value through the first laser detection.

[0079] like Figure 2 As shown in (3), if the motor 200 does not have a position tilt problem under ideal conditions, when the test system drives the motor 200 to move along the Y-axis direction to move the second test displacement value (that is, from the first position to the second position, the displacement value in the Y-axis direction between the first position and the second position is the second test displacement value), the actual moving direction of the motor 200 is the Y-axis direction, and only the displacement in the Y-axis direction is generated. There is no displacement in the X-axis direction. The second laser displacement sensor obtains the actual Y-axis displacement value as the second test displacement value through the second laser detection.

[0080] However, when using the above dual-laser testing method, if the motor 200 has a position tilt problem (such as the motor placement position tilted or the motor installation tilted), the displacement values ​​measured by the laser displacement sensors in the two orthogonal directions will be coupled to each other. That is, the movement in one direction will generate a displacement component in the measurement result in the other direction, i.e., crosstalk.

[0081] The following is combined with Figure 3 This document provides a detailed explanation of the OIS circle drawing accuracy test for a motor in an inclined position.

[0082] like Figure 3 As shown in Figure (1), if the motor 300 has a tilted position, the first laser displacement sensor measures the displacement of the motor 300 in the X-axis direction using the first laser, and the second laser displacement sensor measures the displacement of the motor 300 in the Y-axis direction using the second laser. The displacements in the X-axis and Y-axis directions of the motor 300 in a tilted position will be explained below with reference to the attached figures.

[0083] like Figure 3 As shown in (2), if the motor has a position tilt problem, when the test system drives the motor to move the first test displacement value along the X-axis (that is, from the third position to the fourth position, the displacement value in the X-axis direction between the third position and the fourth position is the first test displacement value), the actual movement direction of the motor will deviate from the X-axis, and a second crosstalk component (crosstalk on the Y-axis) will be generated in the Y-axis direction.

[0084] like Figure 3As shown in (2), if the motor has a position tilt problem, when the test system drives the motor to move along the Y-axis direction to move the second test displacement value (that is, from the third position to the fourth position, the displacement value in the Y-axis direction between the third position and the fourth position is the second test displacement value), the actual movement direction of the motor will deviate from the Y-axis, and the first crosstalk component (crosstalk on the X-axis) will be generated in the X-axis direction.

[0085] In summary, the displacement values ​​in the two directions will affect each other (crosstalk) due to the motor's tilt position, which will affect the motor's OIS test results, and thus affect the image stabilization effect, resulting in low image quality.

[0086] To overcome the above technical problems, this application provides a motor testing method, electronic device, and storage medium. In this method, a first reference axis is determined based on a fixed component in the motor under test, and / or a second reference axis is determined based on a movable component in the motor under test; a first angle is determined based on the first reference axis and a target reference axis, a second angle is determined based on the second reference axis and the target reference axis, and the crosstalk value caused by the tilted placement of the motor under test is processed to obtain the corresponding test data for the motor under test. This reduces crosstalk caused by the tilted placement of the motor under test, improves the testing accuracy of the motor under test, and is compatible with OIS motors with ultra-large strokes.

[0087] Based on this, this application provides a motor testing method. This method can be applied to electronic devices with a camera function. These electronic devices can be mobile phones, smart screens, tablets, wearable devices, televisions, in-vehicle electronic devices, augmented reality (AR) / virtual reality (VR) devices, laptops, ultra-mobile personal computers (UMPCs), netbooks, personal digital assistants (PDAs), projectors, etc., or other devices or apparatuses capable of scene recognition. This application does not impose any limitations on the specific type of electronic device.

[0088] Before describing the technical solutions of the embodiments of this application, the electronic devices of the embodiments of this application will first be described in conjunction with the accompanying drawings. Figure 4 This is a schematic diagram of the structure of another electronic device 100 provided in an embodiment of this application. It should be understood that... Figure 4 The electronic device 100 shown is merely an example of an electronic device, and the electronic device 100 may have more or fewer components than those shown in the figure, may combine two or more components, or may have different component configurations. Figure 4The various components shown can be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and / or application-specific integrated circuits.

[0089] Electronic device 100 may include: a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, antenna 1, antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone jack 170D, a sensor module 180, buttons 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include: a pressure sensor, a gyroscope sensor, a barometric pressure sensor, a magnetic sensor, an accelerometer, a distance sensor, a proximity sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, a bone conduction sensor, etc.

[0090] Processor 110 may include one or more processing units, such as: application processor (AP), modem processor, graphics processing unit (GPU), image signal processor (ISP), controller, memory, video codec, digital signal processor (DSP), baseband processor, and / or neural network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.

[0091] The controller can be the nerve center and command center of the electronic device 100. The controller can generate operation control signals according to the instruction opcode and timing signals to complete the control of fetching and executing instructions.

[0092] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has just used or that are used repeatedly. If the processor 110 needs to use the instruction or data again, it can retrieve it directly from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

[0093] The charging management module 140 receives charging input from the charger. The charger can be a wireless charger or a wired charger. Figure 4 As shown, in some wired charging embodiments, the charging management module 140 can receive charging input from the wired charger via the USB interface 130. In some wireless charging embodiments, the charging management module 140 can receive wireless charging input via the wireless charging coil of the electronic device 100. While charging the battery 142, the charging management module 140 can also supply power to the electronic device via the power management module 141.

[0094] The power management module 141 connects the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, providing power to the processor 110, internal memory 121, external memory, display screen 194, camera 193, and wireless communication module 160, etc. The power management module 141 can also monitor parameters such as battery capacity, battery cycle count, and battery health status (leakage current, impedance). In some other embodiments, the power management module 141 may also be located within the processor 110. In other embodiments, the power management module 141 and the charging management module 140 may be located in the same device.

[0095] The wireless communication function of electronic device 100 can be realized through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor and baseband processor, etc.

[0096] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover one or more communication frequency bands. Different antennas can also be multiplexed to improve antenna utilization. For example, antenna 1 can be multiplexed as a diversity antenna for a wireless local area network. In some other embodiments, the antennas can be used in conjunction with tuning switches.

[0097] The mobile communication module 150 can provide solutions for wireless communication, including 2G / 3G / 4G / 5G, applied to the electronic device 100. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves via antenna 1, and perform filtering, amplification, and other processing on the received electromagnetic waves before transmitting them to a modem processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves for radiation via antenna 1. In some embodiments, at least some functional modules of the mobile communication module 150 may be housed in the processor 110. In some embodiments, at least some functional modules of the mobile communication module 150 and at least some modules of the processor 110 may be housed in the same device.

[0098] The modem processor may include a modulator and a demodulator. The modulator modulates the low-frequency baseband signal to be transmitted into a mid-to-high frequency signal. The demodulator demodulates the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After processing by the baseband processor, the low-frequency baseband signal is transmitted to the application processor. The application processor outputs sound signals through audio devices (not limited to speaker 170A, receiver 170B, etc.) or displays images or videos through the display screen 194. In some embodiments, the modem processor may be a separate device. In other embodiments, the modem processor may be independent of the processor 110 and may be housed in the same device as the mobile communication module 150 or other functional modules.

[0099] The wireless communication module 160 can provide solutions for wireless communication applications on the electronic device 100, including wireless local area networks (WLANs) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared (IR) technologies. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via antenna 2, performs frequency modulation and filtering of the electromagnetic wave signals, and sends the processed signal to processor 110. The wireless communication module 160 can also receive signals to be transmitted from processor 110, perform frequency modulation and amplification, and convert them into electromagnetic waves for radiation via antenna 2.

[0100] In some embodiments, antenna 1 of electronic device 100 is coupled to mobile communication module 150, and antenna 2 is coupled to wireless communication module 160, so that electronic device 100 can communicate with networks and other devices through wireless communication technology.

[0101] Electronic device 100 implements display functions through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor that connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations and for graphics rendering. Processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information.

[0102] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. In some embodiments, the electronic device 100 may include one or N display screens 194, where N is a positive integer greater than 1.

[0103] Electronic device 100 can perform shooting functions through ISP, camera 193, video codec, GPU, display 194 and application processor.

[0104] The ISP (Image Signal Processor) is used to process data fed back from the camera 193. For example, when taking a picture, the shutter is opened, and light is transmitted through the lens to the camera's photosensitive element. The light signal is converted into an electrical signal, and the camera's photosensitive element transmits the electrical signal to the ISP for processing, transforming it into an image visible to the naked eye. The ISP can also perform algorithmic optimization of image noise, brightness, and skin tone. The ISP can also optimize parameters such as exposure and color temperature of the shooting scene. In some embodiments, the ISP can be set in the camera 193.

[0105] Camera 193 is used to capture still images or videos. An object is projected onto a photosensitive element by generating an optical image through the lens. The photosensitive element can be a charge-coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, which is then passed to an ISP for conversion into a digital image signal. The ISP outputs the digital image signal to a DSP for processing. The DSP converts the digital image signal into image signals in standard RGB, YUV, or other formats. In some embodiments, the electronic device 100 may include one or N cameras 193, where N is a positive integer greater than 1.

[0106] Digital signal processors (DSPs) are used to process digital signals. Besides digital image signals, they can also process other digital signals. For example, when electronic device 100 is in frequency selection mode, the DSP is used to perform Fourier transforms on the frequency energy, etc.

[0107] Video codecs are used to compress or decompress digital video. Electronic device 100 may support one or more video codecs. Thus, electronic device 100 can play or record videos in various encoding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.

[0108] The external storage interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external storage interface 120 to perform data storage functions. For example, music, video, and other files can be saved on the external memory card.

[0109] Internal memory 121 can be used to store computer executable program code, which includes instructions. Processor 110 executes various functional applications and data processing of electronic device 100 by running the instructions stored in internal memory 121. Internal memory 121 may include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback, image playback, etc.), etc. The data storage area may store data created during the use of electronic device 100 (such as audio data, phonebook, etc.). Furthermore, internal memory 121 may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc.

[0110] Electronic device 100 can implement audio functions, such as music playback and recording, through audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, and application processor.

[0111] The audio module 170 is used to convert digital audio information into analog audio signals for output, and also to convert analog audio input into digital audio signals. The audio module 170 can also be used for encoding and decoding audio signals. In some embodiments, the audio module 170 may be located in the processor 110, or some functional modules of the audio module 170 may be located in the processor 110.

[0112] A pressure sensor is used to sense pressure signals and convert them into electrical signals. In some embodiments, the pressure sensor may be located on the display screen 194. There are many types of pressure sensors, such as resistive pressure sensors, inductive pressure sensors, and capacitive pressure sensors. A capacitive pressure sensor may include at least two parallel plates with conductive material. When force is applied to the pressure sensor, the capacitance between the electrodes changes. The electronic device 100 determines the pressure intensity based on the change in capacitance. When a touch operation is applied to the display screen 194, the electronic device 100 detects the intensity of the touch operation based on the pressure sensor. The electronic device 100 may also calculate the touch position based on the detection signal from the pressure sensor. In some embodiments, touch operations applied to the same touch position but with different touch operation intensities may correspond to different operation commands. For example, when a touch operation with an intensity less than a first pressure threshold is applied to the SMS application icon, a command to view an SMS message is executed. When a touch operation with an intensity greater than or equal to the first pressure threshold is applied to the SMS application icon, a command to create a new SMS message is executed.

[0113] A gyroscope sensor can be used to determine the motion attitude of an electronic device 100. In some embodiments, the gyroscope sensor can determine the angular velocity of the electronic device 100 around three axes (i.e., the X, Y, and Z axes). The gyroscope sensor can be used for image stabilization. For example, when the shutter is pressed, the gyroscope sensor detects the angle of the electronic device 100's movement, calculates the distance the motor needs to compensate based on the angle, and causes the lens to counteract the movement of the electronic device 100, thus achieving image stabilization. The gyroscope sensor can also be used in navigation and motion-sensing gaming scenarios.

[0114] The software system of electronic device 100 can adopt a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture. This application embodiment uses the layered architecture Android system as an example to exemplify the software structure of electronic device 100.

[0115] Figure 5 This is a software structure block diagram of the electronic device 100 according to an embodiment of this application.

[0116] The layered architecture of the electronic device 100 divides the software into several layers, each with a clear role and division of labor. Layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom: the application layer, the application framework layer, the Android Runtime and system libraries, and the kernel layer.

[0117] The application layer can include a series of application packages.

[0118] like Figure 5 As shown, the application package can include applications such as camera, gallery, WLAN, and Bluetooth. The application package can also include applications such as calling, calendar, maps, music, and SMS.

[0119] The application framework layer provides application programming interfaces (APIs) and a programming framework for applications in the application layer. The application framework layer includes some predefined functions.

[0120] like Figure 5 As shown, the application framework layer may include a window manager, content provider, view system, phone manager, resource manager, notification manager, etc.

[0121] The window manager is used to manage windowed applications. It can obtain the screen size, determine if a status bar is present, lock the screen, allow screen touch, drag the screen, and capture the screen, among other things.

[0122] Content providers store and retrieve data, making that data accessible to applications. This data may include videos, images, audio, made and received phone calls, browsing history and bookmarks, phone books, etc.

[0123] A view system includes visual controls, such as controls for displaying text and controls for displaying images. View systems can be used to build applications. A display interface can consist of one or more views. For example, a display interface including a text notification icon could include views for displaying text and views for displaying images.

[0124] The phone manager is used to provide communication functions for electronic device 100. For example, it manages call status (including connection, hang-up, etc.).

[0125] The file explorer provides applications with various resources, such as localized strings, icons, images, layout files, video files, and more.

[0126] The notification manager allows applications to display notifications in the status bar. These notifications can be used to deliver informational messages and can disappear automatically after a short pause, requiring no user interaction. For example, the notification manager can be used to notify users of completed downloads or message alerts. The notification manager can also display notifications as icons or scrolling text in the top status bar, such as notifications from background applications, or as dialog boxes on the screen. Examples include displaying text messages in the status bar, emitting sounds, vibrating electronic devices, and flashing indicator lights.

[0127] The Android Runtime consists of core libraries and a virtual machine. The Android Runtime is responsible for the scheduling and management of the Android system.

[0128] The core library consists of two parts: one part is the functionalities that need to be called by the Java language, and the other part is the Android core library.

[0129] The application layer and application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and application framework layer as binary files. The virtual machine is used to perform functions such as object lifecycle management, stack management, thread management, security and exception management, and garbage collection.

[0130] System libraries can include multiple functional modules. For example: surface manager, media libraries, 3D graphics processing libraries (e.g., OpenGL ES), 2D graphics engines (e.g., SGL), etc.

[0131] The Surface Manager is used to manage the display subsystem and provides the blending of 2D and 3D layers for multiple applications.

[0132] The media library supports playback and recording of various common audio and video formats, as well as still image files. It supports multiple audio and video encoding formats, such as MPEG4, H.264, MP3, AAC, AMR, JPG, and PNG.

[0133] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.

[0134] A 2D graphics engine is a graphics engine for 2D drawing.

[0135] The kernel layer is the layer between hardware and software. It includes at least display drivers, audio drivers, Wi-Fi drivers, and sensor drivers. The hardware includes at least a processor, display screen, Wi-Fi module, and sensors.

[0136] Understandable, Figure 5 The layers in the illustrated software structure and the components contained in each layer do not constitute a specific limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may include more or fewer layers than illustrated, and each layer may include more or fewer components; this application does not impose any limitations.

[0137] It is understood that, in order to implement the motor testing method in the embodiments of this application, the electronic device includes hardware and / or software modules that perform various functions. Based on the algorithm steps of the examples described in the embodiments disclosed herein, this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed by hardware or by computer software driving hardware 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 in conjunction with the embodiments, but such implementation should not be considered beyond the scope of this application.

[0138] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be implemented independently or in combination with each other. The same or similar concepts or processes may not be described again in some embodiments.

[0139] The following is combined with Figure 6 The motor testing device corresponding to the motor testing method provided in the embodiments of this application will be explained in detail.

[0140] The motor 601 to be tested includes, but is not limited to, the following structures: The fixing component (stator) includes a magnet and a housing to provide a constant magnetic field. The fixing component is fixed to the back cover of the electronic device. The movable component (mover) includes a coil and a lens carrier. The coil is placed in a magnetic field and, when energized, is driven by the Lorentz force to move the lens relative to the fixed component in a preset direction through the lens carrier, so as to achieve focusing or image stabilization. The elastic support frame connects the fixed component and the movable component, providing the movable component with elastic restoring force and radial support in a preset direction, and restricting the displacement of the non-motion degrees of freedom of the movable component; A position sensor, fixed to a fixed or movable component, is used to detect the displacement of the movable component relative to the fixed component in real time.

[0141] Motor testing equipment includes, but is not limited to, at least one of the following structures: The imaging device 602 is used to calibrate the laser path to determine the target reference axis, and to identify the first reference axis corresponding to the fixed component and the second reference axis corresponding to the movable component; the imaging device 602 can be positioned above the object to be tested; The laser device 603 is used to emit a first laser and a second laser toward the object to be tested and obtain measurement values; The adjustment device 604 is used to adjust the positions of the first laser displacement sensor, the second laser displacement sensor, the calibration fixture, and the object to be tested. The processor is used to determine a first angle based on the first reference axis and the target reference axis, and to determine a second angle based on the second reference axis and the target reference axis; to determine the actual moving distance based on the angle values ​​and the measurement values ​​of the laser displacement sensor; and to reduce crosstalk caused by the tilted placement of the motor.

[0142] For example, the imaging device 602 includes at least one of the following structures: The imaging device includes an imaging lens, a laser path calibration mechanism to determine the target reference axis, and a mechanism to identify the first reference axis corresponding to the fixed component and the second reference axis corresponding to the movable component. Light source: Used to provide basic illumination, ensure proper exposure, and improve the signal-to-noise ratio of the image.

[0143] For example, the laser device 603 includes at least one of the following structures: First laser displacement sensor: used to emit a first laser beam toward the object under test and obtain a measurement value; Second laser displacement sensor: used to emit a second laser towards the object under test and obtain the measurement value.

[0144] For example, the adjustment device 604 includes at least one of the following structures: First slide: Used to support the first laser displacement sensor. The first slide can move linearly and rotate, thereby adjusting the position of the first laser displacement sensor. Second slide: Used to support the second laser displacement sensor. The second slide can move linearly and rotate, thereby adjusting the position of the second laser displacement sensor. Calibration fixture: Used to adjust and position the object to be tested; Displacement stage: used to move and position the object to be tested, calibration fixture, etc.; the resolution of the displacement stage can be 0.01mm, 0.001mm, 0.1μm, etc., and there is no specific limitation for comparison.

[0145] The following is combined with Figure 7 The motor testing method provided in the embodiments of this application will be explained in detail.

[0146] S701, calibrate the positions of the first laser displacement sensor and the second laser displacement sensor to ensure that there is no position crosstalk when the object under test moves.

[0147] For example, the object to be tested (such as a standard block) is placed on the displacement stage, or the object to be tested (such as a standard block or a motor to be tested) is placed on the displacement stage using a calibration fixture or a magnetic base. The initial measurement values ​​of the first laser displacement sensor and the second laser displacement sensor are determined. The object to be tested is moved along the X-axis and Y-axis by adjusting the displacement stage. If it is determined that there is position crosstalk when the object to be tested moves based on the measurement values ​​obtained by the first laser displacement sensor and the second laser displacement sensor, the positions of the first laser displacement sensor and the second laser displacement sensor are adjusted until there is no position crosstalk when the object to be tested moves.

[0148] For example, the following description uses the object to be tested as a standard block; the standard block can be a high-precision right-angled cube, and the first measurement face and the second measurement face are adjacent measurement faces.

[0149] For example, determining the initial measurement values ​​of the first laser displacement sensor and the second laser displacement sensor includes the following method: placing a standard block on a displacement stage, adjusting a first slide to direct the first laser beam from the first laser displacement sensor towards the center of the first measurement surface of the standard block, and adjusting a second slide to direct the second laser beam from the second laser displacement sensor towards the center of the second measurement surface of the standard block. When the above conditions are met, the measurement values ​​of the first and second laser displacement sensors are the initial measurement values ​​of the laser displacement sensors; that is, the initial measurement value of the first laser displacement sensor is a first value, and the initial measurement value of the second laser displacement sensor is a second value.

[0150] For example, the displacement stage can display the displacement of the object under test through a built-in digital reading device. Under the condition that the above conditions are met, the measurement value corresponding to the digital reading device of the displacement stage is cleared to zero, the initial position of the object under test is set as the origin of the coordinate system, and the displacement stage reading is the displacement value relative to the origin of the coordinate system.

[0151] Specifically, the method of adjusting the first laser displacement sensor via the first slide and the second laser displacement sensor via the second slide includes: the first laser displacement sensor is mounted on the first slide that can be translated and rotated, and the second laser displacement sensor is mounted on the second slide that can be translated and rotated; both the first and second slides can move linearly in the X and Y axes, and the first and second slides can also rotate around the Z axis to adjust the positions of the first and second laser displacement sensors so that the emitted laser is perpendicular (or at a specific angle) to the surface of the object to be tested.

[0152] For example, a method for determining that there is crosstalk between the X-axis and the Y-axis in the motion of a standard block includes: adjusting the displacement stage to move the standard block along the X-axis by a first displacement value, and measuring the value of the second laser displacement sensor as a fourth value; the difference between the second value and the fourth value is a second crosstalk measurement value; if the second crosstalk measurement value is greater than or equal to a preset threshold, it indicates that there is crosstalk between the X-axis and the Y-axis, that is, the second laser is not perpendicular to the second measurement surface.

[0153] For example, a method for eliminating crosstalk between the X-axis and the Y-axis during the movement of a standard block includes: adjusting the position of a second laser displacement sensor via a second slide when crosstalk exists between the X-axis and the Y-axis during the movement of the standard block; repeating the above steps; if the remeasured value of the second crosstalk decreases, it indicates that the adjustment direction corresponding to the second laser displacement sensor is correct, and the second laser displacement sensor is finely adjusted in the same direction until the second crosstalk measurement value is less than a preset threshold; if the remeasured value of the second crosstalk increases, it indicates that the adjustment direction corresponding to the second laser displacement sensor is incorrect, and the second laser displacement sensor is finely adjusted in the opposite direction until the second crosstalk measurement value is less than a preset threshold.

[0154] For example, a method for determining that there is crosstalk between the Y-axis and the X-axis in the motion of a standard block includes: adjusting a displacement stage to move the standard block along the Y-axis by a second displacement value, and measuring the value of the first laser displacement sensor by a third value; the difference between the first value and the third value is a first crosstalk measurement value; if the first crosstalk measurement value is greater than or equal to a preset threshold, it indicates that there is crosstalk between the Y-axis and the X-axis, that is, the first laser is not perpendicular to the first measurement surface.

[0155] For example, a method for eliminating crosstalk between the Y-axis and the X-axis during the movement of a standard block includes: adjusting the position of a first laser displacement sensor via a first slide when crosstalk between the Y-axis and the X-axis exists during the movement of the standard block; repeating the above steps; if the remeasured first crosstalk value decreases, it indicates that the adjustment direction corresponding to the first laser displacement sensor is correct, and the first laser displacement sensor is finely adjusted in the same direction until the first crosstalk value is less than a preset threshold; if the remeasured first crosstalk value increases, it indicates that the adjustment direction corresponding to the first laser displacement sensor is incorrect, and the first laser displacement sensor is finely adjusted in the opposite direction until the first crosstalk value is less than a preset threshold.

[0156] S702, the imaging device acquires laser images corresponding to the first laser (the laser emitted by the first laser displacement sensor) and the second laser (the laser emitted by the second laser displacement sensor), and determines the position of the reference point (i.e., the coordinates of the reference point) and the target reference axis based on the laser images.

[0157] Specifically, the imaging device acquires a laser image, analyzes the laser image to obtain the first line equation parameters (e.g., slope and intercept, or general form coefficients) of the first laser in the image coordinate system and the second line equation parameters (e.g., slope and intercept, or general form coefficients) of the second laser in the image coordinate system. Based on the first line equation parameters and the second line equation parameters, the pixel coordinates of the intersection point of the first line and the second line in the image coordinate system are obtained. Based on the coordinate mapping relationship, the pixel coordinates of the intersection point are converted into reference point coordinates and stored.

[0158] For example, a first straight line of the first laser in the image coordinate system is determined, and a second straight line of the second laser in the image coordinate system is determined; based on the coordinate mapping relationship, the first straight line is converted into a first target reference axis; based on the coordinate mapping relationship, the second straight line is converted into a second target reference axis.

[0159] Optionally, when determining the actual Y-axis movement distance and actual X-axis movement distance of the motor under test based on the first angle and the second angle, the measured value of the first laser displacement sensor and the measured value of the second laser displacement sensor, the pixel coordinates of the intersection point, the second straight line, and the corresponding pixel coordinates of the second straight line can be uniformly converted into the corresponding coordinates in the standard coordinate system based on the coordinate mapping relationship, and the actual Y-axis movement distance and actual X-axis movement distance of the motor under test can be calculated.

[0160] Figure 8 A schematic diagram of a reference point provided in an exemplary embodiment of this application is shown, such as... Figure 8As shown, the laser image includes a standard block 801, a first laser, and a second laser. Based on the first straight line equation parameters of the first laser in the image coordinate system and the second straight line equation parameters of the second laser in the image coordinate system, the pixel coordinates of the intersection point of the first and second straight lines in the image coordinate system are obtained. Based on the coordinate mapping relationship, the pixel coordinates of the intersection point are converted into the coordinates of the reference point corresponding to the reference point, and the reference point coordinates are stored.

[0161] For example, the intersection point pixel coordinates are the pixel coordinates corresponding to the intersection point of the first line and the second line in the image coordinate system. The pixel coordinates are a two-dimensional coordinate system, and its coordinate values ​​directly correspond to the column and row of the image.

[0162] For example, analyzing a laser image to obtain the first linear equation parameters of the first laser in the image coordinate system and the second linear equation parameters of the second laser in the image coordinate system includes: the imaging device preprocesses the laser image to obtain a preprocessed laser image, extracts the target region from the preprocessed laser image to obtain a binarized laser image, and analyzes the binarized laser image to obtain the first linear equation parameters of the first laser in the image coordinate system and the second linear equation parameters of the second laser in the image coordinate system.

[0163] For example, the preprocessing method includes, but is not limited to, at least one of the following methods: Distortion Correction: Multiple images of the calibration board are captured by an imaging device at different positions and angles to obtain calibration board images. The calibration board contains known geometric features (such as checkerboard or dot array). In the acquired images, the pixel coordinates of feature points (such as corner points of checkerboard) on the calibration board are automatically or manually extracted. Using the extracted feature points and their known coordinates in the standard coordinate system, the intrinsic parameters and distortion coefficients of the imaging device are solved through a mathematical model (such as a pinhole model combined with a distortion model). The calculated distortion coefficients are used to correct the distortion of subsequently acquired images to obtain distortion-free pixel coordinates. For example, a standard coordinate system includes, but is not limited to, at least one of the following: world coordinate system: a global reference coordinate system in which the pose of all objects can be represented; view coordinate system: a coordinate system with the camera device as a reference, with the origin at the center of the camera device (or the viewpoint).

[0164] Grayscale conversion: A weighted average method can be used, which is based on the human eye's high sensitivity to green. The RGB three channels are weighted and summed according to coefficients to generate a single-channel grayscale image. This reduces the image dimensionality and the amount of subsequent processing calculations, while preserving the main brightness features of the image. Denoising: Gaussian filtering or median filtering can be used to remove noise interference, enhance the image signal-to-noise ratio, and prevent noise from being misjudged as target edges by subsequent algorithms; Enhance contrast: Histogram equalization, linear gray-level stretching, and other methods can be used to make the gray-level difference between the target and the background more significant. This helps to expand the gray-level distribution gap in the image and improve the accuracy of subsequent segmentation and edge detection.

[0165] For example, the target region extraction method includes, but is not limited to, at least one of the following methods: Threshold segmentation: Fixed threshold, adaptive threshold or local adaptive threshold can be used to automatically determine the segmentation threshold based on gray-scale statistical characteristics, and extract the bright pixel region in the image to obtain a binarized image; Edge detection: The Canny edge detection algorithm can be used to extract pixel-level edges through steps such as Gaussian smoothing, gradient calculation, non-maximum suppression and double threshold hysteresis connection. Alternatively, operators such as Sobel and Laplacian can be used to calculate gradient magnitude, which is used to extract the contour boundaries of objects in the image. Deep learning segmentation: Deep neural networks such as UNet, SegNet, and DeepLab can be used to classify each pixel, output pixel-level segmentation masks, and extract the precise mask regions of target objects in the image.

[0166] For example, the first linear equation parameters of the first laser in the image coordinate system are obtained by performing Hough linear transformation or least squares linear fitting based on edge detection on the first laser in the binarized laser image, and the second linear equation parameters of the second laser in the image coordinate system are obtained by performing Hough linear transformation or least squares linear fitting based on edge detection on the second laser in the binarized laser image.

[0167] For example, a calibration board image is acquired in advance, and the pixel coordinates of feature points (such as the corner points of a checkerboard) on the calibration board are extracted automatically or manually. Using the extracted feature points and their known coordinates in a standard coordinate system (such as the world coordinate system or the view coordinate system), the coordinate mapping relationship between the standard coordinates and the pixel coordinates is calculated.

[0168] Optionally, the imaging device captures multiple images of the moving standard block at different times, and determines the movement direction (X-axis direction, Y-axis direction) of the standard block based on the multiple standard block images, using the movement direction of the standard block as the target reference axis. The camera captures a first standard block image at a first time, and a second standard block image at a second time. The movement direction (X-axis direction, Y-axis direction) of the standard block is determined based on the coordinates of the first and second standard block images in the image coordinate system, and the movement direction of the standard block is used as the target reference axis.

[0169] It should be noted that the X-axis motion direction of the standard block is consistent with the first laser direction, and the Y-axis motion direction of the standard block is consistent with the second laser direction.

[0170] S703, the motor to be tested is placed at the reference point of the displacement stage, and the motor to be tested is identified to obtain the first reference axis and / or the second reference axis; specifically, the motor to be tested is placed at the reference point of the displacement stage, the imaging device acquires the motor image corresponding to the motor to be tested, and the motor image is processed to obtain the first reference axis and the second reference axis.

[0171] For example, the motor to be tested can be placed at the reference point of the displacement stage using a calibration fixture or a magnetic base.

[0172] For example, target region features are extracted from the motor image to obtain a first target binarized image corresponding to the first target region, and the center line of the first target binarized image is extracted to obtain a first reference axis; target region features are extracted from the motor image to obtain a second target binarized image corresponding to the second target region, and the center line of the second target binarized image is extracted to obtain a second reference axis.

[0173] Figure 9 A schematic diagram of a motor image provided in an exemplary embodiment of this application is shown, such as... Figure 9 As shown, the first target area includes, but is not limited to: the outer area 901 of the fixed component, the inner area 902 of the fixed component, etc.; the second target area includes, but is not limited to: the movable component area 903, the lens area 904, etc.

[0174] For example, methods for extracting centerlines include, but are not limited to: PCA principal component analysis, Hough line transform, least squares line fitting based on edge detection, skeletonization, etc.

[0175] Figure 10 This is a schematic diagram of a first reference axis corresponding to the outer region of a fixed component, as shown in an exemplary embodiment of this application. Figure 10 As shown, the first target region is the external region of the fixed component, and the first target binarized image 1001 is the binarized image corresponding to the external region of the fixed component. The first long side in the first target binarized image 1001 is subjected to Hough line transform or least squares line fitting based on edge detection to obtain the first long side equation parameters in the image coordinate system. The second long side in the first target binarized image 1001 is subjected to Hough line transform or least squares line fitting based on edge detection to obtain the second long side equation parameters in the image coordinate system. The first midpoint coordinates corresponding to the first midpoint are obtained according to the first long side equation parameters, and the second midpoint coordinates corresponding to the second midpoint are obtained according to the second long side equation parameters. The line connecting the first center coordinates and the second center coordinates is the first reference axis.

[0176] For example, the center coordinates of the first pixel are obtained according to the parameters of the first long side equation, and the center coordinates of the first pixel are mapped to the first center coordinates based on the coordinate mapping relationship.

[0177] For example, the center coordinates of the second pixel are obtained according to the parameters of the second long side equation, and the center coordinates of the second pixel are mapped to the second center coordinates based on the coordinate mapping relationship.

[0178] Figure 11 This is a schematic diagram of a first reference axis corresponding to an internal region of a fixed component, as shown in an exemplary embodiment of this application. Figure 11 As shown, the first target region is the internal region of the fixed component, and the first target binarized image 1101 is the binarized image corresponding to the internal region of the fixed component. Principal component analysis is performed on the first target binarized image 1101 to obtain the principal axis passing through the centroid. Based on the coordinate mapping relationship, the principal axis is mapped as the first reference axis.

[0179] Figure 12 This is a schematic diagram of a second reference axis corresponding to a movable component area provided in an exemplary embodiment of this application, such as... Figure 12 As shown, the second target region is the movable component region, and the second target binarized image 1201 is the binarized image corresponding to the movable component region. The second reference axis is obtained by performing Hough line transform or least squares line fitting based on edge detection on the second target binarized image 1201. For details, please refer to... Figure 9 The embodiments shown are not described in detail here.

[0180] Figure 13 This is a schematic diagram of a second reference axis corresponding to a lens area provided in an exemplary embodiment of this application, such as... Figure 13 As shown, the second target region is the lens region, and the second target binarized image 1301 is the binarized image corresponding to the lens region. The second reference axis is obtained by performing Hough line transform or least squares line fitting based on edge detection on the second target binarized image 1301. For details, please refer to... Figure 9 The embodiments shown are not described in detail here.

[0181] Optionally, before extracting the target region features from the motor image to obtain the target binarized image corresponding to the target region, the motor image can be preprocessed. The preprocessing methods include, but are not limited to, distortion correction, grayscale conversion, noise reduction, and contrast enhancement. For details, please refer to the above embodiments, which will not be elaborated here.

[0182] S704, determine a first angle based on the target reference axis and the first reference axis, and / or determine a second angle based on the target reference axis and the second reference axis.

[0183] Optionally, the first angle is the angle between the target reference axis and the first reference axis, and the second angle is the angle between the target reference axis and the second reference axis. Optionally, the first angle is determined based on the angle between the target reference axis and the first reference axis and a first preset angle; the second angle is determined based on the angle between the target reference axis and the second reference axis and a second preset angle; the first preset angle and the second preset angle can be set manually or automatically.

[0184] S705, determine the actual Y-axis movement distance and actual X-axis movement distance of the motor under test based on at least one of the first angle, the second angle, the measured value of the first laser displacement sensor, and the measured value of the second laser displacement sensor.

[0185] It should be noted that the process of determining the reference axis, the first angle, and the second angle, and calculating the actual Y-axis movement distance and the actual X-axis movement distance of the motor under test must be performed in the same standard coordinate system.

[0186] Method 1: First, adjust the position of the motor under test to eliminate crosstalk caused by the tilt of the fixed component. Then, calculate the crosstalk caused by the tilt of the movable component and process the measurement value of the laser displacement sensor. For details, refer to S7051a to S7051c. In S7051a, if the first angle is not 0 degrees, adjust the position of the motor under test until the first angle is 0 degrees.

[0187] Optionally, the position of the motor under test can be adjusted until the first angle is 0 degrees using a calibration fixture or magnetic base.

[0188] Optionally, a drive signal can be sent to the motor to adjust the position of the motor under test until the first angle is 0 degrees.

[0189] S7051b, when the first angle is 0 degrees, after re-determining the second reference axis and the second angle corresponding to the motor under test after adjusting the position, drives the motor under test to move, obtains the first measurement value through the first laser displacement sensor, and obtains the second measurement value through the second laser displacement sensor.

[0190] For example, the test system sends a drive signal to the motor under test to drive it to move along a preset trajectory for OIS accuracy testing; such as Figure 14As shown, the preset trajectory is a circular trajectory. The testing system determines multiple acquisition points on the preset circular trajectory and determines the coordinates of each acquisition point. The coordinates of each acquisition point are converted into a drive signal and sent to the motor under test to drive the motor under test to move. The first measurement value is obtained through the first laser displacement sensor. The first measurement value is the difference between the measurement values ​​of the motor under test in the X-axis direction corresponding to two adjacent acquisition points. The second measurement value is obtained through the second laser displacement sensor. The second measurement value is the difference between the measurement values ​​of the motor under test in the Y-axis direction corresponding to two adjacent acquisition points.

[0191] It is understood that the preset circular trajectory may include more or fewer collection points than shown in the figure, and this application does not impose any limitations.

[0192] For example, the testing system sends a drive signal corresponding to the coordinates of the first acquisition point to the motor under test. After the motor under test moves, the measured value of the first laser displacement sensor is the fifth value x0, and the measured value of the second laser displacement sensor is the sixth value y0. The testing system then sends a drive signal corresponding to the coordinates of the second acquisition point (the next acquisition point after the first acquisition point) to the motor under test. After the motor under test moves, the measured value of the first laser displacement sensor is the seventh value x1, and the measured value of the second laser displacement sensor is the eighth value y1. The first measured value is the difference between the fifth and seventh values, i.e., x1-x0; the second measured value is the difference between the sixth and eighth values, i.e., y1-y0.

[0193] S7051c determines the actual Y-axis movement distance and actual X-axis movement distance of the motor under test based on the second angle, first measurement value, and second measurement value corresponding to the motor under test after the position is readjusted.

[0194] That is, in Method 1, the motor under test is placed at the reference point of the displacement stage, and the first reference axis is obtained by identifying the motor under test. A first angle is determined based on the target reference axis and the first reference axis. If the first angle is not 0 degrees, the position of the motor under test is adjusted until the first angle is 0 degrees. The second reference axis and second angle corresponding to the motor under test after the adjustment are then determined. The actual Y-axis movement distance and actual X-axis movement distance of the motor under test are determined based on the second angle, the first measured value, and the second measured value corresponding to the motor under test after the adjustment. The following section combines... Figure 15 Method 1 will be illustrated with an example. Below, we define the first angle as the angle between the second target reference axis and the first reference axis, and the second angle as the angle between the second target reference axis and the second reference axis. Figure 15 Please provide an explanation, such as Figure 15 As shown in (1), the motor to be tested is placed at the reference point of the displacement stage. The first reference axis is obtained by identifying the motor to be tested. Based on the second target reference axis and the first reference axis, it is determined that the first angle θ1 is not 0 degrees. Figure 15 As shown in (2), adjust the position of the motor to be tested until the first angle is 0 degrees, that is, the first reference axis coincides with the second target reference axis. After re-determining the adjusted position, the second reference axis and the second angle θ2 corresponding to the motor to be tested are determined.

[0195] Understandable. Figure 15 The auxiliary lines shown are merely examples and are not intended to limit this application.

[0196] For example, based on the second angle θ2 corresponding to the motor under test after the repositioning and the first measured value x1-x0, the second crosstalk value in the X-axis direction to the Y-axis direction is calculated based on trigonometric function relationships. The second crosstalk value is (x1-x0)tanθ2. The actual Y-axis movement distance is calculated based on the second measured value and the second crosstalk value. Specifically, as shown... Figure 15 As shown in (2), when the second reference axis is deflected clockwise relative to the second target reference value, the movable component tilts to the right, and the motor under test moves in the positive X-axis direction, with an actual Y-axis movement distance of y1-y0+(x1-x0)tanθ2. When the motor under test moves in the negative X-axis direction, the actual Y-axis movement distance is y1-y0-(x1-x0)tanθ2. When the second reference axis is deflected counterclockwise relative to the second target reference value, the movable component tilts to the left, and the motor under test moves in the positive X-axis direction, with an actual Y-axis movement distance of y1-y0-(x1-x0)tanθ2. When the motor under test moves in the negative X-axis direction, the actual Y-axis movement distance is y1-y0+(x1-x0)tanθ2.

[0197] Optionally, when the second reference axis is deflected clockwise relative to the second target reference value, the movable component tilts to the right, and the motor under test moves in the positive X-axis direction, with an actual Y-axis movement distance of y1-y0+(x1-x0)tanθ2+c; the motor under test moves in the negative X-axis direction, with an actual Y-axis movement distance of y1-y0-(x1-x0)tanθ2+c. When the second reference axis is deflected counterclockwise relative to the second target reference value, the movable component tilts to the left, and the motor under test moves in the positive X-axis direction, with an actual Y-axis movement distance of y1-y0-(x1-x0)tanθ2+c; the motor under test moves in the negative X-axis direction, with an actual Y-axis movement distance of y1-y0+(x1-x0)tanθ2+c.

[0198] It should be noted that c is the preset crosstalk compensation value, which is a constant and can be set manually or automatically.

[0199] For example, based on the second angle θ2 corresponding to the motor under test after the repositioning and adjustment, and the second measured value y1-y0, the first crosstalk value in the Y-axis direction to the X-axis direction is calculated based on trigonometric function relationships. The first crosstalk value is (y1-y0)tanθ2. The actual Y-axis movement distance is calculated based on the first measured value and the first crosstalk value. Specifically, as shown... Figure 15 As shown in (2), when the second reference axis is deflected clockwise relative to the second target reference value, the movable component tilts to the right, and the motor under test moves in the positive Y-axis direction, with an actual X-axis movement distance of x1-x0+(y1-y0)tanθ2. When the motor under test moves in the negative Y-axis direction, the actual X-axis movement distance is x1-x0-(y1-y0)tanθ2. When the second reference axis is deflected counterclockwise relative to the second target reference value, the movable component tilts to the left, and the motor under test moves in the positive Y-axis direction, with an actual X-axis movement distance of x1-x0-(y1-y0)tanθ2. When the motor under test moves in the negative Y-axis direction, the actual X-axis movement distance is x1-x0+(y1-y0)tanθ2.

[0200] Optionally, when the second reference axis is deflected clockwise relative to the second target reference value, the movable component tilts to the right, and the motor under test moves in the positive Y-axis direction, with an actual X-axis movement distance of x1-x0+(y1-y0)tanθ2+c. The motor under test also moves in the negative Y-axis direction, with an actual X-axis movement distance of x1-x0-(y1-y0)tanθ2+c. When the second reference axis is deflected counterclockwise relative to the second target reference value, the movable component tilts to the left, and the motor under test moves in the positive Y-axis direction, with an actual X-axis movement distance of x1-x0-(y1-y0)tanθ2+c. The motor under test also moves in the negative Y-axis direction, with an actual X-axis movement distance of x1-x0+(y1-y0)tanθ2+c.

[0201] It's understandable that different target reference axes, first reference axes, and second reference axes result in different first and second angles, leading to different trigonometric relationships, etc. Figure 15 The embodiments shown are merely examples and are not intended to limit this application.

[0202] Method 2: Simultaneously calculate and compensate for crosstalk caused by the tilt of the fixed and movable components. In Method 2, the motor under test is placed at the reference point of the displacement stage. The motor under test is identified to obtain the first reference axis and the second reference axis. The first angle is determined based on the target reference axis and the first reference axis, and the second angle is determined based on the target reference axis and the second reference axis. The actual Y-axis movement distance and the actual X-axis movement distance of the motor under test are determined based on the first angle, the second angle, the first measurement value, and the second measurement value. For details, please refer to S7052a to S7052b.

[0203] It should be noted that the first reference axis, the second reference axis, the first angle, and the second angle in Method 2 are all determined before the motor under test moves, and there is no need to adjust the position of the motor under test.

[0204] S7052a, determine the target angle based on the first angle and the second angle.

[0205] For example, such as Figure 16 As shown in (1), when the directions of the first angle θ1 and the second angle θ2 are not consistent, the angle value of the target angle θ3 is the sum of the angle values ​​corresponding to the first angle θ1 and the second angle θ2.

[0206] For example, such as Figure 16 As shown in (2), when the first angle θ1 and the second angle θ2 are in the same direction, the angle value of the target angle θ3 is the difference between the angle values ​​corresponding to the first angle θ1 and the second angle θ2, such as θ3=θ2-θ1.

[0207] Understandable. Figure 16 The auxiliary lines shown are merely examples and are not intended to limit this application.

[0208] S7052b determines the actual Y-axis movement distance and actual X-axis movement distance of the motor under test based on the target angle, the first measurement value, and the second measurement value.

[0209] For example, based on the target angle θ3 and the first measured value x1-x0, and based on trigonometric relationships, the second crosstalk value in the X-axis direction relative to the Y-axis direction is calculated. The second crosstalk value is (x1-x0)tanθ3. The actual movement distance in the Y-axis direction is calculated based on the second measured value and the second crosstalk value. Specifically, when the second reference axis is deflected clockwise relative to the second target reference value, the movable component tilts to the right, and the motor under test moves in the positive X-axis direction. The actual movement distance in the Y-axis direction is y1-y0+(x1-x0)tanθ3. When the motor under test moves in the negative X-axis direction, the actual movement distance in the Y-axis direction is y1-y0-(x1-x0)tanθ3. When the second reference axis is deflected counterclockwise relative to the second target reference value, the movable component tilts to the left, and the motor under test moves in the positive X-axis direction. The actual movement distance in the Y-axis direction is y1-y0-(x1-x0)tanθ3. When the motor under test moves in the negative X-axis direction, the actual movement distance in the Y-axis direction is y1-y0+(x1-x0)tanθ3.

[0210] Optionally, when the second reference axis is deflected clockwise relative to the second target reference value, the movable component tilts to the right, and the motor under test moves in the positive X-axis direction, with an actual Y-axis movement distance of y1-y0+(x1-x0)tanθ3+c; the motor under test moves in the negative X-axis direction, with an actual Y-axis movement distance of y1-y0-(x1-x0)tanθ3+c. When the second reference axis is deflected counterclockwise relative to the second target reference value, the movable component tilts to the left, and the motor under test moves in the positive X-axis direction, with an actual Y-axis movement distance of y1-y0-(x1-x0)tanθ3+c; the motor under test moves in the negative X-axis direction, with an actual Y-axis movement distance of y1-y0+(x1-x0)tanθ3+c.

[0211] It should be noted that c is the preset crosstalk compensation value, which is a constant and can be set manually or automatically.

[0212] For example, based on the target angle θ3 and the second measured value y1-y0, the first crosstalk value of the Y-axis direction to the X-axis direction is calculated based on the trigonometric function relationship. The first crosstalk value is (y1-y0)tanθ3. The actual Y-axis direction movement distance is calculated based on the first measured value and the first crosstalk value. Specifically, when the second reference axis is deflected clockwise relative to the second target reference value, the movable component tilts to the right, and the motor under test moves in the positive Y-axis direction. The actual X-axis direction movement distance is x1-x0+(y1-y0)tanθ3. When the motor under test moves in the negative Y-axis direction, the actual X-axis direction movement distance is x1-x0-(y1-y0)tanθ3. When the second reference axis is deflected counterclockwise relative to the second target reference value, the movable component tilts to the left, and the motor under test moves in the positive Y-axis direction. The actual movement distance in the X-axis direction is x1-x0-(y1-y0)tanθ3. When the motor under test moves in the negative Y-axis direction, the actual movement distance in the X-axis direction is x1-x0+(y1-y0)tanθ3.

[0213] Optionally, when the second reference axis is deflected clockwise relative to the second target reference value, the movable component tilts to the right, and the motor under test moves in the positive Y-axis direction, with an actual X-axis movement distance of x1-x0+(y1-y0)tanθ3+c. The motor under test also moves in the negative Y-axis direction, with an actual X-axis movement distance of x1-x0-(y1-y0)tanθ3+c. Conversely, when the second reference axis is deflected counterclockwise relative to the second target reference value, the movable component tilts to the left, and the motor under test moves in the positive Y-axis direction, with an actual X-axis movement distance of x1-x0-(y1-y0)tanθ3+c. The motor under test also moves in the negative Y-axis direction, with an actual X-axis movement distance of x1-x0+(y1-y0)tanθ3+c.

[0214] It's understandable that different target reference axes, first reference axes, and second reference axes result in different first and second angles, leading to different trigonometric relationships, etc. Figure 15 The embodiments shown are merely examples and are not intended to limit this application.

[0215] For details, please refer to Figure 15 The specific steps for calculating the actual Y-axis movement distance and the actual X-axis movement distance of the motor under test after adjusting the position are not detailed here.

[0216] It is understood that different target reference axes, first reference axes, and second reference axes will result in different target angles and corresponding trigonometric function relationships. The above content is only an example and is not intended to limit this application.

[0217] The actual Y-axis movement distance and actual X-axis movement distance of the motor under test are used to eliminate crosstalk caused by the tilt of the motor placement and to better reflect the actual performance data of the motor. The radial deviation, roundness error and trajectory tracking phase lag of the actual Y-axis movement distance and actual X-axis movement distance from the preset circular trajectory are calculated. If the above data are within the preset threshold range, it indicates that the motor performance is qualified and has stable anti-shake capability.

[0218] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0219] Figure 17 A schematic block diagram illustrating an embodiment of the present application shows an apparatus 1700. The apparatus 1700 may include a processor 1701 and a transceiver / transceiver pin 1702, and optionally, a memory 1703.

[0220] The various components of device 1700 are coupled together via bus 1704, which includes a data bus, a power bus, a control bus, and a status signal bus. However, for clarity, all buses are referred to as bus 1704 in the figure.

[0221] Optionally, the memory 1703 can be used for the instructions in the foregoing method embodiments. The processor 1701 can be used to execute the instructions in the memory 1703, control the receive pin to receive signals, and control the transmit pin to transmit signals.

[0222] Device 1700 may be the call application or the chip of the call application in the above method embodiments.

[0223] All relevant content of each step involved in the above method embodiments can be referenced from the functional description of the corresponding functional module, and will not be repeated here.

[0224] This embodiment also provides a computer storage medium storing computer instructions. When the computer instructions are executed on a call application, the call application performs the aforementioned related method steps to implement the control method in the above embodiment.

[0225] This embodiment also provides a computer program product that, when run on a computer, causes the computer to perform the aforementioned related steps to implement the control method described in the above embodiment.

[0226] In addition, embodiments of this application also provide an apparatus, which may specifically be a chip, component or module. The apparatus may include a connected processor and a memory; wherein the memory is used to store computer execution instructions, and when the apparatus is running, the processor may execute the computer execution instructions stored in the memory to cause the chip to execute the control methods in the above-described method embodiments.

[0227] In this embodiment, the call application, computer storage medium, computer program product or chip are all used to execute the corresponding methods provided above. Therefore, the beneficial effects they can achieve can be referred to the beneficial effects in the corresponding methods provided above, and will not be repeated here.

[0228] Through the above description of the embodiments, those skilled in the art will understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0229] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another apparatus, or some features may be ignored or not executed. Furthermore, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0230] The units described as separate components may or may not be physically separate. A component shown as a unit can be one or more physical units; that is, it can be located in one place or distributed in multiple different locations. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0231] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0232] Any content in the various embodiments of this application, as well as any content in the same embodiment, can be freely combined. Any combination of the above content is within the scope of this application.

[0233] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solutions of the embodiments of this application, in essence, or the parts that contribute to the prior art, or all or part of the technical solutions, can be embodied in the form of a software product. This software product is stored in a storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0234] The steps of the methods or algorithms described in conjunction with the embodiments of this application can be implemented in hardware or by a processor executing software instructions. The software instructions can consist of corresponding software modules, which can be stored in random access memory (RAM), flash memory, read-only memory (ROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), registers, hard disks, portable hard disks, CD-ROMs, or any other form of storage medium well known in the art. An exemplary storage medium is coupled to a processor, enabling the processor to read information from and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and storage medium can reside in an ASIC. Additionally, the ASIC can reside in a network device. Alternatively, the processor and storage medium can exist as discrete components in the network device.

[0235] Those skilled in the art will recognize that, in one or more of the examples above, the functions described in the embodiments of this application can be implemented using hardware, software, firmware, or any combination thereof. Whether a function is implemented in hardware or by computer software driving hardware 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 in conjunction with the embodiments, but such implementation should not be considered beyond the scope of this application.

[0236] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.

Claims

1. A motor testing method, characterized in that, The method includes: At least one of a first reference axis and a second reference axis corresponding to the motor under test is determined. The first reference axis is determined based on the fixed component in the motor under test, and the second reference axis is determined based on the movable component in the motor under test. The target reference axis is determined based on the first laser emitted by the first laser displacement sensor and the second laser emitted by the second laser displacement sensor. A first angle is determined based on the first reference axis and the target reference axis, and a second angle is determined based on the second reference axis and the target reference axis. The motor under test is driven to move, and a first measurement value is obtained through a first laser displacement sensor, and a second measurement value is obtained through a second laser displacement sensor; the first measurement value is the difference between the readings of the first laser displacement sensor before and after the motor under test moves, and the second measurement value is the difference between the readings of the second laser displacement sensor before and after the motor under test moves. Test data corresponding to the motor under test is obtained based on at least one of the first angle, the second angle, the first measured value, and the second measured value.

2. The method according to claim 1, characterized in that, The step of obtaining the test data corresponding to the motor under test based on at least one of the first angle, the second angle, the first measured value, and the second measured value includes: Based on trigonometric relationships, a first crosstalk value is calculated according to at least one of the first angle, the second angle, and the second measured value. The first crosstalk value is the crosstalk to the direction corresponding to the first laser when the motor under test moves. The test data is obtained based on the first crosstalk value and the first measurement value.

3. The method according to claim 2, characterized in that, The process of driving the motor under test to move, acquiring a first measurement value through a first laser displacement sensor, acquiring a second measurement value through the same first laser displacement sensor, and calculating a first crosstalk value based on trigonometric relationships and at least one of the first angle, the second angle, and the second measurement value includes: If the value of the first angle is non-zero, adjust the position of the motor under test until the value of the first angle is zero, and redetermine the second reference axis and the second angle corresponding to the motor under test after the adjustment position. When the value of the first angle is zero, drive the motor under test to move, obtain the first measurement value through the first laser displacement sensor, and obtain the second measurement value through the second laser displacement sensor; The first crosstalk value is calculated based on trigonometric relationships, according to at least one of the second angle corresponding to the motor under test after the position is adjusted and the second measured value.

4. The method according to claim 2, characterized in that, The calculation of the first crosstalk value based on trigonometric relationships, according to at least one of the first angle, the second angle, and the second measured value, includes: Based on trigonometric relationships, the target angle is obtained from the first angle and the second angle. The first crosstalk value is calculated based on at least one of the target angle and the second measurement value.

5. The method according to claim 1, characterized in that, The step of obtaining the test data corresponding to the motor under test based on at least one of the first angle, the second angle, the first measured value, and the second measured value includes: Based on trigonometric relationships, a second crosstalk value is calculated according to at least one of the first angle, the second angle, and the first measured value. The second crosstalk value is the crosstalk to the direction corresponding to the second laser when the motor under test moves. The test data is obtained based on the second crosstalk value and the second measurement value.

6. The method according to claim 5, characterized in that, The process of driving the motor under test to move, acquiring a first measurement value through a first laser displacement sensor, acquiring a second measurement value through the same first laser displacement sensor, and calculating a first crosstalk value based on trigonometric relationships and at least one of the first angle, the second angle, and the second measurement value includes: If the value of the first angle is non-zero, adjust the position of the motor under test until the value of the first angle is zero, and redetermine the second reference axis and the second angle corresponding to the motor under test after the adjustment position. When the value of the first angle is zero, drive the motor under test to move, obtain the first measurement value through the first laser displacement sensor, and obtain the second measurement value through the second laser displacement sensor; The second crosstalk value is calculated based on trigonometric relationships, according to at least one of the second angle corresponding to the motor under test after position adjustment and the first measured value.

7. The method according to claim 5, characterized in that, The calculation of the first crosstalk value based on trigonometric relationships, according to at least one of the first angle, the second angle, and the second measured value, includes: Based on trigonometric relationships, the target angle is obtained from the first angle and the second angle. The second crosstalk value is calculated based on at least one of the target angle and the first measurement value.

8. The method according to claim 1, characterized in that, The determination of the first reference axis and the second reference axis corresponding to the motor to be tested includes: The first target region image is obtained by extracting the target region features from the target image corresponding to the motor to be tested. The first reference axis is obtained by extracting the center line of the image corresponding to the first target region; the first target region includes at least one of the following: the outer region of the fixed component and the inner region of the fixed component.

9. The method according to claim 1, characterized in that, The determination of the first reference axis and the second reference axis corresponding to the motor to be tested includes: The target region feature is extracted from the target image corresponding to the motor under test to obtain the image corresponding to the second target region. The center line of the image corresponding to the second target region is extracted to obtain the second reference axis; the second target region includes at least one of the following: a movable component region and a lens region.

10. The method according to claim 8 or 9, characterized in that, The target region feature extraction method includes at least one of the following methods: threshold segmentation method, edge detection method, and deep learning segmentation method.

11. The method according to claim 8 or 9, characterized in that, The centerline extraction method includes at least one of the following methods: principal component analysis, Hough line transform, least squares line fitting based on edge detection, and skeletonization.

12. The method according to claim 1, characterized in that, The target reference axis includes a first target reference axis and a second target reference axis; The step of determining the target reference axis based on the first laser emitted by the first laser displacement sensor and the second laser emitted by the second laser displacement sensor includes: Determine the first straight line of the first laser in the image coordinate system; Based on the coordinate mapping relationship, the first straight line is converted into the first target reference axis; Determine the second straight line of the second laser in the image coordinate system; Based on the coordinate mapping relationship, the second straight line is converted into the second target reference axis.

13. The method according to claim 1, characterized in that, Before determining the target reference axis based on the first laser emitted by the first laser displacement sensor and the second laser emitted by the second laser displacement sensor, the method further includes: The test object is driven to move a target distance, and a third measurement value is obtained through a first laser displacement sensor, and a fourth measurement value is obtained through the first laser displacement sensor; the third measurement value is the difference between the readings of the first laser displacement sensor before and after the test motor moves, and the fourth measurement value is the difference between the readings of the second laser displacement sensor before and after the test motor moves. Based on at least one of the third and fourth measurement values, the positions of the first laser displacement sensor and the second laser displacement sensor are adjusted so that no position crosstalk occurs when the object under test moves.

14. The method according to claim 13, characterized in that, The step of adjusting the positions of the first laser displacement sensor and the second laser displacement sensor according to at least one of the third and fourth measurement values ​​to prevent position crosstalk when the object under test moves includes: The first laser displacement sensor is mounted on the first slide, and the position of the first laser displacement sensor is adjusted by adjusting the first slide. The second laser displacement sensor is mounted on the second slide, and the position of the second laser displacement sensor is adjusted by adjusting the second slide.

15. An electronic device, characterized in that, include: A memory and a processor, wherein the memory and the processor are coupled; The memory stores program instructions that, when executed by the processor, cause the electronic device to perform the motor testing method as described in any one of claims 1 to 14.

16. A computer-readable storage medium comprising a computer program, characterized in that, When the computer program is run on an electronic device, the electronic device performs the motor testing method as described in any one of claims 1 to 14.