Lens focusing control device and method, lens and storage medium
By introducing multiple floating focus groups and PID closed-loop control into the lens, the problem of insufficient focus accuracy and speed of the lens is solved, and fast and accurate focusing effects are achieved, improving the user experience.
Patent Information
- Application Number
- CN202410071770.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-17
- Publication Date
- 2025-07-25
AI Technical Summary
The existing lens focusing method limits the accuracy and speed of lens focusing, resulting in a reduced user experience.
Multiple floating focus groups are adopted, each floating focus group corresponds to a set of driving mechanisms and displacement sensors. By obtaining the focus information set by the user, the desired moving position of each floating focus group is determined, and the driving signal is adjusted based on the PID closed-loop control to achieve fast and accurate focusing.
Through multiple floating focus groups and PID closed-loop control, the speed and accuracy of lens focus is significantly improved, suitable for fast-changing shooting scenes, ensuring the synchronization and accuracy of the focus effect.
Smart Images

Figure CN120378729A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of lens focusing, and particularly to a lens focusing control device, method, lens, and storage medium. Background Art
[0002] In the field of photography, the process of adjusting the focusing lens / lens group to change the object distance and image distance, so that the image of the object to be photographed is clear, is called focusing. The focusing process is actually a process of making the object distance and image distance satisfy the imaging formula. When the imaging formula is satisfied and stays in this state, the focusing is successful, and the image obtained by the sensor at this time is the clearest. Only when the lens focuses successfully can the different light rays reflected by a single point in the real scene pass through the lens and converge into a clear point image on the sensor. If the focusing is not successful, the point in the real scene will appear as a circle of confusion on the sensor, and it will look blurred to the naked eye. Therefore, accurate lens focusing is crucial for image quality. The focusing system of traditional lenses usually only includes one focusing group and generally supports autofocus. Existing autofocus technologies are generally divided into two types: active autofocus and passive autofocus.
[0003] Active autofocus measures the distance between the focusing object and the mobile phone by emitting infrared light invisible to the human eye to the object surface and then receiving the signal reflected back, and then controls the motor to push the lens to the corresponding position to complete the focusing. Its advantage is fast focusing speed, and its disadvantages are easy to be interfered by strong light and low focusing accuracy. Passive autofocus is to continuously move the position of the lens in one direction through the motor control process, and then calculate and save the image contrast value or the difference value (Focus value, abbreviated as FV value) at different positions of the lens. When the FV value gradually increases and then decreases, the lens focusing algorithm will consider that the position of the lens with the clearest image is at or near the maximum value, and will control the motor to move the lens back to near this maximum value to search carefully to find the clear point of the image. Its advantage is higher focusing accuracy, and its disadvantage is slower focusing speed. That is, the existing lens focusing methods limit the accuracy and speed of lens focusing, thereby reducing the user experience. Summary of the Invention
[0004] The main object of the present invention is to solve the technical problem that the existing lens focusing methods limit the accuracy and speed of lens focusing, thereby reducing the user experience.
[0005] In the first aspect of the present invention, a lens focusing control device is provided, which is applied to a lens. The lens includes a plurality of floating focusing groups, and each floating focusing group corresponds to a set of driving mechanisms and displacement sensors respectively. The lens focusing control device includes:
[0006] A first acquisition module, configured to acquire the focusing information of the lens set by the user;
[0007] A first determination module, configured to respectively determine the expected movement positions of the floating focus groups based on the focus information;
[0008] A second determination module, configured to determine the drive signals of the drive mechanisms based on the expected movement positions of the floating focus groups;
[0009] A control module, configured to control the drive mechanisms to drive the corresponding floating focus groups to move based on the drive signals;
[0010] A second acquisition module, configured to acquire the current movement positions of the corresponding floating focus groups fed back by the displacement sensors;
[0011] An adjustment module, configured to adjust the drive signals of the corresponding drive mechanisms based on the distance deviations between the current movement positions and the expected movement positions of the floating focus groups, so as to perform PID closed-loop control on the drive mechanisms.
[0012] Optionally, in the first implementation manner of the first aspect of the present invention, the lens focus control device further includes:
[0013] The first determination module is specifically configured to: query a pre-set mapping relation table based on the focus information, respectively obtain the movement positions of the floating focus groups, and use the queried movement positions as the expected movement positions.
[0014] Optionally, in the second implementation manner of the first aspect of the present invention, the lens focus control device further includes:
[0015] A judgment module, configured to respectively judge whether the distance deviations between the current movement positions and the expected movement positions of the floating focus groups are all less than their respective allowable deviation thresholds;
[0016] A stop module, configured to stop performing PID closed-loop control on the drive mechanisms if the distance deviations between the current movement positions and the expected movement positions of the floating focus groups are all less than their respective allowable deviation thresholds.
[0017] Optionally, in the third implementation manner of the first aspect of the present invention, the adjustment module includes:
[0018] A calculation unit, configured to calculate the distance deviations between the current movement positions and the expected movement positions of the floating focus groups;
[0019] A PID unit, configured to respectively input the distance deviations corresponding to the floating focus groups into the corresponding PID controllers for weighting, differentiation, and integration processing, and output the corresponding drive signal deviations;
[0020] An adjustment unit, configured to adjust the driving signal of the corresponding driving mechanism based on the driving signal deviation, so as to perform PID closed-loop control on each driving mechanism in the next cycle based on the adjusted driving signal.
[0021] Optionally, in the fourth implementation manner of the first aspect of the present invention, the adjustment module is specifically configured to:
[0022] Circularly query the current movement positions of each floating focusing group;
[0023] Compare the current movement positions of each floating focusing group queried with the corresponding expected movement positions, and output a distance deviation;
[0024] Based on the distance deviation and the driving current of the current driving mechanism, adjust the driving current of the corresponding driving mechanism in the next cycle.
[0025] Optionally, in the fifth implementation manner of the first aspect of the present invention, the lens focusing control device further includes:
[0026] A deviation correction module, configured to control each driving mechanism to drive the corresponding floating focusing group to move to its respective origin position when a power-on signal is detected.
[0027] The second aspect of the present invention further provides a lens focusing control method. The lens includes a plurality of floating focusing groups, and each floating focusing group corresponds to a set of driving mechanisms and displacement sensors respectively. The lens focusing control method includes:
[0028] Obtain the focusing information of the lens set by the user;
[0029] Based on the focusing information, respectively determine the expected movement positions of each floating focusing group;
[0030] Based on the expected movement positions of each floating focusing group, determine the driving signals of each driving mechanism;
[0031] Based on the driving signals, control the driving mechanisms to drive the corresponding floating focusing groups to move;
[0032] Obtain the current movement positions of the corresponding floating focusing groups fed back by each displacement sensor;
[0033] Based on the distance deviation between the current movement positions and the expected movement positions of each floating focusing group, adjust the driving signals of the corresponding driving mechanisms to perform PID closed-loop control on each driving mechanism.
[0034] Optionally, in the first implementation manner of the second aspect of the present invention, the step of respectively determining the expected movement positions of each floating focusing group based on the focusing information includes:
[0035] Based on the focusing information, query the preset mapping relation table to obtain the movement positions of each floating focusing group respectively, and use the queried movement positions as the expected movement positions.
[0036] Optionally, in the second implementation manner of the second aspect of the present invention, after obtaining the current movement positions of the corresponding floating focusing groups fed back by each displacement sensor, it further includes:
[0037] Respectively determine whether the distance deviations between the current movement positions of each floating focusing group and the expected movement positions are all less than their respective corresponding allowable deviation thresholds;
[0038] If the distance deviations between the current movement positions of each floating focusing group and the expected movement positions are all less than their respective corresponding allowable deviation thresholds, stop the PID closed-loop control of each driving mechanism.
[0039] Optionally, in the third implementation manner of the second aspect of the present invention, the adjusting the driving signal of the corresponding driving mechanism based on the distance deviation between the current movement position of each floating focusing group and the expected movement position to perform PID closed-loop control on each driving mechanism includes:
[0040] Calculate the distance deviation between the current movement position of each floating focusing group and the expected movement position;
[0041] Input the distance deviations corresponding to each floating focusing group into the corresponding PID controller for weighting, differentiation, and integration processing, and output the corresponding driving signal deviation;
[0042] Based on the driving signal deviation, adjust the driving signal of the corresponding driving mechanism for performing PID closed-loop control on each driving mechanism in the next cycle based on the adjusted driving signal.
[0043] Optionally, in the fourth implementation manner of the second aspect of the present invention, the adjusting the driving signal of the corresponding driving mechanism based on the distance deviation between the current movement position of each floating focusing group and the expected movement position to perform PID closed-loop control on each driving mechanism includes:
[0044] Circularly query the current movement positions of each floating focusing group;
[0045] Compare the current movement positions of each floating focusing group queried with the corresponding expected movement positions, and output the distance deviation;
[0046] Based on the distance deviation and the driving current of the current driving mechanism, adjust the driving current of the corresponding driving mechanism in the next cycle to perform PID closed-loop control on each driving mechanism.
[0047] Optionally, in the fifth implementation manner of the second aspect of the present invention, the lens focusing control method further includes:
[0048] When a power-on signal is detected, control each driving mechanism to drive the corresponding floating focusing group to move to its respective origin position.
[0049] The third aspect of the present invention further provides a lens, which includes a plurality of floating focusing groups, each floating focusing group corresponds to a set of driving mechanism and displacement sensor respectively, and the lens further includes: a memory and at least one processor, and instructions are stored in the memory; the at least one processor calls the instructions in the memory to enable the lens to execute the above-mentioned lens focusing control method.
[0050] The fourth aspect of the present invention provides a computer-readable storage medium, in which instructions are stored, and when it runs on a computer, it enables the computer to execute the above-mentioned lens focusing control method.
[0051] The technical solution provided by the present invention is applied to a lens with a plurality of floating focusing groups, each floating focusing group corresponds to a set of driving mechanism and displacement sensor respectively. The focusing speed can be greatly improved by the plurality of floating focusing groups. In addition, the present invention further introduces a new lens focusing control method for the lens with a plurality of floating focusing groups. By obtaining the focusing information set by the user, the expected movement positions of the floating focusing groups are determined; then, based on the expected movement positions of the floating focusing groups, the driving signals of the driving mechanisms are determined; based on this driving signal, the driving mechanism can be controlled to drive the corresponding floating focusing group to move to achieve focusing. To further improve the focusing accuracy, the present invention also introduces PID closed-loop control. By obtaining the current movement positions of the corresponding floating focusing groups fed back by the displacement sensors, and then calculating the distance deviation between the current movement positions and the expected movement positions of the floating focusing groups, the driving signals of the corresponding driving mechanisms are adjusted to perform PID closed-loop control on the driving mechanisms. The present invention uses a plurality of floating focusing groups to accelerate the lens focusing speed, which is suitable for rapidly changing shooting scenarios. At the same time, through PID closed-loop control, it is ensured that the plurality of floating focusing groups remain synchronized during the movement process, avoiding focusing misalignment and improving the focusing effect. Description of the Drawings
[0052] Figure 1 Schematic diagram of the lens structure setting of an embodiment of the lens of the present invention;
[0053] Figure 2 Schematic diagram of an embodiment of the lens focusing control device in the embodiment of the present invention;
[0054] Figure 3 Schematic diagram of the PID closed-loop control principle for lens focusing in the embodiment of the present invention;
[0055] Figure 4 Schematic diagram of an embodiment of the lens focusing control method in the embodiments of the present invention;
[0056] Figure 5 Schematic diagram of the structural arrangement of the displacement sensor in one embodiment of the lens of the present invention. Detailed implementation manners
[0057] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and do not necessarily need to be used to describe a specific order or sequence. It should be understood that such used data can be interchanged under appropriate circumstances so that the embodiments described herein can be implemented in an order different from that illustrated or described herein. In addition, the term "comprising" or "having" and any variation thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device comprising a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these process, method, product or device.
[0058] Referring to Figure 1 , Figure 1 Schematic diagram of the structural arrangement of the lens in one embodiment of the lens of the present invention.
[0059] In this embodiment, from the object side to the image side, it successively includes: a first lens group G1 with positive optical power, a second lens group G2 with negative optical power, an aperture stop STP, a third lens group G3 with positive optical power, and a fourth lens group G4 with negative optical power; the first lens group G1, the second lens group G2, the third lens group G3, and the fourth lens group G4 all adopt spherical lenses. IMG represents the image plane, and GL represents a parallel glass plate. During the focusing process from infinity to close range, the second lens group G2 moves along the optical axis towards the image side, the third lens group G3 moves along the optical axis towards the object side, and the first lens group G1 and the fourth lens group G4 remain unchanged with respect to the position of the image plane; in order to correct axial chromatic aberration, the first lens group G1 includes at least one meniscus lens and at least one lens with Vd1≥70, and the first lens group G1 satisfies the following conditional expressions:
[0060] 0.3≤F1 / F≤1, (1);
[0061] (Vd1a - Vd1b)≥30, (2);
[0062] Wherein, F represents the focal length of the telephoto lens, F1 represents the combined focal length of the first lens group G1, Vd1 is defined as the Abbe number of the lens with respect to light with a wavelength of 587.6 nm, Vd1a is the Abbe number of the lens with the highest Abbe number in the first lens group G1 with respect to light with a wavelength of 587.6 nm; Vd1b is the Abbe number of the lens with the lowest Abbe number in the first lens group G1 with respect to light with a wavelength of 587.6 nm.
[0063] The first lens group G1 is composed of a first lens L11 with a positive refractive power, a second lens L12 with a positive refractive power, a third lens L13 with a positive refractive power, a fourth lens L14 with a negative refractive power, a fifth lens L15 with a negative refractive power, and a sixth lens L16 with a positive refractive power, which are arranged in sequence from the object side to the image side. Among them, the fifth lens L15 and the sixth lens L16 are combined into a cemented lens group. The second lens L12 and the sixth lens L16 are meniscus lenses. The first lens L11, the second lens L12, the third lens L13, and the sixth lens L16 are all ultra-low dispersion lenses. By introducing lenses made of low-dispersion materials, good axial chromatic aberration correction can be achieved, and the dispersion problems in the in-focus and out-of-focus images can be reduced.
[0064] The second lens group G2 is composed of a seventh lens L21 with a positive refractive power, an eighth lens L22 with a negative refractive power, and a ninth lens L23 with a negative refractive power, which are arranged in sequence from the object side to the image side. The seventh lens L21 and the eighth lens L22 are combined into a cemented lens group. The lens surface of the second lens group G2 near the object side bulges towards the object side, and the lens surface near the image side concaves towards the object side. The second lens group G2 satisfies the following conditional formula:
[0065] -0.9 ≤ F2 / F ≤ 0, (3);
[0066] Wherein, F represents the focal length of the telephoto lens, and F2 represents the combined focal length of the second lens group G2.
[0067] The third lens group G3 is composed of a tenth lens L31 with a positive refractive power and an eleventh lens L32 with a negative refractive power, which are arranged in sequence from the object side to the image side. The tenth lens L31 and the eleventh lens L32 are combined into a cemented lens group. The fourth lens group G4 satisfies the following conditional formula:
[0068] -3 ≤ F3 / F4 ≤ 0, (4);
[0069] Wherein, F3 represents the combined focal length of the third lens group G3, and F4 represents the combined focal length of the fourth lens group G4.
[0070] The fourth lens group G4 is composed of a twelfth lens L41 with a positive refractive power and a thirteenth lens L42 with a negative refractive power, which are arranged in sequence from the object side to the image side.
[0071] To achieve a high magnification and simultaneously achieve a high resolution, in this embodiment, it is preferably to use the method of internal double lens group movement for focusing (that is, a double-group floating focusing group). During the focusing process from infinity to close range, the second lens group G2 moves along the optical axis towards the image side, and the third lens group G3 moves along the optical axis towards the object side. The second lens group G2 and the third lens group G3 move differentially towards each other during the focusing process. This focusing method is beneficial for correcting the aberration introduced during close shooting, especially has a good inhibitory effect on field curvature. Therefore, a high magnification and a high resolution can be achieved simultaneously. At the same time, the second lens group G2 and the third lens group G3 are respectively selected as the focusing groups. The aperture, volume, and the number of lenses of these two groups of lenses are relatively small. Especially, the third lens group G3 only has two lenses. Therefore, the overall weight is lower than that of the first lens group G1 and the fourth lens group G4, which is beneficial for improving the focusing speed and achieving quick focusing.
[0072] Refer to Figure 2 , Figure 2 which is a schematic diagram of the functional modules of an embodiment of the lens focusing control device of the present invention. In this embodiment, the lens focusing control device is applied to a lens, and the lens includes a plurality of floating focusing groups (such as Figure 1 the lens group G2 and the lens group G3 shown), and each floating focusing group corresponds to a set of driving mechanisms (such as voice coil motors) and displacement sensors (such as Figure 5 the displacement sensor shown).
[0073] In this embodiment, the lens focusing control device is installed in the lens and is specifically arranged on the main board of the lens for realizing lens focusing control. In this embodiment, the lens focusing control device specifically includes:
[0074] A first acquisition module 301, configured to acquire the focusing information of the lens set by the user;
[0075] This embodiment is used to realize automatic focusing of the lens, and it is necessary to pre-acquire the lens focusing information input by the user. For example, the lens focusing information is input through the screen of the lens itself, or the lens focusing information is input through a mobile terminal and transmitted to the lens. Among them, the focusing information is preferably the object distance.
[0076] A first determination module 302, configured to respectively determine the expected movement positions of the floating focusing groups based on the focusing information;
[0077] In this embodiment, the process of focusing is to change the positions of the object distance and the image distance by adjusting the focusing lens / lens group so that the image of the object to be photographed is clear. The focusing process is actually a process of making the object distance and the image distance satisfy the imaging formula. Satisfying the following imaging formula and staying in this state is successful focusing, and the image obtained by the sensor at this time is the clearest.
[0078] The imaging formula is: 1 / u + 1 / v = 1 / f, where u represents the object distance, v represents the image distance, and f represents the focal length. Based on this imaging formula, the corresponding relationship between different object distances and focal lengths can be calculated on the basis of the same image distance.
[0079] In one embodiment, the first determination module 302 is specifically configured to: query the mapping relationship table based on the focusing information, obtain the movement positions of each floating focusing group respectively, and use the queried movement positions as the expected movement positions.
[0080] In this optional embodiment, to achieve fast focusing and improve the focusing accuracy at the same time, a mapping relationship table between the focusing information and the movement positions of each floating focusing group is stored on the main board in advance. During the actual focusing process, based on the focusing information input by the user, the movement positions of each floating focusing group in the lens can be obtained by querying this mapping relationship table.
[0081] In this embodiment, a closed-loop control method is adopted for focusing. Therefore, the movement positions of each floating focusing group queried are further used as the expected movement positions for closed-loop control.
[0082] The second determination module 303 is configured to determine the driving signals of each driving mechanism based on the expected movement positions of each floating focusing group;
[0083] In this embodiment, there is no limit to the type of driving mechanism used for the lens. For example, it can be a voice coil motor driven by a current signal, or a ultrasonic motor driven by a ultrasonic signal, or a stepper motor driven by a pulse signal. There is no limit to the type of driving signal in this embodiment, including but not limited to current signals, ultrasonic signals, and pulse signals.
[0084] In this embodiment, after the expected movement positions of each floating focusing group are determined respectively, the driving signals of the corresponding driving mechanisms can be determined based on the expected movement positions of each floating focusing group.
[0085] The control module 304 is configured to control the driving mechanism to drive the corresponding floating focusing group to move based on the driving signal;
[0086] In this embodiment, after the driving signals of each driving mechanism are determined by the second determination module 303, the driving mechanism can be controlled by the control module 304 to move, and then drive the corresponding floating focusing group to move. Assume that the lens includes two floating focusing groups: floating focusing group 1 and floating focusing group 2, and also includes driving mechanism 1 and driving mechanism 2. The driving mechanism 1 is controlled by the driving signal 1 to move and then drive the floating focusing group 1 to move, and the driving mechanism 2 is controlled by the driving signal 2 to move and then drive the floating focusing group 2 to move, so as to achieve lens focusing.
[0087] The second acquisition module 305 is configured to acquire the current movement position of the corresponding floating focusing group fed back by each displacement sensor;
[0088] In this embodiment, to achieve precision control during the focusing process, a PID closed-loop control method is adopted for focusing. After each focusing control cycle ends, the second acquisition module 305 respectively acquires the current movement position of the corresponding floating focusing group fed back by each displacement sensor. Among them, the displacement sensor preferably adopts a structure as Figure 5 shown to implement displacement detection of the floating focusing group for each focusing control cycle.
[0089] The adjustment module 306 is configured to adjust the drive signal of the corresponding drive mechanism based on the distance deviation between the current movement position and the desired movement position of each floating focusing group, so as to perform PID closed-loop control on each drive mechanism.
[0090] As Figure 3 shown, it is a schematic diagram of the PID closed-loop control principle for lens focusing in an embodiment of the present invention for a lens. Among them, after the drive mechanism drives the floating focusing group to move at each moment (cycle), the displacement sensor will feedback the current movement position of the corresponding floating focusing group. The adjustment module 306 then adjusts the drive signal of the corresponding drive mechanism based on the distance deviation between the current movement position and the desired movement position of each floating focusing group, and the adjusted drive signal is used to control the drive mechanism at the next moment (cycle), thereby driving the floating focusing group to continue moving until the floating focusing group moves to the desired movement position.
[0091] In one embodiment, the adjustment module 306 further includes:
[0092] A calculation unit configured to calculate the distance deviation between the current movement position and the desired movement position of each floating focusing group;
[0093] A PID unit configured to respectively input the distance deviations corresponding to each floating focusing group into the corresponding PID controller for weighting, differentiation, and integration processing, and output the corresponding drive signal deviation;
[0094] An adjustment unit configured to adjust the drive signal of the corresponding drive mechanism based on the drive signal deviation, for performing PID closed-loop control on each drive mechanism in the next cycle based on the adjusted drive signal.
[0095] As Figure 3As shown in the figure, the PID closed-loop control process is completed by the PID controller and the driving mechanism. Among them, the input data of the PID controller is the expected movement position of the floating focus group and the movement position at the current moment, and the output is the driving signal adjusted by PID. When the floating focus group moves to the expected movement position, the distance deviation between the movement position at the current moment of the floating focus group and the expected movement position is 0. At this time, the driving signal of the corresponding driving mechanism is no longer adjusted, that is, the PID closed-loop control is stopped.
[0096] In an embodiment, when the driving signal is a driving current, the adjustment module is specifically used for:
[0097] Circularly query the movement position of each floating focus group at the current moment;
[0098] Compare the movement position of each floating focus group at the current moment queried with the corresponding expected movement position, and output the distance deviation;
[0099] Based on the distance deviation and the driving current of the current driving mechanism, adjust the driving current of the corresponding driving mechanism in the next cycle.
[0100] In this optional embodiment, in order to achieve rapid focusing, the adjustment module will circularly query the movement position of each floating focus group at the current moment, and then compare it with the expected movement position of each floating focus group determined by the first determination module 302, so as to output the distance deviation after this round of adjustment. When the driving signal is a driving current, if there is a distance deviation, it is necessary to adjust the driving current of the corresponding driving mechanism in the next cycle, and the adjustment amplitude is related to the distance deviation and the driving current of the current driving mechanism.
[0101] Optionally, in the fifth implementation manner of the first aspect of the present invention, the lens focusing control device further includes:
[0102] A deviation correction module, configured to control each driving mechanism to drive the corresponding floating focus group to move to its respective origin position when a power-on signal is detected.
[0103] In this optional embodiment, in order to further improve the focusing control accuracy, it is necessary to perform position deviation correction on each floating focus group. Specifically, when the device is powered on and a power-on signal is detected, at this time, by controlling each driving mechanism, the corresponding floating focus group is driven to move to its respective origin position, so as to ensure that the lens focusing position each time is corrected.
[0104] In an embodiment, the lens focusing control device further includes:
[0105] A judgment module, configured to respectively judge whether the distance deviation between the movement position of each floating focus group at the current moment and the expected movement position is less than its respective allowable deviation threshold;
[0106] A stop module, configured to stop performing PID closed-loop control on each drive mechanism if the distance deviation between the current movement position and the expected movement position of each floating focusing group is less than the corresponding allowable deviation threshold.
[0107] In this alternative embodiment, after the second acquisition module 305 acquires the current movement position of the corresponding floating focusing group fed back by each displacement sensor, it further determines whether the distance deviation between the current movement position and the expected movement position of each floating focusing group is less than a preset allowable deviation threshold. If it is less, it indicates that the current floating focusing group has moved to the vicinity of the expected movement position, and at this time the lens focusing effect is relatively good, and the focusing can be stopped. This alternative embodiment is applicable to users with high requirements for lens focusing speed.
[0108] To better understand the content of the present invention, the lens closed-loop focusing control process will be exemplified below using a voice coil motor as an example. A voice coil motor is a special form of direct drive motor that can directly convert electrical energy into mechanical energy of linear motion without any intermediate conversion mechanism. Its working principle is that a current-carrying winding coil placed in a uniform air-gap magnetic field will generate an electromagnetic force, and the magnetic field force drives the load to perform linear motion. The voice coil motor using closed-loop control can move in two directions of +Z and -Z. After obtaining the autofocus information, the best imaging position corresponding to the focus information is further determined through a preset mapping relationship table, the corresponding current magnitude and direction are obtained, and a current drive command is generated and sent to the motor drive chip. The motor drive chip outputs the corresponding drive current to drive the floating focusing group to start moving. During the movement, the position of the floating focusing group is detected in real time, and its position signal is fed back to the motor drive chip. The motor drive chip then adjusts the drive current in real time through the feedback signal, so as to achieve the goal of quickly realizing autofocus by closed-loop controlling the voice coil motor.
[0109] Refer to Figure 4 , Figure 4 is a schematic flowchart of an embodiment of the lens focusing control method of the present invention. In this embodiment, the lens includes a plurality of floating focusing groups, and each floating focusing group corresponds to a set of drive mechanisms and displacement sensors respectively. The lens focusing control method includes:
[0110] S10, obtaining the focusing information of the lens set by the user;
[0111] S20, respectively determining the expected movement positions of the floating focusing groups based on the focusing information;
[0112] S30, determining the drive signals of the drive mechanisms based on the expected movement positions of the floating focusing groups;
[0113] S40, controlling the drive mechanisms to drive the corresponding floating focusing groups to move based on the drive signals;
[0114] S50. Obtain the current movement positions of the corresponding floating focus groups feedback by each displacement sensor;
[0115] S60. Based on the distance deviation between the current movement position and the expected movement position of each floating focus group, adjust the drive signal of the corresponding drive mechanism to perform PID closed-loop control on each drive mechanism.
[0116] Optionally, in one embodiment, the determining the expected movement position of each floating focus group based on the focus information includes:
[0117] Based on the focus information, query the preset mapping relation table to obtain the movement positions of each floating focus group respectively, and use the queried movement positions as the expected movement positions.
[0118] Optionally, in one embodiment, after S50, it further includes:
[0119] Respectively determine whether the distance deviations corresponding to each floating focus group are all less than their respective allowable deviation thresholds;
[0120] If the distance deviations corresponding to each floating focus group are all less than their respective allowable deviation thresholds, stop performing PID closed-loop control on each drive mechanism.
[0121] Optionally, in one embodiment, S60 includes:
[0122] Calculate the distance deviation between the current movement position and the expected movement position of each floating focus group;
[0123] Input the distance deviations corresponding to each floating focus group into the corresponding PID controller for weighting, differentiation, and integration processing, and output the corresponding drive signal deviations;
[0124] Based on the drive signal deviations, adjust the drive signals of the corresponding drive mechanisms for performing PID closed-loop control on each drive mechanism based on the adjusted drive signals in the next cycle.
[0125] Optionally, in one embodiment, the adjusting the drive signal of the corresponding drive mechanism based on the distance deviation between the current movement position and the expected movement position of each floating focus group to perform PID closed-loop control on each drive mechanism includes:
[0126] Circularly query the current movement positions of each floating focus group;
[0127] Compare the current movement positions of each floating focus group queried with the corresponding expected movement positions, and output the distance deviation;
[0128] Adjust the driving current of the corresponding driving mechanism in the next cycle based on the distance deviation and the driving current of the current driving mechanism, so as to perform PID closed-loop control on each driving mechanism.
[0129] Optionally, in one embodiment, the lens focusing control method further includes:
[0130] When a power-on signal is detected, control each driving mechanism to drive the corresponding floating focusing group to move to its respective origin position.
[0131] Since the embodiments in the method part correspond to the embodiments of the above device, the introduction of the lens focusing control method provided by the present invention can be referred to the embodiments of the above lens focusing control device, and the present invention will not be repeated here. It has the same beneficial effects as the above lens focusing control device.
[0132] This embodiment is applied to a lens with multiple floating focusing groups. Each floating focusing group corresponds to a set of driving mechanisms and displacement sensors respectively. The focusing speed can be greatly improved through multiple floating focusing groups. In addition, this embodiment further introduces a new lens focusing control method for the lens with multiple floating focusing groups. By obtaining the focusing information set by the user, determine the expected movement positions of each floating focusing group; then based on the expected movement positions of each floating focusing group, determine the driving signals of each driving mechanism; based on this driving signal, the driving mechanism can be controlled to drive the corresponding floating focusing group to move to achieve focusing. To further improve the focusing accuracy, the present invention also introduces PID closed-loop control. By obtaining the current movement positions of each floating focusing group feedback by each displacement sensor, and then calculating the distance deviation between the current movement positions of each floating focusing group and the expected movement positions, and then adjusting the driving signals of the corresponding driving mechanisms to perform PID closed-loop control on each driving mechanism. This embodiment speeds up the lens focusing speed through multiple floating focusing groups and is suitable for rapidly changing shooting scenarios. At the same time, through PID closed-loop control, it is ensured that multiple floating focusing groups remain synchronized during the movement process, avoiding focusing disorders and improving the focusing effect.
[0133] The present invention also provides a lens, which includes a memory and a processor. Computer-readable instructions are stored in the memory. When the computer-readable instructions are executed by the processor, the processor executes the steps of the lens focusing control method in the above embodiments.
[0134] The present invention also provides a computer-readable storage medium. The computer-readable storage medium can be a non-volatile computer-readable storage medium, or the computer-readable storage medium can also be a volatile computer-readable storage medium. Instructions are stored in the computer-readable storage medium. When the instructions run on a computer, the computer executes the steps of the lens focusing control method.
[0135] Reference Figure 5 , Figure 5 is a schematic diagram of the structural arrangement of a displacement sensor according to an embodiment of the lens of the present invention. In this embodiment, the displacement sensor includes a first fixed grating 10, a second fixed grating 20, a movable grating 30, and a signal processor (not shown). The first fixed grating 10 and the second fixed grating 20 are sequentially arranged on the same side of the movable grating 30 along the measurement direction. A first light source 40 is provided on the side of the first fixed grating 10 away from the movable grating 30, and a second light source 50 is provided on the side of the second fixed grating 20 away from the movable grating 30. On the other side of the movable grating 30, a first optical signal receiver 60 and a second optical signal receiver 70 are respectively provided for receiving the light rays emitted by the first light source 40 and the second light source 50. The first optical signal receiver 60 and the second optical signal receiver 70 are respectively connected to the signal processor. The phase difference between the light signal intensity received by the first optical signal receiver 60 and the light signal intensity received by the second optical signal receiver 70 is 90 degrees. In the present invention, the signal processor is an MCU, and both the first optical signal receiver 60 and the second optical signal receiver 70 are photosensitive components. The light intensity signals received by the first optical signal receiver 60 and the second optical signal receiver 70 are processed by the signal processor through a certain algorithm, and the purpose of detecting displacement can be achieved.
[0136] Specifically, the first fixed grating 10 is provided with a plurality of identical first light-transmitting grooves 11 distributed along the measurement direction. The second fixed grating 20 is provided with a plurality of identical second light-transmitting grooves 21 distributed along the measurement direction. The movable grating 30 is provided with a plurality of identical third light-transmitting grooves 31 distributed along the measurement direction. The distances between the distributions of the first light-transmitting grooves 11, the second light-transmitting grooves 21, and the third light-transmitting grooves 31 are all the same. The number of the first light-transmitting grooves 11 and the second light-transmitting grooves 21 is the same, and the number of the third light-transmitting grooves 31 is more than the number of the first light-transmitting grooves 11 and the second light-transmitting grooves 21. The widths of the first light-transmitting grooves 11, the second light-transmitting grooves 21, and the third light-transmitting grooves 31 are all the same. The distances between the first fixed grating 10 and the second fixed grating 20 and the movable grating 30 are the same. In this embodiment, for the convenience of installation and use, the first fixed grating 10 and the second fixed grating 20 are integrally connected. It should be understood that in actual use, the first fixed grating 10 and the second fixed grating 20 can also adopt a split structure. The widths of the first light-transmitting grooves 11, the second light-transmitting grooves 21, and the third light-transmitting grooves 31 are all 0.08 - 0.12 mm, preferably 0.1 mm; the distances between the first light-transmitting grooves 11, the second light-transmitting grooves 21, and the third light-transmitting grooves 31 are all 0.08 - 0.12 mm, preferably 0.1 mm; the distances between the first fixed grating 10 and the second fixed grating 20 and the movable grating 30 are 0.1 - 0.2 mm, preferably 0.15 mm; the thicknesses of the first fixed grating 10, the second fixed grating 20, and the movable grating 30 are all 0.15 - 0.20 mm, preferably 0.175 mm.
[0137] In this embodiment, the process of the displacement sensor for displacement detection is as follows:
[0138] (1) Make the first light source 40 and the second light source 50 emit light with a constant intensity. Move the movable grating 30 relative to the first fixed grating 10 and the second fixed grating 20 in the measurement direction. The first optical signal receiver 60 receives the light from the first light source 40 passing through the first fixed grating 10 and the movable grating 30, and the second optical signal receiver 70 receives the light from the second light source 50 passing through the second fixed grating 20 and the movable grating 30;
[0139] (2) Convert the light intensity signals of the light received by the first optical signal receiver 60 and the second optical signal receiver 70 into periodically varying electrical signals y1(x) and y2(x) respectively. The phases of the electrical signals y1(x) and y2(x) differ by 90 degrees;
[0140] (3) Write the Triangle_atan2 function with reference to the atan2 function. This function first divides the electrical signals y1(x) and y2(x) within a single period into four parts. If y1(x) is less than or equal to 0 and y2(x) is less than 0, record this as the first part. If y1(x) is less than or equal to 0 and y2(x) is greater than or equal to 0, record this part as the second part. If y1(x) is greater than 0 and y2(x) is greater than or equal to 0, record this part as the third part. If y1(x) is greater than 0 and y2(x) is less than 0, record this part as the fourth part. Then perform different operations on each part:
[0141] First part: y = ((2 * y2(x)min - y2(x) + y1(x)) + y2(x)min);
[0142] Second part: y = (y2(x) + y1(x) + y2(x)min);
[0143] Third part: y = ((2 * y1(x)max - y1(x) + y2(x)) + y2(x)min);
[0144] Fourth part: y = ((2 * y1(x)max - y1(x) - y2(x)) + y2(x)min);
[0145] Here, y2(x)min refers to the minimum value of y2(x), which is equal to y1(x)min, and y1(x)max refers to the maximum value of y1(x), which is equal to y2(x)max. Combine these four parts to obtain the offset value y that varies periodically with the movement of the movable grating 30 for y1(x) and y2(x), and the offset value y within the same period is in a proportional relationship with the movement distance of the movable grating 30;
[0146] (4) Calculate the distance that the movable grating 30 moves relative to the origin according to the formula L = nd + ykd, where n is the number of periods of the offset value y, d is the distance that the movable grating 30 moves corresponding to one period of the offset value y, y is the offset value of the current period calculated in step (3), and k is the proportionality coefficient between the offset value y and d.
[0147] In this embodiment, the displacement of the movable component (such as the floating focusing group) inside the lens can be detected by using two light sources. It has low energy consumption and small occupied space. The movable grating can be flexibly connected to the components of the lens, and different connection methods can be designed according to different spaces. Moreover, the length of the movable grating can be designed according to the moving range of the movable component, which saves more space. Compared with the traditional fixed installation mode, the flexibility of the structural design is greatly increased. By converting the two optical signals into electrical signals, and then converting the electrical signals of the two light sources into an offset value proportional to the displacement according to the idea of the atan2 function, the actual displacement can be obtained quickly and accurately. Since the sampling frequency is proportional to the accuracy, only by increasing the sampling frequency can the purpose of high-precision displacement detection be achieved. When in use, the movable grating can be directly connected to the displacement component in the lens, so that the displacement of the displacement component in the lens can be directly detected.
[0148] Those skilled in the art can clearly understand that for the convenience and conciseness of description, the specific working processes of the above-described systems, devices, and units can refer to the corresponding processes in the foregoing method embodiments, and will not be described herein again.
[0149] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present invention. The foregoing storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical discs that can store program codes.
[0150] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A lens focusing control device, applied to a lens, characterized in that The lens includes a plurality of floating focusing groups, and each floating focusing group corresponds to a set of driving mechanisms and displacement sensors respectively. The lens focusing control device includes: A first acquisition module, configured to acquire the focusing information of the lens set by the user; A first determination module, configured to respectively determine the expected movement positions of the floating focusing groups based on the focusing information; A second determination module, configured to determine the driving signals of the driving mechanisms based on the expected movement positions of the floating focusing groups; A control module, configured to control the driving mechanisms to drive the corresponding floating focusing groups to move based on the driving signals; A second acquisition module, configured to acquire the current movement positions of the corresponding floating focusing groups fed back by the displacement sensors; An adjustment module, configured to adjust the driving signals of the corresponding driving mechanisms based on the distance deviations between the current movement positions and the expected movement positions of the floating focusing groups, so as to perform PID closed-loop control on the driving mechanisms.
2. The lens focusing control device according to claim 1, wherein The lens focusing control device further includes: Specifically, the first determination module is configured to: query a pre-set mapping relation table based on the focusing information, respectively obtain the movement positions of the floating focusing groups, and use the queried movement positions as the expected movement positions.
3. The lens focusing control device according to claim 1, wherein The lens focusing control device further includes: A judgment module, configured to respectively judge whether the distance deviations between the current movement positions and the expected movement positions of the floating focusing groups are all smaller than their respective allowed deviation thresholds; A stop module, configured to stop performing PID closed-loop control on the driving mechanisms if the distance deviations between the current movement positions and the expected movement positions of the floating focusing groups are all smaller than their respective allowed deviation thresholds.
4. The lens focusing control device according to claim 1, wherein, The adjustment module includes: A calculation unit, configured to calculate the distance deviations between the current movement positions and the expected movement positions of the floating focusing groups; A PID unit, configured to respectively input the distance deviations corresponding to the floating focusing groups into the corresponding PID controllers for weighting, differentiating, and integrating processing, and output the corresponding driving signal deviations; An adjustment unit, configured to adjust the driving signals of the corresponding driving mechanisms based on the driving signal deviations, for performing PID closed-loop control on the driving mechanisms based on the adjusted driving signals at the next moment.
5. The lens focusing control device according to claim 1, characterized in that, Specifically, the adjustment module is configured to: Circularly query the current movement positions of the floating focusing groups; Compare the current movement positions of the queried floating focusing groups with the corresponding expected movement positions, and output the distance deviations; Adjust the driving current of the next cycle of the corresponding driving mechanism based on the distance deviations and the driving current of the current driving mechanism.
6. The lens focus control device according to claim 5, wherein The lens focusing control device further includes: A deviation correction module, configured to control the driving mechanisms to drive the corresponding floating focusing groups to move to their respective origin positions when a power-on signal is detected.
7. A method for controlling lens focusing, characterized in that, The lens includes a plurality of floating focusing groups, and each floating focusing group corresponds to a set of driving mechanisms and displacement sensors respectively. The lens focusing control method includes: Acquire the focusing information of the lens set by the user; Based on the focusing information, respectively determine the expected movement positions of the floating focusing groups; Based on the expected movement positions of the floating focusing groups, determine the driving signals of the driving mechanisms; Based on the driving signal, control the driving mechanism to drive the corresponding floating focusing group to move; Obtain the current movement position of the corresponding floating focusing group fed back by each displacement sensor; Based on the distance deviation between the current movement position and the expected movement position of each floating focusing group, adjust the driving signal of the corresponding driving mechanism to perform PID closed-loop control on each driving mechanism.
8. The lens focus control method according to claim 7, wherein The adjusting the driving signal of the corresponding driving mechanism based on the distance deviation between the current movement position and the expected movement position of each floating focusing group to perform PID closed-loop control on each driving mechanism includes: Calculate the distance deviation between the current movement position and the expected movement position of each floating focusing group; Input the distance deviation corresponding to each floating focusing group into the corresponding PID controller for weighting, differentiation, and integration processing, and output the corresponding driving signal deviation; Based on the driving signal deviation, adjust the driving signal of the corresponding driving mechanism for the next cycle to perform PID closed-loop control on each driving mechanism based on the adjusted driving signal.
9. A lens, characterized in that, The lens includes a plurality of floating focusing groups, each floating focusing group corresponds to a set of driving mechanism and displacement sensor respectively, and the lens further includes: a memory and at least one processor, and instructions are stored in the memory; The at least one processor calls the instructions in the memory to cause the lens to execute the lens focusing control method as claimed in claim 7 or 8.
10. A computer-readable storage medium having instructions stored thereon, characterized in that, When the instructions are executed by the processor, the lens focusing control method as claimed in claim 7 or 8 is implemented.