Anti- drone servo turntable control method, device and system based on dual-core DSP

By employing an adaptive sliding mode control method based on a dual-core DSP architecture, combined with a lightweight sparrow search algorithm, the stability problem of sliding mode control during high-maneuverability motion and the real-time conflict with swarm intelligence algorithms are resolved. This achieves hard real-time control and online optimization, making it suitable for photoelectric tracking turntables and high-maneuverability target tracking.

CN123047403APending Publication Date: 2026-11-06JILIN HENGHUI PRECISION CONTROL TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611317380.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-28
Publication Date
2026-11-06

AI Technical Summary

Technical Problem

In existing technologies, fixed boundary layer sliding mode control is prone to overshooting the boundary layer during high-speed maneuvers, causing a step jump in control quantity and mechanical vibration, resulting in tracking instability and target loss. The real-time computation of swarm intelligence algorithms running online conflicts with the computing power of embedded hardware platforms, making it difficult to achieve online rolling optimization of control parameters while ensuring hard real-time control.

Method used

A control method based on a DSP dual-core architecture is adopted. CPU1 runs a high-frequency hard real-time control loop, while CPU2 runs a low-frequency parameter optimization loop. Through inter-core communication, an adaptive sliding mode control law is constructed and online parameter optimization is performed. Combined with a lightweight sparrow search algorithm, parameter optimization is achieved to realize adaptive compensation for multi-source disturbances and dynamic adjustment of control quantities.

Benefits of technology

It achieves stable tracking during high-speed maneuvers, reduces servo jitter and target loss, ensures the real-time performance and online optimization capabilities of hard real-time control, and adapts to the needs of long-term unattended operation in complex field environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123047403A_ABST
    Figure CN123047403A_ABST
Patent Text Reader

Abstract

This invention relates to a control method, device, and system for an anti-drone servo turntable based on a dual-core DSP, specifically a control technology for an anti-drone servo turntable. It addresses the problems in existing technologies where fixed boundary layer sliding mode control easily exceeds the boundary layer during high-maneuvering motion, leading to control quantity abrupt changes and mechanical vibrations. It also addresses the conflict between the real-time computation of swarm intelligence algorithms running online and the computing power of embedded hardware platforms, making it difficult to achieve online rolling optimization of control parameters while ensuring hard real-time control. This invention discloses an anti-drone servo turntable control method based on a dual-core DSP architecture, employing a lightweight sparrow search algorithm to online optimize adaptive sliding mode control laws. Through an asynchronous parallel architecture of high-frequency control by CPU1 and low-frequency optimization by CPU2, online rolling optimization of control parameters is achieved. This invention is applicable to fields such as photoelectric tracking turntables, precision pointing control, and high-maneuverability target tracking control.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of servo control technology, specifically to a control technology for an anti-drone servo turntable. Background Technology

[0002] Servo turntable technology for high-precision tracking of low-altitude, slow-moving, small flying targets has attracted widespread attention in recent years. These electro-optical or radar tracking turntables, as the actuators of precision pointing and tracking systems, are primarily used for dynamic tracking of low-altitude, slow-moving, small UAVs and high-maneuverability racing vehicles. The servo turntable system requires a dynamic response speed in the hundreds of microseconds and a tracking accuracy in the sub-milliradians. Servo turntables are often installed in open, outdoor environments. The electro-optical bays or radar antenna arrays they carry have a large windward area, which generates significant random wind load torque under sudden gusts. This, combined with multiple time-varying nonlinear interferences such as mechanical transmission friction and cable entanglement torque, creates a lumped unknown disturbance that severely affects the turntable's tracking accuracy and stability.

[0003] Traditional proportional-integral-derivative (PID) control is a linear control method, lacking robustness to strong system nonlinearity and sudden turns during high-maneuvering targets. Sliding mode control, due to its invariance to parameter perturbations and external disturbances, has been introduced into turntable servo control. However, to suppress random wind loads in the field, its switching gain is often set to a large value, which leads to high-frequency motor noise, gear backlash, and mechanical resonance, accelerating wear on the mechanical structure. Using a saturation function or hyperbolic tangent function with a fixed boundary layer for continuity can alleviate chattering to some extent. However, when the target performs large-scale maneuvers, the position tracking error can easily break through the preset fixed boundary layer at the moment of turning, causing the system to switch back to the discontinuous hard switching region instantly. This triggers a saturation step in the control quantity and severe mechanical transient chatter, directly resulting in target loss or pointing deviation. Furthermore, existing schemes that introduce swarm intelligence algorithms to optimize control parameters online have extremely high computational complexity due to the computational characteristics of swarm intelligence algorithms, which involve multiple groups and multiple generations of iteration. When running within a control cycle of hundreds of microseconds, they are prone to computational timeouts, which can damage the hard real-time performance of the system and cause it to freeze. On the other hand, the method of using offline simulation combined with embedded lookup tables cannot match random wind fields and dynamic maneuver trajectories in the field and lacks online self-healing adjustment capabilities.

[0004] In summary, the core problems faced by existing technologies are: fixed boundary layer sliding mode control is prone to overshooting the boundary layer during high-speed maneuvers, causing a step jump in control quantity and mechanical vibration, resulting in tracking instability and target loss; there is a conflict between the real-time computation of swarm intelligence algorithms running online and the computing power of embedded hardware platforms, making it difficult to achieve online rolling optimization of control parameters while ensuring hard real-time control. Summary of the Invention

