Turntable target tracking method and system based on multi-state PID (Proportion Integration Differentiation) control

By calculating motion parameters based on multi-frame target position information in the turntable target tracking system and dynamically adjusting PID control parameters, the tracking response lag and overshoot problems caused by fixed parameters are solved, achieving high-precision and stable target tracking control.

CN120872036AActive Publication Date: 2025-10-31BEIJING ZHONGDIAN LIANDA INFORMATION TECH CO LTD

Patent Information

Application Number
CN202511357662.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-23
Publication Date
2025-10-31
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 the target's motion characteristics, resulting in lag or overshoot in the tracking response, which affects the accuracy and stability of the system.

Method used

By calculating motion parameters based on target position information from multiple consecutive frames, the target motion state is determined. Then, the corresponding control parameter set is selected according to the target position and motion state. Combined with first-order filtering and amplitude limiting technology, the PID control output is dynamically adjusted to achieve optimized control for different regions and states.

Benefits of technology

It significantly improves the tracking accuracy and stability of the system when the target is accelerating or decelerating, eliminates the lag and overshoot of the tracking response, and improves the control accuracy and stability of the turntable target tracking system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120872036A_ABST
    Figure CN120872036A_ABST
Patent Text Reader

Abstract

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

Description

Technical Field

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

[0002] With the rapid development of intelligent equipment such as robots and drones, high-precision turntable target tracking systems are increasingly being used in fields such as military reconnaissance and industrial automation. Turntable target tracking systems need to accurately capture and track high-speed moving targets, which places higher demands on the system's motion control performance.

[0003] In related technologies, turntable target tracking systems typically employ a single PID control parameter to control the turntable's motion. This control method, when dealing with high-speed target movement, uses fixed PID parameters to control the entire tracking process, achieving turntable motion control by simply adjusting the proportional, integral, and derivative parameters.

[0004] However, when the target's motion state changes, the fixed PID parameters cannot adapt to the changes in the target's motion characteristics in a timely manner. Especially when the target is accelerating or decelerating, the system's tracking response will exhibit lag or overshoot, affecting the system's tracking accuracy. Summary of the Invention

[0005] This application provides a multi-state PID control method and system for turntable target tracking, which is used to improve the tracking accuracy of the turntable target tracking system.

[0006] Firstly, this application provides a multi-state PID control method for turntable target tracking, applied to a turntable target tracking system. The method includes: calculating target motion velocity parameters and target motion acceleration parameters based on target position information from multiple consecutive frames; analyzing the target motion velocity parameters and target motion acceleration parameters to obtain the target movement trend; determining target motion state parameters based on the target movement trend, including acceleration state, constant speed state, and deceleration state; selecting a corresponding control parameter set based on the control area where the target position is located and the target motion state, the control area including an outer circle, a middle circle, and an inner circle; calculating the proportional, integral, and derivative terms of the position deviation based on the control parameter set; adding the proportional, integral, and derivative terms to obtain the PID control output; limiting the PID control output based on the maximum permissible speed at the current focal length to obtain the control quantity; performing first-order filtering on the control quantity to obtain a motion control command; and driving the azimuth and pitch axes based on the motion control command.

[0007] In the above embodiments, motion parameters are calculated and the target motion state is determined based on target position information from multiple consecutive frames. The corresponding control parameter set is selected according to the control region where the target is located and its motion state, enabling the system to employ optimal PID parameters for different regions and motion states. The PID output is limited and a first-order filter is applied based on the current focal length, achieving a smooth transition of control commands. The entire control process fully adapts to changes in target motion characteristics, eliminating tracking response lag and overshoot, and significantly improving the system's tracking accuracy and stability when the target accelerates or decelerates.

[0008] In conjunction with some embodiments of the first aspect, in some embodiments, the step of determining the target motion state parameters based on the target movement trend, wherein the target motion state parameters include an acceleration state, a constant speed state, and a deceleration state, specifically includes: when the absolute value of the target motion acceleration parameter is greater than an acceleration threshold and the target motion speed 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 a speed threshold, it is determined to be a constant speed state; when the absolute value of the target motion acceleration parameter is greater than an acceleration threshold and the target motion speed parameter has an opposite sign to the target motion acceleration parameter, it is determined to be a deceleration state.

[0009] In the above embodiments, the state is determined based on the magnitude and sign relationship between the target's acceleration and velocity parameters. When the absolute value of the acceleration is greater than a threshold and the velocity and acceleration have the same sign, it is determined to be an acceleration state; when the absolute value of the acceleration is less than the velocity threshold, it is determined to be a constant velocity state; and when the absolute value of the acceleration is greater than the threshold and the velocity and acceleration have opposite signs, it is determined to be a deceleration state. This precise determination method based on motion parameters enables the system to accurately identify the target's motion characteristics, providing a reliable basis for the adaptive adjustment of subsequent control parameters and further improving the accuracy of tracking control.

[0010] In conjunction with some embodiments of the first aspect, in some embodiments, the step of selecting a 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, selecting a corresponding control parameter group from a preset outer circle control parameter table according to the target motion state, wherein 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 acceleration, constant speed, and deceleration states, respectively; when the control area is the middle circle, selecting a corresponding control parameter group from a preset middle circle control parameter table according to the target motion state, wherein 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 acceleration, constant speed, and deceleration states, respectively; when the control area is the inner circle, selecting a corresponding control parameter group from a preset inner circle control parameter table according to the target motion state, wherein the inner circle control parameter table includes a seventh control parameter group, an eighth control parameter group, and a ninth control parameter group corresponding to acceleration, constant speed, and deceleration states, respectively.

[0011] In the above embodiments, control parameter tables corresponding to acceleration, constant speed, and deceleration states are established in the outer, middle, and inner rings, respectively. The optimal control parameter set is selected from the corresponding parameter tables based on the target position and motion state. The system uses a larger integral coefficient for rapid adjustment in the outer ring region, a larger proportional coefficient for improving response speed in the middle ring region, and basic parameters for maintaining stability in the inner ring region. This region-specific and state-specific parameter configuration strategy achieves precise matching and smooth switching of the turntable control parameters, further enhancing the system's tracking performance.

[0012] In conjunction with some embodiments of the first aspect, in some embodiments, after the steps of performing first-order filtering on the control quantity to obtain motion control commands and driving the azimuth and pitch axes to move based on the motion control commands, the method further includes: acquiring current focal length information during target tracking and calculating the corresponding field of view based on the current focal length information; determining a new maximum permissible speed based on the field of view; and performing amplitude limiting processing on the PID control output of the next frame based on the new maximum permissible speed, wherein the focal length is proportional to the maximum permissible speed.

