A method, apparatus, device and medium for tracking a random motion target

By combining MPPI and Adam algorithms, an adaptive variance moment convergence algorithm was designed to optimize servo motor control, solving the accuracy and robustness issues of servo motors in tracking randomly moving targets, and achieving efficient and stable tracking of randomly moving targets.

CN122176052APending Publication Date: 2026-06-09ACADEMY OF MILITARY MEDICAL SCIENCES

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
ACADEMY OF MILITARY MEDICAL SCIENCES
Filing Date
2026-03-09
Publication Date
2026-06-09

AI Technical Summary

Technical Problem

Existing technologies for controlling servo motors to track randomly moving targets have shortcomings in terms of control accuracy, robustness, automation, computational load, and smoothness. They are also sensitive to parameters and are difficult to achieve good control results in complex systems.

Method used

By combining the Model Predictive Path Integral Control (MPPI) algorithm with the Adaptive Moment Estimation (Adam) algorithm, an Adaptive Variance Moment Convergence (AVMC) algorithm is designed. The servo motor is controlled by image coordinates. The adaptive moment estimation algorithm and monotonicity selection settings are used to optimize the control process, reduce the amount of computation, and improve accuracy and robustness.

Benefits of technology

It significantly improves control accuracy, response speed and robustness, reduces computational load and parallel computing power, and does not require manual parameter tuning, achieving insensitivity to parameters and breaking through the accuracy limitations of traditional methods.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122176052A_ABST
    Figure CN122176052A_ABST
Patent Text Reader

Abstract

This application belongs to the field of target tracking technology, and relates to a method, apparatus, device, and medium for tracking randomly moving targets. The method includes: sampling; using a model predictive path integral control algorithm to output a first action based on a forward dynamics model, the current state, the target state, and an initial action; using an adaptive moment estimation algorithm to output a second action based on the first action, the initial action, and the initial variance; obtaining the current cost and the current action based on the first and second actions; obtaining the current variance based on the initial cost and the current cost; iterating using the current cost, the current action, and the current variance as input to obtain the next action; stopping the iteration when a preset condition is met, and using the next action as the output action to track the randomly moving target. This application can control a servo motor to track randomly moving targets, improving control accuracy, robustness, and output smoothness.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of target tracking technology, and in particular to a method, apparatus, device, and medium for tracking randomly moving targets. Background Technology

[0002] Using image coordinates to control servo motors to track randomly moving targets is widely used in many military and civilian scenarios, such as electro-optical tracking aircraft and vehicle traffic monitoring. Its core purpose is to continuously and stably control the servo motor to keep the target within the field of view or region of interest (ROI) when the target is moving randomly.

[0003] In the existing technology, the control methods for such scenarios are generally PID algorithms or MPPI algorithms.

[0004] As one of the most commonly used control algorithms, the PID algorithm has the advantages of fast response speed and high control frequency; however, it is lacking in both control accuracy and robustness in nonlinear system control. Moreover, if a good control effect is to be achieved, fine manual parameter tuning is required, and it is very sensitive to parameters, which is difficult to achieve in complex systems.

[0005] The MPPI algorithm, as a sampling-based model predictive control algorithm, has the advantage that because it is based on sampling optimization, it does not require the forward dynamics model or the cost function during optimization to be differentiable. Therefore, it can be used for complex systems and can provide relatively robust control. However, to achieve good control results, a large number of samples must be taken, which requires a large amount of computation and parallel computing power. It also usually introduces noise, which affects the smoothness of the control results. The original algorithm has an upper bound on the error related to the variance, which cannot be eliminated even if the number of samples is large enough.

[0006] In summary, for reactive control scenarios where servo motors are controlled to track randomly moving targets, existing technologies need improvement in terms of control accuracy, robustness, automation, sensitivity, computational load, and smoothness. Summary of the Invention

[0007] Based on this, it is necessary to provide a method, device, equipment, and medium for tracking randomly moving targets, which can use image coordinates as input to control a servo motor to track randomly moving targets, improves control accuracy, robustness, and output smoothness, reduces computational load and parallel computing power, and does not require manual parameter tuning, is insensitive to parameters, and has no error bound in terms of accuracy.

[0008] A method for tracking a randomly moving target, comprising: Obtain the forward dynamics model, current state, and target state of the image-based visual servo control system, and set the initial action, initial variance, and initial cost; Sampling is performed, and based on the forward dynamics model, the current state, the target state, and the initial action, the model prediction path integral control algorithm is used to output the first action; Based on the first action, the initial action, and the initial variance, the action difference is obtained; using the action difference as input, the adaptive moment estimation algorithm is used to output the second action; Based on the first action and the second action, calculate the corresponding costs and compare them to obtain the current cost and the current action; Based on the initial cost and the current cost, the initial variance is reduced to obtain the current variance; using the current cost, the current action, and the current variance as input, the process is iterated to re-output the first action and the second action to obtain the next action; When the preset conditions are met, the iteration stops, and the next action is used as the output action to track the randomly moving target.

[0009] In one embodiment, the corresponding costs are calculated and compared based on the first action and the second action to obtain the current cost and the current action, including: Calculate the cost of the first action based on the first action; Calculate the cost of the second action based on the second action; Compare the cost of the first action with the cost of the second action, and use the smaller cost as the current cost, and use the action corresponding to the smaller cost as the current action.

