A multi-state PID control turntable target tracking method and system

By using a multi-state PID control method, combining target motion parameters and position information, the control parameters of the turntable target tracking system are optimized, solving the problem that fixed PID parameters cannot adapt to changes in motion characteristics, and improving the tracking accuracy and stability of the system under high-speed moving targets.

CN120872036BActive Publication Date: 2026-02-06BEIJING ZHONGDIAN LIANDA INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511357662.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-23
Publication Date
2026-02-06
Estimated Expiration
2045-09-23

AI Technical Summary

Technical Problem

When the target moves at high speed, the fixed PID parameters of the existing turntable target tracking system cannot adapt to the changes in motion characteristics, resulting in lag or overshoot in the tracking response, which affects the system accuracy and stability.

Method used

A multi-state PID control method is adopted. By calculating the target's velocity and acceleration parameters, the motion state is determined. Based on the target's position and motion state, the corresponding control parameter set is selected. Combined with first-order filtering and amplitude limiting technology, the control quantity is optimized to drive the azimuth and pitch axis motion.

Benefits of technology

This improved the accuracy and stability of the turntable target tracking system during target acceleration or deceleration, eliminated tracking response lag and overshoot, and enhanced the system's tracking performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120872036B_ABST
    Figure CN120872036B_ABST
Patent Text Reader

Abstract

A turntable target tracking method and system of multi-state PID control, relate to the field of control or regulation system, the method comprises: calculating target motion speed parameter and target motion acceleration parameter, and analyzing target movement trend according to target motion speed parameter and target motion acceleration parameter; determining target motion state parameter based on target movement trend, selecting corresponding control parameter group according to the control area where the target position is located and the target motion state, calculating the proportional term, integral term and differential term of position deviation respectively according to the control parameter group, adding the proportional term, integral term and differential term to obtain PID control output, and limiting the amplitude of the PID control output to obtain the control quantity according to the maximum allowed speed under the current focal length; performing first-order filtering processing on the control quantity to obtain a motion control instruction, and driving the azimuth axis and the elevation axis to move based on the motion control instruction. By implementing the method, the tracking accuracy of the turntable target tracking system can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of control or regulation systems, in particular to a multi-state PID control turntable target tracking method and system. BACKGROUND

[0002] With the rapid development of intelligent equipment such as robots and unmanned aerial vehicles, high-precision turntable target tracking systems are increasingly widely used in military reconnaissance, industrial automation and other fields. Turntable target tracking systems need to accurately capture and track high-speed moving targets, and higher requirements are put forward for the motion control performance of the system.

[0003] In related technologies, a single PID control parameter is usually used to control the motion of the turntable in the turntable target tracking system. This control method uses fixed PID parameters to control the entire tracking process when dealing with high-speed target motion, and controls the motion of the turntable by simply adjusting the proportional, integral and derivative parameters.

[0004] However, when the target motion state changes, the fixed PID parameters cannot adapt to the changes in target motion characteristics in a timely manner. In particular, when the target accelerates or decelerates, the tracking response of the system will lag or overshoot, affecting the tracking accuracy of the system. SUMMARY

[0005] The present application provides a multi-state PID control turntable target tracking method and system for improving the tracking accuracy of the turntable target tracking system.

[0006] In a first aspect, the present application provides a multi-state PID control turntable target tracking method applied to a turntable target tracking system, which comprises: calculating target motion speed parameters and target motion acceleration parameters based on continuous multiple frames of target position information, and analyzing the target movement trend according to the target motion speed parameters and target motion acceleration parameters; determining the target motion state parameters based on the target movement trend, which include acceleration state, constant speed state and deceleration state; selecting the corresponding control parameter group according to the control region where the target position is located and the target motion state, which includes the outer ring, the middle ring and the inner ring; calculating the proportional term, the integral term and the derivative term of the position deviation according to the control parameter group, adding the proportional term, the integral term and the derivative term to obtain the PID control output, and limiting the amplitude of the PID control output according to the maximum allowed speed under the current focal length to obtain the control amount; performing first-order filtering processing on the control amount to obtain the motion control instruction, and driving the azimuth axis and the pitch axis to move based on the motion control instruction.

[0007] In the above embodiment, the motion parameters are calculated based on the target position information of continuous multiple frames and the target motion state is determined, and the corresponding control parameter group is selected according to the control region where the target position is located and the motion state, so that the system can adopt the optimal PID parameters for different regions and motion states. The PID output is limited and a first-order filter is applied according to the current focal length, which realizes the smooth transition of the control instruction. The whole control process fully adapts to the change of the target motion characteristics, eliminates the lag and overshoot of the tracking response, and significantly improves the tracking accuracy and stability of the system when the target accelerates or decelerates.

[0008] In combination with some embodiments of the first aspect, in some embodiments, the step of determining the target motion state parameter based on the target movement trend determination includes determining an acceleration state, a constant speed state and a deceleration state, specifically including: when the absolute value of the target motion acceleration parameter is greater than the acceleration threshold and the target motion speed parameter and the target motion acceleration parameter are of the same sign, determining the acceleration state; when the absolute value of the target motion acceleration parameter is less than the speed threshold, determining the constant speed state; and when the absolute value of the target motion acceleration parameter is greater than the acceleration threshold and the target motion speed parameter and the target motion acceleration parameter are of different signs, determining the deceleration state.

[0009] In the above embodiment, the state is determined according to the size relationship and the sign relationship between the target motion acceleration parameter and the speed parameter, when the absolute value of the acceleration is greater than the threshold and the speed and the acceleration are of the same sign, the acceleration state is determined, when the absolute value of the acceleration is less than the speed threshold, the constant speed state is determined, and when the absolute value of the acceleration is greater than the threshold and the speed and the acceleration are of different signs, the deceleration state is determined. This accurate determination method based on the motion parameter makes the system can accurately identify the motion characteristics of the target, provides a reliable basis for the subsequent adaptive adjustment of the control parameter, and further improves the accuracy of the tracking control.

[0010] In some embodiments of the first aspect, in some embodiments, the step of selecting a corresponding control parameter set according to the control region where the target position is located and the target motion state, the control region including the outer ring, the middle ring and the inner ring, specifically comprises: when the control region is the outer ring, selecting a corresponding control parameter set according to the target motion state from a preset outer ring control parameter table, the outer ring control parameter table including a first control parameter set, a second control parameter set and a third control parameter set corresponding to the acceleration state, the constant speed state and the deceleration state respectively; when the control region is the middle ring, selecting a corresponding control parameter set according to the target motion state from a preset middle ring control parameter table, the middle ring control parameter table including a fourth control parameter set, a fifth control parameter set and a sixth control parameter set corresponding to the acceleration state, the constant speed state and the deceleration state respectively; when the control region is the inner ring, selecting a corresponding control parameter set according to the target motion state from a preset inner ring control parameter table, the inner ring control parameter table including a seventh control parameter set, an eighth control parameter set and a ninth control parameter set corresponding to the acceleration state, the constant speed state and the deceleration state respectively.

[0011] In the above embodiments, control parameter tables corresponding to acceleration, constant speed and deceleration states are established in the outer ring, the middle ring and the inner ring respectively, and the optimal control parameter set is selected from the corresponding parameter table according to the target position and the motion state. The system adopts a larger integral coefficient in the outer ring region for rapid adjustment, adopts a larger proportional coefficient in the middle ring region to improve the response speed, and adopts the basic parameters in the inner ring region to maintain stability. This regional and state-based parameter configuration strategy realizes accurate matching and smooth switching of the turntable control parameters, further enhancing the tracking performance of the system.

[0012] In some embodiments of the first aspect, in some embodiments, after the step of performing first-order filtering processing on the control quantity to obtain a motion control instruction, and driving the azimuth axis and the elevation axis to move based on the motion control instruction, the method further comprises: obtaining current focal length information in the target tracking process, and calculating a corresponding field of view angle according to the current focal length information; determining a new maximum allowable speed based on the field of view angle, and performing amplitude limiting processing on the PID control output of the next frame according to the new maximum allowable speed, the focal length being proportional to the maximum allowable speed.

[0013] In the above embodiments, the current focal length information in the target tracking process is obtained and the corresponding field of view angle is calculated, the new maximum allowable speed is dynamically determined based on the field of view angle, and the amplitude limiting processing is performed on the PID control output of the next frame. The focal length is proportional to the maximum allowable speed. The design takes into account the large angle velocity of target motion in the image at a large magnification, so that the system can provide sufficient dynamic response capability while ensuring stability, effectively solving the problem of control parameter mismatch caused by the change of field of view angle in the zooming process.