[0013] In the above embodiments, the current focal length information during target tracking is acquired and the corresponding field of view is calculated. Based on the field of view, a new maximum permissible speed is dynamically determined, and the PID control output of the next frame is subjected to amplitude limiting. The design that the focal length is proportional to the maximum permissible speed takes into account the large angular velocity exhibited by the target motion in the image at high magnification, enabling the system to provide sufficient dynamic response capability while ensuring stability, and effectively solving the problem of control parameter mismatch caused by changes in field of view during zooming.

[0014] In conjunction with some embodiments of the first aspect, in some embodiments, before the steps of calculating the target motion velocity parameters and target motion acceleration parameters based on the target position information of multiple consecutive frames, and analyzing the target movement trend based on the target motion velocity parameters and target motion acceleration parameters, the method further includes: determining the pixel coordinates of the image center point based on the camera intrinsic parameters of the image acquisition device; obtaining the target pixel position in the image, and calculating the pixel deviation of the target pixel position relative to the image center point; converting the target position information into angular coordinates based on the pixel deviation and the current focal length information, the angular coordinates including azimuth angle and pitch angle, the azimuth angle being used to control the rotational movement of the azimuth axis, and the pitch angle being used to control the rotational movement of the pitch axis.

[0015] In the above embodiments, the pixel coordinates of the image center point are determined based on the camera intrinsic 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 angular coordinates based on the pixel deviation and the current focal length information. This coordinate transformation method based on imaging geometry compensates for the deviation between the camera optical axis and the geometric center of the image, achieving accurate mapping from the pixel domain to the angular domain, and providing accurate motion commands for the coordinated control of the azimuth and pitch axes.

[0016] In conjunction with some embodiments of the first aspect, in some embodiments, after the steps 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: acquiring vibration signals during the gimbal movement, performing spectral analysis on the vibration signals to obtain multiple main vibration frequency components; decomposing the motion control commands into multiple micro-displacement control command sequences, wherein each micro-displacement control command sequence corresponds to a main vibration frequency component; interleaving and combining the 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; and sequentially executing each micro-displacement control command in the composite micro-motion sequence according to a preset execution time interval to drive the gimbal movement.

[0017] In the above embodiments, vibration signals during the gimbal's movement are collected and subjected to spectral analysis. The motion control commands are decomposed into multiple micro-displacement control command sequences corresponding to different vibration frequencies, which are then combined through time-domain interleaving to form a composite micro-motion sequence. Each micro-displacement control command is executed sequentially according to a preset execution time interval, so that the execution of the control commands cancels out the inherent vibration of the gimbal. This effectively suppresses gimbal vibration while ensuring cumulative displacement accuracy, significantly improving the system's motion stability.

[0018] In conjunction with some embodiments of the first aspect, in some embodiments, the step of temporally interleaving and combining multiple micro-displacement control command sequences 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: setting the displacement and execution time interval of each micro-displacement control command sequence based on the magnitude of the main vibration frequency components, wherein the displacement and execution time interval are inversely correlated with the corresponding vibration frequency components; collecting real-time vibration state information of the gimbal, adjusting the execution time interval according to the vibration state information, such that there is a predetermined phase difference between the adjusted execution time interval and the period of the vibration frequency components; and controlling the cumulative displacement of the composite micro-motion sequence to be equal to the target displacement of the motion control command.

[0019] In the above embodiments, based on the magnitude of the main vibration frequency components, the displacement amount and execution time interval of each micro-displacement control command sequence are set to be inversely correlated with the vibration frequency components. The execution time interval is dynamically adjusted according to the real-time vibration status information of the gimbal, so that the adjusted time interval forms a predetermined phase difference with the period of the vibration frequency components. This adaptive micro-displacement command scheduling mechanism allows high-frequency components to use smaller adjustment step sizes and faster response speeds, while low-frequency components use larger displacement amounts and longer execution intervals, achieving precise suppression of vibrations at different frequencies while ensuring cumulative displacement accuracy.

[0020] In a second aspect, embodiments of this application provide a turntable target tracking system, which includes: one or more processors and a memory; the memory is coupled to the one or more processors, and the memory is used to store computer program code, which includes computer instructions, and the one or more processors call the computer instructions to cause the turntable target tracking system to perform the method described in the first aspect and any possible implementation thereof.

[0021] Thirdly, embodiments of this application provide a computer program product containing instructions that, when the computer program product is run on a turntable target tracking system, cause the turntable target tracking system to perform the method described in the first aspect and any possible implementation thereof.

[0022] Fourthly, embodiments of this application provide a computer-readable storage medium including instructions that, when executed on a turntable target tracking system, cause the turntable target tracking system to perform the method described in the first aspect and any possible implementation thereof.

[0023] Understandably, the turntable target tracking system provided in the second aspect, the computer program product provided in the third aspect, and the computer storage medium provided in the fourth aspect are all used to execute the methods provided in the embodiments of this application. Therefore, the beneficial effects they can achieve can be referred to the beneficial effects in the corresponding methods, and will not be repeated here.

[0024] One or more technical solutions provided in the embodiments of this application have at least the following technical effects or advantages: 1. This application calculates motion parameters and determines the target's motion state based on target position information from multiple consecutive frames. It selects the corresponding control parameter set according to the target's location and motion state, enabling the system to employ optimal PID parameters for different regions and motion states. By limiting the PID output and applying a first-order filter based on the current focal length, a smooth transition of control commands is achieved. The entire control process fully adapts to changes in target motion characteristics, eliminating tracking response lag and overshoot, and significantly improving the system's tracking accuracy and stability during target acceleration or deceleration.

[0025] 2. This application determines the target's state based on the magnitude and sign relationship between the target's acceleration and velocity parameters. When the absolute value of the acceleration is greater than a threshold and the velocity and acceleration have the same sign, it is determined to be in an acceleration state; when the absolute value of the acceleration is less than the velocity threshold, it is determined to be in a constant velocity state; and when the absolute value of the acceleration is greater than the threshold and the velocity and acceleration have opposite signs, it is determined to be in a deceleration state. This precise determination method based on motion parameters enables the system to accurately identify the target's motion characteristics, providing a reliable basis for the adaptive adjustment of subsequent control parameters and further improving the accuracy of tracking control.

