A method for quickly adjusting control parameters of a continuous zoom lens
By collecting the first-stage step response data of the continuous zoom lens drive motor and calculating the system control transfer function, the speed loop PID control parameters are quickly calculated, which solves the problem of traditional adjustment dependence experience and realizes rapid and quantitative parameter adjustment.
Patent Information
- Application Number
- CN202410789038.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-19
- Publication Date
- 2025-02-28
- Estimated Expiration
- 2044-06-19
AI Technical Summary
The adjustment of traditional speed ring PID control parameters depends on debugging experience, which makes it difficult for inexperienced engineering and technicians to quickly adjust the control parameters of the continuous zoom lens, thereby slowing down the progress of the project.
By collecting the first-stage step response data of the continuous zoom lens drive motor, the system control transfer function is calculated, and it is substituted into the built control model to quickly calculate a set of speed loop PID control parameters.
The empirical dependence of PID control parameter adjustment is reduced, the adjustment process is quantified, the adjustment time is reduced, and the continuous zoom lens parameter adjustment speed is improved.
Smart Images

Figure CN118466170B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of continuous zoom lens servo control, and in particular to a method for quickly adjusting control parameters of a continuous zoom lens. Background Art
[0002] A varifocal lens generally consists of a varifocal lens, a DC brushed motor assembly (with encoder) and a servo control board.
[0003] Continuous zoom lenses generally use PID closed-loop control to achieve high-precision control of zoom and focus compensation. Since different types of continuous zoom lenses have different motion mechanism coordination methods, different transmission methods, and different speed index requirements, the control parameters (kp, ki, kd) of the corresponding continuous zoom lenses also need to be adjusted. However, the value range of the control parameters is the entire real number domain, which makes the traditional speed loop PID control parameter adjustment very dependent on debugging experience, which brings great challenges to engineering and technical personnel who lack debugging experience to complete the adjustment of continuous zoom lens control parameters, thereby slowing down the progress of the project. Therefore, a PID control parameter fast adjustment method is needed to reduce the experience dependence of PID control parameter adjustment. Summary of the invention
[0004] The technical problem to be solved by the present invention is to provide a method for quickly adjusting the control parameters of a continuous zoom lens, which can reduce the empirical dependence of PID control parameter adjustment and quickly adjust the speed loop parameters (kp, ki, kd), thereby shortening the adjustment time of the PID control parameters of the continuous zoom lens.
[0005] In order to solve the above technical problems, the technical solutions adopted by the present invention are as follows.
[0006] A method for quickly adjusting the control parameters of a continuous zoom lens comprises the following steps: firstly collecting the first-order step response of a continuous zoom lens driving motor; then calculating the control transfer function of the continuous zoom system; finally substituting the transfer function into a built continuous zoom lens control model to calculate a set of speed loop PID control parameters; specifically comprising: a first-order step response data extraction strategy of the lens driving motor and a speed loop parameter quick calculation strategy.
[0007] Preferably, the first-order step response data extraction strategy of the lens drive motor specifically includes the following steps:
[0008] A1. Build a PID controller for a continuous zoom lens;
[0009] A2. Discard the PID calculated value and forcibly change the PID calculated value to a fixed duty cycle to drive the motor;
[0010] A3. Output the fixed duty cycle and the current speed of the motor through the serial port.
[0011] Preferably, the amount of data transmitted via the serial port in step A3 is as small as possible to reduce the effect of the serial port transmission time on the data authenticity of the first-order step response.
[0012] Preferably, the speed loop parameter fast calculation strategy specifically includes the following steps:
[0013] B1. Write a MATLAB data reading program and use Simulink to build a continuous zoom lens control model;
[0014] B2. Use MATLAB system identification tools to identify the first-order step response of the continuous zoom motor and calculate the transfer function;
[0015] B3. Substitute the transfer function calculated in step B2 into the control model and adjust the speed loop PID control parameters according to the system response speed requirements and robustness requirements;
[0016] B4. Verify the effect of speed loop PID control parameters.
[0017] Preferably, the step B4 is specifically as follows: substituting the speed loop PID control parameters into the board-level controller to check whether the speed waveform is smooth and whether the motor runs smoothly. If the speed waveform is smooth and the motor runs smoothly, the parameter adjustment process is terminated, otherwise jump to step A1.
[0018] Due to the adoption of the above technical scheme, the technical progress achieved by the present invention is as follows.
[0019] The invention collects the first-order step response of the continuous zoom lens driving motor first; then calculates the continuous zoom system control transfer function through MATLAB system identification; finally substitutes the transfer function into the motor control model built by simulink, and calculates a set of speed loop PID control parameters according to the system response speed and robustness, which can reduce the experience dependence of traditional PID control parameter adjustment, quantify the adjustment process of PID control parameters, and reduce the PID control parameter adjustment time at the same time, thereby accelerating the parameter adjustment speed of the continuous zoom lens. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 It is a hardware connection block diagram of the present invention;
[0021] Figure 2 is a block diagram of the software system of the present invention;
[0022] Figure 3 It is the PID control flow chart of the present invention;
[0023] Figure 4 It is a schematic diagram of the Simulink control model of the present invention;
[0024] Figure 5It is a flow chart of the present invention. DETAILED DESCRIPTION
[0025] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0026] A method for quickly adjusting the control parameters of a continuous zoom lens is proposed. The method first collects the first-order step response of the continuous zoom lens drive motor; then calculates the control transfer function of the continuous zoom system; finally, substitutes the transfer function into the constructed continuous zoom lens control model to calculate a set of speed loop PID control parameters (kp, ki, kd).
[0027] like Figure 1 As shown, the hardware of the present invention mainly consists of:
[0028] A servo control board, a brushed DC motor with an encoder, and a variable-focus lens. The brushed DC motor with an encoder is connected to the servo control board through a connector. The connector includes two motor power supply lines, two encoder power supply lines, and two encoder signal lines (phase A and phase B). The motor controls the rotation of the variable-focus lens sleeve through gear transmission, thereby driving the lens group to perform linear motion in the sleeve. When the motor rotates, the two signal lines of the encoder output a set of orthogonal signals. The servo control board is an MCU board, which receives and analyzes the current absolute position of the motor through the encoder's dedicated interface.
[0029] like Figure 2 As shown, the software of the present invention mainly consists of:
[0030] The motor drive interface can realize the forward and reverse rotation and speed control of the motor; the motor encoder interface can realize the real-time acquisition of the absolute position of the motor; the speed loop PID control algorithm can calculate the motor movement direction and speed according to the motor feedback position and the system given position, and finally drive the motor to rotate according to the speed loop calculation result, such as Figure 3 shown.
[0031] like Figure 4 As shown, the method for rapidly adjusting the control parameters of a continuous zoom lens of the present invention is mainly divided into two parts: a first-order step response data extraction strategy of a lens drive motor and a rapid calculation strategy of speed loop parameters.
[0032] The first-order step response data extraction strategy of the lens drive motor specifically includes the following steps:
[0033] A1. Build a PID controller for a continuous zoom lens.
[0034] Specifically written by algorithm.
[0035] A2. Discard the PID calculated value and forcibly change the PID calculated value to a fixed duty cycle to drive the motor.
[0036] The PID calculated value is discarded and the fixed duty cycle is used to drive the motor in order to introduce the time required for the PID calculation process into the first-order step control process.
[0037] A3. Output the fixed duty cycle and the current speed of the motor through the serial port, and keep the amount of data transmitted by the serial port as small as possible.
[0038] The amount of data transmitted through the serial port is kept as small as possible in order to reduce the impact of the serial port transmission time on the data authenticity of the first-order step response.
[0039] The speed loop parameter fast calculation strategy includes the following steps:
[0040] B1. Write a MATLAB data reading program and use Simulink to build a continuous zoom lens control model.
[0041] Specifically, the continuous zoom lens control model built using simulink is as follows: Figure 5 shown.
[0042] B2. Use MATLAB system identification tools to identify the first-order step response of the continuous zoom motor and calculate the transfer function;
[0043] B3. Substitute the transfer function calculated in step B2 into the control model, and adjust the speed loop PID control parameters (kp, ki, kd) according to the system response speed requirements and robustness requirements;
[0044] B4. Verify the effect of speed loop PID control parameters (kp, ki, kd).
[0045] Specifically, substitute the speed loop PID control parameters (kp, ki, kd) into the board-level controller to check whether the speed waveform is smooth and whether the motor runs smoothly. If the speed waveform is smooth and the motor runs smoothly, end the parameter adjustment process, otherwise jump to step A1.
[0046] The present invention has the following advantages when used:
[0047] a) Reduce the empirical dependence of traditional PID control parameter adjustment;
[0048] b) Quantify the adjustment process of PID control parameters;
[0049] c) Reduce the PID control parameter adjustment time and speed up the continuous zoom lens parameter adjustment speed.
Claims
1. A method for quickly adjusting control parameters of a continuous zoom lens, characterized in that: The method first collects the first-order step response of the continuous zoom lens drive motor; then calculates the continuous zoom system control transfer function; finally substitutes the transfer function into the built continuous zoom lens control model to calculate a set of speed loop PID control parameters; specifically includes: a first-order step response data extraction strategy for the lens drive motor and a speed loop parameter fast calculation strategy; The first-order step response data extraction strategy of the lens drive motor specifically includes the following steps: A1. Build a PID controller for a continuous zoom lens; A2. Discard the PID calculated value and forcibly change the PID calculated value to a fixed duty cycle to drive the motor; A3. Output the fixed duty cycle and the current speed of the motor through the serial port; The speed loop parameter fast calculation strategy specifically includes the following steps: B1. Write a MATLAB data reading program and use Simulink to build a continuous zoom lens control model; B2. Use MATLAB system identification tools to identify the first-order step response of the continuous zoom motor and calculate the transfer function; B3. Substitute the transfer function calculated in step B2 into the control model and adjust the speed loop PID control parameters according to the system response speed requirements and robustness requirements; B4. Verify the effect of speed loop PID control parameters; The step B4 is specifically as follows: substituting the speed loop PID control parameters into the board-level controller to check whether the speed waveform is smooth and whether the motor runs smoothly. If the speed waveform is smooth and the motor runs smoothly, the parameter adjustment process is terminated, otherwise jump to step A1.
Citation Information
Patent Citations
PID optimization simulation system based on system identification and PLC
CN112947122A
Continuous zoom lens running-in test device and method
CN115826183A