[0014] In some embodiments of the first aspect, before the step of calculating the target motion speed parameter and the target motion acceleration parameter based on the target position information of the continuous multiple frames, and analyzing the target motion trend according to the target motion speed parameter and the target motion acceleration parameter, the method further comprises: determining the pixel coordinates of the image center point based on the camera internal parameters of the image acquisition device; obtaining the target pixel position of the target in the image, and calculating the pixel deviation of the target pixel position relative to the image center point; and converting the target position information into angle coordinates according to the pixel deviation and the current focal length information, the angle coordinates comprising an azimuth angle for controlling the rotational motion of the azimuth axis and a pitch angle for controlling the rotational motion of the pitch axis.

[0015] In the above embodiments, the pixel coordinates of the image center point are determined based on the camera internal parameters of the image acquisition device, the pixel deviation of the target pixel position relative to the image center point is calculated, and the target position information is converted into angle coordinates according to the pixel deviation and the current focal length information. This coordinate conversion method based on imaging geometry compensates for the deviation of the camera optical axis from the image geometric center and realizes accurate mapping from the pixel domain to the angle domain, thereby providing accurate motion instructions for the coordinated control of the azimuth axis and the pitch axis.

[0016] In some embodiments of the first aspect, after the step of performing first-order filtering on the control quantity to obtain the motion control instruction, and driving the motion of the azimuth axis and the pitch axis based on the motion control instruction, the method further comprises: collecting vibration signals during the motion of the gimbal, performing frequency spectrum analysis on the vibration signals to obtain a plurality of main vibration frequency components; decomposing the motion control instruction into a plurality of micro-displacement control instruction sequences, each of which corresponds to a main vibration frequency component; time-domain interleaving and combining the plurality of micro-displacement control instruction sequences to form a composite micro-motion sequence, wherein the cumulative displacement amount of the composite micro-motion sequence is equal to the target displacement amount of the original motion control instruction; and executing each micro-displacement control instruction in the composite micro-motion sequence in turn according to a preset execution time interval to drive the motion of the gimbal.

[0017] In the above embodiments, the vibration signals during the motion of the gimbal are collected and analyzed, the motion control instruction is decomposed into a plurality of micro-displacement control instruction sequences corresponding to different vibration frequencies, and a composite micro-motion sequence is formed by time-domain interleaving and combining. Each micro-displacement control instruction is executed in turn according to a preset execution time interval, so that the execution of the control instruction and the inherent vibration of the gimbal form a cancellation relationship, thereby effectively suppressing the vibration of the gimbal while ensuring the cumulative displacement accuracy, and significantly improving the motion stability of the system.

[0018] In some embodiments of the first aspect, in some embodiments, the step of combining the plurality of micro-displacement control instruction sequences in time domain to form a composite micro-motion sequence, wherein the cumulative displacement amount of the composite micro-motion sequence is equal to the target displacement amount of the original motion control instruction, specifically comprises: setting the displacement amount and the execution time interval of each micro-displacement control instruction sequence based on the size of the main vibration frequency component, the displacement amount and the execution time interval being inversely related to the corresponding vibration frequency component; collecting real-time vibration state information of the PTZ, and adjusting the execution time interval according to the vibration state information, so that the adjusted execution time interval and the period of the vibration frequency component have a predetermined phase difference; and controlling the cumulative displacement amount of the composite micro-motion sequence to be equal to the target displacement amount of the motion control instruction.

[0019] In the above embodiments, the displacement amount and the execution time interval of each micro-displacement control instruction sequence are set based on the size of the main vibration frequency component, and are inversely related to the vibration frequency component. The execution time interval is dynamically adjusted according to the real-time vibration state information of the PTZ, so that the adjusted time interval and the period of the vibration frequency component form a predetermined phase difference. This adaptive micro-displacement instruction scheduling mechanism makes the high-frequency component have a smaller adjustment step and a faster response speed, and the low-frequency component has a larger displacement amount and a longer execution interval, thereby ensuring the cumulative displacement accuracy and achieving accurate suppression of different frequency vibrations.

[0020] In the second aspect, the embodiments of the present application provide a PTZ target tracking system, which comprises one or more processors and a memory; the memory is coupled to the one or more processors, and the memory is configured to store computer program codes, the computer program codes comprising computer instructions, and the one or more processors invoke the computer instructions to enable the PTZ target tracking system to perform the method described in the first aspect and any possible implementation manner of the first aspect.

[0021] In the third aspect, the embodiments of the present application provide a computer program product comprising instructions, which, when executed on a PTZ target tracking system, enable the PTZ target tracking system to perform the method described in the first aspect and any possible implementation manner of the first aspect.

[0022] In the fourth aspect, the embodiments of the present application provide a computer-readable storage medium comprising instructions, which, when executed on a PTZ target tracking system, enable the PTZ target tracking system to perform the method described in the first aspect and any possible implementation manner of the first aspect.

[0023] It can be understood that the turntable target tracking system provided by the second aspect, the computer program product provided by the third aspect and the computer storage medium provided by the fourth aspect are all used to execute the method provided by the embodiments of the present application. Therefore, the beneficial effects that can be achieved are referred to the beneficial effects in the corresponding method, which will not be described here.

[0024] The one or more technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages:

[0025] 1. In the present application, the motion parameters are calculated based on the target position information of continuous multiple frames, and the target motion state is determined. The corresponding control parameter group is selected according to the control area where the target position is located and the motion state, so that the system can use the optimal PID parameters for different areas and motion states. The PID output is limited and a first-order filter is applied according to the current focal length, which realizes the smooth transition of the control command. The entire control process fully adapts to the changes of the target motion characteristics, eliminates the lag and overshoot of the tracking response, and significantly improves the tracking accuracy and stability of the system when the target accelerates or decelerates.

[0026] 2. In the present application, the state is determined according to the size relationship and sign relationship between the target motion acceleration parameter and the speed parameter. When the absolute value of acceleration is greater than the threshold value and the speed and acceleration are of the same sign, it is determined as an acceleration state. When the absolute value of acceleration is less than the speed threshold value, it is determined as a constant speed state. When the absolute value of acceleration is greater than the threshold value and the speed and acceleration are of different signs, it is determined as a deceleration state. This accurate determination method based on motion parameters enables the system to accurately identify the motion characteristics of the target, providing a reliable basis for the subsequent adaptive adjustment of control parameters, and further improving the accuracy of tracking control.

[0027] 3. In the present application, control parameter tables corresponding to acceleration, constant speed and deceleration states are established in the outer ring, the middle ring and the inner ring respectively, and the optimal control parameter group is selected from the corresponding parameter table according to the target position and motion state. The system uses a larger integral coefficient in the outer ring area for rapid adjustment, a larger proportional coefficient in the middle ring area to improve response speed, and a basic parameter in the inner ring area to maintain stability. This regional and state-based parameter configuration strategy realizes the accurate matching and smooth switching of the turntable control parameters, further enhancing the tracking performance of the system. BRIEF DESCRIPTION OF DRAWINGS

[0028] Figure 1 is a flowchart of a turntable target tracking method of a multi-state PID control in the embodiments of the present application;

[0029] Figure 2 is another flowchart of a turntable target tracking method of a multi-state PID control in the embodiments of the present application;

[0030] Figure 3 is a schematic diagram of an entity device structure of a turntable target tracking system in an embodiment of the present application. DETAILED DESCRIPTION

[0031] The terminology used in the following embodiments of the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the present application. As used in the description of the application, the singular forms "a," "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will also be understood that the term "and / or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.

[0032] Hereinafter, the terms "first", "second" are used only for the purpose of description, and cannot be understood as implying or suggesting relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined with "first", "second" can explicitly or implicitly include one or more of the features, and in the description of the embodiments of the present application, the meaning of "a plurality of" is two or more, unless otherwise specified.

[0033] In order to facilitate understanding, the application scenarios of the embodiments of the present application are introduced as follows.