[0026] 3. This application establishes control parameter tables corresponding to acceleration, constant speed, and deceleration states in the outer, middle, and inner rings, respectively. The optimal control parameter set is selected from these tables based on the target position and motion state. The system uses a larger integral coefficient for rapid adjustment in the outer ring region, a larger proportional coefficient for improved response speed in the middle ring region, and basic parameters for stability in the inner ring region. This region-specific, state-specific parameter configuration strategy achieves precise matching and smooth switching of the turntable control parameters, further enhancing the system's tracking performance. Attached Figure Description

[0027] Figure 1 This is a flowchart illustrating a turntable target tracking method with multi-state PID control in an embodiment of this application. Figure 2 This is another flowchart illustrating the turntable target tracking method with multi-state PID control in the embodiments of this application; Figure 3 This is a schematic diagram of the physical device structure of a turntable target tracking system in an embodiment of this application. Detailed Implementation

[0028] The terminology used in the following embodiments of this application is for the purpose of describing particular embodiments only and is not intended to be limiting of this application. As used in the specification of this application, the singular expressions “a,” “an,” “the,” “the,” and “this” are intended to include the plural expressions as well, unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used in this application refers to any or all possible combinations including one or more of the listed items.

[0029] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as implying or suggesting relative importance or implicitly indicating the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature, and in the description of the embodiments of this application, unless otherwise stated, "multiple" means two or more.

[0030] To facilitate understanding, the application scenarios of the embodiments of this application are described below.

[0031] At an observation station in a bird sanctuary, visual tracking and behavioral studies of small migratory birds flying at high speeds are required. These birds are small in size, fly at high speeds (up to 20 m / s), and frequently make irregular circles and sharp turns. The observation station is equipped with a heavy-duty optoelectronic turntable system, carrying a high-magnification zoom lens (focal length range 100-1000 mm) and a high-resolution camera. Due to the high lens magnification and small field of view (approximately 1° at the telephoto end), coupled with the turntable's heavy weight (approximately 50 kg), tracking these fast-moving targets presents significant challenges: targets often quickly move out of the field of view or oscillate back and forth at the edge of the field of view. Especially when birds make sharp turns, the turntable's response often shows a significant lag, leading to target loss. Furthermore, due to the turntable's large inertia, the starting and braking processes are slow, making it prone to overshoot and oscillation. These problems severely affect the quality and continuity of the observation data, necessitating a precise tracking and control method that can adapt to the rapid maneuvering characteristics of targets.

[0032] In traditional turntable tracking control schemes, a single set of PID parameters is typically 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 turntable movement. 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 causing the target to move out of the field of view. When the target approaches the center of the field of view, the accumulation of integral action easily causes the turntable to overshoot, resulting in repeated oscillations of the target within the field of view. Especially during zooming, the fixed PID parameters are even more difficult to adapt to changes in the field of view angle. For example, at the telephoto end (focal length 1000mm), the originally suitable control parameters may become too aggressive due to the narrowing of the field of view, leading to tracking instability. Furthermore, when the target accelerates or decelerates, a single PID parameter cannot specifically adjust the control strategy, frequently resulting in tracking lag or overshoot, severely affecting the system's tracking accuracy and stability.

[0033] To facilitate understanding, the method provided in this implementation will be described in detail below, using the above scenario as an example. Please refer to [link / reference]. Figure 1 This is a flowchart illustrating a turntable target tracking method with multi-state PID control in an embodiment of this application.

[0034] S101. Calculate the target motion velocity parameters and target motion acceleration parameters based on the target position information of multiple consecutive frames, and analyze the target movement trend based on the target motion velocity parameters and target motion acceleration parameters.

[0035] The target position information represents the pixel coordinates of the target in the image coordinate system, acquired using a real-time video stream received by an RK3588, capturing 30 frames per second. The target motion velocity parameter is the ratio of the change in pixel position of the target between consecutive frames to the time interval between frames, used to quantify the instantaneous motion velocity of the target. The target motion acceleration parameter represents the rate of change of the target's velocity, used to describe the acceleration or deceleration trend of the target's motion. The target movement trend refers to the predicted trend of the target moving closer to or further away from the center of the field of view, obtained by analyzing the velocity and acceleration parameters.

[0036] This step is executed after the system receives each new frame of image data. Specifically, it first acquires the pixel position information of the target in 30 consecutive frames of images, and calculates the pixel velocity based on the position difference between adjacent frames. By performing differential operations on the velocity data of multiple consecutive frames, the pixel acceleration is obtained. Combining the current focal length value and field of view information of the turntable, the motion parameters in the pixel domain are converted into velocity and acceleration parameters in the angular domain. Finally, based on these parameters, the trend of the target moving away from or towards the center of the field of view is analyzed.

[0037] In some embodiments, the calculation and trend analysis of target motion parameters can be achieved in several ways: Optionally, the relative motion trend can be obtained by subtracting the focal length and field of view of the visual turntable from the pixel velocity and acceleration of the target to be tracked; the fewer the frames, the greater the flexibility of the turntable. Optionally, by segmenting the image, the accumulation function of the integral term is enhanced in the outermost ring to accelerate the target's tendency to move towards the center, while the control of the proportional term is enhanced in the central ring to respond to target changes in real time. It is understood that other motion trend analysis methods can also be used, and are not limited here.

[0038] S102. Determine the target motion state parameters based on the target movement trend. The target motion state parameters include acceleration state, constant speed state and deceleration state.

[0039] Among them, the target motion state parameters are used to classify the current motion characteristics of the target. The acceleration state corresponds to the situation where the target is rapidly moving away from the center of the field of view and the turntable needs to accelerate to track it; the constant speed state corresponds to the situation where the turntable needs to maintain stable tracking when the target is moving at a constant speed; and the deceleration state corresponds to the situation where the turntable needs to decelerate to avoid overshoot when the target is moving towards the center of the field of view.

[0040] This step is performed after the target's movement trend is obtained. Specifically, based on the state analysis module, the focal length and field of view of the vision turntable are combined with the pixel velocity and acceleration of the target to be tracked, as well as the rotation speed of the turntable, to perform subtraction calculations to determine whether the tracked target is in an accelerating, constant-speed, or decelerating state. For the accelerating state, a larger proportional and derivative coefficient is configured to improve responsiveness; for the constant-speed state, the integral coefficient is increased to stabilize tracking; and for the decelerating state, the derivative coefficient is increased to suppress overshoot.

[0041] In some embodiments, the determination of the target's motion state can be achieved in multiple ways: Optionally, different combinations of PID parameters can be used in different control regions. The outermost loop increases the integral term to pull the target back to the inner loop within 30 frames, the middle loop increases the proportional term to enhance maneuverability, and the inner loop uses basic PID parameters to achieve stable tracking. Optionally, a first-order low-pass filter can be used to process the control output to ensure smooth and continuous commands during state transitions and avoid motor oscillation. It is understood that other state determination and control methods can also be used, and are not limited here.