[0010] In one embodiment, the initial variance is reduced based on the initial cost and the current cost to obtain the current variance, including: Calculate the difference between the initial cost and the current cost to obtain the cost difference; The initial variance is reduced based on the cost difference and combined with the variance reduction factor to obtain the current variance.

[0011] In one embodiment, the initial variance is reduced based on the cost difference and combined with a variance reduction factor to obtain the current variance, including: The judgment is made based on the cost difference; if the cost difference meets the first condition... Then, by combining the variance reduction factor, the initial variance is reduced to obtain the current variance:

[0012] In the formula, To improve the threshold at a cost, The current variance, This is the variance reduction factor; If the cost difference satisfies the second condition and Then, by combining the variance reduction factor, the initial variance is reduced to obtain the current variance:

[0013] In the formula, To prevent division by zero constants, for , The variance reduction factor and ; If the cost difference satisfies the third condition and If convergence is achieved, the iteration stops, and the next action is used as the output action to track the randomly moving target.

[0014] In one embodiment, taking the current cost, current action, and current variance as input, iterating and re-outputting the first action and the second action to obtain the next action includes: Using the current cost, current action, and current variance as input, iterate as follows: resample and add a Gaussian perturbation to the current action to obtain the first action; obtain the second action based on the first action, the current action, and the current variance; obtain the next cost and the next action based on the first action and the second action obtained. Calculate the difference between the current cost and the next generation cost to obtain the next variance; Using the next cost, the next action, and the next variance as input, iterate to re-output the first action and the second action in order to obtain the next action.

[0015] In one embodiment, sampling is performed, and based on the forward dynamics model, the current state, the target state, and the initial action, a model-predicted path integral control algorithm is used to output the first action, including: Sampling is performed, and a Gaussian perturbation is added to the initial motion to generate the corresponding sampling trajectory; Based on the sampled trajectory, forward dynamics model, current state and target state, calculate the state cost and control cost of each sampled trajectory to obtain the total cost; Based on the total cost, the trajectory weights are calculated and normalized to obtain the normalized trajectory weights. The first action is obtained based on the normalized trajectory weights.

[0016] In one embodiment, using the action difference as input, an adaptive moment estimation algorithm is employed to output a second action, including: The action difference is obtained based on the first action, the initial action, and the initial variance; Based on the motion difference and the first moment decay rate, the biased first moment estimate is obtained; Based on the motion difference and the second moment decay rate, the partial second moment estimate is obtained; Based on the biased first moment estimate and the first moment decay rate, the bias-corrected first moment estimate is obtained; Based on the partial second-moment estimate and the second-moment decay rate, the bias-corrected second-moment estimate is obtained. The second action is obtained based on the initial action, the first-order moment estimate with deviation correction, and the second-order moment estimate with deviation correction.

[0017] A tracking device for a randomly moving target, employing the aforementioned method for tracking a randomly moving target, includes: The first module is used to acquire the forward dynamics model, current state, and target state of the image-based visual servo control system, and to set the initial action, initial variance, and initial cost. The second module is used for sampling. Based on the forward dynamics model, the current state, the target state, and the initial action, it uses the model prediction path integral control algorithm to output the first action. The third module is used to obtain the action difference based on the first action, the initial action, and the initial variance; using the action difference as input, it employs an adaptive moment estimation algorithm to output the second action. The fourth module is used to calculate and compare the corresponding costs based on the first and second actions to obtain the current cost and the current action. The fifth module is used to reduce the initial variance based on the initial cost and the current cost to obtain the current variance; it iterates using the current cost, the current action, and the current variance as input, and re-outputs the first action and the second action to obtain the next action; The sixth module is used to stop the iteration when the preset conditions are met, and to use the next action as the output action to track the randomly moving target.

[0018] A computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the steps of the above-described method.

[0019] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the above-described method.

[0020] The aforementioned tracking methods, devices, equipment, and media for randomly moving targets combine and improve upon the Model Predictive Path Integral Control (MPPI) algorithm and the Adaptive Moment Estimation (Adam) algorithm. Furthermore, a monotonicity selection setting and adaptive exponential variance reduction are designed to obtain the Adaptive Variance-Moment Convergence (AVMC) algorithm. This algorithm simultaneously achieves global exploration, escape from local minima, and accelerated local convergence. It utilizes image coordinates to control a servo motor for real-time tracking of randomly moving targets, ensuring that while maintaining strong exploration capabilities, it converges to a better solution with higher probability and faster speed. This systematically overcomes the inherent accuracy limitations of traditional methods due to fixed variance, significantly improving control accuracy, response speed, robustness, and output smoothness, while reducing computational load and parallel computing power. Moreover, it requires no manual parameter tuning, is insensitive to parameters, and has no error bound in terms of accuracy. Attached Figure Description