[0034] In an observation station of a certain bird sanctuary, visual tracking and behavior research of small-sized migratory birds flying at high speed are needed. These migratory birds are small in size, fast in flight speed (up to 20 m / s), and often perform irregular circling and rapid turning. The observation station is equipped with a heavy-duty photoelectric turntable system, which carries a high-magnification zoom lens (focal length range 100-1000 mm) and a high-resolution camera. Due to the high magnification of the lens, the field of view is small (about 1° at the telephoto end), and the turntable itself is heavy (about 50 kg), which poses serious challenges in tracking such fast-moving targets: the target often quickly moves out of the field of view, or oscillates back and forth at the edge of the field of view. Especially when the birds make rapid turns, the response of the turntable often lags significantly, resulting in loss of the target. At the same time, due to the large inertia of the turntable, the start-up and braking processes are relatively slow, and overshoot and oscillation phenomena are prone to occur. These problems seriously affect the quality and continuity of the observation data collection, and an accurate tracking control method that can adapt to the rapid maneuvering characteristics of the target is urgently needed.

[0035] In the traditional tracking control scheme of a turntable, a single set of PID parameters is usually used to control the entire tracking process. For example, a certain observation system uses fixed PID parameters (Kp=1.2, Ki=0.03, Kd=0.15) to control the movement of the turntable. When the target moves rapidly from the edge of the field of view, the turntable's acceleration response is insufficient due to the small proportional coefficient, often leading to the target moving out of the field of view. When the target approaches the center of the field of view, the turntable is prone to overshoot due to the accumulation of integral action, causing the target to oscillate repeatedly in the field of view. In particular, during zooming, it is more difficult for fixed PID parameters to adapt due to the change in the field of view angle. For example, at the telephoto end (focal length 1000mm), the originally suitable control parameters will appear too aggressive due to the narrowing of the field of view, leading to unstable tracking. In addition, when the target is accelerating or decelerating, a single set of PID parameters cannot adjust the control strategy accordingly, often resulting in tracking lag or overshoot, which seriously affects the tracking accuracy and stability of the system.

[0036] For ease of understanding, the method provided by the present embodiment is described in the following flow. Please refer to Figure 1 , which is a flowchart of the turntable target tracking method of the multi-state PID control in the present embodiment.

[0037] S101, calculate target motion speed parameters and target motion acceleration parameters based on continuous multiple frames of target position information, and analyze the target movement trend based on the target motion speed parameters and the target motion acceleration parameters.

[0038] The target position information represents the pixel coordinate point of the target in the image coordinate system, which is obtained by using the rk3588 to receive the video stream in real time, and 30 frames of images are collected per second. The target motion speed parameter refers to the ratio of the change in pixel position between consecutive frames to the time interval between frames, which is used to quantify the instantaneous motion speed of the target. The target motion acceleration parameter represents the rate of change of the target speed, which is used to describe the acceleration or deceleration trend of the target motion state. The target movement trend refers to the trend prediction of the target approaching or moving away from the center of the field of view obtained by analyzing the speed and acceleration parameters.

[0039] This step is executed after the system receives a new frame of image data. Specifically, first, the pixel position information of the target in the continuous 30 frames of images is obtained, and the pixel speed is calculated based on the position difference between the adjacent two frames. By performing a difference operation on the speed data of the continuous multiple frames, the pixel acceleration is obtained. The motion parameters in the pixel domain are converted into speed and acceleration parameters in the angle domain in combination with the current focal length value and the field of view angle information of the turntable. Finally, based on these parameters, it is analyzed whether the target is moving away from or approaching the center of the field of view.

[0040] In some embodiments, the calculation of the target motion parameter and the trend analysis can be achieved in various ways: optionally, the focal length value and the field of view angle of the visual turntable are subtracted from the pixel speed and acceleration of the target to be tracked to obtain the relative motion trend, and the fewer the frame numbers, the more flexible the turntable is; optionally, through image segmentation, the cumulative function of the integral term is improved in the outermost ring to accelerate the trend of the target approaching the center, and the control force of the proportional term is improved in the center circle position to respond to the target changes in real time. It can be understood that other motion trend analysis methods can also be used, which are not limited here.

[0041] S102, determining the target motion state parameter based on the target movement trend, the target motion state parameter including acceleration state, constant speed state and deceleration state.

[0042] The target motion state parameter is used to classify the current motion characteristics of the target. The acceleration state corresponds to the case where the target quickly moves away from the center of the field of view and the turntable needs to accelerate tracking, the constant speed state corresponds to the case where the target moves at a constant speed and the turntable needs to maintain stable tracking, and the deceleration state corresponds to the case where the target approaches the center of the field of view and the turntable needs to decelerate to avoid overshoot.

[0043] This step is performed after obtaining the target movement trend. Specifically, based on the state analysis module, the focal length value and the field of view angle of the visual turntable are subtracted from the pixel speed and acceleration of the target to be tracked, and the rotational speed of the turntable to obtain the state of the tracked target in acceleration, constant speed and deceleration. For the acceleration state, a larger proportional coefficient and a differential coefficient are configured to improve the response, for the constant speed state, the integral coefficient is increased to stabilize tracking, and for the deceleration state, the differential coefficient is increased to suppress overshoot.

[0044] In some embodiments, the determination of the target motion state can be achieved in various ways: optionally, different PID parameter combinations are used in different control regions, the integral term is improved in the outermost ring to pull the target back to the inner ring within 30 frames, the proportional term is improved in the middle ring to increase the maneuvering flexibility, and the basic PID parameters are used in the inner ring to achieve stable tracking; optionally, the control output is processed by a first-order low-pass filter to ensure smooth and continuous instructions during state switching and avoid motor oscillation. It can be understood that other state determination and control methods can also be used, which are not limited here.

[0045] In some embodiments, this step specifically includes the following steps:

[0046] When the absolute value of the target motion acceleration parameter is greater than the acceleration threshold and the target motion speed parameter and the target motion acceleration parameter are of the same sign, it is determined as an acceleration state; when the absolute value of the target motion acceleration parameter is less than the speed threshold, it is determined as a constant speed state; when the absolute value of the target motion acceleration parameter is greater than the acceleration threshold and the target motion speed parameter and the target motion acceleration parameter are of different signs, it is determined as a deceleration state.

[0047] Target motion acceleration parameter refers to the rate of change of target speed in consecutive frames of images, calculated by the difference between adjacent frames, with a unit of pixel / frame². Target motion speed parameter refers to the rate of change of target position between adjacent frames, with a unit of pixel / frame. Acceleration threshold is a preset acceleration judgment limit, used to distinguish whether the target is in a state of significant acceleration or deceleration, with a typical value of 50 pixel / frame². Speed threshold is an acceleration range limit used to judge whether the target is in a constant speed motion, with a typical value of 20 pixel / frame². Parameter same sign refers to the same sign of speed and acceleration, indicating that the target is accelerating away from the image center; parameter opposite sign refers to the opposite sign of speed and acceleration, indicating that the target is decelerating.

[0048] This step realizes accurate judgment of motion state by analyzing target motion parameters. In specific implementation, first, the pixel position sequence {P1, P2,..., P30} of the target in consecutive 30 frames of images is obtained. 30 For each adjacent two frames, the speed V_i=(Pᵢ₊1-Pᵢ) / Δt is calculated, where Δt is the inter-frame time interval (usually 1 / 30 seconds). Then the acceleration a_i=(V_i₊1-V_i) / Δt between adjacent speeds is calculated. The calculated acceleration value is compared with the preset acceleration threshold (50 pixel / frame²) and speed threshold (20 pixel / frame²): when |a_i|>50 and V_i×a_i>0, it is judged to be an acceleration state, and the PID parameter group of the acceleration state (Kp=1.8, Ki=0.01, Kd=0.2) is enabled; when |a_i|<20, it is judged to be a constant speed state, and the constant speed state parameter group (Kp=0.8, Ki=0.05, Kd=0.1) is enabled; when |a_i|>50 and V_i×a_i<0, it is judged to be a deceleration state, and the deceleration state parameter group (Kp=1.0, Ki=0.03, Kd=0.6) is enabled. This state judgment method based on motion parameters realizes accurate identification and classification of target motion characteristics, providing a reliable basis for subsequent switching of control strategies.

[0049] S103、According to the control area where the target position is located and the target motion state, the corresponding control parameter group is selected, and the control area includes the outer ring, the middle ring and the inner ring.

[0050] Among them, the control area represents the position partition of the target in the image, using the "Hui" word-shaped partition method. The outer ring area refers to the image edge area, which is used to quickly respond to the target moving away from the center; the middle ring area refers to the transition area between the outer ring and the inner ring, which is used to improve the maneuvering flexibility; the inner ring area refers to the area close to the image center, which is used to realize stable and accurate tracking. The control parameter group includes three parameters of proportional coefficient Kp, integral coefficient Ki and differential coefficient Kd, which are used to adjust the characteristics of the PID controller.

