Lens control method, lens control device and lens control system
By using lens observation position and disturbance compensation in white light lens control, combined with generalized prediction and two-dimensional linear extended state observer, the problem of performance degradation caused by complex parameter adjustment and structural changes of the PID controller is solved, achieving higher robustness. sex and stability.
Patent Information
- Application Number
- CN202211736105.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-30
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2042-12-30
AI Technical Summary
In the existing electric adjustment control of white light lenses, the parameter adjustment of the PID controller is complex and sensitive to changes in structural and electrical characteristics, resulting in a decrease in control performance or oscillation.
The current actual position of the lens and the output control quantity at the previous moment are used for observation position and disturbance compensation. Through generalized prediction and parallel two-dimensional linear extended state observer, the control model is converted into a second-order model to avoid the influence of model order changes.
It improves the performance and robustness of lens control, simplifies parameter debugging, enhances adaptability to changes in structural and electrical characteristics, and reduces the risk of control performance degradation and oscillation.
Smart Images

Figure CN116193254B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of electronic technology, and in particular relates to a lens control method, a lens control device and a lens control system. Background Art
[0002] White light components are widely used in optoelectronic detection systems, mainly for detection and search. White light lenses realize the focusing and zooming functions of white light components by moving the focusing and zooming lenses, so that white light components can clearly and accurately image both distant and near targets. There are two ways to adjust the focusing and zooming lenses: manual (manually rotating the focusing and zooming mechanisms) and electric (rotating the focusing and zooming mechanisms through motors). The manual method is more complicated to operate; in industrial applications, the electric method is usually used.
[0003] The electric adjustment of the white light lens is a typical servo control process. Usually, a motor is used as an actuator, a position sensor as a feedback mechanism, and a digital controller as a controller to form a typical feedback control system. In the related art, the commonly used digital controller is PID. When PID is used to implement the electric adjustment of the white light lens, there are two inherent problems: (1) It contains the parameters Kp, Ki and Kd, and non-professionals cannot determine the parameters; (2) If the structure or electrical characteristics of the white light lens change, the previously debugged parameters will become inappropriate, which may cause the control performance to decline or even cause oscillation. Summary of the invention
[0004] The present application aims to solve at least one of the technical problems existing in the prior art. To this end, the present application proposes a lens control method, a lens control device and a lens control system to improve the performance and robustness of the lens control.
[0005] In a first aspect, the present application provides a lens control method, the method comprising:
[0006] Get the current actual position of the lens and the output control value at the last moment;
[0007] Based on the current actual position of the lens and the output control amount at the previous moment, obtaining the lens observation position and the lens disturbance compensation;
[0008] Performing generalized prediction based on a given lens position and an observed lens position to obtain a predicted control amount;
[0009] Based on the predicted control amount and the lens disturbance compensation, an output control amount for controlling a motor is obtained.
[0010] According to the lens control method of the present application, a two-dimensional linear extended state observer is connected in parallel to the generalized prediction, so that the control model is converted into a second-order model, thereby avoiding the influence of the change of model order on the generalized predictive control feedback correction process, thereby improving the performance and robustness of the lens control.
[0011] According to an embodiment of the present application, obtaining the lens observation position and the lens disturbance compensation based on the current actual position of the lens and the output control amount at the previous moment includes:
[0012] Constructing the relationship between the lens observation position, the lens observation speed and the lens disturbance compensation;
[0013] Based on the relationship, the current actual position of the lens and the output control amount at the previous moment, the lens observation position and the lens disturbance compensation are obtained.
[0014] According to one embodiment of the present application, the relationship is
[0015]
[0016] Among them, y is the current actual position of the lens, z 1 is the lens observation position, z 2 is the lens observation speed, z 3 To compensate for lens disturbance, For z i The derivative with respect to time, β i is the observation gain, i=1,2,3, D is the system gain, and u is the output control quantity at the previous moment.
[0017] According to one embodiment of the present application, the generalized prediction based on the given position of the lens and the observed position of the lens to obtain the predicted control amount includes:
[0018] Based on the data vector at the current moment, the system parameters are obtained by the gradual elimination least squares method;
[0019] Based on the system parameters, determining a system parameter matrix;
[0020] Determining a Diophantine equation coefficient matrix based on the system parameter matrix;
[0021] Determining prediction equation coefficients based on the system parameter matrix and the Diophantine equation coefficient matrix;
[0022] Based on the Diophantine equation coefficient matrix, the prediction equation coefficients, the lens observation position and the lens given position, a prediction control amount is obtained.
[0023] According to an embodiment of the present application, obtaining the system parameters by using the gradual elimination least squares method based on the data vector at the current moment includes:
[0024] Apply the formula
[0025]
[0026] Determine the system parameter θ(k) calculated at the current moment = [a 1 ,a 2 ,b 0 ,b 1 ], where θ(k-1) is the system parameter calculated at the previous moment; is the data vector at the current moment;
[0027] Δy(k-1)=z 1 (k-1)-z 1 (k-2)
[0028] Δy(k-2)=z 1 (k-2)-z 1 (k-3)
[0029] Δu(k-1)=u 0 (k-1)-u 0 (k-2)
[0030] Δu(k-2)=u 0 (k-2)-u 0 (k-3)
[0031] z 1 is the lens observation position, Ψ is the forgetting factor, K(k) is the weighting factor, and P(k) is a positive definite matrix;
[0032] The step of determining a system parameter matrix based on the system parameters comprises:
[0033] Apply the formula
[0034] A=[a 1 ,a 2 ]
[0035] B=[b 0 ,b 1 ]
[0036]
[0037] Determine the system parameter matrix A, B,
[0038] The step of determining a Diophantine equation coefficient matrix based on the system parameter matrix comprises:
[0039] Apply the formula
[0040] E[i]=G[i-1][0]
[0041]
[0042]
[0043] Determine the coefficient matrix E, G of the Diophantine equation; where 1≤i≤4, E[0]=1,
[0044] The step of determining prediction equation coefficients based on the system parameter matrix and the Diophantine equation coefficient matrix comprises:
[0045] Apply the formula
[0046] L[i]=E[i]*B[0]+H[i-1]
[0047] H[i]=E[i]*B[1]
[0048] Determine the prediction equation coefficients, L and H; where 1≤i≤4, L[0]=B[0], H[0]=B[1];
[0049] The step of obtaining the predicted control amount based on the Diophantine equation coefficient matrix, the prediction equation coefficients, the lens observation position and the lens given position comprises:
[0050] Apply the formula
[0051] dlt=L T (L T L)
[0052] u 0 =u 0 (k-1)+dlt(yr-HΔu-Gy)
[0053] Get the predicted control quantity u 0 ;
[0054] Among them, u 0 (k-1) is the predicted control amount at the previous moment, Δu=[u 0 (k-1)-u 0 (k-2),u 0 (k-2)-u 0 (k-3)] is the incremental vector output by the system, y=[z 1 (k),z 1 (k-1),z 1 (k-1)] is the actual position vector of the system, and yr is the given position of the lens.
[0055] In a second aspect, the present application provides a lens control device, the device comprising:
[0056] The first acquisition module is used to acquire the current actual position of the lens and the output control amount at the previous moment;
[0057] A first processing module, used for obtaining a lens observation position and a lens disturbance compensation based on the current actual position of the lens and the output control amount at the previous moment;
[0058] A second processing module is used for performing generalized prediction based on a given position of a lens and an observed position of the lens to obtain a predicted control amount;
[0059] The third processing module is used to obtain an output control amount for controlling the motor based on the predicted control amount and the lens disturbance compensation.
[0060] According to one embodiment of the present application, the first processing module is also used to construct a relationship between the lens observation position, the lens observation speed and the lens disturbance compensation; based on the relationship, the current actual position of the lens and the output control amount at the previous moment, the lens observation position and the lens disturbance compensation are obtained.
[0061] According to one embodiment of the present application, the third processing module is also used to obtain system parameters based on the data vector at the current moment through the gradual elimination least squares method; based on the system parameters, determine the system parameter matrix; based on the system parameter matrix, determine the Diophantine equation coefficient matrix; based on the system parameter matrix and the Diophantine equation coefficient matrix, determine the prediction equation coefficients; based on the Diophantine equation coefficient matrix, the prediction equation coefficients, the lens observation position and the lens given position, obtain the predicted control amount.
[0062] According to the lens control device of the present application, a two-dimensional linear extended state observer is connected in parallel to the generalized predictive control, so that the control system is converted into a second-order model, thereby avoiding the influence of the change of the model order on the generalized predictive control feedback correction process, thereby improving the performance and robustness of the lens control system.
[0063] In a third aspect, the present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the lens control method as described in the first aspect above when executing the computer program.
[0064] In a fourth aspect, the present application provides a non-transitory computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the lens control method as described in the first aspect above is implemented.
[0065] In a fifth aspect, the present application provides a chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the lens control method as described in the first aspect.
[0066] In a sixth aspect, the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the lens control method as described in the first aspect above.
[0067] In a seventh aspect, the present application provides a lens control system, the system comprising:
[0068] A position sensor, wherein the position sensor is used to detect the actual position of the lens;
[0069] A two-dimensional linear extended state observer, wherein the input end of the two-dimensional linear extended state observer is electrically connected to the position sensor, the input end of the two-dimensional linear extended state observer is used to access the current actual position of the lens and the output control amount of the lens control system at the previous moment, and the two-dimensional linear extended state observer is used to output the lens observation position and the lens disturbance compensation;
[0070] A generalized predictive controller is used to access the given lens position and the observed lens position, and the sum of the predicted control quantity output by the generalized predictive controller and the lens disturbance compensation is used as the output control quantity of the lens control system.
[0071] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0072] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the description of the embodiments in conjunction with the following drawings, in which:
[0073] Figure 1 is a flowchart of lens control provided by an embodiment of the present application;
[0074] Figure 2 is a structural schematic diagram of a lens control system provided in an embodiment of the present application;
[0075] Figure 3 is a structural schematic diagram of a lens control device provided in an embodiment of the present application;
[0076] Figure 4 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
[0077] Reference numerals:
[0078] Generalized predictive controller 210 , two-dimensional linear extended state observer 220 , position sensor 230 , motor 240 , lens 250 . DETAILED DESCRIPTION
[0079] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.
[0080] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.
[0081] In related technologies, generalized predictive controllers are also used for control. Compared with PID control, generalized predictive control has advanced features such as model prediction, rolling optimization, and feedback correction, showing better control performance and robustness. It also has the advantages of (1) simple parameter debugging; (2) automatic identification and avoidance of control performance degradation or oscillation when the structure and electrical characteristics of the white light lens change, and has broader prospects in the field of white light lens control.
[0082] However, during the research and development process, the inventors discovered that during the lens control process, the actual mathematical model order may change due to the influence of gear clearance, friction, etc., while the conventional generalized predictive controller can only identify the parameters of the model but not the order of the model, which has a significant impact on the performance and robustness of the generalized predictive control in the lens control scenario.
[0083] The lens control method, lens control device, electronic device and readable storage medium provided by the embodiments of the present application are described in detail below with reference to the accompanying drawings through specific embodiments and their application scenarios.
[0084] The lens control method may be applied to a terminal, and may be specifically executed by hardware or software in the terminal.
[0085] The lens control method provided in the embodiment of the present application may be executed by an electronic device or a functional module or functional entity in the electronic device that can implement the lens control method. The electronic devices mentioned in the embodiment of the present application include but are not limited to computers, mobile phones, tablet computers, cameras, and wearable devices. The lens control method provided in the embodiment of the present application is described below using an electronic device as an example of an execution subject.
[0086] like Figure 1 As shown, the lens control method includes: step 110, step 120, step 130 and step 140.
[0087] Step 110, obtaining the current actual position of the lens and the output control amount at the previous moment;
[0088] The current actual position of the lens can be acquired by a position sensor, and the position sensor can be a potentiometer or other position sensors.
[0089] The output control amount at the last moment is the output control amount obtained by the lens control method at the last moment, and is used to control the movement of the motor of the lens at the last moment.
[0090] Step 120, obtaining the lens observation position and lens disturbance compensation based on the current actual position of the lens and the output control amount at the previous moment;
[0091] This step can be achieved by a two-dimensional linear extended state observer, such as Figure 2 As shown in the figure, in this lens control system, a two-dimensional linear extended state observer is connected in parallel to the generalized predictive controller, so that the mathematical model of lens control can be forcibly converted into a second-order model. The input of the two-dimensional linear extended state observer is the current actual position y of the lens and the output control amount u at the previous moment. The one-dimensional output z of the two-dimensional linear extended state observer is 1 As the input of the generalized predictive control position, the two-dimensional linear extended state observer also outputs the disturbance part z 3 As lens disturbance compensation.
[0092] Step 120, based on the current actual position of the lens and the output control amount at the previous moment, obtaining the lens observation position and the lens disturbance compensation, may include: inputting the current actual position y of the lens and the output control amount u at the previous moment into a two-dimensional linear extended state observer, obtaining the lens observation position z output by the two-dimensional linear extended state observer; 1 and lens disturbance compensation z 3 .
[0093] Step 130, performing generalized prediction based on the given position of the lens and the observed position of the lens to obtain a predicted control amount;
[0094] This step can be achieved by a generalized predictive controller, such as Figure 2 As shown in the figure, in the lens control system, the input end of the generalized predictive controller receives the one-dimensional output lens observation position z of the two-dimensional linear extended state observer. 1 and the given lens position yr, the generalized predictive controller is based on the observed lens position z 1 And the difference between the given position yr of the lens, output the predicted control amount u 0 .
[0095] Step 130, performing generalized prediction based on the given lens position and the observed lens position to obtain the predicted control amount, may include: 1 Input to the generalized predictive controller to obtain the predicted control quantity u output by the generalized predictive controller 0 .
[0096] In the related art, the predicted control quantity is generally used as the output to control the motor. After research, the inventors found that in the lens control scenario, due to the influence of gear clearance, friction, etc., the robustness of this control is poor.
[0097] Step 140: Based on the predicted control amount and the lens disturbance compensation, an output control amount for controlling the motor is obtained.
[0098] In this step, the lens disturbance compensation z obtained in step 120 is 3 and the predicted control amount u obtained in step 130 0 By synthesizing, we can get the output control quantity u used to control the motor. In actual implementation, the output control quantity u can be the lens disturbance compensation z 3 and the predicted control variable u 0 Simple summation, or weighted summation, etc.
[0099] In actual implementation, the predicted control quantity u of the comprehensive generalized predictive control is 0 and the lens disturbance compensation z output by the two-dimensional linear extended state observer 3 , output control quantity u=u to the motor 0 +z 3 .
[0100] The output control value u fully considers the effects of gear clearance, friction, etc., and has excellent robustness in the lens control scenario.
[0101] The above steps 110 to 140 are repeatedly executed at regular control cycles to achieve effective control of the lens.
[0102] The above lens control method is a generalized predictive controller connected in parallel with a two-dimensional linear extended state observer, which forcibly converts the mathematical model of lens control into a second-order model. The input of the two-dimensional linear extended state observer is the current actual position y of the lens and the output control amount u at the previous moment. The one-dimensional output of the two-dimensional linear extended state observer is the lens observation position z. 1 As the input of the generalized predictive control position, the two-dimensional linear extended state observer also outputs the disturbance part z 3 The output of the generalized predictive controller is incorporated as lens disturbance compensation.
[0103] According to the lens control method provided in the embodiment of the present application, a two-dimensional linear extended state observer is connected in parallel to the generalized prediction, so that the control model is converted into a second-order model, thereby avoiding the influence of the change of the model order on the generalized predictive control feedback correction process, thereby improving the performance and robustness of the lens control method.
[0104] In some embodiments, step 120, obtaining the lens observation position and lens disturbance compensation based on the current actual position of the lens and the output control amount at the previous moment, includes:
[0105] Constructing the relationship between the lens observation position, the lens observation speed and the lens disturbance compensation;
[0106] Based on the relationship, the current actual position of the lens and the output control amount at the previous moment, the lens observation position and lens disturbance compensation are obtained.
[0107] In this embodiment, by analyzing the multi-level relationship between the lens observation position and the lens disturbance compensation and introducing the variable of the lens observation speed, the lens observation position and the lens disturbance compensation can be obtained more simply and accurately, thereby helping the lens control method to obtain an output control quantity with good robustness more quickly and accurately.
[0108] In some embodiments, the relationship between the lens observation position, the lens observation speed and the lens disturbance compensation is:
[0109]
[0110] Among them, y is the current actual position of the lens, z 1 is the lens observation position, z 2 is the lens observation speed, z 3 To compensate for lens disturbance, For z i The derivative with respect to time, β i is the observation gain, i=1,2,3, D is the system gain, and u is the output control quantity at the previous moment.
[0111] In other words, a two-dimensional linear extended state observer can be constructed in advance according to the above relationship, so that the current actual position y of the lens and the observed position z of the lens can be obtained. 1 , lens observation speed z 2 , lens disturbance compensation z 3 The relationship between the output control quantity u at the previous moment.
[0112] Among them, β 1 , β 2 and β 3 is the observation gain. In this lens control method, β 1 You can take 300, β 2 You can take 30000, β 3 You can choose 1000000, of course, you can also choose other values based on experience; For z 1 The derivative of time, For z 2 The derivative of time, For z 3 The derivative with respect to time; D is the system gain, which is a parameter that needs to be actually debugged.
[0113] The above two-dimensional linear extended state observer can calculate the lens observation position z based on the read current actual position y of the lens and the output control amount u at the previous moment 1 and lens disturbance compensation z 3 .
[0114] In some embodiments, step 130, performing a generalized prediction based on the given lens position and the observed lens position to obtain a predicted control amount, includes:
[0115] Based on the data vector at the current moment, the system parameters are obtained by the gradual elimination least squares method;
[0116] Based on the system parameters, a system parameter matrix is determined;
[0117] Based on the system parameter matrix, determine the coefficient matrix of the Diophantine equation;
[0118] Determine prediction equation coefficients based on the system parameter matrix and the Diophantine equation coefficient matrix;
[0119] The predicted control quantity is obtained based on the coefficient matrix of the Diophantine equation, the coefficients of the prediction equation, the observed position of the lens and the given position of the lens.
[0120] The above-mentioned method of obtaining the predicted control quantity can refer to the algorithm of generalized predictive control, but the difference from the generalized predictive algorithm in the related art is that the lens observation position introduced in this step in the present application is the lens observation position obtained by the aforementioned embodiment, so that the predicted control quantity determined by the algorithm can partially reduce the influence of gear clearance, friction, etc., and this control is more robust.
[0121] In actual execution, based on the current data vector, the system parameters are obtained by the gradual elimination least squares method, including:
[0122] Apply the formula
[0123]
[0124] Determine the system parameter θ(k) calculated at the current moment = [a 1 ,a 2 ,b 0 ,b 1 ], where θ(k-1) is the system parameter calculated at the previous moment; is the data vector at the current moment;
[0125] Δy(k-1)=z 1 (k-1)-z 1 (k-2)
[0126] Δy(k-2)=z 1 (k-2)-z 1 (k-3)
[0127] Δu(k-1)=u 0 (k-1)-u 0 (k-2)
[0128] Δu(k-2)=u 0 (k-2)-u 0 (k-3)
[0129] z 1 is the lens observation position, Ψ is the forgetting factor, for example, Ψ can be determined to be 0.95, K(k) is the weighting factor, and P(k) is a positive definite matrix;
[0130] Based on the system parameters, determine the system parameter matrix, including:
[0131] Apply the formula
[0132] A=[a 1 ,a 2 ]
[0133] B=[b 0 ,b 1 ]
[0134]
[0135] Determine the system parameter matrix A, B,
[0136] Based on the system parameter matrix, determine the Diophantine equation coefficient matrix, including:
[0137] Apply the formula
[0138] E[i]=G[i-1][0]
[0139]
[0140]
[0141] Determine the coefficient matrix E, G of the Diophantine equation; where 1≤i≤4, E[0]=1,
[0142] Based on the system parameter matrix and the Diophantine equation coefficient matrix, the prediction equation coefficients are determined, including:
[0143] Apply the formula
[0144] L[i]=E[i]*B[0]+H[i-1]
[0145] H[i]=E[i]*B[1]
[0146] Determine the prediction equation coefficients, L and H; where 1≤i≤4, L[0]=B[0], H[0]=B[1];
[0147] Based on the Diophantine equation coefficient matrix, prediction equation coefficients, lens observation position and lens given position, the prediction control quantity includes:
[0148] Apply the formula
[0149] dlt=L T (L T L)
[0150] u 0 =u 0 (k-1)+dlt(yr-HΔu-Gy)
[0151] Get the predicted control quantity u 0 ;
[0152] Among them, u 0 (k-1) is the predicted control amount at the previous moment, Δu=[u 0 (k-1)-u 0 (k-2),u 0 (k-2)-u0 (k-3)] is the incremental vector output by the system, y=[z 1 (k),z 1 (k-1),z 1 (k-1)] is the actual position vector of the system, and yr is the given position of the lens.
[0153] In summary, the above-mentioned lens control, without changing the basic control logic of generalized predictive control, connects a two-dimensional linear extended state observer in parallel. In the lens control scenario, it fully considers the effects of gear clearance, friction, etc., and effectively improves the control performance and robustness.
[0154] The embodiment of the present application also provides a lens control system.
[0155] like Figure 2 As shown, the lens control system includes: a position sensor 230, a two-dimensional linear expansion state observer 220 and a generalized prediction controller 210.
[0156] The position sensor 230 is used to detect the actual position of the lens, and the position sensor 230 may be a potentiometer or other position sensors 230 .
[0157] The input end of the two-dimensional linear extended state observer 220 is electrically connected to the position sensor 230, and the input end of the two-dimensional linear extended state observer 220 is also electrically connected to the output end of the lens control system. The input end of the two-dimensional linear extended state observer 220 is used to access the current actual position y of the lens and the output control amount u of the lens control system at the previous moment, and the two-dimensional linear extended state observer 220 is used to output the lens observation position z 1 and lens disturbance compensation z 3 ;
[0158] The input end of the generalized prediction controller 210 is electrically connected to the input end of the lens control system to access the lens given position yr; the input end of the generalized prediction controller 210 is also electrically connected to the output end of the two-dimensional linear expansion state observer 220 to access the lens observation position z 1 The generalized prediction controller 210 is used to access the lens given position yr and the lens observation position z 1 The generalized prediction controller 210 is used to calculate the lens given position yr and the lens observed position z based on the input 1 The difference output prediction control quantity u 0 , and the predicted control variable u output by the generalized predictive controller 210 0 and lens disturbance compensation z 3 The sum is taken as the output control quantity u of the lens control system.
[0159] The output control quantity u of the lens control system is used to control the motor 240, and the motor 240 is connected to the zoom or focus lens 250 by power coupling. The motor 240 is used to control the movement of the lens 250 to achieve zoom or focus.
[0160] According to the lens control system provided in the embodiment of the present application, by connecting the two-dimensional linear extended state observer 220 in parallel to the generalized predictive controller 210, the control system is converted into a second-order model, thereby avoiding the influence of the change of the model order on the feedback correction process of the generalized predictive controller 210, thereby improving the performance and robustness of the lens control system.
[0161] The lens control system provided according to the embodiment of the present application can execute the lens control method of any of the above implementations.
[0162] The lens control method provided in the embodiment of the present application can be executed by a lens control device. In the embodiment of the present application, the lens control device provided in the embodiment of the present application is described by taking the lens control method executed by the lens control device as an example.
[0163] The embodiment of the present application also provides a lens control device.
[0164] like Figure 3 As shown, the lens control device includes: a first acquisition module 310 , a first processing module 320 , a second processing module 330 and a third processing module 340 .
[0165] The first acquisition module 310 is used to acquire the current actual position of the lens and the output control amount at the previous moment;
[0166] The first processing module 320 is used to obtain the lens observation position and the lens disturbance compensation based on the current actual position of the lens and the output control amount at the previous moment;
[0167] The second processing module 330 is used to perform generalized prediction based on the given position of the lens and the observed position of the lens to obtain a predicted control amount;
[0168] The third processing module 340 is used to obtain an output control amount for controlling the motor based on the predicted control amount and the lens disturbance compensation.
[0169] According to the lens control device provided in the embodiment of the present application, a two-dimensional linear extended state observer is connected in parallel to the generalized predictive control, so that the control system is converted into a second-order model, thereby avoiding the influence of the change of the model order on the generalized predictive control feedback correction process, thereby improving the performance and robustness of the lens control system.
[0170] In some embodiments, the first processing module 320 is also used to construct a relationship between the lens observation position, the lens observation speed and the lens disturbance compensation; based on the relationship, the current actual position of the lens and the output control amount at the previous moment, the lens observation position and the lens disturbance compensation are obtained.
[0171] In some embodiments, the above relationship is
[0172]
[0173] Among them, y is the current actual position of the lens, z 1 is the lens observation position, z 2 is the lens observation speed, z 3 To compensate for lens disturbance, For z i The derivative with respect to time, β i is the observation gain, i=1,2,3, D is the system gain, and u is the output control quantity at the previous moment.
[0174] In some embodiments, the second processing module 330 is also used to obtain system parameters based on the current data vector by the gradual elimination least squares method; determine the system parameter matrix based on the system parameters; determine the Diophantine equation coefficient matrix based on the system parameter matrix; determine the prediction equation coefficients based on the system parameter matrix and the Diophantine equation coefficient matrix; obtain the predicted control quantity based on the Diophantine equation coefficient matrix, the prediction equation coefficients, the lens observation position and the lens given position.
[0175] In some embodiments, the second processing module 330 is further configured to apply the formula
[0176]
[0177] Determine the system parameter θ(k) calculated at the current moment = [a 1 ,a 2 ,b 0 ,b 1 ], where θ(k-1) is the system parameter calculated at the previous moment; is the data vector at the current moment;
[0178] Δy(k-1)=z 1 (k-1)-z 1 (k-2)
[0179] Δy(k-2)=z 1 (k-2)-z 1 (k-3)
[0180] Δu(k-1)=u 0 (k-1)-u 0 (k-2)
[0181] Δu(k-2)=u 0 (k-2)-u 0 (k-3)
[0182] z 1 is the lens observation position, Ψ is the forgetting factor, K(k) is the weighting factor, and P(k) is a positive definite matrix;
[0183] Based on the system parameters, determine the system parameter matrix, including:
[0184] Apply the formula
[0185] A=[a 1 ,a 2 ]
[0186] B=[b 0 ,b 1 ]
[0187]
[0188] Determine the system parameter matrix A, B,
[0189] Based on the system parameter matrix, determine the Diophantine equation coefficient matrix, including:
[0190] Apply the formula
[0191] E[i]=G[i-1][0]
[0192]
[0193]
[0194] Determine the coefficient matrix E, G of the Diophantine equation; where 1≤i≤4, E[0]=1,
[0195] Based on the system parameter matrix and the Diophantine equation coefficient matrix, the prediction equation coefficients are determined, including:
[0196] Apply the formula
[0197] L[i]=E[i]*B[0]+H[i-1]
[0198] H[i]=E[i]*B[1]
[0199] Determine the prediction equation coefficients, L and H; where 1≤i≤4, L[0]=B[0], H[0]=B[1];
[0200] Based on the Diophantine equation coefficient matrix, prediction equation coefficients, lens observation position and lens given position, the prediction control quantity includes:
[0201] Apply the formula
[0202] dlt=L T (L T L)
[0203] u 0 =u 0 (k-1)+dlt(yr-HΔu-Gy)
[0204] Get the predicted control quantity u 0 ;
[0205] Among them, u 0 (k-1) is the predicted control amount at the previous moment, Δu=[u 0 (k-1)-u 0 (k-2),u 0 (k-2)-u 0 (k-3)] is the incremental vector output by the system, y=[z 1 (k),z 1 (k-1),z 1 (k-1)] is the actual position vector of the system, and yr is the given position of the lens.
[0206] The lens control device in the embodiment of the present application can be an electronic device, or a component in the electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal, or other devices other than a terminal. Exemplarily, the electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, a vehicle-mounted electronic device, a mobile Internet device (Mobile Internet Device, MID), an augmented reality (augmented reality, AR) / virtual reality (virtual reality, VR) device, a robot, a wearable device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook or a personal digital assistant (personal digital assistant, PDA), etc. It can also be a server, a network attached storage (Network Attached Storage, NAS), a personal computer (personal computer, PC), a television (television, TV), a teller machine or a self-service machine, etc., which is not specifically limited in the embodiment of the present application.
[0207] The lens control device in the embodiment of the present application may be a device having an operating system. The operating system may be a Microsoft (Windows) operating system, an Android (Android) operating system, an IOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.
[0208] The lens control device provided in the embodiment of the present application can achieve Figure 1 To avoid repetition, the various processes implemented by the method embodiment are not described here.
[0209] In some embodiments, Figure 4 As shown, the embodiment of the present application also provides an electronic device 400, including a processor 401, a memory 402, and a computer program stored in the memory 402 and executable on the processor 401. When the program is executed by the processor 401, each process of the above-mentioned lens control method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be described here.
[0210] It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic devices and non-mobile electronic devices mentioned above.
[0211] The embodiment of the present application also provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, each process of the above-mentioned lens control method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0212] The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.
[0213] An embodiment of the present application further provides a computer program product, including a computer program, which implements the above-mentioned lens control method when executed by a processor.
[0214] The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.
[0215] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned lens control method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0216] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.
[0217] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.
[0218] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0219] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
[0220] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "illustrative embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials, or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
[0221] Although the embodiments of the present application have been shown and described, those skilled in the art will appreciate that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present application, and that the scope of the present application is defined by the claims and their equivalents.
Claims
1. A lens control method, characterized in that: include: Get the current actual position of the lens and the output control value at the last moment; Based on the current actual position of the lens and the output control amount at the previous moment, obtaining the lens observation position and the lens disturbance compensation, including inputting the current actual position of the lens and the output control amount at the previous moment into a two-dimensional linear extended state observer, and obtaining the lens observation position and the lens disturbance compensation output by the two-dimensional linear extended state observer; Performing generalized prediction based on the given lens position and the observed lens position to obtain a predicted control amount, including inputting the given lens position and the observed lens position into a generalized prediction controller to obtain a predicted control amount output by the generalized prediction controller; Based on the predicted control amount and the lens disturbance compensation, an output control amount for controlling a motor is obtained.
2. The lens control method according to claim 1, characterized in that: The obtaining of the lens observation position and lens disturbance compensation based on the current actual position of the lens and the output control amount at the previous moment comprises: Constructing the relationship between the lens observation position, the lens observation speed and the lens disturbance compensation; Based on the relationship, the current actual position of the lens and the output control amount at the previous moment, the lens observation position and the lens disturbance compensation are obtained.
3. The lens control method according to claim 2, characterized in that: The relationship is Among them, y is the current actual position of the lens, z1 is the lens observation position, z2 is the lens observation speed, and z3 is the lens disturbance compensation. For z i The derivative with respect to time, β i is the observation gain, i=1,2,3, D is the system gain, and u is the output control quantity at the previous moment.
4. The lens control method according to claim 3, characterized in that: The generalized prediction based on the given position of the lens and the observed position of the lens to obtain the predicted control amount includes: Based on the data vector at the current moment, the system parameters are obtained by the gradual elimination least squares method; Based on the system parameters, determining a system parameter matrix; Determining a Diophantine equation coefficient matrix based on the system parameter matrix; Determining prediction equation coefficients based on the system parameter matrix and the Diophantine equation coefficient matrix; Based on the Diophantine equation coefficient matrix, the prediction equation coefficients, the lens observation position and the lens given position, a prediction control amount is obtained.
5. The lens control method according to claim 4, characterized in that: The method of obtaining the system parameters based on the current data vector by using the gradual elimination least squares method includes: Apply the formula Determine the system parameter θ(k) calculated at the current moment, where θ(k-1) is the system parameter calculated at the previous moment; is the data vector at the current moment; Δy(k-1)=z1(k-1)-z1(k-2) Δy(k-2)=z1(k-2)-z1(k-3) Δu(k-1)=u0(k-1)-u0(k-2) Δu(k-2)=u0(k-2)-u0(k-3) z1 is the lens observation position, Ψ is the forgetting factor, K(k) is the weighting factor, P(k) is the positive definite matrix, and u0(k-1) is the predicted control amount at the previous moment.
6. A lens control device, characterized in that: include: The first acquisition module is used to acquire the current actual position of the lens and the output control amount at the previous moment; A first processing module is used to obtain a lens observation position and a lens disturbance compensation based on the current actual position of the lens and the output control amount at the previous moment, including inputting the current actual position of the lens and the output control amount at the previous moment into a two-dimensional linear extended state observer to obtain the lens observation position and the lens disturbance compensation output by the two-dimensional linear extended state observer; A second processing module is used for performing generalized prediction based on the given lens position and the observed lens position to obtain a predicted control amount, including inputting the given lens position and the observed lens position into a generalized prediction controller to obtain the predicted control amount output by the generalized prediction controller; The third processing module is used to obtain an output control amount for controlling the motor based on the predicted control amount and the lens disturbance compensation.
7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the lens control method according to any one of claims 1 to 5 is implemented.
8. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the lens control method as described in any one of claims 1 to 5 is implemented.
9. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the lens control method according to any one of claims 1 to 5 is implemented.
10. A lens control system, characterized in that: include: A position sensor, wherein the position sensor is used to detect the actual position of the lens; A two-dimensional linear extended state observer, wherein the input end of the two-dimensional linear extended state observer is electrically connected to the position sensor, the input end of the two-dimensional linear extended state observer is used to access the current actual position of the lens and the output control amount of the lens control system at the previous moment, and the two-dimensional linear extended state observer is used to output the lens observation position and the lens disturbance compensation; A generalized predictive controller is used to access the given lens position and the observed lens position, and the sum of the predicted control quantity output by the generalized predictive controller and the lens disturbance compensation is used as the output control quantity of the lens control system.
Citation Information
Patent Citations
Linear motor motion control method, device and equipment and storage medium
CN115085611A