[0021] Figure 1 This is a flowchart illustrating a method for tracking a randomly moving target in one embodiment; Figure 2 This is a schematic diagram of an image-based visual servoing control system in one embodiment; Figure 3 This is a comparison chart of the accuracy of the AVMC algorithm of this application and the existing MPPI algorithm on a circular trajectory in one embodiment; Figure 4 This is a comparison chart of the accuracy of the AVMC algorithm of this application and the existing MPPI algorithm on a noisy circular trajectory in one embodiment; Figure 5 This is a comparison chart of the accuracy of the AVMC algorithm of this application and the existing MPPI algorithm under mixed frequency trajectories in one embodiment; Figure 6 This is a comparison chart of the accuracy of the AVMC algorithm of this application and the existing MPPI algorithm under start-stop trajectories in one embodiment; Figure 7 This is a comparison chart of the accuracy of the AVMC algorithm of this application and the existing MPPI algorithm under multi-scale trajectories in one embodiment; Figure 8 The figure shows the tracking performance of the AVMC algorithm of this application compared with existing PID and MPPI algorithms under noisy circular trajectories in one embodiment. Figure 9 Here is a diagram showing the control quality index of the AVMC algorithm of this application compared with existing PID and MPPI algorithms under a noisy circular trajectory in one embodiment; Figure 10 The figure shows the tracking performance of the AVMC algorithm of this application compared with existing PID and MPPI algorithms under start-stop trajectories in one embodiment. Figure 11 The diagram shows the control quality index of the AVMC algorithm of this application compared with existing PID and MPPI algorithms under start-stop trajectories in one embodiment. Figure 12 This is a structural block diagram of a tracking device for a randomly moving target in one embodiment; Figure 13 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0022] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application. All other embodiments obtained by those skilled in the art based on the embodiments in this application without inventive effort are within the scope of protection of this application.

[0023] Furthermore, the use of terms such as "first" and "second" in this application is for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include at least one of those features. In the description of this application, "multiple sets" means at least two sets, such as two sets, three sets, etc., unless otherwise explicitly specified.

[0024] In this application, unless otherwise expressly specified and limited, the terms "connection," "fixed," etc., should be interpreted broadly. For example, "fixed" can mean a fixed connection, a detachable connection, or an integral part; it can mean a mechanical connection, an electrical connection, a physical connection, or a wireless communication connection; it can mean a direct connection or an indirect connection through an intermediate medium; it can mean the internal communication of two elements or the interaction between two elements, unless otherwise expressly limited. Those skilled in the art can understand the specific meaning of the above terms in this application according to the specific circumstances.

[0025] Furthermore, the technical solutions of the various embodiments of this application can be combined with each other, but only if they are based on the ability of those skilled in the art to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be considered that such combination of technical solutions does not exist and is not within the scope of protection claimed by this application.

[0026] This application provides a method for tracking randomly moving targets, such as... Figure 1 The flowchart shown, in one embodiment, includes: Step 101: Obtain the forward dynamics model, current state, and target state of the image-based visual servo control system, and set the initial action, initial variance, and initial cost.

[0027] Specifically: Obtain the forward dynamics model, current state, and target state of the image-based visual servo control system, and set the initial actions, initial variance, and initial cost.

[0028] The process of obtaining the forward dynamics model of the image-based visual servoing control system includes: Build an image-based visual servoing (IBVS) control system, such as... Figure 2 As shown, A is a pinhole camera model. For the camera coordinate system, Let B be the origin of the camera coordinate system, and let B be the camera imaging plane model. For the imaging coordinate system, Let C be the origin of the imaging coordinate system, C be a 2D servo motor, and the target be located at... Point, f is the focal length; Image center point The coordinates are The center point of the target's projection on the image is denoted as... This yields the current observed pixel offset of the target on the image plane. for:

[0029]

[0030] In the formula, This represents the pixel offset along the x-axis. This represents the pixel offset along the y-axis. Let x be the pixel coordinates of the center point of the target's projection onto the imaging plane. Let y be the pixel coordinates of the center point of the target's projection onto the imaging plane. The x-coordinate of the image center point. The y-coordinate of the image center point; Convert the pixel offset into a normalized direction vector in the camera coordinate system:

[0031] In the formula, This is the normalized direction vector of the pixel offset in the camera coordinate system. For normalization, and For camera internal parameters, For vectors The component along the x-axis in the camera coordinate system For vectors The component along the y-axis in the camera coordinate system For vectors The component along the z-axis in the camera coordinate system; The target's position in the camera coordinate system is:

[0032] In the formula, Let the target be located in the camera coordinate system. For target depth; The camera is positioned above the pitch servo motor at a distance of [distance missing]. The target's coordinates in the pitch servo coordinate system are:

[0033] In the formula, The coordinates of the target in the pitch servo coordinate system; In the pitch servo coordinate system, assuming that the origins of the pitch servo and yaw servo coordinates are the same, the yaw angle and pitch angle can be expressed as:

[0034]