[0005] This invention solves the problems in the prior art where fixed boundary layer sliding mode control is prone to overshooting the boundary layer during high-speed maneuvers, causing control quantity jumps and mechanical vibrations, and where the real-time computation of swarm intelligence algorithms running online conflicts with the computing power of embedded hardware platforms, making it difficult to achieve online rolling optimization of control parameters while ensuring hard real-time control.

[0006] A control method for an anti-drone servo turntable based on a dual-core DSP architecture is proposed. The method is executed by a dual-core DSP controller. CPU1 of the dual-core DSP controller runs a high-frequency hard real-time control loop, while CPU2 runs a low-frequency parameter optimization loop. The two cores exchange information through inter-core communication. The method includes: High-frequency hard real-time control steps: Obtain the target angle of the turntable according to the high-frequency control cycle. and the actual angle of the turntable ; Within each high-frequency control cycle, based on the current target desired angle and from a practical perspective Calculate the error data and store the error data into the latch stack; An adaptive sliding mode control law is constructed based on the error data, and the control quantity is calculated. As the drive signal output for the turntable, it is synchronously sent to CPU2; Based on the received optimal parameter combination, update the parameters to be optimized in the current adaptive sliding mode control law; Low-frequency parameter optimization steps: Within each optimization cycle, all error data stored in the previous optimization cycle is read from the latch stack to construct a historical error sequence, and the control quantity corresponding to each error data in the historical error sequence is obtained. Based on the historical error sequence and the corresponding control quantity Calculate the fitness evaluation function; Using the fitness evaluation function as the optimization objective, a lightweight sparrow search algorithm is used to perform online optimization of the parameters to be optimized in the adaptive sliding mode control law to obtain the optimal parameter combination; The optimal parameter combination is sent to CPU1.

[0007] A further preferred embodiment includes constructing an adaptive sliding mode control law based on the error data, comprising: Constructing a sliding mode switching surface based on error data :

[0008] in, The slip surface coefficient is the error data, which includes the position tracking error. and its rate of change ; Using saturation function Make sliding mode switching control continuous. The preset boundary layer thickness of the sliding surface; This refers to the sliding mode switching surface; External disturbances and unmodeled dynamics experienced by the system are equated to lumped disturbances, with an adaptive learning rate. The lumped disturbance is adaptively estimated to obtain the disturbance compensation value. :

[0009] Calculate control quantity :

[0010] in The nominal moment of inertia, The gain is the reaching law switching gain; the parameter to be optimized is the sliding surface coefficient. Approach law switching gain and adaptive learning rate .

[0011] In a further preferred embodiment, the high-frequency control period is on the order of hundreds of microseconds, and the control quantity... The signal is a PWM signal, and the period of the PWM signal is synchronized with the high-frequency control period; the optimization period is in the millisecond range.

[0012] A further optimized scheme is proposed, wherein the fitness evaluation function is:

[0013] in The number of data sets in the historical error sequence. This is a control quantity weighting suppression factor; This is the high-frequency control cycle.

[0014] In a further optimized scheme, the lightweight sparrow search algorithm has a population size of 10-30 birds and a maximum number of iterations of 2-5; the lightweight sparrow search algorithm uses a parameter vector [ , , As for individual positions, the population is divided into discoverers, joiners, and early warning individuals, with discoverers accounting for 20% of the population, joiners accounting for 60%–70%, and early warning individuals accounting for 10%–20%. The position update rules are as follows: Discoverer location update:

[0015] in This represents the current iteration number; They represent the parameters respectively. , , ]; A random number between (0,1); [0,1] represents the warning value for the current environment. [0.5,1] represents the safety threshold; It is a random number that follows a standard normal distribution; It is a 1×3 vector consisting entirely of 1s; Joiner location update:

[0016] in The optimal position currently occupied by the discoverer; This is the worst position globally at present; It is a 1×3 vector of all 1s, with each element randomly assigned the value 1 or -1. and ; Location update of the alerter:

[0017] in, This is the current globally optimal position; These are the step size control parameters; A random number between [-1, 1]; This represents the current fitness value of the sparrow. and These are the current best and worst fitness values, respectively. It is a very small constant.

[0018] In a further preferred embodiment, the inter-core communication specifically involves sending the optimal parameter combination to CPU1 via an IPC hardware interrupt. CPU1 responds to the interrupt by rewriting the control parameter register with the optimal parameter combination using atomic operations within the interrupt service routine.

[0019] Further optimization involves updating the parameters to be optimized in the current adaptive sliding mode control law, specifically the optimal parameter combination. , , Apply physical hard limit: ∈[5,120], ∈[0.5,30], ∈[0.01,5].

[0020] In a further optimized scheme, the low-frequency parameter optimization step also includes triggered adaptive energy-saving optimization: In each optimization cycle, CPU2 reads error data from the latch stack and calculates the real-time variance based on the read error data. When the real-time variance is less than the preset threshold, CPU2 determines that the current operating condition is a stable tracking condition, automatically suspends the iteration of the lightweight sparrow search algorithm, maintains the current control parameters, and skips the current optimization. When the real-time variance is greater than or equal to the preset threshold, CPU2 determines that the current operating condition is a sudden change, wakes up the iteration of the lightweight sparrow search algorithm through a hardware interrupt, and restarts the lightweight sparrow search algorithm to optimize parameters.