[0042] In some embodiments, this step specifically includes the following steps: 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 velocity parameter has the opposite sign to the target motion acceleration parameter, it is determined to be a deceleration state.

[0043] The target motion acceleration parameter refers to the rate of change of the target's speed in consecutive multiple frames of images, which is calculated by the speed difference between adjacent frames and has the unit of pixels / frame². The target motion speed parameter refers to the rate of change of the target's position between adjacent frames and has the unit of pixels / frame. The acceleration threshold is a preset acceleration determination boundary used to distinguish whether the target is in a significant acceleration or deceleration state, and the typical value is 50 pixels / frame². The speed threshold is the acceleration range boundary used to determine whether the target is in a uniform motion state, and the typical value is 20 pixels / frame². The parameters having the same sign means that the signs of the speed and acceleration are the same, indicating that the target is accelerating away from the center of the image; the parameters having different signs means that the signs of the speed and acceleration are opposite, indicating that the target is decelerating.

[0044] This step realizes the accurate determination of the motion state by analyzing the target motion parameters. When specifically implemented, first obtain the pixel position sequence {P1, P2,..., P 30} of the target in 30 consecutive frames of images. Calculate the speed for every two adjacent frames: Vi = (Pi₊1 - Pi) / Δt, where Δt is the inter-frame time interval (usually 1 / 30 seconds). Then calculate the acceleration between adjacent speeds: ai = (Vi₊1 - Vi) / Δt. Compare the calculated acceleration value with the preset acceleration threshold (50 pixels / frame²) and speed threshold (20 pixels / frame²): when |ai| > 50 and Vi × ai > 0, it is determined to be in an acceleration state, and at this time, enable the PID parameter group for the acceleration state (Kp = 1.8, Ki = 0.01, Kd = 0.2); when |ai| < 20, it is determined to be in a constant speed state, and enable the parameter group for the constant speed state (Kp = 0.8, Ki = 0.05, Kd = 0.1); when |ai| > 50 and Vi × ai < 0, it is determined to be in a deceleration state, and enable the parameter group for the deceleration state (Kp = 1.0, Ki = 0.03, Kd = 0.6). This method of state determination based on motion parameters realizes the accurate recognition and classification of the target motion characteristics and provides a reliable basis for the subsequent switching of control strategies.

[0045] S103. Select the corresponding control parameter group according to the control area where the target position is located and the target motion state. The control area includes an outer circle, a middle circle, and an inner circle.

[0046] Among them, the control area represents the position partition of the target in the image and adopts a "hui" - shaped partition method. The outer circle area refers to the edge area of the image, which is used to quickly respond to the target far from the center; the middle circle area refers to the transition area between the outer circle and the inner circle, which is used to improve maneuverability; the inner circle area refers to the area close to the center of the image, which is used to achieve stable and accurate tracking. The control parameter group includes three parameters: the proportional coefficient Kp, the integral coefficient Ki, and the differential coefficient Kd, which are used to adjust the characteristics of the PID controller.

[0047] This step is executed after the target's motion state is determined. Specifically, first, the control region where the target pixel is located is determined. Then, based on the combination of the control region and the motion state, the corresponding PID parameter group is selected from a preset parameter table. For the outer region, the integral term is increased during acceleration to quickly pull the target back to the inner region; for the middle region, the proportional term is increased to enhance maneuverability; for the inner region, basic PID parameters are used to ensure stability. The parameter configuration for different regions fully considers the balance between the real-time performance and stability of the turntable control.

[0048] In some embodiments, control parameters can be selected in several ways: Optionally, in the outer region, the proportional term of the original PID parameters can be multiplied by 1.1, the integral term by 2.0, and the derivative term by 0.5; in the middle region, the proportional term by 1.5, the integral term by 1.2, and the derivative term by 0.8; while in the inner region, the original parameters remain unchanged, achieving differentiated control in different regions. Optionally, a mapping relationship between the target type and the optimal PID parameters can be established, and appropriate parameter sets can be adaptively selected based on the target characteristics to improve control performance in different scenarios. It is understood that other parameter selection strategies can also be adopted, and are not limited here.

[0049] 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 the image in a "return" shape: 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 near the center of the image; the control parameter group includes three parameters: the proportional coefficient Kp, the integral coefficient Ki, and the differential 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 parameter by 1.1, the integral term by 2.0, and the differential term by 0.5, for quickly pulling 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 parameter by 0.8, the integral term by 1.5, and the differential 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 parameter by 1.5, the integral term by 1.2, and the differential term by 0.8, for enhancing 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 parameter by 1.2, the integral term by 1.0, and the differential 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 areas and states, the system can select the most suitable control parameters in different situations and achieve precise tracking control of the target.

[0050] In some embodiments, this step specifically includes the following steps: 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.

[0051] 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 and 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 and is used to improve the maneuverability of the turntable. The inner ring area refers to the area within 200 pixels around the image center and 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 the motion state and is used to achieve quick parameter search and switching.

[0052] This step realizes the adaptive parameter selection based on the target position and motion state. During specific implementation, first calculate the distance d = √(x² + y²) from the target pixel coordinates (x, y) to the center of the image. When d > 400 pixels, it is determined as the outer circle, and at this time, select parameters from the outer circle parameter table: the acceleration state corresponds to the first control parameter group (Kp = 1.1×1.8, Ki = 2.0×0.01, Kd = 0.5×0.2), the constant speed state corresponds to the second control parameter group (Kp = 1.1×0.8, Ki = 2.0×0.05, Kd = 0.5×0.1), and the deceleration state corresponds to the third control parameter group (Kp = 1.1×1.0, Ki = 2.0×0.03, Kd = 0.5×0.6). When 200 < d ≤ 400 pixels, it is determined as the middle circle, and select from the middle circle parameter table: the acceleration state corresponds to the fourth control parameter group (Kp = 1.5×1.8, Ki = 1.2×0.01, Kd = 0.8×0.2), the constant speed state corresponds to the fifth control parameter group (Kp = 1.5×0.8, Ki = 1.2×0.05, Kd = 0.8×0.1), and the deceleration state corresponds to the sixth control parameter group (Kp = 1.5×1.0, Ki = 1.2×0.03, Kd = 0.8×0.6). When d ≤ 200 pixels, it is determined as the inner circle, and select from the inner circle parameter table: the acceleration state corresponds to the seventh control parameter group (Kp = 1.8, Ki = 0.01, Kd = 0.2), the constant speed state corresponds to the eighth control parameter group (Kp = 0.8, Ki = 0.05, Kd = 0.1), and the deceleration state corresponds to the ninth control parameter group (Kp = 1.0, Ki = 0.03, Kd = 0.6). Through this way of parameter configuration by region and state, the precise matching and smooth switching of the turntable control parameters are realized.