[0035] In the formula, Yaw angle The initial pitch angle, for The projection value on the x-axis, for Projected value on the y-axis; The above two equations represent the mapping relationship from image pixel offset to servo motor angle. It can be seen that the yaw angle is related to the target depth. It is unrelated to pitch angle control and This is relevant; since the input used is the image coordinates of the target's center point and does not contain depth information, it is necessary to discuss this further. The possible range; Taking targets such as drones as an example, their size is usually small and their distance is usually within a certain range at a considerable distance. By limiting the pitch angle range and the size of the detection bounding box, it can be ensured that... Alternatively, a camera servo system can be designed directly, such that the distance between the camera's optical center and the servo motor is... ,but The item can be ignored; at this time, the servo control angle is... Only with camera internals and pixel offset Correlation is used to avoid nonlinearity, reduce control difficulty, and increase the overall system accuracy:

[0036] In the formula, The pitch angle; With pixel offset With servo control angle The relationship as a forward dynamic model .

[0037] In this step, the designed image-based visual servoing (IBVS) control system can achieve this without requiring camera intrinsic parameter measurements or depth information, solely through... You can get This improves accuracy. How to obtain the current state and the target state, as well as how to set the initial action, initial variance and initial cost, are all existing technologies and will not be elaborated here.

[0038] Step 102: Sample the data and, based on the forward dynamics model, the current state, the target state, and the initial action, use the model prediction path integral control algorithm to output the first action.

[0039] Specifically: Sampling is performed, and a Gaussian perturbation is added to the initial motion to generate the corresponding sampling trajectory; Based on the sampled trajectory, forward dynamics model, current state and target state, calculate the state cost and control cost of each sampled trajectory to obtain the total cost; Based on the total cost, the trajectory weights are calculated and normalized to obtain the normalized trajectory weights. The first action is obtained based on the normalized trajectory weights.

[0040] More specifically: Sampling is performed, and a Gaussian perturbation is added to the initial motion to generate the corresponding sampling trajectory:

[0041]

[0042] In the formula, For the first i One sample, and i Choose 1, ..., N; For Gaussian perturbation, The initial variance, It is the identity matrix. For sampling trajectory, This is the initial action; Based on the sampled trajectory, forward dynamics model, current state, and target state, calculate the state cost and control cost for each sampled trajectory to obtain the total cost for each sampled trajectory:

[0043] In the formula, For the first i The total cost of each sample Let the state cost function be... Forward dynamics model, This is the current state. For the target state, To control the cost function; Based on the total cost of each sampled trajectory, calculate the trajectory weight for each sampled trajectory and normalize it to obtain the normalized trajectory weight:

[0044] In the formula, To normalize trajectory weights, It is an exponential function with base to natural numbers. Temperature coefficient; Based on the normalized trajectory weights, the first action is obtained:

[0045] In the formula, As the first action, This represents the number of samples.

[0046] In this step, the model predictive path integral control algorithm is an existing technology.

[0047] It should be noted that other algorithms can also be used instead of the model predictive path integral control algorithm. As long as the selection condition satisfies the requirement of using the control quantity with the lowest cost function, the algorithm convergence can be guaranteed, thus obtaining better control.

[0048] Step 103: Based on the first action, the initial action, and the initial variance, obtain the action difference; using the action difference as input, employ the adaptive moment estimation algorithm to output the second action.

[0049] Specifically: The action difference is obtained based on the first action, the initial action, and the initial variance; Based on the motion difference and the first moment decay rate, the biased first moment estimate is obtained; Based on the motion difference and the second moment decay rate, the partial second moment estimate is obtained; Based on the biased first moment estimate and the first moment decay rate, the bias-corrected first moment estimate is obtained; Based on the partial second-moment estimate and the second-moment decay rate, the bias-corrected second-moment estimate is obtained. The second action is obtained based on the initial action, the first-order moment estimate with deviation correction, and the second-order moment estimate with deviation correction.

[0050] More specifically: Based on the first action, the initial action, and the initial variance, the action difference is obtained:

[0051] In the formula, Because of poor movement, As the first action, This is the initial action. The initial variance; Based on the motion difference and the first-order moment decay rate, the biased first-order moment estimate is obtained:

[0052] In the formula, For partial first-order moment estimation, The first-order moment decay rate; Based on the motion difference and the second-order moment decay rate, the partial second-order moment estimate is obtained:

[0053] In the formula, For partial second-order moment estimation, The second-order moment decay rate, This is element-wise multiplication; Based on the biased first-order moment estimate and the first-order moment decay rate, the bias-corrected first-order moment estimate is obtained:

[0054] In the formula, For bias correction, the first moment estimate, This is the exponential operation of the first-order moment decay rate; Based on the partial second-moment estimate and the second-moment decay rate, the bias-corrected second-moment estimate is obtained:

[0055] In the formula, For bias-corrected second-moment estimates, This is the exponential operation of the second-order moment decay rate; Based on the initial action, the first-order moment estimate with deviation correction, and the second-order moment estimate with deviation correction, the second action is obtained: In the formula, For the second action, This is the initial action. The learning rate for the Adam optimizer. For element-wise division, To prevent division by zero, the constant is generally taken as 10. -6 Numbers on the order of magnitude.

[0056] In this step, an improved adaptive moment estimation algorithm is adopted. Moments are estimated based on the changes in the control quantity to overcome the problem of statically optimizing neural networks in existing adaptive moment estimation algorithms, thus achieving online optimization of the motion quantity during the control process. At the same time, it acts as an intelligent navigator, smoothing out noise introduced by random sampling and intelligently adjusting the step size of each control dimension through adaptive learning rate to improve stability and accuracy. In addition, the optimized motion quantity is used as the output, which, together with subsequent monotonicity selection settings and adaptive exponential variance reduction, improves control accuracy, convergence speed and optimization stability.