[0021] A dual-core DSP-based anti-drone servo turntable control device includes a high-frequency hard real-time control module and a low-frequency parameter optimization module, which interact through inter-core communication. The high-frequency hard real-time control module includes: The signal acquisition unit is used to acquire the desired angle of the turntable target according to the high-frequency control cycle. and the actual angle of the turntable ; The error calculation unit is used to calculate the target angle within each high-frequency control cycle. and from a practical perspective Calculate the error data and store the error data into the latch stack; The control quantity calculation unit is used to construct an adaptive sliding mode control law based on the error data and calculate the control quantity. As the drive signal output for the turntable, it is synchronously sent to CPU2; The low-frequency parameter optimization module includes: An error extraction unit is used to read all error data stored in the previous optimization cycle from the latch stack in each optimization cycle and construct a historical error sequence. The fitness evaluation unit is used to obtain the control quantity corresponding to each error data in the historical error sequence. Based on the historical error sequence and the corresponding control quantity Calculate the fitness evaluation function; The parameter optimization unit is used to perform online optimization of the parameters to be optimized in the adaptive sliding mode control law with the fitness evaluation function as the optimization objective and a lightweight sparrow search algorithm to obtain the optimal parameter combination. The parameter update unit is used to send the optimal parameter combination to CPU1.

[0022] A dual-core DSP-based anti-drone servo turntable control system, used in the dual-core DSP-based anti-drone servo turntable control method, the system comprising: The TMS320F28379D dual-core DSP controller includes CPU1 and CPU2, which communicate with each other via IPC and shared RAM; CPU1 executes high-frequency hard real-time control steps during operation. Photoelectric or radar sensors are used to acquire the desired angle of the turntable target in real time. ; The QEP encoder is used to acquire the actual angle of the turntable according to the high-frequency control cycle. ; The motor driver is used to receive the control input from the CPU1. Based on this control quantity Output motor drive signal to permanent magnet synchronous motor; Permanent magnet synchronous motors are used to drive the turntable to rotate; The CPU1 and CPU2 are each embedded with a computer program. When the computer program runs, the CPU1 executes the high-frequency hard real-time control steps, and the CPU2 executes the low-frequency parameter optimization steps.

[0023] The beneficial effects of this invention compared to the prior art are as follows: This invention constructs an adaptive sliding mode control law, uses a saturation function to make the sliding mode switching control continuous, and uses an adaptive learning rate. Online adaptive estimation of lumped disturbances enables dynamic adjustment of the sliding mode boundary layer and the approach coefficient, constraining the tracking error within the smooth range, mitigating sliding mode hard switching jitter, reducing imaging blur and laser pointing deviation caused by servo jitter, and adapting to the stable tracking requirements during high-speed maneuvers.

[0024] This invention achieves adaptive and unified compensation for multi-source disturbances by unifying wind load torque, friction torque, and cable coupling torque into a lumped disturbance and performing online adaptive estimation. The disturbance compensation value is fed forward into the control quantity calculation, thereby achieving adaptive and unified compensation for multi-source disturbances. The gain is adaptively matched and switched according to the disturbance intensity, which suppresses gear vibration noise under weak wind conditions and enhances anti-disturbance performance under strong wind conditions, reduces transmission alternating impact, and delays mechanical wear.

[0025] This invention achieves asynchronous parallelism between high-frequency servo control and low-frequency optimization calculation by using a dual-core task decoupling architecture in a dual-core DSP controller, where CPU1 runs a high-frequency hard real-time control loop and CPU2 runs a low-frequency parameter optimization loop, as well as a mechanism for parameter interaction between the two cores through inter-core communication. This isolates computing power preemption at the hardware level, avoids control cycle timeouts and program freezes, and ensures hard real-time control.

[0026] This invention calculates the real-time variance of error data in the latch stack and uses a preset threshold as a criterion to control the suspension and wake-up of the lightweight sparrow search algorithm iterative state machine in CPU2. This achieves error-triggered intermittent optimization, pausing iterative calculations in steady-state conditions to reduce DSP power consumption and chip heat generation, and immediately restarting optimization in sudden changes to restore dynamic parameter adjustment, making it suitable for long-term unattended outdoor work scenarios.

[0027] The anti-UAV servo turntable control method, device and system based on dual-core DSP described in this invention are applicable to fields such as photoelectric tracking turntable, precision pointing control, and high-maneuverability target tracking control. Attached Figure Description

[0028] Figure 1 This is the overall control block diagram of the anti-drone servo turntable adaptive sliding mode control system described in Implementation Method 3; Figure 2 This is a diagram of the dual-core DSP software task allocation and inter-core communication architecture described in Implementation Method 4; Figure 3 This is a flowchart of the Lightweight Sparrow Search Algorithm (SSA) described in Implementation Method Six; Figure 4 This is the flowchart of the trigger-based adaptive energy-saving optimization logic described in Implementation Method Nine. Detailed Implementation

[0029] Various embodiments of the present invention will now be clearly and completely described with reference to the accompanying drawings. The embodiments described with reference to the drawings are exemplary and intended to explain the present invention, and should not be construed as limiting the present invention.