[0053] S104. Calculate the proportional term, integral term, and differential term of the position deviation respectively according to the control parameter group, add the proportional term, integral term, and differential term to obtain the PID control output, and limit the PID control output according to the maximum allowable speed at the current focal length to obtain the control amount.

[0054] Among them, the position deviation represents the deviation value between the current pixel position of the target and the center of the image. 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 accumulated deviation value within 30 frames and the integral coefficient, which is used to eliminate the steady-state error. The differential term is the product of the deviation change rate and the differential coefficient, which is used to provide lead control to suppress overshoot. The maximum allowable speed is the upper limit of the turntable motion speed determined based on the current focal length, which is proportional to the focal length.

[0055] This step is executed after the control parameters are selected. Specifically, the pixel deviation between the target position and the image center is first calculated. This deviation value is then multiplied by the proportional, integral, and derivative coefficients to obtain three control components. The integral term is calculated using the cumulative deviation value of the most recent 30 frames, and the derivative term is calculated using the rate of change of deviation between adjacent frames. The three components are added together to obtain the PID control output. Then, the output is limited according to the maximum permissible speed at the current focal length to obtain the final control quantity. The larger the focal length, the smaller the maximum permissible speed, to ensure control stability.

[0056] In some embodiments, PID control calculation can be implemented in several ways: Optionally, state predictive control based on image frame position trends can be used, calculating the control output using kp pixel offset + ki (sum of pixel offsets over 30 frames) + kd* (acceleration of the offset), and then multiplying it by the maximum allowable speed coefficient corresponding to the current focal length for limiting; Optionally, feedforward control can be combined with the target motion model, superimposing predictive compensation on the PID output to improve the real-time performance of the control. It is understood that other control algorithms can also be used to implement the turntable's tracking control, which is not limited here.

[0057] S105. Perform first-order filtering on the control quantity to obtain motion control commands, and drive the azimuth and pitch axes to move based on the motion control commands.

[0058] In this context, first-order filtering refers to low-pass filtering of the control input to smooth changes in control commands. Motion control commands are the filtered angular velocity commands used to drive the turntable motors. The azimuth axis is the turntable's horizontal rotation axis, used for controlling target horizontal tracking. The pitch axis is the turntable's vertical rotation axis, used for controlling target altitude tracking.

[0059] This step is executed after the PID control input is obtained. Specifically, the control input is first processed by a first-order low-pass filter, the cutoff frequency of which is set according to the dynamic characteristics of the turntable. Filtering eliminates high-frequency oscillations in the control input, making the changes in control commands smoother. The filtered control commands are then sent to the azimuth and pitch axis motor drivers respectively, achieving coordinated turntable movement. This approach effectively avoids turntable jitter caused by state switching or external interference, improving the stability of the tracking process.

[0060] In some embodiments, the filtering and execution of control commands can be achieved in various ways: Optionally, vibration signal acquisition and spectrum analysis methods can be used to obtain the main vibration frequency components during the turntable's motion, decompose the control commands into multiple micro-displacement sequences, and combine them through time-domain interleaving to form a composite micro-motion sequence, which is then executed sequentially according to a preset time interval to achieve smooth control; Optionally, the vibration state information of the turntable can be acquired in real time, and the filter parameters and command execution timing can be dynamically adjusted so that there is a predetermined phase difference between the adjusted execution time interval and the period of the vibration frequency components, thereby suppressing resonance. It is understood that other control command processing methods can also be used, which are not limited here.

[0061] The following provides a more detailed description of the process of the method provided in this implementation. Please refer to [link / reference]. Figure 2 This is another flowchart illustrating the turntable target tracking method with multi-state PID control in this application embodiment.

[0062] S201. Determine the pixel coordinates of the image center point based on the camera intrinsic parameters of the image acquisition device.

[0063] Camera intrinsics are a set of parameters describing the geometric characteristics of camera imaging, including focal length, principal point coordinates, distortion coefficients, etc., obtained through camera calibration. The image center point is the intersection of the optical axes on the image plane, and its pixel coordinates are usually close to, but not exactly equal to, half the image resolution. Pixel coordinates refer to a two-dimensional coordinate system on the image plane with the upper left corner as the origin, the positive x-axis to the right, and the positive y-axis downwards. For example, for a 1920×1080 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 intrinsics.

[0064] This step is performed once during system initialization. Specifically, it first reads the intrinsic parameter matrix obtained from camera calibration and extracts the principal point coordinates (cx, cy). These principal point coordinates are then used as the pixel coordinates of the image center point for subsequent deviation calculations. The intrinsic parameter matrix is ​​typically represented as a 3×3 matrix: [[fx, 0, cx], [0, fy, cy], [0, 0, 1]], where fx and fy are the focal lengths, and cx and cy are the principal point coordinates. The image center point determined in this way can compensate for the deviation between the camera's optical axis and the image's geometric center, improving tracking accuracy.

[0065] S202. 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.

[0066] The target pixel position refers to the two-dimensional coordinates of the target on the image plane, obtained through a target detection algorithm. Pixel deviation refers to the coordinate difference between the target pixel position and the image center point, containing both horizontal and vertical components. The output of the target detection algorithm is usually the center coordinates of the target bounding box, expressed in (x, y) form. 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).

[0067] This step is performed during the processing of each frame of image. Specifically, it first obtains the center coordinates (x, y) of the bounding box output by the object detection algorithm. Then, it subtracts the image center coordinates (cx, cy) from the target coordinates 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. A positive value indicates that the target is to the right or below the center point, and a negative value indicates that it is to the left or above the center point.

[0068] S203. Based on the pixel deviation and current focal length information, the target position information is converted into angular coordinates, which 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.

[0069] Angular coordinates refer to the deflection angle of the target relative to the camera's 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, used for converting pixel coordinates to angles. 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 50mm and the pixel deviation is (240, 60), an azimuth angle of 2.74 degrees and a pitch angle of 0.69 degrees may be obtained.

[0070] This step is performed after obtaining the pixel deviation. Specifically, the focal length *f* of the current lens is first obtained. Then, the arctangent function is used to calculate the angles: azimuth = arctan(dx / f), pitch = arctan(dy / f), where dx and dy are the pixel deviations. The calculation results need to be converted from radians to degrees. This conversion takes into account the similar triangle relationship in imaging principles, accurately reflecting 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 achieving spatial tracking of the target. In practical applications, factors such as pixel size and distortion correction also need to be considered for precise calculations.