[0057] Step 104: Calculate and compare the corresponding costs based on the first action and the second action to obtain the current cost and the current action.

[0058] Specifically: Calculate the cost of the first action based on the first action; Calculate the cost of the second action based on the second action; Compare the cost of the first action with the cost of the second action, and use the smaller cost as the current cost, and use the action corresponding to the smaller cost as the current action (that is: if the cost of the first action is less than the cost of the second action, then use the cost of the first action as the current cost and use the first action as the current action; if the cost of the first action is greater than the cost of the second action, then use the cost of the second action as the current cost and use the second action as the current action).

[0059] More specifically: Calculate the cost of the first action based on the first action:

[0060] In the formula, The cost of the first action; Calculate the cost of the second action based on the second action:

[0061] In the formula, The cost of the second action; If the cost of the first action is less than the cost of the second action, then the cost of the first action is used as the current cost, and the first action is used as the current action.

[0062] In the formula, For the current action, For the current cost; If the cost of the first action is greater than the cost of the second action, then the cost of the second action is used as the current cost, and the second action is used as the current action.

[0063] In the formula, For the current action, This is the current cost.

[0064] In this step, a monotonicity selection setting was implemented. That is, the costs of the first action and the second action are compared, and the action with the smaller cost is used as the output control variable. This mechanism ensures that the cost is monotonically decreasing during iteration, and... If the target cost is a lower bound, then according to the monotonically convergent theorem, the sequence must converge.

[0065] Step 105: Based on the initial cost and the current cost, reduce the initial variance to obtain the current variance; use the current cost, the current action, and the current variance as input to perform iteration, and re-output the first action and the second action to obtain the next action.

[0066] Specifically: Calculate the difference between the initial cost and the current cost to obtain the cost difference; make a judgment based on the cost difference, and combine it with the variance reduction factor to reduce the initial variance to obtain the current variance; Using the current cost, current action, and current variance as input, iterate as follows: 1) Resample and add Gaussian perturbation to the current action to regenerate the corresponding sampled trajectory; based on the sampled trajectory, forward dynamics model, current state, and target state, recalculate the state cost and control cost of each sampled trajectory to obtain the total cost; based on the total cost, recalculate the trajectory weights and normalize them to obtain normalized trajectory weights; based on the normalized trajectory weights, obtain the first action again; 2) Based on the first action, current action, and current variance, obtain the action difference again; based on the action difference and the first moment decay rate, obtain the biased first moment estimate again; Based on the action difference and the second moment decay rate, a new partial second moment estimate is obtained; based on the partial first moment estimate and the first moment decay rate, a new deviation-corrected first moment estimate is obtained; based on the partial second moment estimate and the second moment decay rate, a new deviation-corrected second moment estimate is obtained; based on the current action, the deviation-corrected first moment estimate, and the deviation-corrected second moment estimate, a new second action is obtained; 3) Based on the first action, the cost of the first action is recalculated; based on the second action, the cost of the second action is recalculated; the cost of the first action and the cost of the second action are compared again, and the smaller cost is used as the next cost, and the action corresponding to the smaller cost is used as the next action; Calculate the difference between the current cost and the next generation cost to obtain the cost difference again; re-evaluate based on the cost difference, and combine with the variance reduction factor to reduce the current variance to obtain the next variance; Using the next cost, the next action, and the next variance as input, iterate to re-output the first action and the second action in order to obtain the next action.

[0067] More specifically: Calculate the difference between the initial cost and the current cost to obtain the cost difference:

[0068] in,

[0069] In the formula, For the price difference, As the initial cost, For the current cost; The judgment is made based on the cost difference. If the cost difference satisfies the first condition (i.e.) Then, by combining the variance reduction factor, the initial variance is reduced to obtain the current variance:

[0070] In the formula, To improve the threshold at a cost, The current variance, This is the variance reduction factor; If the cost difference satisfies the second condition (i.e.) and Then, by combining the variance reduction factor, the initial variance is reduced to obtain the current variance:

[0071] In the formula, To prevent division by zero constants, The current variance, The variance reduction factor and ,when and When the values ​​are 0.4 and 0.6 respectively, the iteration converges within 4 rounds; If the cost difference satisfies the third condition (i.e.) and If convergence has been achieved, the iteration stops, and the next action is used as the output action to track the randomly moving target. Using the current cost, current action, and current variance as input, iterate: resample, add a Gaussian perturbation to the current action, and regenerate the corresponding sampling trajectory:

[0072]

[0073] In the formula, For the first i One sample, For Gaussian perturbation, The current variance, It is the identity matrix. For sampling trajectory, For the current action; Based on the sampled trajectories, the forward dynamics model, the current state, and the target state, the state cost and control cost of each sampled trajectory are recalculated to obtain the total cost of each sampled trajectory:

[0074] In the formula, For the total cost, Let the state cost function be... Forward dynamics model, This is the current state. For the target state, To control the cost function; Based on the total cost of each sampled trajectory, the trajectory weights of each sampled trajectory are recalculated and normalized to obtain normalized trajectory weights:

[0075] In the formula, To normalize trajectory weights, It is an exponential function with base to natural numbers. Temperature coefficient; Based on the normalized trajectory weights, the first action is obtained again:

[0076] In the formula, The first action; Based on the first action, the current action, and the current variance, the action difference is recalculated:

[0077] In the formula, Because of poor movement, As the first action, For the current action, This represents the current variance; Based on the motion difference and the first-order moment decay rate, the biased first-order moment estimate is obtained again:

[0078] In the formula, For partial first-order moment estimation, The first-order moment decay rate; Based on the motion difference and the second-order moment decay rate, the partial second-order moment estimate is obtained again:

[0079] In the formula, For partial second-order moment estimation, The second-order moment decay rate, This is element-wise multiplication; Based on the biased first-order moment estimate and the first-order moment decay rate, the bias-corrected first-order moment estimate is obtained again:

[0080] In the formula, First-moment estimate for bias correction; Based on the partial second-order moment estimate and the second-order moment decay rate, the bias-corrected second-order moment estimate is obtained again:

[0081] In the formula, Second-order moment estimate with bias correction; Based on the current action, the first-order moment estimate with deviation correction, and the second-order moment estimate with deviation correction, the second action is obtained again:

[0082] In the formula, For the second action, For the current action, The learning rate for the Adam optimizer. For element-wise division, To prevent division by zero, the constant is generally taken as 10. -6 Numbers on the order of magnitude; Based on the first action, recalculate the cost of the first action:

[0083] In the formula, The cost of the first action; Based on the second action, recalculate the cost of the second action:

[0084] In the formula, The cost of the second action; Recompare the costs of the first action and the second action, using the smaller cost as the next price, and the action corresponding to the smaller cost as the next action:

[0085] or,

[0086] In the formula, For the next action, For the next generation price; Calculate the difference between the current cost and the next generation cost to obtain the cost difference again:

[0087] In the formula, For the price difference, For the current cost, For the next generation price; Reassess the variance based on the cost difference and, using the variance reduction factor, reduce the current variance to obtain the next variance:

[0088] or,

[0089] In the formula, For the next variance, This represents the current variance; The following price Next action and the next variance Using the input as input, iterate and re-output the first and second actions to obtain the next action.

[0090] In this step, the variance is adaptively and exponentially reduced according to the magnitude of the variance improvement and different variance reduction coefficients, so that the final variance is reduced... After the next iteration, , This ensures that the final variance is compressed to an arbitrarily small size and satisfies... This significantly reduces the upper bound of the error, improves control accuracy, and reduces computational load and parallel computing power.

[0091] Step 106: When the preset conditions are met, stop the iteration and use the next action as the output action to track the randomly moving target.

[0092] Specifically: When the maximum number of iterations is reached, the iteration stops, and the next action is used as the output action to track the randomly moving target.

[0093] In this step, the servo motor uses output motion to track randomly moving targets.

[0094] In this embodiment, the steps of the method are as follows (where, without a subscript, it represents the current value; the subscript prev represents the cached value of the previous step; and the superscript...). Indicates the target value. (To control the amplitude limit)

[0095] The aforementioned method for tracking randomly moving targets combines and improves upon the Model Predictive Path Integral Control (MPPI) algorithm and the Adaptive Moment Estimation (Adam) algorithm. It also incorporates monotonicity selection settings and adaptive exponential variance reduction to obtain the Adaptive Variance-Moment Convergence (AVMC) algorithm. This algorithm simultaneously achieves global exploration, escape from local minima, and accelerated local convergence. By using image coordinates to control the servo motor, it tracks randomly moving targets in real time, ensuring that while maintaining strong exploration capabilities, it converges to a better solution with higher probability and faster speed. This systematically overcomes the inherent accuracy limitations of traditional methods due to fixed variance, significantly improving control accuracy, response speed, robustness, and output smoothness, while reducing computational load and parallel computing power. Furthermore, it requires no manual parameter tuning, is insensitive to parameters, and has no error bound in terms of accuracy.

[0096] Specifically, it has the following beneficial effects: 1. The monotonicity setting combined with adaptive variance reduction breaks through the error bound that exists in existing algorithms and is related to the size of the set variance, thereby improving control accuracy and robustness.

[0097] 2. After selecting the outputs of MPPI and Adam, overall iterative optimization is performed, and the variance is adaptively reduced during the iterative optimization. This can achieve higher accuracy with a smaller number of samples, improve robustness and control smoothness, reduce computational load and parallel computing power, and does not require manual parameter tuning, only needs to be set within a general range, and is not sensitive to parameter settings.

[0098] 3. By combining MPPI, Adam, monotonicity selection settings, and adaptive exponential variance reduction, not only is convergence guaranteed, but it also significantly surpasses existing algorithms in multiple dimensions: achieving higher control accuracy, faster asymptotic convergence speed, better adaptability to environmental changes, and stronger robustness to model uncertainty and external disturbances. These excellent characteristics together ensure that this application is more reliable and efficient in practical control applications.

