Low cumulative error data processing method for continuous zoom lens control system

By adopting the encoder zero-crossing error strategy and closed-loop zero-finishing strategy of the MCU+ incremental encoder in the continuous zoom lens control system, the problems of small amplitude oscillation and zero-crossing accumulation error in the system are solved, and high-precision lens position detection is achieved , reducing costs and space usage.

CN118584792BActive Publication Date: 2024-11-01JIANGSU NORTH LAKE OPTOELECTRONICS CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202410789062.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-19
Publication Date
2024-11-01
Estimated Expiration
2044-06-19

AI Technical Summary

Technical Problem

The continuous zoom lens has small amplitude oscillation and zero-crossing cumulative error problems in the servo control system, which makes it difficult to effectively solve the detection solutions with low accuracy and high cost.

Method used

The MCU+ incremental encoder is used as the lens position detection device, and the absolute position strategy and the closed-loop zero-seeking strategy of the servo control system are calculated by cumulatively calculating the encoder without zero-crossing error, eliminating the encoder zero-crossing error and accurately detecting the absolute position of the lens.

Benefits of technology

It realizes accurate detection of lens position, reduces zero-seeking errors in the servo control system, solves the problems of large space occupation and high cost, and improves the accuracy and efficiency of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118584792B_ABST
    Figure CN118584792B_ABST
Patent Text Reader

Abstract

The invention discloses a low cumulative error data processing method applied to a continuous zoom lens control system, including an encoder cumulative calculation absolute position strategy without zero-crossing error and a servo control system closed-loop zero-seeking strategy; the encoder cumulative calculation absolute position strategy without zero-crossing error specifically includes the following steps: configuring the encoder interface of the MCU; reading the current value of the encoder interface; setting the encoder interface base value; calculating the encoder change code value of the current cycle; calculating the encoder absolute position code value of the current cycle; the servo control system closed-loop zero-seeking strategy specifically includes the following steps: initializing PID parameters; reading the encoder absolute position code value; setting the target code value to: encoder absolute position code value-step value; detecting the zero position signal; setting the target code value to: encoder absolute position code value+step value; detecting the maximum limit signal. The invention can accurately detect the absolute position of the encoder, eliminate the encoder zero-crossing error, and reduce the servo control system zero-seeking error.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of continuous zoom lens servo control, and in particular to a low cumulative error data processing method applied to a continuous zoom lens control system. Background Art

[0002] Continuous zoom lenses generally use a DC brushed motor with an incremental encoder to drive the zoom lens group and the focusing lens group to perform high-precision reciprocating motion in a fixed travel range, thereby achieving high-precision control of the position of the field of view and focal length compensation of the continuous zoom lens.

[0003] At present, existing continuous zoom lenses generally use potentiometers as lens position detection devices, or use FPGA + incremental encoders as lens position detection devices, but the potentiometer as a position detection device has the disadvantage of occupying a large space; the FPGA + encoder detection solution has the disadvantage of high cost. With the development of MCU technology, high-performance MCUs already have a dedicated detection interface for incremental encoders. Using MCU + incremental encoders as lens position detection devices can reduce the cost and size of continuous zoom lens servo control systems.

[0004] However, the motor of the continuous zoom lens has a characteristic of slight oscillation in the closed-loop control static state, so the MCU dedicated interface detects the incremental encoder with zero-crossing cumulative errors. At the same time, the number of revolutions of the continuous zoom lens motor is greater than 1, so the use of the incremental encoder to detect the position requires finding the zero position and the maximum value. It can be seen that when the MCU+incremental encoder reads the absolute position of the continuous zoom lens group, it is necessary to solve not only the zero-crossing cumulative error introduced by the encoder zero position (encoder zero position, the ideal value is 0 in the static state, and the actual value is the maximum value, 0 and 1 of the MCU encoder interface counter) during the data reading process; it is also necessary to solve the zero position error introduced by the different motor operating torque and speed during the zero position search process. Summary of the invention

[0005] The technical problem to be solved by the present invention is to provide a low cumulative error data processing method applied to a continuous zoom lens control system, which can accurately detect the absolute position of the encoder of the continuous zoom lens drive motor, eliminate the encoder zero-crossing error, and reduce the servo control system zero-seeking error.

[0006] In order to solve the above technical problems, the technical solutions adopted by the present invention are as follows.

[0007] A low cumulative error data processing method applied to a continuous zoom lens control system, wherein the continuous zoom lens control system uses an MCU+incremental encoder as a lens position detection device; the method includes an encoder zero-crossing error-free cumulative calculation absolute position strategy and a servo control system closed-loop zero-seeking strategy;