[0051] This step is executed after determining the target motion state. Specifically, first, the control area where the target pixel position is located is determined according to the target pixel position. Then, based on the combination of the control area and the motion state, the corresponding PID parameter group is selected from the preset parameter table. For the outer ring area, the integral term is increased in the acceleration state to quickly pull the target back to the inner ring; for the middle ring area, the proportional term is increased to enhance the maneuverability; for the inner ring area, the basic PID parameter is used to ensure stability. The parameter configuration of different areas fully considers the balance between real-time and stability of the turntable control.

[0052] In some embodiments, the selection of control parameters can be implemented in various ways: optionally, in the outer ring area, the proportional term of the original PID parameter is multiplied by 1.1, the integral term is multiplied by 2.0, and the differential term is multiplied by 0.5; in the middle ring area, the proportional term is multiplied by 1.5, the integral term is multiplied by 1.2, and the differential term is multiplied by 0.8; in the inner ring area, the original parameters remain unchanged, realizing differentiated control in different areas; alternatively, a mapping relationship between target types and optimal PID parameters is established, and appropriate parameter groups are adaptively selected according to target characteristics to improve control performance in different scenarios. It can be understood that other parameter selection strategies can also be used, which are not limited here.

[0053] When selecting control parameters, the system selects a suitable PID control parameter group from the corresponding parameter table based on the control area where the target is located and the motion state. The control area refers to three areas divided by a "return" shape in the image: the outer circle area corresponds to the edge position of the image, the middle circle area corresponds to the transition area between the outer circle and the inner circle, and the inner circle area corresponds to the area close to the center of the image; the control parameter group includes three parameters: the proportional coefficient Kp, the integral coefficient Ki, and the derivative coefficient Kd; the parameter table is a pre-established PID parameter configuration table for different areas and different states. The specific parameter selection process is as follows: When the target is in the outer circle area, the system accesses the outer circle control parameter table, which contains three groups of parameters: the first control parameter group corresponds to the acceleration state, multiplying the proportional term of the original PID parameters by 1.1, the integral term by 2.0, and the derivative term by 0.5, to quickly pull the target back to the inner circle; the second control parameter group corresponds to the constant speed state, keeping the original parameters unchanged; the third control parameter group corresponds to the deceleration state, multiplying the proportional term of the original parameters by 0.8, the integral term by 1.5, and the derivative term by 0.7. When the target is in the middle circle area, the system accesses the middle circle control parameter table, which contains: the fourth control parameter group corresponds to the acceleration state, multiplying the proportional term of the original parameters by 1.5, the integral term by 1.2, and the derivative term by 0.8, to improve maneuverability; the fifth control parameter group corresponds to the constant speed state, keeping the original parameters unchanged; the sixth control parameter group corresponds to the deceleration state, multiplying the proportional term of the original parameters by 1.2, the integral term by 1.0, and the derivative term by 1.0. When the target is in the inner circle area, the system accesses the inner circle control parameter table, which contains: the seventh control parameter group corresponds to the acceleration state, using the basic PID parameters Kp = 1.8, Ki = 0.01, Kd = 0.2; the eighth control parameter group corresponds to the constant speed state, using the basic parameters Kp = 0.8, Ki = 0.05, Kd = 0.1; the ninth control parameter group corresponds to the deceleration state, using the basic parameters Kp = 1.0, Ki = 0.03, Kd = 0.6. Through this parameter configuration method of dividing regions and states, the system can select the most suitable control parameters in different situations and achieve precise tracking control of the target.

[0054] In some embodiments, this step specifically includes the following steps:

[0055] When the control area is the outer ring, select the corresponding control parameter group from the preset outer ring control parameter table according to the target motion state. The outer ring control parameter table includes the first control parameter group, the second control parameter group, and the third control parameter group corresponding to the acceleration state, the constant speed state, and the deceleration state respectively. When the control area is the middle ring, select the corresponding control parameter group from the preset middle ring control parameter table according to the target motion state. The middle ring control parameter table includes the fourth control parameter group, the fifth control parameter group, and the sixth control parameter group corresponding to the acceleration state, the constant speed state, and the deceleration state respectively. When the control area is the inner ring, select the corresponding control parameter group from the preset inner ring control parameter table according to the target motion state. The inner ring control parameter table includes the seventh control parameter group, the eighth control parameter group, and the ninth control parameter group corresponding to the acceleration state, the constant speed state, and the deceleration state respectively.

[0056] The control area refers to three concentric areas that divide the image plane in a "hui" shape, including the outer ring, the middle ring, and the inner ring. The outer ring area refers to the area within 400 pixels from the image edge, which is used to quickly respond to targets far from the center. The middle ring area refers to the transition area of 200 - 400 pixels inside the outer ring, which is used to improve the maneuverability of the turntable. The inner ring area refers to the area within 200 pixels around the image center, which is used to achieve stable and accurate tracking. The control parameter group refers to a combination of three parameter values including the proportional coefficient Kp, the integral coefficient Ki, and the differential coefficient Kd. The preset control parameter table is a PID parameter comparison table preconfigured according to the area and motion state, which is used to achieve rapid parameter search and switching.

[0057] This step realizes adaptive parameter selection based on target position and motion state. In specific implementation, first, the distance d = V(x2 + y2) of the target pixel coordinate (x, y) to the image center is calculated. When d > 400 pixels, it is determined as the outer ring, and the parameters are selected from the outer ring parameter table: the first control parameter group (Kp = 1.1 x 1.8, Ki = 2.0 x 0.01, Kd = 0.5 x 0.2) corresponds to the acceleration state, the second control parameter group (Kp = 1.1 x 0.8, Ki = 2.0 x 0.05, Kd = 0.5 x 0.1) corresponds to the constant speed state, and the third control parameter group (Kp = 1.1 x 1.0, Ki = 2.0 x 0.03, Kd = 0.5 x 0.6) corresponds to the deceleration state. When 200 < d ≤ 400 pixels, it is determined as the middle ring, and the parameters are selected from the middle ring parameter table: the fourth control parameter group (Kp = 1.5 x 1.8, Ki = 1.2 x 0.01, Kd = 0.8 x 0.2) corresponds to the acceleration state, the fifth control parameter group (Kp = 1.5 x 0.8, Ki = 1.2 x 0.05, Kd = 0.8 x 0.1) corresponds to the constant speed state, and the sixth control parameter group (Kp = 1.5 x 1.0, Ki = 1.2 x 0.03, Kd = 0.8 x 0.6) corresponds to the deceleration state. When d ≤ 200 pixels, it is determined as the inner ring, and the parameters are selected from the inner ring parameter table: the seventh control parameter group (Kp = 1.8, Ki = 0.01, Kd = 0.2) corresponds to the acceleration state, the eighth control parameter group (Kp = 0.8, Ki = 0.05, Kd = 0.1) corresponds to the constant speed state, and the ninth control parameter group (Kp = 1.0, Ki = 0.03, Kd = 0.6) corresponds to the deceleration state. Through this regional and state-based parameter configuration method, accurate matching and smooth switching of the turntable control parameters are realized.

[0058] S104, calculate the proportional term, integral term and derivative term of the position deviation according to the control parameter group, add the proportional term, integral term and derivative term to obtain the PID control output, and limit the PID control output according to the maximum allowed speed at the current focal length to obtain the control quantity.

[0059] Wherein, the position deviation represents the deviation value of the target current pixel position from the image center. The proportional term is the product of the deviation and the proportional coefficient, which is used to provide a fast response proportional to the deviation. The integral term is the product of the cumulative value of the deviation within 30 frames and the integral coefficient, which is used to eliminate steady-state error. The derivative term is the product of the rate of change of the deviation and the derivative coefficient, which is used to provide lead control to suppress overshoot. The maximum allowed speed is the upper limit of the motion speed of the turntable determined based on the current focal length, which is proportional to the focal length.

[0060] This step is executed after the selected control parameters are determined. Specifically, first, the pixel deviation of the target position from the image center is calculated, and the deviation value is multiplied by the proportional coefficient, the integral coefficient, and the differential coefficient to obtain three control components. The integral term is calculated using the cumulative value of the deviation of the last 30 frames, and the differential term is calculated using the deviation rate of change between adjacent frames. The three components are added to obtain the PID control output, which is then limited according to the maximum allowed speed at the current focal length to obtain the final control amount. The larger the focal length, the smaller the maximum allowed speed, to ensure the stability of the control.