[0030] Implementation Method 1: This implementation method provides a control method for an anti-UAV servo turntable based on a dual-core DSP. The method is executed by a dual-core DSP controller. CPU1 of the dual-core DSP controller runs a high-frequency hard real-time control loop, and CPU2 runs a low-frequency parameter optimization loop. The two controllers exchange information through inter-core communication (IPC). The method includes: High-frequency hard real-time control steps: Obtain the target angle of the turntable according to the high-frequency control cycle. and the actual angle of the turntable ; Within each high-frequency control cycle, based on the current target desired angle and from a practical perspective Calculate the error data and store the error data into the latch stack; An adaptive sliding mode control law is constructed based on the error data, and the control quantity is calculated. As the drive signal output for the turntable, it is synchronously sent to CPU2; Based on the received optimal parameter combination, update the parameters to be optimized in the current adaptive sliding mode control law; Low-frequency parameter optimization steps: Within each optimization cycle, all error data stored in the previous optimization cycle is read from the latch stack to construct a historical error sequence, and the control quantity corresponding to each error data in the historical error sequence is obtained. Based on the historical error sequence and the corresponding control quantity Calculate the fitness evaluation function; Using the fitness evaluation function as the optimization objective, the Lightweight Sparrow Search (SSA) algorithm is used to perform online optimization of the parameters to be optimized in the adaptive sliding mode control law to obtain the optimal parameter combination; The optimal parameter combination is sent to CPU1.

[0031] In practical applications, the method described in this embodiment involves calculating the control quantity. As the drive signal for the turntable, it is connected to the drive signal input terminal of the permanent magnet synchronous motor that controls the rotation of the turntable. By controlling the rotation of the permanent magnet synchronous motor, the effect of driving the turntable to rotate is achieved.

[0032] Implementation Method 2: This implementation method further defines Implementation Method 1 and provides an example of the calculation error data.

[0033] Target Angle of Data Acquisition Actual angle of the turntable ; The equations of motion for rigid body rotation are as follows:

[0034] In the formula, This represents the nominal moment of inertia of the turntable and the load. The angular velocity of the turntable. Provides control torque / voltage for the motor output; The unknown disturbances are lumped together (wind load torque, friction, cable torque, etc.). The position tracking error is the difference between the target's expected angle and the turntable's actual angle at the current moment, and the error change rate is the derivative of the position tracking error.

[0035] Implementation Method 3: This implementation method further defines Implementation Method 1 and provides an example of constructing an adaptive sliding mode control law based on the error data.

[0036] Constructing a sliding mode switching surface based on error data :

[0037] in, The slip surface coefficient is the error data, which includes the position tracking error. and its rate of change ; To eliminate the step chattering of the sign function during large maneuvers or reversals of the target, a saturation function is used. Make sliding mode switching control continuous. The preset boundary layer thickness of the sliding surface. This refers to the sliding mode switching surface; it is dynamically adjusted according to the working conditions: when the target performs large-scale maneuvering motion, Tighten the value to 0.5 to enhance the disturbance rejection capability of sliding mode switching control and ensure that the position tracking error is constrained within a narrow boundary layer; when the target is in a stable tracking segment, Relaxed to 2 to further smooth the control output and reduce mechanical chatter and gear backlash.

[0038] An online adaptive estimation law is established for sudden external wind load torque and friction disturbances in the field: the external disturbances and unmodeled dynamics experienced by the system are equivalent to lumped disturbances, which are composed of three superimposed components: friction torque, wind load torque, and cable coupling torque. Friction disturbance is a piecewise nonlinear hysteresis disturbance strongly correlated with rotational speed, exhibiting significant torque jumps at low-speed zero-crossing points, and is the main cause of low-speed creep and chattering. Wind load disturbance is a superposition of steady-state bias torque and turbulent random fluctuations, belonging to bounded time-varying external disturbances without a fixed period. Cable coupling torque is a low-order periodic harmonic disturbance of the turntable angle, exhibiting slow amplitude drift characteristics accompanied by cable deformation. Since the three types of disturbances lack independent detection channels, and their parameters, amplitudes, and random fluctuation terms cannot be precisely calibrated in advance, they are integrated into a lumped disturbance. An observation mechanism is used to perform online estimation and feedforward compensation of the overall disturbance, thereby achieving unified suppression of multi-source composite unknown disturbances.

[0039] External disturbances and unmodeled dynamics experienced by the system are equated to lumped disturbances, with an adaptive learning rate. The lumped disturbance is adaptively estimated to obtain the disturbance compensation value. :

[0040] Combined with the nominal moment of inertia of the anti-drone turntable Calculate control quantity :

[0041] in The nominal moment of inertia, The gain is the reaching law switching gain; the parameter to be optimized is the sliding surface coefficient. Approach law switching gain and adaptive learning rate .

[0042] The adaptive estimation law acts as a virtual wind speed and torque sensor, performing online estimation and feedforward compensation of the overall disturbance, thus achieving unified suppression of multi-source composite unknown disturbances. At the end of each cycle, the high-frequency loop calculates the position tracking error and the rate of change of position error at the current moment.

[0043] The real-time error is pushed onto the latch stack for asynchronous reading by CPU2.