[0071] S204. Calculate the target motion velocity parameters and target motion acceleration parameters based on the target position information of multiple consecutive frames, and analyze the target movement trend based on the target motion velocity parameters and target motion acceleration parameters.

[0072] Target position information refers to the azimuth and pitch angles of the target in each frame of the image. The target motion velocity parameter represents the target's angular velocity, calculated by the angular difference between adjacent frames. The target motion acceleration parameter represents the angular acceleration, calculated by the velocity difference. The target movement trend describes the direction of the target's motion. For example, if the azimuth angles of five consecutive frames are 1.2°, 1.5°, 1.9°, 2.4°, and 3.0°, the average angular velocity can be calculated to be 0.45° / frame, and the average angular acceleration to be 0.1° / frame².

[0073] This step calculates the target's position information by caching the most recent N frames (typically 5-10 frames). First, the azimuth and elevation angles are processed separately: the angle difference between adjacent frames is calculated to obtain an inter-frame angular velocity sequence; the angular velocity sequence is then differencing again to obtain an angular acceleration sequence. Next, moving averages are applied to both the velocity and acceleration sequences to eliminate the influence of random fluctuations. Finally, based on the averaged velocity and acceleration data, and their magnitude and sign relationships, the target's motion trend is determined. This multi-frame joint analysis method accurately reflects the target's actual motion characteristics.

[0074] S205. Determine the target motion state parameters based on the target movement trend.

[0075] The target motion state parameters include three states: acceleration, constant speed, and deceleration. Motion state determination is based on threshold comparison of velocity and acceleration, as well as sign relationship analysis. For example, when the velocity is 2° / frame and continues to increase, and the acceleration is 0.8° / frame², it is determined to be an acceleration state; when the velocity is stable at 1.5° / frame, and the acceleration fluctuates within the range of ±0.3° / frame², it is determined to be a constant speed state.

[0076] The determination process employs a standardized procedure: when the absolute value of acceleration is less than the velocity threshold (0.3° / frame²), it is determined to be in a constant velocity state; when the absolute value of acceleration is greater than the acceleration threshold (0.5° / frame²), the signs of velocity and acceleration are further compared: if they are the same, it is determined to be in an acceleration state; if they are opposite, it is determined to be in a deceleration state. This determination method is performed independently in both azimuth and pitch directions, ultimately obtaining the target's motion state parameters in two degrees of freedom.

[0077] S206. Select the corresponding control parameter group according to the control area where the target is located and the target's motion state.

[0078] The control region refers to the area distribution that divides the image into outer, middle, and inner circles. The control parameter set includes the scaling factor Kp, the integral factor Ki, and the derivative factor Kd. Each region is assigned a parameter set corresponding to three motion states, forming a total of nine parameter configurations. For example, the parameter set (Kp=1.1, Ki=2.0, Kd=0.5) is used in the outer circle acceleration state, while the parameter set (Kp=0.8, Ki=0.05, Kd=0.1) is used in the inner circle constant speed state.

[0079] The parameter selection process is based on the target's spatial position and motion state: First, the target's azimuth and pitch angles determine its control area, dividing the entire tracking space into three regions: outer (edge), middle (transition), and inner (center). Then, combined with the currently determined motion state, the corresponding control parameter set is selected from a preset parameter table. For the outer region, a larger integral coefficient is used for rapid adjustment; for the middle region, a larger proportional coefficient is used to improve response speed; and for the inner region, basic parameters are used to maintain stability. This region-based, state-based parameter selection strategy enables adaptive adjustment of the turntable control.

[0080] S207. Calculate the proportional, integral, and derivative terms of the position deviation according to the control parameter set. Add the proportional, integral, and derivative terms to obtain the PID control output. Limit the PID control output according to the maximum permissible speed at the current focal length to obtain the control quantity.

[0081] Position deviation refers to the difference between the target's current angular position and its desired position. The proportional term is the product of the deviation and the proportional coefficient. The integral term is the product of the cumulative historical deviation and the integral coefficient. The derivative term is the product of the rate of change of deviation and the derivative coefficient. The maximum permissible speed is the upper limit of the turntable's movement speed determined based on the current focal length, decreasing as the focal length increases. For example, when the position deviation is 2°, using the parameter set (Kp=1.1, Ki=0.05, Kd=0.2), we calculate: proportional term = 2.2°, integral term = 0.5°, derivative term = -0.1°, PID output = 2.6°.

[0082] This step performs specific calculations after selecting the control parameters. First, the proportional term is calculated: u_p = Kp × e(t), where e(t) is the current deviation; then the integral term is calculated: u_i = Ki × ∑e(t), accumulating the deviations of the last 30 frames; next, the derivative term is calculated: u_d = Kd × [e(t)-e(t-1)], using the deviation difference between the current frame and the previous frame. The three terms are added together to obtain the PID output: u = u_p + u_i + u_d. Finally, the maximum permissible speed v_max = k / f (where k is the proportional coefficient) is calculated based on the current focal length f, and the PID output is limited: if |u|>v_max, then u=sign(u)×v_max. The above calculations are performed for the azimuth and pitch axes respectively.

[0083] S208. Perform first-order filtering on the control quantity to obtain motion control commands, and drive the azimuth and pitch axes to move based on the motion control commands.

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

[0085] This step employs a recursive approach to implement first-order filtering: y(n) = α×x(n) + (1-α)×y(n-1), where x(n) is the current control variable, y(n-1) is the previous output value, y(n) is the current output control command, and α is the filtering coefficient (0<α<1). A larger α value provides a fast response, while a smaller α value provides a smooth output. The filtered control command is sent to the motor driver via the communication interface. The driver converts the angular velocity command into a motor control signal, achieving coordinated movement of the turntable. This processing method effectively suppresses abrupt changes in control commands and improves the smoothness of the turntable's movement.

[0086] S209. Obtain the current focal length information during the target tracking process, and calculate the corresponding field of view based on the current focal length information.

[0087] Focal length information refers to the actual focal length value of the zoom lens, read by the lens encoder. Field of view refers to the range of spatial angles that the camera can observe, and is inversely proportional to the focal length. For example, when the focal length is 50mm, the corresponding horizontal field of view is approximately 7.2°, and the vertical field of view is approximately 4.1° (calculated based on a 1-inch target surface size).

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