[0061] In some embodiments, the PID control calculation can be implemented in various ways: optionally, a state prediction control based on image frame position trend is used, the control output is calculated by kp pixel offset + ki (sum of 30 frame pixel offset) + kd*(acceleration of offset), and then multiplied by the maximum allowed speed coefficient corresponding to the current focal length for limiting; optionally, a feedforward control is combined with a target motion model, a prediction compensation amount is superimposed on the basis of the PID output to improve the real-time performance of the control. It can be understood that other control algorithms can also be used to realize the tracking control of the turntable, which is not limited here.

[0062] S105, first-order filtering processing is performed on the control amount to obtain a motion control instruction, and the azimuth axis and the elevation axis are driven to move based on the motion control instruction.

[0063] Among them, the first-order filtering processing means low-pass filtering operation on the control amount, which is used to smooth the change of the control instruction. The motion control instruction refers to the angular velocity instruction used to drive the motor of the turntable after filtering processing. The azimuth axis refers to the horizontal rotation axis of the turntable, which is used to control the horizontal tracking of the target. The elevation axis refers to the vertical rotation axis of the turntable, which is used to control the height tracking of the target.

[0064] This step is executed after the PID control amount is obtained. Specifically, first, the control amount is input into a first-order low-pass filter for processing, and the cutoff frequency of the filter is set according to the dynamic characteristics of the turntable. Through filtering, high-frequency oscillation components in the control amount can be eliminated, making the change of the control instruction more gentle. Then the filtered control instruction is sent to the motor driver of the azimuth axis and the elevation axis respectively to realize the coordinated movement of the turntable. This processing method can effectively avoid the turntable jitter caused by state switching or external disturbance, and improve the stability of the tracking process.

[0065] In some embodiments, the filtering processing and execution of the control instruction can be implemented in various ways: optionally, a vibration signal acquisition and spectrum analysis method is used to obtain the main vibration frequency component in the motion process of the turntable, the control instruction is decomposed into a plurality of micro-displacement sequences, a composite micro-motion sequence is formed by time domain interleaving combination, and the smooth control is realized by executing in turn according to the preset time interval; optionally, the vibration state information of the turntable is acquired in real time, the filter parameters and the instruction execution time sequence are dynamically adjusted, so that the adjusted execution time interval and the period of the vibration frequency component exist a predetermined phase difference, thereby suppressing resonance. It can be understood that other control instruction processing methods can also be used, which are not limited here.

[0066] The method provided by the embodiment is further described in a more specific flow. Please refer to Figure 2 , another flowchart of the multi-state PID control turntable target tracking method in the embodiment of the present application.

[0067] S201, determine the pixel coordinates of the image center point based on the camera intrinsic parameters of the image acquisition device.

[0068] The camera intrinsic parameters are a set of parameters describing the imaging geometric characteristics of the camera, including focal length, principal point coordinates, distortion coefficient and other parameters, which are obtained by camera calibration. The image center point refers to the intersection of the optical axis on the image plane, and its pixel coordinates are usually close to but not exactly equal to half of the image resolution. The pixel coordinates refer to a two-dimensional coordinate system on the image plane with the upper left corner as the origin, the right as the positive direction of the x-axis, and the downward as the positive direction of the y-axis. For example, for a 1920x1080 resolution image, the ideal pixel coordinates of the image center point are (960, 540), but the actual center point will be corrected according to the principal point coordinates of the camera intrinsic parameters.

[0069] This step is executed once during system initialization. In specific implementation, first, the intrinsic parameter matrix obtained by camera calibration is read, and the principal point coordinates (cx, cy) are extracted therefrom. Then the principal point coordinates are used as the pixel coordinates of the image center point for subsequent deviation calculation. The intrinsic parameter matrix is usually represented in the form of a 3x3 matrix: [[fx, 0, cx], [0, fy, cy], [0, 0, 1]], where fx and fy are focal lengths, and cx and cy are principal point coordinates. The image center point determined in this way can compensate for the deviation of the camera optical axis from the image geometric center, improving the tracking accuracy.

[0070] S202, obtain the target pixel position of the target in the image, and calculate the pixel deviation of the target pixel position relative to the image center point.

[0071] Target pixel position refers to the two-dimensional coordinates of the target on the image plane, which is obtained by a target detection algorithm. Pixel deviation refers to the coordinate difference between the target pixel position and the image center point, including horizontal and vertical components. The target detection algorithm usually outputs the center coordinates of the target frame in the form of (x, y). For example, when the target is located at pixel coordinates (1200, 600) and the image center point is located at (960, 540), the pixel deviation is (240, 60).

[0072] This step is executed when processing each frame of image. In specific implementation, first, the center coordinates (x, y) of the target frame output by the target detection algorithm are obtained. Then, the target coordinates are subtracted from the image center point coordinates (cx, cy) to obtain the horizontal deviation dx = x - cx and the vertical deviation dy = y - cy. The subtraction operation here directly uses pixel coordinate values, and the result represents the actual offset of the target relative to the center point, with positive values indicating that the target is to the right or below the center point, and negative values indicating that the target is to the left or above the center point.

[0073] S203, convert the target position information into angle coordinates according to the pixel deviation and the current focal length information, the angle coordinates including an azimuth angle for controlling the rotational movement of an azimuth axis and a pitch angle for controlling the rotational movement of a pitch axis.

[0074] Angle coordinates refer to the deflection angle of the target relative to the camera optical axis, including the azimuth angle in the horizontal direction and the pitch angle in the vertical direction. Focal length information refers to the actual focal length value of the current lens, which is used for pixel coordinate to angle conversion. The azimuth angle represents the deflection angle of the target in the horizontal plane, and the pitch angle represents the deflection angle of the target in the vertical plane. For example, when the focal length is 50 mm and the pixel deviation is (240, 60), the azimuth angle may be 2.74 degrees and the pitch angle may be 0.69 degrees.

[0075] This step is executed after obtaining the pixel deviation. In specific implementation, first, the focal length value f of the current lens is obtained. Then, the arctangent function is used to calculate the angles: azimuth angle = arctan(dx / f) and pitch angle = arctan(dy / f), where dx and dy are the pixel deviation, and the calculation result needs to be converted from radians to degrees. This conversion takes into account the similar triangle relationship in the imaging principle and can accurately reflect the actual spatial position of the target. The azimuth angle is used to control the horizontal rotation of the turntable, and the pitch angle is used to control the vertical pitch of the turntable, thereby realizing spatial tracking of the target. In actual application, factors such as pixel size and distortion correction need to be considered for accurate calculation.

[0076] S204, calculate target motion speed parameters and target motion acceleration parameters based on the target position information of consecutive multiple frames, and analyze the target movement trend according to the target motion speed parameters and the target motion acceleration parameters.

[0077] Target position information refers to the azimuth and elevation of the target in each frame. Target motion velocity parameter represents the angular velocity of the target, which is calculated by the difference of the angle between adjacent frames. Target motion acceleration parameter represents the angular acceleration, which is calculated by the difference of the velocity. Target movement trend describes the development direction of the motion of the target. For example, when the azimuth of the target in the last 5 frames is 1.2°, 1.5°, 1.9°, 2.4° and 3.0° respectively, the average angular velocity can be calculated as 0.45° / frame, and the angular acceleration can be calculated as 0.1° / frame².

[0078] This step is calculated by buffering the target position information of the last N frames (usually 5-10 frames). First, the azimuth and elevation are processed respectively: the angle difference between adjacent frames is calculated to obtain the inter-frame angular velocity sequence; the angular velocity sequence is differentiated again to obtain the angular acceleration sequence. Then, the velocity sequence and the acceleration sequence are respectively smoothed to eliminate the influence of random fluctuations. Finally, based on the averaged velocity and acceleration data, the motion trend of the target is determined according to their size and sign relationship. This multi-frame joint analysis method can accurately reflect the actual motion characteristics of the target.

[0079] S205, determining the target motion state parameter based on the target movement trend.

