Anti-surge interference unmanned aerial vehicle flight control power output stability control algorithm and system
By identifying the surge characteristics of the UAV flight control power supply and using the ant colony algorithm for waveform clustering, the compensation strategy of the energy storage unit is dynamically adjusted, solving the problem of unstable output of the UAV flight control power supply under surge interference. This achieves adaptive and precise suppression of surge interference, improving the power supply reliability and safety of the flight control system.
Patent Information
- Application Number
- CN202610739928.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-27
- Publication Date
- 2026-08-25
- Estimated Expiration
- 2046-05-27
AI Technical Summary
Existing UAV flight control power supplies lack effective resistance and voltage stability control when facing surge interference, especially under sudden load changes, which may lead to flight control processor reset, abnormal sensor data acquisition, or control signal disorder.
By acquiring the voltage and current values of the UAV flight control power supply, the start time and polarity of the surge are identified. The ant colony algorithm is used to cluster the waveform features of the surge event, construct a multi-layer search structure, select appropriate compensation resources for voltage stabilization control, including multiple energy storage units with different response speeds and energy capacities, dynamically adjust the compensation process and update the voltage reference value.
It achieves adaptive and precise suppression of surge interference, improves the output stability of the flight control power supply, and enhances the power supply reliability and flight safety of the UAV flight control system.
Smart Images

