Unmanned aerial vehicle flight data generation method based on timing feature perception and distribution guidance
By employing a method for generating UAV flight data based on temporal feature perception and distribution guidance, and utilizing a conditional variational autoencoder and the Mamba selective state-space model, the distribution bias problem in UAV flight data generation under small sample conditions is solved, achieving high-quality data generation and improving flight safety and mission efficiency.
Patent Information
- Application Number
- CN202611695442.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-10-30
- Publication Date
- 2026-11-27
AI Technical Summary
Existing time series generation models struggle to accurately capture the multi-scale dynamic dependence, periodic oscillation patterns, and abrupt transitions in UAV flight data under small sample conditions. Distributional discrepancies exist between generated data and real flight data, resulting in significant deviations in the statistical characteristics of generated samples from real data, which impacts flight safety and mission efficiency.
A method for generating UAV flight data based on temporal feature perception and distribution guidance is adopted. A conditional coding module is constructed through a conditional variational autoencoder. Combined with hybrid loss constraints, high-quality conditional feature extraction and conditional guidance are achieved. A trend-period-peak three-branch temporal feature coding structure is designed. Combining the Mamba selective state-space model and diffusion model, a distribution correction strategy driven by KL divergence is introduced to generate high-quality UAV flight data.
Accurately learning the potential distribution of flight conditions and macroscopic flight state variables under small sample conditions significantly improves the distribution consistency and authenticity of the generated data, enhances the quality of UAV flight data, and provides reliable data support for flight safety assessment and fault prediction.
Smart Images