[0080] The target motion state parameter includes acceleration, constant speed and deceleration. The motion state determination is based on the threshold comparison and sign relationship analysis of the velocity and acceleration. For example, when the velocity is 2° / frame and continuously increases, and the acceleration is 0.8° / frame², it is determined as an acceleration state; when the velocity is stable at 1.5° / frame, and the acceleration fluctuates within ±0.3° / frame², it is determined as a constant speed state.

[0081] The determination process adopts a regularized judgment process: when the absolute value of the acceleration is less than the velocity threshold (0.3° / frame²), it is determined as a constant speed state; when the absolute value of the acceleration is greater than the acceleration threshold (0.5° / frame²), the sign relationship of the velocity and the acceleration is further compared: same sign is determined as an acceleration state, and different sign is determined as a deceleration state. This determination method is independently performed in the azimuth and elevation directions respectively, and finally the motion state parameters of the target in two degrees of freedom are obtained.

[0082] S206, selecting the corresponding control parameter group according to the control area where the target position is located and the target motion state.

[0083] The control region refers to the distribution of regions divided into outer circle, middle circle and inner circle. The control parameter group includes proportional coefficient Kp, integral coefficient Ki and differential coefficient Kd. Each region is provided with a parameter group corresponding to three motion states, forming nine groups of parameter configurations. For example, the parameter group (Kp=1.1, Ki=2.0, Kd=0.5) is used in the outer circle acceleration state, and the parameter group (Kp=0.8, Ki=0.05, Kd=0.1) is used in the inner circle constant speed state.

[0084] The parameter selection process is based on the spatial position and motion state of the target: first, according to the azimuth angle and the pitch angle of the target, determine the control region where the target is located, and divide the entire tracking space into three regions: outer circle (edge), middle circle (transition) and inner circle (center). Then, combined with the currently determined motion state, select the corresponding control parameter group from the preset parameter table. For the outer circle region, use a larger integral coefficient to quickly adjust; for the middle circle region, use a larger proportional coefficient to improve the response speed; for the inner circle region, use the basic parameters to maintain stability. This region-based and state-based parameter selection strategy can achieve adaptive adjustment of the turntable control.

[0085] S207, calculate the proportional term, integral term and differential term of the position deviation according to the control parameter group, add the proportional term, integral term and differential term to obtain the PID control output, and limit the amplitude of the PID control output according to the maximum allowed speed at the current focal length to obtain the control quantity.

[0086] The position deviation refers to the difference between the current angle position of the target and the expected position. The proportional term is the product of the deviation and the proportional coefficient. The integral term is the product of the historical deviation cumulative value and the integral coefficient. The differential term is the product of the deviation rate and the differential coefficient. The maximum allowable speed is the upper limit value of the turntable motion speed determined based on the current focal length, which decreases with the increase of the focal length. For example, when the position deviation is 2°, the parameter group (Kp=1.1, Ki=0.05, Kd=0.2) is used to calculate: proportional term=2.2°, integral term=0.5°, differential term=-0.1°, PID output=2.6°.

[0087] This step performs specific calculations after selecting control parameters. First, calculate the proportional term: u_p = Kp × e(t), where e(t) is the current deviation; then calculate the integral term: u_i = Ki × ∑e(t), accumulate the deviation of the last 30 frames; then calculate the derivative term: u_d = Kd × [e(t)-e(t-1)], use the difference between the current frame and the last frame. Add the three terms to get the PID output: u = u_p + u_i + u_d. Finally, calculate the maximum allowed speed v_max = k / f (k is the proportional coefficient) based on the current focal length f, and limit the amplitude of the PID output: if |u| > v_max, then u = sign(u) × v_max. The azimuth axis and the elevation axis perform the above calculations respectively.

[0088] S208, first-order filtering is performed on the control quantity to obtain a motion control instruction, and the azimuth axis and the elevation axis are driven to move based on the motion control instruction.

[0089] First-order filtering is a low-pass filtering method used to smooth the changes in the control instruction. The motion control instruction is the angular velocity instruction used to drive the motor after filtering. The azimuth axis and the elevation axis correspond to the horizontal and vertical rotational degrees of freedom of the turntable, respectively. For example, when the original control quantity is 2.6°, after first-order filtering with a filtering coefficient α = 0.7, the control instruction is 1.82°.

[0090] This step uses a recursive method to implement first-order filtering: y(n) = α × x(n) + (1-α) × y(n-1), where x(n) is the current control quantity, y(n-1) is the output value of the last time, y(n) is the control instruction of this time, and α is the filtering coefficient (0 < α < 1). A larger α value provides fast response, and a smaller α value provides smooth output. The filtered control instruction is sent to the motor driver through the communication interface, and the driver converts the angular velocity instruction into a motor control signal to realize the coordinated motion of the turntable. This processing method effectively suppresses the sudden changes in the control instruction and improves the stability of the turntable motion.

[0091] S209, obtain the current focal length information in the target tracking process, and calculate the corresponding field of view angle according to the current focal length information.

[0092] Focal length information refers to the actual focal length value of the zoom lens at the moment, which is read through the lens encoder. The field of view angle refers to the range of spatial angles that the camera can observe, which is inversely proportional to the focal length. For example, when the focal length is 50mm, the corresponding horizontal field of view angle is about 7.2°, and the vertical field of view angle is about 4.1° (based on 1 inch target size calculation).

[0093] This step is implemented by first reading the current focal length f (unit: mm) through the lens communication interface. Then the field of view angles are calculated according to the camera target size: horizontal field of view = 2 × arctan(w / (2f)), vertical field of view = 2 × arctan(h / (2f)), where w, h are the horizontal and vertical size of the target (unit: mm) respectively. The field of view information is used to determine the control range and adjust the control parameters of target tracking. This calculation takes into account the imaging characteristics of the lens, providing an important reference for tracking control.

[0094] S210, determine a new maximum allowed speed based on the field of view angle, and limit the PID control output of the next frame according to the new maximum allowed speed, which is proportional to the focal length.

[0095] The field of view angle refers to the angle of the camera's observation range, which is inversely proportional to the focal length. The maximum allowed speed is the upper limit of the speed of the turntable motion, which is used to limit the PID output and is proportional to the focal length. The limiting process refers to limiting the control quantity that exceeds the speed limit within the allowed range. For example, when the focal length increases from 50mm to 100mm, the maximum allowed speed increases from 5° / s to 10° / s, and if the PID output is 12° / s, the limited control quantity is 10° / s.

[0096] This step is executed as follows: first, calculate the new maximum allowed speed v_max = k × f according to the current focal length f, where k is the proportionality coefficient, which is set according to system characteristics. Then limit the output u of the PID controller: when |u| > v_max, let u = sign(u) × v_max. The larger the focal length, the larger the maximum allowed speed, which takes into account the larger angular velocity of target motion in the image at high magnification, and increases the speed limit to ensure tracking performance.

[0097] S211, collect the vibration signal during the gimbal motion, and perform frequency spectrum analysis on the vibration signal to obtain multiple main vibration frequency components.

[0098] The vibration signal refers to the mechanical vibration generated during the gimbal motion, which is collected by an acceleration sensor. Frequency spectrum analysis is the process of converting time-domain vibration signals into frequency-domain representation. The main vibration frequency components refer to the frequency components with a large energy proportion in the vibration signal. For example, a vibration signal collected may contain three main frequency components of 5Hz, 12Hz and 20Hz, corresponding to different vibration modes of the gimbal.

[0099] This step is implemented by the following method: first, collect vibration data through the acceleration sensor installed on the gimbal, and set the sampling frequency to 1000 Hz. Perform fast Fourier transform (FFT) on the collected time domain data to obtain the frequency spectrum. In the frequency spectrum, identify the main frequency components by peak detection, usually selecting frequency points with amplitude exceeding a certain threshold. In specific implementation, use 2048-point FFT transform, cooperate with Hanning window function to reduce spectral leakage, and find the significant peaks in the frequency spectrum through local maximum search algorithm to obtain each vibration frequency component.

[0100] S212, decompose the motion control instruction into a plurality of micro-displacement control instruction sequences, wherein each micro-displacement control instruction sequence corresponds to a main vibration frequency component.

[0101] Micro-displacement control instruction sequence refers to the decomposition of the original control instruction into a plurality of small-amplitude motion instructions. The frequency characteristics of each sequence correspond to a main vibration frequency, and vibration suppression is achieved through reasonable phase configuration. For example, the original 10° motion instruction can be decomposed into three micro-displacement sequences: 5 Hz corresponding to 3°, 12 Hz corresponding to 4°, and 20 Hz corresponding to 3°, each sequence is implemented according to a specific execution time sequence.