[0044] Figure 1 This embodiment demonstrates the overall closed-loop signal flow and parameter adaptation mechanism of the adaptive sliding mode control system. It mainly includes: a "sliding surface construction" stage based on the input of the deviation between the desired and actual angles; followed by an "adaptive sliding mode control law" stage, where the lumped disturbance is processed. The system provides online estimation, feedforward compensation, and control output; simultaneously, the "SSA Online Optimization" module below is responsible for optimizing the key parameters to be optimized. , , It performs rolling updates to match the current field conditions.

[0045] Implementation Method Four: This implementation method further defines Implementation Method One and provides examples to illustrate the control cycle and optimization cycle.

[0046] The high-frequency control period is on the order of hundreds of microseconds, and the control quantity... The signal is a PWM signal, and the period of the PWM signal is synchronized with the high-frequency control period; the optimization period is in the millisecond range.

[0047] The high-frequency hard real-time control steps are controlled by CPU1 with a control cycle of hundreds of microseconds. The control quantity is executed cyclically. The signal is a PWM signal, and its period is synchronized with the high-frequency control period; in this embodiment, 100μs is selected. The low-frequency parameter optimization step is performed by CPU2 with an optimization cycle in milliseconds. The process is repeated cyclically, with the optimization cycle being on the order of milliseconds. This embodiment selects... Asynchronous reading of CPU1 latch stack Historical errors are collected to construct a timing error matrix. The DSP controller uses a TMS320F28379D dual-core floating-point DSP with a main frequency of 200MHz and a hardware floating-point arithmetic unit (FPU). The latch stack is implemented using CPU1TOCPU2RAM.

[0048] The high-frequency hard real-time control loop interrupt source of CPU1 is the ePWM module hardware interrupt, which is completely synchronized with the motor drive PWM carrier. Its core tasks include: sensor data acquisition, position tracking error and rate of change calculation, adaptive sliding mode control law calculation, PWM control instruction output, and error data storage into the CPU1TOCPU2 RAM latch stack.

[0049] The low-frequency parameter optimization loop interrupt source of CPU2 is triggered by the CPU1 timer interrupt, which is asynchronous to the control cycle; its core tasks include: extracting historical errors from the latch stack sliding window, calculating the fitness evaluation function, iterating the lightweight sparrow search algorithm, and outputting the optimal parameters; during the optimization process, the parameters are stored in the GS0 global shared RAM.

[0050] Figure 2 This embodiment demonstrates the software task allocation and inter-core interaction architecture based on the TMS320F28379D dual-core DSP, where CPU1 and CPU2 operate according to control cycles. and optimization cycle Run in parallel, and It achieves data interaction and non-disruptive updating of control law parameters through IPC hardware interrupts, shared RAM, and atomic operation mechanisms.

[0051] Implementation Method 5: This implementation method further defines Implementation Method 1 and provides an example of the fitness evaluation function.

[0052] A dynamic fitness evaluation function is constructed, with position tracking accuracy and motor energy loss as the joint core. The fitness evaluation function is as follows:

[0053] in The number of data sets in the historical error sequence. For control quantity weighting suppression factor, time multiplier This is used to increase the penalty for the steady-state static error at the far end. This is the high-frequency control cycle.

[0054] Implementation Method Six: This implementation method further defines Implementation Method One and provides an example of the lightweight sparrow search algorithm.

[0055] The sparrow population is initialized in the low-frequency loop of CPU2. In the lightweight sparrow search algorithm, the population size is 10-30 birds and the maximum number of iterations is 2-5. In this embodiment, the population size is 20 birds and the maximum number of iterations is 3. The purpose is to achieve lightweight design and reduce computing power. The lightweight sparrow search algorithm uses a parameter vector [ , , As for individual positions, the parameter optimization dimension space consists of three key control factors to be optimized. The population is divided into discoverers, joiners, and early warning units, with discoverers accounting for 20%, joiners for 60%–70%, and early warning units for 10%–20%. In this implementation, the proportion of discoverers (20%), joiners (70%), and early warning units (10%) is adopted. Based on the fitness evaluation function... The position update rules for each parameter combination are as follows: Sparrows representing 20% ​​of the population with superior performance are designated as discoverers, responsible for finding the optimal solution within a broader control parameter space. The positions of these discoverers are updated as follows:

[0056] in This represents the current iteration number; This represents the maximum number of iterations. They represent the parameters respectively. , , ]; A random number between (0,1); [0,1] represents the warning value for the current environment. [0.5,1] represents the safety threshold, which is used in this embodiment. Take 0.7; It is a random number that follows a standard normal distribution; It is a 1×3 vector of all 1s.

[0057] The physical meaning of this formula is: when When the environment is safe (target is flying smoothly), the discoverer shrinks the search range exponentially, making the control law smoother; when When in a high-risk situation (such as when the target is making large-scale maneuvers or when there is a sudden strong gust of wind), sparrows spread throughout the entire space, forcing them to amplify their control gain.

[0058] The remaining sparrows, as participants, are responsible for quickly following the convergence, and the positions of these participants are updated as follows:

[0059] in The optimal position currently occupied by the discoverer; This is the worst position globally at present; It is a 1×3 vector of all 1s, where each element is randomly assigned the value 1 or -1, and ; The physical meaning of this formula is: to ensure that when a certain combination of parameters performs extremely poorly... If the particle is not found, the system immediately forces it to fly to another region to re-optimize, thus preventing the turntable from diverging. At that time, the particle will fly to the vicinity of the optimal position occupied by the best discoverer at that time.

[0060] 10% to 20% of sparrows are randomly selected from the population as early warning units. To ensure a safety boundary, the positions of these early warning units are updated as follows:

[0061] in, This is the current globally optimal position; These are the step size control parameters; A random number between [-1, 1]; This represents the current fitness value of the sparrow. and These are the current best and worst fitness values, respectively. It is a very small constant to prevent the denominator from being 0.

[0062] This early warning mechanism ensures that even during the algorithm optimization process, the calculated parameter combination will never exceed the safe physical limit of the turntable's mechanical motor. At that moment, the sparrow was on the edge of the population, and the system immediately forced the particle to fly to the safe core of the population. ; At that time, the sparrow was originally located in the safest core, but it sensed danger and the system required it to move closer to its other companions.

[0063] After a very low number of iterations, the algorithm identifies the optimal parameter combination that provides the best wind load resistance and minimizes positional error in the current external environment. ].

[0064] Figure 3 The execution flow of the lightweight sparrow search algorithm deployed on CPU2 in this embodiment is demonstrated. CPU2 extracts the historical error sequence from the sliding window and calculates the fitness function, then updates the position and performs rolling iterations according to the rules of discoverer, joiner, and alerter. After optimization, the calculated optimal sliding mode parameters are... , , The data is sent to CPU1 via an IPC hardware interrupt for control law updates in the next cycle.

[0065] Implementation Method Seven: This implementation method further defines Implementation Method One and provides an example of the inter-core communication.

[0066] The inter-core communication is as follows: CPU2 sends a parameter update request to CPU1 through an IPC hardware interrupt. CPU1 rewrites the control parameter register using atomic operations in the interrupt service, and the rewrite takes effect in the next control cycle, thus achieving seamless and uninterrupted evolution of the control law.

[0067] The two cores achieve non-disruptive parameter exchange through IPC hardware communication and globally shared RAM, enabling online rolling evolution of control law parameters without interrupting real-time control. The interaction method involves hardware interrupts, shared RAM, and atomic operations to avoid data races and timing errors. The interaction uses IPC0 in the IPC interrupt channel for parameter update requests and IPC1 for parameter acknowledgment. The synchronization mechanism is as follows: CPU2 writes parameters and sets IPC0; CPU1 responds to the interrupt, reads the parameters, and acknowledges with IPC1.

[0068] Implementation Method Eight: This implementation method is a further limitation of Implementation Method One, and provides an example of how CPU1 updates the parameters to be optimized.

[0069] To prevent the swarm intelligence algorithm from calculating boundary parameters that cause control divergence under sudden large noise interference, when CPU1 updates the parameters to be optimized in the current adaptive sliding mode control law, the optimal parameter combination is […]. , , Apply physical hard limit: ∈[5,120], ∈[0.5,30], ∈[0.01,5]. The physical hard limiting is implemented at the register level of the DSP, based on the following: (1) Sliding mode approach coefficient ∈[5,120] Lower limit 5: Ensures the convergence speed of the sliding surface; too small a limit will lead to slow disturbance suppression and amplified low-speed tracking error. Upper limit 120: to prevent excessive approach gain from causing severe control output jitter, PWM saturation, and power device surges. Register truncation limit avoids parameter search exceeding the limit.

[0070] (2) Extended observer error gain ∈[0.5,30] The lower limit of 0.5 ensures the convergence of LESO's observations of friction, wind load, and lumped cable disturbances; if the value is too small, the observation lag will be severe. Upper limit 30: Avoid excessive observation gain amplifying sensor measurement noise, inducing high-frequency jumps in disturbance estimation, and causing oscillations and divergence in the control loop.

[0071] (3) Adaptive learning rate update ∈[0.01,5] Lower limit 0.01: Ensures that the adaptive law has the ability to make slow corrections, and avoids the loss of online perturbation compensation function when the learning rate is 0; Upper limit 5: To prevent the adaptive update step size from being too large, which could cause the adaptive parameters to drift violently and the controller to become unstable when there is a sudden large disturbance in the wind load or a sudden change in the commutation friction.