[0008] The encoder has no zero-crossing error and the cumulative calculation absolute position strategy specifically comprises the following steps:

[0009] A1. Configure the encoder interface of MCU;

[0010] A2. Read the current value of the encoder interface;

[0011] A3. Set the encoder interface base value;

[0012] A4. Calculate the encoder change code value of the current cycle;

[0013] A5. Calculate the absolute position code value of the encoder in the current cycle;

[0014] A6 outputs the absolute position code value of the encoder in the current cycle and returns to step A2;

[0015] The servo control system closed-loop zero-seeking strategy specifically includes the following steps:

[0016] B1. Initialize the position loop and speed loop PID parameters;

[0017] B2. Start the motor closed-loop control module and read the absolute position code value of the encoder;

[0018] B3. Set the target code value to: encoder absolute position code value - step value;

[0019] B4. Before the motor moves to the target code value, if the zero-end arrival signal is detected, the encoder absolute position code value is set to zero and the process jumps to step B6;

[0020] B5. The motor reaches the target code value and checks whether the zero end is in place. If not, continue to step B3, otherwise jump to step B6;

[0021] B6. Set the target code value to: encoder absolute position code value + step value;

[0022] B7. Before the motor moves to the target code value, if the maximum limit end arrival signal is detected, the maximum value of the encoder absolute position code value is set to the current encoder absolute position code value, and jump to step B9;

[0023] B8. The motor reaches the target code value and checks whether the zero position is in place. If not, continue to step B6, otherwise jump to step B9;

[0024] B9. Zero search is completed.

[0025] Preferably, the step A1 specifically includes the following configuration settings:

[0026] Set the counter start value = 0;

[0027] Set timer maximum value = 65535;

[0028] Set the timer base value = 35000.

[0029] Preferably, the step A2 is specifically as follows: reading the current count value of the encoder interface, the cycle is 1 ms and can be changed according to actual conditions.

[0030] Preferably, the change code value in step A4 is the difference between the current value of the encoder interface read in step A2 and the encoder interface base value set in step A3; and step A5 is specifically as follows:

[0031] When the current value of the encoder interface read is greater than the base value of the encoder interface, the difference between the current value of the encoder interface read and the base value of the encoder interface is added to the absolute position code value of the encoder;

[0032] When the read encoder interface current value is less than or equal to the encoder interface base value, the difference between the encoder interface base value and the read encoder interface current value is subtracted from the encoder absolute position code value.

[0033] Preferably, the absolute position code value of the encoder in step B3 is initially 0, and the step value is a fixed value set according to actual conditions.

[0034] Preferably, the closed-loop zero-finding strategy of the servo control system combines the limit switch with the timeout time when the speed is 0 during the closed-loop control process to determine the system zero position and the maximum limit position.

[0035] Due to the adoption of the above technical scheme, the technical progress achieved by the present invention is as follows.

[0036] The method provided by the present invention solves the shortcomings of the potentiometer position detection method, which occupies space and has low precision; and solves the shortcomings of the FPGA+encoder detection solution, which has high cost.

[0037] The method provided by the present invention can eliminate the cumulative error of zero crossing of the incremental encoder detected by the MCU.

[0038] The closed-loop control of the motor by the present invention to find the zero position can solve the problem that the motor motion state is unknown.

[0039] The method provided by the present invention solves the problem of open-loop zero-seeking end impact. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] Figure 1 It is a hardware connection block diagram of the present invention;

[0041] Figure 2is a block diagram of the software system of the present invention;

[0042] Figure 3 It is the PID control flow chart of the present invention;

[0043] Figure 4 The present invention is a flow chart of the strategy for calculating the absolute position of the encoder without zero-crossing error accumulation;

[0044] Figure 5 It is a flow chart of the closed-loop zero-seeking strategy of the servo control system of the present invention. DETAILED DESCRIPTION