[0089] S210. Determine a new maximum permissible speed based on the field of view, and perform amplitude limiting processing on the PID control output of the next frame according to the new maximum permissible speed. The focal length is proportional to the maximum permissible speed.

[0090] The field of view refers to the angular size of the camera's observation range, and is inversely proportional to the focal length. The maximum permissible speed is the upper limit of the turntable's movement speed, used to limit the PID output, and is directly proportional to the focal length. Limiting refers to restricting the control quantity exceeding the speed limit within the permissible range. For example, when the focal length increases from 50mm to 100mm, the maximum permissible speed increases from 5° / s to 10° / s. If the PID output is 12° / s, then the limited control quantity will be 10° / s.

[0091] The execution process is as follows: First, calculate the new maximum permissible speed v_max = k×f based on the current focal length f, where k is a proportional coefficient 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 greater the maximum permissible speed. This design takes into account the larger angular velocity exhibited by the target motion in the image at high magnification, ensuring tracking performance by increasing the speed limit.

[0092] S211. Collect vibration signals during the movement of the gimbal, perform spectral analysis on the vibration signals, and obtain multiple main vibration frequency components.

[0093] Vibration signals refer to the mechanical vibrations generated during the movement of the gimbal, collected by an accelerometer. Spectrum analysis is the process of converting the time-domain vibration signal into a frequency-domain representation. The main vibration frequency components are the frequency components with the largest energy proportion in the vibration signal. For example, a vibration signal collected in a given instance might contain three main frequency components: 5Hz, 12Hz, and 20Hz, corresponding to different vibration modes of the gimbal.

[0094] This step is implemented as follows: First, vibration data is collected using an accelerometer mounted on a pan-tilt unit, with a sampling frequency set to 1000Hz. A Fast Fourier Transform (FFT) is performed on the collected time-domain data to obtain the spectrum. Peak detection is used to identify the main frequency components in the spectrum, typically selecting frequency points whose amplitude exceeds a set threshold. Specifically, a 2048-point FFT is used, combined with a Hanning window function to reduce spectral leakage, and a local maximum search algorithm is used to find significant peaks in the spectrum, thus obtaining the individual vibration frequency components.

[0095] S212. Decompose the motion control command into multiple micro-displacement control command sequences, where each micro-displacement control command sequence corresponds to a major vibration frequency component.

[0096] Micro-displacement control command sequences refer to the decomposition of the original control command into multiple small-amplitude motion commands. The frequency characteristics of each sequence correspond to a major vibration frequency, and vibration suppression is achieved through reasonable phase configuration. For example, the original 10° motion command can be decomposed into three micro-displacement sequences: 5Hz for 3°, 12Hz for 4°, and 20Hz for 3°, with each sequence executed according to a specific timing sequence.

[0097] This decomposition is accomplished as follows: First, based on the identified main vibration frequencies {f1, f2, ..., fn}, the micro-displacement amplitude corresponding to each frequency component is determined. Using the proportion of vibration energy as the weight, the original control quantity U is proportionally allocated to each frequency component: Ui = U × (Ai / ∑Ai), where Ai is the amplitude of the i-th frequency component. Then, a corresponding micro-displacement sequence is generated for each frequency component: a reference period T is set, and a control command is generated at time point tj = j × T / m (j = 0, 1, ..., m-1), with the command value being Ui × sin(2πfi × tj + φi), where φi is the phase compensation amount. This decomposition method, by adjusting the phase relationship of each sequence, enables the synthesized motion to suppress the inherent vibration of the gimbal.

[0098] S213. Based on the magnitude of the main vibration frequency components, the displacement amount and execution time interval of each micro-displacement control command sequence are set respectively. The displacement amount and execution time interval are inversely correlated with the corresponding vibration frequency components.

[0099] Vibration frequency components refer to the main frequency values ​​in the gimbal vibration signal. Displacement refers to the angular change corresponding to each micro-displacement control command. Execution time interval refers to the time difference between adjacent micro-displacement control commands. The inverse correlation indicates that the higher the frequency, the smaller the corresponding displacement and execution time interval. For example, a 2° displacement and a 100ms interval are set for a 5Hz vibration component, while a 0.5° displacement and a 25ms interval are set for a 20Hz vibration component.

[0100] The specific implementation method of this step is as follows: First, a mapping relationship is established 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. Taking the lowest frequency component as the reference, its displacement is set to 40% of the total displacement, and the time interval is 1 / 4 of the vibration period. The displacement and time interval of other frequency components are calculated according to the inverse proportional relationship. This setting method ensures that high-frequency components use smaller adjustment steps and faster response speed, effectively avoiding vibration of the excitation system.

[0101] S214. Collect real-time vibration status information of the pan-tilt unit, and adjust the execution time interval 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.

[0102] Vibration state information includes the amplitude, frequency, and phase of the vibration. Execution time interval adjustment refers to dynamically modifying the timing of command execution based on the real-time vibration state. The predetermined phase difference refers to the desired phase relationship between the control command and the vibration signal, typically set to 180 degrees to achieve vibration suppression. For example, when a 12Hz vibration signal is detected at its peak, the corresponding control command is delayed by 41.7ms (half a cycle) before execution.

[0103] The implementation process is as follows: Vibration data is acquired in real time using an accelerometer at a sampling frequency of 1000Hz. A short-time Fourier transform is performed on the acquired data to extract the phase information φi(t) of each frequency component. The next execution time for each frequency component is calculated: 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 command cancels out the vibration signal, improving the vibration suppression effect.

[0104] S215. The cumulative displacement of the control compound micro-motion sequence is equal to the target displacement of the motion control command.

[0105] A composite micro-motion sequence refers to a motion sequence formed by combining multiple micro-displacement control commands in a sequential manner. The cumulative displacement is the sum of all micro-displacements in the sequence. The target displacement is the total displacement required by the original motion control command. For example, if the original command requires a 10° rotation, then the sum of the displacements of all micro-displacement control commands must equal 10°.

[0106] This step is implemented as follows: First, the theoretical cumulative displacement ∑Di of all micro-displacement sequences is calculated. If there is a difference ΔU = U - ∑Di between ∑Di and the target displacement U, compensation is required. The compensation method is as follows: ΔU is distributed according to the weight of each frequency component, and the displacement of each sequence is corrected: Di_new = Di + ΔU×(Ai / ∑Ai), where Ai is the amplitude of the corresponding frequency component. This compensation mechanism ensures that the final displacement achieved by the composite micro-motion sequence is exactly equal to the target displacement required by the control command, thus guaranteeing control accuracy.