[0099] 4. It is applicable to two-dimensional control scenarios where visual servo motors are used to track randomly moving targets, and also to multi-dimensional control scenarios where reactive control is used. It has good versatility and portability in multiple scenarios and multiple tasks.

[0100] It should be understood that, although Figure 1 The steps in the flowchart are shown sequentially as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order in which these steps are executed, and they can be performed in other orders. Figure 1 At least some of the steps in the process may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least some of the sub-steps or stages of other steps.

[0101] In one embodiment, the algorithm of this application is compared with the algorithm of the prior art through simulation.

[0102] 1) Compare the accuracy of the AVMC algorithm of this application with the existing MPPI algorithm under different trajectories.

[0103] In the test, the target motion trajectory was configured into five types: circular trajectory, noisy circular trajectory, mixed frequency trajectory, start-stop trajectory, and multi-scale trajectory; during the test, the random seeds of all trajectories were fixed to facilitate comparison of different control methods.

[0104] Among them, the circular trajectory creates an ideal geometric path for benchmarking; the noisy circular trajectory adds random perturbations to simulate sensor errors and uncertainties in real-world environments; the mixed-frequency trajectory combines low-frequency body motion with high-frequency jitter to test the controller's frequency response and filtering effect; the start-stop trajectory introduces random pauses and sudden displacements to test the system's dynamic response and anti-interference capabilities; and the multi-scale trajectory integrates motion components across multiple time scales, providing the most complex comprehensive test scenarios.

[0105] These trajectories together constitute a complete test set, which can comprehensively verify the tracking accuracy, robustness, and adaptability of the control system in different scenarios. The results are applicable to, for example... Figures 3 to 7 As shown, under various target motion trajectories, when the sampling rate is the same, the control accuracy and robustness of the AVMC algorithm of this application are higher than those of the existing MPPI algorithm. When the control accuracy is the same, the number of samples required by the AVMC algorithm of this application is much smaller than that of the existing MPPI algorithm.

[0106] 2) Compare the tracking performance and control quality indicators of the AVMC algorithm of this application with those of existing PID and MPPI algorithms under different trajectories. The indicator settings are shown in Table 1.

[0107] Table 1: Performance Evaluation Indicators for Tracking Control Systems

[0108] When the random target trajectory is a start-stop trajectory or a noisy circular trajectory, the algorithm takes a sampling size of 200K for both cases, and the results are as follows: Figures 8 to 11 As shown, in terms of various quantitative evaluation indicators of tracking and control, the robustness and control smoothness of the AVMC algorithm of this application are superior to the existing MPPI and PID algorithms. In terms of average tracking error, the AVMC algorithm of this application improves the accuracy by 10% compared with the existing MPPI algorithm and by 64.7% compared with the existing PID algorithm. On the NVIDIA 1060 graphics card, when the number of samples is 200K, the control FPS of the AVMC algorithm of this application can reach 338, which meets the real-time control requirements of general scenarios.

[0109] This application also provides a tracking device for randomly moving targets, such as... Figure 12 As shown, in one embodiment, it includes: a first module 1201, a first module 1202, a first module 1203, a first module 1204, a first module 1205, and a first module 1206, wherein: The first module 1201 is used to acquire the forward dynamics model, current state, and target state of the image-based visual servo control system, and to set the initial action, initial variance, and initial cost. The second module 1202 is used for sampling. Based on the forward dynamics model, the current state, the target state, and the initial action, it uses the model prediction path integral control algorithm to output the first action. The third module 1203 is used to obtain the action difference based on the first action, the initial action, and the initial variance; and to output the second action using the action difference as input and an adaptive moment estimation algorithm. The fourth module 1204 is used to calculate and compare the corresponding costs based on the first action and the second action to obtain the current cost and the current action. The fifth module 1205 is used to reduce the initial variance based on the initial cost and the current cost to obtain the current variance; it iterates using the current cost, the current action, and the current variance as inputs, and re-outputs the first action and the second action to obtain the next action; The sixth module 1206 is used to stop the iteration when the preset conditions are met, and to use the next action as the output action to track the randomly moving target.

[0110] For specific limitations regarding a tracking device for a randomly moving target, please refer to the limitations regarding a tracking method for a randomly moving target mentioned above, which will not be repeated here. Each module in the aforementioned device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in hardware or independently of the processor in a computer device, or stored in software in the memory of a computer device, so that the processor can call and execute the operations corresponding to each module.

[0111] In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 13 As shown, the computer device includes a processor, memory, network interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The network interface is used to communicate with external terminals via a network connection. When executed by the processor, the computer program implements a method for tracking randomly moving targets. The display screen can be an LCD screen or an e-ink screen. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad mounted on the computer device casing, or an external keyboard, touchpad, or mouse.

[0112] Those skilled in the art will understand that Figure 13The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0113] In one embodiment, a computer device is provided, including a memory and a processor, the memory storing a computer program, the processor executing the computer program to implement the steps of the method described above.

[0114] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps of the method described above.

[0115] 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. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0116] The contents not described in detail in this specification are existing technologies known to those skilled in the art.

[0117] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0118] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended application documents.

Claims