[0045] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0046] A low cumulative error data processing method for a continuous zoom lens control system, wherein the continuous zoom lens control system is a servo control system and uses an MCU+incremental encoder as a lens position detection device. Figure 1 As shown, the hardware of the present invention mainly consists of: a servo control board, two DC brush motors with encoders and a continuous zoom lens, wherein one of the two DC brush motors with encoders is used as a focus motor of the continuous zoom lens, and the other is used as a zoom motor of the continuous zoom lens. The DC brush motor with encoder is connected to the servo control board through a connector, and the connector includes two motor power supply lines, two encoder power supply lines, and two encoder signal lines (A phase and B phase); the DC brush motor with encoder controls the rotation of the continuous zoom lens sleeve through gear transmission, thereby driving the lens group to perform linear motion in the sleeve; when the DC brush motor with encoder rotates, the two signal lines of the encoder output a group of orthogonal signals, and the servo control board is an MCU board, which receives and analyzes the current absolute position of the motor through the encoder dedicated interface.

[0047] like Figure 2 As shown, the software of the present invention mainly comprises: configuring a motor drive interface to realize forward rotation, reverse rotation and speed control of the motor; configuring a motor encoder interface to realize real-time acquisition of the absolute position of the motor; a position loop + speed loop PID cascade control algorithm to realize self-check of the servo control system of the continuous zoom lens, and finally controlling the motor to rotate to the target position according to the result calculated by the position loop + speed loop PID cascade control algorithm, such as Figure 3 shown.

[0048] The invention discloses a low cumulative error data processing method for a continuous zoom lens control system, which is mainly divided into two parts: an encoder zero-crossing error-free cumulative calculation absolute position strategy and a servo control system closed-loop zero-seeking strategy.

[0049] like Figure 4As shown, the encoder has no zero-crossing error and the cumulative calculation absolute position strategy specifically includes the following steps:

[0050] A1.Configure the encoder interface of MCU.

[0051] These include the following configuration settings:

[0052] Set the counter starting value timer.repetitioncounter = 0.

[0053] Set the timer maximum value timer.period = 65535 (the maximum value allowed by the timer period variable type).

[0054] Set the timer base value encoder_base = 35000 (maximum value / 2).

[0055] A2. Read the current value of the encoder interface.

[0056] The reading cycle is 1ms and can be changed according to the actual situation. Specifically: read the current count value of the encoder interface, Encoder_num = timer_counter_read(TIMERX).

[0057] A3. Set the encoder interface base value, timer_counter_value_config(TIMERX, encoder_base).

[0058] A4. Calculate the encoder change code value of the current cycle.

[0059] Specifically, the change code value is the difference between the current value of the encoder interface read in step A2 and the base value of the encoder interface set in step A3.

[0060] A5. Calculate the absolute position code value of the encoder in the current cycle. Specifically:

[0061] If the current value of the encoder interface read is greater than the base value of the encoder interface, the difference between the current value of the encoder interface read and the base value of the encoder interface is added to the encoder absolute position code value, that is: encoder_abs_pos=encoder_abs_pos+(Encoder_num-encoder_base).

[0062] If the current value of the encoder interface read is less than or equal to the encoder interface base value, the difference between the encoder interface base value and the current value of the encoder interface read is subtracted from the encoder absolute position code value, that is, encoder_abs_pos=encoder_abs_pos-(encoder_base-Encoder_num).

[0063] A6. Output the encoder absolute position code value encoder_abs_pos of the current cycle as the absolute position code value of the continuous zoom lens assembly, and return to step A2.

[0064] like Figure 5 As shown, the closed-loop zero-seeking strategy of the servo control system specifically includes the following steps:

[0065] B1. Initialize the position loop and speed loop PID parameters.

[0066] B2. Start the motor closed-loop control module and read the encoder absolute position code value.

[0067] B3. Set the target code value to: encoder absolute position code value - step value.

[0068] Specifically: set the target code value XX_motor_pid.setpoint = (encoder_abs_pos-step), where encoder_abs_pos is initially 0; step is a fixed value set according to actual conditions, the zero-seeking process is PID closed-loop control, and the target position is set according to a fixed step size.

[0069] B4. Before the motor moves to the target code value, if the zero-end arrival signal is detected, the encoder absolute position code value encoder_abs_pos is set to zero and jump to step B6.

[0070] B5. When the motor reaches the target code value, check whether the zero position is in place (photoelectric switch signal, Hall switch signal, micro switch signal). If not, continue to step B3, otherwise jump to step B6.

[0071] B6. Set the target code value to: encoder absolute position code value + step value.

[0072] Specifically: set the target code value XX_motor_pid.setpoint = (encoder_abs_pos+step).

[0073] B7. Before the motor moves to the target code value, if the maximum limit end arrival signal is detected, the maximum value of the encoder absolute position code value encoder_abs_pos_max is set to the current encoder absolute position code value encoder_abs_pos, and jump to step B9.