[0107] S216. Execute each micro-displacement control command in the composite micro-motion sequence in sequence according to the preset execution time interval to drive the gimbal to move.

[0108] A composite micro-motion sequence refers to a set of multiple micro-displacement control commands arranged in a specific time sequence. The preset execution time interval refers to the execution time of each micro-displacement control command; these time intervals are determined after vibration analysis and phase compensation. Micro-displacement control commands are instructions to control the gimbal to make small-amplitude angle adjustments. Gimbal motion refers to the coordinated rotation of the azimuth and pitch axes. For example, a composite sequence might include: a 1.2° displacement at t=0ms, a 0.8° displacement at t=25ms, a 0.5° displacement at t=50ms, and so on.

[0109] The specific execution process of this step is as follows: First, an instruction execution queue based on a real-time clock is established, and all micro-displacement control instructions are sorted according to their preset execution times. When the system clock reaches each preset time, the corresponding micro-displacement instruction is retrieved from the queue and sent to the motor driver. Each instruction includes: execution time ti, displacement Di, motion direction sign (Di), and execution duration ΔTi. The instruction is sent to the driver via 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 and pitch axes are executed synchronously to achieve spatial pointing control of the gimbal. During the execution process, the system continuously monitors the actual displacement feedback to ensure that the cumulative displacement accurately reaches the target requirements. This step-by-step execution method based on time-sequence control, through reasonable time interval arrangement, not only achieves accurate arrival at the target position but also effectively suppresses gimbal vibration.

[0110] During instruction execution, micro-displacement sequences corresponding to different frequency components are executed in an interleaved manner: higher-frequency sequences have shorter execution time intervals, and their micro-displacement instructions are interspersed within the execution gaps of lower-frequency sequences. For example, a 20Hz sequence instruction is executed once every 50ms, while a 5Hz sequence instruction is executed once every 200ms. By precisely controlling the execution time of each instruction, the system can actively suppress gimbal vibration. Simultaneously, the acceleration and deceleration planning of the motor driver ensures that the execution process of each micro-displacement is smooth and continuous, avoiding mechanical shock. The entire execution process continues until all micro-displacement instructions are completed and the cumulative displacement reaches the target value.

[0111] The key to this execution strategy lies in the precision of timing control and the coordination of displacement execution. A high-precision clock source (such as a CPU's hardware timer) ensures timing control accuracy better than 1ms. Simultaneously, a real-time operating system or interrupt service routine is employed to ensure timely instruction execution. For each micro-displacement instruction, the system also needs to consider the motor's acceleration and deceleration characteristics to ensure smooth motion. Through this precise timing control and smooth motion planning, high-precision pointing control and vibration suppression of the gimbal are ultimately achieved.

[0112] The turntable target tracking system in the embodiments of this invention is described below from the perspective of hardware processing. Please refer to [link / reference needed]. Figure 3 This is a schematic diagram of the physical device structure of a turntable target tracking system in an embodiment of this application.

[0113] It should be noted that, Figure 3 The structure of the turntable target tracking system shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of the present invention.

[0114] like Figure 3 As shown, the turntable target tracking system includes a Central Processing Unit (CPU) 301, which can perform various appropriate actions and processes based on programs stored in Read-Only Memory (ROM) 302 or programs loaded from storage section 308 into Random Access Memory (RAM) 303, such as performing the methods described in the above embodiments. The RAM 303 also stores various programs and data required for system operation. The CPU 301, ROM 302, and RAM 303 are interconnected via a bus 304. An Input / Output (I / O) interface 305 is also connected to the bus 304.

[0115] The following components are connected to I / O interface 305: input section 306 including audio input devices, push-button switches, etc.; output section 307 including a liquid crystal display (LCD) and audio output devices, indicator lights, etc.; storage section 308 including a hard disk, etc.; and communication section 309 including a network interface card such as a LAN (Local Area Network) card, modem, etc. Communication section 309 performs communication processing via a network such as the Internet. Drive 310 is also connected to I / O interface 305 as needed. Removable media 311, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., are installed on drive 310 as needed so that computer programs read from them can be installed into storage section 308 as needed.

[0116] In particular, according to embodiments of the present invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of the present invention include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing computer programs for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 309, and / or installed from removable medium 311. When the computer program is executed by central processing unit (CPU) 301, it performs the various functions defined in the present invention.

[0117] It should be noted that specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), flash memory, optical fiber, portable compact disc read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this invention, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.

[0118] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. Each block in a flowchart or block diagram may represent a module, program segment, or portion of code, which contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those shown in the drawings.

[0119] Specifically, the turntable target tracking system of this embodiment includes a processor and a memory. The memory stores a computer program. When the computer program is executed by the processor, it implements the multi-state PID control turntable target tracking method provided in the above embodiment.

[0120] In another aspect, the present invention also provides a computer-readable storage medium, which may be included in the turntable target tracking system described in the above embodiments; or it may exist independently and not assembled into the turntable target tracking system. The storage medium carries one or more computer programs that, when executed by a processor of the turntable target tracking system, cause the turntable target tracking system to implement the multi-state PID control turntable target tracking method provided in the above embodiments.

[0121] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit it. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.

[0122] As used in the above embodiments, depending on the context, the term "when..." can be interpreted as meaning "if...", "after...", "in response to determining...", or "in response to detecting...". Similarly, depending on the context, the phrase "when determining..." or "if (the stated condition or event) is interpreted as meaning "if determining...", "in response to determining...", "when (the stated condition or event) is detected", or "in response to detecting (the stated condition or event)".

[0123] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. This program can be stored in a computer-readable storage medium, and when executed, it can include the processes described in the above method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM or random access memory (RAM), magnetic disks, or optical disks.

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.

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 1, characterized in that, Before the steps of calculating the target motion velocity parameters and target motion acceleration parameters based on the target position information of consecutive multiple frames, and analyzing the target movement trend based on the target motion velocity parameters and 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, 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: 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.

7. The method according to claim 6, 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.

8. 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-7.

9. 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-7.

10. 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-7.

Citation Information

Patent Citations

  • Method for automatically and smoothly tracking target by cradle head

    CN102143324A

  • Rotary table location multi-modal servo control method of reflective type laser foreign matter eliminating device

    CN110161839A

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

    CN111385474A

  • Photoelectric servo turntable target tracking method and device, electronic equipment and storage medium

    CN115601399A

  • Pan-tilt target tracking control method, system and device, and pan-tilt

    CN118192674A

Cited By

  • A pan-tilt target tracking speed adaptive adjustment control method and a pan-tilt applying the same

    CN122411087A