Figure CN122267699B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a surge-resistant unmanned aerial vehicle (UAV) flight control power output stabilization control algorithm and system, belonging to the field of UAV power control technology. Background Technology
[0002] The core components of a drone mainly include the flight control system, energy system, power system, and fuselage structure. Among them, the flight control system, as the core control unit of the drone, directly determines the flight safety and mission reliability of the aircraft through the stability of its power supply during flight. Sudden load changes such as rapid acceleration and deceleration of motors and servo movements can cause instantaneous voltage drops or spikes at the power supply output, i.e., surge interference. If surge interference on the flight control power supply cannot be effectively suppressed, it may directly lead to flight control processor reset, abnormal sensor data acquisition, or disordered control signal output.
[0003] In existing technologies, interference such as corona discharge and harmonics are distinguished through monitoring and spectrum analysis using broadband electromagnetic sensors. Kalman filtering is used to fuse multi-source navigation information such as GNSS, IMU, and vision to establish an interference error mapping model to correct sensor data and ensure local anti-interference capability. However, existing technologies have the following problems: their active anti-interference strategy does not consider surge interference and voltage stability control conducted by the UAV power line itself, and lacks the ability to adapt to unknown surge waveforms. Summary of the Invention
[0004] The purpose of this invention is to provide a surge-resistant unmanned aerial vehicle (UAV) flight control power output stability control algorithm and system to solve the problems of insufficient surge interference resistance and unstable flight control power output in the prior art.
[0005] To solve the above-mentioned technical problems, the present invention is implemented using the following technical solution.
[0006] A surge-resistant power supply output stabilization control algorithm for UAV flight control systems includes:
[0007] The voltage and current values of the UAV flight control power supply are obtained. The start time and polarity of the surge are identified by the direction and amplitude of voltage value changes. The surge characteristics are judged based on the current value and voltage deviation depth.
[0008] Surge events are captured based on surge characteristics and an event queue is established. The surge events in the event queue are clustered by waveform features using the ant colony algorithm. A multi-layer search structure is constructed to group surge events with similar waveform features into the same node.
[0009] Based on the current surge event, select the associated compensation resources from the historical scheduling records of the corresponding nodes in the multi-layer search structure and control the compensation input. The compensation resources include energy storage units of multiple flight control power supplies with different response speeds and energy capacities.
[0010] Based on the suppression effect of the voltage waveform during this compensation process, the historical scheduling records are corrected and the output of the UAV flight control power supply is controlled.
[0011] Furthermore, the voltage and current values of the UAV flight control power supply are acquired. The start time and polarity of the surge are identified by the direction and amplitude of voltage changes. Surge characteristics are determined based on the depth of current and voltage deviations, including:
[0012] The voltage and current values of the UAV flight control power supply are obtained. By measuring the sign and magnitude of the voltage difference between consecutive sampling points, the start time and polarity of the rising or falling edge of the voltage value are determined.
[0013] The voltage value at the beginning of the voltage rise or fall is marked as the surge initiation voltage value. The difference between the voltage values of subsequent sampling points and the surge initiation voltage value is accumulated to obtain the real-time updated voltage deviation depth.
[0014] The voltage deviation depth is compared synchronously with the current value change trend at the corresponding moment. If the current value increases synchronously when the voltage deviation depth increases negatively, it is confirmed as a positive load surge characteristic. If the current value decreases synchronously when the voltage deviation depth changes from positive to negative, it is confirmed as a reverse load surge characteristic.
[0015] Furthermore, surge events are captured based on surge characteristics, and an event queue is established. An ant colony algorithm is used to cluster the surge events in the event queue based on their waveform features, constructing a multi-layered search structure to group surge events with similar waveform features into the same node, including:
[0016] Initialize an empty event queue structure, extract the start and end times, waveform extreme point sequence, and slope of the events based on the surge characteristics to generate surge events, and insert them into the event queue in the order of their occurrence;
[0017] The waveform extreme point sequence and change slope of each surge event in the event queue are extracted to calculate the waveform similarity between surge events. Based on the waveform similarity, event nodes are constructed using the ant colony algorithm, and each event node is associated with a group of surge events with similar waveforms.
[0018] Within each event node, calculate the mean sequence of extreme points of the waveform for all surge events and the mean of the slope of change, and combine them into waveform parameters;
[0019] When a new wave event is added to the event queue, the cumulative sum of the differences between its waveform extreme point sequence and the waveform parameters of each event node is calculated. The event node with the smallest total matching difference is selected as the candidate matching node for event classification.
[0020] Identify event node pairs where the waveform similarity between event nodes is greater than a preset similarity threshold and event nodes where the number of surge events exceeds the upper limit, and merge or split the event node pairs and event nodes into new event nodes.
[0021] Furthermore, the waveform extreme point sequence and change slope of each surge event in the event queue are extracted to calculate the waveform similarity between surge events. Based on the waveform similarity, event nodes are constructed using an ant colony algorithm. Each event node is associated with a group of surge events with similar waveforms, including:
[0022] Extract the waveform extreme point sequence and change slope of each surge event, calculate the cumulative sum of the differences between the waveform extreme point sequences of any two surge events and the difference between the change slopes, and normalize them. Then, take the reciprocal of the sum to obtain the waveform similarity.
[0023] Initialize the pheromone concentration of all surge events to the same value, use surge events as recording nodes and waveform similarity as heuristic information, start from randomly selected recording nodes, use ant colony algorithm to find the next unvisited node and calculate the pheromone concentration;
[0024] Statistically analyze the pheromone concentration between each surge event and other surge events, identify surge events with pheromone concentrations greater than a preset concentration threshold as surge events in the same group, and merge them to generate event nodes;
[0025] Assign a unique node identifier to each event node, associate surge events belonging to the same event node with the corresponding node, and record the historical scheduling records of the compensation resources corresponding to each surge event.
[0026] Furthermore, event node pairs with waveform similarity greater than a preset similarity threshold and event nodes with the number of surge events exceeding an upper limit are identified. Event node pairs and event nodes are then merged or split into new event nodes, including:
[0027] By calculating the cumulative sum of differences between waveform parameters of all event nodes, two event nodes whose cumulative sum of differences is less than the similarity threshold are identified as event node pairs with similar waveforms.
[0028] Surge events extracted from event node pairs are merged and associated with a newly created initial event node, its waveform parameters are calculated, and it is marked as a state to be verified for capacity.
[0029] Count the number of surge events associated with the initial event node. If the number of surge events does not exceed the preset capacity limit, convert the initial event node into an event node and mark it as verified.
[0030] If the number of surge events exceeds the preset capacity limit, the merging operation will be stopped and the original event node before the merge will be traced back for recording optimization.
[0031] Furthermore, based on the current surge event, compensation resources associated with the corresponding node are selected from the historical scheduling records of the multi-layer lookup structure, and compensation input is controlled. These compensation resources include energy storage units of multiple flight control power supplies with different response speeds and energy capacities, including:
[0032] Based on the historical scheduling records of the event nodes to which the current surge event belongs in the multi-layer search structure, select energy storage units with different response speeds and energy capacities as compensation resources.
[0033] The waveform change trend of the current surge event is detected, and the order of input and output weight ratio of each energy storage unit in the selected compensation resources are dynamically adjusted according to the waveform change trend.
[0034] Update the records of the energy storage unit commissioning sequence and output weights executed during the current compensation process to the historical scheduling record of the event node to which the current surge event belongs.
[0035] Furthermore, the waveform change trend of the current surge event is detected, and the order of input and output weight ratio of each energy storage unit in the selected compensation resources are dynamically adjusted according to the waveform change trend, including:
[0036] The instantaneous rate of change sequence of the current surge event is calculated as the waveform change trend. The historical response records of each energy storage unit in the compensation resource are traversed, and the corresponding rate of change sequence and the instantaneous rate of change sequence are normalized and accumulated to calculate the matching degree.
[0037] The energy storage unit with the highest matching degree is generated into an input sequence, and the energy storage unit with the lowest matching degree is moved to the end of the sequence.
[0038] Based on the instantaneous rate of change of the waveform trend, the output weight of each energy storage unit in the input sequence is corrected and normalized to obtain the output weight ratio.
[0039] Write the input sequence and output weight ratio into the current compensation execution process, record the voltage value during the compensation process, and add the instantaneous rate of change sequence and the output weight of each energy storage unit to the corresponding response record.
[0040] Furthermore, based on the voltage waveform suppression effect during this compensation process, the historical scheduling records are corrected and the output of the UAV flight control power supply is controlled, including:
[0041] Extract the voltage values recorded during the compensation process, calculate the cumulative deviation and deviation duration between them and the preset ideal stable voltage, and determine the suppression effect of this compensation based on the cumulative deviation and deviation duration.
[0042] The suppression effect is associated with the historical scheduling record of the event node to which the current surge event belongs, and sorted by numerical value. The optimal suppression effect is then extracted as the suppression benchmark.
[0043] Based on the input sequence and output weight ratio corresponding to the suppression benchmark, the average input frequency and average weight ratio of each energy storage unit are calculated to generate the scheduling parameters for the corresponding surge event.
[0044] The recursive update weight of the voltage reference value of the UAV flight control power supply is set according to the scheduling parameters, and the voltage reference value is written into the power supply control loop for output control.
[0045] Furthermore, the recursive update weight of the UAV flight control power supply voltage reference value is set according to the scheduling parameters, and the voltage reference value is written into the power supply control loop for output control, including:
[0046] The average weight ratio of each energy storage unit is extracted from the scheduling parameters, and the weight is generated by merging and calculating.
[0047] The compensated voltage value is collected, and the voltage reference value is calculated by recursively updating the weight. This value is then written into the power control loop to calculate the output voltage difference. The on-time control of the power switch is then performed based on the output voltage difference.
[0048] A surge-resistant UAV flight control power output stabilization control system includes a capture module, an event processing module, a scheduling module, and a feedback optimization module.
[0049] The capture module is used to acquire the voltage and current values of the UAV flight control power supply, identify the start time and polarity of the surge by the direction and amplitude of voltage value changes, and determine the surge characteristics based on the current value and voltage deviation depth.
[0050] The event processing module is used to capture surge events based on surge characteristics and establish an event queue. It then uses an ant colony algorithm to cluster the surge events in the event queue based on waveform characteristics, constructs a multi-layer search structure, and groups surge events with similar waveform characteristics into the same node.
[0051] The scheduling module is used to select the associated compensation resources from the historical scheduling records of the corresponding nodes in the multi-layer lookup structure according to the current surge event and control the compensation input. The compensation resources include energy storage units of multiple flight control power supplies with different response speeds and energy capacities.
[0052] The feedback optimization module is used to correct historical scheduling records and control the output of the UAV flight control power supply based on the suppression effect of the voltage waveform during the compensation process.
[0053] Compared with existing technologies, the beneficial effects achieved by this invention are as follows: An event queue is constructed by judging the surge characteristics of the current voltage and current, and the surge waveform is clustered and divided into nodes using an ant colony algorithm. When a new surge event occurs, the corresponding surge node is matched, and the input order and output weight of the energy storage units used for compensation are adjusted. The scheduling sequence is dynamically updated during the compensation process. After the compensation is completed, the recursive update weight of the voltage reference value is adjusted according to the suppression effect. The on-time ratio of the power switching devices is adjusted through the power control loop to control the stable voltage output. This invention solves the problems of insufficient surge interference resistance and unstable flight control power supply output in existing technologies, achieving adaptive and precise suppression of surge interference, improving the output stability of the flight control power supply, realizing continuous optimization of compensation parameters, and improving the power supply reliability and flight safety of the UAV flight control system.
[0054] It should be understood that the above general description and the following detailed description are merely exemplary and explanatory, and are not intended to limit the technical solutions of this disclosure. Attached Figure Description
[0055] Figure 1 Flowchart of the surge interference-resistant UAV flight control power output stabilization control algorithm provided by the present invention;
[0056] Figure 2 This is a schematic diagram of the event queue provided by the present invention;
[0057] Figure 3 This is a schematic diagram of the dynamic evolution of event nodes provided by the present invention;
[0058] Figure 4 The structural diagram of the surge-resistant unmanned aerial vehicle flight control power output stability control system provided by the present invention. Detailed Implementation
[0059] The technical solution of the present invention will be described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the embodiments of the present invention and the specific features in the embodiments are detailed descriptions of the technical solution of the present invention, rather than limitations thereof. In the absence of conflict, the embodiments of the present invention and the technical features in the embodiments can be combined with each other.
[0060] The term "and / or" simply describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. Additionally, the character " / " generally indicates that the preceding and following related objects have an "or" relationship.
[0061] Example 1
[0062] Please see Figures 1-3This invention provides an embodiment of a surge-resistant UAV flight control power supply output stabilization control algorithm, which includes the following specific steps:
[0063] Step S1: Obtain the voltage and current values of the UAV flight control power supply, identify the start time and polarity of the surge by the direction and amplitude of voltage value changes, and determine the surge characteristics based on the current value and voltage deviation depth.
[0064] The specific steps of step S1 are as follows:
[0065] Step S101: Obtain the voltage and current values of the UAV flight control power supply. Determine the start time and polarity of the rising or falling edge of the voltage value by the sign and magnitude of the voltage difference between consecutive sampling points.
[0066] In this embodiment, the voltage and current values of the UAV flight control power supply are continuously collected at a fixed sampling frequency to construct a voltage sampling sequence and a current sampling sequence. The voltage difference between adjacent sampling points is calculated sequentially. If the voltage value of the current sampling point minus the voltage value of the previous sampling point is greater than the positive change threshold, the current moment is determined to be the start moment of the rising edge of the voltage value, and the polarity of the voltage change at this moment is marked as positive. If the voltage value of the current sampling point minus the voltage value of the previous sampling point is less than the negative change threshold, the current moment is determined to be the start moment of the falling edge of the voltage value, and the polarity of the voltage change at this moment is marked as negative. After determining the start moment, the current sampling point and subsequent sampling points are marked as surge event pending state, and the voltage value at the corresponding start moment is recorded. The positive change threshold is set to twice the maximum amplitude of the steady-state voltage fluctuation. For example, if the steady-state voltage fluctuation range is ±0.1V, the positive threshold is set to +0.2V, and the negative change threshold is set to -2 times the maximum amplitude of the steady-state voltage fluctuation, i.e., -0.2V.
[0067] Step S102: Mark the voltage value at the beginning of the voltage rise or fall as the surge initiation voltage value, and accumulate the difference between the voltage values of subsequent sampling points and the surge initiation voltage value to obtain the real-time updated voltage deviation depth.
[0068] In this embodiment, the voltage value at the start time is recorded as the surge initiation voltage value. Starting from the next sampling point at the start time, the difference between the voltage value at each sampling point and the surge initiation voltage value is calculated, and these differences are continuously accumulated to obtain the real-time updated voltage deviation depth value. The voltage deviation depth reflects the total offset of the voltage relative to the initiation point since the surge started. A negative voltage deviation depth indicates that the voltage is lower than the initiation point, and a positive value indicates that the voltage is higher than the initiation point.
[0069] For example, suppose in a real-time monitoring of a drone flight control power supply, the sampling frequency is set to 10kHz. At the beginning time t0, the voltage value V0 = 50.0V, which is determined to be the start of the falling edge and the polarity is negative. At time t1, the voltage value V1 = 49.8V, and the difference with V0 is -0.2V. At this time, the voltage deviation depth is -0.2V. At time t2, the voltage value V2 = 49.5V, and the difference is -0.5V. After accumulation, the voltage deviation depth is -0.7V. At time t3, the voltage value V3 = 49.0V, and the difference is -1.0V. After accumulation, the voltage deviation depth is -1.7V. As the sampling point moves, the voltage deviation depth continues to increase negatively, indicating that the voltage continues to drop. By continuously accumulating, the degree of voltage deviation can be tracked in real time, avoiding misjudgment caused by single-point sudden change and improving the accuracy of surge depth measurement.
[0070] Step S103: Compare the voltage deviation depth with the corresponding current value change trend. If the current value increases synchronously when the voltage deviation depth increases negatively, it is confirmed as a positive load surge characteristic. If the current value decreases synchronously when the voltage deviation depth increases from positive to negative, it is confirmed as a reverse load surge characteristic.
[0071] In this embodiment, a current sampling sequence corresponding to the voltage sampling time is obtained. The sampling point at the start of the voltage rising or falling edge is taken as the start time of the current sampling sequence, and the event end time is taken as the end time of the current sampling sequence. The real-time trend of the current value is calculated, and the current increase or decrease is determined by the current difference between adjacent sampling points. The direction of change of the voltage deviation depth is synchronously compared with the current change trend point by point. If the voltage deviation depth is negative and continues to increase in the negative direction (i.e., the voltage is continuously decreasing), and the current difference at the corresponding time is continuously positive (i.e., the current value is continuously increasing), then the current surge event is determined. The positive load surge characteristic corresponds to the voltage drop caused by a sudden increase in load such as the drone motor. If the voltage deviation depth changes in the positive direction first, and after the inductor energy of the power supply is released, the voltage deviation depth changes from positive to negative and continues to increase in the negative direction, that is, the voltage continues to drop. The current difference at the corresponding moment is continuously negative, indicating that the current value is continuously decreasing. Then, the current surge event is determined to be the reverse load surge characteristic, which corresponds to the voltage backlash caused by the sudden unloading of the load. It indicates that the current drops, but the voltage rises briefly due to the inductor follow current. This effectively distinguishes the cause of the surge and improves the anti-interference capability of the drone flight control power supply under complex working conditions.
[0072] Step S2: Capture surge events based on surge characteristics and establish an event queue. Use the ant colony algorithm to cluster the surge events in the event queue based on waveform characteristics, construct a multi-layer search structure, and group surge events with similar waveform characteristics into the same node.
[0073] It should be noted that the multi-layer search structure consists of two layers: an event queue and event nodes. The event queue, as the first layer, stores all captured raw surge events in chronological order. Each event record contains complete feature data such as start and end times, waveform extreme point sequence, and slope of change. The event nodes, as the second layer, are generated by clustering the surge events in the event queue based on waveform features. Each event node is associated with a group of surge events with similar waveforms and stores the waveform parameters of that type of event as well as historical compensation scheduling records.
[0074] The specific steps of step S2 are as follows:
[0075] Step S201: Initialize the empty event queue structure, extract the start and end times of the events, the sequence of extreme points of the waveform and the change slope according to the surge characteristics to generate surge events, and insert them into the event queue in the order of their occurrence.
[0076] In this embodiment, an empty event queue structure is created to store all identified surge events in chronological order. Each surge event in the event queue is organized as a linked list, containing an event identifier, event start and end timestamps, waveform extreme point sequence, slope of change, and a pointer to the next event. During initialization, the head and tail pointers of the event queue are set to null, and the event counter is set to zero. When the current sampling sequence exhibits positive or negative load surge characteristics, the event start and end timestamps are extracted from the surge characteristics. The rising or falling edge of the voltage value is recorded as the event start time. The first sampling point whose voltage value recovers to within the surge initiation voltage plus recovery tolerance and remains stable for more than the stabilization time is recorded as the event end point. All sampling points between the event start and end points, along with their corresponding voltage and current values, are saved in sampling order to form waveform data. The waveform extreme point sequence is extracted from the waveform data. All voltage value sampling points between the event start and end points are traversed to identify local maxima and local minima. A local maximum is defined as the current sampling point's voltage value being greater than both the previous and next sampling points, and a local minimum is defined as... If the voltage value at the current sampling point is less than that at the previous sampling point and less than that at the next sampling point, all local extreme points are arranged in chronological order. For each extreme point, its time value and voltage value are recorded, forming a waveform extreme point sequence. Within this sequence, the voltage difference between adjacent extreme points is calculated and divided by the time difference to obtain the slope value for each extreme point interval. The average of all interval slope values is taken as the overall slope of the surge event. Simultaneously, the slope values for each interval are saved sequentially as a slope sequence. The event start and end times, waveform extreme point sequence, slope values, and corresponding surge characteristics are combined to form surge event data. The system is structured and assigned a unique event identifier, which is generated by combining the event occurrence date and the event sequence number of that day. Surge events are inserted into the event queue in the order of their start time. The recovery tolerance range is set to ±3% of the flight controller's rated voltage to avoid premature termination of surge events due to minor fluctuations and to ensure that the voltage truly recovers to the stable operating range. The stabilization time is set according to the transient response time of the power system and the flight controller's requirement for continuous stable voltage. After a sudden load change, the power converter usually needs hundreds of microseconds to several milliseconds to re-establish a steady-state output, so the stabilization time is set to 1ms to 2ms.
[0077] exist Figure 2 In the diagram, each rectangle corresponds to a surge event, and there are a total of 7 surge events, which are represented as surge event 7, surge event 6, surge event 5, surge event 4, surge event 3, surge event 2, and surge event 1, respectively. Surge event 1 is used to represent the head of the queue, and surge event 7 is used to represent the tail of the queue. People leave the queue through the head of the queue and enter the queue through the tail of the queue.
[0078] Step S202: Extract the waveform extreme point sequence and change slope of each surge event in the event queue to calculate the waveform similarity between surge events. Based on the waveform similarity, construct event nodes using the ant colony algorithm. Each event node is associated with a group of surge events with similar waveforms.
[0079] The specific steps of step S202 are as follows:
[0080] Step S2021: Extract the waveform extreme point sequence and change slope of each surge event, calculate the cumulative sum of the difference between the waveform extreme point sequences of any two surge events and the difference between the change slope, and perform normalization processing. After summing, take the reciprocal to obtain the waveform similarity.
[0081] In this embodiment, surge events are sequentially retrieved from the event queue, and their waveform extreme point sequences and slopes are extracted. For any two surge events to be compared, their waveform extreme point sequences are aligned along the time axis. The alignment method involves resetting the starting time points of both sequences to zero, and recalculating subsequent extreme point times according to relative time. If the number of extreme points in the two sequences is different, the sequence with fewer extreme points is used as the benchmark, and extreme points are supplemented at the corresponding time positions of the other sequence through linear interpolation, so that the two sequences have the same number of extreme points and corresponding time nodes. After alignment, the extreme points of the two sequences are calculated point by point. The voltage difference at the same relative time point is calculated, and the absolute values of the voltage differences at all extreme points are summed to obtain the cumulative sum of the waveform extreme point sequence differences. The slope difference between the two surge events is calculated by subtracting the slopes of the two events and taking the absolute value. The cumulative sum of the waveform extreme point sequence differences is added to the slope difference to obtain the total difference between the two surge events. The reciprocal of the total difference is normalized with the preset maximum similarity benchmark value to obtain the waveform similarity in the range of 0 to 1. The smaller the total difference, the closer the waveform similarity is to 1, indicating that the waveform characteristics of the two surge events are more similar.
[0082] For example, suppose the event queue stores surge event A and surge event B. The waveform extreme point sequence of event A is as follows: the voltage value of 50.0V at a relative time of 0ms is the starting point, the voltage value of 49.0V at a relative time of 2ms is the minimum point, and the voltage value of 49.8V at a relative time of 5ms is the maximum point. The slope of the change in event A is -0.2V / ms. The waveform extreme point sequence of event B is as follows: the voltage value of 50.0V at a relative time of 0ms is the starting point, the voltage value of 49.2V at a relative time of 2ms is the minimum point, and the voltage value of 49.9V at a relative time of 5ms is the maximum point. The slope of the change in event B is -0.18V / ms. After alignment, taking the time node of event A as the reference, the voltage value at a relative time of 2ms is approximately 49.2V, and the voltage value at a relative time of 5ms is approximately 49.9V. The voltage value is approximately 49.9V. The voltage difference is calculated point by point: 0V at 0ms, 0.2V at 2ms, and 0.1V at 5ms. The cumulative sum of the differences in the waveform extreme point sequence is 0.3V, the difference in the slope of change is 0.02V / ms, and the total difference is 0.32. Taking the reciprocal, it is approximately 3.125. Normalizing this value with the maximum similarity benchmark yields a waveform similarity of approximately 0.32. The normalization method is to divide 3.125 by the maximum similarity benchmark. The maximum similarity benchmark is set based on the system sampling accuracy and voltage fluctuation range. Assuming the current maximum similarity benchmark is 10, a larger value indicates a higher waveform similarity between event A and event B. This quantifies the similarity of different surge events in waveform morphology and rate of change, improving the accuracy and consistency of surge event classification.
[0083] Step S2022: Initialize the pheromone concentration of all surge events to the same value, take the surge events as record nodes, take waveform similarity as heuristic information, start from the randomly selected record node, use the ant colony algorithm to find the next unvisited node and calculate the pheromone concentration.
[0084] In this embodiment, an independent recording node is set for each surge event in the event queue. The pheromone concentration is initialized for each recording node, and all recording nodes have the same initial pheromone concentration. The waveform similarity between any two recording nodes is used as heuristic information for the path connecting these two nodes; higher waveform similarity indicates a better path between nodes. A maximum number of iterations and the number of ants in each iteration are set. For example, if the event queue stores approximately 30 surge events, the maximum number of iterations is set to 50, and the number of ants in each iteration is set to 20. The number of ants is close to the number of surge events to ensure search diversity. A recording node is randomly selected from all recording nodes as the starting node for each iteration. During the simulated path construction process for each ant, the current recording node calculates the probability of selecting the next node to visit based on the pheromone concentration and waveform similarity of the path with all unvisited nodes. This continues until all nodes have been visited once, completing a full path. After all ants have completed one round of path construction, the pheromone concentration between adjacent nodes along each path is updated. The update method is based on the original pheromone concentration. An increment proportional to the total path similarity is added. The total path similarity is calculated by sequentially accumulating the waveform similarity between the current node and the next node, starting from the starting node of the path, until all nodes in the path have been traversed. The higher the total path similarity, the larger the increment. To avoid the algorithm stagnation due to the unlimited accumulation of pheromones, the pheromone concentration of all nodes is volatilized, i.e., the pheromone concentration between all nodes is reduced by a fixed ratio. After one iteration, the path with the highest total path similarity in the current iteration and its corresponding node access order are recorded. The iteration process is repeated until the maximum number of iterations is reached. At this time, the pheromone concentration distribution between nodes tends to be stable. Nodes with high pheromone concentrations indicate that the corresponding two surge events are frequently and continuously accessed in multiple simulated paths, that is, their waveform features have high similarity and should belong to the same event node. By introducing the self-organizing optimization capability of the ant colony algorithm into the clustering process of surge events, the potential grouping structure of waveform features can be adaptively discovered, improving the stability and noise resistance of the clustering results, so that the UAV flight control power supply can still maintain effective classification and compensation preparation capabilities when facing unknown surge waveforms.
[0085] Step S2023: Calculate the pheromone concentration between each surge event and other surge events, identify surge events with pheromone concentrations greater than a preset concentration threshold as surge events in the same group, and merge them to generate event nodes.
[0086] In this embodiment, the final pheromone concentration between each surge event and all other surge events in the event queue is read from the record node corresponding to each surge event. This reflects the cumulative frequency of two surge events being accessed consecutively in multiple simulation paths. For each surge event, its pheromone concentrations with other events are sorted in descending order, and the upper quartile of the pheromone concentration distribution is extracted as the baseline value. A concentration threshold is set as a multiple of the baseline value, and the multiple is dynamically adjusted according to the total number of surge events in the event queue. The more events there are, the lower the multiple is appropriately to ensure that the clustering granularity is appropriate. All surge events are traversed in pairs, and the pheromone concentration between each pair of surge events is taken. Surge events with pheromone concentrations greater than the concentration threshold are marked as candidate pairs of the same group. Connectivity analysis is performed on all candidate pairs of the same group. That is, if surge event C and surge event D are candidate pairs of the same group, and the surge event... If event D and surge event E are also candidate pairs of events in the same group, then C, D, and E are grouped into the same connected set. A connected set is a group of surge events contained in a candidate event node. After completing the connected set partitioning of all surge events in the event queue, each connected set corresponds to an event node to be generated. If a surge event does not form a candidate pair of events with any other event, then the event is treated as an independent connected set to ensure that each surge event has a place. The surge events in each connected set are merged to generate the corresponding event node. By using an event clustering method based on pheromone concentration threshold and connectivity analysis, the inherent similarity structure between surge events can be adaptively discovered, avoiding subjective bias caused by pre-setting the number of clusters, making the clustering results more consistent with the data distribution characteristics of the surge waveform itself, and improving the classification accuracy of UAV flight control power supplies for various surge events.
[0087] Step S2024: Assign a unique node identifier to each event node, associate surge events belonging to the same event node with the corresponding node, and record the historical scheduling records of the compensation resources corresponding to each surge event.
[0088] In this embodiment, a unique node identifier is assigned to each event node according to the order in which the connected sets are generated. The node identifier consists of a node type prefix and a sequence number. The node type prefix is set based on the main characteristics of the surge events within the event node. If the event within the node has a positive load surge characteristic, the prefix is marked as "positive"; if the event within the node has a negative load surge characteristic, the prefix is marked as "negative"; if the event within the node has a mixed characteristic, it is marked as "mixed". The determination of whether an event is mixed is based on the ratio of positive load surge events to negative load surge events in the surge events. For example, if the number of events with both characteristics exceeds 30% of the total number of events within the node, and the ratio of the two characteristics does not exceed two to one, then it is marked as mixed. A hybrid approach is used to create an event node data structure, including a node identifier, a list of event identifiers for all surge events within the node, node waveform parameters, and historical scheduling records associated with the node. The event identifiers of surge events in each connected set are sequentially written into the event identifier list of the corresponding node to associate surge events with event nodes. The historical scheduling records of the corresponding compensation resources are extracted from the raw data of each surge event. The historical scheduling records of the compensation resources include the identifiers of each energy storage unit actually put into operation when the surge event occurs, the order in which each energy storage unit is put into operation, the output weight ratio of each energy storage unit, the voltage value sequence recorded during the compensation process, and the suppression effect of this compensation.
[0089] Step S203: Calculate the mean sequence and mean slope of all surge event waveform extreme points within the event node, and combine them into waveform parameters.
[0090] In this embodiment, all surge events within an event node are extracted. The waveform extreme point sequence and change slope stored for each surge event are accessed. The waveform extreme point sequence of the surge events is aligned on the time axis by setting a uniform time grid. The set of relative times of extreme points corresponding to the surge event with the most waveform extreme points is used as the basis. If multiple events have the same number of waveform extreme points, the event with the earliest start time is selected as the benchmark. For other events with fewer waveform extreme points than the benchmark event, the voltage value is calculated at each relative time of the waveform extreme point of the benchmark event using a linear interpolation method. The interpolation is based on the phase values in the original extreme point sequence of the event. For the time and voltage values of adjacent extreme points, if the reference time is located before the start time or after the end time of the surge event, the voltage value at the start or end point of the surge event is taken. After alignment, each surge event obtains a voltage value sequence at the same time node as the reference event. The voltage values of all surge events at the same time node are added point by point and divided by the total number of events to obtain the average voltage value at each time node. The average values are arranged in chronological order to form an average value sequence. The slope values of all surge events within the event node are extracted, and the average slope value is calculated. The average value sequence and the average slope value are stored as waveform parameters of the event node in the data structure of the event node.
[0091] For example, suppose an event node contains three surge events. The waveform extreme point sequence of surge event C is a voltage value of 50.0V at a relative time of 0ms, a voltage value of 49.0V at a relative time of 2ms, and a voltage value of 49.8V at a relative time of 5ms, with a change slope of -0.20V / ms. The waveform extreme point sequence of surge event D is a voltage value of 50.0V at a relative time of 0ms, a voltage value of 49.1V at a relative time of 2.1ms, and a voltage value of 49.7V at a relative time of 5.2ms, with a change slope of -0.20V / ms. The rate is -0.18V / ms. The waveform extreme point sequence of surge event E is: voltage value of 50.0V at relative time 0ms, voltage value of 48.9V at relative time 1.9ms, voltage value of 49.9V at relative time 4.8ms, and voltage value of 50.0V at relative time 5.2ms, with a change slope of -0.19V / ms. Using the set of relative times of extreme points of event C (0ms, 2ms, and 5ms) as a unified time grid, interpolation is performed on events D and E. The voltage value of event D at 2ms is... The voltage value at 5 ms is calculated using linear interpolation at its extreme points of 0 ms and 2.1 ms, resulting in an interpolation value of 49.143 V. The voltage value at 5 ms is calculated using linear interpolation at its extreme points of 2.1 ms and 5.2 ms, resulting in an interpolation value of 49.661 V. The voltage value at 2 ms for event E is calculated using linear interpolation at its extreme points of 1.9 ms and 4.8 ms, resulting in an interpolation value of 48.934 V. The voltage value at 5 ms is calculated using linear interpolation at its extreme points of 4.8 ms and 5.2 ms, resulting in an interpolation value of 49.950 V. The voltage values of the three events at 0ms, 2ms, and 5ms are summed and divided by 3 to obtain the mean sequence: 50.0V at 0ms, 49.026V at 2ms, and 49.804V at 5ms. The average slope of the three events is -0.19V / ms. The mean sequence and the average slope are combined as the waveform parameters of the event node. By calculating the waveform parameters of the event node, the common waveform characteristics of multiple surge events within the same node can be identified, improving the accuracy and timeliness of the compensation response.
[0092] Step S204: When a new surge event is added to the event queue, calculate the cumulative sum of the differences between its waveform extreme point sequence and the waveform parameters of each event node, select the event node with the smallest total matching difference as the candidate matching node, and classify the event.
[0093] In this embodiment, the waveform extreme point sequence and slope of the newly inserted surge event are extracted. The waveform extreme point sequence is aligned according to the time grid used by the waveform parameters of each event node. That is, for each event node, the voltage value of the newly inserted surge event at these times is calculated using a linear interpolation method based on the relative time set corresponding to the mean sequence in the waveform parameters, resulting in a voltage value sequence matching the node time grid. The absolute value of the point-by-point difference between the voltage value sequence and the node mean sequence is calculated and accumulated to obtain the cumulative voltage difference. The absolute value of the difference between the slope of the newly inserted surge event and the mean slope of the node is calculated to obtain the slope difference. The cumulative voltage difference and the slope difference are weighted and summed to obtain the total matching difference between the new event and the event node. The weight of the cumulative voltage difference is set to 0.7, and the weight of the slope difference is set to 0.3. The total matching difference between the newly inserted surge event and each event node is calculated, and the event node with the smallest total matching difference is selected as the candidate matching node. If the total matching difference of the candidate matching node is less than the inclusion threshold, then the new event is included. Inserting surge events and incorporating them involves updating the event statistics within the node, including adding event identifiers and triggering a recalculation of the node's waveform parameters to integrate the waveform characteristics of the new event. If the total matching difference of candidate matching nodes is greater than or equal to the incorporation threshold, a new event node is created, the newly inserted surge event is stored, and the waveform extreme point sequence and change slope of the new event are initialized to the waveform parameters of this node. At the same time, the historical scheduling record of the new event compensation resources is stored. Through the dynamic incorporation mechanism, the event nodes in the event queue can adaptively evolve with the addition of new events, making the matching more accurate when similar surges occur. In the actual operation of the UAV flight control power supply, this mechanism enables the system to continuously learn and adapt to the surge patterns generated under different operating conditions, improve the identification speed and compensation targeting of various surges, reduce the disturbance of surges to the power supply output, and extend the stable operation time of the flight control system. The incorporation threshold is set according to the allowable range of the cumulative voltage deviation, such as 1.5 to 2 times the normal operating voltage tolerance of the flight control system, such as ±0.5V.
[0094] Step S205: Identify event node pairs with waveform similarity greater than a preset similarity threshold and event nodes with the number of surge events exceeding the upper limit, and merge or split the event node pairs and event nodes into new event nodes.
[0095] The specific steps of step S205 are as follows:
[0096] Step S2051: By calculating the cumulative sum of differences between waveform parameters of all event nodes, two event nodes whose cumulative sum of differences is less than the similarity threshold are identified as event node pairs with similar waveforms.
[0097] In this embodiment, after multiple new events are added and nodes are updated in the event queue, a similarity detection process between event nodes is periodically triggered. The detection cycle is dynamically set according to the total number of nodes in the event queue; the more nodes there are, the shorter the detection cycle is to ensure real-time optimization of the clustering structure. The mean sequences of any two event nodes are aligned according to a unified time grid. During the alignment process, linear interpolation is performed on the sequence with fewer mean sequences to obtain the interpolated baseline mean sequence. The cumulative sum of the differences between the two sequences is calculated, and the absolute value of the difference between the mean slopes of the two nodes is also calculated to obtain the slope difference. The cumulative sum of the differences and the slope difference are then compared. Weighted summation is performed to obtain the waveform similarity between two event nodes. The weight of the cumulative difference sum is set to, for example, 0.7, and the weight of the slope difference is set to, for example, 0.3. The waveform similarity is compared with a similarity threshold. The similarity threshold is dynamically adjusted according to the overall fluctuation level of the event queue. The value is taken as the lower quartile value of the total similarity difference distribution between all nodes. Nodes with waveform similarity less than the similarity threshold are identified as event node pairs with similar waveforms. The detection is triggered periodically based on the number of events or the size of the nodes. For example, a detection is triggered every time 5 new event nodes are added or every 10 new surge events are added to the queue.
[0098] Step S2052: Extract surge events from the event node pairs, merge and associate them with a newly created initial event node, calculate its waveform parameters, and mark it as a state to be verified for capacity.
[0099] In this embodiment, for event node pairs with similar waveforms, the event identifier lists of all associated surge events are extracted. A new surge event set is generated by merging and deduplicating the data. A new initial event node is created and assigned a temporary initial node identifier. The initial node identifier is generated by combining the merge operation identifier and the current system timestamp. The merged event identifier list is associated with the event identifier list of the initial event node. The waveform parameters of the surge events within the initial event node are calculated using the same waveform parameter calculation method. The initial event node is marked as pending capacity verification, suspending its participation in similarity detection and matching operations, and awaiting the capacity verification results to determine its final state. By establishing intermediate nodes in the pending capacity verification state, data integration and parameter calculation can be completed before the merge operation takes effect, avoiding frequent backtracking and reconstruction due to capacity overruns after direct merging, thus improving the stability and execution efficiency of the node merging operation.
[0100] Step S2053: Count the number of surge events associated with the initial event node. If the number of surge events does not exceed the preset capacity limit, convert the initial event node into an event node and mark it as verified.
[0101] In this embodiment, the number of surge events is counted for each initial event node in the pending capacity verification state. The number of surge events is compared with the capacity limit of the event node. If the number of surge events is less than or equal to the capacity limit, the initial event node is determined to meet the capacity requirements and can be officially put into use. The status flag of the initial event node is changed from pending capacity verification to verified status, and its temporary identifier is replaced with the official event node identifier. The official identifier is regenerated according to the node type and global sequential number. The official event node after the status change is written to the event node storage area, and the node index table of the event queue is updated so that it can participate in subsequent new event matching and periodic similarity detection. At the same time, two original event node pairs with similar waveforms are deleted to complete the node merging operation. By setting the capacity limit, the number of surge events in the event node can be controlled, avoiding a single node from becoming bloated and large due to excessive merging. The capacity limit is set comprehensively based on the total event scale expected to be carried by the event queue and the system memory resource limit to ensure that the number of events in each node is both statistically representative and does not lead to excessive computational load.
[0102] Step S2054: If the number of surge events exceeds the preset capacity limit, stop the merging operation and backtrack to the original event node before the merging for recording optimization.
[0103] In this embodiment, for initial event nodes where the number of surge events exceeds the capacity limit, it is determined that the merging operation will cause node overload. The merging process is terminated, and all resources occupied by the initial event node are released, including its event identifier list and temporary waveform parameters. Its state is rolled back to the state before the merging operation, that is, the original two waveform-similar event node pairs are restored to their independent existence in the event node storage area, and their original node identifiers, waveform parameters, and event identifier lists remain unchanged. At the same time, the original event nodes involved in the merging operation are recorded and optimized. The optimization method is to check whether there are edge events with large waveform feature differences in the event identifier list of each original event node. If so, these edge events are marked as events to be migrated. During the next periodic detection, they will be attempted to be assigned to other more similar event nodes. The waveform parameters of the original event nodes are recalculated, and redundant records with consistently poor suppression effects in the historical scheduling records within the node are removed. Through the backtracking and optimization mechanism, it is possible to prevent damage to clustering quality due to excessive merging while ensuring that the node capacity is controllable, thereby improving the data purity and storage efficiency of existing nodes.
[0104] exist Figure 3 In this context, two event nodes can be merged into a new event node, and the merged event node can also be split back into two event nodes. Bidirectional arrows are used to indicate the merging and splitting relationships.
[0105] Step S3: Based on the current surge event, select the associated compensation resource from the historical scheduling records of the corresponding node in the multi-layer search structure and control the compensation input. The compensation resource includes energy storage units of multiple flight control power supplies with different response speeds and energy capacities.
[0106] The specific steps of step S3 are as follows:
[0107] Step S301: Based on the current surge event, select an energy storage unit with a different response speed and energy capacity from the historical scheduling records of the event node to which the multi-layer search structure belongs, as a compensation resource.
[0108] In this embodiment, when a new surge event is assigned to an event node, its stored historical scheduling records are read. These records include the identifiers of each energy storage unit invoked during previous surge events of the same type, the response speed level of each unit, the energy capacity level of each unit, and the actual deployment order and output weight. The identifiers of the energy storage units that have appeared in the historical scheduling records are extracted to form a candidate energy storage unit set. For each energy storage unit in the candidate energy storage unit set, its inherent response speed and energy capacity are read. The response speed is determined based on the delay time from receiving the instruction to starting to output power. The energy capacity is determined based on the current remaining available power of the energy storage unit or the current stored energy of the supercapacitor. The candidate energy storage units are sorted from high to low response speed to generate a response speed sorting sequence. At the same time, they are sorted from large to small energy capacity to generate an energy capacity sorting sequence. A preset number of energy storage units are selected from the beginning of the response speed sorting sequence and a preset number of energy storage units are selected from the beginning of the energy capacity sorting sequence. The identifiers of the two selected energy storage units are merged and deduplicated to determine the compensation resources.
[0109] Step S302: Detect the waveform change trend of the current surge event, and dynamically adjust the order of input and output weight ratio of each energy storage unit in the selected compensation resources according to the waveform change trend.
[0110] In this embodiment, the specific steps of step S302 are as follows:
[0111] Step S3021: Calculate the instantaneous rate of change sequence of the current surge event as the waveform change trend, traverse the historical response records of each energy storage unit in the compensation resources, and perform normalized cumulative sum calculation on the corresponding rate of change sequence and the instantaneous rate of change sequence to obtain the matching degree.
[0112] In this embodiment, before performing compensation for the current surge event, a real-time voltage sampling sequence from the start time to the current time is extracted. The voltage difference between adjacent sampling points is divided by the sampling interval to obtain the instantaneous rate of change at each sampling moment. These are then arranged to form the instantaneous rate of change sequence of the current surge event, which serves as the waveform trend to represent the speed and direction of voltage change over time from the start time to the current time. Energy storage units are sequentially retrieved from the compensation resources, and their historical response records are accessed. Each historical response record contains the waveform rate of change sequence of the corresponding surge event recorded during previous compensation. The waveform rate of change sequence records the voltage rate of change process from the moment the energy storage unit is put into operation until the end of the compensation. For each energy storage unit, a sequence is selected from its historical response record list that corresponds to the current surge event. The record with the closest instantaneous rate of change sequence length for the surge event is used to align the two rate of change sequences along the time axis. The alignment method is based on the start time of the current instantaneous rate of change sequence, while the start time of the historical record sequence is set to zero. The absolute value of the difference in rate of change between the two sequences at the same moment is calculated. All absolute values of the difference are summed to obtain the total rate of change deviation value. The reciprocal of the total rate of change deviation value is then normalized to between 0 and 1 to obtain the matching degree of the energy storage unit relative to the current surge event. The closer the matching degree is to 1, the more the response characteristics shown when dealing with similar waveform change trends in the past match the current surge. By calculating the matching degree based on historical response records, the energy storage unit that is best suited to deal with the waveform change characteristics of the current surge can be selected from the compensation resources, avoiding blind deployment that leads to response lag or insufficient output, and improving the pertinence and effectiveness of compensation actions.
[0113] Step S3022: Generate an input sequence based on matching degree, and adjust the energy storage unit with the highest matching degree to the first position of the sequence, and the energy storage unit with the lowest matching degree to the last position of the sequence.
[0114] In this embodiment, the matching degree of energy storage units is associated with their identifiers to form a matching degree identifier list. The list is then sorted in descending order, with the energy storage unit with the highest matching degree at the top and the second highest at the bottom. The sorted list is then converted into an input sequence for this compensation. The order of elements in the input sequence determines the actual input order. The energy storage unit with the highest matching degree will be input first when compensation starts, and the energy storage unit with the lowest matching degree will be input last. The input sequence is written into the temporary scheduling record for the current compensation execution, and the position index of each energy storage unit in the sequence is marked. Through the matching degree-based sorting mechanism, the energy storage unit with the most experience in responding to the current surge waveform change trend is prioritized for intervention, which can suppress voltage fluctuations in the early stages of a surge. Units with lower matching degrees serve as backups to avoid introducing additional disturbances due to mismatched response characteristics, thereby improving the stability and efficiency of the entire compensation process.
[0115] Step S3023: Based on the instantaneous rate of change of the waveform trend, the output weight of each energy storage unit in the input sequence is corrected and normalized to obtain the output weight ratio.
[0116] In this embodiment, the latest value of the instantaneous rate of change sequence of the current surge event is used as an indicator of the severity of waveform change at the current moment. All energy storage units in the deployment sequence are traversed, and their response speed level coefficient and energy capacity level coefficient are set. The response speed level coefficient is determined based on the time from receiving the instruction to full power output; the shorter the time, the larger the coefficient. The energy capacity level coefficient is determined based on the proportion of the unit's current remaining usable energy to its rated capacity; the higher the proportion, the larger the coefficient. The weighting of the response speed level coefficient and energy capacity level coefficient is dynamically adjusted according to the magnitude of the current instantaneous rate of change. A large absolute value of the instantaneous rate of change indicates a surge change. If the surge is severe, increase the weight of the response speed level coefficient and decrease the weight of the energy capacity level coefficient. When the absolute value of the instantaneous rate of change is small, it indicates that the surge is becoming gentler. In this case, increase the weight of the energy capacity level coefficient and decrease the weight of the response speed level coefficient. Sum the two adjusted coefficients to obtain the output weight of each energy storage unit. Sum all the output weight values to obtain the total weight value. Divide the output weight value of each energy storage unit by the total weight value to obtain the normalized output weight ratio. Ensure that the sum of the ratios of all energy storage units is 1. Distribute the output weight ratios to each energy storage unit in the order of the input sequence and write it into the temporary scheduling record of the current compensation execution.
[0117] Step S3024: Write the input sequence and output weight ratio into the current compensation execution process, record the voltage value during the compensation process, and add the instantaneous rate of change sequence and the output weight of each energy storage unit to the corresponding response record.
[0118] In this embodiment, the identifiers of each energy storage unit in the input sequence are sequentially written into the scheduling register of the current compensation execution, and the corresponding output weight ratios are written into the power allocation registers of each energy storage unit. This enables the power control circuit to drive each energy storage unit to engage in compensation in a predetermined order and ratio. During the compensation execution process, the real-time voltage value of the UAV flight control power supply and its corresponding timestamp are collected at a fixed sampling frequency to form the voltage record sequence for this compensation. After the compensation is completed, the instantaneous rate of change sequence, the actual input sequence of each energy storage unit, the actual output weight value at each moment, and the voltage record sequence recorded during this compensation process are encapsulated and appended to the historical response record of the energy storage units participating in the compensation in chronological order. By combining the input execution process with data recording, the compensation process completes the voltage stabilization task while accumulating response data, thereby improving the UAV flight control power supply's ability to cope with similar surges in the future.
[0119] Step S303: Update the energy storage unit input sequence and output weight records executed in the current compensation process to the historical scheduling record of the event node to which the current surge event belongs.
[0120] In this embodiment, the input sequence for this compensation is read from the scheduling register, and the output weight corresponding to each moment is read from the power allocation register. The input sequence and output weight are combined to form the scheduling record for this compensation. Voltage fluctuation characteristics during the compensation process are extracted from the voltage record sequence, and the suppression effect of this compensation is calculated. The suppression effect is determined comprehensively based on the cumulative deviation of voltage from the ideal value and the duration of fluctuation during the compensation period. According to the historical scheduling record in the event node to which the current surge event belongs, the scheduling record for this compensation and the suppression effect are added as new records to the historical scheduling record. The historical scheduling record list is reordered from best to worst suppression effect, and the top few records with the best effect are retained as the valid historical scheduling records of the node. The number of records is set proportionally according to the total number of events in the node, for example, 20% of the total number of event nodes. The remaining inferior records are removed. Through this dynamic update mechanism, each event node maintains the optimal compensation experience for this type of surge, improving the compensation accuracy and adaptability of the UAV flight control power supply.
[0121] Step S4: Based on the suppression effect of the voltage waveform during this compensation process, correct the historical scheduling record and control the output of the UAV flight control power supply.
[0122] The specific steps of step S4 are as follows:
[0123] Step S401: Extract the voltage value recorded during the compensation process, calculate the cumulative deviation and deviation duration between it and the preset ideal stable voltage, and determine the suppression effect of this compensation based on the cumulative deviation and deviation duration.
[0124] In this embodiment, after the compensation is completed, the voltage recording sequence is extracted. Based on the preset ideal stable voltage value, which is the rated output voltage of the flight controller power supply under undisturbed conditions, the absolute value of the difference between each element in the voltage recording sequence and the ideal stable voltage value is calculated to obtain the instantaneous deviation at each moment. All instantaneous deviations are accumulated to obtain the total cumulative deviation during the compensation period, which reflects the overall degree of voltage deviation from the ideal value during the compensation process. At the same time, the number of consecutive sampling points in the voltage recording sequence where the instantaneous deviation is continuously greater than the deviation tolerance threshold is counted, and multiplied by the sampling interval time to obtain the duration of voltage deviation, i.e., the deviation duration. The total cumulative deviation and the deviation duration are weighted and calculated, with the total cumulative deviation accounting for 70% and the deviation duration accounting for 30%. The weighted result is the suppression effect of this compensation. The smaller the total cumulative deviation and the deviation duration, the more effective the voltage correction. Stability is key; therefore, a smaller suppression effect value indicates a better compensation effect. The closer the voltage is to the ideal value and the shorter the out-of-range time, the better. The deviation tolerance threshold is set according to the voltage sensitivity index of the flight control power supply. It is usually taken as ±5% of the normal operating voltage range of the flight control chip as the reference value. For example, for a rated voltage of 50V, the threshold is set between ±0.25V and ±0.5V. The disturbance-free state refers to the working state of the UAV flight control power supply system under rated load and with a relatively stable external electromagnetic environment and no sudden load changes or surge impacts, rather than the ideal state without any electrical fluctuations. Specifically, it is defined as the average value of the rated output voltage obtained by continuously collecting the power supply output voltage for a period of time during the UAV power-on self-test or ground standby phase, when the flight control system is in idle mode, the motors are not rotating, and the communication module has no sudden data transmission or reception. This average value is used as the reference value of the rated output voltage.
[0125] For example, assuming the voltage sampling sequence recorded during this compensation process contains 10 sampling points with a sampling interval of 0.001s, a preset ideal stable voltage value of 50.0V, and a deviation tolerance threshold of 0.2V, the voltage values at each sampling point are 50.3V, 50.5V, 50.2V, 49.8V, 49.6V, 49.7V, 50.1V, 50.4V, 50.2V, and 50.0V respectively. The instantaneous deviation at each point is calculated to be 0.3V, 0.5V, 0.2V, 0.2V, 0.4V, 0.3V, and 0.1V. The sampling points were 0.4V, 0.2V, and 0.0V, with a total cumulative deviation of 2.6V. There were five sampling points with instantaneous deviations greater than 0.2V: point 1 (0.3V), point 2 (0.5V), point 5 (0.4V), point 6 (0.3V), and point 8 (0.4V). Consecutive deviations need to be counted separately. Points 1 and 2 showed consecutive deviations for 0.002 seconds; points 5 and 6 showed consecutive deviations for 0.002 seconds; point 8 showed a single deviation for 0.001 seconds. The total deviation duration was 0.005 seconds. The total cumulative deviation was 2.6V. 0.7 yields 1.82, with a deviation duration of 0.005s. 0.3 equals 0.0015, and the weighted sum gives a suppression effect of 1.8215.
[0126] Step S402: Associate the suppression effect with the historical scheduling record of the event node to which the current surge event belongs, sort them by value, and extract the best suppression effect as the suppression benchmark.
[0127] In this embodiment, the suppression effect is associated with the scheduling record of this compensation. Based on the historical scheduling record of the event node to which the current surge event belongs, the scheduling record of this compensation and its suppression effect are inserted as a new record into the historical scheduling record. The historical scheduling record with the smallest suppression effect value is taken as the optimal suppression effect record and used as the suppression benchmark value of the event node to represent the reference basis when generating scheduling parameters. The upper limit of the record capacity is, for example, 20% of the total number of node events, such as 10-30 records.
[0128] Step S403: Based on the input sequence and output weight ratio corresponding to the suppression benchmark, calculate the average input frequency and average weight ratio of each energy storage unit, and generate the scheduling parameters for the corresponding surge event.
[0129] In this embodiment, the input sequence and output weight ratio of the corresponding energy storage unit are extracted from the optimal suppression effect record. The number of times each energy storage unit appears in the input sequence is counted to obtain the input frequency value. At the same time, the output weight ratio of each energy storage unit in the optimal suppression effect record is extracted. The most recently valid historical scheduling record stored in the event node to which the current surge event belongs is accessed. The most recently valid historical scheduling record represents the historical scheduling record retained after the suppression effect is sorted. The input sequence and output weight ratio of the energy storage unit are extracted from it. The input frequency of the same energy storage unit in all valid records is accumulated and divided by the number of records to obtain the average input frequency. The output weight ratio of the same energy storage unit in all valid records is accumulated and divided by the number of records to obtain the average weight ratio. The average input frequency and the average weight ratio are combined to generate the scheduling parameters of the event node for the corresponding surge event. Each energy storage unit in the scheduling parameters corresponds to a set of average input frequency and average weight ratio. By generating scheduling parameters based on historical best records and statistical averages, over-reliance on a single accidental best record can be avoided.
[0130] Step S404: Set the recursive update weight of the voltage reference value of the UAV flight control power supply according to the scheduling parameters, and write the voltage reference value into the power supply control loop for output control.
[0131] The specific steps of step S404 are as follows:
[0132] Step S4041: Extract the average weight ratio of each energy storage unit from the scheduling parameters, and generate recursive updated weights through merging calculations.
[0133] In this embodiment, the average weight ratio of each energy storage unit is read from the scheduling parameters. Each average weight ratio reflects the average output ratio of that unit in the historical best scheduling record. The sum of the average weight ratios is obtained by accumulating the average weight ratios. The average weight ratio of each unit is divided by the sum of the average weight ratios to obtain the relative contribution coefficient of each unit. The weighted average is then calculated. The weight of the weighted average is determined according to the response speed level of each unit in the compensation resources. The faster the response speed, the higher the weight is assigned. Finally, a comprehensive coefficient between 0 and 1 is calculated as the recursive update weight. The recursive update weight is used for the dynamic adjustment of the subsequent voltage reference value. Its value determines the proportion of the latest voltage sample value in the reference value update. The larger the value, the faster the reference value is updated and the stronger the tracking of voltage fluctuations.
[0134] For example, suppose the scheduling parameters of an event node include three energy storage units. The average weight ratio of energy storage unit S1 is 0.2, the average weight ratio of energy storage unit S2 is 0.5, and the average weight ratio of energy storage unit S3 is 0.3. First, the three are summed to obtain a total of 1.0. The relative contribution coefficients of each unit are 0.2, 0.5, and 0.3. According to the response speed level of each energy storage unit, the response speed level coefficient of S1 is 0.8, that of S2 is 0.6, and that of S3 is 0.4. The relative contribution coefficients of each unit are then compared with the response speed... After multiplying and summing the grade coefficients, we get 0.2×0.8+0.5×0.6+0.3×0.4=0.58. Dividing 0.58 by the average value of the response speed grade coefficients ((0.8+0.6+0.4) / 3=0.6), we get 0.58 / 0.6≈0.967. This value is the recursive update weight. The closer it is to 1, the more it indicates that in this surge event type, the fast response characteristics of the energy storage unit require the voltage reference value to have a high following speed to the latest sampled value in order to maintain coordination and consistency with the compensation action.
[0135] Step S4042: Collect the compensated voltage value, calculate the voltage reference value by combining the recursive update weight, write it into the power control loop to calculate the output voltage difference, and control the conduction time of the power switch according to the output voltage difference.
[0136] In this embodiment, the voltage value at the output terminal of the UAV flight control power supply is acquired at a fixed sampling frequency after surge compensation to obtain the latest voltage sampling value. Based on the voltage reference value currently being used by the UAV flight control power supply, where the voltage reference value is the reference value updated at the previous moment, the recursive update weight is multiplied by the latest voltage sampling value. The difference between 1 and the recursive update weight is multiplied by the voltage reference value at the previous moment, and the two products are added to obtain the updated voltage reference value, which is used as the desired output voltage. The updated voltage reference value is written into the setpoint register of the power control loop. At the same time, the current actual output voltage value is read from the feedback terminal, and the difference between the actual output voltage and the voltage reference value is calculated to obtain the desired output voltage. The output voltage difference is input to the PWM modulator of the power control loop. The on-time ratio of the power switch is adjusted according to the magnitude and direction of the output voltage difference. If the actual output voltage is less than the voltage reference value, the on-time is increased to increase the output voltage. If the actual output voltage is greater than the voltage reference value, the on-time is decreased to decrease the output voltage. This allows the actual output voltage to quickly track and stabilize near the updated voltage reference value. This ensures that the UAV flight control power supply can adaptively correct the voltage reference after each surge event, eliminating the slight offset that may be introduced by the compensation process. This improves the reliability and stability of the flight control system power supply, and is especially suitable for UAV flight scenarios that frequently encounter load changes.
[0137] Example 2
[0138] Please see Figure 4 One embodiment of the present invention is a surge-resistant unmanned aerial vehicle (UAV) flight control power output stabilization control system, comprising a capture module, an event processing module, a scheduling module, and a feedback optimization module.
[0139] The capture module is used to acquire the voltage and current values of the UAV flight control power supply, identify the start time and polarity of the surge by the direction and amplitude of voltage value changes, and determine the surge characteristics based on the current value and voltage deviation depth.
[0140] The event processing module is used to capture surge events based on surge characteristics and establish an event queue. It then uses an ant colony algorithm to cluster the surge events in the event queue based on waveform characteristics, constructs a multi-layer search structure, and groups surge events with similar waveform characteristics into the same node.
[0141] The scheduling module is used to select the associated compensation resources from the historical scheduling records of the corresponding nodes in the multi-layer lookup structure based on the current surge event and control the compensation input. The compensation resources include energy storage units of multiple flight control power supplies with different response speeds and energy capacities.
[0142] The feedback optimization module is used to correct historical scheduling records and control the output of the UAV flight control power supply based on the suppression effect of the voltage waveform during the compensation process.
[0143] In addition, the parts of the technical solutions provided in the embodiments of this application that are consistent with the implementation principles of the corresponding technical solutions in the prior art have not been described in detail, so as to avoid excessive elaboration.
[0144] The embodiments of the present invention have been described above with reference to the accompanying drawings. However, the present invention is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other modifications under the guidance of the present invention without departing from the spirit and scope of the present invention, and all of these modifications are within the scope of protection of the present invention.
Claims
1. A surge-resistant unmanned aerial vehicle (UAV) flight control power supply output stabilization control algorithm, characterized in that, include: The voltage and current values of the UAV flight control power supply are obtained. The start time and polarity of the surge are identified by the direction and amplitude of voltage value changes. The surge characteristics are judged based on the current value and voltage deviation depth. Surge events are captured based on surge characteristics and an event queue is established. The surge events in the event queue are clustered by waveform features using the ant colony algorithm. A multi-layer search structure is constructed to group surge events with similar waveform features into the same node. Based on the current surge event, select the associated compensation resources from the historical scheduling records of the corresponding nodes in the multi-layer search structure and control the compensation input. The compensation resources include energy storage units of multiple flight control power supplies with different response speeds and energy capacities. Based on the suppression effect of the voltage waveform during this compensation process, the historical scheduling records are corrected and the output of the UAV flight control power supply is controlled.
2. The surge-resistant UAV flight control power output stabilization control algorithm according to claim 1, characterized in that, The process of acquiring the voltage and current values of the UAV flight control power supply, identifying the start time and polarity of the surge by the direction and amplitude of voltage changes, and determining the surge characteristics based on the current value and voltage deviation depth includes: The voltage and current values of the UAV flight control power supply are obtained. By measuring the sign and magnitude of the voltage difference between consecutive sampling points, the start time and polarity of the rising or falling edge of the voltage value are determined. The voltage value at the beginning of the voltage rise or fall is marked as the surge initiation voltage value. The difference between the voltage values of subsequent sampling points and the surge initiation voltage value is accumulated to obtain the real-time updated voltage deviation depth. The voltage deviation depth is compared synchronously with the current value change trend at the corresponding moment. If the current value increases synchronously when the voltage deviation depth increases negatively, it is confirmed as a positive load surge characteristic. If the current value decreases synchronously when the voltage deviation depth changes from positive to negative, it is confirmed as a reverse load surge characteristic.
3. The surge-resistant UAV flight control power output stabilization control algorithm according to claim 2, characterized in that, The process of capturing surge events based on surge characteristics and establishing an event queue, then using an ant colony algorithm to cluster the surge events in the event queue based on waveform features, constructing a multi-layer search structure, and grouping surge events with similar waveform characteristics into the same node includes: Initialize an empty event queue structure, extract the start and end times, waveform extreme point sequence, and slope of the events based on the surge characteristics to generate surge events, and insert them into the event queue in the order of their occurrence; The waveform extreme point sequence and change slope of each surge event in the event queue are extracted to calculate the waveform similarity between surge events. Based on the waveform similarity, event nodes are constructed using the ant colony algorithm, and each event node is associated with a group of surge events with similar waveforms. Within each event node, calculate the mean sequence of extreme points of the waveform for all surge events and the mean of the slope of change, and combine them into waveform parameters; When a new wave event is added to the event queue, the cumulative sum of the differences between its waveform extreme point sequence and the waveform parameters of each event node is calculated. The event node with the smallest total matching difference is selected as the candidate matching node for event classification. Identify event node pairs where the waveform similarity between event nodes is greater than a preset similarity threshold and event nodes where the number of surge events exceeds the upper limit, and merge or split the event node pairs and event nodes into new event nodes.
4. The surge-resistant UAV flight control power output stabilization control algorithm according to claim 3, characterized in that, The waveform extreme point sequence and slope of each surge event in the extracted event queue are used to calculate the waveform similarity between surge events. Based on the waveform similarity, event nodes are constructed using an ant colony algorithm. Each event node is associated with a group of surge events with similar waveforms, including: Extract the waveform extreme point sequence and change slope of each surge event, calculate the cumulative sum of the differences between the waveform extreme point sequences of any two surge events and the difference between the change slopes, and normalize them. Then, take the reciprocal of the sum to obtain the waveform similarity. Initialize the pheromone concentration of all surge events to the same value, use surge events as recording nodes and waveform similarity as heuristic information, start from randomly selected recording nodes, use ant colony algorithm to find the next unvisited node and calculate the pheromone concentration; Statistically analyze the pheromone concentration between each surge event and other surge events, identify surge events with pheromone concentrations greater than a preset concentration threshold as surge events in the same group, and merge them to generate event nodes; Assign a unique node identifier to each event node, associate surge events belonging to the same event node with the corresponding node, and record the historical scheduling records of the compensation resources corresponding to each surge event.
5. The surge-resistant UAV flight control power output stabilization control algorithm according to claim 4, characterized in that, The process of identifying event node pairs where the waveform similarity between event nodes is greater than a preset similarity threshold and event nodes where the number of surge events exceeds the upper limit, and merging or splitting event node pairs and event nodes into new event nodes, includes: By calculating the cumulative sum of differences between waveform parameters of all event nodes, two event nodes whose cumulative sum of differences is less than the similarity threshold are identified as event node pairs with similar waveforms. Surge events extracted from event node pairs are merged and associated with a newly created initial event node, its waveform parameters are calculated, and it is marked as a state to be verified for capacity. Count the number of surge events associated with the initial event node. If the number of surge events does not exceed the preset capacity limit, convert the initial event node into an event node and mark it as verified. If the number of surge events exceeds the preset capacity limit, the merging operation will be stopped and the original event node before the merge will be traced back for recording optimization.
6. The surge-resistant UAV flight control power output stabilization control algorithm according to claim 5, characterized in that, The process involves selecting associated compensation resources from the historical scheduling records of the corresponding nodes in the multi-layer lookup structure based on the current surge event and controlling the compensation input. These compensation resources include energy storage units of multiple flight control power supplies with different response speeds and energy capacities, including: Based on the historical scheduling records of the event nodes to which the current surge event belongs in the multi-layer search structure, select energy storage units with different response speeds and energy capacities as compensation resources. The waveform change trend of the current surge event is detected, and the order of input and output weight ratio of each energy storage unit in the selected compensation resources are dynamically adjusted according to the waveform change trend. Update the records of the energy storage unit commissioning sequence and output weights executed during the current compensation process to the historical scheduling record of the event node to which the current surge event belongs.
7. The surge-resistant UAV flight control power output stabilization control algorithm according to claim 6, characterized in that, The detection of the waveform change trend of the current surge event, and the dynamic adjustment of the input sequence and output weight ratio of each energy storage unit in the selected compensation resources based on the waveform change trend, includes: The instantaneous rate of change sequence of the current surge event is calculated as the waveform change trend. The historical response records of each energy storage unit in the compensation resource are traversed, and the corresponding rate of change sequence and the instantaneous rate of change sequence are normalized and accumulated to calculate the matching degree. The energy storage unit with the highest matching degree is generated into an input sequence, and the energy storage unit with the lowest matching degree is moved to the end of the sequence. Based on the instantaneous rate of change of the waveform trend, the output weight of each energy storage unit in the input sequence is corrected and normalized to obtain the output weight ratio. Write the input sequence and output weight ratio into the current compensation execution process, record the voltage value during the compensation process, and add the instantaneous rate of change sequence and the output weight of each energy storage unit to the corresponding response record.
8. The surge-resistant UAV flight control power supply output stabilization control algorithm according to claim 7, characterized in that, The process of correcting historical scheduling records and controlling the output of the UAV flight control power supply based on the suppression effect of the voltage waveform during this compensation process includes: Extract the voltage values recorded during the compensation process, calculate the cumulative deviation and deviation duration between them and the preset ideal stable voltage, and determine the suppression effect of this compensation based on the cumulative deviation and deviation duration. The suppression effect is associated with the historical scheduling record of the event node to which the current surge event belongs, and sorted by numerical value. The optimal suppression effect is then extracted as the suppression benchmark. Based on the input sequence and output weight ratio corresponding to the suppression benchmark, the average input frequency and average weight ratio of each energy storage unit are calculated to generate the scheduling parameters for the corresponding surge event. The recursive update weight of the voltage reference value of the UAV flight control power supply is set according to the scheduling parameters, and the voltage reference value is written into the power supply control loop for output control.
9. The surge-resistant UAV flight control power output stabilization control algorithm according to claim 8, characterized in that, The step of setting the recursive update weight of the voltage reference value of the UAV flight control power supply according to the scheduling parameters, and writing the voltage reference value into the power supply control loop for output control includes: The average weight ratio of each energy storage unit is extracted from the scheduling parameters, and the weight is generated by merging and calculating. The compensated voltage value is collected, and the voltage reference value is calculated by recursively updating the weight. This value is then written into the power control loop to calculate the output voltage difference. The on-time control of the power switch is then performed based on the output voltage difference.
10. A surge-resistant UAV flight control power output stabilization control system, used to implement the surge-resistant UAV flight control power output stabilization control algorithm as described in any one of claims 1-9, characterized in that, It includes a capture module, an event handling module, a scheduling module, and a feedback optimization module: The capture module is used to acquire the voltage and current values of the UAV flight control power supply, identify the start time and polarity of the surge by the direction and amplitude of voltage value changes, and determine the surge characteristics based on the current value and voltage deviation depth. The event processing module is used to capture surge events based on surge characteristics and establish an event queue. It then uses an ant colony algorithm to cluster the surge events in the event queue based on waveform characteristics, constructs a multi-layer search structure, and groups surge events with similar waveform characteristics into the same node. The scheduling module is used to select the associated compensation resources from the historical scheduling records of the corresponding nodes in the multi-layer lookup structure according to the current surge event and control the compensation input. The compensation resources include energy storage units of multiple flight control power supplies with different response speeds and energy capacities. The feedback optimization module is used to correct historical scheduling records and control the output of the UAV flight control power supply based on the suppression effect of the voltage waveform during the compensation process.
Citation Information
Patent Citations
Short-time frequent jump current event clustering identification method based on collector
CN121071517A
Surge voltage suppression system and control method thereof
CN121618403A