[0072] Implementation Method Nine: This implementation method further defines implementation methods one through seven. The low-frequency parameter optimization step further includes a triggered adaptive energy-saving optimization step: In each optimization cycle, CPU2 reads error data from the latch stack and calculates the real-time variance based on the read error data. When the real-time variance is less than a preset threshold At that time, CPU2 determines that the current operating condition is a stable tracking condition, and determines the current parameters [ , , The system automatically suspends the iteration of the lightweight sparrow search algorithm, maintains the current control parameters, skips the current optimization, and no longer consumes computing power, thereby reducing the overall power consumption and heat generation of the DSP chip. The preset threshold is a very small threshold used to determine that the current parameters are highly matched with the current wind field and the target trajectory. At this time, the system is in a stable tracking segment. If the target suddenly performs a high-speed escape maneuver or a sudden gust of wind occurs in the field, causing the real-time variance to be greater than or equal to the preset threshold... When the CPU2 determines that the current operating condition is a sudden change, it wakes up the iteration of the lightweight sparrow search algorithm through a hardware interrupt, restarts the lightweight sparrow search algorithm to perform rapid rolling parameter optimization, and realizes the self-healing dynamic adjustment of parameters.

[0073] Figure 4 This demonstrates the decision logic of the trigger-based adaptive energy-saving optimization in this embodiment. The system calculates the error variance of CPU1 pushing onto the shared stack in real time and compares it with a preset threshold. The comparison is performed as follows: when the variance is less than the threshold, the current operating condition is determined to be stable, and the system directly suspends the SSA iteration of CPU2 to reduce power consumption; conversely, when the variance exceeds the threshold, CPU2 is immediately woken up and the SSA rolling optimization is restarted to realize the self-healing dynamic adjustment of control parameters and the intelligent energy-saving allocation of hardware computing power.

[0074] Implementation Method 10: This implementation method provides a dual-core DSP-based anti-drone servo turntable control system for use in the dual-core DSP-based anti-drone servo turntable control method.

[0075] The system includes: The TMS320F28379D dual-core DSP controller has CPU1 and CPU2 communicating with each other via IPC and shared RAM. Photoelectric or radar sensors are used to acquire the desired angle of the turntable target in real time. ; QEP encoders are used for high-frequency acquisition of the actual angle of the turntable. ; A permanent magnet synchronous motor and a motor driver are used to drive the turntable to rotate; the turntable is a two-axis turntable structure, which enables it to carry a load and perform tracking motion. A two-axis rotary table mechanical structure is used to carry loads and perform tracking motion; The TMS320F28379D dual-core DSP controller has embedded computer programs in CPU1 and CPU2. When the computer programs run, CPU1 executes the high-frequency hard real-time control steps described in Embodiment 1, and CPU2 executes the low-frequency parameter optimization steps described in Embodiment 1.

[0076] The specific hardware parameters of the system are as follows: Main control DSP: TMS320F28379D dual-core floating-point DSP, dual-core C28x+FPU, main frequency 200MHz, CPU1 is responsible for real-time position loop control, and CPU2 is responsible for swarm intelligence algorithm optimization. Servo motor: Permanent magnet synchronous motor, rated speed 3000RPM, used as the power actuator of the turntable; Motor driver: 10kHz current loop bandwidth, receives PWM command input, and realizes H-bridge drive of motor; The electro-optical radar sensor outputs a frequency of 10Hz during the search phase, 50Hz during the acquisition phase, and 100Hz during the stable tracking phase. It is used to acquire UAVs and provide target desired angle commands. ; Multi-turn absolute encoder: Total resolution 29 bits, including 17 bits for single-turn and 12 bits for multi-turn, sampling frequency 10kHz, used for high-frequency acquisition of the actual angle of the turntable mechanical axis. ; Turntable mechanical structure: Two-axis photoelectric turntable, with a load capacity of 15kg, a preset frontal area, equipped with photoelectric or radar payloads and performing tracking motion.

Claims

1. A method for controlling an anti-UAV servo turntable based on a dual-core DSP, characterized in that, The method is executed by a dual-core DSP controller, wherein CPU1 of the dual-core DSP controller runs a high-frequency hard real-time control loop, and CPU2 runs a low-frequency parameter optimization loop, and the two exchange information through inter-core communication; the method includes: High-frequency hard real-time control steps: Obtain the target angle of the turntable according to the high-frequency control cycle. and the actual angle of the turntable ; Within each high-frequency control cycle, based on the current target desired angle and from a practical perspective Calculate the error data and store the error data into the latch stack; An adaptive sliding mode control law is constructed based on the error data, and the control quantity is calculated. As the drive signal output for the turntable, it is synchronously sent to CPU2; Based on the received optimal parameter combination, update the parameters to be optimized in the current adaptive sliding mode control law; Low-frequency parameter optimization steps: Within each optimization cycle, all error data stored in the previous optimization cycle is read from the latch stack to construct a historical error sequence, and the control quantity corresponding to each error data in the historical error sequence is obtained. Based on the historical error sequence and the corresponding control quantity Calculate the fitness evaluation function; Using the fitness evaluation function as the optimization objective, a lightweight sparrow search algorithm is used to perform online optimization of the parameters to be optimized in the adaptive sliding mode control law to obtain the optimal parameter combination; The optimal parameter combination is sent to CPU1.

2. The anti-UAV servo turntable control method based on dual-core DSP according to claim 1, characterized in that, The construction of the adaptive sliding mode control law based on the error data includes: Constructing a sliding mode switching surface based on error data : in, The slip surface coefficient is the error data, which includes the position tracking error. and its rate of change ; Using saturation function Make sliding mode switching control continuous. The preset boundary layer thickness of the sliding surface; This refers to the sliding mode switching surface; External disturbances and unmodeled dynamics experienced by the system are equated to lumped disturbances, with an adaptive learning rate. The lumped disturbance is adaptively estimated to obtain the disturbance compensation value. : Calculate control quantity : in The nominal moment of inertia, The gain is the reaching law switching gain; the parameter to be optimized is the sliding surface coefficient. Approach law switching gain and adaptive learning rate .

3. The anti-UAV servo turntable control method based on dual-core DSP according to claim 1, characterized in that, The high-frequency control cycle is on the order of hundreds of microseconds, and the control quantity... The signal is a PWM signal, and the period of the PWM signal is synchronized with the high-frequency control period; the optimization period is in the millisecond range.

4. The anti-UAV servo turntable control method based on dual-core DSP according to claim 1, characterized in that, The fitness evaluation function is: in The number of data sets in the historical error sequence. This is a control quantity weighting suppression factor; This is the high-frequency control cycle.

5. The anti-UAV servo turntable control method based on dual-core DSP according to claim 1, characterized in that, In the lightweight sparrow search algorithm, the population size is 10-30 birds, and the maximum number of iterations is 2-5; the lightweight sparrow search algorithm uses a parameter vector [ , , As for individual positions, the population is divided into discoverers, joiners, and early warning individuals, with discoverers accounting for 20% of the population, joiners accounting for 60%–70%, and early warning individuals accounting for 10%–20%. The position update rules are as follows: Discoverer location update: in This represents the current iteration number; They represent the parameters respectively. , , ]; A random number between (0,1); [0,1] represents the warning value for the current environment. [0.5,1] represents the safety threshold; It is a random number that follows a standard normal distribution; It is a 1×3 vector consisting entirely of 1s; Joiner position update: in The optimal position currently occupied by the discoverer; This is the worst position globally at present; It is a 1×3 vector of all 1s, with each element randomly assigned the value 1 or -1. and ; Location update of the alerter: in, This is the current globally optimal position; These are the step size control parameters; A random number between [-1, 1]; This represents the current fitness value of the sparrow. and These are the current best and worst fitness values, respectively. It is a very small constant.

6. The anti-UAV servo turntable control method based on dual-core DSP according to claim 1, characterized in that, The inter-core communication specifically involves sending the optimal parameter combination to CPU1 via an IPC hardware interrupt. CPU1 responds to the interrupt by using atomic operations in the interrupt service routine to rewrite the control parameter register to the optimal parameter combination.

7. The anti-UAV servo turntable control method based on dual-core DSP according to claim 2, characterized in that, When updating the parameters to be optimized in the current adaptive sliding mode control law, the optimal parameter combination [ , , Apply physical hard limit: ∈[5,120], ∈[0.5,30], ∈[0.01,5].

8. The anti-UAV servo turntable control method based on dual-core DSP according to any one of claims 1 to 7, characterized in that, The low-frequency parameter optimization step also includes triggered adaptive energy-saving optimization: In each optimization cycle, CPU2 reads error data from the latch stack and calculates the real-time variance based on the read error data. When the real-time variance is less than the preset threshold, CPU2 determines that the current operating condition is a stable tracking condition, automatically suspends the iteration of the lightweight sparrow search algorithm, maintains the current control parameters, and skips the current optimization. When the real-time variance is greater than or equal to the preset threshold, CPU2 determines that the current operating condition is a sudden change, wakes up the iteration of the lightweight sparrow search algorithm through a hardware interrupt, and restarts the lightweight sparrow search algorithm to optimize parameters.

9. A dual-core DSP-based anti-UAV servo turntable control device, characterized in that, The device includes a high-frequency hard real-time control module and a low-frequency parameter optimization module, which interact through inter-core communication. The high-frequency hard real-time control module includes: The signal acquisition unit is used to acquire the desired angle of the turntable target according to the high-frequency control cycle. and the actual angle of the turntable ; The error calculation unit is used to calculate the target angle within each high-frequency control cycle. and from a practical perspective Calculate the error data and store the error data into the latch stack; The control quantity calculation unit is used to construct an adaptive sliding mode control law based on the error data and calculate the control quantity. As the drive signal output for the turntable, it is synchronously sent to CPU2; The low-frequency parameter optimization module includes: An error extraction unit is used to read all error data stored in the previous optimization cycle from the latch stack in each optimization cycle and construct a historical error sequence. The fitness evaluation unit is used to obtain the control quantity corresponding to each error data in the historical error sequence. Based on the historical error sequence and the corresponding control quantity Calculate the fitness evaluation function; The parameter optimization unit is used to perform online optimization of the parameters to be optimized in the adaptive sliding mode control law with the fitness evaluation function as the optimization objective and a lightweight sparrow search algorithm to obtain the optimal parameter combination. The parameter update unit is used to send the optimal parameter combination to CPU1.

10. A dual-core DSP-based anti-drone servo turntable control system, characterized in that, The system used for the anti-UAV servo turntable control method based on dual-core DSP includes: The TMS320F28379D dual-core DSP controller includes CPU1 and CPU2, which communicate with each other via IPC and shared RAM; CPU1 executes high-frequency hard real-time control steps during operation. Photoelectric or radar sensors are used to acquire the desired angle of the target on the turntable in real time. ; The QEP encoder is used to acquire the actual angle of the turntable according to the high-frequency control cycle. ; The motor driver is used to receive the control input from the CPU1. Based on this control quantity Output motor drive signal to permanent magnet synchronous motor; Permanent magnet synchronous motors are used to drive the turntable to rotate; The CPU1 and CPU2 are each embedded with a computer program. When the computer program runs, the CPU1 executes the high-frequency hard real-time control steps as described in claim 1, and the CPU2 executes the low-frequency parameter optimization steps as described in claim 1.