[0102] This step is completed by the following way: first, according to the identified main vibration frequency {f1, f2,..., fn}, determine the micro-displacement amplitude corresponding to each frequency component. Adopt vibration energy proportion as weight, distribute the original control quantity U to each frequency component in proportion: Ui=U×(Ai / ∑Ai), where Ai is the amplitude of the i-th frequency component. Then generate the corresponding micro-displacement sequence for each frequency component: set the reference period T, generate the control instruction at the time point tj=j×T / m (j=0, 1,..., m-1), and the instruction value is Ui×sin(2πfi×tj+φi), where φi is the phase compensation amount. This decomposition method adjusts the phase relationship of each sequence so that the combined motion can suppress the inherent vibration of the gimbal.

[0103] S213, based on the size of the main vibration frequency component, set the displacement amount and execution time interval of each micro-displacement control instruction sequence, which are inversely related to the corresponding vibration frequency component.

[0104] Vibration frequency component refers to the main frequency value in the gimbal vibration signal. Displacement amount refers to the angle change amount corresponding to each micro-displacement control instruction. Execution time interval refers to the time difference between adjacent micro-displacement control instructions. Inverse correlation means that the higher the frequency, the smaller the displacement amount and execution time interval. For example, set 2° displacement and 100 ms interval for 5 Hz vibration component, and set 0.5° displacement and 25 ms interval for 20 Hz vibration component.

[0105] The specific implementation of this step is: first, establish a mapping relationship for each vibration frequency fi: displacement Di = D_base / fi, execution time interval Ti = T_base / fi, where D_base and T_base are reference parameters. Take the lowest frequency component as the reference, set its displacement to 40% of the total displacement, and the time interval to 1 / 4 of the vibration period. Other frequency components calculate their displacement and time interval according to the inverse relationship. This setting ensures that high-frequency components use smaller adjustment steps and faster response speeds, effectively avoiding excitation system vibration.

[0106] S214, collect real-time vibration state information of the gimbal, and adjust the execution time interval according to the vibration state information, so that the adjusted execution time interval and the period of the vibration frequency component have a predetermined phase difference.

[0107] The vibration state information includes amplitude, frequency and phase information of the vibration. The execution time interval adjustment means dynamically modifying the timing of the instruction execution according to the real-time vibration state. The predetermined phase difference refers to the expected phase relationship between the control instruction and the vibration signal, usually set to 180 degrees to achieve vibration suppression. For example, when a 12Hz vibration signal is detected at the peak value, the corresponding control instruction is delayed 41.7ms (half a period) for execution.

[0108] The implementation process of this step is: real-time acquisition of vibration data through an acceleration sensor, with a sampling frequency of 1000Hz. Perform short-time Fourier transform on the collected data to extract the phase information φi(t) of each frequency component. Calculate the next execution time of each frequency component: t_next = t_current + (180° - φi(t)) / (360°×fi), where fi is the vibration frequency. This adaptive adjustment ensures that the execution time of the control instruction and the vibration signal form a cancellation relationship, improving the vibration suppression effect.

[0109] S215, control the cumulative displacement of the composite micro-motion sequence to be equal to the target displacement of the motion control instruction.

[0110] The composite micro-motion sequence refers to a motion sequence formed by combining multiple micro-displacement control instructions in time sequence. The cumulative displacement refers to the sum of all micro-displacements in the sequence. The target displacement refers to the total displacement required by the original motion control instruction. For example, the original instruction requires a rotation of 10°, so the sum of the displacements of all micro-displacement control instructions must be equal to 10°.

[0111] This step is achieved by first calculating the theoretical cumulative displacement ∑Di of all micro-displacement sequences. If there is a difference ΔU = U - ∑Di between ∑Di and the target displacement U, compensation is needed. The compensation method is as follows: ΔU is distributed according to the weight of each frequency component, and the displacement of each sequence is modified: Di_new = Di + ΔU×(Ai / ∑Ai), where Ai is the amplitude of the corresponding frequency component. Through this compensation mechanism, it is ensured that the final displacement of the composite micro-motion sequence is exactly equal to the target displacement required by the control instruction, and the control accuracy is guaranteed.

[0112] S216, execute each micro-displacement control instruction in the composite micro-motion sequence according to the preset execution time interval, and drive the gimbal to move.

[0113] The composite micro-motion sequence refers to a set of multiple micro-displacement control instructions arranged in a specific time sequence. The preset execution time interval refers to the execution time of each micro-displacement control instruction, which is determined after vibration analysis and phase compensation. The micro-displacement control instruction refers to a command for controlling the gimbal to make a small angle adjustment. The gimbal movement refers to the coordinated rotation of the azimuth axis and the pitch axis. For example, a certain composite sequence includes: t=0ms executes 1.2° displacement, t=25ms executes 0.8° displacement, t=50ms executes 0.5° displacement, and so on.

[0114] The specific execution process of this step is as follows: first, an instruction execution queue based on real-time clock is established, and all micro-displacement control instructions are sorted according to their preset execution time. When the system clock reaches each preset time, the corresponding micro-displacement instruction is taken out from the queue and sent to the motor driver. Each instruction contains: execution time ti, displacement Di, motion direction sign(Di), and execution duration ΔTi. The instruction is sent to the driver through an industrial bus (such as CAN, EtherCAT, etc.), and the driver converts the displacement instruction into motor speed and position control signals. The micro-displacement instructions of the azimuth axis and the pitch axis are executed synchronously to realize the spatial pointing control of the gimbal. The system continuously monitors the actual displacement feedback during execution to ensure that the cumulative displacement accurately reaches the target requirement. This time sequence control based step-by-step execution method, through reasonable time interval arrangement, not only realizes the accurate arrival of the target position, but also effectively suppresses the gimbal vibration.

[0115] In the process of instruction execution, the micro displacement sequences corresponding to different frequency components are interleaved: the sequence with higher frequency has smaller execution interval, and its micro displacement instructions are inserted into the execution gap of the sequence with lower frequency. For example, the instructions of the 20Hz sequence are executed every 50ms, while the instructions of the 5Hz sequence are executed every 200ms. By precisely controlling the execution time of each instruction, the system can achieve active suppression of the vibration of the gimbal. At the same time, the acceleration and deceleration planning of the motor driver ensures the smooth and continuous execution process of each micro displacement, avoiding mechanical impact. The entire execution process continues until all micro displacement instructions are completed, and the cumulative displacement reaches the target value.

[0116] The key of this execution strategy lies in the accuracy of timing control and the coordination of displacement execution. The timing control accuracy is better than 1ms by using a high-precision clock source (such as the hardware timer of the CPU). At the same time, a real-time operating system or an interrupt service program is used to ensure the timely execution of instructions. For each micro displacement instruction, the system also needs to consider the acceleration and deceleration characteristics of the motor to ensure smooth movement. Through this precise timing control and smooth movement planning, the high-precision pointing control and vibration suppression of the gimbal are finally achieved.

[0117] The gimbal target tracking system in the embodiment of the present application will be described from the perspective of hardware processing. Please refer to Figure 3 , which is a schematic diagram of an entity device structure of the gimbal target tracking system in the embodiment of the present application.

[0118] It should be noted that Figure 3 The structure of the gimbal target tracking system shown is only an example and should not impose any limitation on the functions and use range of the embodiment of the present application.

[0119] As Figure 3 shown, the gimbal target tracking system includes a central processing unit (CPU) 301, which can perform various appropriate actions and processes according to programs stored in a read-only memory (ROM) 302 or loaded from a storage portion 308 to a random access memory (RAM) 303, such as performing the method described in the above embodiment. In the RAM 303, various programs and data required for system operation are also stored. The CPU 301, the ROM 302, and the RAM 303 are connected to each other through a bus 304. An input / output (I / O) interface 305 is also connected to the bus 304.

[0120] The following components are connected to the I / O interface 305: an input section 306 including an audio input device, a push button switch, and the like; an output section 307 including a Liquid Crystal Display (LCD), and an audio output device, a lamp, and the like; a storage section 308 including a hard disk and the like; and a communication section 309 including a network interface card such as a LAN (Local Area Network) card, a modem, and the like. The communication section 309 performs a communication process via a network such as the Internet. A drive 310 is also connected to the I / O interface 305 as necessary. A removable recording medium 311, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, and the like, is attached to the drive 310 as necessary so that a computer program read therefrom can be installed into the storage section 308 as necessary.

