Unmanned aerial vehicle signal identification method based on frequency domain hash value sequence comparison
Through frequency domain hash sequence alignment technology, the accuracy and efficiency of drone signal recognition under signal attenuation, fluctuations and interference are solved, and efficient and real-time signal recognition is achieved.
Patent Information
- Application Number
- CN202411187387.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-28
- Publication Date
- 2024-12-27
AI Technical Summary
The existing drone signal recognition technology has low accuracy in the face of signal attenuation, fluctuations and interference, and the computing resources are consumed, making it difficult to achieve real-time recognition. Traditional methods ignore the video domain characteristics, resulting in limited recognition performance.
Using a method based on frequency domain hash sequence alignment, the frequency domain hash sequence of signals is generated and compared through technologies such as Butterworth bandpass filter, fast Fourier transform, and hash function to improve identification efficiency and accuracy.
While ensuring high accuracy, it greatly improves the efficiency of drone signal recognition, can withstand the influence of signal attenuation, fluctuations and interference, and achieve real-time recognition.
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of drones, and in particular to a drone signal recognition method based on frequency domain hash value sequence comparison. Background Art
[0002] Currently, drone signal recognition is primarily achieved through radio spectrum monitoring and recognition technologies. These techniques typically require complex time and frequency domain analysis of large amounts of collected raw radio signals to obtain effective results. This not only places high demands on computing resources and storage space, but also requires continuous feature extraction and recognition processes, placing significant pressure on system performance and real-time performance.
[0003] During radio signal transmission, various factors may affect the signal, such as signal attenuation, fluctuation, and interference. Traditional preprocessing methods may not be able to effectively eliminate these influences. In addition, traditional preprocessing methods may also ignore some important characteristics of the signal, such as frequency domain characteristics.
[0004] Because the characteristics of drone signals can change with the drone and the environment, recognition methods based on time-domain characteristics may not adapt to these changes, resulting in limited recognition performance. Frequency-domain-based recognition methods also present numerous issues. For example, directly using frequency-domain characteristics for recognition can be affected by signal noise and interference, resulting in reduced recognition accuracy. The calculation and comparison of frequency-domain characteristics can require significant computing resources, making real-time recognition difficult. Summary of the Invention
[0005] In view of this, the present invention proposes a drone signal recognition method based on frequency domain hash value sequence comparison. By utilizing the frequency domain characteristics to generate and compare signal hash value sequences, it can not only withstand the influence of various signal attenuation, fluctuation, interference, etc., but also greatly improve the efficiency of signal recognition while ensuring high accuracy.
[0006] A method for identifying drone signals based on frequency domain hash value sequence comparison, comprising:
[0007] 1. Obtain drone signals, set the sampling frequency of the acquisition equipment to 12 GHz, and mark the collected signals;
[0008] Second, pre-process the received drone signal. The steps of drone signal pre-processing include filtering, denoising, and gain control. Specifically, they include:
[0009] (1) Filtering
[0010] The filtering uses a Butterworth bandpass filter to reduce the unwanted frequency components in the drone signal;
[0011] The mathematical expression of using Butterworth bandpass filter is as follows:
[0012] H(f)=sqrt{1 / [1+((f-fc) / (f2-f1))^2N]}
[0013] Where f is the frequency, fc is the center frequency, f1 and f2 are the passband boundaries of the filter, i.e., the lower and upper frequencies, respectively, and N is the order of the filter. When the frequency f is between f1 and f2, i.e., within the passband, H(f) is close to 1, indicating that these frequency components are retained. When the frequency f is far from the center frequency fc, i.e., within the stopband, H(f) is close to 0, indicating that these frequency components are suppressed.
[0014] (2) Denoising:
[0015] The spatial filtering method is used for denoising, the signal is decomposed into several orthogonal subspaces, and then each subspace is processed separately, and the statistical average of each subspace is bravely calculated;
[0016] (3) Gain control
[0017] In the process of receiving drone signals, we use the automatic gain control (AGC) algorithm;
[0018] The AGC algorithm continuously adjusts the gain to ensure that the average power of the signal reaches a preset target value. The algorithm expression is: Vin(t+1)=Vin(t) / (1+μ(y(t)-yd)), where Vin(t) is the original value of the signal, μ is the gain step size, y(t) is the signal value after filtering and denoising, and yd is the desired signal value.
[0019] 3. Time Domain to Frequency Domain Transformation
[0020] Step 1: Frequency Measurement
[0021] Fast Fourier transform is used to convert the original time domain signal into a frequency domain signal. This process can be achieved using the following formula:
[0022] The basic formula for the fast Fourier transform is:
[0023] X(k)=Σ[x(n)*e^(-j*2π*k*n / N)](for k=0,1,2,...,N-1)
[0024] The parameters of this formula have the following meanings:
[0025] X(k): It is the output of the discrete Fourier transform and represents the complex amplitude of the frequency component at frequency k. They capture the magnitude and phase information of the input signal x(n) at each frequency; each frequency has a complex number representing its amplitude and phase;
[0026] x(n): It is the input of the discrete Fourier transform, which is a series of sample values in the time domain, including real or complex numbers;
[0027] e: is the base of natural logarithm, a fixed constant, approximately equal to 2.71828;
[0028] j: is the imaginary unit, satisfying j^2=-1;
[0029] π: is the circumference of a circle, approximately equal to 3.14159;
[0030] k: is the discrete value of frequency, and its value range is 0 to N-1. The value of k / N represents the normalized version of the frequency, 0 represents zero frequency, and 1 represents the highest frequency;
[0031] n: is a discrete value of time, representing the specific position of the sample point in the input sample x(n), and its value range is also 0 to N-1;
[0032] N: is the size of the FFT, that is, the number of sample points in the input signal x(n);
[0033] Using the above formula, we can get the signal strength at each frequency point. What we want to find is the frequency with the maximum strength, marked as f_r;
[0034] Step 2: Calculate the frequency deviation
[0035] Once we have f_r, we can compare it with the frequency f_0 to calculate the frequency deviation. Here, f_0 is the frequency set in the quality control or protocol. The frequency deviation can be calculated using the formula Δf = f_r - f_0. Here, Δf represents the frequency offset.
[0036] Step 3: Perform frequency calibration
[0037] After knowing the frequency deviation Δf, we can perform frequency calibration on the device. Specifically, we need to adjust the frequency of the local oscillator of the receiving device to eliminate the frequency deviation Δf so that the frequency of the receiving device is consistent with the target frequency.
[0038] This can be done by adjusting the control voltage of the local oscillator. Generally, increasing the control voltage will increase the frequency, while vice versa will decrease the frequency.
[0039] In the system, we adjust the frequency of the VCO by changing the control voltage or by changing the value of some components in the oscillator circuit.
[0040] We can change the value of the capacitor C by adjusting the number of turns of the coil or by using a component called a variable inductor. For the capacitor C, we can change its value by connecting different capacitors in parallel or series or by using a component called a variable capacitor.
[0041] The Fourier transform converts the original time-domain signal into complex values at different frequency locations. For the complex number X[k] at frequency k (consisting of the real part Re(X[k]) and the imaginary part Im(X[k])), the square of its modulus |X[k]|^2 represents the energy intensity at that frequency location.
[0042] Feature Normalization:
[0043] We use maximum and minimum normalization or Z-Score normalization; maximum and minimum normalization linearly transforms the original data to the [0,1] interval, and the conversion formula is: x'=(x-min) / (max-min);
[0044] Z-Score normalization converts the original data into a standard normal distribution. The specific conversion formula is: x' = (x-μ) / σ, where μ is the mean of the original data and σ is the standard deviation of the original data.
[0045] 4. Generate hash value sequence
[0046] After extracting the spectrum features, we need to construct a hash value sequence. The hash function generates a fixed-length string based on its input.
[0047] Signal matching and identification
[0048] Build a hash value sequence database: The hash value sequence database stores the hash value sequences of different drones, which serves as the basis for comparison and identification. For each type of drone, we need to obtain the spectral characteristics of its signal in advance, process it with a hash function, and store the result in the database.
[0049] Generate a hash value sequence for a new signal: When we receive a new drone signal, we first need to perform spectrum analysis to extract features, and then use the same hash function to generate a hash value sequence.
[0050] Hash value comparison: The new hash value sequence is compared with each hash value sequence in the database to find the sequence closest to the new signal;
[0051] Euclidean distance calculation formula: D = sqrt[∑_(i=1)^n(xi-yi)2]
[0052] Where D represents the distance between two hash value sequences, n is the length of the hash value sequence, xi and yi are the values of the new signal and the signal stored in the library at the i-th hash value respectively;
[0053] Signal identification: The drone type corresponding to the hash value sequence with the smallest Euclidean distance is considered to be the source of the new signal;
[0054] In Python's hash library, you can create a SHA-1 hash object simply by using hashlib.sha1(), then use the object's update() method to input the data to be hashed, and then use the hexd igest() method to get the hash value;
[0055] The following are the code representations of some basic steps of the SHA-1 hash function and the corresponding parameter descriptions:
[0056] Preprocessing: Pad the input data to make its length a multiple of 512 bits. This step involves adding a '1' bit to the end of the data, followed by the necessary number of '0' bits, and finally, if necessary, the binary representation of the original data length. The processed data is divided into L 512-bit blocks, each denoted as M^(i), where i = 0, 1, 2, ..., L-1.
[0057] Initialization: Set five initial hash values H^(0) = (h0, h1, h2, h3, h4) = (0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476, 0xC3D2E1 F0). These values are the standard initial seed values for the SHA-1 algorithm.
[0058] Processing: For each block M^(i), an 80-step calculation process is performed to generate a new hash value H^(i+1). This process includes word expansion and an 80-step main loop, which uses some specific logic functions and constants.
[0059] Output: The final hash value is the concatenation of the calculation results H^(L) of L blocks. Because each H^(i) consists of five 32-bit numbers, the final hash value length is 160 bits;
[0060] In the above steps, the meaning of each parameter is:
[0061] Data M: is the original input data, the content that needs to be hashed;
[0062] Initial hash value H^(0): the standard initial value of the SHA-1 algorithm, used to start hash calculation;
[0063] Logical functions and constants: These are the internal operations and constants used in the SHA-1 algorithm to process data and generate hash values.
[0064] Block M^(i) and hash value H^(i): These two parameters are temporary representations of the data block and the corresponding hash value during the calculation process;
[0065] Final hash value: This is the result output, a 160-bit hash value that uniquely represents the original input data;
[0066] This is the most basic operation process and parameter meaning of the SHA-1 hash function. Hashing: The pre-processed frequency domain features are processed by the SHA-1 hash function. The SHA-1 hash function takes a byte string of arbitrary length as input and, through a specific algorithm, transforms it into a 160-bit string output. Each character is a hexadecimal number representing the hash value of the input.
[0067] Hash value acquisition: Through the above steps, we obtain a hash value for each frequency domain feature. This hash value is like a unique identifier for the feature value. The same feature value will have the same hash value after the same hash function.
[0068] Sequence Generation: We then concatenate the hash values corresponding to all frequency domain features in the order of the frequency domain features to form a hash value sequence. This sequence is equivalent to a compressed representation of the drone signal's frequency domain features, and contains all the information of the original drone signal after feature extraction and hashing.
[0069] Preferably, the specific operation steps of the filtering are as follows:
[0070] The first step is to determine the frequency amplitude of the filter. The processed drone signals are concentrated in the 2.4GHz and 5.8GHz frequency bands, so the average frequency of the filter, that is, the center frequency fc, can be set to 4GHz, the lower limit frequency f1 is 2GHz, and the upper limit frequency f2 is 6GHz.
[0071] In the second step, the order N is selected as 10;
[0072] The third step is to implement the filter. Software filters can be implemented with the help of the signal processing toolbox of MATLAB or Python computing software. Hardware filters require circuit design and construction based on the characteristic parameters of the corresponding filter.
[0073] The fourth step is the filtering operation. The signal to be processed is input into the filter, and the output is the filtered signal.
[0074] Preferably, the denoising process includes:
[0075] Step 1: Signal decomposition
[0076] We first decompose the received signal into several orthogonal subspaces, that is, decompose the broadband signal into several narrowband signals; assuming the received signal is x(t), where t is time, our goal is to decompose the signal x(t) into a series of sub-signals x_i(t); each sub-signal x_i(t) is independent of each other in frequency, forming a series of discrete sub-bands; the bandwidth of each sub-signal x_i(t) can be set to 1MHz; frequency decomposition can be achieved through Fourier transform, and the formula is X_i(f) = ∫x(t)e^(-j2πft)dt,
[0077] Where Xi(f) is the signal strength at frequency f, and the integration is performed within each subspace frequency range.
[0078] "∫" represents the integral symbol, which means the integration operation of the continuous function x(t);
[0079] "x(t)" represents the continuous-time signal;
[0080] "e" is the base of natural logarithms, approximately equal to 2.71828, and is an irrational number;
[0081] "^(-j2πft)" is the frequency-related part, where j is the imaginary unit, f usually represents the frequency of the signal, and t represents time;
[0082] The meaning of the whole formula is to perform Fourier transform on the signal x(t) to obtain the signal strength X(f) at each frequency f, that is, to convert the time domain signal into the frequency domain;
[0083] Step 2: Subband processing
[0084] In each frequency subband, the signal is processed separately; we can calculate the average energy E_i of the signal in each subband, and the formula is E_i = ∫|X_i(f)|^2df, where ∫ is the integral over the frequency range of each subspace;
[0085] E_i: refers to the energy in the i-th frequency band, so in electrical signal processing, it represents the signal strength of this frequency band;
[0086] ∫ is the integration symbol, which here means integrating the signal over a specific frequency range;
[0087] Xi(f): is the i-th frequency segment of the frequency domain signal after Fourier transform; Fourier transform can convert the time domain signal into the frequency domain signal, which is convenient for us to analyze in the frequency domain;
[0088] |X_i(f)|^2: This term is the square of the amplitude of the signal in the frequency domain, also known as the power spectral density. In electrical signal processing, this is often used to represent the energy at each frequency. The absolute value |.| represents the modulus of the complex number, which, when squared, gives the energy at that frequency.
[0089] df: is a small frequency element used for integral expression;
[0090] So the overall meaning of this formula is: for each small frequency interval df, calculate its energy X_i(f)^2, and then sum the energies of all frequency intervals to get the total energy of the i-th frequency band;
[0091] Step 3: Noise Removal
[0092] We determine an energy threshold E_threshold. If the energy E_i of a sub-band is greater than the threshold E_threshold, then it is considered that there is a useful signal in this sub-band; otherwise, it is considered that there is only noise in this sub-band.
[0093] Preferably, the operation of implementing the automatic gain control (AGC) is performed according to the following steps:
[0094] Step 1: Get the original signal; the original signal Vin(t) is the signal whose gain is to be controlled;
[0095] Step 2: Calculate the current gain μ. The current gain μ can be set to an initial value and then dynamically adjusted according to the algorithm.
[0096] Step 3: Set the expected signal value. The expected signal value yd is a preset target value that can be set based on the requirements of subsequent processing steps and the actual signal strength. The important point is that yd should be within the reach of Vin(t).
[0097] Step 4: Iteratively adjust the gain. Use the AGC algorithm to continuously adjust the gain μ. Take the current signal Vin(t), and then use the AGC algorithm formula to obtain the adjusted signal Vin(t+1) at the next moment: Vin(t+1)=Vin(t) / (1+μ(y(t)-yd))
[0098] Where y(t) is the current signal power after other preprocessing steps. If y(t) deviates too much from yd, further adjustment is performed.
[0099] Step 5: Feedback correction. What we need to do is to constantly check Vin(t+1). If Vin(t+1) is approximately yd, it indicates that the AGC has good adaptability. If Vin(t+1) is still far from yd, gain feedback correction is required, and the gain μ is readjusted. Continue to perform the above steps until Vin(t+1) is close enough to yd.
[0100] Preferably, the main frequency f_p can be determined by finding the maximum energy position in the spectrum, and the formula is expressed as follows:
[0101] f_p=argmax(k)(|X[k]|^2)
[0102] Among them, the argmax() function is used to find the value of the independent variable that can maximize the function value, here it is to find the frequency that maximizes the energy; the frequency value here needs to be converted to the actual physical frequency, and the conversion coefficient depends on the sampling frequency of the original signal and the number of sampling points of the FFT.
[0103] Find the frequency corresponding to the maximum energy of a signal in the frequency domain. Each indicator represents the following meaning:
[0104] f_p: represents the frequency with the maximum power spectral density (or energy).
[0105] argmax(): is a mathematical operator that represents the value of the parameter that maximizes the expression inside the brackets. In this context, argmax(k)(|X[k]|^2) represents the frequency k when |X[k]|^2 reaches its maximum value.
[0106] k: represents the frequency index, that is, the serial number of the frequency component of X. Each frequency is traversed to find the frequency that makes the expression reach the maximum value.
[0107] X[k]: represents the signal strength at frequency k after Fourier transform.
[0108] |X[k]|^2: represents the square of the signal strength at frequency k. This is a common way to calculate power spectral density.
[0109] Therefore, the meaning of f_p=argmax(k)(|X[k]|^2) is to find the frequency that maximizes the power spectrum density. We define this frequency as f_p, which is used to analyze and identify the characteristics of the signal.
[0110] Power or amplitude
[0111] For the complex number X[k] at frequency k, we have mentioned that the square value of its modulus |X[k]|^2 represents the energy intensity at that frequency position; therefore, we can directly calculate |X[k]|^2 to obtain the power at frequency k;
[0112] Similarly, we can also get the total power of the entire signal by calculating the power of all frequency positions:
[0113] E=Σ|X[k]|^2
[0114] Dividing the total power by the number of FFT sampling points N gives the average power of the signal:
[0115] E: represents the total power of the signal; this value is obtained by calculating the power (that is, the square of the signal strength) of all frequency positions in the frequency domain and their sum;
[0116] Σ: It is the mathematical symbol for summation, which means that we add up the power |X[k]|^2 at all frequency positions k;
[0117] |X[k]|^2: represents the square of the signal strength at frequency k. This is a way to measure the signal strength per unit frequency, that is, the power at frequency k;
[0118] E_avg=E / N
[0119] N: is the number of sampling points of Fourier transform. When performing Fourier transform, the signal is divided into N points for processing;
[0120] E_avg: is the average power of the signal, which is obtained by dividing the total power E by the number of sampling points N. The average power reflects the average power intensity per unit frequency;
[0121] In addition, we can also obtain the main frequency power and peak power of the signal by respectively calculating the power of the signal at the main frequency position and the maximum power of all frequency positions;
[0122] Phase
[0123] In signal processing, for a complex number X[k] at frequency k, its phase is equal to
[0124] arctan(Im(X[k]) / Re(X[k])), the value range is [-π,π].
[0125] The present invention generates and compares signal hash value sequences by utilizing frequency domain characteristics, which can not only withstand the influence of various signal attenuation, fluctuation, interference, etc., but also greatly improve the efficiency of signal recognition while ensuring high accuracy.
[0126] By utilizing the frequency domain characteristics to generate and compare signal hash value sequences, it can not only withstand the influence of various signal attenuation, fluctuations, interference, etc., but also greatly improve the efficiency of signal recognition while ensuring high accuracy. DETAILED DESCRIPTION
[0127] In order to make the objects and advantages of the present invention more clearly understood, the present invention is further described below in conjunction with embodiments; it should be understood that the specific embodiments described herein are merely used to explain the present invention and are not intended to limit the present invention.
[0128] A drone signal recognition method based on frequency domain hash value sequence comparison utilizes frequency domain characteristics to generate and compare signal hash value sequences. It can not only withstand the influence of various signal attenuation, fluctuation, interference, etc., but also greatly improve the efficiency of signal recognition while ensuring high accuracy.
[0129] Acquire drone signals and mark the collected signals;
[0130] To collect drone radio signals, we need specialized hardware, such as a radio spectrum analyzer with a highly sensitive receiver that can capture radio signals covering the 2.4GHz and 5.8GHz frequency bands commonly used by drones.
[0131] When selecting the sampling frequency, we base it on the characteristics of drone signals. Considering that most drones operate in the 2.4 GHz or 5.8 GHz frequency bands, the sampling frequency should be at least twice that to satisfy the Nyquist sampling theorem. Therefore, the sampling frequency can be set to 12 GHz to ensure the integrity of the signal information.
[0132] In terms of hardware performance, we need to consider parameters such as the spectrum analyzer's frequency range, receiver sensitivity, and sampling rate to ensure it can effectively capture and process drone signals. For example, the spectrum analyzer needs to cover the frequency range of drone radio signals, the receiver sensitivity needs to be high enough to capture weak drone signals, and the sampling rate needs to be fast enough to adapt to the changing speed of drone signals.
[0133] Based on the propagation characteristics of radio signals in real-world environments, we need to perform appropriate corrections and compensation on the collected signals. For example, we can compensate for signal attenuation that may occur during radio signal propagation by increasing the receive gain. We can also compensate for signal coherence interference caused by multipath by introducing an appropriate time delay to ensure proper signal demodulation and recognition.
[0134] Users can further classify and mark the acquired signals according to criteria such as regional location and duration. The marking categories may include:
[0135] Region: Drone signals can be tagged and classified based on their region of origin. This can include geographic location information such as country, city, airport, and military base. Regional tagging and classification can help understand the origin and range of drone activity, facilitating drone management and monitoring.
[0136] Time: Drone signals can be tagged and classified based on the time of their occurrence, which can include date, time period, season, and other temporal information. By using time-stamped classification, we can understand drone activity patterns and trends, helping to develop appropriate management strategies and response measures.
[0137] Mission Type: Drone signals can be tagged and categorized based on the mission they are performing. This can include military reconnaissance, aerial photography, logistics and transportation, agricultural operations, and other different mission types. By labeling and categorizing mission types, we can understand the purpose and application areas of drones, facilitating targeted management and regulation.
[0138] Drone Model: Drone signals can be tagged and categorized based on the drone model they belong to. Different drone models have different characteristics and capabilities. By categorizing drone models, you can better understand the technical specifications and potential risks of drones.
[0139] Flight Behavior: Drone signals can be tagged and classified based on their flight behavior. This can include information on flight parameters such as altitude, speed, and track. By categorizing flight behavior, we can understand the drone's behavior patterns and flight characteristics, helping to determine its intent and risk level.
[0140] Through the above tag classification, the acquired drone signals can be classified and analyzed more carefully and comprehensively, thereby providing more effective support for drone management, monitoring and security.
[0141] Signal preprocessing:
[0142] We need to preprocess the received drone signal to improve its quality. Preprocessing usually includes filtering, denoising, and gain control.
[0143] Filtering improves signal quality by removing unnecessary frequency components, such as using a bandpass filter to retain only the specific frequency bands used for drone communications. During denoising, spectral subtraction can be used to reduce or eliminate noise components in the observed signal. Gain control ensures that each processed signal is within an appropriate range, preventing excessive or insufficient signals from affecting subsequent processing.
[0144] In drone signal processing, the Butterworth filter can effectively filter out noise and unnecessary spectral components:
[0145] Designing a Butterworth filter: First, we need to determine the filter's cutoff frequency and filter order. The cutoff frequency is the frequency at which the filter begins to significantly reduce the input signal power. Generally, the cutoff frequency should be set to filter out signals outside the frequency range of the drone signal. The filter order indicates the steepness of the filter's transition band. A higher order results in a steeper filter slope and more accurate signal filtering. However, an excessively high order increases the filter's computational complexity. This is a trade-off that needs to be determined based on the actual application requirements.
[0146] The steps of drone signal preprocessing include filtering, denoising, and gain control. The specific methods and related algorithms for each step are as follows:
[0147] 1. Filtering
[0148] Filtering: The purpose of filtering is to reduce the unwanted frequency components in the drone signal. In this process, we may use a Butterworth bandpass filter.
[0149] Butterworth filters, also known as ripple-free filters or maximally flat filters, have a frequency response curve that is flat within the passband. A major feature of the Butterworth filter is its very flat frequency response curve when switching between the passband and stopband. Compared to other filters, the Butterworth filter better maintains signal integrity and reduces signal distortion. The mathematical expression of the Butterworth bandpass filter is shown in the following formula:
[0150] H(f)=sqrt{1 / [1+((f-fc) / (f2-f1))^2N]}
[0151] Here, f is the frequency, fc is the center frequency, f1 and f2 are the filter's passband boundaries, i.e., the lower and upper frequencies, respectively, and N is the filter order. This formula essentially combines the characteristics of high-pass and low-pass Butterworth filters. When the frequency f is between f1 and f2, i.e., within the passband, H(f) approaches 1, indicating that these frequency components are retained. When the frequency f is far from the center frequency fc, i.e., within the stopband, H(f) approaches 0, indicating that these frequency components are suppressed. Therefore, this filter retains signals near the center frequency while suppressing signals far from the center frequency.
[0152] The specific steps are as follows:
[0153] The first step is to determine the frequency range of the filter. Here, we will be processing drone signals primarily in the 2.4 GHz and 5.8 GHz frequency bands, so the filter's average frequency, or center frequency fc, can be set to 4 GHz, with a lower limit frequency f1 of 2 GHz and an upper limit frequency f2 of 6 GHz.
[0154] The second step is to select the filter order. A higher filter order results in a sharper frequency response and a steeper stopband slope, but this also results in a longer signal propagation delay and potentially increased signal distortion. Conversely, a lower filter order results in a more ambiguous frequency response and a gentler stopband slope, but this also results in a lower signal propagation delay and potentially reduced signal distortion. Here, we set the order N to 10.
[0155] The third step is to implement the filter. Software implementation can be performed using the signal processing toolbox in MATLAB or Python computing software. Hardware filters require circuit design and construction based on the filter's characteristic parameters.
[0156] The fourth step is the filtering operation. The signal to be processed is input into the filter, and the output is the filtered signal.
[0157] The final step is effect evaluation. In a specific application, we hope that the filter can effectively filter out the interference signal and retain the drone signal we need.
[0158] 2. Denoising
[0159] Spatial filtering is a common denoising method that decomposes the signal into several orthogonal subspaces and then processes each subspace separately. This typically involves taking the statistical average of each subspace. This effectively reduces random noise in the signal. For example, we decompose the received signal into several independent subbands, each with a frequency width of 1 MHz. The statistical average of the energy in each subband is then taken to minimize the random noise energy within the subband.
[0160] Step 1: Signal decomposition
[0161] We first decompose the received signal into several orthogonal subspaces, that is, decompose the broadband signal into several narrowband signals. Assuming that the received signal is x(t), t is time, our goal is to decompose the signal x(t) into a series of sub-signals x_i(t). Each sub-signal x_i(t) is independent of each other in frequency, forming a series of discrete sub-bands. The bandwidth of each sub-signal x_i(t) can be set to 1MHz. Frequency decomposition can be achieved through Fourier transform, and the formula is X_i(f)=∫x(t)e^(-j2πft)dt,
[0162] Where Xi(f) is the signal strength at frequency f, and the integration is performed within each subspace frequency range.
[0163] "∫" represents the integral symbol, which means the integration operation is performed on the continuous function x(t).
[0164] "x(t)" represents the continuous-time signal.
[0165] "e" is the base of natural logarithms, approximately equal to 2.71828, and is an irrational number.
[0166] "^(-j2πft)" is the frequency-dependent part, where j is the imaginary unit, f usually represents the frequency of the signal, and t represents time.
[0167] The meaning of the entire formula is to perform Fourier transform on the signal x(t) to obtain the signal strength X(f) at each frequency f, that is, to convert the time domain signal into the frequency domain.
[0168] Step 2: Subband processing
[0169] The signal is then processed separately within each subspace, or frequency subband. Since the frequency of the signal within each subband does not vary much, we can assume that the amplitude of the signal within that subband is constant. Therefore, we can calculate the average energy E_i of the signal within each subband using the formula E_i = ∫|X_i(f)|^2df, where ∫ is the integral over the frequency range of each subspace.
[0170] Step 3: Noise Removal
[0171] We then determine an energy threshold, E_threshold. If the energy E_i of a subband exceeds the threshold, we assume that there is a useful signal in that subband; otherwise, we assume that there is only noise. Since random noise typically has low energy, this method can effectively eliminate it.
[0172] 3. Gain Control
[0173] Gain Control: When receiving drone signals, the received signal power may vary significantly due to various environmental factors and the characteristics of the drone signal. To ensure that the signal can be properly processed in subsequent steps, we use a gain control algorithm to dynamically adjust the gain. Here, we use the most common automatic gain control (AGC) algorithm.
[0174] The AGC algorithm continuously adjusts the gain to ensure that the average power of the signal reaches a preset target value. Its algorithm expression is: Vin(t+1)=Vin(t) / (1+μ(y(t)-yd)), where Vin(t) is the original signal value, μ is the gain step size, y(t) is the signal value after filtering and denoising, and yd is the desired signal value.
[0175] The operation of implementing automatic gain control (AGC) can be carried out as follows:
[0176] Step 1: Get the original signal. The original signal Vin(t) is the signal whose gain is to be controlled.
[0177] Step 2: Calculate the current gain μ. The current gain μ can be set to an initial value and then dynamically adjusted according to the algorithm.
[0178] Step 3: Set the expected signal value. The expected signal value yd is a preset target value that can be set based on the requirements of subsequent processing steps and the actual signal strength. It is important that yd is within the reach of Vin(t).
[0179] Step 4: Iteratively adjust the gain. Use the AGC algorithm to continuously adjust the gain μ. Take the current signal Vin(t), and then use the AGC algorithm formula to get the adjusted signal Vin(t+1) at the next moment: Vin(t+1)=Vin(t) / (1+μ(y(t)-yd))
[0180] Where y(t) is the current signal power after other preprocessing steps (such as filtering and denoising). If y(t) deviates too much from yd, further adjustments are made.
[0181] Step 5: Feedback Correction. We need to continually check Vin(t+1). If Vin(t+1) is approximately yd, the AGC is adaptable. If Vin(t+1) is still significantly different from yd, gain feedback correction is necessary, re-adjusting the gain μ. Continue the above steps until Vin(t+1) is sufficiently close to yd.
[0182] This process is repeated at every sampling moment to ensure that the average signal power remains close to the target value yd. For example, if our yd is -20dBm, we continue to adjust the gain μ to keep the power of Vin(t) as close to -20dBm as possible. When the signal power of Vin(t) exceeds -20dBm, the gain μ is reduced, and vice versa, it is increased until the power of Vin(t) stabilizes at around -20dBm.
[0183] The filtering, denoising and gain control mentioned above have greatly improved the quality of drone signals and provided good input for the subsequent drone signal recognition and analysis process.
[0184] Time domain to frequency domain transformation
[0185] Step 1: Frequency Measurement
[0186] For the obtained radio signal samples, we next need to measure the frequency. This step is usually achieved by using the Fast Fourier Transform (FFT) to convert the original time domain signal into a frequency domain signal. Simply put, the so-called FFT is an efficient algorithm that can convert a complex time domain signal into its spectral representation. This process can be implemented using the following formula:
[0187] The basic formula for FFT is:
[0188] X(k)=Σ[x(n)*e^(-j*2π*k*n / N)](for k=0,1,2,...,N-1)
[0189] The parameters of this formula have the following meanings:
[0190] X(k): These are the outputs of the discrete Fourier transform and represent the complex magnitudes of the frequency components at frequency k. They capture both the magnitude and phase of the input signal x(n) at each frequency. This is why we say the FFT output is a spectrum: the spectrum is the collection of frequency components of the signal, with each frequency represented by a complex number representing its magnitude and phase.
[0191] x(n): It is the input of the discrete Fourier transform, usually a series of sample values in the time domain, which can be real or complex.
[0192] e: is the base of natural logarithm, a fixed constant, approximately equal to 2.71828.
[0193] j: is an imaginary unit, satisfying j^2=-1.
[0194] π: is the circumference of a circle, approximately equal to 3.14159.
[0195] k: is the discrete value of frequency, and its value range is 0 to N-1. The value of k / N represents the normalized version of the frequency, 0 represents 0 frequency, and 1 represents the highest frequency (equal to half the sampling rate).
[0196] n: is a discrete value of time, representing the specific position of the sample point in the input sample x(n), and its value range is also 0 to N-1.
[0197] N: is the size of the FFT, that is, the number of sample points in the input signal x(n)
[0198] Using the above formula, we can obtain the signal strength at each frequency point, thereby generating a spectrum diagram.
[0199] What we are looking for is the frequency in the spectrum graph that corresponds to the maximum intensity, which is marked as f_r.
[0200] Step 2: Calculate the frequency deviation
[0201] Once we have f_r, we can compare it with the frequency f_0 to calculate the frequency deviation. Here, f_0 is the frequency set in the quality control or protocol. The frequency deviation can be calculated using the formula Δf = f_r - f_0. Here, Δf represents the frequency offset.
[0202] Step 3: Perform frequency calibration
[0203] After knowing the frequency deviation Δf, we can perform frequency calibration on the device. Specifically, we need to adjust the frequency of the local oscillator of the receiving device to eliminate the frequency deviation Δf so that the frequency of the receiving device is consistent with the frequency.
[0204] In practice, this can be achieved by adjusting the control voltage of the local oscillator. Generally, increasing the control voltage will increase the frequency, while decreasing it will decrease the frequency.
[0205] A voltage-controlled oscillator (VCO) is an oscillator whose frequency is affected by a control voltage. In a system, if we want to adjust the VCO's frequency, we can do so by changing the control voltage. For example, if the measured frequency of the received high-frequency signal, f_r, is lower than our target frequency, f_0, we need to increase the VCO's control voltage to raise the frequency. This process may require several iterative steps, with each step measuring the updated frequency, f_r, to confirm its proximity to the target frequency, f_0. If not, we need to continue adjusting the control voltage until f_r is close enough to f_0 to achieve high-frequency compensation.
[0206] Alternatively, this can be accomplished by changing the values of certain components in the oscillator circuit. In practice, first measure the original oscillation frequency f_r and then calculate the corresponding L and C values using the above formula. Next, estimate the new L or C values that need to be changed to bring the oscillation frequency closer to the target frequency f_0. Then, replace the corresponding inductor or capacitor components in the oscillation circuit to change the oscillation frequency.
[0207] In practical applications, we can change the value of inductance L by adjusting the number of turns in the coil or using a component called a variable inductor. We can change the value of capacitance C by connecting different capacitors in parallel or series or using a component called a variable capacitor.
[0208] Some devices may also have a dedicated frequency calibration interface. By inputting specific control signals through these interfaces, the frequency of the local oscillator can be increased or decreased to achieve the desired frequency f_0.
[0209] The dominant frequency is a characteristic that describes the repetition rate of a periodic signal. In signal processing, it typically refers to the frequency with the maximum value in the signal's power spectral density. For a discrete signal, we can convert it to the frequency domain using a fast Fourier transform (FFT). The frequency corresponding to this maximum value is the dominant frequency of the signal.
[0210] Specifically, the FFT converts the original time-domain signal into complex values at different frequency locations. For the complex number X[k] at frequency k (consisting of the real part Re(X[k]) and the imaginary part Im(X[k])), the square of its modulus |X[k]|^2 represents the energy intensity at that frequency location.
[0211] Therefore, the main frequency f_p can be determined by finding the maximum energy position in the spectrum. The formula is as follows:
[0212] f_p=argmax(k)(|X[k]|^2)
[0213] The argmax() function is used to find the value of the independent variable that maximizes the function value. In this case, it is to find the frequency that maximizes the energy. It is important to note that the frequency value here may need to be converted to the actual physical frequency. The conversion coefficient depends on the sampling frequency of the original signal and the number of sampling points of the FFT.
[0214] Power or amplitude
[0215] The power or amplitude of a signal is an important characteristic that describes its energy. For the complex number X[k] at frequency k, we've already mentioned that the square of its modulus, |X[k]|^2, represents the energy intensity at that frequency. Therefore, we can directly calculate |X[k]|^2 to obtain the power at frequency k.
[0216] Similarly, we can also get the total power of the entire signal by calculating the power of all frequency positions:
[0217] E=Σ|X[k]|^2
[0218] Dividing the total power by the number of FFT sampling points N gives the average power of the signal:
[0219] E_avg=E / N
[0220] In addition, we can also obtain the main frequency power and peak power of the signal by respectively calculating the power of the signal at the main frequency position and the maximum power of all frequency positions.
[0221] Phase
[0222] The phase of a signal is an important characteristic that describes its changing trend. In signal processing, phase is often used to describe a signal's time delay or waveform shape. For a complex number X[k] at frequency k, its phase is equal to arctan(Im(X[k]) / Re(X[k])), and its value ranges from [-π, π].
[0223] Feature Normalization:
[0224] Feature normalization has two main purposes: First, by scaling feature values, we ensure that the model doesn't have to deal with very large or very small values. Second, if features have a wide range of values, the model may be overly sensitive to certain features and ignore others. Normalization helps us learn all features in the same scale space.
[0225] In practice, we typically use minimum-maximum normalization or Z-score normalization. Minimum-maximum normalization linearly transforms the original data to the interval [0, 1] using the formula: x' = (x-min) / (max-min). This method requires clear upper and lower bounds on the original data distribution and has a limited applicability.
[0226] Z-score normalization transforms the raw data into a standard normal distribution. The specific conversion formula is: x' = (x - μ) / σ, where μ is the mean of the raw data and σ is the standard deviation of the raw data. This method has a wide range of applications, but it may cause uneven distribution of the normalized results due to peakedness or skewness in the frequency distribution.
[0227] Feature Selection:
[0228] The goal of feature selection is to reduce the number of features in order to improve model learning efficiency and avoid the curse of dimensionality. Generally speaking, the number of frequency features is small, so learning directly on all frequency features is not a problem. However, if we introduce more features, such as time-frequency features, the number of features may increase dramatically. In this case, feature selection methods are needed to reduce the number of features.
[0229] There are many methods for feature selection, including statistical methods such as ANOVA; experimental design methods such as the optimal subset method; and machine learning methods such as regularization methods or tree-based feature selection methods.
[0230] Feature dimensionality reduction:
[0231] Similar to feature selection, feature dimensionality reduction aims to reduce the number of features and can also be used for visualization purposes. The goal of feature dimensionality reduction is to find a new feature representation space that has a reduced dimensionality while preserving the original data's structural information as much as possible. Principal component analysis (PCA) and linear discriminant analysis (LDA) are commonly used methods for feature dimensionality reduction.
[0232] Principal component analysis (PCA) is an unsupervised feature dimensionality reduction method that finds the directions of maximum variance in the original data and uses these directions as a new feature representation space. Specifically, we first calculate the covariance matrix of the data and then calculate the eigenvalues and eigenvectors of this covariance matrix. The eigenvectors define the new feature space, and we can select the eigenvectors corresponding to the largest eigenvalues as our new feature space.
[0233] Generate a hash value sequence
[0234] After extracting spectral features, we need to construct a hash value sequence, a common step in signal processing. A hash function generates a fixed-length string based on its input, often used as a means of data storage and fast querying. Using a hash function, we can map complex spectral features to a simple hash value sequence, making the data easier to understand and process.
[0235] Hash function selection: Several factors should be considered when choosing a hash function. First, the hash function must minimize the probability of hash collisions. Hash collisions occur when different inputs produce the same output after running the hash function. This can result in information loss and should be avoided as much as possible. Second, the hash function's algorithmic complexity should be minimal, otherwise it will cause significant delays when processing large amounts of feature data. Common hash functions include MD5, CRC32, and SHA1.
[0236] Feature encoding: After obtaining the hash function, we need to encode the spectral features. Their values are converted into strings. At the same time, it may be necessary to perform some preprocessing on the feature values, such as standardization or normalization, to ensure the uniformity of the hash value.
[0237] Generating a hash value sequence: Finally, we feed the processed spectral features into a hash function to generate a hash value sequence. Each spectral feature corresponds to a hash value, and all hash values are concatenated in a specific order to form a hash value sequence. The hash value sequence can be considered a compressed representation of the spectral features, containing information such as frequency, amplitude, and phase.
[0238] Signal matching and identification
[0239] Generating a hash value sequence is only the first step in drone signal recognition. Next, the newly generated hash value sequence needs to be compared with a hash value sequence library pre-stored in the database to ultimately achieve drone signal recognition.
[0240] Build a hash sequence database: This database stores the hash sequences of different drones, which serve as the basis for comparison and identification. For each type of drone, we need to obtain the spectral characteristics of its signal in advance, process it with a hash function, and store the result in the database.
[0241] Generate a hash value sequence for a new signal: When we get a new drone signal, we first need to extract features through spectrum analysis, and then use the same hash function to generate a hash value sequence.
[0242] Hash value comparison: The new hash value sequence is compared with every hash value sequence in the database to find the sequence that is closest to the new signal. The "closest" here is usually measured by Euclidean distance.
[0243] Euclidean distance calculation formula: D = sqrt[∑_(i=1)^n(xi-yi)2]
[0244] Where D represents the distance between two hash value sequences, n is the length of the hash value sequence, xi and yi are the values of the new signal and the signal stored in the library at the i-th hash value, respectively.
[0245] Signal Identification: The drone type corresponding to the hash value sequence with the smallest Euclidean distance is considered the source of the new signal. If all distances exceed a preset threshold, the new signal may be from a new type of drone or a misidentification due to factors such as noise.
[0246] The specific implementation of the SHA-1 hash function involves complex bit manipulation and logic functions. For ordinary users, there's no need to delve into these details, as most programming languages provide ready-made SHA-1 functions. For example, in Python's hash library, you can create a SHA-1 hash object simply by calling hashlib.sha1() . Then, use the object's update() method to input the data to be hashed, and then use the hexdiggest() method to retrieve the hash value.
[0247] The following are the code representations of some basic steps of the SHA-1 hash function and the corresponding parameter descriptions:
[0248] Preprocessing: Pad the input data to a multiple of 512 bits. This step involves appending a '1' bit to the end of the data, followed by the necessary number of '0' bits, and finally, if necessary, the binary representation of the original data length. The processed data is divided into L 512-bit blocks, each denoted M^(i), where i = 0, 1, 2, ..., L-1.
[0249] Initialization: Set five initial hash values H^(0) = (h0, h1, h2, h3, h4) = (0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476, 0xC3D2E1 F0). These values are the standard initial seed values for the SHA-1 algorithm.
[0250] Processing: For each block M^(i), an 80-step calculation process is performed to generate a new hash value H^(i+1). This process includes word expansion and an 80-step main loop, which uses some specific logic functions and constants.
[0251] Output: The final hash value is the concatenation of the calculation results H^(L) of L blocks. Because each H^(i) consists of 5 32-bit numbers, the final hash value length is 160 bits.
[0252] In the above steps, the meaning of each parameter is:
[0253] Data M: is the original input data, which needs to be hashed.
[0254] Initial hash value H^(0): The standard initial value of the SHA-1 algorithm, used to start hash calculation.
[0255] Logical functions and constants: These are the internal operations and constants used by the SHA-1 algorithm to process data and generate hash values.
[0256] Block M^(i) and hash value H^(i): These two parameters are temporary representations of the data block and the corresponding hash value during the calculation process.
[0257] Final hash value: This is the resulting output, a 160-bit hash value that uniquely represents the original input data.
[0258] This is the most basic operation process and parameter meaning of the SHA-1 hash function. Hashing: The preprocessed frequency domain features are processed through the SHA-1 hash function. The SHA-1 hash function takes a byte string of arbitrary length as input and, through a specific algorithm, transforms it into a 160-bit string output. Each character is a hexadecimal number representing the hash value of the input.
[0259] Generate a hash value sequence
[0260] Hash value acquisition: Through the above steps, we obtain a hash value for each frequency domain feature. This hash value is like a unique identifier for the feature value. The same feature value will have the same hash value after the same hash function.
[0261] Sequence Generation: We then concatenate the hash values corresponding to all frequency-domain features in the order of the frequency-domain features to form a hash value sequence. This sequence is equivalent to a compressed representation of the drone signal's frequency-domain features, containing all the information from the original drone signal after feature extraction and hashing.
[0262] In the real world, drone signal recognition involves large datasets, and there are many possible hash value sequences that each drone might generate. In this simplified assumption, let's imagine that we have built a hash value database containing the signal characteristics of four types of drones at different frequencies:
[0263] plaintextCopy code
[0264] Drone Type 1:
[0265] 100Hz signature --> SHA-1 hash: 5feceb66ffc86f38d952786c6d696c79c2dbc239
[0266] 200Hz feature --> SHA-1 hash: 6dcd4ce23d88e2ee95838f7b014b6284f4b4f4f1 ...
[0268] Drone Type 2:
[0269] 100Hz signature --> SHA-1 hash: 2a72d92c3a3e67a7ed51 b50a5f7f24428464aac7
[0270] 200Hz feature --> SHA-1 hash value:
[0271] fa2345f64729902a16ed029e2629c557a3c53c23 ...
[0273] Drone Type 3:
[0274] 100Hz signature --> SHA-1 hash: 5734173a31 a4218bc86e8f4e725f6d19e94831 a4
[0275] 200Hz signature --> SHA-1 hash: 2395987650298deca0472db2bdba7762e9834867 ...
[0277] Drone Type 4:
[0278] 100Hz feature --> SHA-1 hash value:
[0279] bf5d4c76798ec2c6ef18a4118f04876a18cad900
[0280] 200Hz feature --> SHA-1 hash value:
[0281] b62a33b3c67df77823277b6d74d238dd1 f4c8106 ...
[0283] Now, suppose we receive an unknown drone signal. After extracting the frequency domain features and hashing, the resulting hash value is as follows:
[0284] plaintextCopy code
[0285] Unknown drone:
[0286] 100Hz signature --> SHA-1 hash: 2a72d92c3a3e67a7ed51 b50a5f7f24428464aac7
[0287] 200Hz feature --> SHA-1 hash value:
[0288] fa2345f64729902a16ed029e2629c557a3c53c23 ...
[0290] By comparing the hash value sequence, we found that the hash value sequence of the unknown drone is consistent with the hash value sequence of drone type 2 in the database, so we determined that this unknown drone is "drone type 2".
[0291] This process is a simplified example of hashing the drone signal based on the SHA-1 hash function and then comparing its hash value to identify the drone. In actual operation, complex signal processing and feature extraction steps may be required, and it may also be necessary to design a more complex hash function to achieve higher recognition accuracy.
[0292] The above-mentioned drone types can be divided according to actual conditions, including but not limited to:
[0293] Drone types can be categorized according to different criteria. Here are some common types of drones:
[0294] Classification by purpose:
[0295] Commercial drones: used for commercial activities such as film and television shooting, agricultural monitoring, construction inspection, etc.
[0296] Military drones: used for military purposes such as reconnaissance, attacking targets, and even transporting supplies.
[0297] Consumer drones: generally used by individuals for photography, entertainment, etc.
[0298] Public service drones: used for public services such as police, firefighting, and rescue.
[0299] Research drones: used for scientific research, such as environmental monitoring, climate research, etc.
[0300] Classification by flight mode:
[0301] Fixed-wing drones: Similar to traditional aircraft, they have stable flight performance and are usually used for long-distance flights.
[0302] Rotor UAVs: including quad-rotor, hexacopter and octocopter UAVs, which have strong hovering capabilities and are used for close-range flight.
[0303] Hybrid drones: Combine fixed-wing and rotary-wing flight modes, such as vertical take-off and landing drones (VTOL).
[0304] Classification by size and weight:
[0305] Micro UAVs: They are generally very light and small in size, and have good applications in some special environments.
[0306] Small drone: slightly heavier than micro drone, but still light and easy to carry.
[0307] Medium-sized drones: generally used in more complex commercial activities or research.
[0308] Large UAVs: They are large in size and heavy in weight, and are mostly used in military and scientific research.
[0309] In this way, we use a hash function to convert the characteristics of the drone signal into a hash value sequence, which can be used to identify and recognize the drone. During the comparison phase, we can perform the same processing on the new drone signal to obtain a new hash value sequence. This new hash value sequence is then compared with the old hash value sequence to find the matching drone type and complete the drone signal identification.
[0310] Thus far, the technical solutions of the present invention have been described in conjunction with the preferred embodiments shown. However, it will be readily understood by those skilled in the art that the scope of protection of the present invention is clearly not limited to these specific embodiments. Without departing from the principles of the present invention, those skilled in the art may make equivalent changes or substitutions to the relevant technical features, and the technical solutions after such changes or substitutions will fall within the scope of protection of the present invention.
Claims
1. A method for identifying drone signals based on frequency domain hash value sequence comparison, characterized in that: include:
1. Obtain drone signals, set the sampling frequency of the acquisition equipment to 12GHz, and mark the collected signals; 2. Preprocess the received drone signal. The steps of drone signal preprocessing include filtering, denoising and gain control; specifically, they include: (1) Filtering The filtering uses a Butterworth bandpass filter to reduce the unnecessary frequency components in the drone signal; The mathematical expression of using Butterworth bandpass filter is as follows: H(f)=sqrt{1 / [1+((f-fc) / (f2-f1))^2N]} Where f is the frequency, fc is the center frequency, f1 and f2 are the passband boundaries of the filter, i.e., the lower and upper frequencies, respectively, and N is the order of the filter; when the frequency f is between f1 and f2, i.e., within the passband, H(f) is close to 1, indicating that these frequency components are retained; and when the frequency f is far away from the center frequency fc, i.e., within the stopband, H(f) is close to 0, indicating that these frequency components are suppressed; (2) Denoising: The spatial filtering method is used for denoising, the signal is decomposed into several orthogonal subspaces, and then each subspace is processed separately, and the statistical average value of each subspace is bravely obtained; (3) Gain control In the process of receiving drone signals, we use the automatic gain control (AGC) algorithm; The AGC algorithm will continuously adjust the gain so that the average power of the signal reaches a preset target value; its algorithm expression is: Vin(t+1)=Vin(t) / (1+μ(y(t)-yd)), where Vin(t) is the original value of the signal, μ is the gain step, y(t) is the signal value after filtering and denoising, and yd is the expected signal value; 3. Time domain to frequency domain transformation Step 1: Frequency Measurement Fast Fourier transform is used to convert the original time domain signal into a frequency domain signal. This process can be achieved using the following formula: The basic formula for the Fast Fourier Transform is: X(k)=Σ[x(n)*e^(-j*2π*k*n / N)](for k=0,1,2,...,N-1) The parameters of this formula have the following meanings: X(k): It is the output of the discrete Fourier transform, representing the complex amplitude of the frequency component with frequency k; they capture the magnitude and phase information of the input signal x(n) at each frequency; each frequency has a complex number representing its amplitude and phase; x(n): It is the input of the discrete Fourier transform, which is a series of sample values in the time domain, including real or complex numbers; e: is the base of natural logarithm, a fixed constant, approximately equal to 2.71828; j: is an imaginary unit, satisfying j^2=-1; π: is the ratio of a circle to a circle, approximately equal to 3.14159; k: is the discrete value of frequency, and its value range is 0 to N-1. The value of k / N represents the normalized version of the frequency, 0 represents 0 frequency, and 1 represents the highest frequency; n: is a discrete value of time, representing the specific position of the sample point in the input sample x(n), and its value range is also 0 to N-1; N: is the size of the FFT, i.e. the number of sample points in the input signal x(n); Using the above formula, we can get the signal strength at each frequency point. What we want to find is the frequency with the maximum strength, marked as f_r; Step 2: Calculate the frequency deviation After we have f_r, we can compare it with the frequency f_0 to calculate the frequency deviation; here f_0 is the frequency set in the quality control or protocol; the frequency deviation can be calculated by the formula Δf = f_r-f_0; here Δf represents the frequency offset; Step 3: Perform frequency calibration After knowing the frequency deviation Δf, we can perform frequency calibration on the device; specifically, we need to eliminate the frequency deviation Δf by adjusting the frequency of the local oscillator of the receiving device so that the frequency of the receiving device is consistent with the target frequency; This can be done by adjusting the control voltage of the local oscillator. Generally, increasing the control voltage will increase the frequency, and vice versa, it will decrease the frequency; In the system, we adjust the frequency of the VCO by changing the control voltage or by changing the value of some components in the oscillator circuit. We can change the value of the capacitor C by adjusting the number of turns of the coil or by using a component called a variable inductor. For the capacitor C, we can change its value by connecting different capacitors in parallel or series or by using a component called a variable capacitor. The Fourier transform converts the original time domain signal into complex values at different frequency positions. For the complex number X[k] at frequency k (including the real part Re(X[k]) and the imaginary part Im(X[k])), the square value of its modulus |X[k]|^2 represents the energy intensity at that frequency position; Feature Normalization: We use maximum and minimum normalization or Z-Score normalization; maximum and minimum normalization linearly transforms the original data to the [0,1] interval, and the transformation formula is: x'=(x-min) / (max-min); Z-Score normalization converts the original data into a standard normal distribution. The specific conversion formula is: x' = (x-μ) / σ, where μ is the mean of the original data and σ is the standard deviation of the original data; 4. Generate hash value sequence After extracting the spectrum features, we need to construct a hash value sequence. The hash function generates a fixed-length string based on its input. Signal matching and identification Build a hash value sequence database: The hash value sequence database stores the hash value sequences of different drones, which is the basis for comparison and identification. For each type of drone, we need to obtain the spectrum characteristics of its signal in advance, and store the results in the database after hash function processing. Generate a hash value sequence for a new signal: When we get a new drone signal, we first need to extract features through spectrum analysis, and then use the same hash function to generate a hash value sequence; Hash value comparison: The new hash value sequence is compared with each hash value sequence in the database to find the sequence closest to the new signal; Euclidean distance calculation formula: D = sqrt [∑_(i = 1)^n(xi-yi)2] Where D represents the distance between two hash value sequences, n is the length of the hash value sequence, xi and yi are the values of the new signal and the signal stored in the library at the i-th hash value respectively; Signal identification: The drone type corresponding to the hash value sequence with the smallest Euclidean distance is considered to be the source of the new signal; In Python's hashlib library, you can create a SHA-1 hash object simply by using hashlib.sha1(), then use the object's update() method to input the data to be hashed, and then use the hexdigest() method to get the hash value; Hashing: The preprocessed frequency domain features are processed by the SHA-1 hash function. The SHA-1 hash function takes a byte string of any length as input and transforms it into a string of 160 bits through a certain algorithm. Each character is a hexadecimal number, representing the hash value of the input. Hash value acquisition: Through the above steps, we get a hash value for each frequency domain feature. This hash value is like a unique identifier for the feature value. The same feature value will get the same hash value after the same hash function. Sequence generation Then, we connect the hash values corresponding to all frequency domain features in the order of frequency domain features to form a hash value sequence; this sequence is equivalent to a compressed representation of the characteristics of the drone signal in the frequency domain, and they contain all the information of the original drone signal after feature extraction and hash processing.
2. According to claim 1, a method for identifying drone signals based on frequency domain hash value sequence comparison is characterized in that: The specific operation steps of the filtering are as follows: The first step is to determine the frequency amplitude of the filter; the processed drone signals are concentrated in the two frequency bands of 2.4GHz and 5.8GHz, so the average frequency of the filter, that is, the center frequency fc, can be set to 4GHz, the lower limit frequency f1 is 2GHz, and the upper limit frequency f2 is 6GHz; In the second step, the order N is selected as 10; The third step is to realize the filter. Software filters can be realized with the help of the signal processing toolbox of MATLAB or Python computing software. Hardware filters need to design and build circuits based on the characteristic parameters of the corresponding filters. The fourth step is the filtering operation. The signal to be processed is input into the filter, and the output is the filtered signal.
3. The method for identifying drone signals based on frequency domain hash value sequence comparison according to claim 1 is characterized in that: The denoising process includes: Step 1: Signal decomposition We first decompose the received signal into several orthogonal subspaces, that is, decompose the broadband signal into several narrowband signals; assuming that the received signal is x(t), t is time, our goal is to decompose the signal x(t) into a series of sub-signals x_i(t); each sub-signal x_i(t) is independent of each other in frequency, forming a series of discrete sub-bands; the bandwidth of each sub-signal x_i(t) can be set to 1MHz; frequency decomposition can be achieved through Fourier transform, and the formula is X_i(f)=∫x(t)e^(-j2πft)dt, Where X_i(f) is the signal strength at frequency f, and the integration is performed within the frequency range of each subspace. "∫" represents the integral symbol, which means the integration operation is performed on the continuous function x(t); "x(t)" represents the continuous-time signal; "e" is the base of natural logarithms, approximately equal to 2.71828, and is an irrational number; "^(-j2πft)" is the frequency-related part, where j is the imaginary unit, f usually represents the frequency of the signal, and t represents time; The meaning of the whole formula is to perform Fourier transform on the signal x(t) to obtain the signal strength X(f) at each frequency f, that is, to convert the signal in the time domain into the frequency domain; Step 2: Subband processing In each frequency subband, the signal is processed separately; we can calculate the average energy E_i of the signal in each subband, and the formula is E_i = ∫|X_i(f)|^2df, where ∫ is the integral within the frequency range of each subspace; E_i: refers to the energy in the i-th frequency band, so in electrical signal processing, it represents the signal strength of this frequency band; ∫ is the integral symbol, which here means integrating the signal over a certain frequency range; X_i(f): is the i-th frequency segment of the frequency domain signal after Fourier transform; Fourier transform can transform the time domain signal into the frequency domain signal, which is convenient for us to analyze in the frequency domain; |X_i(f)|^2: This term is the square of the amplitude of the signal in the frequency domain, or the power spectral density. In electrical signal processing, this is often used to represent the energy at each frequency. The absolute value |.| represents the modulus of the complex number, which is squared to give the energy at that frequency; df: is a small frequency element, used for integral expression; So the overall meaning of this formula is: for each small frequency interval df, calculate its energy X_i(f)^2, and then sum the energies of all frequency intervals to get the total energy of the i-th frequency band; Step 3: Noise Removal We determine an energy threshold E_threshold. If the energy E_i of a sub-band is greater than the threshold E_threshold, it is considered that there is a useful signal in this sub-band, otherwise it is considered that there is only noise in this sub-band.
4. The method for identifying drone signals based on frequency domain hash value sequence comparison according to claim 1 is characterized in that: The operation of implementing the automatic gain control (AGC) is performed according to the following steps: Step 1: Get the original signal; the original signal Vin(t) is the signal whose gain is to be controlled; Step 2: Calculate the current gain μ. The current gain μ can be set to an initial value and then dynamically adjusted according to the algorithm. Step 3: Set the expected signal value. The expected signal value yd is a preset target value. This value can be set according to the requirements of subsequent processing steps and the actual signal strength. The important point is that yd should be within the reachable range of Vin(t). Step 4: Iteratively adjust the gain, use the AGC algorithm to continuously adjust the gain μ, take the current signal Vin(t), and then use the AGC algorithm formula to get the adjusted signal Vin(t+1) at the next moment: Vin(t+1)=Vin(t) / (1+μ(y(t)-yd)) Among them, y(t) is the current signal power after other preprocessing steps. If y(t) deviates too much from yd, it is further adjusted; Step 5: Feedback correction. What we need to do is to check Vin(t+1) continuously. If Vin(t+1) approches yd, it indicates that the AGC has good adaptability. If Vin(t+1) is still far away from yd, gain feedback correction is required. Readjust the gain μ and continue to perform the above steps until Vin(t+1) is close enough to yd.
5. The method for identifying drone signals based on frequency domain hash value sequence comparison according to claim 1 is characterized in that: The main frequency f_p can be determined by finding the maximum energy position in the spectrum, and the formula is expressed as follows: f_p=argmax(k)(|X[k]|^2) Among them, the argmax() function is used to find the value of the independent variable that can maximize the function value, here it is to find the frequency that maximizes the energy; the frequency value here needs to be converted to the actual physical frequency, and the conversion coefficient depends on the sampling frequency of the original signal and the number of sampling points of FFT; Find the frequency corresponding to the maximum energy of a signal in the frequency domain; each indicator represents the following meanings: f_p: represents the frequency with the maximum power spectral density (or energy); argmax(): is a mathematical operator that represents the parameter value that maximizes the expression inside the parentheses. In this context, argmax(k)(|X[k]|^2) means the frequency k corresponding to the maximum value of |X[k]|^2. k: represents the frequency index, that is, the serial number of the frequency component of X. Each frequency is traversed to find the frequency that makes the expression reach the maximum value; X[k]: represents the signal strength at frequency k after Fourier transform; |X[k]|^2: represents the square of the signal strength at frequency k. This is a common way to calculate power spectral density. Therefore, the meaning of f_p=argmax(k)(|X[k]|^2) is to find the frequency that maximizes the power spectrum density. We define this frequency as f_p, which is used to analyze and identify the characteristics of the signal. Power or Amplitude For the complex number X[k] at frequency k, we have mentioned that the square value of its modulus |X[k]|^2 represents the energy intensity at that frequency position; therefore, we can directly calculate |X[k]|^2 to obtain the power at frequency k; Similarly, we can also get the total power of the entire signal by calculating the power of all frequency positions: E=Σ|X[k]|^2 Dividing the total power by the number of FFT sampling points N, we can get the average power of the signal: E: represents the total power of the signal; this value is obtained by calculating the power (that is, the square of the signal strength) of all frequency positions in the frequency domain and their sum; Σ: It is the mathematical symbol for summation, which means that we add up the power |X[k]|^2 at each frequency position k; |X[k]|^2: represents the square of the signal strength at frequency k. This is a way to measure the signal strength per unit frequency, that is, the power at frequency k; E_avg=E / N N: is the number of sampling points of Fourier transform. When performing Fourier transform, the signal is divided into N points for processing; E_avg: is the average power of the signal, which is obtained by dividing the total power E by the number of sampling points N; the average power reflects the average power intensity per unit frequency; In addition, we can also obtain the main frequency power and peak power of the signal by respectively calculating the power of the signal at the main frequency position and the maximum power of all frequency positions; Phase In signal processing, for the complex number X[k] at frequency k, its phase is equal to arctan(Im(X[k]) / Re(X[k])), and the value range is [-π,π].
Citation Information
Cited By
Unmanned aerial vehicle frequency system identification system based on AI intelligent analysis
CN119848514A