1. A method for tracking randomly moving targets, characterized in that, include: Obtain the forward dynamics model, current state, and target state of the image-based visual servo control system, and set the initial action, initial variance, and initial cost; Sampling is performed, and based on the forward dynamics model, the current state, the target state, and the initial action, the model prediction path integral control algorithm is used to output the first action; The action difference is obtained based on the first action, the initial action, and the initial variance; Using the action difference as input, an adaptive moment estimation algorithm is employed to output the second action; Based on the first action and the second action, calculate the corresponding costs and compare them to obtain the current cost and the current action; Based on the initial cost and the current cost, the initial variance is reduced to obtain the current variance; Using the current cost, current action, and current variance as input, iterate and re-output the first action and the second action to obtain the next action; When the preset conditions are met, the iteration stops, and the next action is used as the output action to track the randomly moving target.

2. The method for tracking a randomly moving target according to claim 1, characterized in that, Based on the first action and the second action, calculate and compare the corresponding costs to obtain the current cost and the current action, including: Calculate the cost of the first action based on the first action; Calculate the cost of the second action based on the second action; Compare the cost of the first action with the cost of the second action, and use the smaller cost as the current cost, and use the action corresponding to the smaller cost as the current action.

3. The method for tracking a randomly moving target according to claim 2, characterized in that, Based on the initial cost and the current cost, the initial variance is reduced to obtain the current variance, which includes: Calculate the difference between the initial cost and the current cost to obtain the cost difference; The initial variance is reduced based on the cost difference and combined with the variance reduction factor to obtain the current variance.

4. The method for tracking a randomly moving target according to claim 3, characterized in that, The initial variance is reduced based on the cost difference, and the current variance is obtained by combining the variance reduction factor, including: The judgment is made based on the cost difference; if the cost difference meets the first condition... Then, by combining the variance reduction factor, the initial variance is reduced to obtain the current variance: In the formula, To improve the threshold at a cost, The current variance, This is the variance reduction factor; If the cost difference satisfies the second condition and Then, by combining the variance reduction factor, the initial variance is reduced to obtain the current variance: In the formula, To prevent division by zero constants, The current variance, The variance reduction factor and ; If the cost difference satisfies the third condition and If convergence is achieved, the iteration stops, and the next action is used as the output action to track the randomly moving target.

5. A method for tracking a randomly moving target according to any one of claims 1 to 4, characterized in that, Using the current cost, current action, and current variance as input, iterates, re-outputting the first and second actions to obtain the next action, including: Using the current cost, current action, and current variance as input, iterate as follows: resample and add a Gaussian perturbation to the current action to obtain the first action; obtain the second action based on the first action, the current action, and the current variance; obtain the next cost and the next action based on the first action and the second action obtained. Calculate the difference between the current cost and the next generation cost to obtain the next variance; Using the next cost, the next action, and the next variance as input, iterate to re-output the first action and the second action in order to obtain the next action.

6. A method for tracking a randomly moving target according to any one of claims 1 to 4, characterized in that, Sampling is performed, and based on the forward dynamics model, current state, target state, and initial action, a model-predicted path integral control algorithm is used to output the first action, including: Sampling is performed, and a Gaussian perturbation is added to the initial motion to generate the corresponding sampling trajectory; Based on the sampled trajectory, forward dynamics model, current state and target state, calculate the state cost and control cost of each sampled trajectory to obtain the total cost; Based on the total cost, the trajectory weights are calculated and normalized to obtain the normalized trajectory weights. The first action is obtained based on the normalized trajectory weights.

7. A method for tracking a randomly moving target according to any one of claims 1 to 4, characterized in that, Using the action difference as input, an adaptive moment estimation algorithm is employed to output the second action, which includes: The action difference is obtained based on the first action, the initial action, and the initial variance; Based on the motion difference and the first moment decay rate, the biased first moment estimate is obtained; Based on the motion difference and the second moment decay rate, the partial second moment estimate is obtained; Based on the biased first moment estimate and the first moment decay rate, the bias-corrected first moment estimate is obtained; Based on the partial second-moment estimate and the second-moment decay rate, the bias-corrected second-moment estimate is obtained. The second action is obtained based on the initial action, the first-order moment estimate with deviation correction, and the second-order moment estimate with deviation correction.

8. A tracking device for a randomly moving target, characterized in that, The method for tracking a randomly moving target according to any one of claims 1 to 7 includes: The first module is used to acquire the forward dynamics model, current state, and target state of the image-based visual servo control system, and to set the initial action, initial variance, and initial cost. The second module is used for sampling. Based on the forward dynamics model, the current state, the target state, and the initial action, it uses the model prediction path integral control algorithm to output the first action. The third module is used to obtain the action difference based on the first action, the initial action, and the initial variance; using the action difference as input, it employs an adaptive moment estimation algorithm to output the second action. The fourth module is used to calculate and compare the corresponding costs based on the first and second actions to obtain the current cost and the current action. The fifth module is used to reduce the initial variance based on the initial cost and the current cost to obtain the current variance; it iterates using the current cost, the current action, and the current variance as input, and re-outputs the first action and the second action to obtain the next action; The sixth module is used to stop the iteration when the preset conditions are met, and to use the next action as the output action to track the randomly moving target.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.