[0121] In particular, the processes described above with reference to the flow charts can be implemented as a computer software program in accordance with embodiments of the present application. For example, an embodiment of the present application includes a computer program product comprising a computer program carried on a computer readable medium, the computer program containing computer programs for executing the methods shown in the flow charts. In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 309, and / or installed from the removable recording medium 311. When the computer program is executed by the central processing unit (CPU) 301, various functions defined in the present application are performed.

[0122] Note that specific examples of the computer readable storage medium can include but are not limited to one or more of a conduit with one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read only memory (ROM), an erasable programmable read only memory (EPROM), a flash memory, a fiber optic device, a portable compact disc read only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present application, a computer readable storage medium can be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.

[0123] The flowcharts and block diagrams in the drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowcharts or block diagrams can represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical functions. It should also be noted that in some alternative implementations, the functions noted in the blocks can occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks can sometimes be executed in the reverse order, depending upon the functionality involved.

[0124] In particular, the turntable target tracking system of the embodiment includes a processor and a memory, and the memory stores a computer program. When the computer program is executed by the processor, the multi-state PID control turntable target tracking method provided by the above-embodiment is implemented.

[0125] As another aspect, the present application also provides a computer-readable storage medium. The storage medium can be included in the turntable target tracking system described in the above-embodiment, or can exist independently without being assembled into the turntable target tracking system. The storage medium carries one or more computer programs. When the one or more computer programs are executed by a processor of the turntable target tracking system, the turntable target tracking system implements the multi-state PID control turntable target tracking method provided by the above-embodiment.

[0126] The above-embodiment is only used to illustrate the technical solutions of the present application, and not to limit the same. Although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or equivalently replace some technical features thereof. Such modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.

[0127] In the above-embodiment, according to the context, the term "when" can be interpreted as meaning "if" or "after" or "in response to determining" or "in response to detecting". Similarly, according to the context, the phrase "on determining" or "if detecting (the stated condition or event)" can be interpreted as meaning "if determining" or "in response to determining" or "on detecting (the stated condition or event)" or "in response to detecting (the stated condition or event)".

[0128] Those skilled in the art can understand that all or part of the processes in the above-mentioned method embodiments can be implemented by a computer program instructing relevant hardware to complete, the program can be stored in a computer readable storage medium, and the program can include the processes of the above-mentioned method embodiments when executed. The aforementioned storage medium includes ROM or random storage memory RAM, magnetic disc or optical disc and various storage code medium.

Claims

1. A multi-state PID control method for turntable target tracking, characterized in that, The method, applied to a turntable target tracking system, includes: Target motion velocity parameters and target motion acceleration parameters are calculated based on target position information from multiple consecutive frames, and the target movement trend is analyzed based on the target motion velocity parameters and target motion acceleration parameters. Based on the target movement trend determination, the target motion state parameters are determined, including acceleration state, constant speed state and deceleration state. The corresponding control parameter group is selected based on the control area where the target is located and the target's motion state. The control area includes an outer circle, a middle circle, and an inner circle. The proportional, integral, and derivative terms of the position deviation are calculated according to the control parameter set. The proportional, integral, and derivative terms are added together to obtain the PID control output. The control quantity is obtained by limiting the PID control output according to the maximum permissible speed at the current focal length. The control quantity is subjected to first-order filtering to obtain motion control commands, and the azimuth and pitch axes are driven to move based on the motion control commands. Vibration signals during the movement of the gimbal are collected, and the vibration signals are subjected to spectral analysis to obtain multiple main vibration frequency components; The motion control command is decomposed into multiple micro-displacement control command sequences, where each micro-displacement control command sequence corresponds to a major vibration frequency component. Multiple micro-displacement control command sequences are interleaved in the time domain to form a composite micro-motion sequence, wherein the cumulative displacement of the composite micro-motion sequence is equal to the target displacement of the original motion control command. The micro-displacement control commands in the composite micro-motion sequence are executed sequentially according to the preset execution time interval, driving the gimbal to move.

2. The method according to claim 1, characterized in that, The step of determining the target motion state parameters based on the target movement trend determination, wherein the target motion state parameters include acceleration state, constant speed state, and deceleration state, specifically includes: When the absolute value of the target motion acceleration parameter is greater than the acceleration threshold and the target motion velocity parameter has the same sign as the target motion acceleration parameter, it is determined to be an acceleration state; When the absolute value of the target motion acceleration parameter is less than the velocity threshold, it is determined to be a constant velocity state; When the absolute value of the target motion acceleration parameter is greater than the acceleration threshold and the target motion speed parameter has the opposite sign to the target motion acceleration parameter, it is determined to be a deceleration state.

3. The method according to claim 1, characterized in that, The step of selecting the corresponding control parameter group based on the control area where the target position is located and the target motion state, wherein the control area includes an outer circle, a middle circle, and an inner circle, specifically includes: When the control area is the outer circle, the corresponding control parameter group is selected from the preset outer circle control parameter table according to the target motion state. The outer circle control parameter table includes a first control parameter group, a second control parameter group, and a third control parameter group corresponding to the acceleration state, constant speed state, and deceleration state, respectively. When the control area is the middle circle, the corresponding control parameter group is selected from the preset middle circle control parameter table according to the target motion state. The middle circle control parameter table includes a fourth control parameter group, a fifth control parameter group, and a sixth control parameter group corresponding to the acceleration state, the constant speed state, and the deceleration state, respectively. When the control area is the inner circle, the corresponding control parameter group is selected from the preset inner circle control parameter table according to the target motion state. The inner circle control parameter table includes the seventh control parameter group, the eighth control parameter group, and the ninth control parameter group, which correspond to the acceleration state, the constant speed state, and the deceleration state, respectively.

4. The method according to claim 1, characterized in that, After the step of performing first-order filtering on the control quantity to obtain motion control commands, and driving the azimuth and pitch axes based on the motion control commands, the method further includes: Acquire the current focal length information during the target tracking process, and calculate the corresponding field of view based on the current focal length information; A new maximum permissible speed is determined based on the field of view, and the PID control output of the next frame is subjected to amplitude limiting processing according to the new maximum permissible speed. The focal length is proportional to the maximum permissible speed.

5. The method according to claim 4, characterized in that, Before the steps of calculating target motion velocity parameters and target motion acceleration parameters based on target position information from multiple consecutive frames, and analyzing the target movement trend based on the target motion velocity parameters and the target motion acceleration parameters, the method further includes: Determine the pixel coordinates of the image center point based on the camera intrinsic parameters of the image acquisition device; Obtain the target pixel position in the image, and calculate the pixel deviation of the target pixel position relative to the center point of the image; The target position information is converted into angular coordinates based on the pixel deviation and the current focal length information. The angular coordinates include azimuth and pitch angles. The azimuth angle is used to control the rotation of the azimuth axis, and the pitch angle is used to control the rotation of the pitch axis.

6. The method according to claim 1, characterized in that, The step of interleaving and combining multiple micro-displacement control command sequences in the time domain to form a composite micro-motion sequence, wherein the cumulative displacement of the composite micro-motion sequence is equal to the target displacement of the original motion control command, specifically includes: Based on the magnitude of the main vibration frequency components, the displacement amount and execution time interval of each of the micro-displacement control command sequences are set respectively, and the displacement amount and the execution time interval are inversely correlated with the corresponding vibration frequency components. The real-time vibration status information of the gimbal is collected, and the execution time interval is adjusted according to the vibration status information so that there is a predetermined phase difference between the adjusted execution time interval and the period of the vibration frequency component. The cumulative displacement of the composite micro-motion sequence is equal to the target displacement of the motion control command.

7. A turntable target tracking system, characterized in that, The turntable target tracking system includes: one or more processors and a memory; the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code including computer instructions, and the one or more processors call the computer instructions to cause the turntable target tracking system to perform the method as described in any one of claims 1-6.

8. A computer-readable storage medium comprising instructions, characterized in that, When the instruction is executed on the turntable target tracking system, the turntable target tracking system performs the method as described in any one of claims 1-6.

9. A computer program product, characterized in that, When the computer program product is run on the turntable target tracking system, the turntable target tracking system performs the method as described in any one of claims 1-6.

Citation Information

Patent Citations

  • Method for automatically and smoothly tracking target by cradle head

    CN102143324A

  • Target object tracking method and device, storage medium and electronic device

    CN111385474A