[0074] B8. The motor reaches the target code value and detects whether the zero position is in place (photoelectric switch signal, Hall switch signal, micro switch signal). If not, continue to step B6, otherwise jump to step B9;

[0075] B9. Zero search is completed.

[0076] In the closed-loop zero-seeking strategy of the servo control system, the limit switch and the timeout time when the speed is 0 during the closed-loop control process are combined to determine the system zero position and the maximum limit position.

[0077] The present invention has the following advantages when used:

[0078] a) Solve the shortcomings of the potentiometer position detection method, which takes up space and has low accuracy; solve the shortcomings of the FPGA+encoder detection solution, which has high cost.

[0079] b) It can eliminate the cumulative error of the incremental encoder zero crossing detected by MCU.

[0080] c) Closed-loop control of the motor to find the zero position can solve the problem of unknown motor motion state.

[0081] d) Solve the end impact of open loop zero-seeking.

Claims

1. A low cumulative error data processing method for a continuous zoom lens control system, characterized in that: The continuous zoom lens control system adopts MCU+incremental encoder as the lens position detection device; the method includes the encoder zero-crossing error accumulation calculation absolute position strategy and the servo control system closed-loop zero-seeking strategy; The encoder has no zero-crossing error and the cumulative calculation absolute position strategy specifically comprises the following steps: A1. Configure the encoder interface of MCU; A2. Read the current value of the encoder interface; A3. Set the encoder interface base value; A4. Calculate the encoder change code value of the current cycle; A5. Calculate the absolute position code value of the encoder in the current cycle; A6 outputs the absolute position code value of the encoder in the current cycle and returns to step A2; The servo control system closed-loop zero-seeking strategy specifically includes the following steps: B1. Initialize the position loop and speed loop PID parameters; B2. Start the motor closed-loop control module and read the absolute position code value of the encoder; B3. Set the target code value to: encoder absolute position code value - step value; B4. Before the motor moves to the target code value, if the zero-end arrival signal is detected, the encoder absolute position code value is set to zero and the process jumps to step B6; B5. The motor reaches the target code value and checks whether the zero end is in place. If not, continue to step B3, otherwise jump to step B6; B6. Set the target code value to: encoder absolute position code value + step value; B7. Before the motor moves to the target code value, if the maximum limit end arrival signal is detected, the maximum value of the encoder absolute position code value is set to the current encoder absolute position code value, and jump to step B9; B8. The motor reaches the target code value and checks whether the zero position end is in place. If not, continue to step B6, otherwise jump to step B9; B9. Zero search is completed.

2. The low cumulative error data processing method for a continuous zoom lens control system according to claim 1, characterized in that: The step A1 specifically includes the following configuration settings: Set the counter start value = 0; Set timer maximum value = 65535; Set the timer base value = 35000.

3. The low cumulative error data processing method for a continuous zoom lens control system according to claim 1, characterized in that: The step A2 specifically includes: reading the current count value of the encoder interface, the cycle is 1 ms and can be changed according to actual conditions.

4. The low cumulative error data processing method for a continuous zoom lens control system according to claim 1, characterized in that: The change code value in step A4 is the difference between the current value of the encoder interface read in step A2 and the base value of the encoder interface set in step A3; step A5 is specifically as follows: When the current value of the encoder interface read is greater than the base value of the encoder interface, the difference between the current value of the encoder interface read and the base value of the encoder interface is added to the absolute position code value of the encoder; When the read encoder interface current value is less than or equal to the encoder interface base value, the difference between the encoder interface base value and the read encoder interface current value is subtracted from the encoder absolute position code value.

5. The low cumulative error data processing method for a continuous zoom lens control system according to claim 1, characterized in that: The absolute position code value of the encoder in step B3 is initially 0, and the step value is a fixed value set according to actual conditions.

6. The low cumulative error data processing method for a continuous zoom lens control system according to claim 1, characterized in that: The closed-loop zero-seeking strategy of the servo control system combines the limit switch with the timeout time when the speed is 0 during the closed-loop control process to determine the system zero position and the maximum limit position.

Citation Information

Patent Citations

  • Zero position correction method for permanent magnet alternating current servo motor incremental encoder

    CN102778251A

  • Method and device for processing output signals of composite incremental encoder

    CN105720869A

  • Synchronous parfocal error compensation method for continuous zoom infrared lens with large zoom ratio

    CN112433333A

  • Closed-loop control method for motor encoder

    CN116633227A

  • Motor controller providing position feedback correction

    US20090058345A1