Figure CN123178790A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data generation, and in particular to a method for generating UAV flight data based on temporal feature perception and distribution guidance. Background Technology
[0002] With the increasing demand for quadcopter drones in complex environments, data-driven flight status prediction has become a key technology for ensuring flight safety and improving mission efficiency. High-quality, large-scale flight time-series data is the core foundation supporting the performance of such prediction models. However, in actual engineering deployments, drones generally face a serious small sample problem: on the one hand, the test flight cycle of new drone models is short and costly, resulting in a very limited amount of historical flight data that can be accumulated; on the other hand, extreme flight conditions such as strong winds and turbulence, sudden wind interference, and high-maneuverability sharp turns have a low probability of occurring in actual missions but are crucial to flight safety, leading to an extreme scarcity of sample data in such critical scenarios, and the data distribution exhibits a clear long-tail characteristic.
[0003] Existing time series generation models (such as those based on GANs (Generative Adversarial Networks), VAEs (Variational Autoencoders), or standard diffusion models) have significant shortcomings when faced with the aforementioned small sample conditions. These models struggle to accurately capture the inherent multi-scale dynamic dependencies, periodic oscillations, and abrupt transitions inherent in flight data. A large distributional deviation exists between the generated data and real flight data, especially in extreme operating conditions where the statistical characteristics of the generated samples deviate severely from the real data. Using such distorted generated data to enhance the training of downstream flight condition prediction models not only fails to effectively improve the model's generalization ability but also introduces incorrect distributional priors, leading to a sharp drop in prediction accuracy and even posing safety risks.
[0004] Therefore, there is a need to provide a method for generating UAV flight data based on temporal feature perception and distribution guidance in order to improve the quality of UAV flight data generation. Summary of the Invention
[0005] This invention provides a method for generating UAV flight data based on temporal feature perception and distribution guidance, comprising: acquiring a sequence of UAV flight observations; using Gaussian noise as initial input and combining the UAV flight observation sequence as conditions, sequentially performing denoising operations at multiple diffusion time steps until the diffusion time step is 0, thereby generating UAV flight data. Each denoising operation includes: generating a time step code based on the current diffusion time step; generating conditional features based on conditional information; concatenating the time step code and conditional features along the feature dimension and generating conditional guidance features through a linear projection layer; generating the input sequence for the current diffusion time step based on the denoised output of the previous diffusion time step; performing temporal decomposition and feature extraction on the input sequence to generate multidimensional temporal features; element-wise weighted fusion of the conditional guidance features and multidimensional temporal features to generate a temporal code output feature; predicting the noise value corresponding to the current diffusion time step based on the temporal code output feature; and generating the denoised output corresponding to the current diffusion time step based on the noise value and the denoised output of the previous diffusion time step.
[0006] Further, the conditional information includes discrete class conditions and flight time-series conditions, wherein the discrete class conditions include flight condition type labels, and the flight time-series conditions are related to flight state variables; generating conditional features based on the conditional information includes: using one-hot encoding to generate a one-hot vector based on the flight condition type labels of the UAV flight observation sequence; using a conditional variational autoencoder to generate a latent feature vector based on the flight time-series conditions in the UAV flight observation sequence; copying and expanding the one-hot vector along the time dimension into a feature matrix of the same length as the flight time-series conditions, then concatenating it with the latent feature vector, and mapping it through a conditional feature embedding projection layer to generate conditional features.
[0007] Furthermore, the conditional variational autoencoder includes an encoder, a reparameterization layer, and a decoder; wherein, the encoder is used to accept the normalized flight time series conditions and output the mean and log-variance of the conditional latent distribution; the reparameterization layer is used to sample noise based on the standard normal distribution, the mean and log-variance of the conditional latent distribution, and generate a latent feature vector; and the decoder is used to reconstruct the input flight time series conditions during the training phase to minimize the reconstruction error.
[0008] Furthermore, the loss function used to train the conditional variational autoencoder is: , in, The loss of the conditional variational autoencoder, To reconstruct the loss, for Divergence loss, For multi-scale MMD loss, For trend consistency loss, For smoothness regularization loss, , , and is a coefficient.
[0009] Furthermore, the input sequence is subjected to temporal decomposition and feature extraction to generate multidimensional temporal features, including: Based on the input sequence, perform dimension adaptation mapping: map the dimensions of the multivariate time series variables to... through a linear transformation layer. Generate residual features, where, The feature embedding dimension is used; the input sequence is denoised using Fourier transform. Extract trend features, periodic features, and peak features from the denoised input sequence; normalize the trend features, periodic features, and peak features; and generate multidimensional time series features based on the residual features and the normalized trend features, periodic features, and peak features.
[0010] Further, the trend features of the denoised input sequence are extracted, including: transposing the denoised input sequence, averaging the values within a local time window using a sliding window approach, and then extracting the trend features through a trend feature projection module; the periodic features of the denoised input sequence are extracted, including: performing a real Fourier transform on the denoised input sequence, truncating frequency components by a set number and splitting them into real and imaginary parts, transposing the dimensions, weighting and fusing the real and imaginary parts separately using a learnable complex weight matrix, mapping them to the target dimension through linear projection, restoring them to the time domain through an inverse real Fourier transform, and generating periodic features by combining activation functions and layer normalization; the peak features of the denoised input sequence are extracted, including: the denoised input sequence is sequentially processed through one-dimensional max pooling, a peak feature projection module, and layer normalization to generate peak features.
[0011] Furthermore, based on the temporal coding output features, the noise value corresponding to the current diffusion time step is predicted, including: performing dimensional mapping, normalization, and nonlinear activation on the temporal coding output features through the input projection module to obtain an initial temporal representation; inputting the initial temporal representation into a Mamba block to model global temporal dependencies and generate global temporal features; extracting local features from the global temporal features through the temporal convolution module to generate local enhanced features; using the global temporal features as the backbone features, performing residual connections on the global temporal features and local enhanced features to generate fused temporal features; and performing linear transformation and dimensional adjustment on the fused temporal features through the output mapping module to predict the noise value corresponding to the current diffusion time step.
[0012] Further, based on the noise value and the denoising output corresponding to the previous diffusion time step, the denoising output corresponding to the current diffusion time step is generated, including: calculating the original data estimate corresponding to the current diffusion time step based on the noise value and the denoising output corresponding to the previous diffusion time step; performing adaptive noise correction based on KL divergence on the noise value based on the statistical distribution parameters of the training data to generate the corrected noise value; and generating the output of the current denoising operation based on the corrected noise value and the original data estimate corresponding to the current diffusion time step.
[0013] Furthermore, based on the statistical distribution parameters of the training data, adaptive noise correction based on KL divergence is performed on the noise values to generate corrected noise values, including: , , in, The corrected noise value. This is the noise value. For correction factor, The KL divergence is the statistical distribution of the original data estimate and the training data corresponding to the current diffusion time step. The mean standard deviation of the raw data estimates corresponding to the current diffusion time step. The mean standard deviation is the statistical distribution parameter of the training data. is the base of the natural logarithm.
[0014] Furthermore, based on the corrected original data estimate corresponding to the current diffusion time step, the output of the current denoising operation is generated, including: , , , in, This is the denoised output corresponding to the current diffusion time step. For the first The cumulative noise figure at the diffusion time step. This is the corrected estimate of the original data for the current diffusion time step. For the first The standard deviation of noise injection at the diffusion time step. To obtain from the standard normal distribution Random noise from sampling For the first The input sequence for the diffusion time step. For the first Cumulative noise figure at the diffusion time step.
[0015] Compared with existing technologies, the UAV flight data generation method based on temporal feature perception and distribution guidance provided by this invention has at least the following beneficial effects: By constructing a conditional coding module through a conditional variational autoencoder, it is possible to accurately learn the potential distribution of flight conditions and macroscopic flight state variables such as altitude, airspeed, pitch angle, roll angle, and yaw angle under small sample conditions. Combined with hybrid loss constraints, it can achieve high-quality conditional feature extraction and conditional guidance, effectively solving the problems of scarce UAV flight data samples and insufficient coverage of extreme conditions.
[0016] Meanwhile, a three-branch temporal feature encoding structure of trend-cycle-peak is designed to accurately adapt to the flight dynamics and temporal characteristics of UAVs. It captures long-term trend changes, periodic oscillation patterns and sudden peak features from different time scales. Compared with a single encoding method, it extracts key temporal information more comprehensively and provides rich feature expressions for the generation process.
[0017] In terms of generation mechanism, it innovatively combines the Mamba selective state-space model with the diffusion model, using the linear complexity of Mamba to efficiently model long temporal dependencies, overcoming the computational bottleneck of traditional Transformer on long sequences. At the same time, it uses the successive denoising mechanism of the diffusion model to complete high-precision data generation, significantly improving the efficiency of long sequence modeling while ensuring generation quality. Furthermore, it prevents gradient vanishing and overfitting through residual connection and Dropout regularization.
[0018] In addition, a distribution correction strategy driven by KL divergence is introduced to effectively reduce the distribution deviation between the generated data and the real flight data by aligning the statistical characteristics of the generated data with the real flight data in terms of mean and variance. This is especially effective in scenarios where samples are scarce under extreme flight conditions, significantly improving the distribution consistency and authenticity of the generated data.
[0019] In summary, this invention achieves high-quality generation of small-sample UAV flight data through the synergistic effect of condition guidance, multi-scale temporal perception, efficient long-sequence modeling, and distribution correction, providing reliable data support for downstream tasks such as flight safety assessment and fault prediction. Attached Figure Description
[0020] This specification will be further described by way of exemplary embodiments, which will be described in detail with reference to the accompanying drawings. These embodiments are not limiting; in these embodiments, the same reference numerals denote the same structures, wherein: Figure 1 This is a flowchart illustrating a method for generating UAV flight data based on temporal feature perception and distribution guidance, according to some embodiments of this specification. Figure 2This is a schematic flowchart illustrating the step-by-step noise reduction process according to some embodiments of this specification; Figure 3 This is a schematic diagram of the structure of a Mamba block according to some embodiments of this specification. Detailed Implementation
[0021] To more clearly illustrate the technical solutions of the embodiments in this specification, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are merely some examples or embodiments of this specification. For those skilled in the art, these drawings can be applied to other similar scenarios without creative effort. Unless obvious from the context or otherwise specified, the same reference numerals in the drawings represent the same structures or operations.
[0022] Figure 1 This is a flowchart illustrating a method for generating UAV flight data based on temporal feature perception and distribution guidance, as shown in some embodiments of this specification. Figure 1 As shown, the method for generating UAV flight data based on temporal feature perception and distribution guidance may include the following steps.
[0023] Step 110: Obtain the sequence of UAV flight observations.
[0024] Specifically, the drone flight data is ,in, Indicates the first N-dimensional multivariate observation vectors at each time step H represents the time series length, and N represents the flight state variables. For example, eight types of flight state variables are used, including: flight altitude, airspeed, pitch angle, roll angle, yaw angle, resultant acceleration of the three axes, resultant angular velocity of the three axes, and average motor speed. The UAV flight data is obtained from actual measurements.
[0025] UAV flight data can include sequences of UAV flight observations. The condition information includes M, which is the total number of flight state variables included in the condition information. For example, the condition information includes 5 flight state variables: flight altitude, airspeed, pitch angle, roll angle, and yaw angle.
[0026] Step 120: Using Gaussian noise as the initial input and combining it with the UAV flight observation sequence as the condition, the denoising operation is performed sequentially at multiple diffusion time steps until the diffusion time step is 0, thereby generating UAV flight data.
[0027] Figure 2 This is a schematic flowchart of step-by-step noise reduction according to some embodiments of this specification, such as... Figure 2As shown, each denoising operation includes: generating a time step code based on the current diffusion time step. Generate conditional features based on conditional information Encode the time steps With conditional features After concatenation along the feature dimension, conditionally guided features are generated through a linear projection layer. Based on the denoised output of the previous diffusion time step, the input sequence for the current diffusion time step is generated. For the input sequence Temporal decomposition and feature extraction are performed to generate multidimensional temporal features. The conditional guided features and multidimensional temporal features are then fused element by element with weights to generate temporal encoded output features. Based on the temporal encoded output features, the noise value corresponding to the current diffusion time step is predicted. Based on the noise value and the denoised output corresponding to the previous diffusion time step, the denoised output corresponding to the current diffusion time step is generated.
[0028] The process of generating UAV flight data can be formally defined as: , in, For the generated drone flight data, This refers to the data from the first time point in the generated drone flight data. For the data at the Hth time point in the generated drone flight data, For conditional information, This refers to the denoising operation performed sequentially at multiple diffusion time steps.
[0029] For example, given a sequence of UAV flight observations over H historical time steps. The goal is to predict the future. A time-step drone flight sequence .
[0030] During the generation of drone flight sequences, continuous execution is required. The noise prediction operation is performed step by step to denoise. For example, 500 denoising steps can balance generation quality and inference speed, meeting the requirements of real-time airborne computing. Therefore, in this invention, the number of denoising operations is... Take 500.
[0031] like Figure 2 As shown, each denoising step requires three core inputs: the diffusion time step. Input sequence and condition information . This indicates the current denoising step. During the first denoising step... Pick If it's a second noise reduction operation, Pick ,until Take 0.
[0032] Confirmed After obtaining the value, for Time step codes are generated using sine and cosine coding. This allows the diffusion model to understand the current time step, thus more accurately predicting noise or generated data. The calculation method is as follows: , , in, The feature embedding dimension is, for example, 64. It's a dimensional index; trigonometric functions have periodicity, and different... The corresponding sine or cosine values may be repeated, so the sine and cosine values must be calculated separately for each index and assigned to the even indexes respectively. and odd index Up. Finally, the time step code is obtained. , and These are its two components. This encoding method ensures that similar time steps have similar encoding vectors, while more distant time steps show significant differences, thus effectively distinguishing different stages in the denoising process.
[0033] This represents the sequence of UAV flight states that the current denoising operation needs to process; it originates from the output of the previous denoising process. Specifically, in the first denoising iteration, noise is sampled from a Gaussian distribution as input data. ,Right now: , in, This represents a standard Gaussian distribution with a mean of 1 / 2. The covariance matrix is An identity matrix of dimension 1 represents an initial input consisting of completely random Gaussian noise.
[0034] The condition information includes discrete conditions and flight time-series conditions. Discrete conditions include flight condition type labels, with each UAV flight observation sequence corresponding to a flight condition type label, which remains unchanged during the generation of the same flight sequence. Flight time-series conditions are related to flight state variables and change with time steps.
[0035] like Figure 2 As shown, in some embodiments, generating conditional features based on conditional information includes: One-hot encoding is used to generate one-hot vectors based on flight condition type labels of UAV flight observation sequences; A conditional variational autoencoder is used to generate a latent feature vector Z based on the flight time series conditions in the UAV flight observation sequence; The one-hot vector is copied and expanded along the time dimension to form a feature matrix of the same length as the flight time series conditional time series. This matrix is then concatenated with the latent feature vector Z and mapped through a conditional feature embedding projection layer to generate conditional features. .
[0036] Specifically, for the discrete flight condition type labels recorded by the flight control system, conditional features are constructed through one-hot encoding: First, the condition numerical labels of the first time step of the UAV flight observation sequence are extracted and mapped into 7 discrete flight condition type labels, namely, smooth cruise, light wind flight, strong wind turbulence, sudden wind interference, high maneuvering flight, low-altitude shuttle, and extreme attitude. Then, the one-hot encoder is initialized and the classification rules are fixed. The non-sparse matrix output is set, and the labels are encoded to obtain one-hot vectors. Among them, the discrete flight condition type labels are text labels.
[0037] Flight state variables related to flight timing conditions can include flight altitude, airspeed, pitch angle, roll angle, and yaw angle. First, the flight state variables are min-max normalized to eliminate the influence of differences in feature scales, generating normalized flight timing conditions. The temporal features of the normalized flight timing conditions are extracted using an encoder, and then a reparameterization technique is used to sample from the conditional distribution to obtain a latent feature vector.
[0038] The conditional variational autoencoder consists of an encoder, a reparameterization layer, and a decoder. The encoder receives the normalized flight timing conditions and outputs the mean and log-variance of the conditional latent distribution. The reparameterization layer samples noise according to a standard normal distribution. The mean of the conditional latent distribution The latent feature vector is generated by the log-variance logvar. The decoder is used to reconstruct the flight time conditions of the input during the training phase to minimize the reconstruction error. Both the encoder and decoder adopt a two-layer fully connected MLP (Multi-Layer Perceptron) network structure. Each layer is composed of a linear transformation layer, layer normalization and GELU activation function.
[0039] The latent feature vector can be generated based on the following formula: , in, These are potential feature vectors.
[0040] The decoder is only enabled during the training phase. By reconstructing the error-supervised encoder, it enables the encoder to learn the potential features that can accurately represent the original conditional distribution, thus preserving the characteristics of the original conditional distribution to the greatest extent and avoiding distribution shifts that may be caused by the reconstruction process.
[0041] During the training of the conditional variational autoencoder, based on the hybrid loss function The parameters are updated by combining reconstruction loss, KL divergence loss, multi-scale MMD loss, trend consistency loss and smoothness regularization loss to make the reconstruction conditions infinitely close to the original conditions, while constraining the potential spatial distribution. This ensures that the reconstructed quadrotor flight time series continuous condition sequence is consistent with the real flight data in terms of dynamic change law and physical smoothness, thus completing the accurate learning of the condition distribution.
[0042] The loss function used to train the conditional variational autoencoder is: , , , , in, The loss of the conditional variational autoencoder, The reconstruction loss is the mean square error between the original conditions and the reconstruction conditions. The KL divergence loss is used to constrain the latent spatial distribution to approximate a standard normal distribution. To achieve multi-scale MMD loss, three Gaussian kernels of different scales were selected, and the MMD of each single scale was calculated separately and then averaged. This ensures that the distribution of the reconstructed conditions is fully aligned with that of the original conditions. Let Gaussian kernel bandwidth be the parameter corresponding to the k-th scale. The value of the squared MMD (Maximum Mean Discrepancy) at the k-th scale. This is the original conditional sequence. To reconstruct the conditional sequence, The trend consistency loss introduced to address the flight environment and flight dynamics characteristics of quadcopter UAVs is defined as the mean square error of the first-order difference between the reconstructed conditions and the original conditions in the time dimension. In the flight time-series conditional sequence, this represents the difference between vectors consisting of multiple flight state variables corresponding to two adjacent time steps. , In the reconstructed flight time series, the difference between vectors consisting of multiple flight state variables corresponding to two adjacent time steps is used. The flight altitude, airspeed, attitude angle, and other variables of the quadcopter UAV exhibit obvious gradual trends with the flight mission (e.g., the altitude steadily increases during the climb phase, and the airspeed remains stable during the cruise phase). This loss can effectively constrain the temporal trend deviation of the reconstructed conditions. To address the physical smoothness characteristics of quadcopter flight time sequences, a smoothness regularization loss is introduced. This loss is achieved by calculating the squared mean of the differences between adjacent time steps in the reconstructed conditional sequence, thus constraining the smoothness of the reconstructed time sequence and avoiding physically meaningless abrupt changes. This approach better reflects the continuous variation characteristics of real UAV flight states. For the reconstructed flight timing condition sequence, the flight timing condition at the (h+1)th time step, For the reconstructed flight timing condition sequence, the flight timing condition at the h-th time step, , , and For example, the coefficient is... The value increases linearly from 0.001 to 0.01 during training. , and To address the core issue of sample distribution shift under extreme operating conditions, the following settings are implemented: The value is set to 15 to strengthen the alignment constraints of multi-scale MMD distributions. The model can be iteratively optimized based on its reconstruction performance and the degree of matching of the generated sample distribution.
[0043] The training of the conditional variational autoencoder uses the AdamW optimizer with weight decay (value 1e-4) and a cosine annealing strategy to dynamically adjust the learning rate; the gradient clipping threshold is set to 1.0 to prevent gradient explosion, and an early stopping mechanism is set to avoid overfitting.
[0044] In some embodiments, temporal decomposition and feature extraction are performed on the input sequence to generate multidimensional temporal features, including: Based on the input sequence, perform dimension adaptation mapping: map the dimensions of the multivariate time series variables to... through a linear transformation layer. Generate residual features, where, For feature embedding dimension; The input sequence is denoised using Fourier transform. Extract trend features, periodic features, and peak features from the denoised input sequence; Normalize the trend characteristics, cycle characteristics, and peak characteristics; Multidimensional time series features are generated based on residual features and normalized trend, periodic and peak features.
[0045] Specifically, the input sequence for the current denoising operation It includes sensor noise and transient airflow interference, so it needs to be denoised using Fourier transform before extracting time-series features: , in, The input sequence after denoising. Represents the Fast Fourier Transform. This represents the inverse fast Fourier transform. This represents a frequency domain mask, which is a low-pass filter that preserves the low-frequency principal components and sets the high-frequency noise components to zero.
[0046] The specific process is as follows: First to Perform a Fast Fourier Transform to convert to the frequency domain, and then mask the frequency domain. The signal is multiplied element-wise with the frequency domain signal to suppress the frequency band containing noise. Finally, an inverse Fourier transform is performed on the masked frequency domain signal to restore the clean low-frequency components to the denoised time domain signal. .
[0047] The trend characteristics reflect the long-term overall patterns of the drone's flight altitude and airspeed (such as acceleration during climb and deceleration during dive).
[0048] In some embodiments, extracting trend features from the denoised input sequence includes: The denoised input sequence is transposed, and the values are averaged within a local time window using a sliding window approach. Then, the trend features are extracted using a trend feature projection module.
[0049] Specifically, one-dimensional average pooling is used to extract trends. This operation averages the time-series data points within a fixed local window, which helps smooth out outliers and noise. The denoised input sequence is transposed to accommodate the pooling operation, and the values are averaged within a local time window using a sliding window approach before being input to the trend feature projection module to generate trend features. , in, As a trend feature, This is a one-dimensional average pooling module with a sliding window size of 7, a stride of 1, and padding of 3. The trend feature projection module consists of a linear transformation layer and... The activation function is composed of functions whose core function is to map the trend features after pooling to... 3D feature embedding space, Representation layer normalization performs feature-by-feature normalization on the projected trend features, which can eliminate differences in the magnitude of feature values and accelerate model training convergence.
[0050] Periodic features reflect the repetitive dynamic laws of UAV flight control cycles, motor speed cycles, etc. Extracting periodic features using frequency domain methods can better capture the periodic repetition patterns in the sequence, and at the same time, by retaining the main frequency components, it can also reduce noise.
[0051] In some embodiments, extracting periodic features from the denoised input sequence includes: A real Fourier transform is performed on the denoised input sequence. Frequency components are truncated according to a set number and split into real and imaginary parts. After dimensional transpose, the real and imaginary parts are weighted and fused using a learnable complex weight matrix. Then, the sequence is mapped to the target dimension through linear projection and restored back to the time domain through inverse real Fourier transform. Combined with activation function and layer normalization, periodic features are generated.
[0052] Specifically, the denoised sequence is transformed to the frequency domain using a real Fourier transform. Frequency components are truncated according to a set number and split into real and imaginary parts. After dimensional transpose, the real and imaginary parts are weighted and fused using a learnable complex weight matrix. Then, it is mapped to the target dimension through linear projection and restored to the time domain through an inverse real Fourier transform. Finally, combined with activation functions and layer normalization, the periodic characteristics of the time series are obtained. : , in, It uses 32×32 learnable complex weights to adaptively weight the frequency domain components, thereby more accurately capturing the changing patterns of different periods in the time series. It is the real number fast Fourier transform; This corresponds to the inverse real fast Fourier transform. For periodic feature projection modules, consisting of linear layers and The activation function is composed of functions used to map the time-domain periodic features after the inverse Fourier transform to a unified... Embedded dimensions enhance the nonlinear representation of periodic patterns, and the output is normalized to obtain periodic features. .
[0053] Peak characteristics reflect abrupt changes and extreme values in the flight state of the UAV (such as sudden changes in acceleration caused by gusts of wind, and extreme values of attitude during high-maneuver flight).
[0054] In some embodiments, extracting peak features from the denoised input sequence includes: The denoised input sequence is sequentially processed through one-dimensional max pooling, peak feature projection module, and layer normalization to generate peak features.
[0055] Specifically, max pooling is used to extract peak values, extracting the feature with the largest value within a set window. This filters out redundant information and noise in stationary segments, preserving abrupt changes, spikes, and extreme fluctuations in the time series data. Furthermore, there are no fixed operations with any learnable parameters, so it doesn't significantly increase model complexity. The denoised time series is first processed... The dimensions are adjusted, and local extrema and peak features are extracted through one-dimensional max pooling. After restoring the dimensions, the features are mapped by a projection layer, processed by an activation function, and finally normalized by layer to obtain standardized peak features. : , in, This represents one-dimensional max pooling with a kernel size of 7, a stride of 1, and a padding of 3. The peak feature projection module consists of a linear transformation layer and... Activation function composition.
[0056] To preserve the fundamental information of the original flight time series and mitigate the gradient vanishing problem, a residual connection module is introduced. A dimensionality adaptation mapping is performed on the input sequence of the current denoising operation: the dimensions of the multivariate time series variables are mapped through a linear transformation layer. Finally, the residual characteristics are obtained. .
[0057] Extracted from the three main branches , , Perform layer normalization separately to eliminate distribution offsets in different feature branches and ensure consistent feature distribution; concatenate the three sets of features along the feature dimension to obtain... 3D fusion features are compressed to a minimum through a linear projection layer. Dimension, and residual characteristics Perform element-wise addition to obtain the final temporal coding output features. : , in, For feature dimension splicing, the feature tensors of the three branches of trend, period and peak are concatenated and spliced along the feature dimension.
[0058] Taking a flight sequence of a quadcopter drone encountering a sudden gust of wind during its cruise phase as an example: Trend characteristics Capture the overall mission trend of maintaining stable flight altitude and airspeed during the stable cruise phase; periodic characteristics Capture high-frequency rotor vibration and attitude closed-loop control cycle, matching the sampling patterns of UAV flight control sensors; peak characteristics Accurately capture the extreme characteristics of rapid abrupt changes in the resultant triaxial acceleration and attitude angle under gusts of wind; residual characteristics Preserve sensor noise and minute airflow disturbances during abrupt changes; fusion features It also includes trends, cycles, abrupt changes, and subtle jitters, comprehensively characterizing the intrinsic dynamic structure of the drone's flight state during that period.
[0059] In some embodiments, predicting the noise value corresponding to the current diffusion time step based on the time-series coding output features includes: By inputting the projection module, the temporal coding output features are subjected to dimensional mapping, normalization, and nonlinear activation to obtain the initial temporal representation. The initial time series representation is input into the Mamba block to model global time series dependencies and generate global time series features; The temporal convolution module extracts local features from global temporal features to generate local enhanced features. Using the global temporal features as the backbone features, residual connections are performed on the global temporal features and local enhancement features to generate fused temporal features; The output mapping module performs linear transformation and dimension adjustment on the fused temporal features to predict the noise value corresponding to the current diffusion time step.
[0060] Specifically, and The concatenation process begins with the input projection module performing dimension mapping, normalization, and nonlinear activation. This is then fed into a feature extraction backbone composed of single-layer Mamba blocks. Through selective state space layers and residual connections, long-range temporal dependencies are efficiently captured while preserving original information. Next, a one-dimensional convolution module extracts local fine-grained temporal features. Finally, the output mapping module performs linear transformation and dimension adjustment, outputting the predicted noise. , dimension ,in, For batch size, The length of the drone flight time series. The number of flight state variables representing the quadcopter flight included in the UAV flight time series. That is, the sum of the three-axis acceleration, the sum of the three-axis angular velocity, and the average speed of the motor.
[0061] It is the result of concatenating and mapping the normalized trend features, periodic features, and peak features; the dimension length is... , It is the temporal encoded output feature after processing by the conditional encoder, and its dimension is .Will and The data is concatenated using fully connected layers and normalization layers, mapped to the input dimension of the Mamba block for easier subsequent feature fusion operations. The output dimension of the Mamba block... and Maintain consistency: , in, The input projection module outputs RMSNorm (root mean square normalization) and Linear (linear mapping layer). This indicates that the pieces are joined along the feature dimension.
[0062] To optimize training performance, a Dropout probability of 0.1 was set for regularization to prevent overfitting. The GELU activation function was selected to enhance the non-linear expressive power of features. Root mean square normalization was also performed to improve the stability of the training process and accelerate the convergence speed of the model.
[0063] A single MambaBlock layer is used to construct the backbone for temporal feature extraction. The MambaBlock layer includes root mean square normalization, a Mamba selective state space layer, a Dropout layer, and residual connections to dynamically capture long-term temporal dependencies while preventing gradient vanishing and gradient exploding. , , in, For intermediate hidden features, The output of the input projection module, MambaSSM is a selective state-space layer that provides global temporal features for the output of Mamba blocks, enabling long sequence modeling with linear complexity. Set to 0.1; residual connections ensure that the input and output dimensions remain constant. To avoid gradient vanishing.
[0064] Compared to existing technologies, traditional Mamba typically processes only a single temporal input. This method, however, jointly inputs trend components, periodic components, peak components, and conditional features into the Mamba module for joint modeling, enabling the model to simultaneously learn temporal evolution patterns and conditional constraints. Furthermore, this method uses Mamba as the core feature extraction module of the diffusion model's noise prediction network, employing it for long-term temporal dependency modeling during the multi-step iterative denoising process of the diffusion model, thereby improving noise prediction accuracy and generated data quality. Additionally, a cross-module residual connection is added after the Mamba output to fuse local convolutional features, adapting to the iterative training scenario of 500 steps of cyclic denoising in the diffusion model, significantly reducing the risk of gradient vanishing during multiple rounds of backpropagation.
[0065] The hyperparameters of the Mamba selective state space layer are fixed as follows: the hidden state dimension of the state space. Width of one-dimensional convolution kernel Internal expansion ratio Low-rank projection dimension of discretized parameters According to the formula Dynamic calculation, To adapt to different input feature dimensions, the module is fixed. Regularization with a probability of 0.1 is applied, and root mean square normalization is performed on the input features to improve training stability.
[0066] The input dimension of the temporal convolution module is and Alignment. A one-dimensional convolutional structure with a kernel size of 3 and padding of 1 is used to ensure that the sequence length remains unchanged before and after convolution, and that temporal information is not lost. Convolutional layer hidden dimensions. It can be flexibly configured. After each convolutional layer, a one-dimensional batch normalization and SiLU activation function are sequentially applied to enhance nonlinear expressive power and suppress redundant features.
[0067] The global temporal features output by the Mamba block are used to extract local temporal correlations through a single-layer temporal convolutional layer, achieving the fusion of global long-range dependencies and local detailed features, as follows: , , Among them, one-dimensional temporal convolutional layer The SiLU activation function is used to further enhance expressive power; BatchNorm1d, or one-dimensional batch normalization, improves training stability. SiLU is the Sigmoid LinearUnit activation function. As a feature of fusion, These are local features.
[0068] Global time series features output by Mamba blocks Local features obtained by temporal convolution By fusing the residuals, we obtain Temporal convolution is used to capture local details of a sequence, making up for the shortcomings of long sequence modeling in terms of local features, and providing a more comprehensive feature representation for subsequent noise prediction.
[0069] By using layer normalization and fully connected layers, the fused features are mapped to the dimension of the original input data, and the output model predicts the noise value. ,as follows: , Here, FC is a linear layer with input and output dimensions of 64 and 64, respectively. . This refers to the noise generated by the model's prediction layers relative to the original input data, while maintaining the same dimensionality as the original input data. (Configuration) Regularization is used to prevent overfitting, and GELU activation is employed to enhance the nonlinear representation of features. After mapping through a fully connected layer, the output is a dimension-matched noise prediction result.
[0070] In some embodiments, generating the denoised output for the current diffusion time step based on the noise value and the denoised output for the previous diffusion time step includes: Based on the noise value and the denoised output corresponding to the previous diffusion time step, calculate the estimated value of the original data corresponding to the current diffusion time step; Based on the statistical distribution parameters of the training data, the noise value is adaptively corrected based on KL divergence to generate the corrected noise value. Based on the corrected noise value and the original data estimate corresponding to the current diffusion time step, the output of the current denoising operation is generated.
[0071] Specifically, in the inference generation phase, based on the input sequence of the current step... With model prediction noise Calculate the estimate of the original data Then retrieve the real flight data that was pre-collected during the training phase. Distribution parameters (mean) and variance ), calculate the KL divergence between their Gaussian distributions for adaptive noise correction: , , , , in, Initial denoising results The mean, Initial denoising results variance For real training data The mean, For real training data variance For expectation operator, This is the variance operator.
[0072] During the generation phase, the mean and variance obtained from the training data are used as Gaussian parameters for the real data distribution, eliminating the need to acquire real-time data. This method quantifies the deviation between the generated distribution and the true distribution. The reason is that training data reflects the overall statistical characteristics of the target data, and its mean and variance can serve as an approximate description of the true data distribution. By comparing the statistical distribution parameters of the generated data with the corresponding parameters of the training data, the degree to which the generated data retains the characteristics of the true data distribution can be assessed, thus providing a quantitative basis for the generation quality. This method does not rely on real-time data in the generation process, reducing the data acquisition cost in actual deployment and improving the ease of application of the model.
[0073] Calculate the initial denoising result Compared with real training data KL divergence of Gaussian distribution The deviation between the generated distribution and the true distribution is accurately quantified. Then, the noise value is corrected based on the KL divergence to obtain the corrected noise value. This aligns the generated distribution with the real data distribution.
[0074] In some embodiments, based on the statistical distribution parameters of the training data, adaptive noise correction based on KL divergence is performed on the noise values to generate corrected noise values, including: , , in, The corrected noise value. This is the noise value. For correction factor, The KL divergence is the statistical distribution of the original data estimate and the training data corresponding to the current diffusion time step. The mean standard deviation of the raw data estimates corresponding to the current diffusion time step. The mean standard deviation is the statistical distribution parameter of the training data. is the base of the natural logarithm.
[0075] In some embodiments, the output of the current denoising operation is generated based on the corrected original data estimate corresponding to the current step, including: , , , in, This is the denoised output corresponding to the current diffusion time step. For the first The cumulative noise figure at the diffusion time step. This is the corrected estimate of the original data for the current diffusion time step. For the first The standard deviation of noise injection at the diffusion time step. To obtain from the standard normal distribution Random noise from sampling For the first The input sequence for the diffusion time step. For the first Cumulative noise figure at the diffusion time step.
[0076] Only when At that time, output the drone flight sequence: , in, This is a flight sequence for unmanned aerial vehicles (UAVs).
[0077] This method is based on a feedback-based learning approach, and its main process is as follows: 1. Noise prediction forward propagation and loss calculation Extreme flight conditions of UAVs (such as sudden attitude changes due to strong winds and turbulence, abnormal speed due to motor failure, and extreme values during high-maneuver flight) have a significant impact on flight control and fault diagnosis, but account for a very small proportion of the data in small samples. Traditional Mean Squared Error (MSE) loss is not sensitive to extreme values, resulting in a large deviation between the generated data and the true distribution. Therefore, this study uses Mean Squared Error (MSE) weighted by extreme conditions as the core loss to enhance the model's ability to predict flight state sequences under extreme flight conditions and to adapt to the CVAE flight condition encoding logic. The loss formula is as follows: , in, For noise reduction loss, Real noise is injected into the original sequence during the training phase; The sample weight vector is calculated based on the quantiles of flight dynamics parameters and the corresponding operating condition type, with a focus on strengthening the training weights for extreme flight scenarios. Specifically, it is defined as follows: , in, For the first The resultant value of the triaxial acceleration of each sample , These represent the 95th and 5th percentiles of the combined triaxial accelerations in the training data, respectively. The core objective of the loss function is to minimize the prediction noise after weighting. Compared to the real noise injected into the original sequence during the training phase The deviation between them.
[0078] 2. Backpropagation and small sample adaptation optimization strategies Backpropagation and parameter updates are performed based on diffusion loss. The AdamW optimizer is used, the initial learning rate is configured on demand, the weight decay coefficient is set to 1e-5 to alleviate overfitting, the gradient norm is clipped to 1.0 to avoid gradient explosion, the CosineAnnealingLR scheduling strategy is used to achieve smooth decay of the learning rate, and loaders are built according to batch size and the data is shuffled.
[0079] 3. Early stopping mechanism and model saving To avoid overfitting during model training, an early stopping mechanism is implemented. The early stopping patience value is set to 30; training stops when the average training loss does not fall below the historical best value for 30 consecutive epochs. After training terminates, the weights of the optimal model are used for generating subsequent time-series samples.
[0080] To verify the beneficial effects of this method, comparative experiments were conducted with existing generation methods such as TimeGAN, TimeVAE, and Diffusion-TS. Experimental results show that the data generated by this method achieves comparable or better prediction performance than existing methods on multiple public datasets. Specifically, on the FD001 dataset, when using the LSTM prediction model, the MAE decreased from 0.0200 to 0.0157, and the RMSE decreased from 0.0268 to 0.0203. These results demonstrate that this method can effectively preserve the temporal characteristics and distribution information of time-series data, improving the quality of generated data and its support for downstream prediction tasks.
[0081] Finally, it should be understood that the embodiments described in this specification are merely illustrative of the principles of the embodiments described herein. Other variations may also fall within the scope of this specification. Therefore, alternative configurations of the embodiments described herein are intended to be illustrative rather than limiting, and should be considered consistent with the teachings of this specification. Accordingly, the embodiments described herein are not limited to those explicitly introduced and described herein.
Claims
1. A method for generating UAV flight data based on temporal feature perception and distribution guidance, characterized in that, include: Obtain the sequence of UAV flight observations; Using Gaussian noise as the initial input and combining it with the UAV flight observation sequence as the condition, denoising operations are performed sequentially at multiple diffusion time steps until the diffusion time step is 0, generating UAV flight data. Each denoising operation includes: generating a time step code based on the current diffusion time step; generating conditional features based on conditional information; concatenating the time step code and conditional features along the feature dimension and generating conditional guided features through a linear projection layer; generating the input sequence for the current diffusion time step based on the denoised output of the previous diffusion time step; performing temporal decomposition and feature extraction on the input sequence to generate multi-dimensional temporal features; fusing the conditional guided features and multi-dimensional temporal features element-wise with weights to generate temporal encoded output features; predicting the noise value corresponding to the current diffusion time step based on the temporal encoded output features; and generating the denoised output corresponding to the current diffusion time step based on the noise value and the denoised output of the previous diffusion time step.
2. The method for generating UAV flight data based on temporal feature perception and distribution guidance according to claim 1, characterized in that, The condition information includes discrete conditions and flight time-series conditions, wherein the discrete conditions include flight condition type labels, and the flight time-series conditions are related to flight state variables; Conditional features are generated based on conditional information, including: One-hot encoding is used to generate one-hot vectors based on flight condition type labels of UAV flight observation sequences; A conditional variational autoencoder is used to generate latent feature vectors based on flight time-series conditions in UAV flight observation sequences; The one-hot vector is copied and expanded along the time dimension into a feature matrix of the same length as the flight time series conditional time series. Then, it is concatenated with the latent feature vector and mapped through the conditional feature embedding projection layer to generate conditional features.
3. The method for generating UAV flight data based on temporal feature perception and distribution guidance according to claim 2, characterized in that, The conditional variational autoencoder includes an encoder, a reparameterization layer, and a decoder. The encoder is used to accept the normalized flight timing conditions and output the mean and log-variance of the conditional latent distribution. The reparameterization layer is used to sample noise based on the standard normal distribution, the mean and log-variance of the conditional latent distribution, and generate a latent feature vector. The decoder is used to reconstruct the input flight timing conditions during the training phase to minimize the reconstruction error.
4. The method for generating UAV flight data based on temporal feature perception and distribution guidance according to claim 3, characterized in that, The loss function used to train the conditional variational autoencoder is: , in, The loss of the conditional variational autoencoder, To reconstruct the loss, for Divergence loss, For multi-scale MMD loss, For trend consistency loss, For smoothness regularization loss, , , and is a coefficient.
5. The method for generating UAV flight data based on temporal feature perception and distribution guidance according to claim 1, characterized in that, The input sequence is subjected to temporal decomposition and feature extraction to generate multidimensional temporal features, including: Based on the input sequence, perform dimension adaptation mapping: map the dimensions of the multivariate time series variables to... through a linear transformation layer. Generate residual features, where, For feature embedding dimension; The input sequence is denoised using Fourier transform. Extract trend features, periodic features, and peak features from the denoised input sequence; Normalize the trend characteristics, cycle characteristics, and peak characteristics; Multidimensional time series features are generated based on residual features and normalized trend, periodic and peak features.
6. The method for generating UAV flight data based on temporal feature perception and distribution guidance according to claim 5, characterized in that, Extract trend features from the denoised input sequence, including: The denoised input sequence is transposed, and the numerical average is taken within a local time window using a sliding window method. Then, the trend features are extracted through the trend feature projection module. Extracting periodic features from the denoised input sequence includes: A real Fourier transform is performed on the denoised input sequence. Frequency components are truncated according to a set number and split into real and imaginary parts. After dimensional transpose, the real and imaginary parts are weighted and fused using a learnable complex weight matrix. Then, the sequence is mapped to the target dimension through linear projection and restored back to the time domain through inverse real Fourier transform. Combined with activation function and layer normalization, periodic features are generated. Extracting peak features from the denoised input sequence, including: The denoised input sequence is sequentially processed through one-dimensional max pooling, peak feature projection module, and layer normalization to generate peak features.
7. The method for generating UAV flight data based on temporal feature perception and distribution guidance according to any one of claims 1-6, characterized in that, Based on the time-series coding output features, predict the noise value corresponding to the current diffusion time step, including: By inputting the projection module, the temporal coding output features are subjected to dimensional mapping, normalization, and nonlinear activation to obtain the initial temporal representation. The initial time series representation is input into the Mamba block to model global time series dependencies and generate global time series features; The temporal convolution module extracts local features from global temporal features to generate local enhanced features. Using the global temporal features as the backbone features, residual connections are performed on the global temporal features and local enhancement features to generate fused temporal features; The output mapping module performs linear transformation and dimension adjustment on the fused temporal features to predict the noise value corresponding to the current diffusion time step.
8. The method for generating UAV flight data based on temporal feature perception and distribution guidance according to any one of claims 1-6, characterized in that, Based on the noise value and the denoised output corresponding to the previous diffusion time step, generate the denoised output corresponding to the current diffusion time step, including: Based on the noise value and the denoised output corresponding to the previous diffusion time step, calculate the estimated value of the original data corresponding to the current diffusion time step; Based on the statistical distribution parameters of the training data, the noise value is adaptively corrected based on KL divergence to generate the corrected noise value. Based on the corrected noise value and the original data estimate corresponding to the current diffusion time step, the output of the current denoising operation is generated.
9. The method for generating UAV flight data based on temporal feature perception and distribution guidance according to claim 8, characterized in that, Based on the statistical distribution parameters of the training data, adaptive noise correction based on KL divergence is performed on the noise values to generate corrected noise values, including: , , in, The corrected noise value. This is the noise value. For correction factor, The KL divergence is the statistical distribution of the original data estimate and the training data corresponding to the current diffusion time step. The mean standard deviation of the raw data estimates corresponding to the current diffusion time step. The mean standard deviation is the statistical distribution parameter of the training data. is the base of the natural logarithm.
10. The method for generating UAV flight data based on temporal feature perception and distribution guidance according to claim 9, characterized in that, Based on the corrected original data estimate corresponding to the current diffusion time step, the output of the current denoising operation is generated, including: , , , in, This is the denoised output corresponding to the current diffusion time step. For the first The cumulative noise figure at the diffusion time step. This is the corrected estimate of the original data for the current diffusion time step. For the first The standard deviation of noise injection at the diffusion time step. To obtain from the standard normal distribution Random noise from sampling For the first The input sequence for the diffusion time step. For the first Cumulative noise figure at the diffusion time step.
